A NodeJS library from Plasmo to submit browser extensions to multiple stores. It is made to be used in the Browser Platform Publisher action.
Supported stores:
Unsupported stores:
- Opera Add-ons: They do not have an automation API, and their cookie expires in 24 hours, making them unsuitable for CI/CD.
- @plasmohq/chrome-webstore-api - for uploading extensions to Chrome Web Store.
- @plasmohq/mozilla-addons-api - for signing and uploading extensions to Firefox Addon API.
- @plasmohq/edge-addons-api - for uploading and publishing extensions to Edge Add-ons API.
npm i -D @plasmohq/bms
# or
pnpm i -D @plasmohq/bms
# or
yarn add -D @plasmohq/bms
Following this doc to gather the tokens necessary for the deployment, OR use bpp's json schema which provides intellisense on editors such as vscode. To use the json schema, create a keys.json
file in vscode with the following content:
{
"$schema": "https://raw.githubusercontent.com/PlasmoHQ/bpp/v2/keys.schema.json"
}
Then, the nodejs API can be consumed as follows:
import {
submitChrome,
submitEdge,
submitFirefox,
} from "@plasmohq/bms"
submitChrome({
extId: "EXT_ID",
refreshToken: "refreshToken",
clientId: "clientIdsubmit",
clientSecret: "clientSecret",
zip: "dist/some-zip-v{version}.zip",
verbose: false
})
submitFirefox({
extId: "EXT_ID",
apiKey: "api_key",
apiSecret: "api_secret",
zip: "dist/some-zip-v{version}.zip",
verbose: false
})
submitEdge({
clientId: "aaaaaaa-aaaa-bbbb-cccc-dddddddddddd",
clientSecret: "abcdefg",
productId: "aaaaaaa-aaaa-bbbb-cccc-dddddddddddd",
accessTokenUrl: "https://login.microsoftonline.com/aaaaaaa-aaaa-bbbb-cccc-dddddddddddd/oauth2/v2.0/token",
zip: "dist/some-zip-v{version}.zip",
notes: "Changes for reviewers",
verbose: false
})
Join our Discord channel!
This library was inspired by:
- web-ext-deploy by avi12
- The documentation and API of bms is largely inspired by web-ext-deploy.
- chrome-webstore-upload-cli by fregante
- web-ext by mozilla