@camunda8/cli 1.1.0 → 2.0.0-alpha.10

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.
Files changed (47) hide show
  1. package/README.md +98 -39
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +1 -1
  4. package/dist/client.js.map +1 -1
  5. package/dist/commands/completion.d.ts.map +1 -1
  6. package/dist/commands/completion.js +108 -9
  7. package/dist/commands/completion.js.map +1 -1
  8. package/dist/commands/deployments.d.ts.map +1 -1
  9. package/dist/commands/deployments.js +289 -49
  10. package/dist/commands/deployments.js.map +1 -1
  11. package/dist/commands/forms.d.ts +26 -0
  12. package/dist/commands/forms.d.ts.map +1 -0
  13. package/dist/commands/forms.js +125 -0
  14. package/dist/commands/forms.js.map +1 -0
  15. package/dist/commands/help.d.ts +24 -0
  16. package/dist/commands/help.d.ts.map +1 -1
  17. package/dist/commands/help.js +238 -9
  18. package/dist/commands/help.js.map +1 -1
  19. package/dist/commands/incidents.d.ts +6 -0
  20. package/dist/commands/incidents.d.ts.map +1 -1
  21. package/dist/commands/incidents.js +15 -0
  22. package/dist/commands/incidents.js.map +1 -1
  23. package/dist/commands/plugins.d.ts +5 -0
  24. package/dist/commands/plugins.d.ts.map +1 -1
  25. package/dist/commands/plugins.js +190 -23
  26. package/dist/commands/plugins.js.map +1 -1
  27. package/dist/commands/process-instances.d.ts +12 -2
  28. package/dist/commands/process-instances.d.ts.map +1 -1
  29. package/dist/commands/process-instances.js +55 -4
  30. package/dist/commands/process-instances.js.map +1 -1
  31. package/dist/commands/profiles.d.ts +17 -8
  32. package/dist/commands/profiles.d.ts.map +1 -1
  33. package/dist/commands/profiles.js +74 -35
  34. package/dist/commands/profiles.js.map +1 -1
  35. package/dist/commands/session.js +3 -3
  36. package/dist/commands/session.js.map +1 -1
  37. package/dist/config.d.ts +104 -49
  38. package/dist/config.d.ts.map +1 -1
  39. package/dist/config.js +306 -165
  40. package/dist/config.js.map +1 -1
  41. package/dist/index.js +100 -16
  42. package/dist/index.js.map +1 -1
  43. package/dist/plugin-registry.d.ts +45 -0
  44. package/dist/plugin-registry.d.ts.map +1 -0
  45. package/dist/plugin-registry.js +101 -0
  46. package/dist/plugin-registry.js.map +1 -0
  47. package/package.json +1 -1
package/README.md CHANGED
@@ -5,15 +5,22 @@ A minimal-dependency CLI for Camunda 8 operations built on top of `@camunda8/orc
5
5
  ## Features
6
6
 
7
7
  - **Minimal Dependencies**: Only one runtime dependency (`@camunda8/orchestration-cluster-api`)
8
- - **Native TypeScript**: Runs directly with Node.js 22.18+ (no compilation needed)
9
8
  - **Multi-Tenant Support**: Full support for multi-tenancy across all operations
10
9
  - **Profile Management**: Store and manage multiple cluster configurations
11
10
  - **Camunda Modeler Integration**: Automatically import and use profiles from Camunda Modeler
12
11
  - **Plugin System**: Extend c8ctl with custom commands via npm packages
13
- - **Session State**: Maintain active profile, tenant, and output preferences
14
- - **Building Block Deployment**: Automatic prioritization of `_bb-` folders during deployment
12
+ - **Building Block Deployment**: Automatic prioritization of `*_bb-*` folders during deployment, marked with 🧱 in results
13
+ - **Process Application Support**: Resources in folders with `.process-application` file marked with 📦 in results
14
+ - **Enhanced Deployment Results**: Table view showing file paths, visual indicators, resource details, and versions
15
+ - **Watch Mode**: Monitors a folder for changes to `*.{bpmn,dmn,form}` and auto-redeploys
15
16
  - **Flexible Output**: Switch between human-readable text and JSON output modes
16
17
 
18
+ ## Beware the 🤖
19
+
20
+ *Full transparency*:
21
+ this cli is also a pilot-coding experiment.
22
+ Guided by humans, the codebase is (mostly) built by your friendly neighborhood LLM, fully dogfooding the Human-in-the-Loop pattern.
23
+
17
24
  ## Architecture
18
25
 
19
26
  ### Core Components
@@ -57,52 +64,63 @@ After installation, the CLI is available as `c8ctl` (or its alias `c8`).
57
64
 
58
65
  ## Usage
59
66
 
60
- ### Basic Commands
67
+ ### Getting Help
61
68
 
62
69
  ```bash
