@camunda8/cli 2.1.0 → 2.2.0
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 +18 -1
- package/dist/client.d.ts +30 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +55 -0
- package/dist/client.js.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +31 -2
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +60 -0
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/incidents.d.ts +4 -0
- package/dist/commands/incidents.d.ts.map +1 -1
- package/dist/commands/incidents.js +6 -4
- package/dist/commands/incidents.js.map +1 -1
- package/dist/commands/jobs.d.ts +4 -0
- package/dist/commands/jobs.d.ts.map +1 -1
- package/dist/commands/jobs.js +6 -4
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/plugins.d.ts.map +1 -1
- package/dist/commands/plugins.js +31 -148
- package/dist/commands/plugins.js.map +1 -1
- package/dist/commands/process-definitions.d.ts +4 -0
- package/dist/commands/process-definitions.d.ts.map +1 -1
- package/dist/commands/process-definitions.js +6 -4
- package/dist/commands/process-definitions.js.map +1 -1
- package/dist/commands/process-instances.d.ts +4 -0
- package/dist/commands/process-instances.d.ts.map +1 -1
- package/dist/commands/process-instances.js +8 -6
- package/dist/commands/process-instances.js.map +1 -1
- package/dist/commands/profiles.d.ts +4 -0
- package/dist/commands/profiles.d.ts.map +1 -1
- package/dist/commands/profiles.js +15 -1
- package/dist/commands/profiles.js.map +1 -1
- package/dist/commands/search.d.ts +20 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +36 -43
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/user-tasks.d.ts +4 -0
- package/dist/commands/user-tasks.d.ts.map +1 -1
- package/dist/commands/user-tasks.js +6 -4
- package/dist/commands/user-tasks.js.map +1 -1
- package/dist/default-plugins/hello-world/README.md +3 -0
- package/dist/default-plugins/hello-world/c8ctl-plugin.js +4 -0
- package/dist/index.js +49 -1
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +7 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +36 -0
- package/dist/logger.js.map +1 -1
- package/dist/plugin-loader.d.ts.map +1 -1
- package/dist/plugin-loader.js +7 -3
- package/dist/plugin-loader.js.map +1 -1
- package/dist/runtime.d.ts +20 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js.map +1 -1
- package/dist/templates/AGENTS.md +77 -0
- package/dist/templates/README.md +49 -0
- package/dist/templates/c8ctl-plugin.js +2 -0
- package/dist/templates/c8ctl-plugin.ts +50 -0
- package/dist/templates/init-plugin-next-steps.txt +9 -0
- package/dist/templates/package.json +22 -0
- package/dist/templates/tsconfig.json +15 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -394,8 +394,11 @@ c8ctl help
|
|
|
394
394
|
|
|
395
395
|
**Plugin Development:**
|
|
396
396
|
- Use `c8ctl init plugin <name>` to scaffold a new plugin with TypeScript template
|
|
397
|
-
- Generated scaffold includes all necessary files and
|
|
397
|
+
- Generated scaffold includes all necessary files, build configuration, and an `AGENTS.md` guide for autonomous plugin implementation
|
|
398
398
|
- Plugins have access to the c8ctl runtime via `globalThis.c8ctl`
|
|
399
|
+
- Plugins can create SDK clients via `globalThis.c8ctl.createClient(profile?, sdkConfig?)`
|
|
400
|
+
- Plugins can resolve tenant IDs via `globalThis.c8ctl.resolveTenantId(profile?)`
|
|
401
|
+
- Plugins can access c8ctl output-aware logging via `globalThis.c8ctl.getLogger()`
|
|
399
402
|
- See the bundled `hello-world` plugin in `default-plugins/` for a complete example
|
|
400
403
|
|
|
401
404
|
**Plugin Requirements:**
|
|
@@ -405,8 +408,22 @@ c8ctl help
|
|
|
405
408
|
- Optionally export a `metadata` object to provide help text
|
|
406
409
|
- Plugins are installed globally and work from any directory
|
|
407
410
|
- The runtime object `c8ctl` provides environment information to plugins
|
|
411
|
+
- The runtime object `c8ctl` exposes `createClient(profile?, sdkConfig?)` for creating Camunda SDK clients from plugins
|
|
412
|
+
- The runtime object `c8ctl` exposes `resolveTenantId(profile?)` using the same fallback logic as built-in commands
|
|
413
|
+
- The runtime object `c8ctl` exposes `getLogger()` returning the c8ctl logger instance (respects current output mode)
|
|
408
414
|
- **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.
|
|
409
415
|
|
|
416
|
+
**TypeScript Plugin Autocomplete:**
|
|
417
|
+
|
|
418
|
+
```typescript
|
|
419
|
+
import type { C8ctlPluginRuntime } from '@camunda8/cli/runtime';
|
|
420
|
+
|
|
421
|
+
const c8ctl = globalThis.c8ctl as C8ctlPluginRuntime;
|
|
422
|
+
const tenantId = c8ctl.resolveTenantId();
|
|
423
|
+
const logger = c8ctl.getLogger();
|
|
424
|
+
logger.info(`Tenant: ${tenantId}`);
|
|
425
|
+
```
|
|
426
|
+
|
|
410
427
|
**Example Plugin Structure:**
|
|
411
428
|
```typescript
|
|
412
429
|
// c8ctl-plugin.ts
|
package/dist/client.d.ts
CHANGED
|
@@ -6,4 +6,34 @@ import { type CamundaClient, type CamundaOptions } from '@camunda8/orchestration
|
|
|
6
6
|
* Create a Camunda 8 cluster client with resolved configuration
|
|
7
7
|
*/
|
|
8
8
|
export declare function createClient(profileFlag?: string, additionalSdkConfig?: Partial<CamundaOptions>): CamundaClient;
|
|
9
|
+
/**
|
|
10
|
+
* Default upper bound on the total number of items fetched.
|
|
11
|
+
* Prevents runaway memory usage on very large result sets.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_MAX_ITEMS = 1000000;
|
|
14
|
+
/**
|
|
15
|
+
* Paginated API response shape (the page metadata lives alongside items).
|
|
16
|
+
*/
|
|
17
|
+
type PagedResponse<T> = {
|
|
18
|
+
items?: T[];
|
|
19
|
+
page?: {
|
|
20
|
+
totalItems?: bigint | number;
|
|
21
|
+
endCursor?: string;
|
|
22
|
+
startCursor?: string;
|
|
23
|
+
hasMoreTotalItems?: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Fetch all pages from a Camunda 8 search endpoint using cursor-based
|
|
28
|
+
* pagination. The caller supplies a search function that accepts a filter
|
|
29
|
+
* object (with an optional `page` property) and returns a paged response.
|
|
30
|
+
*
|
|
31
|
+
* @param searchFn – the SDK search method to call (e.g. `client.searchProcessInstances`)
|
|
32
|
+
* @param filter – base filter object; a `page` property will be merged in
|
|
33
|
+
* @param pageSize – items per page (default 100)
|
|
34
|
+
* @param maxItems – stop after collecting this many items (default 1 000 000)
|
|
35
|
+
* @returns all collected items across every page (up to maxItems)
|
|
36
|
+
*/
|
|
37
|
+
export declare function fetchAllPages<T>(searchFn: (filter: any, opts?: any) => Promise<PagedResponse<T>>, filter?: Record<string, unknown>, pageSize?: number, maxItems?: number): Promise<T[]>;
|
|
38
|
+
export {};
|
|
9
39
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAuB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAGnH;;GAEG;AACH,wBAAgB,YAAY,CAC1B,WAAW,CAAC,EAAE,MAAM,EACpB,mBAAmB,GAAE,OAAO,CAAC,cAAc,CAAM,GAChD,aAAa,CAgCf"}
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAuB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAGnH;;GAEG;AACH,wBAAgB,YAAY,CAC1B,WAAW,CAAC,EAAE,MAAM,EACpB,mBAAmB,GAAE,OAAO,CAAC,cAAc,CAAM,GAChD,aAAa,CAgCf;AAOD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,UAAY,CAAC;AAE3C;;GAEG;AACH,KAAK,aAAa,CAAC,CAAC,IAAI;IACtB,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;IACZ,IAAI,CAAC,EAAE;QACL,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CAAC,CAAC,EACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAChE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,QAAQ,SAAoB,EAC5B,QAAQ,SAAoB,GAC3B,OAAO,CAAC,CAAC,EAAE,CAAC,CAuCd"}
|
package/dist/client.js
CHANGED
|
@@ -36,4 +36,59 @@ export function createClient(profileFlag, additionalSdkConfig = {}) {
|
|
|
36
36
|
}
|
|
37
37
|
return createCamundaClient({ config: sdkConfig, ...additionalSdkConfig });
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Default page size for cursor-based pagination when fetching all results.
|
|
41
|
+
*/
|
|
42
|
+
const DEFAULT_PAGE_SIZE = 100;
|
|
43
|
+
/**
|
|
44
|
+
* Default upper bound on the total number of items fetched.
|
|
45
|
+
* Prevents runaway memory usage on very large result sets.
|
|
46
|
+
*/
|
|
47
|
+
export const DEFAULT_MAX_ITEMS = 1_000_000;
|
|
48
|
+
/**
|
|
49
|
+
* Fetch all pages from a Camunda 8 search endpoint using cursor-based
|
|
50
|
+
* pagination. The caller supplies a search function that accepts a filter
|
|
51
|
+
* object (with an optional `page` property) and returns a paged response.
|
|
52
|
+
*
|
|
53
|
+
* @param searchFn – the SDK search method to call (e.g. `client.searchProcessInstances`)
|
|
54
|
+
* @param filter – base filter object; a `page` property will be merged in
|
|
55
|
+
* @param pageSize – items per page (default 100)
|
|
56
|
+
* @param maxItems – stop after collecting this many items (default 1 000 000)
|
|
57
|
+
* @returns all collected items across every page (up to maxItems)
|
|
58
|
+
*/
|
|
59
|
+
export async function fetchAllPages(searchFn, filter = {}, pageSize = DEFAULT_PAGE_SIZE, maxItems = DEFAULT_MAX_ITEMS) {
|
|
60
|
+
const allItems = [];
|
|
61
|
+
let cursor;
|
|
62
|
+
const seenCursors = new Set();
|
|
63
|
+
const consistencyOpts = { consistency: { waitUpToMs: 0 } };
|
|
64
|
+
do {
|
|
65
|
+
const pageFilter = {
|
|
66
|
+
...filter,
|
|
67
|
+
page: {
|
|
68
|
+
limit: pageSize,
|
|
69
|
+
...(cursor ? { after: cursor } : {}),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
const result = await searchFn(pageFilter, consistencyOpts);
|
|
73
|
+
if (result.items?.length) {
|
|
74
|
+
allItems.push(...result.items);
|
|
75
|
+
}
|
|
76
|
+
if (allItems.length >= maxItems) {
|
|
77
|
+
allItems.length = maxItems;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
const endCursor = result.page?.endCursor;
|
|
81
|
+
// totalItems is BigInt from the SDK's Zod schema (z.coerce.bigint()); convert to number
|
|
82
|
+
const totalItems = result.page?.totalItems !== undefined ? Number(result.page.totalItems) : undefined;
|
|
83
|
+
if (!endCursor || seenCursors.has(endCursor))
|
|
84
|
+
break;
|
|
85
|
+
if (totalItems !== undefined && allItems.length >= totalItems)
|
|
86
|
+
break;
|
|
87
|
+
if (!result.items?.length)
|
|
88
|
+
break;
|
|
89
|
+
seenCursors.add(endCursor);
|
|
90
|
+
cursor = endCursor;
|
|
91
|
+
} while (true);
|
|
92
|
+
return allItems;
|
|
93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AAQ,CAAC,MAAM,GAAG,QAAQ,CAAC;YAC3B,MAAM;QACR,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC;QACzC,wFAAwF;QACxF,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAEtG,IAAI,CAAC,SAAS,IAAI,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC;YAAE,MAAM;QACpD,IAAI,UAAU,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,IAAI,UAAU;YAAE,MAAM;QACrE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM;YAAE,MAAM;QAEjC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,GAAG,SAAS,CAAC;IACrB,CAAC,QAAQ,IAAI,EAAE;IAEf,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -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;AA+4BH;;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 upgrade downgrade init 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 which 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"
|
|
@@ -42,12 +42,13 @@ _c8ctl_completions() {
|
|
|
42
42
|
local downgrade_resources="plugin"
|
|
43
43
|
local init_resources="plugin"
|
|
44
44
|
local use_resources="profile tenant"
|
|
45
|
+
local which_resources="profile"
|
|
45
46
|
local output_resources="json text"
|
|
46
47
|
local completion_resources="bash zsh fish"
|
|
47
48
|
local help_resources="list get create complete await search deploy run watch cancel resolve fail activate publish correlate upgrade downgrade init profiles profile plugin plugins"
|
|
48
49
|
|
|
49
50
|
# Global flags
|
|
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 --requestTimeout --name --key --elementId --errorType --value --scopeKey --fullValue --userTask --ut --processDefinition --pd --iname --iid --iassignee --ierrorMessage --itype --ivalue"
|
|
51
|
+
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 --requestTimeout --sortBy --asc --desc --limit --name --key --elementId --errorType --value --scopeKey --fullValue --userTask --ut --processDefinition --pd --iname --iid --iassignee --ierrorMessage --itype --ivalue"
|
|
51
52
|
|
|
52
53
|
case \${cword} in
|
|
53
54
|
1)
|
|
@@ -121,6 +122,9 @@ _c8ctl_completions() {
|
|
|
121
122
|
use)
|
|
122
123
|
COMPREPLY=( \$(compgen -W "\${use_resources}" -- "\${cur}") )
|
|
123
124
|
;;
|
|
125
|
+
which)
|
|
126
|
+
COMPREPLY=( \$(compgen -W "\${which_resources}" -- "\${cur}") )
|
|
127
|
+
;;
|
|
124
128
|
output)
|
|
125
129
|
COMPREPLY=( \$(compgen -W "\${output_resources}" -- "\${cur}") )
|
|
126
130
|
;;
|
|
@@ -186,6 +190,7 @@ _c8ctl() {
|
|
|
186
190
|
'downgrade:Downgrade a plugin'
|
|
187
191
|
'init:Create a new plugin from template'
|
|
188
192
|
'use:Set active profile or tenant'
|
|
193
|
+
'which:Show active profile or tenant'
|
|
189
194
|
'output:Set output format'
|
|
190
195
|
'completion:Generate shell completion script'
|
|
191
196
|
'help:Show help or detailed help for a command'
|
|
@@ -225,6 +230,10 @@ _c8ctl() {
|
|
|
225
230
|
'--awaitCompletion[Wait for process instance to complete]'
|
|
226
231
|
'--fetchVariables[Comma-separated variable names]:variables:'
|
|
227
232
|
'--requestTimeout[Timeout in milliseconds for process completion]:milliseconds:'
|
|
233
|
+
'--sortBy[Sort list output by column name]:column:'
|
|
234
|
+
'--asc[Sort in ascending order (default)]'
|
|
235
|
+
'--desc[Sort in descending order]'
|
|
236
|
+
'--limit[Maximum number of items to fetch]:number:'
|
|
228
237
|
'--name[Variable or resource name]:name:'
|
|
229
238
|
'--key[Resource key]:key:'
|
|
230
239
|
'--elementId[Element ID]:id:'
|
|
@@ -420,6 +429,12 @@ _c8ctl() {
|
|
|
420
429
|
)
|
|
421
430
|
_describe 'resource' resources
|
|
422
431
|
;;
|
|
432
|
+
which)
|
|
433
|
+
resources=(
|
|
434
|
+
'profile:Show active profile'
|
|
435
|
+
)
|
|
436
|
+
_describe 'resource' resources
|
|
437
|
+
;;
|
|
423
438
|
output)
|
|
424
439
|
resources=(
|
|
425
440
|
'json:JSON output'
|
|
@@ -549,6 +564,14 @@ complete -c c8ctl -l fetchVariables -d 'Comma-separated variable names' -r
|
|
|
549
564
|
complete -c c8 -l fetchVariables -d 'Comma-separated variable names' -r
|
|
550
565
|
complete -c c8ctl -l requestTimeout -d 'Timeout in milliseconds for process completion' -r
|
|
551
566
|
complete -c c8 -l requestTimeout -d 'Timeout in milliseconds for process completion' -r
|
|
567
|
+
complete -c c8ctl -l sortBy -d 'Sort list output by column name' -r
|
|
568
|
+
complete -c c8 -l sortBy -d 'Sort list output by column name' -r
|
|
569
|
+
complete -c c8ctl -l asc -d 'Sort in ascending order (default)'
|
|
570
|
+
complete -c c8 -l asc -d 'Sort in ascending order (default)'
|
|
571
|
+
complete -c c8ctl -l desc -d 'Sort in descending order'
|
|
572
|
+
complete -c c8 -l desc -d 'Sort in descending order'
|
|
573
|
+
complete -c c8ctl -l limit -d 'Maximum number of items to fetch' -r
|
|
574
|
+
complete -c c8 -l limit -d 'Maximum number of items to fetch' -r
|
|
552
575
|
complete -c c8ctl -l name -d 'Variable or resource name' -r
|
|
553
576
|
complete -c c8 -l name -d 'Variable or resource name' -r
|
|
554
577
|
complete -c c8ctl -l key -d 'Resource key' -r
|
|
@@ -635,6 +658,8 @@ complete -c c8ctl -n '__fish_use_subcommand' -a 'init' -d 'Create a new plugin f
|
|
|
635
658
|
complete -c c8 -n '__fish_use_subcommand' -a 'init' -d 'Create a new plugin from template'
|
|
636
659
|
complete -c c8ctl -n '__fish_use_subcommand' -a 'use' -d 'Set active profile or tenant'
|
|
637
660
|
complete -c c8 -n '__fish_use_subcommand' -a 'use' -d 'Set active profile or tenant'
|
|
661
|
+
complete -c c8ctl -n '__fish_use_subcommand' -a 'which' -d 'Show active profile'
|
|
662
|
+
complete -c c8 -n '__fish_use_subcommand' -a 'which' -d 'Show active profile'
|
|
638
663
|
complete -c c8ctl -n '__fish_use_subcommand' -a 'output' -d 'Set output format'
|
|
639
664
|
complete -c c8 -n '__fish_use_subcommand' -a 'output' -d 'Set output format'
|
|
640
665
|
complete -c c8ctl -n '__fish_use_subcommand' -a 'help' -d 'Show help or detailed help for a command'
|
|
@@ -816,6 +841,10 @@ complete -c c8 -n '__fish_seen_subcommand_from use' -a 'profile' -d 'Set active
|
|
|
816
841
|
complete -c c8ctl -n '__fish_seen_subcommand_from use' -a 'tenant' -d 'Set active tenant'
|
|
817
842
|
complete -c c8 -n '__fish_seen_subcommand_from use' -a 'tenant' -d 'Set active tenant'
|
|
818
843
|
|
|
844
|
+
# Resources for 'which' command
|
|
845
|
+
complete -c c8ctl -n '__fish_seen_subcommand_from which' -a 'profile' -d 'Show active profile'
|
|
846
|
+
complete -c c8 -n '__fish_seen_subcommand_from which' -a 'profile' -d 'Show active profile'
|
|
847
|
+
|
|
819
848
|
# Resources for 'output' command
|
|
820
849
|
complete -c c8ctl -n '__fish_seen_subcommand_from output' -a 'json' -d 'JSON output'
|
|
821
850
|
complete -c c8 -n '__fish_seen_subcommand_from output' -a 'json' -d 'JSON output'
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmJR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAS,qBAAqB;IAC5B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;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,CAsK/B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAsCpD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CA0EnC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAwClC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAwBrC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAqBvC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CA+BpC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAsDvC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA4GrC;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,gBAAgB,IAAI,IAAI,CAmDvC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAgDrC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CA+DrD"}
|
package/dist/commands/help.js
CHANGED
|
@@ -84,6 +84,10 @@ Flags:
|
|
|
84
84
|
--awaitCompletion Wait for process instance to complete (use with 'create pi')
|
|
85
85
|
--fetchVariables <v> Reserved for future use (all variables returned by default)
|
|
86
86
|
--requestTimeout <ms> Timeout in milliseconds for process completion (use with --awaitCompletion)
|
|
87
|
+
--sortBy <column> Sort list/search output by column name (use with 'list' or 'search')
|
|
88
|
+
--asc Sort in ascending order (default)
|
|
89
|
+
--desc Sort in descending order
|
|
90
|
+
--limit <n> Maximum number of items to fetch (default: 1000000)
|
|
87
91
|
--version, -v Show version
|
|
88
92
|
--help, -h Show help
|
|
89
93
|
|
|
@@ -155,6 +159,7 @@ Examples:
|
|
|
155
159
|
c8ctl run ./my-process.bpmn Deploy and start process
|
|
156
160
|
c8ctl watch ./src Watch directory for changes
|
|
157
161
|
c8ctl use profile prod Set active profile
|
|
162
|
+
c8ctl which profile Show currently active profile
|
|
158
163
|
c8ctl output json Switch to JSON output
|
|
159
164
|
c8ctl init plugin my-plugin Create new plugin from template
|
|
160
165
|
c8ctl load plugin my-plugin Load plugin from npm registry
|
|
@@ -213,6 +218,7 @@ export function showVerbResources(verb) {
|
|
|
213
218
|
downgrade: 'plugin',
|
|
214
219
|
init: 'plugin',
|
|
215
220
|
use: 'profile, tenant',
|
|
221
|
+
which: 'profile',
|
|
216
222
|
output: 'json, text',
|
|
217
223
|
completion: 'bash, zsh, fish',
|
|
218
224
|
help: 'list, get, create, complete, await, search, deploy, run, watch, cancel, resolve, fail, activate, publish, correlate, upgrade, downgrade, init, profiles, profile, plugin, plugins',
|
|
@@ -242,25 +248,46 @@ Resources and their available flags:
|
|
|
242
248
|
--id <id> Filter by process definition ID (alias: --bpmnProcessId)
|
|
243
249
|
--state <state> Filter by state (ACTIVE, COMPLETED, etc.)
|
|
244
250
|
--all List all instances (pagination)
|
|
251
|
+
--sortBy <column> Sort by column (Key, Process ID, State, Version, Start Date, Tenant ID)
|
|
252
|
+
--asc Sort in ascending order (default)
|
|
253
|
+
--desc Sort in descending order
|
|
254
|
+
--limit <n> Maximum number of items to fetch (default: 1000000)
|
|
245
255
|
--profile <name> Use specific profile
|
|
256
|
+
Note: instances with an active incident are marked with ⚠ before the Key
|
|
246
257
|
|
|
247
258
|
process-definitions (pd)
|
|
259
|
+
--sortBy <column> Sort by column (Key, Process ID, Name, Version, Tenant ID)
|
|
260
|
+
--asc Sort in ascending order (default)
|
|
261
|
+
--desc Sort in descending order
|
|
262
|
+
--limit <n> Maximum number of items to fetch (default: 1000000)
|
|
248
263
|
--profile <name> Use specific profile
|
|
249
264
|
|
|
250
265
|
user-tasks (ut)
|
|
251
266
|
--state <state> Filter by state (CREATED, COMPLETED, etc.)
|
|
252
267
|
--assignee <name> Filter by assignee
|
|
253
268
|
--all List all tasks (pagination)
|
|
269
|
+
--sortBy <column> Sort by column (Key, Name, State, Assignee, Created, Process Instance, Tenant ID)
|
|
270
|
+
--asc Sort in ascending order (default)
|
|
271
|
+
--desc Sort in descending order
|
|
272
|
+
--limit <n> Maximum number of items to fetch (default: 1000000)
|
|
254
273
|
--profile <name> Use specific profile
|
|
255
274
|
|
|
256
275
|
incidents (inc)
|
|
257
276
|
--state <state> Filter by state (ACTIVE, RESOLVED, etc.)
|
|
258
277
|
--processInstanceKey <key> Filter by process instance
|
|
278
|
+
--sortBy <column> Sort by column (Key, Type, Message, State, Created, Process Instance, Tenant ID)
|
|
279
|
+
--asc Sort in ascending order (default)
|
|
280
|
+
--desc Sort in descending order
|
|
281
|
+
--limit <n> Maximum number of items to fetch (default: 1000000)
|
|
259
282
|
--profile <name> Use specific profile
|
|
260
283
|
|
|
261
284
|
jobs
|
|
262
285
|
--state <state> Filter by state (ACTIVATABLE, ACTIVATED, etc.)
|
|
263
286
|
--type <type> Filter by job type
|
|
287
|
+
--sortBy <column> Sort by column (Key, Type, State, Retries, Created, Process Instance, Tenant ID)
|
|
288
|
+
--asc Sort in ascending order (default)
|
|
289
|
+
--desc Sort in descending order
|
|
290
|
+
--limit <n> Maximum number of items to fetch (default: 1000000)
|
|
264
291
|
--profile <name> Use specific profile
|
|
265
292
|
|
|
266
293
|
profiles
|
|
@@ -272,9 +299,14 @@ Resources and their available flags:
|
|
|
272
299
|
|
|
273
300
|
Examples:
|
|
274
301
|
c8ctl list pi --state=ACTIVE
|
|
302
|
+
c8ctl list pi --sortBy=State
|
|
303
|
+
c8ctl list pi --sortBy=State --desc
|
|
275
304
|
c8ctl list ut --assignee=john.doe
|
|
305
|
+
c8ctl list ut --sortBy=Assignee
|
|
276
306
|
c8ctl list inc --processInstanceKey=123456
|
|
307
|
+
c8ctl list inc --sortBy=Type --desc
|
|
277
308
|
c8ctl list jobs --type=email-service
|
|
309
|
+
c8ctl list jobs --sortBy=Retries --asc
|
|
278
310
|
c8ctl list profiles
|
|
279
311
|
c8ctl list plugins
|
|
280
312
|
`.trim());
|
|
@@ -487,6 +519,9 @@ Resources and their available flags:
|
|
|
487
519
|
--state <state> Filter by state (ACTIVE, COMPLETED, etc.)
|
|
488
520
|
--key <key> Filter by key
|
|
489
521
|
--parentProcessInstanceKey <key> Filter by parent process instance key
|
|
522
|
+
--sortBy <column> Sort by column (Key, Process ID, State, Version, Tenant ID)
|
|
523
|
+
--asc Sort in ascending order (default)
|
|
524
|
+
--desc Sort in descending order
|
|
490
525
|
--profile <name> Use specific profile
|
|
491
526
|
|
|
492
527
|
process-definitions (pd)
|
|
@@ -495,6 +530,9 @@ Resources and their available flags:
|
|
|
495
530
|
--name <name> Filter by name
|
|
496
531
|
--iname <pattern> Case-insensitive --name filter
|
|
497
532
|
--key <key> Filter by key
|
|
533
|
+
--sortBy <column> Sort by column (Key, Process ID, Name, Version, Tenant ID)
|
|
534
|
+
--asc Sort in ascending order (default)
|
|
535
|
+
--desc Sort in descending order
|
|
498
536
|
--profile <name> Use specific profile
|
|
499
537
|
|
|
500
538
|
user-tasks (ut)
|
|
@@ -504,6 +542,9 @@ Resources and their available flags:
|
|
|
504
542
|
--processInstanceKey <key> Filter by process instance key
|
|
505
543
|
--processDefinitionKey <key> Filter by process definition key
|
|
506
544
|
--elementId <id> Filter by element ID
|
|
545
|
+
--sortBy <column> Sort by column (Key, Name, State, Assignee, Process Instance, Tenant ID)
|
|
546
|
+
--asc Sort in ascending order (default)
|
|
547
|
+
--desc Sort in descending order
|
|
507
548
|
--profile <name> Use specific profile
|
|
508
549
|
|
|
509
550
|
incidents (inc)
|
|
@@ -515,6 +556,9 @@ Resources and their available flags:
|
|
|
515
556
|
--errorType <type> Filter by error type
|
|
516
557
|
--errorMessage <msg> Filter by error message
|
|
517
558
|
--ierrorMessage <pattern> Case-insensitive --errorMessage filter
|
|
559
|
+
--sortBy <column> Sort by column (Key, Type, Message, State, Process Instance, Tenant ID)
|
|
560
|
+
--asc Sort in ascending order (default)
|
|
561
|
+
--desc Sort in descending order
|
|
518
562
|
--profile <name> Use specific profile
|
|
519
563
|
|
|
520
564
|
jobs
|
|
@@ -523,6 +567,9 @@ Resources and their available flags:
|
|
|
523
567
|
--itype <pattern> Case-insensitive --type filter
|
|
524
568
|
--processInstanceKey <key> Filter by process instance key
|
|
525
569
|
--processDefinitionKey <key> Filter by process definition key
|
|
570
|
+
--sortBy <column> Sort by column (Key, Type, State, Retries, Process Instance, Tenant ID)
|
|
571
|
+
--asc Sort in ascending order (default)
|
|
572
|
+
--desc Sort in descending order
|
|
526
573
|
--profile <name> Use specific profile
|
|
527
574
|
|
|
528
575
|
variables
|
|
@@ -533,6 +580,10 @@ Resources and their available flags:
|
|
|
533
580
|
--processInstanceKey <key> Filter by process instance key
|
|
534
581
|
--scopeKey <key> Filter by scope key
|
|
535
582
|
--fullValue Return full variable values (default: truncated)
|
|
583
|
+
--sortBy <column> Sort by column (Name, Value, Process Instance, Scope Key, Tenant ID)
|
|
584
|
+
--asc Sort in ascending order (default)
|
|
585
|
+
--desc Sort in descending order
|
|
586
|
+
--limit <n> Maximum number of items to fetch (default: 1000000)
|
|
536
587
|
--profile <name> Use specific profile
|
|
537
588
|
|
|
538
589
|
Wildcard Search:
|
|
@@ -549,13 +600,17 @@ Examples:
|
|
|
549
600
|
c8ctl search pi --bpmnProcessId=order-process
|
|
550
601
|
c8ctl search pd --name='*main*'
|
|
551
602
|
c8ctl search pd --iname='*order*'
|
|
603
|
+
c8ctl search pd --sortBy=Name --desc
|
|
552
604
|
c8ctl search ut --assignee=john.doe
|
|
553
605
|
c8ctl search ut --iassignee=John
|
|
606
|
+
c8ctl search ut --sortBy=State --asc
|
|
554
607
|
c8ctl search inc --state=ACTIVE --processInstanceKey=123456
|
|
555
608
|
c8ctl search jobs --type=email-service
|
|
556
609
|
c8ctl search jobs --itype='*SERVICE*'
|
|
610
|
+
c8ctl search jobs --sortBy=Type --desc
|
|
557
611
|
c8ctl search variables --name=orderId
|
|
558
612
|
c8ctl search variables --value=12345 --fullValue
|
|
613
|
+
c8ctl search variables --sortBy=Name
|
|
559
614
|
`.trim());
|
|
560
615
|
}
|
|
561
616
|
/**
|
|
@@ -806,6 +861,10 @@ Profile commands:
|
|
|
806
861
|
list profiles
|
|
807
862
|
List all profiles (c8ctl + Camunda Modeler profiles).
|
|
808
863
|
Modeler profiles are shown with "modeler:" prefix.
|
|
864
|
+
The currently active profile is marked with "*".
|
|
865
|
+
|
|
866
|
+
which profile
|
|
867
|
+
Show the name of the currently active profile.
|
|
809
868
|
|
|
810
869
|
add profile <name> [flags]
|
|
811
870
|
Add a c8ctl-managed profile.
|
|
@@ -835,6 +894,7 @@ Flags for add profile:
|
|
|
835
894
|
|
|
836
895
|
Examples:
|
|
837
896
|
c8ctl list profiles
|
|
897
|
+
c8ctl which profile
|
|
838
898
|
c8ctl add profile local --baseUrl=http://localhost:8080
|
|
839
899
|
c8ctl add profile prod --baseUrl=https://camunda.example.com --clientId=xxx --clientSecret=yyy
|
|
840
900
|
c8ctl use profile prod
|
|
@@ -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,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,UAAU;IACxB,MAAM,WAAW,GAAG,IAAI,CAAC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K,UAAU;YACb,gBAAgB,EAAE,CAAC;YACnB,MAAM;QACR,KAAK,SAAS;YACZ,eAAe,EAAE,CAAC;YAClB,MAAM;QACR,KAAK,WAAW;YACd,iBAAiB,EAAE,CAAC;YACpB,MAAM;QACR,KAAK,UAAU,CAAC;QAChB,KAAK,SAAS;YACZ,gBAAgB,EAAE,CAAC;YACnB,MAAM;QACR,KAAK,QAAQ,CAAC;QACd,KAAK,SAAS;YACZ,cAAc,EAAE,CAAC;YACjB,MAAM;QACR;YACE,OAAO,CAAC,GAAG,CAAC,qCAAqC,OAAO,EAAE,CAAC,CAAC;YAC5D,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Incident commands
|
|
3
3
|
*/
|
|
4
|
+
import { type SortOrder } from '../logger.ts';
|
|
4
5
|
/**
|
|
5
6
|
* List incidents
|
|
6
7
|
*/
|
|
@@ -8,6 +9,9 @@ export declare function listIncidents(options: {
|
|
|
8
9
|
profile?: string;
|
|
9
10
|
state?: string;
|
|
10
11
|
processInstanceKey?: string;
|
|
12
|
+
sortBy?: string;
|
|
13
|
+
sortOrder?: SortOrder;
|
|
14
|
+
limit?: number;
|
|
11
15
|
}): Promise<void>;
|
|
12
16
|
/**
|
|
13
17
|
* Get incident by key
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incidents.d.ts","sourceRoot":"","sources":["../../src/commands/incidents.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"incidents.d.ts","sourceRoot":"","sources":["../../src/commands/incidents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI7D;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8ChB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhB;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhB"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Incident commands
|
|
3
3
|
*/
|
|
4
4
|
import { getLogger } from "../logger.js";
|
|
5
|
-
import {
|
|
5
|
+
import { sortTableData } from "../logger.js";
|
|
6
|
+
import { createClient, fetchAllPages } from "../client.js";
|
|
6
7
|
import { resolveTenantId } from "../config.js";
|
|
7
8
|
/**
|
|
8
9
|
* List incidents
|
|
@@ -23,9 +24,9 @@ export async function listIncidents(options) {
|
|
|
23
24
|
if (options.processInstanceKey) {
|
|
24
25
|
filter.filter.processInstanceKey = options.processInstanceKey;
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
|
|
27
|
+
const allItems = await fetchAllPages((f, opts) => client.searchIncidents(f, opts), filter, undefined, options.limit);
|
|
28
|
+
if (allItems.length > 0) {
|
|
29
|
+
let tableData = allItems.map((incident) => ({
|
|
29
30
|
Key: incident.incidentKey || incident.key,
|
|
30
31
|
Type: incident.errorType,
|
|
31
32
|
Message: incident.errorMessage?.substring(0, 50) || '',
|
|
@@ -34,6 +35,7 @@ export async function listIncidents(options) {
|
|
|
34
35
|
'Process Instance': incident.processInstanceKey,
|
|
35
36
|
'Tenant ID': incident.tenantId,
|
|
36
37
|
}));
|
|
38
|
+
tableData = sortTableData(tableData, options.sortBy, logger, options.sortOrder);
|
|
37
39
|
logger.table(tableData);
|
|
38
40
|
}
|
|
39
41
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incidents.js","sourceRoot":"","sources":["../../src/commands/incidents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"incidents.js","sourceRoot":"","sources":["../../src/commands/incidents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAkB,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAOnC;IACC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAElD,IAAI,CAAC;QACH,MAAM,MAAM,GAAQ;YAClB,MAAM,EAAE;gBACN,QAAQ;aACT;SACF,CAAC;QAEF,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QACtC,CAAC;QAED,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;YAC/B,MAAM,CAAC,MAAM,CAAC,kBAAkB,GAAG,OAAO,CAAC,kB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
7
|
*/
|
|
@@ -8,6 +9,9 @@ export declare function listJobs(options: {
|
|
|
8
9
|
profile?: string;
|
|
9
10
|
state?: string;
|
|
10
11
|
type?: string;
|
|
12
|
+
sortBy?: string;
|
|
13
|
+
sortOrder?: SortOrder;
|
|
14
|
+
limit?: number;
|
|
11
15
|
}): Promise<void>;
|
|
12
16
|
/**
|
|
13
17
|
* Activate jobs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/commands/jobs.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/commands/jobs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI7D;;GAEG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8ChB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgChB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBhB;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBhB"}
|
package/dist/commands/jobs.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Job commands
|
|
3
3
|
*/
|
|
4
4
|
import { getLogger } from "../logger.js";
|
|
5
|
-
import {
|
|
5
|
+
import { sortTableData } from "../logger.js";
|
|
6
|
+
import { createClient, fetchAllPages } from "../client.js";
|
|
6
7
|
import { resolveTenantId } from "../config.js";
|
|
7
8
|
/**
|
|
8
9
|
* List jobs
|
|
@@ -23,9 +24,9 @@ export async function listJobs(options) {
|
|
|
23
24
|
if (options.type) {
|
|
24
25
|
filter.filter.type = options.type;
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
|
|
27
|
+
const allItems = await fetchAllPages((f, opts) => client.searchJobs(f, opts), filter, undefined, options.limit);
|
|
28
|
+
if (allItems.length > 0) {
|
|
29
|
+
let tableData = allItems.map((job) => ({
|
|
29
30
|
Key: job.jobKey || job.key,
|
|
30
31
|
Type: job.type,
|
|
31
32
|
State: job.state,
|
|
@@ -34,6 +35,7 @@ export async function listJobs(options) {
|
|
|
34
35
|
'Process Instance': job.processInstanceKey,
|
|
35
36
|
'Tenant ID': job.tenantId,
|
|
36
37
|
}));
|
|
38
|
+
tableData = sortTableData(tableData, options.sortBy, logger, options.sortOrder);
|
|
37
39
|
logger.table(tableData);
|
|
38
40
|
}
|
|
39
41
|
else {
|