Skip to content

Commit

Permalink
doc: update docs for list command
Browse files Browse the repository at this point in the history
  • Loading branch information
gera2ld committed Dec 10, 2023
1 parent 79b22ac commit 1c49772
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,33 @@

Upload your web extension to [AMO](https://addons.mozilla.org/) and get the download URL after being signed.

Note: This package requires Node.js >= 14 and only provides ES module, see [here](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) for more details.
Note: This package only provides ES module, see [here](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) for more details.

## Highlights

- Upload zipped extension file
- Optionally upload source code for review
- Can run multiple times, friendly to CI
- Idempotent commands, CI friendly
- List all version statuses with a single command

## Usage
## Command-line Usage

### Command-line
The following options can also be loaded from environment variables:

| Global Option | Environment Variable |
|--------------------|----------------------|
| `--api-key` | `AMO_KEY` |
| `--api-secret` | `AMO_SECRET` |
| `--api-url-prefix` | `AMO_URL_PREFIX` |
| `--addon-id` | `AMO_ADDON_ID` |

Note: the command-line options take precedence over the environment variables.

### Upload and Sign

```bash
$ npx amo-upload \
sign \
--api-key $API_KEY \
--api-secret $API_SECRET \
--addon-id $ADDON_ID \
Expand All @@ -34,7 +47,21 @@ For `listed` channel, we don't wait for the signed package if no `output` is spe

For `unlisted` channel, we will wait for the package to be signed. After the signed file is downloaded, the path of the downloaded file will be printed to the console. Otherwise an error will be thrown.

### API
### List Statuses

![image](https://github.com/violentmonkey/amo-upload/assets/3139113/ef10cbbb-d518-4655-993c-fbc62c15ed4e)

```bash
# List all public versions
$ npx amo-upload list

# List all listed and unlisted versions
$ npx amo-upload list --filter all_with_unlisted
```

See [the documentation](https://addons-server.readthedocs.io/en/latest/topics/api/addons.html#version-filtering-param) for more details about `filter`.

## API

```js
import { signAddon } from 'amo-upload';
Expand Down

0 comments on commit 1c49772

Please sign in to comment.