Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/linusu/upload-opera-extension

Submit an update to a Opera Extension with one simple function call
https://github.com/linusu/upload-opera-extension

Last synced: 4 days ago
JSON representation

Submit an update to a Opera Extension with one simple function call

Awesome Lists containing this project

README

        

# Upload Opera Extension

Submit an update to an Opera Extension with one simple function call.

## Installation

```sh
npm install --save upload-opera-extension
```

## Usage

```js
const uploadOperaExtension = require('upload-opera-extension')

const options = {
email: process.env.OPERA_EMAIL,
password: process.env.OPERA_PASSWORD,
extensionId: process.env.OPERA_EXT_ID,
zipPath: 'my-extension.zip'
}

uploadOperaExtension(options).then(() => {
console.log('Extension submitted for moderation 🙌')
})
```

## API

### `uploadOperaExtension(options) => Promise`

Upload an extension to addons.opera.com.

- `options.email` (string) - Email used to log in
- `options.password` (string) - Password used to log in
- `options.extensionId` (string) - ID of the extension to submit a new version of
- `options.zipPath` (string) - Path to the zip file that will be submitted

The extension ID can be found by inspecting the URL of the extension in the developer dashboard.

Returns a Promise that will either reject with an error, or resolve to `undefined`.

## Debugging

If an environmental variable named `DEBUG_UPLOAD_OPERA_EXTENSION` is set to a non-empty value, a Chrome window will be visible during the execution and then stay open after the function is done.