@camunda8/cli 2.6.0-alpha.17 → 2.6.0-alpha.19
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 +4 -1
- package/dist/client.d.ts +10 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +7 -17
- package/dist/client.js.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +41 -41
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/deployments.d.ts.map +1 -1
- package/dist/commands/deployments.js +158 -131
- package/dist/commands/deployments.js.map +1 -1
- package/dist/commands/forms.d.ts.map +1 -1
- package/dist/commands/forms.js +52 -28
- package/dist/commands/forms.js.map +1 -1
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +587 -169
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/identity-authorizations.d.ts +1 -1
- package/dist/commands/identity-authorizations.d.ts.map +1 -1
- package/dist/commands/identity-authorizations.js +45 -33
- package/dist/commands/identity-authorizations.js.map +1 -1
- package/dist/commands/identity-groups.d.ts +2 -1
- package/dist/commands/identity-groups.d.ts.map +1 -1
- package/dist/commands/identity-groups.js +24 -21
- package/dist/commands/identity-groups.js.map +1 -1
- package/dist/commands/identity-mapping-rules.d.ts +1 -1
- package/dist/commands/identity-mapping-rules.d.ts.map +1 -1
- package/dist/commands/identity-mapping-rules.js +23 -24
- package/dist/commands/identity-mapping-rules.js.map +1 -1
- package/dist/commands/identity-roles.d.ts +2 -1
- package/dist/commands/identity-roles.d.ts.map +1 -1
- package/dist/commands/identity-roles.js +23 -20
- package/dist/commands/identity-roles.js.map +1 -1
- package/dist/commands/identity-tenants.d.ts +1 -1
- package/dist/commands/identity-tenants.d.ts.map +1 -1
- package/dist/commands/identity-tenants.js +22 -22
- package/dist/commands/identity-tenants.js.map +1 -1
- package/dist/commands/identity-users.d.ts +1 -1
- package/dist/commands/identity-users.d.ts.map +1 -1
- package/dist/commands/identity-users.js +24 -26
- package/dist/commands/identity-users.js.map +1 -1
- package/dist/commands/identity.d.ts +6 -6
- package/dist/commands/identity.d.ts.map +1 -1
- package/dist/commands/identity.js +170 -105
- package/dist/commands/identity.js.map +1 -1
- package/dist/commands/incidents.d.ts +1 -1
- package/dist/commands/incidents.d.ts.map +1 -1
- package/dist/commands/incidents.js +19 -17
- package/dist/commands/incidents.js.map +1 -1
- package/dist/commands/jobs.d.ts +1 -1
- package/dist/commands/jobs.d.ts.map +1 -1
- package/dist/commands/jobs.js +39 -39
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/mcp-proxy.d.ts +2 -2
- package/dist/commands/mcp-proxy.d.ts.map +1 -1
- package/dist/commands/mcp-proxy.js +34 -33
- package/dist/commands/mcp-proxy.js.map +1 -1
- package/dist/commands/messages.d.ts.map +1 -1
- package/dist/commands/messages.js +23 -21
- package/dist/commands/messages.js.map +1 -1
- package/dist/commands/open.d.ts +2 -1
- package/dist/commands/open.d.ts.map +1 -1
- package/dist/commands/open.js +29 -20
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/plugins.d.ts.map +1 -1
- package/dist/commands/plugins.js +184 -140
- package/dist/commands/plugins.js.map +1 -1
- package/dist/commands/process-definitions.d.ts +1 -1
- package/dist/commands/process-definitions.d.ts.map +1 -1
- package/dist/commands/process-definitions.js +10 -10
- package/dist/commands/process-definitions.js.map +1 -1
- package/dist/commands/process-instances.d.ts +2 -2
- package/dist/commands/process-instances.d.ts.map +1 -1
- package/dist/commands/process-instances.js +49 -45
- package/dist/commands/process-instances.js.map +1 -1
- package/dist/commands/profiles.d.ts.map +1 -1
- package/dist/commands/profiles.js +27 -27
- package/dist/commands/profiles.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +21 -17
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/search.d.ts +3 -3
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +227 -145
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +8 -8
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/topology.d.ts.map +1 -1
- package/dist/commands/topology.js +2 -2
- package/dist/commands/topology.js.map +1 -1
- package/dist/commands/user-tasks.d.ts +1 -1
- package/dist/commands/user-tasks.d.ts.map +1 -1
- package/dist/commands/user-tasks.js +25 -23
- package/dist/commands/user-tasks.js.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +25 -21
- package/dist/commands/watch.js.map +1 -1
- package/dist/config.d.ts +3 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +95 -89
- package/dist/config.js.map +1 -1
- package/dist/date-filter.d.ts.map +1 -1
- package/dist/date-filter.js +10 -8
- package/dist/date-filter.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/ignore.d.ts +1 -1
- package/dist/ignore.d.ts.map +1 -1
- package/dist/ignore.js +9 -13
- package/dist/ignore.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +591 -475
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +7 -7
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +78 -55
- package/dist/logger.js.map +1 -1
- package/dist/plugin-loader.d.ts.map +1 -1
- package/dist/plugin-loader.js +37 -34
- package/dist/plugin-loader.js.map +1 -1
- package/dist/plugin-registry.d.ts.map +1 -1
- package/dist/plugin-registry.js +22 -12
- package/dist/plugin-registry.js.map +1 -1
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +10 -9
- package/dist/runtime.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -320,6 +320,9 @@ c8 list pi --profile=modeler:Cloud Cluster
|
|
|
320
320
|
### Session Management
|
|
321
321
|
|
|
322
322
|
```bash
|
|
323
|
+
# Show current output mode
|
|
324
|
+
c8ctl output
|
|
325
|
+
|
|
323
326
|
# Switch to JSON output
|
|
324
327
|
c8ctl output json
|
|
325
328
|
|
|
@@ -590,7 +593,7 @@ c8ctl <verb> <resource> [arguments] [flags]
|
|
|
590
593
|
- `unload` - Unload a plugin
|
|
591
594
|
- `sync` - Synchronize plugins
|
|
592
595
|
- `use` - Set active profile or tenant
|
|
593
|
-
- `output` -
|
|
596
|
+
- `output` - Show or set output format
|
|
594
597
|
- `completion` - Generate shell completion script
|
|
595
598
|
- `feedback` - Open the feedback page to report issues or request features
|
|
596
599
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SDK client factory using resolved configuration
|
|
3
3
|
*/
|
|
4
|
-
import { type CamundaClient, type CamundaOptions } from
|
|
4
|
+
import { type CamundaClient, type CamundaOptions } from "@camunda8/orchestration-cluster-api";
|
|
5
5
|
/**
|
|
6
6
|
* Create a Camunda 8 cluster client with resolved configuration
|
|
7
7
|
*/
|
|
@@ -40,6 +40,14 @@ type PagedResponse<T> = {
|
|
|
40
40
|
* @param maxItems – stop after collecting this many items (default 1 000 000)
|
|
41
41
|
* @returns all collected items across every page (up to maxItems)
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
/** Consistency options passed to every search call in fetchAllPages */
|
|
44
|
+
type SearchConsistencyOpts = {
|
|
45
|
+
consistency: {
|
|
46
|
+
waitUpToMs: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare function fetchAllPages<T, F extends Record<string, unknown> = Record<string, unknown>>(searchFn: (filter: F & {
|
|
50
|
+
page?: Record<string, unknown>;
|
|
51
|
+
}, opts: SearchConsistencyOpts) => Promise<PagedResponse<T>>, filter: F, pageSize?: number, maxItems?: number): Promise<T[]>;
|
|
44
52
|
export {};
|
|
45
53
|
//# 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,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,cAAc,EAEnB,MAAM,qCAAqC,CAAC;AAI7C;;GAEG;AACH,wBAAgB,YAAY,CAC3B,WAAW,CAAC,EAAE,MAAM,EACpB,mBAAmB,GAAE,OAAO,CAAC,cAAc,CAAM,GAC/C,aAAa,CAqCf;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,UAAY,CAAC;AAE3C;;;;GAIG;AACH,KAAK,aAAa,CAAC,CAAC,IAAI;IACvB,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,IAAI,EAAE;QACL,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;QAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,iBAAiB,EAAE,OAAO,CAAC;KAC3B,CAAC;CACF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,uEAAuE;AACvE,KAAK,qBAAqB,GAAG;IAAE,WAAW,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAErE,wBAAsB,aAAa,CAClC,CAAC,EACD,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAE3D,QAAQ,EAAE,CACT,MAAM,EAAE,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EAC9C,IAAI,EAAE,qBAAqB,KACvB,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAC9B,MAAM,EAAE,CAAC,EACT,QAAQ,SAAoB,EAC5B,QAAQ,SAAoB,GAC1B,OAAO,CAAC,CAAC,EAAE,CAAC,CAuCd"}
|
package/dist/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SDK client factory using resolved configuration
|
|
3
3
|
*/
|
|
4
|
-
import { createCamundaClient } from
|
|
4
|
+
import { createCamundaClient, } from "@camunda8/orchestration-cluster-api";
|
|
5
5
|
import { resolveClusterConfig } from "./config.js";
|
|
6
6
|
import { c8ctl } from "./runtime.js";
|
|
7
7
|
/**
|
|
@@ -15,7 +15,7 @@ export function createClient(profileFlag, additionalSdkConfig = {}) {
|
|
|
15
15
|
};
|
|
16
16
|
// Add OAuth configuration if present
|
|
17
17
|
if (config.clientId && config.clientSecret) {
|
|
18
|
-
sdkConfig.CAMUNDA_AUTH_STRATEGY =
|
|
18
|
+
sdkConfig.CAMUNDA_AUTH_STRATEGY = "OAUTH";
|
|
19
19
|
sdkConfig.CAMUNDA_CLIENT_ID = config.clientId;
|
|
20
20
|
sdkConfig.CAMUNDA_CLIENT_SECRET = config.clientSecret;
|
|
21
21
|
if (config.audience) {
|
|
@@ -27,17 +27,17 @@ export function createClient(profileFlag, additionalSdkConfig = {}) {
|
|
|
27
27
|
}
|
|
28
28
|
// Add Basic auth configuration if present
|
|
29
29
|
else if (config.username && config.password) {
|
|
30
|
-
sdkConfig.CAMUNDA_AUTH_STRATEGY =
|
|
30
|
+
sdkConfig.CAMUNDA_AUTH_STRATEGY = "BASIC";
|
|
31
31
|
sdkConfig.CAMUNDA_BASIC_AUTH_USERNAME = config.username;
|
|
32
32
|
sdkConfig.CAMUNDA_BASIC_AUTH_PASSWORD = config.password;
|
|
33
33
|
}
|
|
34
34
|
// No authentication
|
|
35
35
|
else {
|
|
36
|
-
sdkConfig.CAMUNDA_AUTH_STRATEGY =
|
|
36
|
+
sdkConfig.CAMUNDA_AUTH_STRATEGY = "NONE";
|
|
37
37
|
}
|
|
38
38
|
// Add verbose/trace logging when --verbose flag is set
|
|
39
39
|
if (c8ctl.verbose) {
|
|
40
|
-
sdkConfig.CAMUNDA_SDK_LOG_LEVEL =
|
|
40
|
+
sdkConfig.CAMUNDA_SDK_LOG_LEVEL = "trace";
|
|
41
41
|
}
|
|
42
42
|
return createCamundaClient({ config: sdkConfig, ...additionalSdkConfig });
|
|
43
43
|
}
|
|
@@ -50,18 +50,7 @@ export const DEFAULT_PAGE_SIZE = 100;
|
|
|
50
50
|
* Prevents runaway memory usage on very large result sets.
|
|
51
51
|
*/
|
|
52
52
|
export const DEFAULT_MAX_ITEMS = 1_000_000;
|
|
53
|
-
|
|
54
|
-
* Fetch all pages from a Camunda 8 search endpoint using cursor-based
|
|
55
|
-
* pagination. The caller supplies a search function that accepts a filter
|
|
56
|
-
* object (with an optional `page` property) and returns a paged response.
|
|
57
|
-
*
|
|
58
|
-
* @param searchFn – the SDK search method to call (e.g. `client.searchProcessInstances`)
|
|
59
|
-
* @param filter – base filter object; a `page` property will be merged in
|
|
60
|
-
* @param pageSize – items per page (default 100)
|
|
61
|
-
* @param maxItems – stop after collecting this many items (default 1 000 000)
|
|
62
|
-
* @returns all collected items across every page (up to maxItems)
|
|
63
|
-
*/
|
|
64
|
-
export async function fetchAllPages(searchFn, filter = {}, pageSize = DEFAULT_PAGE_SIZE, maxItems = DEFAULT_MAX_ITEMS) {
|
|
53
|
+
export async function fetchAllPages(searchFn, filter, pageSize = DEFAULT_PAGE_SIZE, maxItems = DEFAULT_MAX_ITEMS) {
|
|
65
54
|
const allItems = [];
|
|
66
55
|
let cursor;
|
|
67
56
|
const seenCursors = new Set();
|
|
@@ -92,6 +81,7 @@ export async function fetchAllPages(searchFn, filter = {}, pageSize = DEFAULT_PA
|
|
|
92
81
|
break;
|
|
93
82
|
seenCursors.add(endCursor);
|
|
94
83
|
cursor = endCursor;
|
|
84
|
+
// biome-ignore lint/correctness/noConstantCondition: intentional infinite loop with multiple break conditions
|
|
95
85
|
} while (true);
|
|
96
86
|
return allItems;
|
|
97
87
|
}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGN,mBAAmB,GACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC;;GAEG;AACH,MAAM,UAAU,YAAY,CAC3B,WAAoB,EACpB,sBAA+C,EAAE;IAEjD,MAAM,MAAM,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAEjD,kCAAkC;IAClC,MAAM,SAAS,GAAsC;QACpD,oBAAoB,EAAE,MAAM,CAAC,OAAO;KACpC,CAAC;IAEF,qCAAqC;IACrC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;QAC5C,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;YACrB,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,QAAQ,CAAC;QACpD,CAAC;QACD,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,SAAS,CAAC,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC/C,CAAC;IACF,CAAC;IACD,0CAA0C;SACrC,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC7C,SA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AAC,MAAM,EAAE,CAAC;YACzB,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;QAED,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,EAAE,CAAC;YACjC,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC;YAC3B,MAAM;QACP,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QACxC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAElD,IAAI,CAAC,SAAS,IAAI,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC;YAAE,MAAM;QACpD,IAAI,QAAQ,CAAC,MAAM,IAAI,UAAU;YAAE,MAAM;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM;YAAE,MAAM;QAEhC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,GAAG,SAAS,CAAC;QACnB,8GAA8G;IAC/G,CAAC,QAAQ,IAAI,EAAE;IAEf,OAAO,QAAQ,CAAC;AACjB,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;AAsxCH;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CA0BnD"}
|
|
@@ -58,114 +58,114 @@ _c8ctl_completions() {
|
|
|
58
58
|
case \${cword} in
|
|
59
59
|
1)
|
|
60
60
|
# Complete verbs
|
|
61
|
-
COMPREPLY=(
|
|
61
|
+
COMPREPLY=( $(compgen -W "\${verbs}" -- "\${cur}") )
|
|
62
62
|
;;
|
|
63
63
|
2)
|
|
64
64
|
# Complete resources based on verb
|
|
65
65
|
local verb="\${words[1]}"
|
|
66
66
|
case "\${verb}" in
|
|
67
67
|
list)
|
|
68
|
-
COMPREPLY=(
|
|
68
|
+
COMPREPLY=( $(compgen -W "\${list_resources}" -- "\${cur}") )
|
|
69
69
|
;;
|
|
70
70
|
search)
|
|
71
|
-
COMPREPLY=(
|
|
71
|
+
COMPREPLY=( $(compgen -W "\${search_resources}" -- "\${cur}") )
|
|
72
72
|
;;
|
|
73
73
|
get)
|
|
74
|
-
COMPREPLY=(
|
|
74
|
+
COMPREPLY=( $(compgen -W "\${get_resources}" -- "\${cur}") )
|
|
75
75
|
;;
|
|
76
76
|
create)
|
|
77
|
-
COMPREPLY=(
|
|
77
|
+
COMPREPLY=( $(compgen -W "\${create_resources}" -- "\${cur}") )
|
|
78
78
|
;;
|
|
79
79
|
cancel)
|
|
80
|
-
COMPREPLY=(
|
|
80
|
+
COMPREPLY=( $(compgen -W "\${cancel_resources}" -- "\${cur}") )
|
|
81
81
|
;;
|
|
82
82
|
await)
|
|
83
|
-
COMPREPLY=(
|
|
83
|
+
COMPREPLY=( $(compgen -W "\${await_resources}" -- "\${cur}") )
|
|
84
84
|
;;
|
|
85
85
|
complete)
|
|
86
|
-
COMPREPLY=(
|
|
86
|
+
COMPREPLY=( $(compgen -W "\${complete_resources}" -- "\${cur}") )
|
|
87
87
|
;;
|
|
88
88
|
fail)
|
|
89
|
-
COMPREPLY=(
|
|
89
|
+
COMPREPLY=( $(compgen -W "\${fail_resources}" -- "\${cur}") )
|
|
90
90
|
;;
|
|
91
91
|
activate)
|
|
92
|
-
COMPREPLY=(
|
|
92
|
+
COMPREPLY=( $(compgen -W "\${activate_resources}" -- "\${cur}") )
|
|
93
93
|
;;
|
|
94
94
|
resolve)
|
|
95
|
-
COMPREPLY=(
|
|
95
|
+
COMPREPLY=( $(compgen -W "\${resolve_resources}" -- "\${cur}") )
|
|
96
96
|
;;
|
|
97
97
|
publish)
|
|
98
|
-
COMPREPLY=(
|
|
98
|
+
COMPREPLY=( $(compgen -W "\${publish_resources}" -- "\${cur}") )
|
|
99
99
|
;;
|
|
100
100
|
correlate)
|
|
101
|
-
COMPREPLY=(
|
|
101
|
+
COMPREPLY=( $(compgen -W "\${correlate_resources}" -- "\${cur}") )
|
|
102
102
|
;;
|
|
103
103
|
delete)
|
|
104
|
-
COMPREPLY=(
|
|
104
|
+
COMPREPLY=( $(compgen -W "\${delete_resources}" -- "\${cur}") )
|
|
105
105
|
;;
|
|
106
106
|
assign)
|
|
107
|
-
COMPREPLY=(
|
|
107
|
+
COMPREPLY=( $(compgen -W "\${assign_resources}" -- "\${cur}") )
|
|
108
108
|
;;
|
|
109
109
|
unassign)
|
|
110
|
-
COMPREPLY=(
|
|
110
|
+
COMPREPLY=( $(compgen -W "\${unassign_resources}" -- "\${cur}") )
|
|
111
111
|
;;
|
|
112
112
|
add)
|
|
113
|
-
COMPREPLY=(
|
|
113
|
+
COMPREPLY=( $(compgen -W "\${add_resources}" -- "\${cur}") )
|
|
114
114
|
;;
|
|
115
115
|
remove|rm)
|
|
116
|
-
COMPREPLY=(
|
|
116
|
+
COMPREPLY=( $(compgen -W "\${remove_resources}" -- "\${cur}") )
|
|
117
117
|
;;
|
|
118
118
|
load)
|
|
119
|
-
COMPREPLY=(
|
|
119
|
+
COMPREPLY=( $(compgen -W "\${load_resources}" -- "\${cur}") )
|
|
120
120
|
;;
|
|
121
121
|
unload)
|
|
122
|
-
COMPREPLY=(
|
|
122
|
+
COMPREPLY=( $(compgen -W "\${unload_resources}" -- "\${cur}") )
|
|
123
123
|
;;
|
|
124
124
|
sync)
|
|
125
|
-
COMPREPLY=(
|
|
125
|
+
COMPREPLY=( $(compgen -W "\${sync_resources}" -- "\${cur}") )
|
|
126
126
|
;;
|
|
127
127
|
upgrade)
|
|
128
|
-
COMPREPLY=(
|
|
128
|
+
COMPREPLY=( $(compgen -W "\${upgrade_resources}" -- "\${cur}") )
|
|
129
129
|
;;
|
|
130
130
|
downgrade)
|
|
131
|
-
COMPREPLY=(
|
|
131
|
+
COMPREPLY=( $(compgen -W "\${downgrade_resources}" -- "\${cur}") )
|
|
132
132
|
;;
|
|
133
133
|
init)
|
|
134
|
-
COMPREPLY=(
|
|
134
|
+
COMPREPLY=( $(compgen -W "\${init_resources}" -- "\${cur}") )
|
|
135
135
|
;;
|
|
136
136
|
use)
|
|
137
|
-
COMPREPLY=(
|
|
137
|
+
COMPREPLY=( $(compgen -W "\${use_resources}" -- "\${cur}") )
|
|
138
138
|
;;
|
|
139
139
|
which)
|
|
140
|
-
COMPREPLY=(
|
|
140
|
+
COMPREPLY=( $(compgen -W "\${which_resources}" -- "\${cur}") )
|
|
141
141
|
;;
|
|
142
142
|
output)
|
|
143
|
-
COMPREPLY=(
|
|
143
|
+
COMPREPLY=( $(compgen -W "\${output_resources}" -- "\${cur}") )
|
|
144
144
|
;;
|
|
145
145
|
completion)
|
|
146
|
-
COMPREPLY=(
|
|
146
|
+
COMPREPLY=( $(compgen -W "\${completion_resources}" -- "\${cur}") )
|
|
147
147
|
;;
|
|
148
148
|
help)
|
|
149
|
-
COMPREPLY=(
|
|
149
|
+
COMPREPLY=( $(compgen -W "\${help_resources}" -- "\${cur}") )
|
|
150
150
|
;;
|
|
151
151
|
cluster)
|
|
152
|
-
COMPREPLY=(
|
|
152
|
+
COMPREPLY=( $(compgen -W "\${cluster_resources}" -- "\${cur}") )
|
|
153
153
|
;;
|
|
154
154
|
open)
|
|
155
|
-
COMPREPLY=(
|
|
155
|
+
COMPREPLY=( $(compgen -W "\${open_resources}" -- "\${cur}") )
|
|
156
156
|
;;
|
|
157
157
|
deploy|run|watch)
|
|
158
158
|
# Complete with files
|
|
159
|
-
COMPREPLY=(
|
|
159
|
+
COMPREPLY=( $(compgen -f -- "\${cur}") )
|
|
160
160
|
;;
|
|
161
161
|
esac
|
|
162
162
|
;;
|
|
163
163
|
*)
|
|
164
164
|
# Complete flags or files
|
|
165
165
|
if [[ \${cur} == -* ]]; then
|
|
166
|
-
COMPREPLY=(
|
|
166
|
+
COMPREPLY=( $(compgen -W "\${flags}" -- "\${cur}") )
|
|
167
167
|
else
|
|
168
|
-
COMPREPLY=(
|
|
168
|
+
COMPREPLY=( $(compgen -f -- "\${cur}") )
|
|
169
169
|
fi
|
|
170
170
|
;;
|
|
171
171
|
esac
|
|
@@ -310,7 +310,7 @@ _c8ctl() {
|
|
|
310
310
|
'--from-mapping-rule[Source mapping rule for unassignment]:mappingRule:'
|
|
311
311
|
)
|
|
312
312
|
|
|
313
|
-
case
|
|
313
|
+
case $CURRENT in
|
|
314
314
|
2)
|
|
315
315
|
_describe 'command' verbs
|
|
316
316
|
;;
|
|
@@ -1303,24 +1303,24 @@ complete -c c8 -n '__fish_seen_subcommand_from open' -a 'optimize' -d 'Open Camu
|
|
|
1303
1303
|
export function showCompletion(shell) {
|
|
1304
1304
|
const logger = getLogger();
|
|
1305
1305
|
if (!shell) {
|
|
1306
|
-
logger.error(
|
|
1306
|
+
logger.error("Shell type required. Usage: c8 completion <bash|zsh|fish>");
|
|
1307
1307
|
process.exit(1);
|
|
1308
1308
|
}
|
|
1309
1309
|
const normalizedShell = shell.toLowerCase();
|
|
1310
1310
|
switch (normalizedShell) {
|
|
1311
|
-
case
|
|
1311
|
+
case "bash":
|
|
1312
1312
|
console.log(generateBashCompletion());
|
|
1313
1313
|
break;
|
|
1314
|
-
case
|
|
1314
|
+
case "zsh":
|
|
1315
1315
|
console.log(generateZshCompletion());
|
|
1316
1316
|
break;
|
|
1317
|
-
case
|
|
1317
|
+
case "fish":
|
|
1318
1318
|
console.log(generateFishCompletion());
|
|
1319
1319
|
break;
|
|
1320
1320
|
default:
|
|
1321
1321
|
logger.error(`Unknown shell: ${shell}`);
|
|
1322
|
-
logger.info(
|
|
1323
|
-
logger.info(
|
|
1322
|
+
logger.info("Supported shells: bash, zsh, fish");
|
|
1323
|
+
logger.info("Usage: c8 completion <bash|zsh|fish>");
|
|
1324
1324
|
process.exit(1);
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
@@ -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;
|
|
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;IAC9B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuKP,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAS,qBAAqB;IAC7B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA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AC,sBAAsB,EAAE,CAAC,CAAC;YACtC,MAAM;QACP,KAAK,KAAK;YACT,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC,CAAC;YACrC,MAAM;QACP,KAAK,MAAM;YACV,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,CAAC,CAAC;YACtC,MAAM;QACP;YACC,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;IAClB,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../src/commands/deployments.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../src/commands/deployments.ts"],"names":[],"mappings":"AAAA;;GAEG;AA2PH;;GAEG;AACH,wBAAsB,MAAM,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC9B,GACC,OAAO,CAAC,IAAI,CAAC,CA8Of"}
|