@camunda8/cli 2.0.1-alpha.1 → 2.1.0-alpha.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 +43 -10
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +62 -2
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +9 -1
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/plugins.d.ts +15 -1
- package/dist/commands/plugins.d.ts.map +1 -1
- package/dist/commands/plugins.js +429 -76
- package/dist/commands/plugins.js.map +1 -1
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +17 -0
- package/dist/config.js.map +1 -1
- package/dist/default-plugins/hello-world/README.md +158 -0
- package/dist/default-plugins/hello-world/c8ctl-plugin.js +65 -0
- package/dist/default-plugins/hello-world/package.json +8 -0
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin-loader.d.ts +1 -1
- package/dist/plugin-loader.d.ts.map +1 -1
- package/dist/plugin-loader.js +81 -3
- package/dist/plugin-loader.js.map +1 -1
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +16 -0
- package/dist/runtime.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# c8ctl - Camunda 8 CLI
|
|
1
|
+
# Cocktail (c8ctl) - Camunda 8 CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
c8ctl (_pronounced: "cocktail"_) — a minimal-dependency CLI for Camunda 8 operations built on top of [`@camunda8/orchestration-cluster-api`](https://www.npmjs.com/package/@camunda8/orchestration-cluster-api).
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -306,9 +306,24 @@ Debug output is written to stderr with timestamps and won't interfere with norma
|
|
|
306
306
|
|
|
307
307
|
### Plugin Management
|
|
308
308
|
|
|
309
|
-
c8ctl supports a plugin system that allows extending the CLI with custom commands via npm packages. Plugins are
|
|
309
|
+
c8ctl supports a global plugin system that allows extending the CLI with custom commands via npm packages. Plugins are installed globally to a user-specific directory and tracked in a registry file.
|
|
310
|
+
|
|
311
|
+
**Plugin Storage Locations:**
|
|
312
|
+
|
|
313
|
+
The plugin system uses OS-specific directories:
|
|
314
|
+
|
|
315
|
+
| OS | Plugins Directory | Registry File |
|
|
316
|
+
|----|-------------------|---------------|
|
|
317
|
+
| **Linux** | `~/.config/c8ctl/plugins/node_modules` | `~/.config/c8ctl/plugins.json` |
|
|
318
|
+
| **macOS** | `~/Library/Application Support/c8ctl/plugins/node_modules` | `~/Library/Application Support/c8ctl/plugins.json` |
|
|
319
|
+
| **Windows** | `%APPDATA%\c8ctl\plugins\node_modules` | `%APPDATA%\c8ctl\plugins.json` |
|
|
320
|
+
|
|
321
|
+
> **Note:** You can override the data directory with the `C8CTL_DATA_DIR` environment variable.
|
|
310
322
|
|
|
311
323
|
```bash
|
|
324
|
+
# Create a new plugin from template
|
|
325
|
+
c8ctl init plugin my-plugin
|
|
326
|
+
|
|
312
327
|
# Load a plugin from npm registry
|
|
313
328
|
c8ctl load plugin <package-name>
|
|
314
329
|
|
|
@@ -318,7 +333,14 @@ c8ctl load plugin --from file:///path/to/plugin
|
|
|
318
333
|
c8ctl load plugin --from https://github.com/user/repo
|
|
319
334
|
c8ctl load plugin --from git://github.com/user/repo.git
|
|
320
335
|
|
|
321
|
-
#
|
|
336
|
+
# Upgrade a plugin to latest or specific version
|
|
337
|
+
c8ctl upgrade plugin <package-name>
|
|
338
|
+
c8ctl upgrade plugin <package-name> 1.2.3
|
|
339
|
+
|
|
340
|
+
# Downgrade a plugin to a specific version
|
|
341
|
+
c8ctl downgrade plugin <package-name> 1.0.0
|
|
342
|
+
|
|
343
|
+
# Unload a plugin
|
|
322
344
|
c8ctl unload plugin <package-name>
|
|
323
345
|
|
|
324
346
|
# List installed plugins (shows sync status)
|
|
@@ -333,21 +355,32 @@ c8ctl sync plugins
|
|
|
333
355
|
c8ctl help
|
|
334
356
|
```
|
|
335
357
|
|
|
336
|
-
**Plugin
|
|
337
|
-
- Plugins are
|
|
338
|
-
-
|
|
358
|
+
**Global Plugin System:**
|
|
359
|
+
- Plugins are installed to a global directory (OS-specific, see table above)
|
|
360
|
+
- Plugin registry file (`plugins.json`) tracks all installed plugins
|
|
361
|
+
- No local `package.json` is required in your working directory
|
|
362
|
+
- Plugins are available globally from any directory
|
|
363
|
+
- The registry serves as the source of truth for installed plugins
|
|
364
|
+
- Default plugins are bundled with c8ctl and loaded automatically
|
|
365
|
+
- **Plugin commands cannot override built-in commands** - built-in commands always take precedence
|
|
339
366
|
- `c8ctl list plugins` shows sync status:
|
|
340
367
|
- `✓ Installed` - Plugin is in registry and installed
|
|
341
|
-
- `⚠ Not installed` - Plugin is in registry but not in
|
|
342
|
-
- `⚠ Not in registry` - Plugin is
|
|
368
|
+
- `⚠ Not installed` - Plugin is in registry but not in global directory (run `sync`)
|
|
369
|
+
- `⚠ Not in registry` - Plugin is installed but not tracked in registry
|
|
343
370
|
- `c8ctl sync plugins` synchronizes plugins from the registry, rebuilding or reinstalling as needed
|
|
344
371
|
|
|
372
|
+
**Plugin Development:**
|
|
373
|
+
- Use `c8ctl init plugin <name>` to scaffold a new plugin with TypeScript template
|
|
374
|
+
- Generated scaffold includes all necessary files and build configuration
|
|
375
|
+
- Plugins have access to the c8ctl runtime via `globalThis.c8ctl`
|
|
376
|
+
- See the bundled `hello-world` plugin in `default-plugins/` for a complete example
|
|
377
|
+
|
|
345
378
|
**Plugin Requirements:**
|
|
346
379
|
- Plugin packages must be regular Node.js modules
|
|
347
380
|
- They must include a `c8ctl-plugin.js` or `c8ctl-plugin.ts` file in the root directory
|
|
348
381
|
- The plugin file must export a `commands` object
|
|
349
382
|
- Optionally export a `metadata` object to provide help text
|
|
350
|
-
- Plugins are installed
|
|
383
|
+
- Plugins are installed globally and work from any directory
|
|
351
384
|
- The runtime object `c8ctl` provides environment information to plugins
|
|
352
385
|
- **Important**: `c8ctl-plugin.js` must be JavaScript. Node.js doesn't support type stripping in `node_modules`. If writing in TypeScript, transpile to JS before publishing.
|
|
353
386
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;GAEG;AAm2BH;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CA0BnD"}
|
|
@@ -18,7 +18,7 @@ _c8ctl_completions() {
|
|
|
18
18
|
cword=\${COMP_CWORD}
|
|
19
19
|
|
|
20
20
|
# Commands (verbs)
|
|
21
|
-
local verbs="list search get create cancel await complete fail activate resolve publish correlate deploy run watch add remove rm load unload sync use output completion help"
|
|
21
|
+
local verbs="list search get create cancel await complete fail activate resolve publish correlate deploy run watch add remove rm load unload sync upgrade downgrade init use output completion help"
|
|
22
22
|
|
|
23
23
|
# Resources by verb
|
|
24
24
|
local list_resources="process-instances process-instance pi user-tasks user-task ut incidents incident inc jobs profiles profile plugins plugin"
|
|
@@ -38,10 +38,13 @@ _c8ctl_completions() {
|
|
|
38
38
|
local load_resources="plugin"
|
|
39
39
|
local unload_resources="plugin"
|
|
40
40
|
local sync_resources="plugin plugins"
|
|
41
|
+
local upgrade_resources="plugin"
|
|
42
|
+
local downgrade_resources="plugin"
|
|
43
|
+
local init_resources="plugin"
|
|
41
44
|
local use_resources="profile tenant"
|
|
42
45
|
local output_resources="json text"
|
|
43
46
|
local completion_resources="bash zsh fish"
|
|
44
|
-
local help_resources="list get create complete await search deploy run watch cancel resolve fail activate publish correlate"
|
|
47
|
+
local help_resources="list get create complete await search deploy run watch cancel resolve fail activate publish correlate upgrade downgrade init"
|
|
45
48
|
|
|
46
49
|
# Global flags
|
|
47
50
|
local flags="--help --version --profile --from --all --bpmnProcessId --id --processInstanceKey --processDefinitionKey --parentProcessInstanceKey --variables --state --assignee --type --correlationKey --timeToLive --maxJobsToActivate --timeout --worker --retries --errorMessage --baseUrl --clientId --clientSecret --audience --oAuthUrl --defaultTenantId --awaitCompletion --fetchVariables --name --key --elementId --errorType --value --scopeKey --fullValue --userTask --ut --processDefinition --pd --iname --iid --iassignee --ierrorMessage --itype --ivalue"
|
|
@@ -106,6 +109,15 @@ _c8ctl_completions() {
|
|
|
106
109
|
sync)
|
|
107
110
|
COMPREPLY=( \$(compgen -W "\${sync_resources}" -- "\${cur}") )
|
|
108
111
|
;;
|
|
112
|
+
upgrade)
|
|
113
|
+
COMPREPLY=( \$(compgen -W "\${upgrade_resources}" -- "\${cur}") )
|
|
114
|
+
;;
|
|
115
|
+
downgrade)
|
|
116
|
+
COMPREPLY=( \$(compgen -W "\${downgrade_resources}" -- "\${cur}") )
|
|
117
|
+
;;
|
|
118
|
+
init)
|
|
119
|
+
COMPREPLY=( \$(compgen -W "\${init_resources}" -- "\${cur}") )
|
|
120
|
+
;;
|
|
109
121
|
use)
|
|
110
122
|
COMPREPLY=( \$(compgen -W "\${use_resources}" -- "\${cur}") )
|
|
111
123
|
;;
|
|
@@ -170,6 +182,9 @@ _c8ctl() {
|
|
|
170
182
|
'load:Load a c8ctl plugin'
|
|
171
183
|
'unload:Unload a c8ctl plugin'
|
|
172
184
|
'sync:Synchronize plugins from registry'
|
|
185
|
+
'upgrade:Upgrade a plugin'
|
|
186
|
+
'downgrade:Downgrade a plugin'
|
|
187
|
+
'init:Create a new plugin from template'
|
|
173
188
|
'use:Set active profile or tenant'
|
|
174
189
|
'output:Set output format'
|
|
175
190
|
'completion:Generate shell completion script'
|
|
@@ -379,6 +394,24 @@ _c8ctl() {
|
|
|
379
394
|
)
|
|
380
395
|
_describe 'resource' resources
|
|
381
396
|
;;
|
|
397
|
+
upgrade)
|
|
398
|
+
resources=(
|
|
399
|
+
'plugin:Upgrade plugin'
|
|
400
|
+
)
|
|
401
|
+
_describe 'resource' resources
|
|
402
|
+
;;
|
|
403
|
+
downgrade)
|
|
404
|
+
resources=(
|
|
405
|
+
'plugin:Downgrade plugin'
|
|
406
|
+
)
|
|
407
|
+
_describe 'resource' resources
|
|
408
|
+
;;
|
|
409
|
+
init)
|
|
410
|
+
resources=(
|
|
411
|
+
'plugin:Create new plugin from template'
|
|
412
|
+
)
|
|
413
|
+
_describe 'resource' resources
|
|
414
|
+
;;
|
|
382
415
|
use)
|
|
383
416
|
resources=(
|
|
384
417
|
'profile:Set active profile'
|
|
@@ -418,6 +451,9 @@ _c8ctl() {
|
|
|
418
451
|
'activate:Show activate command help'
|
|
419
452
|
'publish:Show publish command help'
|
|
420
453
|
'correlate:Show correlate command help'
|
|
454
|
+
'upgrade:Show upgrade command help'
|
|
455
|
+
'downgrade:Show downgrade command help'
|
|
456
|
+
'init:Show init command help'
|
|
421
457
|
)
|
|
422
458
|
_describe 'resource' resources
|
|
423
459
|
;;
|
|
@@ -584,6 +620,12 @@ complete -c c8ctl -n '__fish_use_subcommand' -a 'unload' -d 'Unload a c8ctl plug
|
|
|
584
620
|
complete -c c8 -n '__fish_use_subcommand' -a 'unload' -d 'Unload a c8ctl plugin'
|
|
585
621
|
complete -c c8ctl -n '__fish_use_subcommand' -a 'sync' -d 'Synchronize plugins from registry'
|
|
586
622
|
complete -c c8 -n '__fish_use_subcommand' -a 'sync' -d 'Synchronize plugins from registry'
|
|
623
|
+
complete -c c8ctl -n '__fish_use_subcommand' -a 'upgrade' -d 'Upgrade a plugin'
|
|
624
|
+
complete -c c8 -n '__fish_use_subcommand' -a 'upgrade' -d 'Upgrade a plugin'
|
|
625
|
+
complete -c c8ctl -n '__fish_use_subcommand' -a 'downgrade' -d 'Downgrade a plugin'
|
|
626
|
+
complete -c c8 -n '__fish_use_subcommand' -a 'downgrade' -d 'Downgrade a plugin'
|
|
627
|
+
complete -c c8ctl -n '__fish_use_subcommand' -a 'init' -d 'Create a new plugin from template'
|
|
628
|
+
complete -c c8 -n '__fish_use_subcommand' -a 'init' -d 'Create a new plugin from template'
|
|
587
629
|
complete -c c8ctl -n '__fish_use_subcommand' -a 'use' -d 'Set active profile or tenant'
|
|
588
630
|
complete -c c8 -n '__fish_use_subcommand' -a 'use' -d 'Set active profile or tenant'
|
|
589
631
|
complete -c c8ctl -n '__fish_use_subcommand' -a 'output' -d 'Set output format'
|
|
@@ -749,6 +791,18 @@ complete -c c8 -n '__fish_seen_subcommand_from sync' -a 'plugin' -d 'Synchronize
|
|
|
749
791
|
complete -c c8ctl -n '__fish_seen_subcommand_from sync' -a 'plugins' -d 'Synchronize plugins'
|
|
750
792
|
complete -c c8 -n '__fish_seen_subcommand_from sync' -a 'plugins' -d 'Synchronize plugins'
|
|
751
793
|
|
|
794
|
+
# Resources for 'upgrade' command
|
|
795
|
+
complete -c c8ctl -n '__fish_seen_subcommand_from upgrade' -a 'plugin' -d 'Upgrade plugin'
|
|
796
|
+
complete -c c8 -n '__fish_seen_subcommand_from upgrade' -a 'plugin' -d 'Upgrade plugin'
|
|
797
|
+
|
|
798
|
+
# Resources for 'downgrade' command
|
|
799
|
+
complete -c c8ctl -n '__fish_seen_subcommand_from downgrade' -a 'plugin' -d 'Downgrade plugin'
|
|
800
|
+
complete -c c8 -n '__fish_seen_subcommand_from downgrade' -a 'plugin' -d 'Downgrade plugin'
|
|
801
|
+
|
|
802
|
+
# Resources for 'init' command
|
|
803
|
+
complete -c c8ctl -n '__fish_seen_subcommand_from init' -a 'plugin' -d 'Create new plugin from template'
|
|
804
|
+
complete -c c8 -n '__fish_seen_subcommand_from init' -a 'plugin' -d 'Create new plugin from template'
|
|
805
|
+
|
|
752
806
|
# Resources for 'use' command
|
|
753
807
|
complete -c c8ctl -n '__fish_seen_subcommand_from use' -a 'profile' -d 'Set active profile'
|
|
754
808
|
complete -c c8 -n '__fish_seen_subcommand_from use' -a 'profile' -d 'Set active profile'
|
|
@@ -800,6 +854,12 @@ complete -c c8ctl -n '__fish_seen_subcommand_from help' -a 'publish' -d 'Show pu
|
|
|
800
854
|
complete -c c8 -n '__fish_seen_subcommand_from help' -a 'publish' -d 'Show publish command help'
|
|
801
855
|
complete -c c8ctl -n '__fish_seen_subcommand_from help' -a 'correlate' -d 'Show correlate command help'
|
|
802
856
|
complete -c c8 -n '__fish_seen_subcommand_from help' -a 'correlate' -d 'Show correlate command help'
|
|
857
|
+
complete -c c8ctl -n '__fish_seen_subcommand_from help' -a 'upgrade' -d 'Show upgrade command help'
|
|
858
|
+
complete -c c8 -n '__fish_seen_subcommand_from help' -a 'upgrade' -d 'Show upgrade command help'
|
|
859
|
+
complete -c c8ctl -n '__fish_seen_subcommand_from help' -a 'downgrade' -d 'Show downgrade command help'
|
|
860
|
+
complete -c c8 -n '__fish_seen_subcommand_from help' -a 'downgrade' -d 'Show downgrade command help'
|
|
861
|
+
complete -c c8ctl -n '__fish_seen_subcommand_from help' -a 'init' -d 'Show init command help'
|
|
862
|
+
complete -c c8 -n '__fish_seen_subcommand_from help' -a 'init' -d 'Show init command help'
|
|
803
863
|
`;
|
|
804
864
|
}
|
|
805
865
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;GAEG;AACH,SAAS,sBAAsB;IAC7B,OAAO
|
|
1
|
+
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;GAEG;AACH,SAAS,sBAAsB;IAC7B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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D,CAAC,CAAC;QAC1E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAE5C,QAAQ,eAAe,EAAE,CAAC;QACxB,KAAK,MAAM;YACT,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,CAAC,CAAC;YACtC,MAAM;QACR,KAAK,KAAK;YACR,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC,CAAC;YACrC,MAAM;QACR,KAAK,MAAM;YACT,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,CAAC,CAAC;YACtC,MAAM;QACR;YACE,MAAM,CAAC,KAAK,CAAC,kBAAkB,KAAK,EAAE,CAAC,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;YACjD,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAInC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAGlC;AAED;;GAEG;AACH,wBAAgB,QAAQ,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAInC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAGlC;AAED;;GAEG;AACH,wBAAgB,QAAQ,IAAI,IAAI,CA4J/B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAqCpD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAgDnC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAwClC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAsBrC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAqBvC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CA6BpC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAsDvC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAqFrC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAmBlC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CA4BpC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAerC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAoBtC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAoBnC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAqBvC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAuBtC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAsBxC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAuDrD"}
|
package/dist/commands/help.js
CHANGED
|
@@ -63,7 +63,10 @@ Commands:
|
|
|
63
63
|
load plugin <name> Load a c8ctl plugin from npm registry
|
|
64
64
|
load plugin --from Load a c8ctl plugin from URL (file://, https://, git://)
|
|
65
65
|
unload plugin <name> Unload a c8ctl plugin (npm uninstall wrapper)
|
|
66
|
+
upgrade plugin <name> [version] Upgrade a plugin to latest or specific version
|
|
67
|
+
downgrade plugin <name> <version> Downgrade a plugin to a specific version
|
|
66
68
|
sync plugin Synchronize plugins from registry (rebuild/reinstall)
|
|
69
|
+
init plugin [name] Create a new plugin from TypeScript template
|
|
67
70
|
use profile|tenant Set active profile or tenant
|
|
68
71
|
output json|text Set output format
|
|
69
72
|
completion bash|zsh|fish Generate shell completion script
|
|
@@ -152,8 +155,10 @@ Examples:
|
|
|
152
155
|
c8ctl watch ./src Watch directory for changes
|
|
153
156
|
c8ctl use profile prod Set active profile
|
|
154
157
|
c8ctl output json Switch to JSON output
|
|
158
|
+
c8ctl init plugin my-plugin Create new plugin from template
|
|
155
159
|
c8ctl load plugin my-plugin Load plugin from npm registry
|
|
156
160
|
c8ctl load plugin --from file:///path/to/plugin Load plugin from file URL
|
|
161
|
+
c8ctl upgrade plugin my-plugin Upgrade plugin to latest version
|
|
157
162
|
c8ctl sync plugin Synchronize plugins
|
|
158
163
|
c8ctl completion bash Generate bash completion script
|
|
159
164
|
|
|
@@ -199,10 +204,13 @@ export function showVerbResources(verb) {
|
|
|
199
204
|
load: 'plugin',
|
|
200
205
|
unload: 'plugin',
|
|
201
206
|
sync: 'plugin',
|
|
207
|
+
upgrade: 'plugin',
|
|
208
|
+
downgrade: 'plugin',
|
|
209
|
+
init: 'plugin',
|
|
202
210
|
use: 'profile, tenant',
|
|
203
211
|
output: 'json, text',
|
|
204
212
|
completion: 'bash, zsh, fish',
|
|
205
|
-
help: 'list, get, create, complete, await, search, deploy, run, watch, cancel, resolve, fail, activate, publish, correlate',
|
|
213
|
+
help: 'list, get, create, complete, await, search, deploy, run, watch, cancel, resolve, fail, activate, publish, correlate, upgrade, downgrade, init',
|
|
206
214
|
};
|
|
207
215
|
const available = resources[verb];
|
|
208
216
|
if (available) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW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CAAC;YACpB,MAAM;QACR;YACE,OAAO,CAAC,GAAG,CAAC,qCAAqC,OAAO,EAAE,CAAC,CAAC;YAC5D,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Load a plugin (npm install wrapper)
|
|
6
6
|
* Supports either package name or --from flag with URL
|
|
7
|
+
* Installs to global plugins directory
|
|
7
8
|
*/
|
|
8
9
|
export declare function loadPlugin(packageNameOrFrom?: string, fromUrl?: string): Promise<void>;
|
|
9
10
|
/**
|
|
10
11
|
* Unload a plugin (npm uninstall wrapper)
|
|
12
|
+
* Uninstalls from global plugins directory
|
|
11
13
|
*/
|
|
12
14
|
export declare function unloadPlugin(packageName: string): Promise<void>;
|
|
13
15
|
/**
|
|
@@ -16,7 +18,19 @@ export declare function unloadPlugin(packageName: string): Promise<void>;
|
|
|
16
18
|
export declare function listPlugins(): void;
|
|
17
19
|
/**
|
|
18
20
|
* Sync plugins - synchronize registry with actual installations
|
|
19
|
-
*
|
|
21
|
+
* Registry has precedence - plugins are installed to global directory
|
|
20
22
|
*/
|
|
21
23
|
export declare function syncPlugins(): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Upgrade a plugin to the latest version or a specific version
|
|
26
|
+
*/
|
|
27
|
+
export declare function upgradePlugin(packageName: string, version?: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Downgrade a plugin to a specific version
|
|
30
|
+
*/
|
|
31
|
+
export declare function downgradePlugin(packageName: string, version: string): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Initialize a new plugin project with TypeScript template
|
|
34
|
+
*/
|
|
35
|
+
export declare function initPlugin(pluginName?: string): Promise<void>;
|
|
22
36
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/commands/plugins.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/commands/plugins.ts"],"names":[],"mappings":"AAAA;;GAEG;AAiBH;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA6D5F;AA4FD;;;GAGG;AACH,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BrE;AAqDD;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CA0DlC;AAED;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CA+FjD;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4CxF;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCzF;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgNnE"}
|