@camunda8/cli 4.7.0-alpha.4 → 4.7.0-alpha.41

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.
Files changed (122) hide show
  1. package/CONTEXT.md +12 -0
  2. package/PLUGIN-HELP.md +1 -1
  3. package/README.md +8 -1
  4. package/dist/commands/deploy.d.ts.map +1 -1
  5. package/dist/commands/deploy.js +2 -2
  6. package/dist/commands/deploy.js.map +1 -1
  7. package/dist/commands/helpers/deploy-helpers.d.ts +14 -1
  8. package/dist/commands/helpers/deploy-helpers.d.ts.map +1 -1
  9. package/dist/commands/helpers/deploy-helpers.js +69 -13
  10. package/dist/commands/helpers/deploy-helpers.js.map +1 -1
  11. package/dist/commands/mcp-proxy.d.ts.map +1 -1
  12. package/dist/commands/mcp-proxy.js +13 -8
  13. package/dist/commands/mcp-proxy.js.map +1 -1
  14. package/dist/commands/profiles.d.ts.map +1 -1
  15. package/dist/commands/profiles.js +13 -7
  16. package/dist/commands/profiles.js.map +1 -1
  17. package/dist/commands/run.d.ts.map +1 -1
  18. package/dist/commands/run.js +1 -8
  19. package/dist/commands/run.js.map +1 -1
  20. package/dist/commands/watch.d.ts.map +1 -1
  21. package/dist/commands/watch.js +10 -2
  22. package/dist/commands/watch.js.map +1 -1
  23. package/dist/core/client.d.ts +13 -0
  24. package/dist/core/client.d.ts.map +1 -1
  25. package/dist/core/client.js +48 -21
  26. package/dist/core/client.js.map +1 -1
  27. package/dist/core/config.d.ts +34 -3
  28. package/dist/core/config.d.ts.map +1 -1
  29. package/dist/core/config.js +91 -9
  30. package/dist/core/config.js.map +1 -1
  31. package/dist/core/env-address.d.ts +22 -0
  32. package/dist/core/env-address.d.ts.map +1 -0
  33. package/dist/core/env-address.js +30 -0
  34. package/dist/core/env-address.js.map +1 -0
  35. package/dist/core/errors.d.ts +17 -0
  36. package/dist/core/errors.d.ts.map +1 -1
  37. package/dist/core/errors.js +32 -0
  38. package/dist/core/errors.js.map +1 -1
  39. package/dist/core/index.d.ts +2 -0
  40. package/dist/core/index.d.ts.map +1 -1
  41. package/dist/core/index.js +2 -0
  42. package/dist/core/index.js.map +1 -1
  43. package/dist/core/logger.d.ts.map +1 -1
  44. package/dist/core/logger.js +2 -1
  45. package/dist/core/logger.js.map +1 -1
  46. package/dist/core/node-version.d.ts +18 -0
  47. package/dist/core/node-version.d.ts.map +1 -0
  48. package/dist/core/node-version.js +38 -0
  49. package/dist/core/node-version.js.map +1 -0
  50. package/dist/default-plugins/cluster/README.md +16 -1
  51. package/dist/default-plugins/cluster/c8ctl-plugin.js +745 -115
  52. package/dist/default-plugins/element-template/c8ctl-plugin.js +248 -7
  53. package/dist/default-plugins/mcp/README.md +37 -0
  54. package/dist/default-plugins/mcp/c8ctl-plugin.js +4973 -0
  55. package/dist/default-plugins/mcp/package.json +8 -0
  56. package/dist/default-plugins/modeler/README.md +23 -0
  57. package/dist/default-plugins/modeler/c8ctl-plugin.js +4314 -0
  58. package/dist/default-plugins/modeler/package.json +8 -0
  59. package/dist/default-plugins/setup/README.md +42 -0
  60. package/dist/default-plugins/setup/c8ctl-plugin.js +6845 -0
  61. package/dist/default-plugins/setup/package.json +8 -0
  62. package/dist/default-plugins/skills/README.md +35 -0
  63. package/dist/default-plugins/skills/c8ctl-plugin.js +3369 -0
  64. package/dist/default-plugins/skills/package.json +8 -0
  65. package/dist/framework/argv-parser.d.ts +14 -0
  66. package/dist/framework/argv-parser.d.ts.map +1 -1
  67. package/dist/framework/argv-parser.js +25 -0
  68. package/dist/framework/argv-parser.js.map +1 -1
  69. package/dist/framework/command-registry.d.ts +28 -2
  70. package/dist/framework/command-registry.d.ts.map +1 -1
  71. package/dist/framework/command-registry.js +47 -2
  72. package/dist/framework/command-registry.js.map +1 -1
  73. package/dist/framework/plugins/plugin-loader.d.ts +20 -2
  74. package/dist/framework/plugins/plugin-loader.d.ts.map +1 -1
  75. package/dist/framework/plugins/plugin-loader.js.map +1 -1
  76. package/dist/framework/ui/help.d.ts.map +1 -1
  77. package/dist/framework/ui/help.js +57 -14
  78. package/dist/framework/ui/help.js.map +1 -1
  79. package/dist/framework/ui/prompt.d.ts +88 -0
  80. package/dist/framework/ui/prompt.d.ts.map +1 -1
  81. package/dist/framework/ui/prompt.js +558 -20
  82. package/dist/framework/ui/prompt.js.map +1 -1
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +68 -12
  85. package/dist/index.js.map +1 -1
  86. package/dist/utils/command-local/mcp-install-helpers.d.ts +68 -0
  87. package/dist/utils/command-local/mcp-install-helpers.d.ts.map +1 -0
  88. package/dist/utils/command-local/mcp-install-helpers.js +485 -0
  89. package/dist/utils/command-local/mcp-install-helpers.js.map +1 -0
  90. package/dist/utils/command-local/process-instance-helpers.d.ts +6 -0
  91. package/dist/utils/command-local/process-instance-helpers.d.ts.map +1 -1
  92. package/dist/utils/command-local/process-instance-helpers.js +9 -0
  93. package/dist/utils/command-local/process-instance-helpers.js.map +1 -1
  94. package/dist/utils/command-local/skills-install-helpers.d.ts +49 -0
  95. package/dist/utils/command-local/skills-install-helpers.d.ts.map +1 -0
  96. package/dist/utils/command-local/skills-install-helpers.js +436 -0
  97. package/dist/utils/command-local/skills-install-helpers.js.map +1 -0
  98. package/dist/utils/index.d.ts +2 -2
  99. package/dist/utils/index.d.ts.map +1 -1
  100. package/dist/utils/index.js +2 -2
  101. package/dist/utils/index.js.map +1 -1
  102. package/dist/utils/shared/camunda-json.d.ts +16 -3
  103. package/dist/utils/shared/camunda-json.d.ts.map +1 -1
  104. package/dist/utils/shared/camunda-json.js +20 -5
  105. package/dist/utils/shared/camunda-json.js.map +1 -1
  106. package/dist/utils/shared/deploy-resource-selection.d.ts +7 -15
  107. package/dist/utils/shared/deploy-resource-selection.d.ts.map +1 -1
  108. package/dist/utils/shared/deploy-resource-selection.js +9 -19
  109. package/dist/utils/shared/deploy-resource-selection.js.map +1 -1
  110. package/dist/utils/shared/ignore.d.ts +6 -0
  111. package/dist/utils/shared/ignore.d.ts.map +1 -1
  112. package/dist/utils/shared/ignore.js +9 -1
  113. package/dist/utils/shared/ignore.js.map +1 -1
  114. package/package.json +3 -2
  115. package/dist/utils/command-local/setup-detectors.d.ts +0 -51
  116. package/dist/utils/command-local/setup-detectors.d.ts.map +0 -1
  117. package/dist/utils/command-local/setup-detectors.js +0 -115
  118. package/dist/utils/command-local/setup-detectors.js.map +0 -1
  119. package/dist/utils/command-local/setup-prerequisites.d.ts +0 -67
  120. package/dist/utils/command-local/setup-prerequisites.d.ts.map +0 -1
  121. package/dist/utils/command-local/setup-prerequisites.js +0 -238
  122. package/dist/utils/command-local/setup-prerequisites.js.map +0 -1
