Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/plasmohq/bms

📢 Browser Market Submission
https://github.com/plasmohq/bms

addons browser-extension chrome firefox web-extension webext

Last synced: 2 months ago
JSON representation

📢 Browser Market Submission

Awesome Lists containing this project

README

        



plasmo logo banner



See License


NPM Install


Follow PlasmoHQ on Twitter


Watch our Live DEMO every Friday


Join our Discord for support and chat about our projects


typescript-action status

# Browser Market Submit

A NodeJS library from [Plasmo](https://www.plasmo.com/) to submit browser extensions to multiple stores. It is made to be used in the [Browser Platform Publisher](https://bpp.browser.market) action.

Supported stores:

- [Chrome Web Store](https://chrome.google.com/webstore/category/extensions)
- [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/extensions)
- [Edge Add-ons](https://microsoftedge.microsoft.com/addons)

Unsupported stores:

- [Opera Add-ons](https://addons.opera.com/en/extensions): They do not have an automation API, and their cookie expires in 24 hours, making them unsuitable for CI/CD.

# Core packages used

- [@plasmohq/chrome-webstore-api](https://github.com/PlasmoHQ/chrome-webstore-api) - for uploading extensions to Chrome Web Store.
- [@plasmohq/mozilla-addons-api](https://github.com/PlasmoHQ/mozilla-addons-api) - for signing and uploading extensions to Firefox Addon API.
- [@plasmohq/edge-addons-api](https://github.com/PlasmoHQ/edge-addons-api) - for uploading and publishing extensions to Edge Add-ons API.

# Installing

```shell
npm i -D @plasmohq/bms
# or
pnpm i -D @plasmohq/bms
# or
yarn add -D @plasmohq/bms
```

# Usage

Following this [doc](./tokens.md) to gather the tokens necessary for the deployment, OR use [bpp's json schema](https://raw.githubusercontent.com/PlasmoHQ/bpp/v2/keys.schema.json) which provides intellisense on editors such as vscode. To use the json schema, create a `keys.json` file in vscode with the following content:

```json
{
"$schema": "https://raw.githubusercontent.com/PlasmoHQ/bpp/v2/keys.schema.json"
}
```

Then, the nodejs API can be consumed as follows:

```ts
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
})
```

# Support

Join our [Discord channel](https://www.plasmo.com/s/d)!

# Acknowledgment

This library was inspired by:

- [web-ext-deploy](https://github.com/avi12/web-ext-deploy) by [avi12](https://github.com/avi12)
- The documentation and API of bms is largely inspired by web-ext-deploy.
- [chrome-webstore-upload-cli](https://github.com/fregante/chrome-webstore-upload-cli) by [fregante](https://github.com/fregante)
- [web-ext](https://github.com/mozilla/web-ext) by [mozilla](https://github.com/mozilla)

# License

[MIT](./license) ⭐ [Plasmo Corp.](https://plasmo.com)