CLI
CLI is a console utility packaged as an NPM package that supports the entire plugin lifecycle: creating, debugging, testing, and publishing.
Available commands
|
Command |
Description |
|
|
Create a plugin from a template |
|
|
Update a plugin to the latest template version |
|
|
Build a plugin |
|
|
Build plugin documentation |
|
|
Run local plugin debugging |
|
|
Check the manifest, TypeScript, ESLint, and styles |
|
|
Log in to account and save the token |
|
|
Log out of account and delete the saved token |
|
|
Check the local project, authorization, and CLI configuration |
|
|
Check, build, and submit the plugin for moderation |
|
|
View the list of your plugins and moderation statuses |
|
|
View plugin information. If no ID is specified, the CLI takes it from the manifest |
|
|
Withdraw a version that was submitted for moderation. If no arguments are specified, the CLI takes them from the manifest |
To view the built-in help, run weavix --help. For help on a specific command, add the --help flag after it, for example weavix submit --help.
Installation
npm install -g @weavix/cli
Local development
-
First, enable the plugin debugging mode in the Tracker interface.
Settings - Experiments - Plugin debuggingWhen you enable debugging, the browser may request permission for the site to access the local network. Grant access: without it, debugging will not work, because the config and plugins are loaded from
localhost. -
Then run the debug mode in the plugin folder:
weavix debug -
Open the integration point used in the plugin in the Tracker interface.
-
Make changes to the plugin interface code — they are applied to the interface immediately.
Publishing a plugin
Publishing is performed in the following order:
-
Get a token for the CLI:
weavix login -
Before publishing, make sure that the project contains the required files for the catalog:
public/logo.svgmarketplace/header-image.jpgmarketplace/index.md
-
Run the full publishing process:
weavix submitThis command will register the plugin if necessary, upload the distribution, and submit the version for moderation.
-
After submitting for moderation, check the publication status:
weavix list
Withdrawing a version from moderation
You can only withdraw a version with the IN_REVIEW status. Run the command:
weavix withdraw
The CLI will take the id and version values from the manifest.json file of the current project. To withdraw a different version, specify the plugin ID and version number:
weavix withdraw <plugin-id> <version>