@cervio/cli 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -14
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# @cervio/cli
|
|
2
2
|
|
|
3
|
-
Developer CLI for Cervio
|
|
4
|
-
|
|
3
|
+
Developer CLI for Cervio plugins: login, validate, pack, push and manage releases, built
|
|
4
|
+
on [`@cervio/plugin-core`](https://www.npmjs.com/package/@cervio/plugin-core), the same
|
|
5
|
+
validation the Cervio host applies to uploads.
|
|
5
6
|
|
|
6
7
|
The binary is `cervio`. This document is the **command reference** (source of truth for flags
|
|
7
8
|
and behaviour). Partner-facing install and multi-instance auth also live on
|
|
@@ -9,12 +10,11 @@ and behaviour). Partner-facing install and multi-instance auth also live on
|
|
|
9
10
|
|
|
10
11
|
## Install
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Requires Node.js 26 or later.
|
|
13
14
|
|
|
14
15
|
```bash
|
|
15
|
-
npm install -
|
|
16
|
-
|
|
17
|
-
pnpm add -D @cervio/cli
|
|
16
|
+
npm install --save-dev @cervio/cli # per project (the templates already include it)
|
|
17
|
+
npm install -g @cervio/cli # or globally
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Typical workflow
|
|
@@ -31,8 +31,8 @@ cervio push --changelog "…" --expect-host https://your-instance.cervio.app
|
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
**First stable push before `--dev`.** The first upload must be a release-channel push
|
|
34
|
-
(`cervio push` without `--dev`) so the host creates the
|
|
35
|
-
|
|
34
|
+
(`cervio push` without `--dev`) so the host creates the plugin. Only then can
|
|
35
|
+
`cervio push --dev` upload a scratch build of it.
|
|
36
36
|
|
|
37
37
|
## Configuration
|
|
38
38
|
|
|
@@ -56,8 +56,7 @@ Do not duplicate multi-instance guidance here - use the auth-instances docs (or
|
|
|
56
56
|
|
|
57
57
|
## PAT scopes
|
|
58
58
|
|
|
59
|
-
The plugin admin API is scope-gated
|
|
60
|
-
used with this CLI needs:
|
|
59
|
+
The plugin admin API is scope-gated. A personal access token used with this CLI needs:
|
|
61
60
|
|
|
62
61
|
| Scope | Commands |
|
|
63
62
|
|---|---|
|
|
@@ -148,7 +147,7 @@ Flow:
|
|
|
148
147
|
5. Packs the plugin (or validates `--file`) and `POST`s it to `/api/v1/admin/plugins/upload` as
|
|
149
148
|
`multipart/form-data` - see "Upload request format" below. **`--dev` requires the plugin
|
|
150
149
|
to already exist on the host** (i.e. at least one prior non-dev push) - the dev channel
|
|
151
|
-
|
|
150
|
+
updates a scratch build of an existing plugin and cannot create one.
|
|
152
151
|
6. On success, updates `lastHost` in `~/.cervio/state.json`.
|
|
153
152
|
|
|
154
153
|
Together with `cervio download`, `--file` lets you round-trip a host artifact
|
|
@@ -159,7 +158,7 @@ Together with `cervio download`, `--file` lets you round-trip a host artifact
|
|
|
159
158
|
|---|---|
|
|
160
159
|
| `--host <url>` | Override resolved host |
|
|
161
160
|
| `--release <semver>` | Download that release label (default: current active release) |
|
|
162
|
-
| `--dev` | Download the
|
|
161
|
+
| `--dev` | Download the dev-channel ZIP instead |
|
|
163
162
|
| `-o, --output <path>` | Destination file (default: `.cervio/out/<plugin_key>-vX.zip` or `…-dev.zip`) |
|
|
164
163
|
| `--json` | Machine-readable output |
|
|
165
164
|
|
|
@@ -193,8 +192,8 @@ scaffolder as `npm create @cervio/plugin`. The optional positional `name` is pas
|
|
|
193
192
|
| `--dev` | With `--push`, push to the dev channel |
|
|
194
193
|
| `--host <url>` | Override host for the push |
|
|
195
194
|
|
|
196
|
-
Watches `src/`
|
|
197
|
-
only build + validate run.
|
|
195
|
+
Watches `src/` (Node's recursive `fs.watch`, changes coalesced); on any change, rebuilds
|
|
196
|
+
and validates. Without `--push`, only build + validate run.
|
|
198
197
|
|
|
199
198
|
### `cervio doctor [--host <url>] [--json]`
|
|
200
199
|
|
|
@@ -269,6 +268,11 @@ Response shape depends on `channel`:
|
|
|
269
268
|
- `dev`: `{ channel: "dev", plugin, dev_channel: { content_sha256, artifact_sha256, artifact_size_bytes, updated_at } }`.
|
|
270
269
|
Fails with `plugin_not_found` if the plugin doesn't exist yet (see `push` flow above).
|
|
271
270
|
|
|
271
|
+
## Requests
|
|
272
|
+
|
|
273
|
+
Every request sends `User-Agent: cervio-cli/<version> node/<version>`, so a Cervio host can
|
|
274
|
+
see which CLI versions are still in use.
|
|
275
|
+
|
|
272
276
|
## Known gaps
|
|
273
277
|
|
|
274
278
|
- `GET /api/v1/me` does not return an organization display name (only `organization_id`), so
|
|
@@ -284,3 +288,17 @@ pnpm --filter @cervio/cli build # tsup → dist/cli.js
|
|
|
284
288
|
pnpm --filter @cervio/cli typecheck
|
|
285
289
|
node packages/cli/dist/cli.js --help
|
|
286
290
|
```
|
|
291
|
+
|
|
292
|
+
## License
|
|
293
|
+
|
|
294
|
+
MIT, see [LICENSE](LICENSE).
|
|
295
|
+
|
|
296
|
+
**Trademark.** "Cervio" and the Cervio logo are trademarks of Cervio S.r.l. This license
|
|
297
|
+
does not grant permission to use them. You may say that a plugin "works with Cervio"; you
|
|
298
|
+
may not imply endorsement or ship a product named Cervio.
|
|
299
|
+
|
|
300
|
+
**Platform.** Using a Cervio organization is governed by your partner or customer
|
|
301
|
+
agreement, not by this license.
|
|
302
|
+
|
|
303
|
+
**Your plugins.** Plugins you write are yours: using this package gives Cervio no rights
|
|
304
|
+
over your plugin, and does not require you to open-source it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cervio/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Developer CLI for Cervio plugins: login, validate, pack, push and manage releases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cervio",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"commander": "^15.0.0",
|
|
32
32
|
"prompts": "^2.4.2",
|
|
33
|
-
"@cervio/create-plugin": "^1.
|
|
34
|
-
"@cervio/plugin-core": "^1.0.
|
|
33
|
+
"@cervio/create-plugin": "^1.1.0",
|
|
34
|
+
"@cervio/plugin-core": "^1.0.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^26.0.0",
|