@nextplus/addons-cli
v0.0.5
Published
NextPlus addons CLI
Readme
@nextplus/addons-cli (npaddons)
A simple CLI to publish NextPlus Addons to the Addons Server.
Install
npm i -g @nextplus/addons-cliVerify:
npaddons --helpCommands
npaddons set-server <url>: Set the server base URL (defaults tohttps://addons.nextplus.io).npaddons set-token <token>: Set the authentication token used to talk to the server.npaddons publish <folder>: Publish the folder contents to the server using a presigned upload.
Usage
- Set the token (you receive it out-of-band):
npaddons set-token YOUR_TOKEN_HERE- Optional: Override the server URL (default is
https://addons.nextplus.io):
npaddons set-server https://addons-test.nextplus.io- Publish a folder (absolute or relative path):
npaddons publish ./buildDuring publish, the CLI will:
- Validate the folder size is ≤ 50 MB (sum of file sizes).
- Validate
index.htmlexists at the root of the provided folder. - Validate there is no
node_modulesdirectory at the folder root. - Request a signed upload from the server and upload all files recursively, showing a progress bar.
Troubleshooting
- 401 Unauthorized: Ensure you ran
npaddons set-tokenwith a valid token. - Invalid URL: Use
http://orhttps://(e.g.,npaddons set-server https://addons.nextplus.io). - Validation errors: Ensure
index.htmlexists, the total size ≤ 50MB, and nonode_modulesin the root.
Uninstall
npm uninstall -g @nextplus/addons-cli