@@ -1,238 +0,0 @@
1
- /**
2
- * Prerequisite checks for `c8ctl setup`: Node.js version, operating
3
- * system and architecture, and network access to the Camunda 8 Run
4
- * download host.
5
- *
6
- * Inputs (versions, platform, fetch, environment) are parameters with
7
- * the real runtime as the default, so every outcome is testable.
8
- */
9
- import { readFileSync } from "node:fs";
10
- import { join } from "node:path";
11
- import semver from "semver";
12
- /**
13
- * Pages for setting Camunda up by hand, for anyone who cannot meet a
14
- * prerequisite. Unversioned docs.camunda.io URLs resolve to the current
15
- * release.
16
- */
17
- export const MANUAL_SETUP_LINKS = [
18
- {
19
- label: "Run your first process without c8ctl",
20
- url: "https://docs.camunda.io/docs/guides/getting-started-hello-world/",
21
- },
22
- {
23
- label: "Install and start Camunda 8 Run",
24
- url: "https://docs.camunda.io/docs/self-managed/quickstart/developer-quickstart/c8run/install-start/",
25
- },
26
- {
27
- label: "Install Desktop Modeler",
28
- url: "https://docs.camunda.io/docs/components/modeler/desktop-modeler/install-the-modeler/",
29
- },
30
- ];
31
- // ── Node.js ────────────────────────────────────────────────────────
32
- function readRequiredNodeRange() {
33
- try {
34
- // src/utils/command-local/ and dist/utils/command-local/ are both
35
- // three levels below the package root.
36
- const pkg = JSON.parse(readFileSync(join(import.meta.dirname, "..", "..", "..", "package.json"), "utf-8"));
37
- const engines = pkg && typeof pkg === "object" && "engines" in pkg
38
- ? pkg.engines
39
- : undefined;
40
- const node = engines && typeof engines === "object" && "node" in engines
41
- ? engines.node
42
- : undefined;
43
- return typeof node === "string" ? node : undefined;
44
- }
45
- catch {
46
- return undefined;
47
- }
48
- }
49
- /** The Node.js range from c8ctl's `engines.node`, the one npm enforces. */
50
- export const REQUIRED_NODE_RANGE = readRequiredNodeRange();
51
- export function checkNodeVersion({ version = process.versions.node, range = REQUIRED_NODE_RANGE, } = {}) {
52
- const title = "Node.js version";
53
- if (!range) {
54
- return { id: "node", title, ok: true, detail: `Node.js ${version}.` };
55
- }
56
- const ok = semver.satisfies(version, range, { includePrerelease: true });
57
- return ok
58
- ? { id: "node", title, ok, detail: `Node.js ${version}.` }
59
- : {
60
- id: "node",
61
- title,
62
- ok,
63
- detail: `Node.js ${version} is installed; c8ctl needs ${range}.`,
64
- hint: "Install a supported Node.js release from https://nodejs.org/en/download, then run c8ctl setup again.",
65
- };
66
- }
67
- // ── Platform ───────────────────────────────────────────────────────
68
- /**
69
- * Platform and architecture pairs Camunda 8 Run is published for: exactly
70
- * the darwin-aarch64, darwin-x86_64, linux-x86_64 and windows-x86_64
71
- * builds on the Camunda Download Center. Other pairs, including Linux and
72
- * Windows on arm64, have no build to download.
73
- */
74
- const SUPPORTED_ARCHS_BY_PLATFORM = {
75
- darwin: ["x64", "arm64"],
76
- linux: ["x64"],
77
- win32: ["x64"],
78
- };
79
- export function checkPlatform({ platform = process.platform, arch = process.arch, } = {}) {
80
- const title = "Operating system";
81
- const ok = Object.hasOwn(SUPPORTED_ARCHS_BY_PLATFORM, platform) &&
82
- SUPPORTED_ARCHS_BY_PLATFORM[platform].includes(arch);
83
- return ok
84
- ? { id: "platform", title, ok, detail: `${platform} ${arch}.` }
85
- : {
86
- id: "platform",
87
- title,
88
- ok,
89
- detail: `Camunda 8 Run is not available for ${platform} ${arch}.`,
90
- hint: "Camunda 8 Run is available for macOS (x64, arm64), Linux (x64) and Windows (x64).",
91
- };
92
- }
93
- // ── Network ────────────────────────────────────────────────────────
94
- const DEFAULT_DOWNLOAD_URL = "https://downloads.camunda.cloud/release/camunda/c8run/";
95
- const DEFAULT_NETWORK_TIMEOUT_MS = 10_000;
96
- /** The download base URL, honouring the same mirror override as the cluster plugin. */
97
- function downloadBaseUrl(env) {
98
- return (env.C8CTL_C8RUN_DOWNLOAD_URL || DEFAULT_DOWNLOAD_URL).replace(/\/*$/, "/");
99
- }
100
- /**
101
- * A URL safe to print, redacted like the cluster plugin's download URLs:
102
- * credentials become `***`, and a query string or fragment `?<redacted>`.
103
- */
104
- function displayUrl(url) {
105
- try {
106
- const parsed = new URL(url);
107
- if (parsed.username || parsed.password) {
108
- parsed.username = "***";
109
- parsed.password = "";
110
- }
111
- const query = parsed.search || parsed.hash ? "?<redacted>" : "";
112
- parsed.search = "";
113
- parsed.hash = "";
114
- return `${parsed.toString()}${query}`;
115
- }
116
- catch {
117
- return "(invalid URL)";
118
- }
119
- }
120
- /** Why a download URL cannot work, as the cluster plugin reports it, or undefined. */
121
- function downloadUrlProblem(url) {
122
- let parsed;
123
- try {
124
- parsed = new URL(url);
125
- }
126
- catch {
127
- return "not a valid URL";
128
- }
129
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
130
- return `unsupported protocol ${parsed.protocol} (use http or https)`;
131
- }
132
- if (parsed.username || parsed.password) {
133
- return "the URL contains credentials, which fetch() does not send";
134
- }
135
- return undefined;
136
- }
137
- /** The first error code in an error's cause chain, e.g. ENOTFOUND. */
138
- function causeCode(error) {
139
- for (let current = error, depth = 0; current && depth < 5; depth++) {
140
- if (typeof current !== "object")
141
- return undefined;
142
- if ("code" in current && typeof current.code === "string") {
143
- return current.code;
144
- }
145
- current = "cause" in current ? current.cause : undefined;
146
- }
147
- return undefined;
148
- }
149
- function networkHint(env) {
150
- if (env.C8CTL_C8RUN_DOWNLOAD_URL) {
151
- return ("C8CTL_C8RUN_DOWNLOAD_URL points the download at a mirror. Make sure that " +
152
- "server is reachable, or unset it to use the Camunda Download Center.");
153
- }
154
- if ((env.HTTPS_PROXY || env.https_proxy) && env.NODE_USE_ENV_PROXY !== "1") {
155
- return ("HTTPS_PROXY is set, but Node.js only uses it when NODE_USE_ENV_PROXY=1 is " +
156
- "set as well (Node.js 22.21+ or 24.5+). Set NODE_USE_ENV_PROXY=1 and try again.");
157
- }
158
- return ("Check your network connection. Behind a proxy? Set HTTPS_PROXY together with " +
159
- "NODE_USE_ENV_PROXY=1 (Node.js 22.21+ or 24.5+).");
160
- }
161
- /**
162
- * Check that the Camunda 8 Run download host answers. Any HTTP response,
163
- * including a redirect, counts as reachable; a connection failure, a
164
- * timeout, or a download URL that cannot work fails.
165
- */
166
- export async function checkNetwork({ fetch = globalThis.fetch, env = process.env, timeoutMs = DEFAULT_NETWORK_TIMEOUT_MS, } = {}) {
167
- const title = "Network access";
168
- const url = downloadBaseUrl(env);
169
- const shown = displayUrl(url);
170
- const problem = downloadUrlProblem(url);
171
- if (problem) {
172
- return {
173
- id: "network",
174
- title,
175
- ok: false,
176
- detail: `Cannot use ${shown}: ${problem}.`,
177
- hint: networkHint(env),
178
- };
179
- }
180
- // A referenced timer rather than AbortSignal.timeout(), whose timer is
181
- // unreferenced: the timeout must fire even when nothing else keeps the
182
- // event loop alive, or a stalled request could end the process early.
183
- const controller = new AbortController();
184
- let timedOut = false;
185
- const timer = setTimeout(() => {
186
- timedOut = true;
187
- controller.abort();
188
- }, timeoutMs);
189
- try {
190
- // A redirect is an answer from the host, so it is not followed.
191
- await fetch(url, {
192
- method: "HEAD",
193
- redirect: "manual",
194
- signal: controller.signal,
195
- });
196
- return { id: "network", title, ok: true, detail: `${shown} is reachable.` };
197
- }
198
- catch (error) {
199
- // Never the error's message: it can repeat the URL, credentials included.
200
- const reason = timedOut
201
- ? `timed out after ${timeoutMs / 1000}s`
202
- : (causeCode(error) ?? "connection failed");
203
- return {
204
- id: "network",
205
- title,
206
- ok: false,
207
- detail: `Could not reach ${shown} (${reason}).`,
208
- hint: networkHint(env),
209
- };
210
- }
211
- finally {
212
- clearTimeout(timer);
213
- }
214
- }
215
- // ── All checks ─────────────────────────────────────────────────────
216
- export async function checkPrerequisites(options = {}) {
217
- return [
218
- checkNodeVersion(options),
219
- checkPlatform(options),
220
- await checkNetwork(options),
221
- ];
222
- }
223
- /** Explain the failed checks and point at the manual setup instead. */
224
- export function formatPrerequisiteFailures(results) {
225
- const failed = results.filter((result) => !result.ok);
226
- return [
227
- "c8ctl setup cannot continue:",
228
- "",
229
- ...failed.flatMap((result) => [
230
- ` ✗ ${result.title}: ${result.detail}`,
231
- ...(result.hint ? [` ${result.hint}`] : []),
232
- ]),
233
- "",
234
- "To set up Camunda by hand instead:",
235
- ...MANUAL_SETUP_LINKS.map((link) => ` ${link.label}: ${link.url}`),
236
- ].join("\n");
237
- }
238
- //# sourceMappingURL=setup-prerequisites.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup-prerequisites.js","sourceRoot":"","sources":["../../../src/utils/command-local/setup-prerequisites.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAsB5B;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAGzB;IACL;QACC,KAAK,EAAE,sCAAsC;QAC7C,GAAG,EAAE,kEAAkE;KACvE;IACD;QACC,KAAK,EAAE,iCAAiC;QACxC,GAAG,EAAE,gGAAgG;KACrG;IACD;QACC,KAAK,EAAE,yBAAyB;QAChC,GAAG,EAAE,sFAAsF;KAC3F;CACD,CAAC;AAEF,sEAAsE;AAEtE,SAAS,qBAAqB;IAC7B,IAAI,CAAC;QACJ,kEAAkE;QAClE,uCAAuC;QACvC,MAAM,GAAG,GAAY,IAAI,CAAC,KAAK,CAC9B,YAAY,CACX,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,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