@camunda8/cli 3.2.0-alpha.1 → 3.2.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTEXT.md +7 -15
- package/EXAMPLES.md +253 -1
- package/PLUGIN-HELP.md +1 -1
- package/README.md +46 -179
- package/dist/command-dispatch.d.ts +1 -1
- package/dist/command-dispatch.d.ts.map +1 -1
- package/dist/command-dispatch.js +1 -1
- package/dist/command-dispatch.js.map +1 -1
- package/dist/commands/completion.d.ts +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +2 -3
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/deploy.d.ts +13 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +328 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/forms.d.ts +1 -1
- package/dist/commands/forms.d.ts.map +1 -1
- package/dist/commands/forms.js +8 -8
- package/dist/commands/forms.js.map +1 -1
- package/dist/commands/helpers/deploy-helpers.d.ts +120 -0
- package/dist/commands/helpers/deploy-helpers.d.ts.map +1 -0
- package/dist/{deployments.js → commands/helpers/deploy-helpers.js} +187 -136
- package/dist/commands/helpers/deploy-helpers.js.map +1 -0
- package/dist/commands/identity-authorizations.d.ts +5 -18
- package/dist/commands/identity-authorizations.d.ts.map +1 -1
- package/dist/commands/identity-authorizations.js +8 -10
- package/dist/commands/identity-authorizations.js.map +1 -1
- package/dist/commands/identity-groups.d.ts +5 -5
- package/dist/commands/identity-groups.d.ts.map +1 -1
- package/dist/commands/identity-groups.js +7 -8
- package/dist/commands/identity-groups.js.map +1 -1
- package/dist/commands/identity-mapping-rules.d.ts +5 -5
- package/dist/commands/identity-mapping-rules.d.ts.map +1 -1
- package/dist/commands/identity-mapping-rules.js +7 -8
- package/dist/commands/identity-mapping-rules.js.map +1 -1
- package/dist/commands/identity-roles.d.ts +5 -5
- package/dist/commands/identity-roles.d.ts.map +1 -1
- package/dist/commands/identity-roles.js +7 -8
- package/dist/commands/identity-roles.js.map +1 -1
- package/dist/commands/identity-tenants.d.ts +5 -5
- package/dist/commands/identity-tenants.d.ts.map +1 -1
- package/dist/commands/identity-tenants.js +7 -8
- package/dist/commands/identity-tenants.js.map +1 -1
- package/dist/commands/identity-users.d.ts +5 -5
- package/dist/commands/identity-users.d.ts.map +1 -1
- package/dist/commands/identity-users.js +7 -8
- package/dist/commands/identity-users.js.map +1 -1
- package/dist/commands/identity.d.ts +11 -31
- package/dist/commands/identity.d.ts.map +1 -1
- package/dist/commands/identity.js +15 -15
- package/dist/commands/identity.js.map +1 -1
- package/dist/commands/incidents.d.ts +3 -3
- package/dist/commands/incidents.d.ts.map +1 -1
- package/dist/commands/incidents.js +6 -6
- package/dist/commands/incidents.js.map +1 -1
- package/dist/commands/jobs.d.ts +4 -4
- package/dist/commands/jobs.d.ts.map +1 -1
- package/dist/commands/jobs.js +7 -7
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/mcp-proxy.d.ts +1 -1
- package/dist/commands/mcp-proxy.d.ts.map +1 -1
- package/dist/commands/mcp-proxy.js +5 -9
- package/dist/commands/mcp-proxy.js.map +1 -1
- package/dist/commands/messages.d.ts +2 -2
- package/dist/commands/messages.d.ts.map +1 -1
- package/dist/commands/messages.js +4 -4
- package/dist/commands/messages.js.map +1 -1
- package/dist/commands/open.d.ts +4 -4
- package/dist/commands/open.d.ts.map +1 -1
- package/dist/commands/open.js +6 -6
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/plugins.d.ts +9 -9
- package/dist/commands/plugins.d.ts.map +1 -1
- package/dist/commands/plugins.js +2 -7
- package/dist/commands/plugins.js.map +1 -1
- package/dist/commands/process-definitions.d.ts +2 -2
- package/dist/commands/process-definitions.d.ts.map +1 -1
- package/dist/commands/process-definitions.js +5 -5
- package/dist/commands/process-definitions.js.map +1 -1
- package/dist/commands/process-instances.d.ts +5 -5
- package/dist/commands/process-instances.d.ts.map +1 -1
- package/dist/commands/process-instances.js +8 -9
- package/dist/commands/process-instances.js.map +1 -1
- package/dist/commands/profiles.d.ts +4 -36
- package/dist/commands/profiles.d.ts.map +1 -1
- package/dist/commands/profiles.js +43 -41
- package/dist/commands/profiles.js.map +1 -1
- package/dist/commands/run.d.ts +2 -2
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +4 -4
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/search.d.ts +7 -7
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +9 -11
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session.d.ts +4 -4
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +26 -5
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/topology.d.ts +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 +2 -2
- package/dist/commands/user-tasks.d.ts.map +1 -1
- package/dist/commands/user-tasks.js +5 -5
- package/dist/commands/user-tasks.js.map +1 -1
- package/dist/commands/variables.d.ts +1 -1
- package/dist/commands/variables.d.ts.map +1 -1
- package/dist/commands/variables.js +3 -3
- package/dist/commands/variables.js.map +1 -1
- package/dist/commands/watch.d.ts +2 -2
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +25 -8
- package/dist/commands/watch.js.map +1 -1
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/client.js.map +1 -0
- package/dist/{config.d.ts → core/config.d.ts} +28 -2
- package/dist/core/config.d.ts.map +1 -0
- package/dist/{config.js → core/config.js} +61 -5
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/{runtime.js → core/runtime.js} +2 -2
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/update-check.d.ts.map +1 -0
- package/dist/core/update-check.js.map +1 -0
- package/dist/default-plugins/bpmn/README.md +12 -3
- package/dist/default-plugins/bpmn/c8ctl-plugin.js +7376 -108
- package/dist/default-plugins/bpmn/package.json +8 -1
- package/dist/default-plugins/cluster/c8ctl-plugin.js +66 -9
- package/dist/default-plugins/element-template/README.md +6 -3
- package/dist/default-plugins/element-template/c8ctl-plugin.js +10195 -229
- package/dist/default-plugins/element-template/docs/design.md +1 -1
- package/dist/default-plugins/element-template/package.json +11 -1
- package/dist/default-plugins/feel/c8ctl-plugin.js +14030 -584
- package/dist/default-plugins/feel/package.json +4 -1
- package/dist/{command-framework.d.ts → framework/command-framework.d.ts} +23 -9
- package/dist/framework/command-framework.d.ts.map +1 -0
- package/dist/{command-framework.js → framework/command-framework.js} +16 -29
- package/dist/framework/command-framework.js.map +1 -0
- package/dist/{command-registry.d.ts → framework/command-registry.d.ts} +27 -8
- package/dist/framework/command-registry.d.ts.map +1 -0
- package/dist/{command-registry.js → framework/command-registry.js} +58 -8
- package/dist/framework/command-registry.js.map +1 -0
- package/dist/{command-validation.d.ts → framework/command-validation.d.ts} +0 -14
- package/dist/framework/command-validation.d.ts.map +1 -0
- package/dist/{command-validation.js → framework/command-validation.js} +1 -34
- package/dist/framework/command-validation.js.map +1 -0
- package/dist/framework/index.d.ts +10 -0
- package/dist/framework/index.d.ts.map +1 -0
- package/dist/framework/index.js +16 -0
- package/dist/framework/index.js.map +1 -0
- package/dist/{plugin-loader.d.ts → framework/plugins/plugin-loader.d.ts} +30 -5
- package/dist/framework/plugins/plugin-loader.d.ts.map +1 -0
- package/dist/{plugin-loader.js → framework/plugins/plugin-loader.js} +26 -10
- package/dist/framework/plugins/plugin-loader.js.map +1 -0
- package/dist/framework/plugins/plugin-registry.d.ts.map +1 -0
- package/dist/{plugin-registry.js → framework/plugins/plugin-registry.js} +1 -1
- package/dist/framework/plugins/plugin-registry.js.map +1 -0
- package/dist/framework/plugins/plugin-version.d.ts.map +1 -0
- package/dist/framework/plugins/plugin-version.js.map +1 -0
- package/dist/{completion.d.ts → framework/ui/completion.d.ts} +2 -2
- package/dist/framework/ui/completion.d.ts.map +1 -0
- package/dist/{completion.js → framework/ui/completion.js} +7 -9
- package/dist/framework/ui/completion.js.map +1 -0
- package/dist/framework/ui/help.d.ts.map +1 -0
- package/dist/{help.js → framework/ui/help.js} +4 -4
- package/dist/framework/ui/help.js.map +1 -0
- package/dist/framework/ui/prompt.d.ts +132 -0
- package/dist/framework/ui/prompt.d.ts.map +1 -0
- package/dist/framework/ui/prompt.js +298 -0
- package/dist/framework/ui/prompt.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -20
- package/dist/index.js.map +1 -1
- package/dist/utils/command-local/deploy-version.d.ts +21 -0
- package/dist/utils/command-local/deploy-version.d.ts.map +1 -0
- package/dist/utils/command-local/deploy-version.js +31 -0
- package/dist/utils/command-local/deploy-version.js.map +1 -0
- package/dist/{mcp-proxy-helpers.d.ts → utils/command-local/mcp-proxy-helpers.d.ts} +1 -1
- package/dist/utils/command-local/mcp-proxy-helpers.d.ts.map +1 -0
- package/dist/{mcp-proxy-helpers.js → utils/command-local/mcp-proxy-helpers.js} +1 -1
- package/dist/utils/command-local/mcp-proxy-helpers.js.map +1 -0
- package/dist/utils/command-local/open-helpers.d.ts.map +1 -0
- package/dist/{open-helpers.js → utils/command-local/open-helpers.js} +2 -2
- package/dist/utils/command-local/open-helpers.js.map +1 -0
- package/dist/{search-helpers.d.ts → utils/command-local/search-helpers.d.ts} +1 -1
- package/dist/utils/command-local/search-helpers.d.ts.map +1 -0
- package/dist/utils/command-local/search-helpers.js.map +1 -0
- package/dist/utils/command-local/watch-constants.d.ts.map +1 -0
- package/dist/utils/command-local/watch-constants.js.map +1 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +16 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/shared/date-filter.d.ts.map +1 -0
- package/dist/utils/shared/date-filter.js.map +1 -0
- package/dist/{ignore.d.ts → utils/shared/ignore.d.ts} +19 -1
- package/dist/utils/shared/ignore.d.ts.map +1 -0
- package/dist/utils/shared/ignore.js +234 -0
- package/dist/utils/shared/ignore.js.map +1 -0
- package/dist/utils/shared/resource-extensions.d.ts.map +1 -0
- package/dist/utils/shared/resource-extensions.js.map +1 -0
- package/dist/utils/shared/validation.d.ts +23 -0
- package/dist/utils/shared/validation.d.ts.map +1 -0
- package/dist/utils/shared/validation.js +43 -0
- package/dist/utils/shared/validation.js.map +1 -0
- package/dist/vendor/bpmnlint.cjs +25907 -0
- package/package.json +12 -14
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/command-framework.d.ts.map +0 -1
- package/dist/command-framework.js.map +0 -1
- package/dist/command-registry.d.ts.map +0 -1
- package/dist/command-registry.js.map +0 -1
- package/dist/command-validation.d.ts.map +0 -1
- package/dist/command-validation.js.map +0 -1
- package/dist/commands/resource-extensions.d.ts.map +0 -1
- package/dist/commands/resource-extensions.js.map +0 -1
- package/dist/completion.d.ts.map +0 -1
- package/dist/completion.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/date-filter.d.ts.map +0 -1
- package/dist/date-filter.js.map +0 -1
- package/dist/default-plugins/bpmn/c8ctl-plugin.js.map +0 -1
- package/dist/default-plugins/bpmn/lint.js +0 -320
- package/dist/default-plugins/bpmn/lint.js.map +0 -1
- package/dist/default-plugins/element-template/c8ctl-plugin.js.map +0 -1
- package/dist/default-plugins/element-template/commands/apply.js +0 -336
- package/dist/default-plugins/element-template/commands/apply.js.map +0 -1
- package/dist/default-plugins/element-template/commands/get-properties.js +0 -344
- package/dist/default-plugins/element-template/commands/get-properties.js.map +0 -1
- package/dist/default-plugins/element-template/commands/get.js +0 -107
- package/dist/default-plugins/element-template/commands/get.js.map +0 -1
- package/dist/default-plugins/element-template/commands/info.js +0 -189
- package/dist/default-plugins/element-template/commands/info.js.map +0 -1
- package/dist/default-plugins/element-template/commands/search.js +0 -102
- package/dist/default-plugins/element-template/commands/search.js.map +0 -1
- package/dist/default-plugins/element-template/commands/sync.js +0 -36
- package/dist/default-plugins/element-template/commands/sync.js.map +0 -1
- package/dist/default-plugins/element-template/helpers.js +0 -429
- package/dist/default-plugins/element-template/helpers.js.map +0 -1
- package/dist/default-plugins/element-template/marketplace.js +0 -586
- package/dist/default-plugins/element-template/marketplace.js.map +0 -1
- package/dist/default-plugins/element-template/template-ref.js +0 -232
- package/dist/default-plugins/element-template/template-ref.js.map +0 -1
- package/dist/default-plugins/feel/c8ctl-plugin.js.map +0 -1
- package/dist/default-plugins/hello-world/README.md +0 -161
- package/dist/default-plugins/hello-world/c8ctl-plugin.js +0 -69
- package/dist/default-plugins/hello-world/package.json +0 -8
- package/dist/deployments.d.ts +0 -57
- package/dist/deployments.d.ts.map +0 -1
- package/dist/deployments.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/help.d.ts.map +0 -1
- package/dist/help.js.map +0 -1
- package/dist/ignore.d.ts.map +0 -1
- package/dist/ignore.js +0 -101
- package/dist/ignore.js.map +0 -1
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js.map +0 -1
- package/dist/mcp-proxy-helpers.d.ts.map +0 -1
- package/dist/mcp-proxy-helpers.js.map +0 -1
- package/dist/open-helpers.d.ts.map +0 -1
- package/dist/open-helpers.js.map +0 -1
- package/dist/plugin-loader.d.ts.map +0 -1
- package/dist/plugin-loader.js.map +0 -1
- package/dist/plugin-registry.d.ts.map +0 -1
- package/dist/plugin-registry.js.map +0 -1
- package/dist/plugin-version.d.ts.map +0 -1
- package/dist/plugin-version.js.map +0 -1
- package/dist/runtime.d.ts.map +0 -1
- package/dist/runtime.js.map +0 -1
- package/dist/search-helpers.d.ts.map +0 -1
- package/dist/search-helpers.js.map +0 -1
- package/dist/update-check.d.ts.map +0 -1
- package/dist/update-check.js.map +0 -1
- package/dist/watch-constants.d.ts.map +0 -1
- package/dist/watch-constants.js.map +0 -1
- /package/dist/{client.d.ts → core/client.d.ts} +0 -0
- /package/dist/{client.js → core/client.js} +0 -0
- /package/dist/{errors.d.ts → core/errors.d.ts} +0 -0
- /package/dist/{errors.js → core/errors.js} +0 -0
- /package/dist/{logger.d.ts → core/logger.d.ts} +0 -0
- /package/dist/{logger.js → core/logger.js} +0 -0
- /package/dist/{runtime.d.ts → core/runtime.d.ts} +0 -0
- /package/dist/{update-check.d.ts → core/update-check.d.ts} +0 -0
- /package/dist/{update-check.js → core/update-check.js} +0 -0
- /package/dist/{plugin-registry.d.ts → framework/plugins/plugin-registry.d.ts} +0 -0
- /package/dist/{plugin-version.d.ts → framework/plugins/plugin-version.d.ts} +0 -0
- /package/dist/{plugin-version.js → framework/plugins/plugin-version.js} +0 -0
- /package/dist/{help.d.ts → framework/ui/help.d.ts} +0 -0
- /package/dist/{open-helpers.d.ts → utils/command-local/open-helpers.d.ts} +0 -0
- /package/dist/{search-helpers.js → utils/command-local/search-helpers.js} +0 -0
- /package/dist/{watch-constants.d.ts → utils/command-local/watch-constants.d.ts} +0 -0
- /package/dist/{watch-constants.js → utils/command-local/watch-constants.js} +0 -0
- /package/dist/{date-filter.d.ts → utils/shared/date-filter.d.ts} +0 -0
- /package/dist/{date-filter.js → utils/shared/date-filter.js} +0 -0
- /package/dist/{commands → utils/shared}/resource-extensions.d.ts +0 -0
- /package/dist/{commands → utils/shared}/resource-extensions.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-dispatch.js","sourceRoot":"","sources":["../src/command-dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"command-dispatch.js","sourceRoot":"","sources":["../src/command-dispatch.ts"],"names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CAAC;IAC9B,CAAC,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC,CAAC"}
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
* `tests/unit/no-process-exit-in-handlers.test.ts` forbids `process.exit`
|
|
31
31
|
* here.
|
|
32
32
|
*/
|
|
33
|
-
export declare const completionCommand: import("../command-framework.ts").CommandHandler<"completion", "install">;
|
|
33
|
+
export declare const completionCommand: import("../framework/command-framework.ts").CommandHandler<"completion", "install">;
|
|
34
34
|
//# sourceMappingURL=completion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,iBAAiB,qFA6B7B,CAAC"}
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
* This file holds only the `defineCommand` wrapper that dispatches the
|
|
8
8
|
* verb at runtime.
|
|
9
9
|
*/
|
|
10
|
-
import { defineCommand } from "../
|
|
11
|
-
import { installCompletion, showCompletion } from "../completion.js";
|
|
10
|
+
import { defineCommand, installCompletion, showCompletion, } from "../framework/index.js";
|
|
12
11
|
/**
|
|
13
12
|
* `completion` verb dispatcher.
|
|
14
13
|
*
|
|
@@ -36,7 +35,7 @@ export const completionCommand = defineCommand("completion", "install", async (c
|
|
|
36
35
|
const resource = ctx.resource;
|
|
37
36
|
if (resource === "install") {
|
|
38
37
|
const shellFlag = flags.shell;
|
|
39
|
-
installCompletion(typeof shellFlag === "string" ? shellFlag : undefined);
|
|
38
|
+
installCompletion(typeof shellFlag === "string" ? shellFlag : undefined, ctx.isDryRun);
|
|
40
39
|
return undefined;
|
|
41
40
|
}
|
|
42
41
|
// Non-install resource → render the requested shell's completion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACN,aAAa,EACb,iBAAiB,EACjB,cAAc,GACd,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC7C,YAAY,EACZ,SAAS,EACT,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;IACpB,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAC9B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC;QAC9B,iBAAiB,CAChB,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACrD,GAAG,CAAC,QAAQ,CACZ,CAAC;QACF,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,iEAAiE;IACjE,kEAAkE;IAClE,qEAAqE;IACrE,mEAAmE;IACnE,oDAAoD;IACpD,EAAE;IACF,sEAAsE;IACtE,oEAAoE;IACpE,oEAAoE;IACpE,qEAAqE;IACrE,8DAA8D;IAC9D,qEAAqE;IACrE,gEAAgE;IAChE,cAAc,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC;IACtC,OAAO,SAAS,CAAC;AAClB,CAAC,CACD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deploy command handler.
|
|
3
|
+
*
|
|
4
|
+
* Side-effectful: collects files, validates, deploys, and renders its own
|
|
5
|
+
* table output.
|
|
6
|
+
*
|
|
7
|
+
* The body lives directly in the handler (per #288): argument-shape
|
|
8
|
+
* resolution, dry-run preview via the context's `ctx.dryRun()` helper,
|
|
9
|
+
* and the call into the shared `deployResources` helper that watch also
|
|
10
|
+
* uses for change-triggered re-deploys.
|
|
11
|
+
*/
|
|
12
|
+
export declare const deployCommand: import("../framework/command-framework.ts").CommandHandler<"deploy", "">;
|
|
13
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA2PH,eAAO,MAAM,aAAa,0EAoLxB,CAAC"}
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deploy command handler.
|
|
3
|
+
*
|
|
4
|
+
* Side-effectful: collects files, validates, deploys, and renders its own
|
|
5
|
+
* table output.
|
|
6
|
+
*
|
|
7
|
+
* The body lives directly in the handler (per #288): argument-shape
|
|
8
|
+
* resolution, dry-run preview via the context's `ctx.dryRun()` helper,
|
|
9
|
+
* and the call into the shared `deployResources` helper that watch also
|
|
10
|
+
* uses for change-triggered re-deploys.
|
|
11
|
+
*/
|
|
12
|
+
import { appendFileSync } from "node:fs";
|
|
13
|
+
import { basename, isAbsolute, join, relative, sep } from "node:path";
|
|
14
|
+
import { c8ctl, createClient, DEFAULT_PROFILE, getAllProfiles, getProfileOrModeler, readSkipDeployConfirm, saveSkipDeployConfirm, } from "../core/index.js";
|
|
15
|
+
import { defineCommand, isInteractive, select } from "../framework/index.js";
|
|
16
|
+
import { ALL_DEPLOYABLE_EXTENSIONS, DEPLOYABLE_EXTENSIONS, resolveIgnoreBaseDir, } from "../utils/index.js";
|
|
17
|
+
import { checkServerSupportsExtensions, collectResourcesForPaths, deployResources, logMessage, logSkippedExtensions, } from "./helpers/deploy-helpers.js";
|
|
18
|
+
// ─── defineCommand ───────────────────────────────────────────────────────────
|
|
19
|
+
/**
|
|
20
|
+
* Resolve the effective extension allow-list from the deploy flags.
|
|
21
|
+
*
|
|
22
|
+
* Priority: --force (no filtering) > --all-extensions > --extensions > default
|
|
23
|
+
*
|
|
24
|
+
* When `--extensions` is provided, the custom list is *merged* with the
|
|
25
|
+
* default (.bpmn, .dmn, .form) so users add to the baseline rather than
|
|
26
|
+
* replacing it.
|
|
27
|
+
*/
|
|
28
|
+
function resolveExtensionList(flags) {
|
|
29
|
+
// When --force is set the allow-list is irrelevant — downstream code
|
|
30
|
+
// skips filtering entirely. Return the default so callers always get a
|
|
31
|
+
// valid list, but the value is never consulted.
|
|
32
|
+
if (flags.force)
|
|
33
|
+
return DEPLOYABLE_EXTENSIONS;
|
|
34
|
+
// --all-extensions: use the full server-supported list
|
|
35
|
+
if (flags["all-extensions"])
|
|
36
|
+
return ALL_DEPLOYABLE_EXTENSIONS;
|
|
37
|
+
// --extensions: merge custom extensions with the default set
|
|
38
|
+
if (flags.extensions && String(flags.extensions).trim()) {
|
|
39
|
+
const custom = String(flags.extensions)
|
|
40
|
+
.split(",")
|
|
41
|
+
.map((e) => e.trim())
|
|
42
|
+
.filter(Boolean)
|
|
43
|
+
.map((e) => (e.startsWith(".") ? e : `.${e}`));
|
|
44
|
+
const merged = [...new Set([...DEPLOYABLE_EXTENSIONS, ...custom])];
|
|
45
|
+
return merged;
|
|
46
|
+
}
|
|
47
|
+
return DEPLOYABLE_EXTENSIONS;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Present an interactive menu when files are skipped during deployment
|
|
51
|
+
* due to extension filtering. Returns file paths to include in the
|
|
52
|
+
* deployment (empty if the user chose to ignore).
|
|
53
|
+
*/
|
|
54
|
+
async function handleSkippedFiles(skippedFiles, skippedExtensions, basePath) {
|
|
55
|
+
if (skippedFiles.length === 0)
|
|
56
|
+
return [];
|
|
57
|
+
const exts = [...skippedExtensions].sort().join(", ");
|
|
58
|
+
const fileList = skippedFiles
|
|
59
|
+
.map((f) => relative(basePath, f) || basename(f))
|
|
60
|
+
.sort();
|
|
61
|
+
logMessage(`\nFound ${skippedFiles.length} file(s) with extensions not in the allow-list (${exts}):`);
|
|
62
|
+
for (const f of fileList) {
|
|
63
|
+
logMessage(` • ${f}`);
|
|
64
|
+
}
|
|
65
|
+
const result = await select({
|
|
66
|
+
message: "What do you want to do about these files?",
|
|
67
|
+
options: [
|
|
68
|
+
{
|
|
69
|
+
label: "Deploy them",
|
|
70
|
+
description: "include in this deployment only",
|
|
71
|
+
value: "deploy-once",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: "Ignore them",
|
|
75
|
+
description: "skip for now",
|
|
76
|
+
value: "ignore",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: "Deploy them always",
|
|
80
|
+
description: "remember to deploy these files in .c8ignore",
|
|
81
|
+
value: "deploy-always",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: "Ignore them always",
|
|
85
|
+
description: "remember to skip these files in .c8ignore",
|
|
86
|
+
value: "ignore-always",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: "Show me how to configure this",
|
|
90
|
+
description: "print instructions and exit",
|
|
91
|
+
value: "instructions",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
});
|
|
95
|
+
if (result.cancelled) {
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
const action = result.value;
|
|
99
|
+
if (action === "ignore") {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
if (action === "deploy-once") {
|
|
103
|
+
return skippedFiles;
|
|
104
|
+
}
|
|
105
|
+
if (action === "deploy-always") {
|
|
106
|
+
// Guard against writing to a root-level .c8ignore when multiple
|
|
107
|
+
// unrelated deploy paths resolve the base to a filesystem root.
|
|
108
|
+
if (basePath === "/" || /^[A-Za-z]:\\?$/.test(basePath)) {
|
|
109
|
+
logMessage("\nCannot auto-update .c8ignore at the filesystem root." +
|
|
110
|
+
" Run deploy from a single project directory or edit .c8ignore manually.");
|
|
111
|
+
return skippedFiles;
|
|
112
|
+
}
|
|
113
|
+
const c8ignorePath = join(basePath, ".c8ignore");
|
|
114
|
+
// Prefix with "/" to anchor patterns to the .c8ignore base dir.
|
|
115
|
+
// Without anchoring, a root-level file like "notes.md" would
|
|
116
|
+
// match at any depth (e.g. subdir/notes.md).
|
|
117
|
+
// Skip files that are not under basePath — relative() would yield
|
|
118
|
+
// ".." segments or absolute paths that produce invalid patterns.
|
|
119
|
+
const patterns = [];
|
|
120
|
+
for (const f of skippedFiles) {
|
|
121
|
+
const rel = relative(basePath, f);
|
|
122
|
+
if (rel.startsWith("..") || isAbsolute(rel))
|
|
123
|
+
continue;
|
|
124
|
+
patterns.push(`!/${rel.split(sep).join("/")}`);
|
|
125
|
+
}
|
|
126
|
+
if (patterns.length === 0) {
|
|
127
|
+
logMessage("\nSkipped files are outside the project directory." +
|
|
128
|
+
" Edit .c8ignore manually to add negation patterns.");
|
|
129
|
+
return skippedFiles;
|
|
130
|
+
}
|
|
131
|
+
const block = `\n# Auto-added by c8ctl — always deploy these files\n${patterns.join("\n")}\n`;
|
|
132
|
+
appendFileSync(c8ignorePath, block);
|
|
133
|
+
logMessage(`\nAppended to ${relative(process.cwd(), c8ignorePath) || c8ignorePath}:`);
|
|
134
|
+
for (const p of patterns) {
|
|
135
|
+
logMessage(` ${p}`);
|
|
136
|
+
}
|
|
137
|
+
logMessage("\nFuture deploys will include these files automatically.\n");
|
|
138
|
+
// Include the skipped files in this deploy as well — the label
|
|
139
|
+
// says "Deploy them always", which implies "starting now".
|
|
140
|
+
return skippedFiles;
|
|
141
|
+
}
|
|
142
|
+
if (action === "ignore-always") {
|
|
143
|
+
// Guard against writing to a root-level .c8ignore when multiple
|
|
144
|
+
// unrelated deploy paths resolve the base to a filesystem root.
|
|
145
|
+
if (basePath === "/" || /^[A-Za-z]:\\?$/.test(basePath)) {
|
|
146
|
+
logMessage("\nCannot auto-update .c8ignore at the filesystem root." +
|
|
147
|
+
" Run deploy from a single project directory or edit .c8ignore manually.");
|
|
148
|
+
return [];
|
|
149
|
+
}
|
|
150
|
+
const c8ignorePath = join(basePath, ".c8ignore");
|
|
151
|
+
// Filter out the "<no extension>" sentinel — it has no valid glob representation
|
|
152
|
+
const realExtensions = [...skippedExtensions]
|
|
153
|
+
.filter((ext) => ext !== "<no extension>")
|
|
154
|
+
.sort();
|
|
155
|
+
if (realExtensions.length === 0) {
|
|
156
|
+
logMessage("\nAll skipped files have no extension — cannot auto-ignore by extension.");
|
|
157
|
+
logMessage("Add specific file patterns to .c8ignore manually.\n");
|
|
158
|
+
return [];
|
|
159
|
+
}
|
|
160
|
+
const patterns = realExtensions.map((ext) => `*${ext}`);
|
|
161
|
+
const block = `\n# Auto-added by c8ctl — ignore ${realExtensions.join(", ")} files\n${patterns.join("\n")}\n`;
|
|
162
|
+
appendFileSync(c8ignorePath, block);
|
|
163
|
+
logMessage(`\nAppended to ${relative(process.cwd(), c8ignorePath) || c8ignorePath}:`);
|
|
164
|
+
for (const p of patterns) {
|
|
165
|
+
logMessage(` ${p}`);
|
|
166
|
+
}
|
|
167
|
+
logMessage("");
|
|
168
|
+
return [];
|
|
169
|
+
}
|
|
170
|
+
// action === "instructions"
|
|
171
|
+
logMessage(`
|
|
172
|
+
Extension filtering controls which files are included when scanning directories.
|
|
173
|
+
|
|
174
|
+
Default allow-list: .bpmn, .dmn, .form
|
|
175
|
+
|
|
176
|
+
Flags:
|
|
177
|
+
--extensions=<ext> Add specific extensions (merged with defaults)
|
|
178
|
+
Example: c8 deploy --extensions=.md,.txt
|
|
179
|
+
|
|
180
|
+
--all-extensions Include all server-supported types
|
|
181
|
+
(.md, .txt, .xml, .rpa, .json, .config, .yml, .yaml)
|
|
182
|
+
|
|
183
|
+
--force Skip extension filtering entirely
|
|
184
|
+
|
|
185
|
+
Persistence:
|
|
186
|
+
.c8ignore Add *<ext> patterns to exclude files permanently
|
|
187
|
+
Example: echo "*.md" >> .c8ignore
|
|
188
|
+
|
|
189
|
+
Explicit files bypass the allow-list:
|
|
190
|
+
c8 deploy my-file.md (deploys regardless of extension)
|
|
191
|
+
`);
|
|
192
|
+
throw new Error("Exiting. Re-run deploy after configuring extension filtering.");
|
|
193
|
+
}
|
|
194
|
+
export const deployCommand = defineCommand("deploy", "", async (ctx, flags) => {
|
|
195
|
+
// Argument shape: `c8 deploy [path...]`. With no positional, default
|
|
196
|
+
// to cwd. Pinned by tests/unit/deploy-behaviour.test.ts.
|
|
197
|
+
const paths = ctx.resource
|
|
198
|
+
? [ctx.resource, ...ctx.positionals]
|
|
199
|
+
: ctx.positionals.length > 0
|
|
200
|
+
? ctx.positionals
|
|
201
|
+
: ["."];
|
|
202
|
+
// Resolve the active extension allow-list from flags.
|
|
203
|
+
const extensionList = resolveExtensionList(flags);
|
|
204
|
+
// ── Deploy target confirmation (interactive profile selector) ─────
|
|
205
|
+
let deployProfile = ctx.profile;
|
|
206
|
+
const ALWAYS_ACTIVE = Symbol("alwaysActive");
|
|
207
|
+
if (!ctx.yes && !ctx.profile) {
|
|
208
|
+
const profiles = getAllProfiles();
|
|
209
|
+
if (profiles.length > 1) {
|
|
210
|
+
const { activeProfile } = c8ctl;
|
|
211
|
+
const activeConfig = activeProfile != null ? getProfileOrModeler(activeProfile) : undefined;
|
|
212
|
+
const envIsEffectiveTarget = !!process.env.CAMUNDA_BASE_URL && activeConfig == null;
|
|
213
|
+
if (!envIsEffectiveTarget) {
|
|
214
|
+
const skipDeployConfirm = readSkipDeployConfirm();
|
|
215
|
+
if (!skipDeployConfirm) {
|
|
216
|
+
const effectiveName = activeProfile != null && activeConfig != null
|
|
217
|
+
? activeProfile
|
|
218
|
+
: DEFAULT_PROFILE;
|
|
219
|
+
const defaultIndex = Math.max(0, profiles.findIndex((p) => p.name === effectiveName));
|
|
220
|
+
const profileOptions = profiles.map((p) => ({
|
|
221
|
+
label: p.name,
|
|
222
|
+
description: p.baseUrl,
|
|
223
|
+
value: p.name,
|
|
224
|
+
}));
|
|
225
|
+
profileOptions.push({
|
|
226
|
+
label: `Always use "${effectiveName}" (don't ask again)`,
|
|
227
|
+
description: "Persists to session — reset with: c8 use profile",
|
|
228
|
+
value: ALWAYS_ACTIVE,
|
|
229
|
+
});
|
|
230
|
+
const result = await select({
|
|
231
|
+
message: "Which profile do you want to deploy to?",
|
|
232
|
+
options: profileOptions,
|
|
233
|
+
initialIndex: defaultIndex,
|
|
234
|
+
nonInteractiveHint: "Hint: run interactively to choose, or use --profile=<name> to specify.",
|
|
235
|
+
});
|
|
236
|
+
if (result.cancelled) {
|
|
237
|
+
throw new Error("Deploy cancelled.");
|
|
238
|
+
}
|
|
239
|
+
else if (!result.interactive) {
|
|
240
|
+
throw new Error(`Multiple profiles configured but no profile specified.\n` +
|
|
241
|
+
`Use --profile=<name> or --yes to skip the prompt.\n` +
|
|
242
|
+
`Available profiles: ${profiles.map((p) => p.name).join(", ")}`);
|
|
243
|
+
}
|
|
244
|
+
else if (result.value === ALWAYS_ACTIVE) {
|
|
245
|
+
saveSkipDeployConfirm(true);
|
|
246
|
+
logMessage(`Future deploys will use the active profile without prompting. Reset with: c8 use profile <name>`);
|
|
247
|
+
}
|
|
248
|
+
else if (typeof result.value === "string" &&
|
|
249
|
+
result.value !== effectiveName) {
|
|
250
|
+
deployProfile = result.value;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
// Dry-run preview. Collect resources first so the preview body
|
|
257
|
+
// reflects what would actually be sent — and so the empty-paths /
|
|
258
|
+
// no-files guards still surface as thrown errors before we emit.
|
|
259
|
+
// Uses `ctx.isDryRun` and `ctx.tenantId` from the framework rather
|
|
260
|
+
// than reaching into the global runtime/config layer.
|
|
261
|
+
//
|
|
262
|
+
// Note: dry-run runs before the server version check, so on clusters
|
|
263
|
+
// <8.10 the preview may include extended-extension resources or
|
|
264
|
+
// deploy-always negation rules that the real deploy path would
|
|
265
|
+
// exclude. This is acceptable — dry-run is a best-effort preview
|
|
266
|
+
// and avoids an unnecessary HTTP call when only previewing.
|
|
267
|
+
if (ctx.isDryRun) {
|
|
268
|
+
const { resources: previewResources, skippedExtensions } = collectResourcesForPaths(paths, flags.force, extensionList);
|
|
269
|
+
logSkippedExtensions(skippedExtensions);
|
|
270
|
+
const dr = ctx.dryRun({
|
|
271
|
+
command: "deploy",
|
|
272
|
+
method: "POST",
|
|
273
|
+
endpoint: "/deployments",
|
|
274
|
+
profile: deployProfile,
|
|
275
|
+
body: {
|
|
276
|
+
tenantId: ctx.tenantId,
|
|
277
|
+
resources: previewResources.map((r) => ({ name: r.name })),
|
|
278
|
+
},
|
|
279
|
+
});
|
|
280
|
+
if (dr)
|
|
281
|
+
return dr;
|
|
282
|
+
}
|
|
283
|
+
// ── Pre-flight version check ──
|
|
284
|
+
// Skip the topology call when --force is set — extension filtering
|
|
285
|
+
// is bypassed entirely, so the result is unused.
|
|
286
|
+
const serverSupportsExtensions = flags.force
|
|
287
|
+
? true
|
|
288
|
+
: await checkServerSupportsExtensions(createClient(deployProfile));
|
|
289
|
+
// ── Collect resources and handle skipped files interactively ──
|
|
290
|
+
// Fall back to the default allow-list on servers that don't support
|
|
291
|
+
// extended extensions (<8.10). Note: explicit file paths bypass
|
|
292
|
+
// extension filtering by design, so this only gates directory scans.
|
|
293
|
+
const userRequestedExtensions = !!flags["all-extensions"] ||
|
|
294
|
+
!!(flags.extensions && String(flags.extensions).trim());
|
|
295
|
+
const effectiveExtensions = serverSupportsExtensions
|
|
296
|
+
? extensionList
|
|
297
|
+
: DEPLOYABLE_EXTENSIONS;
|
|
298
|
+
if (!serverSupportsExtensions && userRequestedExtensions) {
|
|
299
|
+
logMessage(`Warning: server does not support extended extensions (requires 8.10+). ` +
|
|
300
|
+
`Falling back to default extensions (${DEPLOYABLE_EXTENSIONS.join(", ")}). ` +
|
|
301
|
+
`Use --force to deploy all files regardless.`);
|
|
302
|
+
}
|
|
303
|
+
const { skippedFiles, skippedExtensions, effectivePaths: resolvedPaths, } = collectResourcesForPaths(paths, flags.force, effectiveExtensions, serverSupportsExtensions);
|
|
304
|
+
// Use the effective (possibly PA-expanded) paths for .c8ignore and
|
|
305
|
+
// display-path resolution so patterns align with the scan root.
|
|
306
|
+
const basePath = resolveIgnoreBaseDir(resolvedPaths);
|
|
307
|
+
let extraPaths = [];
|
|
308
|
+
if (skippedFiles.length > 0 &&
|
|
309
|
+
!ctx.yes &&
|
|
310
|
+
serverSupportsExtensions &&
|
|
311
|
+
isInteractive()) {
|
|
312
|
+
extraPaths = await handleSkippedFiles(skippedFiles, skippedExtensions, basePath);
|
|
313
|
+
}
|
|
314
|
+
else if (skippedFiles.length > 0) {
|
|
315
|
+
logSkippedExtensions(skippedExtensions);
|
|
316
|
+
}
|
|
317
|
+
await deployResources([...paths, ...extraPaths], {
|
|
318
|
+
profile: deployProfile,
|
|
319
|
+
force: flags.force,
|
|
320
|
+
extensionList: effectiveExtensions,
|
|
321
|
+
suppressSkippedLog: skippedFiles.length > 0,
|
|
322
|
+
loadDeployAlways: serverSupportsExtensions,
|
|
323
|
+
basePath,
|
|
324
|
+
verbose: ctx.verbose,
|
|
325
|
+
});
|
|
326
|
+
return { kind: "none" };
|
|
327
|
+
});
|
|
328
|
+
//# sourceMappingURL=deploy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EACN,KAAK,EACL,YAAY,EACZ,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,uBAAuB,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B,aAAa,EAAE,EACd,CAAC;QACF,UAAU,GAAG,MAAM,kBAAkB,CACpC,YAAY,EACZ,iBAAiB,EACjB,QAAQ,CACR,CAAC;IACH,CAAC;SAAM,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,eAAe,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,UAAU,CAAC,EAAE;QAChD,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,aAAa,EAAE,mBAAmB;QAClC,kBAAkB,EAAE,YAAY,CAAC,MAAM,GAAG,CAAC;QAC3C,gBAAgB,EAAE,wBAAwB;QAC1C,QAAQ;QACR,OAAO,EAAE,GAAG,CAAC,OAAO;KACpB,CAAC,CAAC;IACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACzB,CAAC,CAAC,CAAC"}
|
package/dist/commands/forms.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Get form by key, optionally scoped to user task or process definition
|
|
6
6
|
*/
|
|
7
|
-
export declare const getFormCommand: import("../command-framework.ts").CommandHandler<"get", "form">;
|
|
7
|
+
export declare const getFormCommand: import("../framework/command-framework.ts").CommandHandler<"get", "form">;
|
|
8
8
|
//# sourceMappingURL=forms.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../src/commands/forms.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuBH;;GAEG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../src/commands/forms.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuBH;;GAEG;AACH,eAAO,MAAM,cAAc,2EA0B1B,CAAC"}
|
package/dist/commands/forms.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Form commands
|
|
3
3
|
*/
|
|
4
4
|
import { ProcessDefinitionKey, UserTaskKey, } from "@camunda8/orchestration-cluster-api";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { isRecord } from "../core/index.js";
|
|
6
|
+
import { defineCommand, } from "../framework/index.js";
|
|
7
7
|
/** Extract HTTP status code from an unknown error (SDK errors expose statusCode or status). */
|
|
8
8
|
function getErrorStatus(error) {
|
|
9
9
|
if (isRecord(error)) {
|
|
@@ -27,14 +27,14 @@ export const getFormCommand = defineCommand("get", "form", async (ctx, flags, ar
|
|
|
27
27
|
throw new Error("Cannot specify both --userTask|--ut and --processDefinition|--pd. Use one or the other, or omit both to search both types.");
|
|
28
28
|
}
|
|
29
29
|
if (isUserTask) {
|
|
30
|
-
return handleUserTaskForm(key, profile, client);
|
|
30
|
+
return handleUserTaskForm(key, profile, client, ctx.dryRun);
|
|
31
31
|
}
|
|
32
32
|
if (isProcessDefinition) {
|
|
33
|
-
return handleStartForm(key, profile, client);
|
|
33
|
+
return handleStartForm(key, profile, client, ctx.dryRun);
|
|
34
34
|
}
|
|
35
|
-
return handleFormBoth(key, profile, client);
|
|
35
|
+
return handleFormBoth(key, profile, client, ctx.dryRun);
|
|
36
36
|
});
|
|
37
|
-
async function handleUserTaskForm(userTaskKey, profile, client) {
|
|
37
|
+
async function handleUserTaskForm(userTaskKey, profile, client, dryRun) {
|
|
38
38
|
const dr = dryRun({
|
|
39
39
|
command: "get form --userTask",
|
|
40
40
|
method: "GET",
|
|
@@ -63,7 +63,7 @@ async function handleUserTaskForm(userTaskKey, profile, client) {
|
|
|
63
63
|
throw error;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
async function handleStartForm(processDefinitionKey, profile, client) {
|
|
66
|
+
async function handleStartForm(processDefinitionKey, profile, client, dryRun) {
|
|
67
67
|
const dr = dryRun({
|
|
68
68
|
command: "get form --processDefinition",
|
|
69
69
|
method: "GET",
|
|
@@ -94,7 +94,7 @@ async function handleStartForm(processDefinitionKey, profile, client) {
|
|
|
94
94
|
throw error;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
async function handleFormBoth(key, profile, client) {
|
|
97
|
+
async function handleFormBoth(key, profile, client, dryRun) {
|
|
98
98
|
const dr = dryRun({
|
|
99
99
|
command: "get form",
|
|
100
100
|
method: "GET",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../src/commands/forms.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEN,oBAAoB,EACpB,WAAW,GACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,
|
|
1
|
+
{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../src/commands/forms.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEN,oBAAoB,EACpB,WAAW,GACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAGN,aAAa,GACb,MAAM,uBAAuB,CAAC;AAE/B,+FAA+F;AAC/F,SAAS,cAAc,CAAC,KAAc;IACrC,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC,UAAU,CAAC;QAClE,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC,MAAM,CAAC;IAC3D,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAC1C,KAAK,EACL,MAAM,EACN,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAC1B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;IAChC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IAEr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1E,OAAO;YACN,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;YACrB,OAAO,EAAE,kBAAkB,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,KAAK,GAAG,IAAI;SAClE,CAAC;IACH,CAAC;IAED,OAAO;QACN,IAAI,EAAE,KAAK;QACX,IAAI,EAAE;YACL,WAAW,EAAE,GAAG;YAChB,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,EAAE,IAAI;YAC3D,oBAAoB,EAAE,GAAG;YACzB,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,oBAAoB,CAAC;gBACtE,EAAE,IAAI;SACP;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared deployment helpers — resource collection, deployment execution,
|
|
3
|
+
* and process-application detection.
|
|
4
|
+
*
|
|
5
|
+
* Consumed by:
|
|
6
|
+
* - `src/commands/deploy.ts` (the `deployCommand` handler)
|
|
7
|
+
* - `src/commands/watch.ts` (change-triggered re-deploys)
|
|
8
|
+
*/
|
|
9
|
+
import type { CamundaClient } from "@camunda8/orchestration-cluster-api";
|
|
10
|
+
/**
|
|
11
|
+
* Helper to output messages that respect JSON mode for Unix pipe compatibility
|
|
12
|
+
*/
|
|
13
|
+
export declare function logMessage(message: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Format and log a hint about skipped file extensions.
|
|
16
|
+
* Shared between the dry-run preview and the execute path so the
|
|
17
|
+
* message stays consistent. See https://github.com/camunda/c8ctl/issues/350
|
|
18
|
+
*/
|
|
19
|
+
export declare function logSkippedExtensions(skippedExtensions: Set<string>): void;
|
|
20
|
+
/**
|
|
21
|
+
* Check whether the connected Camunda server supports extended file extensions.
|
|
22
|
+
* Returns `true` for 8.10+, `false` for older versions.
|
|
23
|
+
* Falls back to `false` on any error (network, auth, unparseable version)
|
|
24
|
+
* so unsupported resource types are not deployed to older clusters.
|
|
25
|
+
*/
|
|
26
|
+
export declare function checkServerSupportsExtensions(client: CamundaClient): Promise<boolean>;
|
|
27
|
+
interface ResourceFile {
|
|
28
|
+
path: string;
|
|
29
|
+
name: string;
|
|
30
|
+
content: Buffer;
|
|
31
|
+
isBuildingBlock: boolean;
|
|
32
|
+
isProcessApplication: boolean;
|
|
33
|
+
groupPath?: string;
|
|
34
|
+
relativePath?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Walk up from `startDir` looking for a `.process-application` marker
|
|
38
|
+
* file. Returns the directory that contains the marker, or `null` if
|
|
39
|
+
* none is found before reaching the filesystem root.
|
|
40
|
+
*
|
|
41
|
+
* `startDir` may be a file path — the walk starts from its parent
|
|
42
|
+
* directory in that case (the initial `hasProcessApplicationFile` call
|
|
43
|
+
* harmlessly returns false for non-directories).
|
|
44
|
+
*
|
|
45
|
+
* Unlike `findGroupRoot()` (which tags individual files for display),
|
|
46
|
+
* this function determines the *deploy scope*: when a PA root is found,
|
|
47
|
+
* `collectResourcesForPaths` expands the input to the PA root so that
|
|
48
|
+
* the entire application is deployed.
|
|
49
|
+
*/
|
|
50
|
+
export declare function findProcessApplicationRoot(startDir: string): string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Result of collecting deployable resources, including any extensions
|
|
53
|
+
* that were skipped during directory walks (for user feedback).
|
|
54
|
+
*/
|
|
55
|
+
interface CollectResult {
|
|
56
|
+
resources: ResourceFile[];
|
|
57
|
+
skippedExtensions: Set<string>;
|
|
58
|
+
skippedFiles: string[];
|
|
59
|
+
/** Resolved base paths used for resource collection and display.
|
|
60
|
+
* When PA detection fires, these are expanded to the PA root(s)
|
|
61
|
+
* rather than the user-supplied input paths. Used downstream for
|
|
62
|
+
* `ignoreBaseDir` resolution and `basePaths` in `deployResources`. */
|
|
63
|
+
effectivePaths: string[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Collect deployable resources from the given paths, applying `.c8ignore`
|
|
67
|
+
* rules. Throws on the two pre-API guard failures so callers (deploy
|
|
68
|
+
* handler, watch, dry-run preview) all surface the same errors with the
|
|
69
|
+
* same wording.
|
|
70
|
+
*
|
|
71
|
+
* Shared between `deployCommand` (used for both the dry-run preview and
|
|
72
|
+
* the execute path via `deployResources`) and `deployResources` itself.
|
|
73
|
+
*
|
|
74
|
+
* @param extensionList - Active allow-list for directory discovery.
|
|
75
|
+
* Defaults to `DEPLOYABLE_EXTENSIONS` (.bpmn, .dmn, .form).
|
|
76
|
+
*/
|
|
77
|
+
export declare function collectResourcesForPaths(paths: string[], force?: boolean, extensionList?: readonly string[],
|
|
78
|
+
/** When false, skip loading deploy-always negation rules from .c8ignore.
|
|
79
|
+
* Used to suppress them on servers <8.10 that don't support extended extensions. */
|
|
80
|
+
loadDeployAlways?: boolean): CollectResult;
|
|
81
|
+
/**
|
|
82
|
+
* Internal helper: deploy the given paths to the cluster and render the
|
|
83
|
+
* result table. Used by `deployCommand` (the standard CLI entry point)
|
|
84
|
+
* and by `watchCommand` (for change-triggered re-deploys).
|
|
85
|
+
*
|
|
86
|
+
* Does NOT consult dry-run state — dry-run handling lives in the
|
|
87
|
+
* `deployCommand` handler so the context's `ctx.dryRun()` helper owns
|
|
88
|
+
* preview emission. Watch never triggers a dry-run, so this split also
|
|
89
|
+
* removes a footgun where a stale dry-run flag could suppress a watch
|
|
90
|
+
* deploy.
|
|
91
|
+
*/
|
|
92
|
+
export declare function deployResources(paths: string[], options: {
|
|
93
|
+
profile?: string;
|
|
94
|
+
continueOnError?: boolean;
|
|
95
|
+
continueOnUserError?: boolean;
|
|
96
|
+
force?: boolean;
|
|
97
|
+
extensionList?: readonly string[];
|
|
98
|
+
/**
|
|
99
|
+
* Optional cancellation signal. When aborted, an in-flight
|
|
100
|
+
* `createDeployment` HTTP request is cancelled via the SDK's
|
|
101
|
+
* `CancelablePromise.cancel()`. Cancellation is handled internally:
|
|
102
|
+
* if the signal is aborted, `deployResources()` returns early
|
|
103
|
+
* without surfacing the cancellation as a deploy failure (no
|
|
104
|
+
* "Deployment failed" log, no rejection from the awaited promise).
|
|
105
|
+
* Callers do not need their own try/catch to suppress aborts.
|
|
106
|
+
*/
|
|
107
|
+
signal?: AbortSignal;
|
|
108
|
+
/** When true, skip the skipped-extensions log (caller already handled it). */
|
|
109
|
+
suppressSkippedLog?: boolean;
|
|
110
|
+
/** When false, skip loading deploy-always negation rules from .c8ignore.
|
|
111
|
+
* Used to suppress them on servers <8.10 that don't support extended extensions. */
|
|
112
|
+
loadDeployAlways?: boolean;
|
|
113
|
+
/** Override base path for relative path display. When set, used instead
|
|
114
|
+
* of inferring from paths (avoids regression when extra file paths are appended). */
|
|
115
|
+
basePath?: string;
|
|
116
|
+
/** Whether --verbose was set (surfaces raw errors with stack traces). */
|
|
117
|
+
verbose?: boolean;
|
|
118
|
+
}): Promise<void>;
|
|
119
|
+
export {};
|
|
120
|
+
//# sourceMappingURL=deploy-helpers.d.ts.map
|