63
- # Show help
70
+ # Show general help
64
71
  c8ctl help
65
72
 
73
+ # Show detailed help for specific commands with all flags
74
+ c8ctl help list # Shows all list resources and their flags
75
+ c8ctl help get # Shows all get resources and their flags
76
+ c8ctl help create # Shows all create resources and their flags
77
+ c8ctl help complete # Shows all complete resources and their flags
78
+
66
79
  # Show version
67
80
  c8ctl --version
81
+ ```
68
82
 
69
- # List process instances (using alias 'pi')
70
- c8ctl list pi
71
- # Or using full command name
72
- c8ctl list process-instances
73
-
74
- # List process definitions (using alias 'pd')
75
- c8ctl list pd
76
- c8ctl list process-definitions
83
+ ### Basic Commands
77
84
 
78
- # Get process instance by key
79
- c8ctl get pi 123456
80
- c8ctl get process-instance 123456
85
+ ```bash
86
+ # List and get resources (use aliases pi, pd, ut, inc for convenience)
87
+ c8ctl list pi # List process instances
88
+ c8ctl list pd # List process definitions
89
+ c8ctl get pi 123456 # Get process instance by key
90
+ c8ctl get pi 123456 --variables # Get process instance with variables
91
+ c8ctl get pd 123456 --xml # Get process definition as XML
81
92
 
82
- # Get process definition by key
83
- c8ctl get pd 123456
84
- c8ctl get process-definition 123456
93
+ # Create process instance
94
+ c8ctl create pi --id=myProcess
95
+ c8ctl create process-instance --id=myProcess
85
96
 
86
- # Get process definition XML
87
- c8ctl get pd 123456 --xml
97
+ # Create process instance and wait for completion
98
+ c8ctl create pi --id=myProcess --awaitCompletion
88
99
 
89
- # Create process instance
90
- c8ctl create pi --bpmnProcessId=myProcess
91
- c8ctl create process-instance --bpmnProcessId=myProcess
100
+ # Await process instance completion (alias for create with --awaitCompletion)
101
+ c8ctl await pi --id=myProcess
102
+ c8ctl await process-instance --id=myProcess
92
103
 
93
- # Deploy BPMN file
94
- c8ctl deploy ./my-process.bpmn
104
+ # Cancel process instance
105
+ c8ctl cancel pi 123456
95
106
 
96
- # Deploy current directory
97
- c8ctl deploy
107
+ # Get forms
108
+ c8ctl get form 123456 # Get form (searches both user task and process definition)
109
+ c8ctl get form 123456 --ut # Get form for user task only
110
+ c8ctl get form 123456 --pd # Get start form for process definition only
98
111
 
99
- # Deploy and start process (run)
100
- c8ctl run ./my-process.bpmn
112
+ # Deploy and run
113
+ c8ctl deploy ./my-process.bpmn # Deploy a single file
114
+ c8ctl deploy # Deploy current directory
115
+ c8ctl run ./my-process.bpmn # Deploy and start process
116
+ c8ctl watch # Watch for changes and auto-deploy
101
117
  ```
102
118
 
119
+ For comprehensive examples of all commands and their flags, see [EXAMPLES.md](EXAMPLES.md).
120
+
103
121
  ### Shell Completion
104
122
 
105
- c8ctl supports shell completion for bash, zsh, and fish. To enable completion:
123
+ c8ctl supports shell completion for `bash`, `zsh`, and `fish`. To enable completion:
106
124
 
107
125
  #### Bash
108
126
 
@@ -263,7 +281,7 @@ Debug output is written to stderr with timestamps and won't interfere with norma
263
281
 
264
282
  ### Plugin Management
265
283
 
266
- c8ctl supports a plugin system that allows extending the CLI with custom commands via npm packages.
284
+ c8ctl supports a plugin system that allows extending the CLI with custom commands via npm packages. Plugins are tracked in a registry file (`~/.config/c8ctl/plugins.json` on Linux, similar locations on other platforms) for persistence across npm operations.
267
285
 
268
286
  ```bash
269
287
  # Load a plugin from npm registry
@@ -278,13 +296,27 @@ c8ctl load plugin --from git://github.com/user/repo.git
278
296
  # Unload a plugin (wraps npm uninstall)
279
297
  c8ctl unload plugin <package-name>
280
298
 
281
- # List installed plugins
299
+ # List installed plugins (shows sync status)
282
300
  c8ctl list plugins
