-
-
Notifications
You must be signed in to change notification settings - Fork 110
Improved Web Store Management #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Improved Web Store Management #138
Conversation
Would it also be possible to add an |
I think this already exists from this commit. |
yes, sweet! |
Co-authored-by: Sam Maddock <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference, I'd recommend breaking up each API addition into separate PRs. That way feedback for one doesn't need to block the others.
queueMicrotask(() => { | ||
webStoreState.afterUninstall?.({ id }) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the queueMicrotask
needed?
queueMicrotask(() => { | |
webStoreState.afterUninstall?.({ id }) | |
}) | |
webStoreState.afterUninstall?.({ id }) |
session: webStoreState.session, | ||
extensionsPath: webStoreState.extensionsPath, | ||
} | ||
await webStoreState.customSetExtensionEnabled(id, details, enabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to setExtensionEnabled
and add documentation referencing chrome.management.setEnabled
@@ -50,6 +50,23 @@ function getExtensionInstallStatus( | |||
extensionId: ExtensionId, | |||
manifest?: chrome.runtime.Manifest, | |||
) { | |||
if (state.overrideExtensionInstallStatus) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to getExtensionInstallStatus
Summary
This PR makes it possible for users to create a custom extensions management system (Install, Uninstall, Enable & Disable)
Changes
afterInstall
option toinstallChromeWebStore()
, which allows the users to specifically track extensions installed via the webstore.afterUninstall
option toinstallChromeWebStore()
, which allows the users to specifically track extensions uninstalled via the webstoreoverrideExtensionInstallStatus
option toinstallChromeWebStore()
, which allows the users to override the extension state passed to the webstore. (eg: Disabled, Blacklisted, Corrupted, etc)Why?
These changes allowed me to implement a custom extension management system here, while maintaining the state with
electron-chrome-web-store
.closes #116
✅ By sending this pull request, I agree to the Contributor License Agreement of this project.