@camunda8/cli 2.8.0-alpha.6 → 2.8.0-alpha.8
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/PLUGIN-HELP.md +145 -8
- package/README.md +20 -19
- package/dist/command-dispatch.d.ts.map +1 -1
- package/dist/command-dispatch.js +2 -1
- package/dist/command-dispatch.js.map +1 -1
- package/dist/command-framework.d.ts.map +1 -1
- package/dist/command-framework.js +22 -1
- package/dist/command-framework.js.map +1 -1
- package/dist/command-registry.d.ts +43 -311
- package/dist/command-registry.d.ts.map +1 -1
- package/dist/command-registry.js +40 -33
- package/dist/command-registry.js.map +1 -1
- package/dist/commands/completion.d.ts +10 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +23 -2
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/session.d.ts +1 -0
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +5 -0
- package/dist/commands/session.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +108 -6
- package/dist/index.js.map +1 -1
- package/dist/plugin-loader.d.ts +9 -2
- package/dist/plugin-loader.d.ts.map +1 -1
- package/dist/plugin-loader.js +18 -5
- package/dist/plugin-loader.js.map +1 -1
- package/package.json +1 -1
|
@@ -51,9 +51,47 @@ export interface CommandDef {
|
|
|
51
51
|
requiresResource: boolean;
|
|
52
52
|
/** Valid resource names (canonical short forms used in help). */
|
|
53
53
|
resources: string[];
|
|
54
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Verb-level flag schema. Per-resource flags must live exclusively in
|
|
56
|
+
* `resourceFlags` — they are *not* duplicated here. Mixing a flag into
|
|
57
|
+
* both buckets defeats unknown-flag detection (#256), and the
|
|
58
|
+
* structural disjointness invariant in
|
|
59
|
+
* `tests/unit/command-registry.test.ts` will fail.
|
|
60
|
+
*
|
|
61
|
+
* **Effective-resolution semantics** (see `ResolvedFlags` in
|
|
62
|
+
* `src/command-framework.ts` and `validateFlags` in `src/index.ts`):
|
|
63
|
+
* the handler's typed `flags` parameter and `validateFlags`'s
|
|
64
|
+
* required-field/validator checks resolve to
|
|
65
|
+
* `resourceFlags[resource] ?? flags`. So for a verb that declares
|
|
66
|
+
* **both** `flags` and `resourceFlags[r]`, the verb-level `flags` are
|
|
67
|
+
* **not** seen by the handler or by `validateFlags` when dispatching to
|
|
68
|
+
* resource `r` — only `resourceFlags[r]` is. Verb-level `flags` are
|
|
69
|
+
* still treated as valid by `detectUnknownFlags`, so
|
|
70
|
+
* `detectUnknownFlags`/`warnUnknownFlags` will not emit an
|
|
71
|
+
* unknown-flag warning for them, and `deriveParseArgsOptions` still
|
|
72
|
+
* includes them so they parse, but they will not flow into the
|
|
73
|
+
* handler's typed parameter for any resource that has its own bucket.
|
|
74
|
+
*
|
|
75
|
+
* Practical guidance: if a flag must be visible to the handler for a
|
|
76
|
+
* given resource, declare it in that resource's `resourceFlags` bucket
|
|
77
|
+
* (typically by spreading a shared constant such as `SEARCH_FLAGS`
|
|
78
|
+
* into each per-resource bucket). Reserve verb-level `flags` for verbs
|
|
79
|
+
* with no `resourceFlags` at all, or for flags that are deliberately
|
|
80
|
+
* parse-only on resources with their own bucket.
|
|
81
|
+
*/
|
|
55
82
|
flags: Record<string, FlagDef>;
|
|
56
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Per-resource flag scoping. Keys are canonical resource names.
|
|
85
|
+
* Flags declared here must not also appear in `flags` (see above).
|
|
86
|
+
*
|
|
87
|
+
* When a resource has an entry here, the framework resolves the
|
|
88
|
+
* effective flag schema as `resourceFlags[resource]` and **ignores**
|
|
89
|
+
* the verb-level `flags` for handler typing and `validateFlags`.
|
|
90
|
+
* `deriveParseArgsOptions` still includes both buckets so they parse,
|
|
91
|
+
* and the scoping lets `warnUnknownFlags` warn when a flag is passed
|
|
92
|
+
* against a resource that does not declare it. See the doc on `flags`
|
|
93
|
+
* above for the full effective-resolution semantics.
|
|
94
|
+
*/
|
|
57
95
|
resourceFlags?: Record<string, Record<string, FlagDef>>;
|
|
58
96
|
/** Per-resource positional argument schemas. Keys are canonical resource names. */
|
|
59
97
|
resourcePositionals?: Record<string, readonly PositionalDef[]>;
|
|
@@ -182,136 +220,6 @@ export declare const COMMAND_REGISTRY: {
|
|
|
182
220
|
}[];
|
|
183
221
|
resources: string[];
|
|
184
222
|
flags: {
|
|
185
|
-
mappingRuleId: {
|
|
186
|
-
readonly type: "string";
|
|
187
|
-
readonly description: "Filter by mapping rule ID";
|
|
188
|
-
};
|
|
189
|
-
name: {
|
|
190
|
-
readonly type: "string";
|
|
191
|
-
readonly description: "Filter by name";
|
|
192
|
-
};
|
|
193
|
-
claimName: {
|
|
194
|
-
readonly type: "string";
|
|
195
|
-
readonly description: "Filter by claim name";
|
|
196
|
-
};
|
|
197
|
-
claimValue: {
|
|
198
|
-
readonly type: "string";
|
|
199
|
-
readonly description: "Filter by claim value";
|
|
200
|
-
};
|
|
201
|
-
ownerId: {
|
|
202
|
-
readonly type: "string";
|
|
203
|
-
readonly description: "Filter by owner ID";
|
|
204
|
-
};
|
|
205
|
-
ownerType: {
|
|
206
|
-
readonly type: "string";
|
|
207
|
-
readonly description: "Filter by owner type";
|
|
208
|
-
};
|
|
209
|
-
resourceType: {
|
|
210
|
-
readonly type: "string";
|
|
211
|
-
readonly description: "Filter by resource type";
|
|
212
|
-
};
|
|
213
|
-
resourceId: {
|
|
214
|
-
readonly type: "string";
|
|
215
|
-
readonly description: "Filter by resource ID";
|
|
216
|
-
};
|
|
217
|
-
tenantId: {
|
|
218
|
-
readonly type: "string";
|
|
219
|
-
readonly description: "Filter by tenant ID";
|
|
220
|
-
readonly validate: typeof TenantId.assumeExists;
|
|
221
|
-
};
|
|
222
|
-
groupId: {
|
|
223
|
-
readonly type: "string";
|
|
224
|
-
readonly description: "Filter by group ID";
|
|
225
|
-
};
|
|
226
|
-
roleId: {
|
|
227
|
-
readonly type: "string";
|
|
228
|
-
readonly description: "Filter by role ID";
|
|
229
|
-
};
|
|
230
|
-
username: {
|
|
231
|
-
readonly type: "string";
|
|
232
|
-
readonly description: "Filter by username";
|
|
233
|
-
readonly validate: typeof Username.assumeExists;
|
|
234
|
-
};
|
|
235
|
-
email: {
|
|
236
|
-
readonly type: "string";
|
|
237
|
-
readonly description: "Filter by email";
|
|
238
|
-
};
|
|
239
|
-
state: {
|
|
240
|
-
readonly type: "string";
|
|
241
|
-
readonly description: "Filter by state";
|
|
242
|
-
};
|
|
243
|
-
type: {
|
|
244
|
-
readonly type: "string";
|
|
245
|
-
readonly description: "Filter by job type";
|
|
246
|
-
};
|
|
247
|
-
processInstanceKey: {
|
|
248
|
-
readonly type: "string";
|
|
249
|
-
readonly description: "Filter by process instance key";
|
|
250
|
-
readonly validate: typeof ProcessInstanceKey.assumeExists;
|
|
251
|
-
};
|
|
252
|
-
processDefinitionKey: {
|
|
253
|
-
readonly type: "string";
|
|
254
|
-
readonly description: "Filter by process definition key";
|
|
255
|
-
readonly validate: typeof ProcessDefinitionKey.assumeExists;
|
|
256
|
-
};
|
|
257
|
-
itype: {
|
|
258
|
-
readonly type: "string";
|
|
259
|
-
readonly description: "Case-insensitive filter by job type";
|
|
260
|
-
};
|
|
261
|
-
bpmnProcessId: {
|
|
262
|
-
readonly type: "string";
|
|
263
|
-
readonly description: "Filter by BPMN process ID";
|
|
264
|
-
};
|
|
265
|
-
id: {
|
|
266
|
-
readonly type: "string";
|
|
267
|
-
readonly description: "Filter by BPMN process ID (alias)";
|
|
268
|
-
};
|
|
269
|
-
processDefinitionId: {
|
|
270
|
-
readonly type: "string";
|
|
271
|
-
readonly description: "Filter by process definition ID";
|
|
272
|
-
readonly validate: typeof ProcessDefinitionId.assumeExists;
|
|
273
|
-
};
|
|
274
|
-
errorType: {
|
|
275
|
-
readonly type: "string";
|
|
276
|
-
readonly description: "Filter by error type";
|
|
277
|
-
};
|
|
278
|
-
errorMessage: {
|
|
279
|
-
readonly type: "string";
|
|
280
|
-
readonly description: "Filter by error message";
|
|
281
|
-
};
|
|
282
|
-
ierrorMessage: {
|
|
283
|
-
readonly type: "string";
|
|
284
|
-
readonly description: "Case-insensitive filter by error message";
|
|
285
|
-
};
|
|
286
|
-
iid: {
|
|
287
|
-
readonly type: "string";
|
|
288
|
-
readonly description: "Case-insensitive filter by BPMN process ID";
|
|
289
|
-
};
|
|
290
|
-
assignee: {
|
|
291
|
-
readonly type: "string";
|
|
292
|
-
readonly description: "Filter by assignee";
|
|
293
|
-
};
|
|
294
|
-
elementId: {
|
|
295
|
-
readonly type: "string";
|
|
296
|
-
readonly description: "Filter by element ID";
|
|
297
|
-
};
|
|
298
|
-
iassignee: {
|
|
299
|
-
readonly type: "string";
|
|
300
|
-
readonly description: "Case-insensitive filter by assignee";
|
|
301
|
-
};
|
|
302
|
-
key: {
|
|
303
|
-
readonly type: "string";
|
|
304
|
-
readonly description: "Filter by key";
|
|
305
|
-
};
|
|
306
|
-
iname: {
|
|
307
|
-
readonly type: "string";
|
|
308
|
-
readonly description: "Case-insensitive filter by name";
|
|
309
|
-
};
|
|
310
|
-
parentProcessInstanceKey: {
|
|
311
|
-
readonly type: "string";
|
|
312
|
-
readonly description: "Filter by parent process instance key";
|
|
313
|
-
readonly validate: typeof ProcessInstanceKey.assumeExists;
|
|
314
|
-
};
|
|
315
223
|
sortBy: {
|
|
316
224
|
readonly type: "string";
|
|
317
225
|
readonly description: "Sort results by field";
|
|
@@ -604,152 +512,6 @@ export declare const COMMAND_REGISTRY: {
|
|
|
604
512
|
}[];
|
|
605
513
|
resources: string[];
|
|
606
514
|
flags: {
|
|
607
|
-
mappingRuleId: {
|
|
608
|
-
readonly type: "string";
|
|
609
|
-
readonly description: "Filter by mapping rule ID";
|
|
610
|
-
};
|
|
611
|
-
name: {
|
|
612
|
-
readonly type: "string";
|
|
613
|
-
readonly description: "Filter by name";
|
|
614
|
-
};
|
|
615
|
-
claimName: {
|
|
616
|
-
readonly type: "string";
|
|
617
|
-
readonly description: "Filter by claim name";
|
|
618
|
-
};
|
|
619
|
-
claimValue: {
|
|
620
|
-
readonly type: "string";
|
|
621
|
-
readonly description: "Filter by claim value";
|
|
622
|
-
};
|
|
623
|
-
ownerId: {
|
|
624
|
-
readonly type: "string";
|
|
625
|
-
readonly description: "Filter by owner ID";
|
|
626
|
-
};
|
|
627
|
-
ownerType: {
|
|
628
|
-
readonly type: "string";
|
|
629
|
-
readonly description: "Filter by owner type";
|
|
630
|
-
};
|
|
631
|
-
resourceType: {
|
|
632
|
-
readonly type: "string";
|
|
633
|
-
readonly description: "Filter by resource type";
|
|
634
|
-
};
|
|
635
|
-
resourceId: {
|
|
636
|
-
readonly type: "string";
|
|
637
|
-
readonly description: "Filter by resource ID";
|
|
638
|
-
};
|
|
639
|
-
tenantId: {
|
|
640
|
-
readonly type: "string";
|
|
641
|
-
readonly description: "Filter by tenant ID";
|
|
642
|
-
readonly validate: typeof TenantId.assumeExists;
|
|
643
|
-
};
|
|
644
|
-
groupId: {
|
|
645
|
-
readonly type: "string";
|
|
646
|
-
readonly description: "Filter by group ID";
|
|
647
|
-
};
|
|
648
|
-
roleId: {
|
|
649
|
-
readonly type: "string";
|
|
650
|
-
readonly description: "Filter by role ID";
|
|
651
|
-
};
|
|
652
|
-
username: {
|
|
653
|
-
readonly type: "string";
|
|
654
|
-
readonly description: "Filter by username";
|
|
655
|
-
readonly validate: typeof Username.assumeExists;
|
|
656
|
-
};
|
|
657
|
-
email: {
|
|
658
|
-
readonly type: "string";
|
|
659
|
-
readonly description: "Filter by email";
|
|
660
|
-
};
|
|
661
|
-
value: {
|
|
662
|
-
readonly type: "string";
|
|
663
|
-
readonly description: "Filter by value";
|
|
664
|
-
};
|
|
665
|
-
processInstanceKey: {
|
|
666
|
-
readonly type: "string";
|
|
667
|
-
readonly description: "Filter by process instance key";
|
|
668
|
-
readonly validate: typeof ProcessInstanceKey.assumeExists;
|
|
669
|
-
};
|
|
670
|
-
scopeKey: {
|
|
671
|
-
readonly type: "string";
|
|
672
|
-
readonly description: "Filter by scope key";
|
|
673
|
-
};
|
|
674
|
-
fullValue: {
|
|
675
|
-
readonly type: "boolean";
|
|
676
|
-
readonly description: "Return full variable values (not truncated)";
|
|
677
|
-
};
|
|
678
|
-
iname: {
|
|
679
|
-
readonly type: "string";
|
|
680
|
-
readonly description: "Case-insensitive filter by name";
|
|
681
|
-
};
|
|
682
|
-
ivalue: {
|
|
683
|
-
readonly type: "string";
|
|
684
|
-
readonly description: "Case-insensitive filter by value";
|
|
685
|
-
};
|
|
686
|
-
state: {
|
|
687
|
-
readonly type: "string";
|
|
688
|
-
readonly description: "Filter by state";
|
|
689
|
-
};
|
|
690
|
-
type: {
|
|
691
|
-
readonly type: "string";
|
|
692
|
-
readonly description: "Filter by job type";
|
|
693
|
-
};
|
|
694
|
-
processDefinitionKey: {
|
|
695
|
-
readonly type: "string";
|
|
696
|
-
readonly description: "Filter by process definition key";
|
|
697
|
-
readonly validate: typeof ProcessDefinitionKey.assumeExists;
|
|
698
|
-
};
|
|
699
|
-
itype: {
|
|
700
|
-
readonly type: "string";
|
|
701
|
-
readonly description: "Case-insensitive filter by job type";
|
|
702
|
-
};
|
|
703
|
-
bpmnProcessId: {
|
|
704
|
-
readonly type: "string";
|
|
705
|
-
readonly description: "Filter by BPMN process ID";
|
|
706
|
-
};
|
|
707
|
-
id: {
|
|
708
|
-
readonly type: "string";
|
|
709
|
-
readonly description: "Filter by BPMN process ID (alias)";
|
|
710
|
-
};
|
|
711
|
-
processDefinitionId: {
|
|
712
|
-
readonly type: "string";
|
|
713
|
-
readonly description: "Filter by process definition ID";
|
|
714
|
-
readonly validate: typeof ProcessDefinitionId.assumeExists;
|
|
715
|
-
};
|
|
716
|
-
errorType: {
|
|
717
|
-
readonly type: "string";
|
|
718
|
-
readonly description: "Filter by error type";
|
|
719
|
-
};
|
|
720
|
-
errorMessage: {
|
|
721
|
-
readonly type: "string";
|
|
722
|
-
readonly description: "Filter by error message";
|
|
723
|
-
};
|
|
724
|
-
ierrorMessage: {
|
|
725
|
-
readonly type: "string";
|
|
726
|
-
readonly description: "Case-insensitive filter by error message";
|
|
727
|
-
};
|
|
728
|
-
iid: {
|
|
729
|
-
readonly type: "string";
|
|
730
|
-
readonly description: "Case-insensitive filter by BPMN process ID";
|
|
731
|
-
};
|
|
732
|
-
assignee: {
|
|
733
|
-
readonly type: "string";
|
|
734
|
-
readonly description: "Filter by assignee";
|
|
735
|
-
};
|
|
736
|
-
elementId: {
|
|
737
|
-
readonly type: "string";
|
|
738
|
-
readonly description: "Filter by element ID";
|
|
739
|
-
};
|
|
740
|
-
iassignee: {
|
|
741
|
-
readonly type: "string";
|
|
742
|
-
readonly description: "Case-insensitive filter by assignee";
|
|
743
|
-
};
|
|
744
|
-
key: {
|
|
745
|
-
readonly type: "string";
|
|
746
|
-
readonly description: "Filter by key";
|
|
747
|
-
};
|
|
748
|
-
parentProcessInstanceKey: {
|
|
749
|
-
readonly type: "string";
|
|
750
|
-
readonly description: "Filter by parent process instance key";
|
|
751
|
-
readonly validate: typeof ProcessInstanceKey.assumeExists;
|
|
752
|
-
};
|
|
753
515
|
sortBy: {
|
|
754
516
|
readonly type: "string";
|
|
755
517
|
readonly description: "Sort results by field";
|
|
@@ -1068,32 +830,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1068
830
|
description: string;
|
|
1069
831
|
}[];
|
|
1070
832
|
resources: string[];
|
|
1071
|
-
flags: {
|
|
1072
|
-
variables: {
|
|
1073
|
-
readonly type: "boolean";
|
|
1074
|
-
readonly description: "Include variables in output";
|
|
1075
|
-
};
|
|
1076
|
-
userTask: {
|
|
1077
|
-
readonly type: "boolean";
|
|
1078
|
-
readonly description: "Get form for user task";
|
|
1079
|
-
};
|
|
1080
|
-
ut: {
|
|
1081
|
-
readonly type: "boolean";
|
|
1082
|
-
readonly description: "Alias for --userTask";
|
|
1083
|
-
};
|
|
1084
|
-
processDefinition: {
|
|
1085
|
-
readonly type: "boolean";
|
|
1086
|
-
readonly description: "Get form for process definition";
|
|
1087
|
-
};
|
|
1088
|
-
pd: {
|
|
1089
|
-
readonly type: "boolean";
|
|
1090
|
-
readonly description: "Alias for --processDefinition";
|
|
1091
|
-
};
|
|
1092
|
-
xml: {
|
|
1093
|
-
readonly type: "boolean";
|
|
1094
|
-
readonly description: "Get BPMN XML (process definitions)";
|
|
1095
|
-
};
|
|
1096
|
-
};
|
|
833
|
+
flags: {};
|
|
1097
834
|
resourceFlags: {
|
|
1098
835
|
"process-definition": {
|
|
1099
836
|
readonly xml: {
|
|
@@ -2012,12 +1749,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
2012
1749
|
description: string;
|
|
2013
1750
|
}[];
|
|
2014
1751
|
resources: string[];
|
|
2015
|
-
flags: {
|
|
2016
|
-
shell: {
|
|
2017
|
-
type: "string";
|
|
2018
|
-
description: string;
|
|
2019
|
-
};
|
|
2020
|
-
};
|
|
1752
|
+
flags: {};
|
|
2021
1753
|
resourceFlags: {
|
|
2022
1754
|
install: {
|
|
2023
1755
|
shell: {
|
|
@@ -2106,7 +1838,7 @@ export declare function isValidCommand(verb: string, resource: string): boolean;
|
|
|
2106
1838
|
* "string" wins because parseArgs with `type: "string"` can accept any
|
|
2107
1839
|
* value, whereas `type: "boolean"` would discard the string payload.
|
|
2108
1840
|
*/
|
|
2109
|
-
export declare function deriveParseArgsOptions(): Record<string, {
|
|
1841
|
+
export declare function deriveParseArgsOptions(pluginFlags?: Record<string, Record<string, FlagDef>>): Record<string, {
|
|
2110
1842
|
type: "string" | "boolean";
|
|
2111
1843
|
short?: string;
|
|
2112
1844
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-registry.d.ts","sourceRoot":"","sources":["../src/command-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,MAAM,qC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+jCS,CAAC;AAEvC,yEAAyE;AACzE,MAAM,MAAM,IAAI,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAIjD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAe9C,CAAC;AAEL;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CASlE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC/B,IAAI,EAAE,MAAM,GACV,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAUrC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAWtE;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACrC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACnD,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA+ChE"}
|
package/dist/command-registry.js
CHANGED
|
@@ -418,23 +418,18 @@ export const COMMAND_REGISTRY = {
|
|
|
418
418
|
"auth",
|
|
419
419
|
"mapping-rules",
|
|
420
420
|
],
|
|
421
|
+
// Verb-level `flags` holds only genuinely shared flags. Per-resource
|
|
422
|
+
// flags live exclusively in `resourceFlags` so unknown-flag detection
|
|
423
|
+
// warns when (e.g.) `--processDefinitionId` is passed against a
|
|
424
|
+
// non-PD resource (#256). The flag is still parsed by `parseArgs`
|
|
425
|
+
// (see `deriveParseArgsOptions`, which iterates `resourceFlags` too)
|
|
426
|
+
// and the value is ignored — the warning is the user-facing signal.
|
|
421
427
|
flags: {
|
|
422
428
|
all: {
|
|
423
429
|
type: "boolean",
|
|
424
430
|
description: "List all (disable pagination limit)",
|
|
425
431
|
},
|
|
426
432
|
...SEARCH_FLAGS,
|
|
427
|
-
...PI_SEARCH_FLAGS,
|
|
428
|
-
...PD_SEARCH_FLAGS,
|
|
429
|
-
...UT_SEARCH_FLAGS,
|
|
430
|
-
...INC_SEARCH_FLAGS,
|
|
431
|
-
...JOB_SEARCH_FLAGS,
|
|
432
|
-
...USER_SEARCH_FLAGS,
|
|
433
|
-
...ROLE_SEARCH_FLAGS,
|
|
434
|
-
...GROUP_SEARCH_FLAGS,
|
|
435
|
-
...TENANT_SEARCH_FLAGS,
|
|
436
|
-
...AUTH_SEARCH_FLAGS,
|
|
437
|
-
...MR_SEARCH_FLAGS,
|
|
438
433
|
},
|
|
439
434
|
resourceFlags: {
|
|
440
435
|
"process-definition": PD_SEARCH_FLAGS,
|
|
@@ -521,20 +516,14 @@ export const COMMAND_REGISTRY = {
|
|
|
521
516
|
"auth",
|
|
522
517
|
"mapping-rules",
|
|
523
518
|
],
|
|
519
|
+
// Verb-level `flags` holds only genuinely shared flags. Per-resource
|
|
520
|
+
// flags live exclusively in `resourceFlags` so unknown-flag detection
|
|
521
|
+
// warns when (e.g.) `--processDefinitionId` is passed against a
|
|
522
|
+
// non-PD resource (#256). The flag is still parsed by `parseArgs`
|
|
523
|
+
// (see `deriveParseArgsOptions`, which iterates `resourceFlags` too)
|
|
524
|
+
// and the value is ignored — the warning is the user-facing signal.
|
|
524
525
|
flags: {
|
|
525
526
|
...SEARCH_FLAGS,
|
|
526
|
-
...PI_SEARCH_FLAGS,
|
|
527
|
-
...PD_SEARCH_FLAGS,
|
|
528
|
-
...UT_SEARCH_FLAGS,
|
|
529
|
-
...INC_SEARCH_FLAGS,
|
|
530
|
-
...JOB_SEARCH_FLAGS,
|
|
531
|
-
...VAR_SEARCH_FLAGS,
|
|
532
|
-
...USER_SEARCH_FLAGS,
|
|
533
|
-
...ROLE_SEARCH_FLAGS,
|
|
534
|
-
...GROUP_SEARCH_FLAGS,
|
|
535
|
-
...TENANT_SEARCH_FLAGS,
|
|
536
|
-
...AUTH_SEARCH_FLAGS,
|
|
537
|
-
...MR_SEARCH_FLAGS,
|
|
538
527
|
},
|
|
539
528
|
resourceFlags: {
|
|
540
529
|
"process-definition": PD_SEARCH_FLAGS,
|
|
@@ -602,7 +591,13 @@ export const COMMAND_REGISTRY = {
|
|
|
602
591
|
"auth",
|
|
603
592
|
"mapping-rule",
|
|
604
593
|
],
|
|
605
|
-
flags
|
|
594
|
+
// Verb-level `flags` holds only genuinely shared flags. Per-resource
|
|
595
|
+
// flags live exclusively in `resourceFlags` so unknown-flag detection
|
|
596
|
+
// warns when (e.g.) `--xml` is passed against a non-PD resource
|
|
597
|
+
// (#256). The flag is still parsed by `parseArgs` (see
|
|
598
|
+
// `deriveParseArgsOptions`, which iterates `resourceFlags` too) and
|
|
599
|
+
// the value is ignored — the warning is the user-facing signal.
|
|
600
|
+
flags: {},
|
|
606
601
|
resourceFlags: {
|
|
607
602
|
"process-definition": GET_PD_FLAGS,
|
|
608
603
|
form: GET_FORM_FLAGS,
|
|
@@ -1359,12 +1354,14 @@ export const COMMAND_REGISTRY = {
|
|
|
1359
1354
|
},
|
|
1360
1355
|
],
|
|
1361
1356
|
resources: ["bash", "zsh", "fish", "install"],
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1357
|
+
// `--shell` only applies to `completion install` — declared once in
|
|
1358
|
+
// `resourceFlags.install` so it triggers an unknown-flag warning when
|
|
1359
|
+
// passed to other resources (e.g. `completion zsh --shell bash`).
|
|
1360
|
+
// This is the original #256 defect class. `parseArgs` still accepts
|
|
1361
|
+
// the flag globally via `deriveParseArgsOptions` iterating
|
|
1362
|
+
// `resourceFlags`, and the value is ignored on non-install branches
|
|
1363
|
+
// of `completionCommand` — the warning is the user-facing signal.
|
|
1364
|
+
flags: {},
|
|
1368
1365
|
resourceFlags: {
|
|
1369
1366
|
install: {
|
|
1370
1367
|
shell: {
|
|
@@ -1403,7 +1400,7 @@ export const COMMAND_REGISTRY = {
|
|
|
1403
1400
|
aliases: ["menu"],
|
|
1404
1401
|
},
|
|
1405
1402
|
which: {
|
|
1406
|
-
description: "Show active profile",
|
|
1403
|
+
description: "Show active profile or output mode",
|
|
1407
1404
|
mutating: false,
|
|
1408
1405
|
requiresResource: true,
|
|
1409
1406
|
helpExamples: [
|
|
@@ -1411,8 +1408,12 @@ export const COMMAND_REGISTRY = {
|
|
|
1411
1408
|
command: "c8ctl which profile",
|
|
1412
1409
|
description: "Show currently active profile",
|
|
1413
1410
|
},
|
|
1411
|
+
{
|
|
1412
|
+
command: "c8ctl which output",
|
|
1413
|
+
description: "Show current output mode",
|
|
1414
|
+
},
|
|
1414
1415
|
],
|
|
1415
|
-
resources: ["profile"],
|
|
1416
|
+
resources: ["profile", "output"],
|
|
1416
1417
|
flags: {},
|
|
1417
1418
|
},
|
|
1418
1419
|
};
|
|
@@ -1499,7 +1500,7 @@ export function isValidCommand(verb, resource) {
|
|
|
1499
1500
|
* "string" wins because parseArgs with `type: "string"` can accept any
|
|
1500
1501
|
* value, whereas `type: "boolean"` would discard the string payload.
|
|
1501
1502
|
*/
|
|
1502
|
-
export function deriveParseArgsOptions() {
|
|
1503
|
+
export function deriveParseArgsOptions(pluginFlags) {
|
|
1503
1504
|
const options = {};
|
|
1504
1505
|
function addFlags(flags) {
|
|
1505
1506
|
for (const [name, def] of Object.entries(flags)) {
|
|
@@ -1533,6 +1534,12 @@ export function deriveParseArgsOptions() {
|
|
|
1533
1534
|
}
|
|
1534
1535
|
}
|
|
1535
1536
|
}
|
|
1537
|
+
// Add plugin flags if provided
|
|
1538
|
+
if (pluginFlags) {
|
|
1539
|
+
for (const commandFlags of Object.values(pluginFlags)) {
|
|
1540
|
+
addFlags(commandFlags);
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1536
1543
|
return options;
|
|
1537
1544
|
}
|
|
1538
1545
|
//# sourceMappingURL=command-registry.js.map
|