0.6.0 • Published 5 months ago

amo-upload v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

amo-upload

NPM License Downloads

Upload your web extension to AMO and get the download URL after being signed.

Note: This package only provides ES module, see here for more details.

Highlights

  • Upload zipped extension file
  • Optionally upload source code for review
  • Idempotent commands, CI friendly
  • List all version statuses with a single command

Command-line Usage

The following options can also be loaded from environment variables:

Global OptionEnvironment Variable
--api-keyAMO_KEY
--api-secretAMO_SECRET
--api-url-prefixAMO_URL_PREFIX
--addon-idAMO_ADDON_ID

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

Upload and Sign

$ npx amo-upload \
  sign \
  --api-key $API_KEY \
  --api-secret $API_SECRET \
  --addon-id $ADDON_ID \
  --addon-version $VERSION \
  --channel listed \
  --dist-file path/to/dist.zip \
  --source-file path/to/source.zip
  --output path/to/my-ext-v1.2.3.xpi

For listed channel, we don't wait for the signed package if no output is specified. The output will be the filename of the package.

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.

List Statuses

image

# 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 for more details about filter.

API

import { signAddon } from 'amo-upload';

try {
  const output = await signAddon({
    apiKey,
    apiSecret,
    addonId,
    addonVersion,
    channel: 'listed',
    distFile: 'path/to/dist.zip',
    sourceFile: 'path/to/source.zip',
    output: 'path/to/my-ext-v1.2.3.xpi',
  });
  console.info('The signed file is stored at:', output);
} catch (err) {
  console.error('File not signed yet');
}

References

0.5.5

5 months ago

0.6.0

5 months ago

0.5.4

5 months ago

0.5.1-0

7 months ago

0.5.3

6 months ago

0.5.0

7 months ago

0.4.1

8 months ago

0.4.1-3

8 months ago

0.4.1-2

8 months ago

0.5.2

7 months ago

0.4.1-1

8 months ago

0.5.1

7 months ago

0.4.2

7 months ago

0.4.1-0

8 months ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.3.1

1 year ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago