@camunda8/cli 2.6.0-alpha.18 → 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/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 +586 -168
- 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 +588 -476
- 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/dist/commands/help.js
CHANGED
|
@@ -1,129 +1,544 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Help and version commands
|
|
3
3
|
*/
|
|
4
|
-
import { readFileSync } from
|
|
5
|
-
import {
|
|
6
|
-
import { fileURLToPath } from
|
|
4
|
+
import { readFileSync } from "node:fs";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { getLogger } from "../logger.js";
|
|
8
|
-
import { getPluginCommandsInfo } from "../plugin-loader.js";
|
|
8
|
+
import { getPluginCommandsInfo, } from "../plugin-loader.js";
|
|
9
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
10
|
const __dirname = dirname(__filename);
|
|
11
|
-
/**
|
|
12
|
-
* Build structured JSON help data for machine/agent consumption.
|
|
13
|
-
* Returned by showHelp() and showCommandHelp() in JSON output mode.
|
|
14
|
-
*/
|
|
15
11
|
function buildHelpJson(version, pluginCommandsInfo) {
|
|
16
12
|
return {
|
|
17
13
|
version,
|
|
18
|
-
usage:
|
|
14
|
+
usage: "c8ctl <command> [resource] [options]",
|
|
19
15
|
commands: [
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
16
|
+
{
|
|
17
|
+
verb: "list",
|
|
18
|
+
resource: "<resource>",
|
|
19
|
+
resources: [
|
|
20
|
+
"pi",
|
|
21
|
+
"pd",
|
|
22
|
+
"ut",
|
|
23
|
+
"inc",
|
|
24
|
+
"jobs",
|
|
25
|
+
"profiles",
|
|
26
|
+
"plugins",
|
|
27
|
+
"users",
|
|
28
|
+
"roles",
|
|
29
|
+
"groups",
|
|
30
|
+
"tenants",
|
|
31
|
+
"auth",
|
|
32
|
+
"mapping-rules",
|
|
33
|
+
],
|
|
34
|
+
description: "List resources (process, identity)",
|
|
35
|
+
mutating: false,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
verb: "search",
|
|
39
|
+
resource: "<resource>",
|
|
40
|
+
resources: [
|
|
41
|
+
"pi",
|
|
42
|
+
"pd",
|
|
43
|
+
"ut",
|
|
44
|
+
"inc",
|
|
45
|
+
"jobs",
|
|
46
|
+
"vars",
|
|
47
|
+
"users",
|
|
48
|
+
"roles",
|
|
49
|
+
"groups",
|
|
50
|
+
"tenants",
|
|
51
|
+
"auth",
|
|
52
|
+
"mapping-rules",
|
|
53
|
+
],
|
|
54
|
+
description: "Search resources with filters",
|
|
55
|
+
mutating: false,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
verb: "get",
|
|
59
|
+
resource: "<resource> <key>",
|
|
60
|
+
resources: [
|
|
61
|
+
"pi",
|
|
62
|
+
"pd",
|
|
63
|
+
"inc",
|
|
64
|
+
"topology",
|
|
65
|
+
"form",
|
|
66
|
+
"user",
|
|
67
|
+
"role",
|
|
68
|
+
"group",
|
|
69
|
+
"tenant",
|
|
70
|
+
"auth",
|
|
71
|
+
"mapping-rule",
|
|
72
|
+
],
|
|
73
|
+
description: "Get resource by key",
|
|
74
|
+
mutating: false,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
verb: "create",
|
|
78
|
+
resource: "<resource>",
|
|
79
|
+
resources: [
|
|
80
|
+
"pi",
|
|
81
|
+
"user",
|
|
82
|
+
"role",
|
|
83
|
+
"group",
|
|
84
|
+
"tenant",
|
|
85
|
+
"auth",
|
|
86
|
+
"mapping-rule",
|
|
87
|
+
],
|
|
88
|
+
description: "Create resource",
|
|
89
|
+
mutating: true,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
verb: "delete",
|
|
93
|
+
resource: "<resource> <key>",
|
|
94
|
+
resources: ["user", "role", "group", "tenant", "auth", "mapping-rule"],
|
|
95
|
+
description: "Delete resource",
|
|
96
|
+
mutating: true,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
verb: "assign",
|
|
100
|
+
resource: "<resource> <id> --to-<target>=<id>",
|
|
101
|
+
resources: ["role", "user", "group", "mapping-rule"],
|
|
102
|
+
description: "Assign resource to target",
|
|
103
|
+
mutating: true,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
verb: "unassign",
|
|
107
|
+
resource: "<resource> <id> --from-<target>=<id>",
|
|
108
|
+
resources: ["role", "user", "group", "mapping-rule"],
|
|
109
|
+
description: "Unassign resource from target",
|
|
110
|
+
mutating: true,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
verb: "cancel",
|
|
114
|
+
resource: "<resource> <key>",
|
|
115
|
+
resources: ["pi"],
|
|
116
|
+
description: "Cancel resource",
|
|
117
|
+
mutating: true,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
verb: "await",
|
|
121
|
+
resource: "<resource>",
|
|
122
|
+
resources: ["pi"],
|
|
123
|
+
description: "Create and await completion (alias for create --awaitCompletion)",
|
|
124
|
+
mutating: true,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
verb: "complete",
|
|
128
|
+
resource: "<resource> <key>",
|
|
129
|
+
resources: ["ut", "job"],
|
|
130
|
+
description: "Complete resource",
|
|
131
|
+
mutating: true,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
verb: "fail",
|
|
135
|
+
resource: "job <key>",
|
|
136
|
+
resources: ["job"],
|
|
137
|
+
description: "Fail a job",
|
|
138
|
+
mutating: true,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
verb: "activate",
|
|
142
|
+
resource: "jobs <type>",
|
|
143
|
+
resources: ["jobs"],
|
|
144
|
+
description: "Activate jobs by type",
|
|
145
|
+
mutating: true,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
verb: "resolve",
|
|
149
|
+
resource: "inc <key>",
|
|
150
|
+
resources: ["inc"],
|
|
151
|
+
description: "Resolve incident",
|
|
152
|
+
mutating: true,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
verb: "publish",
|
|
156
|
+
resource: "msg <name>",
|
|
157
|
+
resources: ["msg"],
|
|
158
|
+
description: "Publish message",
|
|
159
|
+
mutating: true,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
verb: "correlate",
|
|
163
|
+
resource: "msg <name>",
|
|
164
|
+
resources: ["msg"],
|
|
165
|
+
description: "Correlate message",
|
|
166
|
+
mutating: true,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
verb: "deploy",
|
|
170
|
+
resource: "[path...]",
|
|
171
|
+
resources: [],
|
|
172
|
+
description: "Deploy BPMN/DMN/forms",
|
|
173
|
+
mutating: true,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
verb: "run",
|
|
177
|
+
resource: "<path>",
|
|
178
|
+
resources: [],
|
|
179
|
+
description: "Deploy and start process",
|
|
180
|
+
mutating: true,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
verb: "watch",
|
|
184
|
+
resource: "[path...]",
|
|
185
|
+
resources: [],
|
|
186
|
+
description: "Watch files for changes and auto-deploy",
|
|
187
|
+
mutating: false,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
verb: "open",
|
|
191
|
+
resource: "<app>",
|
|
192
|
+
resources: ["operate", "tasklist", "modeler", "optimize"],
|
|
193
|
+
description: "Open Camunda web application in browser",
|
|
194
|
+
mutating: false,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
verb: "add",
|
|
198
|
+
resource: "profile <name>",
|
|
199
|
+
resources: ["profile"],
|
|
200
|
+
description: "Add a profile",
|
|
201
|
+
mutating: false,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
verb: "remove",
|
|
205
|
+
resource: "profile <name>",
|
|
206
|
+
resources: ["profile"],
|
|
207
|
+
description: "Remove a profile (alias: rm)",
|
|
208
|
+
mutating: false,
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
verb: "load",
|
|
212
|
+
resource: "plugin <name>",
|
|
213
|
+
resources: ["plugin"],
|
|
214
|
+
description: "Load a c8ctl plugin",
|
|
215
|
+
mutating: false,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
verb: "unload",
|
|
219
|
+
resource: "plugin <name>",
|
|
220
|
+
resources: ["plugin"],
|
|
221
|
+
description: "Unload a c8ctl plugin",
|
|
222
|
+
mutating: false,
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
verb: "upgrade",
|
|
226
|
+
resource: "plugin <name>",
|
|
227
|
+
resources: ["plugin"],
|
|
228
|
+
description: "Upgrade a plugin",
|
|
229
|
+
mutating: false,
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
verb: "downgrade",
|
|
233
|
+
resource: "plugin <name> <version>",
|
|
234
|
+
resources: ["plugin"],
|
|
235
|
+
description: "Downgrade a plugin to a specific version",
|
|
236
|
+
mutating: false,
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
verb: "sync",
|
|
240
|
+
resource: "plugin",
|
|
241
|
+
resources: ["plugin"],
|
|
242
|
+
description: "Synchronize plugins",
|
|
243
|
+
mutating: false,
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
verb: "init",
|
|
247
|
+
resource: "plugin [name]",
|
|
248
|
+
resources: ["plugin"],
|
|
249
|
+
description: "Create a new plugin from TypeScript template",
|
|
250
|
+
mutating: false,
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
verb: "use",
|
|
254
|
+
resource: "profile|tenant",
|
|
255
|
+
resources: ["profile", "tenant"],
|
|
256
|
+
description: "Set active profile or tenant",
|
|
257
|
+
mutating: false,
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
verb: "output",
|
|
261
|
+
resource: "[json|text]",
|
|
262
|
+
resources: ["json", "text"],
|
|
263
|
+
description: "Show or set output format",
|
|
264
|
+
mutating: false,
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
verb: "completion",
|
|
268
|
+
resource: "bash|zsh|fish",
|
|
269
|
+
resources: ["bash", "zsh", "fish"],
|
|
270
|
+
description: "Generate shell completion script",
|
|
271
|
+
mutating: false,
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
verb: "mcp-proxy",
|
|
275
|
+
resource: "[mcp-path]",
|
|
276
|
+
resources: [],
|
|
277
|
+
description: "Start a STDIO to remote HTTP MCP proxy server",
|
|
278
|
+
mutating: false,
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
verb: "feedback",
|
|
282
|
+
resource: "",
|
|
283
|
+
resources: [],
|
|
284
|
+
description: "Open the feedback page to report issues or request features",
|
|
285
|
+
mutating: false,
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
verb: "help",
|
|
289
|
+
resource: "[command]",
|
|
290
|
+
resources: [],
|
|
291
|
+
description: "Show help",
|
|
292
|
+
mutating: false,
|
|
293
|
+
},
|
|
294
|
+
...pluginCommandsInfo.map((cmd) => ({
|
|
295
|
+
verb: cmd.commandName,
|
|
296
|
+
resource: "",
|
|
297
|
+
resources: [],
|
|
298
|
+
description: cmd.description || "",
|
|
299
|
+
mutating: false,
|
|
55
300
|
examples: cmd.examples || [],
|
|
56
301
|
})),
|
|
57
302
|
],
|
|
58
303
|
resourceAliases: {
|
|
59
|
-
pi:
|
|
60
|
-
pd:
|
|
61
|
-
ut:
|
|
62
|
-
inc:
|
|
63
|
-
msg:
|
|
64
|
-
vars:
|
|
65
|
-
auth:
|
|
66
|
-
mr:
|
|
304
|
+
pi: "process-instance(s)",
|
|
305
|
+
pd: "process-definition(s)",
|
|
306
|
+
ut: "user-task(s)",
|
|
307
|
+
inc: "incident(s)",
|
|
308
|
+
msg: "message",
|
|
309
|
+
vars: "variable(s)",
|
|
310
|
+
auth: "authorization(s)",
|
|
311
|
+
mr: "mapping-rule(s)",
|
|
67
312
|
},
|
|
68
313
|
globalFlags: [
|
|
69
|
-
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
|
|
314
|
+
{
|
|
315
|
+
flag: "--profile",
|
|
316
|
+
type: "string",
|
|
317
|
+
description: "Use specific profile for this command",
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
flag: "--sortBy",
|
|
321
|
+
type: "string",
|
|
322
|
+
description: "Sort list/search output by column name",
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
flag: "--asc",
|
|
326
|
+
type: "boolean",
|
|
327
|
+
description: "Sort in ascending order (default)",
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
flag: "--desc",
|
|
331
|
+
type: "boolean",
|
|
332
|
+
description: "Sort in descending order",
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
flag: "--limit",
|
|
336
|
+
type: "string",
|
|
337
|
+
description: "Maximum number of items to fetch (default: 1000000)",
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
flag: "--between",
|
|
341
|
+
type: "string",
|
|
342
|
+
description: "Filter by date range: <from>..<to> (YYYY-MM-DD or ISO 8601; open-ended: ..to or from..)",
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
flag: "--dateField",
|
|
346
|
+
type: "string",
|
|
347
|
+
description: "Date field to filter on with --between (default depends on resource)",
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
flag: "--state",
|
|
351
|
+
type: "string",
|
|
352
|
+
description: "Filter by state (ACTIVE, COMPLETED, etc.)",
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
flag: "--id",
|
|
356
|
+
type: "string",
|
|
357
|
+
description: "Process definition ID (alias for --bpmnProcessId)",
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
flag: "--verbose",
|
|
361
|
+
type: "boolean",
|
|
362
|
+
description: "Enable SDK trace logging and show full error details",
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
flag: "--version",
|
|
366
|
+
type: "string",
|
|
367
|
+
short: "-v",
|
|
368
|
+
description: "Show version",
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
flag: "--help",
|
|
372
|
+
type: "boolean",
|
|
373
|
+
short: "-h",
|
|
374
|
+
description: "Show help",
|
|
375
|
+
},
|
|
81
376
|
],
|
|
82
377
|
searchFlags: [
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{ flag:
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
378
|
+
{
|
|
379
|
+
flag: "--bpmnProcessId",
|
|
380
|
+
type: "string",
|
|
381
|
+
description: "Filter by process definition ID",
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
flag: "--processDefinitionKey",
|
|
385
|
+
type: "string",
|
|
386
|
+
description: "Filter by process definition key",
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
flag: "--processInstanceKey",
|
|
390
|
+
type: "string",
|
|
391
|
+
description: "Filter by process instance key",
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
flag: "--parentProcessInstanceKey",
|
|
395
|
+
type: "string",
|
|
396
|
+
description: "Filter by parent process instance key",
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
flag: "--name",
|
|
400
|
+
type: "string",
|
|
401
|
+
description: "Filter by name (variables, process definitions); supports wildcards * and ?",
|
|
402
|
+
},
|
|
403
|
+
{ flag: "--key", type: "string", description: "Filter by key" },
|
|
404
|
+
{
|
|
405
|
+
flag: "--assignee",
|
|
406
|
+
type: "string",
|
|
407
|
+
description: "Filter by assignee (user tasks)",
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
flag: "--elementId",
|
|
411
|
+
type: "string",
|
|
412
|
+
description: "Filter by element ID (user tasks)",
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
flag: "--errorType",
|
|
416
|
+
type: "string",
|
|
417
|
+
description: "Filter by error type (incidents)",
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
flag: "--errorMessage",
|
|
421
|
+
type: "string",
|
|
422
|
+
description: "Filter by error message (incidents); supports wildcards",
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
flag: "--type",
|
|
426
|
+
type: "string",
|
|
427
|
+
description: "Filter by type (jobs); supports wildcards",
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
flag: "--value",
|
|
431
|
+
type: "string",
|
|
432
|
+
description: "Filter by variable value",
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
flag: "--scopeKey",
|
|
436
|
+
type: "string",
|
|
437
|
+
description: "Filter by scope key (variables)",
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
flag: "--fullValue",
|
|
441
|
+
type: "boolean",
|
|
442
|
+
description: "Return full variable values (default: truncated)",
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
flag: "--iname",
|
|
446
|
+
type: "string",
|
|
447
|
+
description: "Case-insensitive --name filter (supports wildcards)",
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
flag: "--iid",
|
|
451
|
+
type: "string",
|
|
452
|
+
description: "Case-insensitive --bpmnProcessId filter",
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
flag: "--iassignee",
|
|
456
|
+
type: "string",
|
|
457
|
+
description: "Case-insensitive --assignee filter",
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
flag: "--ierrorMessage",
|
|
461
|
+
type: "string",
|
|
462
|
+
description: "Case-insensitive --errorMessage filter",
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
flag: "--itype",
|
|
466
|
+
type: "string",
|
|
467
|
+
description: "Case-insensitive --type filter",
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
flag: "--ivalue",
|
|
471
|
+
type: "string",
|
|
472
|
+
description: "Case-insensitive --value filter",
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
flag: "--username",
|
|
476
|
+
type: "string",
|
|
477
|
+
description: "Filter by username (users)",
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
flag: "--email",
|
|
481
|
+
type: "string",
|
|
482
|
+
description: "Filter by email (users)",
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
flag: "--roleId",
|
|
486
|
+
type: "string",
|
|
487
|
+
description: "Filter by role ID (roles)",
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
flag: "--groupId",
|
|
491
|
+
type: "string",
|
|
492
|
+
description: "Filter by group ID (groups)",
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
flag: "--ownerId",
|
|
496
|
+
type: "string",
|
|
497
|
+
description: "Filter by owner ID (authorizations)",
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
flag: "--ownerType",
|
|
501
|
+
type: "string",
|
|
502
|
+
description: "Filter by owner type (authorizations)",
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
flag: "--resourceType",
|
|
506
|
+
type: "string",
|
|
507
|
+
description: "Filter by resource type (authorizations)",
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
flag: "--resourceId",
|
|
511
|
+
type: "string",
|
|
512
|
+
description: "Filter by resource ID (authorizations)",
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
flag: "--claimName",
|
|
516
|
+
type: "string",
|
|
517
|
+
description: "Filter by claim name (mapping rules)",
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
flag: "--claimValue",
|
|
521
|
+
type: "string",
|
|
522
|
+
description: "Filter by claim value (mapping rules)",
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
flag: "--mappingRuleId",
|
|
526
|
+
type: "string",
|
|
527
|
+
description: "Filter by mapping rule ID (mapping rules)",
|
|
528
|
+
},
|
|
114
529
|
],
|
|
115
530
|
agentFlags: [
|
|
116
531
|
{
|
|
117
|
-
flag:
|
|
118
|
-
type:
|
|
119
|
-
description:
|
|
120
|
-
appliesTo:
|
|
532
|
+
flag: "--fields",
|
|
533
|
+
type: "string",
|
|
534
|
+
description: "Comma-separated list of output fields to include. Reduces context window size. Case-insensitive. Example: --fields Key,State,processDefinitionId",
|
|
535
|
+
appliesTo: "all list/search/get commands",
|
|
121
536
|
},
|
|
122
537
|
{
|
|
123
|
-
flag:
|
|
124
|
-
type:
|
|
125
|
-
description:
|
|
126
|
-
appliesTo:
|
|
538
|
+
flag: "--dry-run",
|
|
539
|
+
type: "boolean",
|
|
540
|
+
description: "Preview the API request that would be sent without executing it. Emits { dryRun, command, method, url, body } as JSON. Always exits 0.",
|
|
541
|
+
appliesTo: "mutating commands: create, cancel, deploy, complete, fail, activate, resolve, publish, correlate, delete, assign, unassign",
|
|
127
542
|
},
|
|
128
543
|
],
|
|
129
544
|
};
|
|
@@ -132,8 +547,8 @@ function buildHelpJson(version, pluginCommandsInfo) {
|
|
|
132
547
|
* Get package version
|
|
133
548
|
*/
|
|
134
549
|
export function getVersion() {
|
|
135
|
-
const packagePath = join(__dirname,
|
|
136
|
-
const packageJson = JSON.parse(readFileSync(packagePath,
|
|
550
|
+
const packagePath = join(__dirname, "../../package.json");
|
|
551
|
+
const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
|
|
137
552
|
return packageJson.version;
|
|
138
553
|
}
|
|
139
554
|
/**
|
|
@@ -151,19 +566,19 @@ export function showHelp() {
|
|
|
151
566
|
const version = getVersion();
|
|
152
567
|
const pluginCommandsInfo = getPluginCommandsInfo();
|
|
153
568
|
// JSON mode: emit structured command tree for machine consumption
|
|
154
|
-
if (logger.mode ===
|
|
569
|
+
if (logger.mode === "json") {
|
|
155
570
|
logger.json(buildHelpJson(version, pluginCommandsInfo));
|
|
156
571
|
return;
|
|
157
572
|
}
|
|
158
|
-
let pluginSection =
|
|
573
|
+
let pluginSection = "";
|
|
159
574
|
if (pluginCommandsInfo.length > 0) {
|
|
160
|
-
pluginSection =
|
|
575
|
+
pluginSection = "\n\nPlugin Commands:";
|
|
161
576
|
for (const cmd of pluginCommandsInfo) {
|
|
162
|
-
const desc = cmd.description ? ` ${cmd.description}` :
|
|
577
|
+
const desc = cmd.description ? ` ${cmd.description}` : "";
|
|
163
578
|
pluginSection += `\n ${cmd.commandName.padEnd(20)}${desc}`;
|
|
164
579
|
}
|
|
165
580
|
}
|
|
166
|
-
let pluginExamples =
|
|
581
|
+
let pluginExamples = "";
|
|
167
582
|
for (const cmd of pluginCommandsInfo) {
|
|
168
583
|
for (const ex of cmd.examples ?? []) {
|
|
169
584
|
pluginExamples += `\n ${ex.command.padEnd(35)}${ex.description}`;
|
|
@@ -373,36 +788,36 @@ Feedback & Issues:
|
|
|
373
788
|
*/
|
|
374
789
|
export function showVerbResources(verb) {
|
|
375
790
|
const resources = {
|
|
376
|
-
list:
|
|
377
|
-
search:
|
|
378
|
-
get:
|
|
379
|
-
create:
|
|
380
|
-
delete:
|
|
381
|
-
assign:
|
|
382
|
-
unassign:
|
|
383
|
-
complete:
|
|
384
|
-
cancel:
|
|
385
|
-
await:
|
|
386
|
-
resolve:
|
|
387
|
-
activate:
|
|
388
|
-
fail:
|
|
389
|
-
publish:
|
|
390
|
-
correlate:
|
|
391
|
-
add:
|
|
392
|
-
remove:
|
|
393
|
-
rm:
|
|
394
|
-
load:
|
|
395
|
-
unload:
|
|
396
|
-
sync:
|
|
397
|
-
upgrade:
|
|
398
|
-
downgrade:
|
|
399
|
-
init:
|
|
400
|
-
use:
|
|
401
|
-
which:
|
|
402
|
-
output:
|
|
403
|
-
open:
|
|
404
|
-
completion:
|
|
405
|
-
help:
|
|
791
|
+
list: "process-instances (pi), process-definitions (pd), user-tasks (ut), incidents (inc), jobs, profiles, plugins, users, roles, groups, tenants, authorizations (auth), mapping-rules (mr)",
|
|
792
|
+
search: "process-instances (pi), process-definitions (pd), user-tasks (ut), incidents (inc), jobs, variables (vars), users, roles, groups, tenants, authorizations (auth), mapping-rules (mr)",
|
|
793
|
+
get: "process-instance (pi), process-definition (pd), incident (inc), topology, form, user, role, group, tenant, authorization (auth), mapping-rule (mr)",
|
|
794
|
+
create: "process-instance (pi), user, role, group, tenant, authorization (auth), mapping-rule (mr)",
|
|
795
|
+
delete: "user, role, group, tenant, authorization (auth), mapping-rule (mr)",
|
|
796
|
+
assign: "role, user, group, mapping-rule",
|
|
797
|
+
unassign: "role, user, group, mapping-rule",
|
|
798
|
+
complete: "user-task (ut), job",
|
|
799
|
+
cancel: "process-instance (pi)",
|
|
800
|
+
await: "process-instance (pi)",
|
|
801
|
+
resolve: "incident (inc)",
|
|
802
|
+
activate: "jobs",
|
|
803
|
+
fail: "job",
|
|
804
|
+
publish: "message (msg)",
|
|
805
|
+
correlate: "message (msg)",
|
|
806
|
+
add: "profile",
|
|
807
|
+
remove: "profile",
|
|
808
|
+
rm: "profile",
|
|
809
|
+
load: "plugin",
|
|
810
|
+
unload: "plugin",
|
|
811
|
+
sync: "plugin",
|
|
812
|
+
upgrade: "plugin",
|
|
813
|
+
downgrade: "plugin",
|
|
814
|
+
init: "plugin",
|
|
815
|
+
use: "profile, tenant",
|
|
816
|
+
which: "profile",
|
|
817
|
+
output: "json, text",
|
|
818
|
+
open: "operate, tasklist, modeler, optimize",
|
|
819
|
+
completion: "bash, zsh, fish",
|
|
820
|
+
help: "list, get, create, complete, await, search, deploy, run, watch, open, cancel, resolve, fail, activate, publish, correlate, delete, assign, unassign, upgrade, downgrade, init, profiles, profile, plugin, plugins",
|
|
406
821
|
};
|
|
407
822
|
const available = resources[verb];
|
|
408
823
|
if (available) {
|
|
@@ -1556,14 +1971,17 @@ Examples:
|
|
|
1556
1971
|
export function showCommandHelp(command) {
|
|
1557
1972
|
const logger = getLogger();
|
|
1558
1973
|
// JSON mode: emit structured help for machine/agent consumption
|
|
1559
|
-
if (logger.mode ===
|
|
1974
|
+
if (logger.mode === "json") {
|
|
1560
1975
|
const version = getVersion();
|
|
1561
1976
|
const pluginCommandsInfo = getPluginCommandsInfo();
|
|
1562
1977
|
const allHelp = buildHelpJson(version, pluginCommandsInfo);
|
|
1563
|
-
const commandEntry = allHelp.commands
|
|
1978
|
+
const commandEntry = allHelp.commands.find((c) => c.verb === command);
|
|
1564
1979
|
logger.json({
|
|
1565
1980
|
command,
|
|
1566
|
-
...(commandEntry ?? {
|
|
1981
|
+
...(commandEntry ?? {
|
|
1982
|
+
verb: command,
|
|
1983
|
+
description: `No detailed help available for: ${command}`,
|
|
1984
|
+
}),
|
|
1567
1985
|
globalFlags: allHelp.globalFlags,
|
|
1568
1986
|
searchFlags: allHelp.searchFlags,
|
|
1569
1987
|
agentFlags: allHelp.agentFlags,
|
|
@@ -1571,73 +1989,73 @@ export function showCommandHelp(command) {
|
|
|
1571
1989
|
return;
|
|
1572
1990
|
}
|
|
1573
1991
|
switch (command) {
|
|
1574
|
-
case
|
|
1992
|
+
case "list":
|
|
1575
1993
|
showListHelp();
|
|
1576
1994
|
break;
|
|
1577
|
-
case
|
|
1995
|
+
case "get":
|
|
1578
1996
|
showGetHelp();
|
|
1579
1997
|
break;
|
|
1580
|
-
case
|
|
1998
|
+
case "create":
|
|
1581
1999
|
showCreateHelp();
|
|
1582
2000
|
break;
|
|
1583
|
-
case
|
|
2001
|
+
case "complete":
|
|
1584
2002
|
showCompleteHelp();
|
|
1585
2003
|
break;
|
|
1586
|
-
case
|
|
2004
|
+
case "await":
|
|
1587
2005
|
showAwaitHelp();
|
|
1588
2006
|
break;
|
|
1589
|
-
case
|
|
2007
|
+
case "mcp-proxy":
|
|
1590
2008
|
showMcpProxyHelp();
|
|
1591
2009
|
break;
|
|
1592
|
-
case
|
|
2010
|
+
case "search":
|
|
1593
2011
|
showSearchHelp();
|
|
1594
2012
|
break;
|
|
1595
|
-
case
|
|
2013
|
+
case "deploy":
|
|
1596
2014
|
showDeployHelp();
|
|
1597
2015
|
break;
|
|
1598
|
-
case
|
|
2016
|
+
case "run":
|
|
1599
2017
|
showRunHelp();
|
|
1600
2018
|
break;
|
|
1601
|
-
case
|
|
1602
|
-
case
|
|
2019
|
+
case "watch":
|
|
2020
|
+
case "w":
|
|
1603
2021
|
showWatchHelp();
|
|
1604
2022
|
break;
|
|
1605
|
-
case
|
|
2023
|
+
case "open":
|
|
1606
2024
|
showOpenHelp();
|
|
1607
2025
|
break;
|
|
1608
|
-
case
|
|
2026
|
+
case "cancel":
|
|
1609
2027
|
showCancelHelp();
|
|
1610
2028
|
break;
|
|
1611
|
-
case
|
|
2029
|
+
case "resolve":
|
|
1612
2030
|
showResolveHelp();
|
|
1613
2031
|
break;
|
|
1614
|
-
case
|
|
2032
|
+
case "fail":
|
|
1615
2033
|
showFailHelp();
|
|
1616
2034
|
break;
|
|
1617
|
-
case
|
|
2035
|
+
case "activate":
|
|
1618
2036
|
showActivateHelp();
|
|
1619
2037
|
break;
|
|
1620
|
-
case
|
|
2038
|
+
case "publish":
|
|
1621
2039
|
showPublishHelp();
|
|
1622
2040
|
break;
|
|
1623
|
-
case
|
|
2041
|
+
case "correlate":
|
|
1624
2042
|
showCorrelateHelp();
|
|
1625
2043
|
break;
|
|
1626
|
-
case
|
|
2044
|
+
case "delete":
|
|
1627
2045
|
showDeleteHelp();
|
|
1628
2046
|
break;
|
|
1629
|
-
case
|
|
2047
|
+
case "assign":
|
|
1630
2048
|
showAssignHelp();
|
|
1631
2049
|
break;
|
|
1632
|
-
case
|
|
2050
|
+
case "unassign":
|
|
1633
2051
|
showUnassignHelp();
|
|
1634
2052
|
break;
|
|
1635
|
-
case
|
|
1636
|
-
case
|
|
2053
|
+
case "profiles":
|
|
2054
|
+
case "profile":
|
|
1637
2055
|
showProfilesHelp();
|
|
1638
2056
|
break;
|
|
1639
|
-
case
|
|
1640
|
-
case
|
|
2057
|
+
case "plugin":
|
|
2058
|
+
case "plugins":
|
|
1641
2059
|
showPluginHelp();
|
|
1642
2060
|
break;
|
|
1643
2061
|
default:
|