283
301
 
302
+ # Synchronize plugins from registry
303
+ # - First tries npm rebuild for installed plugins
304
+ # - Falls back to fresh npm install if rebuild fails
305
+ c8ctl sync plugins
306
+
284
307
  # View help including plugin commands
285
308
  c8ctl help
286
309
  ```
287
310
 
311
+ **Plugin Registry:**
312
+ - Plugins are tracked independently of `package.json` in a registry file
313
+ - The registry serves as the source of truth (local precedence)
314
+ - `c8ctl list plugins` shows sync status:
315
+ - `✓ Installed` - Plugin is in registry and installed
316
+ - `⚠ Not installed` - Plugin is in registry but not in node_modules (run `sync`)
317
+ - `⚠ Not in registry` - Plugin is in package.json but not tracked in registry
318
+ - `c8ctl sync plugins` synchronizes plugins from the registry, rebuilding or reinstalling as needed
319
+
288
320
  **Plugin Requirements:**
289
321
  - Plugin packages must be regular Node.js modules
290
322
  - They must include a `c8ctl-plugin.js` or `c8ctl-plugin.ts` file in the root directory
@@ -330,9 +362,32 @@ When plugins are loaded, their commands automatically appear in `c8ctl help` out
330
362
  c8ctl <verb> <resource> [arguments] [flags]
331
363
  ```
332
364
 
333
- **Verbs**: list, get, create, cancel, complete, fail, activate, resolve, publish, correlate, deploy, run, add, remove, use, output
334
-
335
- **Resources**: process-instance, process-definition, user-task, incident, job, message, topology, profile, tenant
365
+ **Verbs**:
366
+ - `list` - List resources
367
+ - `get` - Get resource by key
368
+ - `create` - Create resource
369
+ - `cancel` - Cancel resource
370
+ - `complete` - Complete resource
371
+ - `fail` - Fail a job
372
+ - `activate` - Activate jobs
373
+ - `resolve` - Resolve incident
374
+ - `publish` - Publish message
375
+ - `correlate` - Correlate message
376
+ - `deploy` - Deploy BPMN/DMN/forms
377
+ - `run` - Deploy and start process
378
+ - `watch` (alias: `w`) - Watch for changes and auto-deploy
379
+ - `add` - Add a profile
380
+ - `remove` (alias: `rm`) - Remove a profile
381
+ - `load` - Load a plugin
382
+ - `unload` - Unload a plugin
383
+ - `sync` - Synchronize plugins
384
+ - `use` - Set active profile or tenant
385
+ - `output` - Set output format
386
+ - `completion` - Generate shell completion script
387
+
388
+ **Resources**: process-instance (pi), process-definition (pd), user-task (ut), incident (inc), job, jobs, message (msg), topology, profile, tenant, plugin
389
+
390
+ **Tip**: Run `c8ctl help <command>` to see detailed help for specific commands with all available flags.
336
391
 
337
392
  ## Testing
338
393
 
@@ -357,6 +412,9 @@ Integration tests require a running Camunda 8 instance at `http://localhost:8080
357
412
 
358
413
  ## Development
359
414
 
415
+ - **Native TypeScript**: Runs directly with Node.js 22.18+ (no compilation needed)
416
+
417
+
360
418
  ### Project Structure
361
419
 
362
420
  ```
@@ -409,7 +467,7 @@ c8ctl <command>
409
467
  - `CAMUNDA_BASE_URL`: Cluster base URL
410
468
  - `CAMUNDA_CLIENT_ID`: OAuth client ID
411
469
  - `CAMUNDA_CLIENT_SECRET`: OAuth client secret
412
- - `CAMUNDA_AUDIENCE`: OAuth audience
470
+ - `CAMUNDA_TOKEN_AUDIENCE`: OAuth token audience
413
471
  - `CAMUNDA_OAUTH_URL`: OAuth token endpoint
414
472
  - `CAMUNDA_DEFAULT_TENANT_ID`: Default tenant ID
415
473
 
@@ -419,13 +477,14 @@ c8ctl <command>
419
477
 
420
478
  Configuration is stored in platform-specific user data directories:
421
479
 
422
- - **Linux**: `~/.local/share/c8ctl/`
480
+ - **Linux**: `~/.config/c8ctl/`
423
481
  - **macOS**: `~/Library/Application Support/c8ctl/`
424
482
  - **Windows**: `%APPDATA%\c8ctl\`
425
483
 
426
484
  Files:
427
485
  - `profiles.json`: Saved cluster configurations
428
486
  - `session.json`: Active profile, tenant, and output mode
487
+ - `plugins.json`: Plugin registry tracking installed plugins
429
488
 
430
489
  ### Camunda Modeler Configuration
431
490
 
@@ -443,7 +502,7 @@ Modeler profiles are:
443
502
 
444
503
  ## License
445
504
 
446
- MIT
505
+ Apache 2.0 - see LICENSE.md
447
506
 
448
507
  ## Contributing
449
508
 
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAG9F;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,aAAa,CAgChE"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAuB,KAAK,aAAa,EAAuB,MAAM,qCAAqC,CAAC;AAGnH;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,aAAa,CAgChE"}
package/dist/client.js CHANGED
@@ -18,7 +18,7 @@ export function createClient(profileFlag) {
18
18
  sdkConfig.CAMUNDA_CLIENT_ID = config.clientId;
19
19
  sdkConfig.CAMUNDA_CLIENT_SECRET = config.clientSecret;
20
20
  if (config.audience) {
21
- sdkConfig.CAMUNDA_OAUTH_AUDIENCE = config.audience;
21
+ sdkConfig.CAMUNDA_TOKEN_AUDIENCE = config.audience;
22
22
  }
23
23
  if (config.oAuthUrl) {
24
24
  sdkConfig.CAMUNDA_OAUTH_URL = config.oAuthUrl;
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAsB,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,WAAoB;IAC/C,MAAM,MAAM,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAEjD,kCAAkC;IAClC,MAAM,SAAS,GAAQ;QACrB,oBAAoB,EAAE,MAAM,CAAC,OAAO;KACrC,CAAC;IAEF,qCAAqC;IACrC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;QAC3C,SAAS,CAAC,qBAAqB,GAAG,OAAO,CAAC;QAC1C,SAAS,CAAC,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC9C,SAAS,CAAC,qBAAqB,GAAG,MAAM,CAAC,YAAY,CAAC;QACtD,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACpB,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,QAAQ,CAAC;QACrD,CAAC;QACD,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACpB,SAAS,CAAC,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChD,CAAC;IACH,CAAC;IACD,0CAA0C;SACrC,IAAI,MAAM,CAAC,QAAQ,IAAI,M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,0CAA0C;SACrC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC5C,SAAS,CAAC,qBAAqB,GAAG,OAAO,CAAC;QAC1C,SAAS,CAAC,2BAA2B,GAAG,MAAM,CAAC,QAAQ,CAAC;QACxD,SAAS,CAAC,2BAA2B,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC1D,CAAC;IACD,oBAAoB;SACf,CAAC;QACJ,SAAS,CAAC,qBAAqB,GAAG,MAAM,CAAC;IAC3C,CAAC;IAED,OAAO,mBAAmB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AACpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;GAEG;AA2jBH;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CA0BnD"}
1
+ {"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;GAEG;AA8pBH;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CA0BnD"}
@@ -18,13 +18,14 @@ _c8ctl_completions() {
18
18
  cword=\${COMP_CWORD}
19
19
 
20
20
  # Commands (verbs)
21
- local verbs="list get create cancel complete fail activate resolve publish correlate deploy run watch add remove rm load unload use output completion help"
21
+ local verbs="list get create cancel await complete fail activate resolve publish correlate deploy run watch add remove rm load unload sync 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"
25
- local get_resources="process-instance pi topology"
25
+ local get_resources="process-instance pi process-definition pd incident inc topology form"
26
26
  local create_resources="process-instance pi"
27
27
  local cancel_resources="process-instance pi"
28
+ local await_resources="process-instance pi"
28
29
  local complete_resources="user-task ut job"
29
30
  local fail_resources="job"
30
31
  local activate_resources="jobs"
@@ -35,12 +36,14 @@ _c8ctl_completions() {
35
36
  local remove_resources="profile"
36
37
  local load_resources="plugin"
37
38
  local unload_resources="plugin"
39
+ local sync_resources="plugin plugins"
38
40
  local use_resources="profile tenant"
39
41
  local output_resources="json text"
40
42
  local completion_resources="bash zsh fish"
43
+ local help_resources="list get create complete"
41
44
 
42
45
  # Global flags
43
- local flags="--help --version --profile --from --all --bpmnProcessId --processInstanceKey --variables --state --assignee --type --correlationKey --timeToLive --maxJobsToActivate --timeout --worker --retries --errorMessage --baseUrl --clientId --clientSecret --audience --oAuthUrl --defaultTenantId --version_num"
46
+ local flags="--help --version --profile --from --all --bpmnProcessId --id --processInstanceKey --variables --state --assignee --type --correlationKey --timeToLive --maxJobsToActivate --timeout --worker --retries --errorMessage --baseUrl --clientId --clientSecret --audience --oAuthUrl --defaultTenantId --awaitCompletion --fetchVariables --userTask --ut --processDefinition --pd"
44
47
 
45
48
  case \${cword} in
46
49
  1)
@@ -63,6 +66,9 @@ _c8ctl_completions() {
63
66
  cancel)
64
67
  COMPREPLY=( \$(compgen -W "\${cancel_resources}" -- "\${cur}") )
65
68
  ;;
69
+ await)
70
+ COMPREPLY=( \$(compgen -W "\${await_resources}" -- "\${cur}") )
71
+ ;;
66
72
  complete)
67
73
  COMPREPLY=( \$(compgen -W "\${complete_resources}" -- "\${cur}") )
68
74
  ;;
@@ -93,6 +99,9 @@ _c8ctl_completions() {
93
99
  unload)
94
100
  COMPREPLY=( \$(compgen -W "\${unload_resources}" -- "\${cur}") )
95
101
  ;;
102
+ sync)
103
+ COMPREPLY=( \$(compgen -W "\${sync_resources}" -- "\${cur}") )
104
+ ;;
96
105
  use)
97
106
  COMPREPLY=( \$(compgen -W "\${use_resources}" -- "\${cur}") )
98
107
  ;;
@@ -102,6 +111,9 @@ _c8ctl_completions() {
102
111
  completion)
103
112
  COMPREPLY=( \$(compgen -W "\${completion_resources}" -- "\${cur}") )
104
113
  ;;
114
+ help)
115
+ COMPREPLY=( \$(compgen -W "\${help_resources}" -- "\${cur}") )
116
+ ;;
105
117
  deploy|run|watch)
106
118
  # Complete with files
107
119
  COMPREPLY=( \$(compgen -f -- "\${cur}") )
@@ -137,6 +149,7 @@ _c8ctl() {
137
149
  'get:Get resource by key'
138
150
  'create:Create resource'
139
151
  'cancel:Cancel resource'
152
+ 'await:Await resource completion'
140
153
  'complete:Complete resource'
141
154
  'fail:Fail a job'
142
155
  'activate:Activate jobs by type'
@@ -151,10 +164,11 @@ _c8ctl() {
151
164
  'rm:Remove a profile'
152
165
  'load:Load a c8ctl plugin'
153
166
  'unload:Unload a c8ctl plugin'
167
+ 'sync:Synchronize plugins from registry'
154
168
  'use:Set active profile or tenant'
155
169
  'output:Set output format'
156
170
  'completion:Generate shell completion script'
157
- 'help:Show help'
171
+ 'help:Show help or detailed help for a command'
158
172
  )
159
173
 
160
174
  flags=(
@@ -166,6 +180,7 @@ _c8ctl() {
166
180
  '--from[Load plugin from URL]:url:'
167
181
  '--all[Show all results]'
168
182
  '--bpmnProcessId[Process definition ID]:id:'
183
+ '--id[Process definition ID (alias for --bpmnProcessId)]:id:'
169
184
  '--processInstanceKey[Process instance key]:key:'
170
185
  '--variables[JSON variables]:json:'
171
186
  '--state[Filter by state]:state:'
@@ -184,7 +199,13 @@ _c8ctl() {
184
199
  '--audience[OAuth audience]:audience:'
185
200
  '--oAuthUrl[OAuth token endpoint]:url:'
186
201
  '--defaultTenantId[Default tenant ID]:id:'
187
- '--version_num[Process definition version]:version:'
202
+ '--version[Process definition version]:version:'
203
+ '--awaitCompletion[Wait for process instance to complete]'
204
+ '--fetchVariables[Comma-separated variable names]:variables:'
205
+ '--userTask[Get form for a user task]'
206
+ '--ut[Get form for a user task (alias for --userTask)]'
207
+ '--processDefinition[Get start form for a process definition]'
208
+ '--pd[Get start form for a process definition (alias for --processDefinition)]'
188
209
  )
189
210
 
190
211
  case \$CURRENT in
@@ -216,7 +237,12 @@ _c8ctl() {
216
237
  resources=(
217
238
  'process-instance:Get process instance'
218
239
  'pi:Get process instance'
240
+ 'process-definition:Get process definition'
241
+ 'pd:Get process definition'
242
+ 'incident:Get incident'
243
+ 'inc:Get incident'
219
244
  'topology:Get cluster topology'
245
+ 'form:Get form for user task or process definition'
220
246
  )
221
247
  _describe 'resource' resources
222
248
  ;;
@@ -234,6 +260,13 @@ _c8ctl() {
234
260
  )
235
261
  _describe 'resource' resources
236
262
  ;;
263
+ await)
264
+ resources=(
265
+ 'process-instance:Await process instance completion'
266
+ 'pi:Await process instance completion'
267
+ )
268
+ _describe 'resource' resources
269
+ ;;
237
270
  complete)
238
271
  resources=(
239
272
  'user-task:Complete user task'
@@ -299,6 +332,13 @@ _c8ctl() {
299
332
  )
300
333
  _describe 'resource' resources
301
334
  ;;
335
+ sync)
336
+ resources=(
337
+ 'plugin:Synchronize plugin'
338
+ 'plugins:Synchronize plugins'
339
+ )
340
+ _describe 'resource' resources
341
+ ;;
302
342
  use)
303
343
  resources=(
304
344
  'profile:Set active profile'
@@ -321,6 +361,15 @@ _c8ctl() {
321
361
  )
322
362
  _describe 'resource' resources
323
363
  ;;
364
+ help)
365
+ resources=(
366
+ 'list:Show list command help'
367
+ 'get:Show get command help'
368
+ 'create:Show create command help'
369
+ 'complete:Show complete command help'
370
+ )
371
+ _describe 'resource' resources
372
+ ;;
324
373
  deploy|run|watch)
325
374
  _files
326
375
  ;;
@@ -358,6 +407,8 @@ complete -c c8ctl -l all -d 'Show all results'
358
407
  complete -c c8 -l all -d 'Show all results'
359
408
  complete -c c8ctl -l bpmnProcessId -d 'Process definition ID' -r
360
409
  complete -c c8 -l bpmnProcessId -d 'Process definition ID' -r
410
+ complete -c c8ctl -l id -d 'Process definition ID (alias for --bpmnProcessId)' -r
411
+ complete -c c8 -l id -d 'Process definition ID (alias for --bpmnProcessId)' -r
361
412
  complete -c c8ctl -l processInstanceKey -d 'Process instance key' -r
362
413
  complete -c c8 -l processInstanceKey -d 'Process instance key' -r
363
414
  complete -c c8ctl -l variables -d 'JSON variables' -r
@@ -394,8 +445,20 @@ complete -c c8ctl -l oAuthUrl -d 'OAuth token endpoint' -r
394
445
  complete -c c8 -l oAuthUrl -d 'OAuth token endpoint' -r
395
446
  complete -c c8ctl -l defaultTenantId -d 'Default tenant ID' -r
396
447
  complete -c c8 -l defaultTenantId -d 'Default tenant ID' -r
397
- complete -c c8ctl -l version_num -d 'Process definition version' -r
398
- complete -c c8 -l version_num -d 'Process definition version' -r
448
+ complete -c c8ctl -l version -d 'Process definition version' -r
449
+ complete -c c8 -l version -d 'Process definition version' -r
450
+ complete -c c8ctl -l awaitCompletion -d 'Wait for process instance to complete'
451
+ complete -c c8 -l awaitCompletion -d 'Wait for process instance to complete'
452
+ complete -c c8ctl -l fetchVariables -d 'Comma-separated variable names' -r
453
+ complete -c c8 -l fetchVariables -d 'Comma-separated variable names' -r
454
+ complete -c c8ctl -l userTask -d 'Get form for a user task'
455
+ complete -c c8 -l userTask -d 'Get form for a user task'
456
+ complete -c c8ctl -l ut -d 'Get form for a user task (alias for --userTask)'
457
+ complete -c c8 -l ut -d 'Get form for a user task (alias for --userTask)'
458
+ complete -c c8ctl -l processDefinition -d 'Get start form for a process definition'
459
+ complete -c c8 -l processDefinition -d 'Get start form for a process definition'
460
+ complete -c c8ctl -l pd -d 'Get start form for a process definition (alias for --processDefinition)'
461
+ complete -c c8 -l pd -d 'Get start form for a process definition (alias for --processDefinition)'
399
462
 
400
463
  # Commands (verbs) - only suggest when no command is given yet
401
464
  complete -c c8ctl -n '__fish_use_subcommand' -a 'list' -d 'List resources'
@@ -406,6 +469,8 @@ complete -c c8ctl -n '__fish_use_subcommand' -a 'create' -d 'Create resource'
406
469
  complete -c c8 -n '__fish_use_subcommand' -a 'create' -d 'Create resource'
407
470
  complete -c c8ctl -n '__fish_use_subcommand' -a 'cancel' -d 'Cancel resource'
408
471
  complete -c c8 -n '__fish_use_subcommand' -a 'cancel' -d 'Cancel resource'
472
+ complete -c c8ctl -n '__fish_use_subcommand' -a 'await' -d 'Await resource completion'
473
+ complete -c c8 -n '__fish_use_subcommand' -a 'await' -d 'Await resource completion'
409
474
  complete -c c8ctl -n '__fish_use_subcommand' -a 'complete' -d 'Complete resource'
410
475
  complete -c c8 -n '__fish_use_subcommand' -a 'complete' -d 'Complete resource'
411
476
  complete -c c8ctl -n '__fish_use_subcommand' -a 'fail' -d 'Fail a job'
@@ -434,12 +499,14 @@ complete -c c8ctl -n '__fish_use_subcommand' -a 'load' -d 'Load a c8ctl plugin'
434
499
  complete -c c8 -n '__fish_use_subcommand' -a 'load' -d 'Load a c8ctl plugin'
435
500
  complete -c c8ctl -n '__fish_use_subcommand' -a 'unload' -d 'Unload a c8ctl plugin'
436
501
  complete -c c8 -n '__fish_use_subcommand' -a 'unload' -d 'Unload a c8ctl plugin'
502
+ complete -c c8ctl -n '__fish_use_subcommand' -a 'sync' -d 'Synchronize plugins from registry'
503
+ complete -c c8 -n '__fish_use_subcommand' -a 'sync' -d 'Synchronize plugins from registry'
437
504
  complete -c c8ctl -n '__fish_use_subcommand' -a 'use' -d 'Set active profile or tenant'
438
505
  complete -c c8 -n '__fish_use_subcommand' -a 'use' -d 'Set active profile or tenant'
439
506
  complete -c c8ctl -n '__fish_use_subcommand' -a 'output' -d 'Set output format'
440
507
  complete -c c8 -n '__fish_use_subcommand' -a 'output' -d 'Set output format'
441
- complete -c c8ctl -n '__fish_use_subcommand' -a 'help' -d 'Show help'
442
- complete -c c8 -n '__fish_use_subcommand' -a 'help' -d 'Show help'
508
+ complete -c c8ctl -n '__fish_use_subcommand' -a 'help' -d 'Show help or detailed help for a command'
509
+ complete -c c8 -n '__fish_use_subcommand' -a 'help' -d 'Show help or detailed help for a command'
443
510
  complete -c c8ctl -n '__fish_use_subcommand' -a 'completion' -d 'Generate shell completion script'
444
511
  complete -c c8 -n '__fish_use_subcommand' -a 'completion' -d 'Generate shell completion script'
445
512
 
@@ -478,8 +545,18 @@ complete -c c8ctl -n '__fish_seen_subcommand_from get' -a 'process-instance' -d
478
545
  complete -c c8 -n '__fish_seen_subcommand_from get' -a 'process-instance' -d 'Get process instance'
479
546
  complete -c c8ctl -n '__fish_seen_subcommand_from get' -a 'pi' -d 'Get process instance'
480
547
  complete -c c8 -n '__fish_seen_subcommand_from get' -a 'pi' -d 'Get process instance'
548
+ complete -c c8ctl -n '__fish_seen_subcommand_from get' -a 'process-definition' -d 'Get process definition'
549
+ complete -c c8 -n '__fish_seen_subcommand_from get' -a 'process-definition' -d 'Get process definition'
550
+ complete -c c8ctl -n '__fish_seen_subcommand_from get' -a 'pd' -d 'Get process definition'
551
+ complete -c c8 -n '__fish_seen_subcommand_from get' -a 'pd' -d 'Get process definition'
552
+ complete -c c8ctl -n '__fish_seen_subcommand_from get' -a 'incident' -d 'Get incident'
553
+ complete -c c8 -n '__fish_seen_subcommand_from get' -a 'incident' -d 'Get incident'
554
+ complete -c c8ctl -n '__fish_seen_subcommand_from get' -a 'inc' -d 'Get incident'
555
+ complete -c c8 -n '__fish_seen_subcommand_from get' -a 'inc' -d 'Get incident'
481
556
  complete -c c8ctl -n '__fish_seen_subcommand_from get' -a 'topology' -d 'Get cluster topology'
482
557
  complete -c c8 -n '__fish_seen_subcommand_from get' -a 'topology' -d 'Get cluster topology'
558
+ complete -c c8ctl -n '__fish_seen_subcommand_from get' -a 'form' -d 'Get form for user task or process definition'
559
+ complete -c c8 -n '__fish_seen_subcommand_from get' -a 'form' -d 'Get form for user task or process definition'
483
560
 
484
561
  # Resources for 'create' command
485
562
  complete -c c8ctl -n '__fish_seen_subcommand_from create' -a 'process-instance' -d 'Create process instance'
@@ -493,6 +570,12 @@ complete -c c8 -n '__fish_seen_subcommand_from cancel' -a 'process-instance' -d
493
570
  complete -c c8ctl -n '__fish_seen_subcommand_from cancel' -a 'pi' -d 'Cancel process instance'
494
571
  complete -c c8 -n '__fish_seen_subcommand_from cancel' -a 'pi' -d 'Cancel process instance'
495
572
 
573
+ # Resources for 'await' command
574
+ complete -c c8ctl -n '__fish_seen_subcommand_from await' -a 'process-instance' -d 'Await process instance completion'
575
+ complete -c c8 -n '__fish_seen_subcommand_from await' -a 'process-instance' -d 'Await process instance completion'
576
+ complete -c c8ctl -n '__fish_seen_subcommand_from await' -a 'pi' -d 'Await process instance completion'
577
+ complete -c c8 -n '__fish_seen_subcommand_from await' -a 'pi' -d 'Await process instance completion'
578
+
496
579
  # Resources for 'complete' command
497
580
  complete -c c8ctl -n '__fish_seen_subcommand_from complete' -a 'user-task' -d 'Complete user task'
498
581
  complete -c c8 -n '__fish_seen_subcommand_from complete' -a 'user-task' -d 'Complete user task'
@@ -545,6 +628,12 @@ complete -c c8 -n '__fish_seen_subcommand_from load' -a 'plugin' -d 'Load plugin
545
628
  complete -c c8ctl -n '__fish_seen_subcommand_from unload' -a 'plugin' -d 'Unload plugin'
546
629
  complete -c c8 -n '__fish_seen_subcommand_from unload' -a 'plugin' -d 'Unload plugin'
547
630
 
631
+ # Resources for 'sync' command
632
+ complete -c c8ctl -n '__fish_seen_subcommand_from sync' -a 'plugin' -d 'Synchronize plugin'
633
+ complete -c c8 -n '__fish_seen_subcommand_from sync' -a 'plugin' -d 'Synchronize plugin'
634
+ complete -c c8ctl -n '__fish_seen_subcommand_from sync' -a 'plugins' -d 'Synchronize plugins'
635
+ complete -c c8 -n '__fish_seen_subcommand_from sync' -a 'plugins' -d 'Synchronize plugins'
636
+
548
637
  # Resources for 'use' command
549
638
  complete -c c8ctl -n '__fish_seen_subcommand_from use' -a 'profile' -d 'Set active profile'
550
639
  complete -c c8 -n '__fish_seen_subcommand_from use' -a 'profile' -d 'Set active profile'
@@ -564,6 +653,16 @@ complete -c c8ctl -n '__fish_seen_subcommand_from completion' -a 'zsh' -d 'Gener
564
653
  complete -c c8 -n '__fish_seen_subcommand_from completion' -a 'zsh' -d 'Generate zsh completion'
565
654
  complete -c c8ctl -n '__fish_seen_subcommand_from completion' -a 'fish' -d 'Generate fish completion'
566
655
  complete -c c8 -n '__fish_seen_subcommand_from completion' -a 'fish' -d 'Generate fish completion'
656
+
657
+ # Resources for 'help' command
658
+ complete -c c8ctl -n '__fish_seen_subcommand_from help' -a 'list' -d 'Show list command help'
659
+ complete -c c8 -n '__fish_seen_subcommand_from help' -a 'list' -d 'Show list command help'
660
+ complete -c c8ctl -n '__fish_seen_subcommand_from help' -a 'get' -d 'Show get command help'
661
+ complete -c c8 -n '__fish_seen_subcommand_from help' -a 'get' -d 'Show get command help'
662
+ complete -c c8ctl -n '__fish_seen_subcommand_from help' -a 'create' -d 'Show create command help'
663
+ complete -c c8 -n '__fish_seen_subcommand_from help' -a 'create' -d 'Show create command help'
664
+ complete -c c8ctl -n '__fish_seen_subcommand_from help' -a 'complete' -d 'Show complete command help'
665
+ complete -c c8 -n '__fish_seen_subcommand_from help' -a 'complete' -d 'Show complete command help'
567
666
  `;
568
667
  }
569
668
  /**
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmHR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAS,qBAAqB;IAC5B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8MR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAS,sBAAsB;IAC7B,O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;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":"deployments.d.ts","sourceRoot":"","sources":["../../src/commands/deployments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwIH;;GAEG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+GhB"}
1
+ {"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../src/commands/deployments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgMH;;GAEG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+KhB"}