@camunda8/cli 4.2.1-alpha.2 → 4.2.1-alpha.4
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/core/update-check-worker.d.ts +11 -0
- package/dist/core/update-check-worker.d.ts.map +1 -0
- package/dist/core/update-check-worker.js +14 -0
- package/dist/core/update-check-worker.js.map +1 -0
- package/dist/core/update-check.d.ts +39 -28
- package/dist/core/update-check.d.ts.map +1 -1
- package/dist/core/update-check.js +142 -157
- package/dist/core/update-check.js.map +1 -1
- package/dist/framework/command-registry.d.ts +73 -73
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detached update-check worker, spawned by `startUpdateCheck()`.
|
|
3
|
+
*
|
|
4
|
+
* Usage: node update-check-worker.js
|
|
5
|
+
*
|
|
6
|
+
* Exits after the check, or at the hard deadline: a DNS lookup or connect
|
|
7
|
+
* that never answers can't be cancelled, so the deadline is what bounds the
|
|
8
|
+
* worker's lifetime. Nothing waits on this process, so exiting is safe.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=update-check-worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-check-worker.d.ts","sourceRoot":"","sources":["../../src/core/update-check-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detached update-check worker, spawned by `startUpdateCheck()`.
|
|
3
|
+
*
|
|
4
|
+
* Usage: node update-check-worker.js
|
|
5
|
+
*
|
|
6
|
+
* Exits after the check, or at the hard deadline: a DNS lookup or connect
|
|
7
|
+
* that never answers can't be cancelled, so the deadline is what bounds the
|
|
8
|
+
* worker's lifetime. Nothing waits on this process, so exiting is safe.
|
|
9
|
+
*/
|
|
10
|
+
import { runUpdateCheck, WORKER_FETCH_TIMEOUT_MS } from "./update-check.js";
|
|
11
|
+
setTimeout(() => process.exit(0), WORKER_FETCH_TIMEOUT_MS + 1000);
|
|
12
|
+
await runUpdateCheck().catch(() => { });
|
|
13
|
+
process.exit(0);
|
|
14
|
+
//# sourceMappingURL=update-check-worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-check-worker.js","sourceRoot":"","sources":["../../src/core/update-check-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5E,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC,CAAC;AAElE,MAAM,cAAc,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Non-blocking CLI self-update notification.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The CLI process never touches the network for this. It only reads cached
|
|
5
|
+
* state:
|
|
6
|
+
* - `update-check.json` — latest dist-tag versions, written by a detached
|
|
7
|
+
* worker process (`update-check-worker.ts`).
|
|
8
|
+
* - `last-update-notification.json` — the version we last notified about.
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* - This means an offline user on an airplane sees at most one 5-second delay
|
|
16
|
-
* per day, and usually zero.
|
|
10
|
+
* On startup, if the cached check is older than CHECK_INTERVAL_MS, a detached,
|
|
11
|
+
* unref'd worker is spawned to refresh it. A newer version it finds is
|
|
12
|
+
* announced on a later invocation. An unreachable registry, a firewall that
|
|
13
|
+
* drops packets, or a DNS lookup that never answers therefore costs the CLI
|
|
14
|
+
* nothing: an in-process check can't cancel a pending getaddrinfo or connect,
|
|
15
|
+
* and either one holds the event loop (and the shell prompt) open.
|
|
17
16
|
*
|
|
18
17
|
* Design constraints:
|
|
19
|
-
* - Zero extra dependencies (
|
|
20
|
-
* - Never delays command execution
|
|
21
|
-
* - Once-per-version notification
|
|
18
|
+
* - Zero extra dependencies (global fetch + node:fs + node:child_process)
|
|
19
|
+
* - Never delays command execution or exit
|
|
20
|
+
* - Once-per-version notification
|
|
22
21
|
* - Notification output suppressed in JSON output mode; skipped entirely
|
|
23
|
-
* in CI environments (no
|
|
22
|
+
* in CI environments (no spawn, no cache write)
|
|
24
23
|
*/
|
|
24
|
+
/** Minimum time between background registry checks (ms). */
|
|
25
|
+
export declare const CHECK_INTERVAL_MS: number;
|
|
26
|
+
/** How long the worker waits for the registry before giving up (ms). */
|
|
27
|
+
export declare const WORKER_FETCH_TIMEOUT_MS = 10000;
|
|
25
28
|
/**
|
|
26
29
|
* Detect the npm dist-tag channel from the running version.
|
|
27
30
|
* Versions like "1.2.0-alpha.5" → "alpha", everything else → "latest".
|
|
@@ -38,30 +41,38 @@ export declare function detectChannel(version: string): string;
|
|
|
38
41
|
*/
|
|
39
42
|
export declare function isNewer(local: string, remote: string): boolean;
|
|
40
43
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
44
|
+
* Worker body: fetch the dist-tags and record them.
|
|
45
|
+
* Runs in the detached worker process, never in the CLI process.
|
|
46
|
+
*
|
|
47
|
+
* `checkedAt` is recorded before the fetch so that, while the registry is
|
|
48
|
+
* unreachable, CLI invocations don't respawn a worker each time.
|
|
49
|
+
*
|
|
50
|
+
* Every channel is recorded from the one response, replacing the previous
|
|
51
|
+
* set: one check serves stable and alpha builds alike, and concurrent
|
|
52
|
+
* workers can't drop each other's results — each writes a complete set.
|
|
43
53
|
*/
|
|
44
|
-
export declare function
|
|
54
|
+
export declare function runUpdateCheck(): Promise<void>;
|
|
55
|
+
type Spawner = () => void;
|
|
45
56
|
/**
|
|
46
57
|
* Start the non-blocking update check. Call this once at CLI startup.
|
|
47
|
-
* The result is stored internally and printed by `printUpdateNotification()`.
|
|
48
58
|
*
|
|
49
|
-
*
|
|
59
|
+
* Reads the cached check result (sync, no network) to decide what
|
|
60
|
+
* `printUpdateNotification()` will print, and spawns the background worker
|
|
61
|
+
* if the cache is stale.
|
|
50
62
|
*/
|
|
51
63
|
export declare function startUpdateCheck(currentVersion: string): void;
|
|
52
64
|
/**
|
|
53
65
|
* Print the update notification if one was resolved.
|
|
54
|
-
* Call this after the main command has completed.
|
|
55
|
-
*
|
|
56
|
-
* Timing: if the fetch already resolved during command execution, use it
|
|
57
|
-
* immediately. If it's still pending, wait only if the last "patient" check
|
|
58
|
-
* was more than 24 hours ago. Otherwise, abort and return instantly.
|
|
66
|
+
* Call this after the main command has completed. Never waits.
|
|
59
67
|
*
|
|
60
|
-
* Suppressed in JSON output mode
|
|
68
|
+
* Suppressed in JSON output mode.
|
|
61
69
|
*/
|
|
62
|
-
export declare function printUpdateNotification():
|
|
70
|
+
export declare function printUpdateNotification(): void;
|
|
63
71
|
/**
|
|
64
72
|
* Reset internal state (for testing only).
|
|
65
73
|
*/
|
|
66
74
|
export declare function _resetForTesting(): void;
|
|
75
|
+
/** Override how the worker is launched (for testing only). */
|
|
76
|
+
export declare function _setSpawnerForTesting(s: Spawner): void;
|
|
77
|
+
export {};
|
|
67
78
|
//# sourceMappingURL=update-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../../src/core/update-check.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../../src/core/update-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAiBH,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,QAAiB,CAAC;AAEhD,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAe9C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD;AA4CD;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAqC9D;AA4BD;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAMpD;AAED,KAAK,OAAO,GAAG,MAAM,IAAI,CAAC;AA8B1B;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CA2B7D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAY9C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAGvC;AAED,8DAA8D;AAC9D,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAEtD"}
|
|
@@ -1,40 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Non-blocking CLI self-update notification.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The CLI process never touches the network for this. It only reads cached
|
|
5
|
+
* state:
|
|
6
|
+
* - `update-check.json` — latest dist-tag versions, written by a detached
|
|
7
|
+
* worker process (`update-check-worker.ts`).
|
|
8
|
+
* - `last-update-notification.json` — the version we last notified about.
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* - This means an offline user on an airplane sees at most one 5-second delay
|
|
16
|
-
* per day, and usually zero.
|
|
10
|
+
* On startup, if the cached check is older than CHECK_INTERVAL_MS, a detached,
|
|
11
|
+
* unref'd worker is spawned to refresh it. A newer version it finds is
|
|
12
|
+
* announced on a later invocation. An unreachable registry, a firewall that
|
|
13
|
+
* drops packets, or a DNS lookup that never answers therefore costs the CLI
|
|
14
|
+
* nothing: an in-process check can't cancel a pending getaddrinfo or connect,
|
|
15
|
+
* and either one holds the event loop (and the shell prompt) open.
|
|
17
16
|
*
|
|
18
17
|
* Design constraints:
|
|
19
|
-
* - Zero extra dependencies (
|
|
20
|
-
* - Never delays command execution
|
|
21
|
-
* - Once-per-version notification
|
|
18
|
+
* - Zero extra dependencies (global fetch + node:fs + node:child_process)
|
|
19
|
+
* - Never delays command execution or exit
|
|
20
|
+
* - Once-per-version notification
|
|
22
21
|
* - Notification output suppressed in JSON output mode; skipped entirely
|
|
23
|
-
* in CI environments (no
|
|
22
|
+
* in CI environments (no spawn, no cache write)
|
|
24
23
|
*/
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
24
|
+
import { spawn } from "node:child_process";
|
|
25
|
+
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
26
|
+
import { extname, join } from "node:path";
|
|
27
|
+
import { fileURLToPath } from "node:url";
|
|
27
28
|
import { getUserDataDir } from "./config.js";
|
|
28
29
|
import { isRecord } from "./logger.js";
|
|
29
30
|
import { c8ctl, isUnversionedDevBuild } from "./runtime.js";
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
/**
|
|
32
|
+
* npm registry dist-tags endpoint: `{ latest, alpha, … }`, a few dozen bytes
|
|
33
|
+
* (the full package document is over half a megabyte).
|
|
34
|
+
*/
|
|
35
|
+
const REGISTRY_URL = "https://registry.npmjs.org/-/package/@camunda8/cli/dist-tags";
|
|
36
|
+
/** Minimum time between background registry checks (ms). */
|
|
37
|
+
export const CHECK_INTERVAL_MS = 60 * 60 * 1000;
|
|
38
|
+
/** How long the worker waits for the registry before giving up (ms). */
|
|
39
|
+
export const WORKER_FETCH_TIMEOUT_MS = 10_000;
|
|
40
|
+
/** Written by the worker: when it last ran and what it found. */
|
|
41
|
+
const CHECK_FILE = "update-check.json";
|
|
42
|
+
/** Written by the CLI: the version it last notified about. */
|
|
43
|
+
const NOTIFICATION_FILE = "last-update-notification.json";
|
|
38
44
|
/**
|
|
39
45
|
* Detect the npm dist-tag channel from the running version.
|
|
40
46
|
* Versions like "1.2.0-alpha.5" → "alpha", everything else → "latest".
|
|
@@ -42,42 +48,46 @@ const CACHE_FILE = "last-update-notification.json";
|
|
|
42
48
|
export function detectChannel(version) {
|
|
43
49
|
return version.includes("-alpha.") ? "alpha" : "latest";
|
|
44
50
|
}
|
|
45
|
-
|
|
46
|
-
* Read the notification cache. Returns undefined if missing or corrupt.
|
|
47
|
-
*/
|
|
48
|
-
function readCache() {
|
|
51
|
+
function readJson(file) {
|
|
49
52
|
try {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
if (!existsSync(filePath))
|
|
53
|
-
return undefined;
|
|
54
|
-
const raw = JSON.parse(readFileSync(filePath, "utf-8"));
|
|
55
|
-
if (!isRecord(raw))
|
|
56
|
-
return undefined;
|
|
57
|
-
const cache = {};
|
|
58
|
-
if (typeof raw.notifiedVersion === "string")
|
|
59
|
-
cache.notifiedVersion = raw.notifiedVersion;
|
|
60
|
-
if (typeof raw.lastPatientCheck === "number")
|
|
61
|
-
cache.lastPatientCheck = raw.lastPatientCheck;
|
|
62
|
-
return cache;
|
|
53
|
+
const raw = JSON.parse(readFileSync(join(getUserDataDir(), file), "utf-8"));
|
|
54
|
+
return isRecord(raw) ? raw : undefined;
|
|
63
55
|
}
|
|
64
56
|
catch {
|
|
65
57
|
return undefined;
|
|
66
58
|
}
|
|
67
59
|
}
|
|
68
60
|
/**
|
|
69
|
-
*
|
|
61
|
+
* Best-effort write. Goes through a temp file + rename so a reader never
|
|
62
|
+
* sees a half-written file while the worker and the CLI run concurrently.
|
|
70
63
|
*/
|
|
71
|
-
function
|
|
64
|
+
function writeJson(file, data) {
|
|
72
65
|
try {
|
|
73
66
|
const dir = getUserDataDir();
|
|
74
67
|
mkdirSync(dir, { recursive: true });
|
|
75
|
-
|
|
68
|
+
const target = join(dir, file);
|
|
69
|
+
const temp = `${target}.${process.pid}.tmp`;
|
|
70
|
+
writeFileSync(temp, JSON.stringify(data), "utf-8");
|
|
71
|
+
renameSync(temp, target);
|
|
76
72
|
}
|
|
77
73
|
catch {
|
|
78
74
|
// Best-effort — don't crash if the write fails
|
|
79
75
|
}
|
|
80
76
|
}
|
|
77
|
+
function readCheckState() {
|
|
78
|
+
const raw = readJson(CHECK_FILE);
|
|
79
|
+
const versions = {};
|
|
80
|
+
if (raw && isRecord(raw.versions)) {
|
|
81
|
+
for (const [channel, version] of Object.entries(raw.versions)) {
|
|
82
|
+
if (typeof version === "string")
|
|
83
|
+
versions[channel] = version;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
checkedAt: typeof raw?.checkedAt === "number" ? raw.checkedAt : undefined,
|
|
88
|
+
versions,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
81
91
|
/**
|
|
82
92
|
* Naive semver comparison: returns true if `remote` is newer than `local`.
|
|
83
93
|
* Handles prerelease tags (alpha.N) by comparing the numeric suffix.
|
|
@@ -123,46 +133,82 @@ export function isNewer(local, remote) {
|
|
|
123
133
|
return false;
|
|
124
134
|
}
|
|
125
135
|
/**
|
|
126
|
-
* Fetch
|
|
136
|
+
* Fetch all dist-tags (e.g. `latest`, `alpha`) from the npm registry.
|
|
127
137
|
* Returns undefined on any failure (offline, timeout, etc.).
|
|
138
|
+
*
|
|
139
|
+
* Plain global fetch is fine here: it only ever runs in the worker, whose
|
|
140
|
+
* deadline bounds any stall. It also honours NODE_USE_ENV_PROXY +
|
|
141
|
+
* HTTPS_PROXY, which a network that blocks the registry may need.
|
|
128
142
|
*/
|
|
129
|
-
|
|
143
|
+
async function fetchDistTags() {
|
|
130
144
|
try {
|
|
131
|
-
const res = await fetch(REGISTRY_URL, {
|
|
145
|
+
const res = await fetch(REGISTRY_URL, {
|
|
146
|
+
signal: AbortSignal.timeout(WORKER_FETCH_TIMEOUT_MS),
|
|
147
|
+
});
|
|
132
148
|
if (!res.ok)
|
|
133
149
|
return undefined;
|
|
134
150
|
const data = await res.json();
|
|
135
151
|
if (!isRecord(data))
|
|
136
152
|
return undefined;
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
153
|
+
const tags = {};
|
|
154
|
+
for (const [tag, version] of Object.entries(data)) {
|
|
155
|
+
if (typeof version === "string")
|
|
156
|
+
tags[tag] = version;
|
|
157
|
+
}
|
|
158
|
+
return Object.keys(tags).length > 0 ? tags : undefined;
|
|
142
159
|
}
|
|
143
160
|
catch {
|
|
144
161
|
return undefined;
|
|
145
162
|
}
|
|
146
163
|
}
|
|
147
164
|
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
165
|
+
* Worker body: fetch the dist-tags and record them.
|
|
166
|
+
* Runs in the detached worker process, never in the CLI process.
|
|
167
|
+
*
|
|
168
|
+
* `checkedAt` is recorded before the fetch so that, while the registry is
|
|
169
|
+
* unreachable, CLI invocations don't respawn a worker each time.
|
|
170
|
+
*
|
|
171
|
+
* Every channel is recorded from the one response, replacing the previous
|
|
172
|
+
* set: one check serves stable and alpha builds alike, and concurrent
|
|
173
|
+
* workers can't drop each other's results — each writes a complete set.
|
|
150
174
|
*/
|
|
151
|
-
|
|
175
|
+
export async function runUpdateCheck() {
|
|
176
|
+
const checkedAt = Date.now();
|
|
177
|
+
writeJson(CHECK_FILE, { ...readCheckState(), checkedAt });
|
|
178
|
+
const versions = await fetchDistTags();
|
|
179
|
+
if (versions)
|
|
180
|
+
writeJson(CHECK_FILE, { checkedAt, versions });
|
|
181
|
+
}
|
|
152
182
|
/**
|
|
153
|
-
*
|
|
183
|
+
* Launch the worker detached and unref'd: the CLI neither waits for it nor
|
|
184
|
+
* shares its process group, so Ctrl-C or the shell prompt are unaffected.
|
|
154
185
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
186
|
+
const spawnWorker = () => {
|
|
187
|
+
// `.ts` when running from source, `.js` from dist
|
|
188
|
+
const ext = extname(fileURLToPath(import.meta.url));
|
|
189
|
+
const worker = fileURLToPath(new URL(`./update-check-worker${ext}`, import.meta.url));
|
|
190
|
+
try {
|
|
191
|
+
const child = spawn(process.execPath, [worker], {
|
|
192
|
+
detached: true,
|
|
193
|
+
stdio: "ignore",
|
|
194
|
+
windowsHide: true,
|
|
195
|
+
});
|
|
196
|
+
child.on("error", () => { });
|
|
197
|
+
child.unref();
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
// Best-effort — never fail the command over an update check
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
let spawner = spawnWorker;
|
|
204
|
+
/** The notification resolved from cache, printed after the command. */
|
|
205
|
+
let pendingNotification;
|
|
161
206
|
/**
|
|
162
207
|
* Start the non-blocking update check. Call this once at CLI startup.
|
|
163
|
-
* The result is stored internally and printed by `printUpdateNotification()`.
|
|
164
208
|
*
|
|
165
|
-
*
|
|
209
|
+
* Reads the cached check result (sync, no network) to decide what
|
|
210
|
+
* `printUpdateNotification()` will print, and spawns the background worker
|
|
211
|
+
* if the cache is stale.
|
|
166
212
|
*/
|
|
167
213
|
export function startUpdateCheck(currentVersion) {
|
|
168
214
|
// Suppress in CI environments
|
|
@@ -172,113 +218,52 @@ export function startUpdateCheck(currentVersion) {
|
|
|
172
218
|
if (isUnversionedDevBuild(currentVersion))
|
|
173
219
|
return;
|
|
174
220
|
const channel = detectChannel(currentVersion);
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
// so JSON-mode suppression doesn't poison the cache)
|
|
193
|
-
const installCmd = channel === "alpha"
|
|
194
|
-
? "npm install -g @camunda8/cli@alpha"
|
|
195
|
-
: "npm install -g @camunda8/cli";
|
|
196
|
-
pendingNotification = {
|
|
197
|
-
message: `A newer version of c8ctl is available (${currentVersion} → ${remoteVersion}). Update with: ${installCmd}`,
|
|
198
|
-
version: remoteVersion,
|
|
199
|
-
};
|
|
200
|
-
})
|
|
201
|
-
.catch(() => {
|
|
202
|
-
// Swallow all errors — this is best-effort
|
|
203
|
-
})
|
|
204
|
-
.finally(() => {
|
|
205
|
-
resolveFetchSettled?.();
|
|
206
|
-
clearTimeout(timeoutId);
|
|
207
|
-
});
|
|
221
|
+
const state = readCheckState();
|
|
222
|
+
const stale = state.checkedAt === undefined ||
|
|
223
|
+
Date.now() - state.checkedAt >= CHECK_INTERVAL_MS;
|
|
224
|
+
if (stale)
|
|
225
|
+
spawner();
|
|
226
|
+
const remoteVersion = state.versions[channel];
|
|
227
|
+
if (!remoteVersion || !isNewer(currentVersion, remoteVersion))
|
|
228
|
+
return;
|
|
229
|
+
if (readJson(NOTIFICATION_FILE)?.notifiedVersion === remoteVersion)
|
|
230
|
+
return;
|
|
231
|
+
const installCmd = channel === "alpha"
|
|
232
|
+
? "npm install -g @camunda8/cli@alpha"
|
|
233
|
+
: "npm install -g @camunda8/cli";
|
|
234
|
+
pendingNotification = {
|
|
235
|
+
message: `A newer version of c8ctl is available (${currentVersion} → ${remoteVersion}). Update with: ${installCmd}`,
|
|
236
|
+
version: remoteVersion,
|
|
237
|
+
};
|
|
208
238
|
}
|
|
209
239
|
/**
|
|
210
240
|
* Print the update notification if one was resolved.
|
|
211
|
-
* Call this after the main command has completed.
|
|
212
|
-
*
|
|
213
|
-
* Timing: if the fetch already resolved during command execution, use it
|
|
214
|
-
* immediately. If it's still pending, wait only if the last "patient" check
|
|
215
|
-
* was more than 24 hours ago. Otherwise, abort and return instantly.
|
|
241
|
+
* Call this after the main command has completed. Never waits.
|
|
216
242
|
*
|
|
217
|
-
* Suppressed in JSON output mode
|
|
243
|
+
* Suppressed in JSON output mode.
|
|
218
244
|
*/
|
|
219
|
-
export
|
|
220
|
-
|
|
221
|
-
if (c8ctl.outputMode === "json") {
|
|
222
|
-
fetchController?.abort();
|
|
245
|
+
export function printUpdateNotification() {
|
|
246
|
+
if (c8ctl.outputMode === "json")
|
|
223
247
|
return;
|
|
224
|
-
}
|
|
225
|
-
if (checkPromise && fetchSettled) {
|
|
226
|
-
// Race the fetch settlement against an immediately-resolved sentinel.
|
|
227
|
-
// This avoids microtask ordering issues with a boolean flag.
|
|
228
|
-
const alreadyDone = (await Promise.race([fetchSettled, Promise.resolve("pending")])) ===
|
|
229
|
-
"settled";
|
|
230
|
-
if (alreadyDone) {
|
|
231
|
-
// Already done — no delay
|
|
232
|
-
await checkPromise;
|
|
233
|
-
}
|
|
234
|
-
else if (isPatientCheck()) {
|
|
235
|
-
// Patient check — wait up to PATIENT_TIMEOUT_MS for the fetch
|
|
236
|
-
await checkPromise;
|
|
237
|
-
persistPatientTimestamp();
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
// Impatient — abort immediately, no post-command delay
|
|
241
|
-
fetchController?.abort();
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
248
|
if (!pendingNotification)
|
|
246
249
|
return;
|
|
247
|
-
// Persist so we don't nag about this version again (deferred
|
|
248
|
-
//
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
...cache,
|
|
250
|
+
// Persist so we don't nag about this version again (deferred to print time
|
|
251
|
+
// so JSON-mode suppression doesn't write the cache prematurely)
|
|
252
|
+
writeJson(NOTIFICATION_FILE, {
|
|
253
|
+
...readJson(NOTIFICATION_FILE),
|
|
252
254
|
notifiedVersion: pendingNotification.version,
|
|
253
255
|
});
|
|
254
256
|
console.log(`\n${pendingNotification.message}`);
|
|
255
257
|
}
|
|
256
|
-
/**
|
|
257
|
-
* Whether this invocation should be a "patient" check (wait for the fetch).
|
|
258
|
-
* Returns true if the last patient check was more than 24 hours ago.
|
|
259
|
-
*/
|
|
260
|
-
function isPatientCheck() {
|
|
261
|
-
const cache = readCache();
|
|
262
|
-
const last = cache?.lastPatientCheck;
|
|
263
|
-
if (!last)
|
|
264
|
-
return true; // Never checked — be patient
|
|
265
|
-
return Date.now() - last >= PATIENT_INTERVAL_MS;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Record that a patient check happened now.
|
|
269
|
-
*/
|
|
270
|
-
function persistPatientTimestamp() {
|
|
271
|
-
const cache = readCache() ?? {};
|
|
272
|
-
writeCache({ ...cache, lastPatientCheck: Date.now() });
|
|
273
|
-
}
|
|
274
258
|
/**
|
|
275
259
|
* Reset internal state (for testing only).
|
|
276
260
|
*/
|
|
277
261
|
export function _resetForTesting() {
|
|
278
262
|
pendingNotification = undefined;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
263
|
+
spawner = spawnWorker;
|
|
264
|
+
}
|
|
265
|
+
/** Override how the worker is launched (for testing only). */
|
|
266
|
+
export function _setSpawnerForTesting(s) {
|
|
267
|
+
spawner = s;
|
|
283
268
|
}
|
|
284
269
|
//# sourceMappingURL=update-check.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-check.js","sourceRoot":"","sources":["../../src/core/update-check.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"update-check.js","sourceRoot":"","sources":["../../src/core/update-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC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223
|
readonly name: "key";
|
|
224
224
|
readonly required: true;
|
|
225
|
-
readonly validate:
|
|
225
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
226
226
|
}];
|
|
227
227
|
export declare const COMMAND_REGISTRY: {
|
|
228
228
|
list: {
|
|
@@ -280,7 +280,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
280
280
|
readonly processDefinitionId: {
|
|
281
281
|
readonly type: "string";
|
|
282
282
|
readonly description: "Filter by process definition ID";
|
|
283
|
-
readonly validate:
|
|
283
|
+
readonly validate: (value: string) => ProcessDefinitionId;
|
|
284
284
|
};
|
|
285
285
|
readonly name: {
|
|
286
286
|
readonly type: "string";
|
|
@@ -303,7 +303,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
303
303
|
readonly businessId: {
|
|
304
304
|
readonly type: "string";
|
|
305
305
|
readonly description: "Filter by Business ID (Camunda 8.9+)";
|
|
306
|
-
readonly validate:
|
|
306
|
+
readonly validate: (value: string) => BusinessId;
|
|
307
307
|
};
|
|
308
308
|
readonly bpmnProcessId: {
|
|
309
309
|
readonly type: "string";
|
|
@@ -316,12 +316,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
316
316
|
readonly processDefinitionId: {
|
|
317
317
|
readonly type: "string";
|
|
318
318
|
readonly description: "Filter by process definition ID";
|
|
319
|
-
readonly validate:
|
|
319
|
+
readonly validate: (value: string) => ProcessDefinitionId;
|
|
320
320
|
};
|
|
321
321
|
readonly processDefinitionKey: {
|
|
322
322
|
readonly type: "string";
|
|
323
323
|
readonly description: "Filter by process definition key";
|
|
324
|
-
readonly validate:
|
|
324
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
325
325
|
};
|
|
326
326
|
readonly state: {
|
|
327
327
|
readonly type: "string";
|
|
@@ -334,7 +334,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
334
334
|
readonly parentProcessInstanceKey: {
|
|
335
335
|
readonly type: "string";
|
|
336
336
|
readonly description: "Filter by parent process instance key";
|
|
337
|
-
readonly validate:
|
|
337
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
338
338
|
};
|
|
339
339
|
readonly iid: {
|
|
340
340
|
readonly type: "string";
|
|
@@ -353,12 +353,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
353
353
|
readonly processInstanceKey: {
|
|
354
354
|
readonly type: "string";
|
|
355
355
|
readonly description: "Filter by process instance key";
|
|
356
|
-
readonly validate:
|
|
356
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
357
357
|
};
|
|
358
358
|
readonly processDefinitionKey: {
|
|
359
359
|
readonly type: "string";
|
|
360
360
|
readonly description: "Filter by process definition key";
|
|
361
|
-
readonly validate:
|
|
361
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
362
362
|
};
|
|
363
363
|
readonly elementId: {
|
|
364
364
|
readonly type: "string";
|
|
@@ -377,12 +377,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
377
377
|
readonly processInstanceKey: {
|
|
378
378
|
readonly type: "string";
|
|
379
379
|
readonly description: "Filter by process instance key";
|
|
380
|
-
readonly validate:
|
|
380
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
381
381
|
};
|
|
382
382
|
readonly processDefinitionKey: {
|
|
383
383
|
readonly type: "string";
|
|
384
384
|
readonly description: "Filter by process definition key";
|
|
385
|
-
readonly validate:
|
|
385
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
386
386
|
};
|
|
387
387
|
readonly bpmnProcessId: {
|
|
388
388
|
readonly type: "string";
|
|
@@ -395,7 +395,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
395
395
|
readonly processDefinitionId: {
|
|
396
396
|
readonly type: "string";
|
|
397
397
|
readonly description: "Filter by process definition ID";
|
|
398
|
-
readonly validate:
|
|
398
|
+
readonly validate: (value: string) => ProcessDefinitionId;
|
|
399
399
|
};
|
|
400
400
|
readonly errorType: {
|
|
401
401
|
readonly type: "string";
|
|
@@ -426,12 +426,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
426
426
|
readonly processInstanceKey: {
|
|
427
427
|
readonly type: "string";
|
|
428
428
|
readonly description: "Filter by process instance key";
|
|
429
|
-
readonly validate:
|
|
429
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
430
430
|
};
|
|
431
431
|
readonly processDefinitionKey: {
|
|
432
432
|
readonly type: "string";
|
|
433
433
|
readonly description: "Filter by process definition key";
|
|
434
|
-
readonly validate:
|
|
434
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
435
435
|
};
|
|
436
436
|
readonly itype: {
|
|
437
437
|
readonly type: "string";
|
|
@@ -442,7 +442,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
442
442
|
readonly username: {
|
|
443
443
|
readonly type: "string";
|
|
444
444
|
readonly description: "Filter by username";
|
|
445
|
-
readonly validate:
|
|
445
|
+
readonly validate: (value: string) => Username;
|
|
446
446
|
};
|
|
447
447
|
readonly name: {
|
|
448
448
|
readonly type: "string";
|
|
@@ -477,7 +477,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
477
477
|
readonly tenantId: {
|
|
478
478
|
readonly type: "string";
|
|
479
479
|
readonly description: "Filter by tenant ID";
|
|
480
|
-
readonly validate:
|
|
480
|
+
readonly validate: (value: string) => TenantId;
|
|
481
481
|
};
|
|
482
482
|
readonly name: {
|
|
483
483
|
readonly type: "string";
|
|
@@ -573,7 +573,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
573
573
|
readonly processDefinitionId: {
|
|
574
574
|
readonly type: "string";
|
|
575
575
|
readonly description: "Filter by process definition ID";
|
|
576
|
-
readonly validate:
|
|
576
|
+
readonly validate: (value: string) => ProcessDefinitionId;
|
|
577
577
|
};
|
|
578
578
|
readonly name: {
|
|
579
579
|
readonly type: "string";
|
|
@@ -596,7 +596,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
596
596
|
readonly businessId: {
|
|
597
597
|
readonly type: "string";
|
|
598
598
|
readonly description: "Filter by Business ID (Camunda 8.9+)";
|
|
599
|
-
readonly validate:
|
|
599
|
+
readonly validate: (value: string) => BusinessId;
|
|
600
600
|
};
|
|
601
601
|
readonly bpmnProcessId: {
|
|
602
602
|
readonly type: "string";
|
|
@@ -609,12 +609,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
609
609
|
readonly processDefinitionId: {
|
|
610
610
|
readonly type: "string";
|
|
611
611
|
readonly description: "Filter by process definition ID";
|
|
612
|
-
readonly validate:
|
|
612
|
+
readonly validate: (value: string) => ProcessDefinitionId;
|
|
613
613
|
};
|
|
614
614
|
readonly processDefinitionKey: {
|
|
615
615
|
readonly type: "string";
|
|
616
616
|
readonly description: "Filter by process definition key";
|
|
617
|
-
readonly validate:
|
|
617
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
618
618
|
};
|
|
619
619
|
readonly state: {
|
|
620
620
|
readonly type: "string";
|
|
@@ -627,7 +627,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
627
627
|
readonly parentProcessInstanceKey: {
|
|
628
628
|
readonly type: "string";
|
|
629
629
|
readonly description: "Filter by parent process instance key";
|
|
630
|
-
readonly validate:
|
|
630
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
631
631
|
};
|
|
632
632
|
readonly iid: {
|
|
633
633
|
readonly type: "string";
|
|
@@ -646,12 +646,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
646
646
|
readonly processInstanceKey: {
|
|
647
647
|
readonly type: "string";
|
|
648
648
|
readonly description: "Filter by process instance key";
|
|
649
|
-
readonly validate:
|
|
649
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
650
650
|
};
|
|
651
651
|
readonly processDefinitionKey: {
|
|
652
652
|
readonly type: "string";
|
|
653
653
|
readonly description: "Filter by process definition key";
|
|
654
|
-
readonly validate:
|
|
654
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
655
655
|
};
|
|
656
656
|
readonly elementId: {
|
|
657
657
|
readonly type: "string";
|
|
@@ -670,12 +670,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
670
670
|
readonly processInstanceKey: {
|
|
671
671
|
readonly type: "string";
|
|
672
672
|
readonly description: "Filter by process instance key";
|
|
673
|
-
readonly validate:
|
|
673
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
674
674
|
};
|
|
675
675
|
readonly processDefinitionKey: {
|
|
676
676
|
readonly type: "string";
|
|
677
677
|
readonly description: "Filter by process definition key";
|
|
678
|
-
readonly validate:
|
|
678
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
679
679
|
};
|
|
680
680
|
readonly bpmnProcessId: {
|
|
681
681
|
readonly type: "string";
|
|
@@ -688,7 +688,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
688
688
|
readonly processDefinitionId: {
|
|
689
689
|
readonly type: "string";
|
|
690
690
|
readonly description: "Filter by process definition ID";
|
|
691
|
-
readonly validate:
|
|
691
|
+
readonly validate: (value: string) => ProcessDefinitionId;
|
|
692
692
|
};
|
|
693
693
|
readonly errorType: {
|
|
694
694
|
readonly type: "string";
|
|
@@ -719,12 +719,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
719
719
|
readonly processInstanceKey: {
|
|
720
720
|
readonly type: "string";
|
|
721
721
|
readonly description: "Filter by process instance key";
|
|
722
|
-
readonly validate:
|
|
722
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
723
723
|
};
|
|
724
724
|
readonly processDefinitionKey: {
|
|
725
725
|
readonly type: "string";
|
|
726
726
|
readonly description: "Filter by process definition key";
|
|
727
|
-
readonly validate:
|
|
727
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
728
728
|
};
|
|
729
729
|
readonly itype: {
|
|
730
730
|
readonly type: "string";
|
|
@@ -743,7 +743,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
743
743
|
readonly processInstanceKey: {
|
|
744
744
|
readonly type: "string";
|
|
745
745
|
readonly description: "Filter by process instance key";
|
|
746
|
-
readonly validate:
|
|
746
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
747
747
|
};
|
|
748
748
|
readonly scopeKey: {
|
|
749
749
|
readonly type: "string";
|
|
@@ -766,7 +766,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
766
766
|
readonly username: {
|
|
767
767
|
readonly type: "string";
|
|
768
768
|
readonly description: "Filter by username";
|
|
769
|
-
readonly validate:
|
|
769
|
+
readonly validate: (value: string) => Username;
|
|
770
770
|
};
|
|
771
771
|
readonly name: {
|
|
772
772
|
readonly type: "string";
|
|
@@ -801,7 +801,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
801
801
|
readonly tenantId: {
|
|
802
802
|
readonly type: "string";
|
|
803
803
|
readonly description: "Filter by tenant ID";
|
|
804
|
-
readonly validate:
|
|
804
|
+
readonly validate: (value: string) => TenantId;
|
|
805
805
|
};
|
|
806
806
|
readonly name: {
|
|
807
807
|
readonly type: "string";
|
|
@@ -849,19 +849,19 @@ export declare const COMMAND_REGISTRY: {
|
|
|
849
849
|
readonly type: "string";
|
|
850
850
|
readonly description: "Filter by process instance key";
|
|
851
851
|
readonly short: "k";
|
|
852
|
-
readonly validate:
|
|
852
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
853
853
|
};
|
|
854
854
|
readonly rootProcessInstanceKey: {
|
|
855
855
|
readonly type: "string";
|
|
856
856
|
readonly description: "Filter by root process instance key";
|
|
857
857
|
readonly short: "r";
|
|
858
|
-
readonly validate:
|
|
858
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
859
859
|
};
|
|
860
860
|
readonly elementInstanceKey: {
|
|
861
861
|
readonly type: "string";
|
|
862
862
|
readonly description: "Filter by element instance key";
|
|
863
863
|
readonly short: "e";
|
|
864
|
-
readonly validate:
|
|
864
|
+
readonly validate: (value: string) => ElementInstanceKey;
|
|
865
865
|
};
|
|
866
866
|
readonly elementId: {
|
|
867
867
|
readonly type: "string";
|
|
@@ -964,47 +964,47 @@ export declare const COMMAND_REGISTRY: {
|
|
|
964
964
|
"process-definition": readonly [{
|
|
965
965
|
readonly name: "key";
|
|
966
966
|
readonly required: true;
|
|
967
|
-
readonly validate:
|
|
967
|
+
readonly validate: (value: string) => ProcessDefinitionKey;
|
|
968
968
|
}];
|
|
969
969
|
"process-instance": readonly [{
|
|
970
970
|
readonly name: "key";
|
|
971
971
|
readonly required: true;
|
|
972
|
-
readonly validate:
|
|
972
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
973
973
|
}];
|
|
974
974
|
incident: readonly [{
|
|
975
975
|
readonly name: "key";
|
|
976
976
|
readonly required: true;
|
|
977
|
-
readonly validate:
|
|
977
|
+
readonly validate: (value: string) => IncidentKey;
|
|
978
978
|
}];
|
|
979
979
|
user: readonly [{
|
|
980
980
|
readonly name: "username";
|
|
981
981
|
readonly required: true;
|
|
982
|
-
readonly validate:
|
|
982
|
+
readonly validate: (value: string) => Username;
|
|
983
983
|
}];
|
|
984
984
|
role: readonly [{
|
|
985
985
|
readonly name: "roleId";
|
|
986
986
|
readonly required: true;
|
|
987
|
-
readonly validate:
|
|
987
|
+
readonly validate: (value: string) => RoleId;
|
|
988
988
|
}];
|
|
989
989
|
group: readonly [{
|
|
990
990
|
readonly name: "groupId";
|
|
991
991
|
readonly required: true;
|
|
992
|
-
readonly validate:
|
|
992
|
+
readonly validate: (value: string) => GroupId;
|
|
993
993
|
}];
|
|
994
994
|
tenant: readonly [{
|
|
995
995
|
readonly name: "tenantId";
|
|
996
996
|
readonly required: true;
|
|
997
|
-
readonly validate:
|
|
997
|
+
readonly validate: (value: string) => TenantId;
|
|
998
998
|
}];
|
|
999
999
|
authorization: readonly [{
|
|
1000
1000
|
readonly name: "authorizationKey";
|
|
1001
1001
|
readonly required: true;
|
|
1002
|
-
readonly validate:
|
|
1002
|
+
readonly validate: (value: string) => AuthorizationKey;
|
|
1003
1003
|
}];
|
|
1004
1004
|
"mapping-rule": readonly [{
|
|
1005
1005
|
readonly name: "mappingRuleId";
|
|
1006
1006
|
readonly required: true;
|
|
1007
|
-
readonly validate:
|
|
1007
|
+
readonly validate: (value: string) => MappingRuleId;
|
|
1008
1008
|
}];
|
|
1009
1009
|
form: readonly [{
|
|
1010
1010
|
readonly name: "key";
|
|
@@ -1030,7 +1030,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1030
1030
|
readonly processDefinitionId: {
|
|
1031
1031
|
readonly type: "string";
|
|
1032
1032
|
readonly description: "Process definition ID (BPMN process ID)";
|
|
1033
|
-
readonly validate:
|
|
1033
|
+
readonly validate: (value: string) => ProcessDefinitionId;
|
|
1034
1034
|
};
|
|
1035
1035
|
readonly id: {
|
|
1036
1036
|
readonly type: "string";
|
|
@@ -1043,7 +1043,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1043
1043
|
readonly businessId: {
|
|
1044
1044
|
readonly type: "string";
|
|
1045
1045
|
readonly description: "Business ID for the process instance (Camunda 8.9+)";
|
|
1046
|
-
readonly validate:
|
|
1046
|
+
readonly validate: (value: string) => BusinessId;
|
|
1047
1047
|
};
|
|
1048
1048
|
readonly variables: {
|
|
1049
1049
|
readonly type: "string";
|
|
@@ -1066,7 +1066,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1066
1066
|
readonly username: {
|
|
1067
1067
|
readonly type: "string";
|
|
1068
1068
|
readonly description: "Username";
|
|
1069
|
-
readonly validate:
|
|
1069
|
+
readonly validate: (value: string) => Username;
|
|
1070
1070
|
};
|
|
1071
1071
|
readonly name: {
|
|
1072
1072
|
readonly type: "string";
|
|
@@ -1085,7 +1085,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1085
1085
|
readonly roleId: {
|
|
1086
1086
|
readonly type: "string";
|
|
1087
1087
|
readonly description: "Role ID";
|
|
1088
|
-
readonly validate:
|
|
1088
|
+
readonly validate: (value: string) => RoleId;
|
|
1089
1089
|
};
|
|
1090
1090
|
readonly name: {
|
|
1091
1091
|
readonly type: "string";
|
|
@@ -1096,7 +1096,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1096
1096
|
readonly groupId: {
|
|
1097
1097
|
readonly type: "string";
|
|
1098
1098
|
readonly description: "Group ID";
|
|
1099
|
-
readonly validate:
|
|
1099
|
+
readonly validate: (value: string) => GroupId;
|
|
1100
1100
|
};
|
|
1101
1101
|
readonly name: {
|
|
1102
1102
|
readonly type: "string";
|
|
@@ -1107,7 +1107,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1107
1107
|
readonly tenantId: {
|
|
1108
1108
|
readonly type: "string";
|
|
1109
1109
|
readonly description: "Tenant ID";
|
|
1110
|
-
readonly validate:
|
|
1110
|
+
readonly validate: (value: string) => TenantId;
|
|
1111
1111
|
};
|
|
1112
1112
|
readonly name: {
|
|
1113
1113
|
readonly type: "string";
|
|
@@ -1118,7 +1118,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1118
1118
|
readonly mappingRuleId: {
|
|
1119
1119
|
readonly type: "string";
|
|
1120
1120
|
readonly description: "Mapping rule ID";
|
|
1121
|
-
readonly validate:
|
|
1121
|
+
readonly validate: (value: string) => MappingRuleId;
|
|
1122
1122
|
};
|
|
1123
1123
|
readonly name: {
|
|
1124
1124
|
readonly type: "string";
|
|
@@ -1181,32 +1181,32 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1181
1181
|
user: readonly [{
|
|
1182
1182
|
readonly name: "username";
|
|
1183
1183
|
readonly required: true;
|
|
1184
|
-
readonly validate:
|
|
1184
|
+
readonly validate: (value: string) => Username;
|
|
1185
1185
|
}];
|
|
1186
1186
|
role: readonly [{
|
|
1187
1187
|
readonly name: "roleId";
|
|
1188
1188
|
readonly required: true;
|
|
1189
|
-
readonly validate:
|
|
1189
|
+
readonly validate: (value: string) => RoleId;
|
|
1190
1190
|
}];
|
|
1191
1191
|
group: readonly [{
|
|
1192
1192
|
readonly name: "groupId";
|
|
1193
1193
|
readonly required: true;
|
|
1194
|
-
readonly validate:
|
|
1194
|
+
readonly validate: (value: string) => GroupId;
|
|
1195
1195
|
}];
|
|
1196
1196
|
tenant: readonly [{
|
|
1197
1197
|
readonly name: "tenantId";
|
|
1198
1198
|
readonly required: true;
|
|
1199
|
-
readonly validate:
|
|
1199
|
+
readonly validate: (value: string) => TenantId;
|
|
1200
1200
|
}];
|
|
1201
1201
|
authorization: readonly [{
|
|
1202
1202
|
readonly name: "authorizationKey";
|
|
1203
1203
|
readonly required: true;
|
|
1204
|
-
readonly validate:
|
|
1204
|
+
readonly validate: (value: string) => AuthorizationKey;
|
|
1205
1205
|
}];
|
|
1206
1206
|
"mapping-rule": readonly [{
|
|
1207
1207
|
readonly name: "mappingRuleId";
|
|
1208
1208
|
readonly required: true;
|
|
1209
|
-
readonly validate:
|
|
1209
|
+
readonly validate: (value: string) => MappingRuleId;
|
|
1210
1210
|
}];
|
|
1211
1211
|
};
|
|
1212
1212
|
};
|
|
@@ -1224,7 +1224,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1224
1224
|
"process-instance": readonly [{
|
|
1225
1225
|
readonly name: "key";
|
|
1226
1226
|
readonly required: true;
|
|
1227
|
-
readonly validate:
|
|
1227
|
+
readonly validate: (value: string) => ProcessInstanceKey;
|
|
1228
1228
|
}];
|
|
1229
1229
|
};
|
|
1230
1230
|
};
|
|
@@ -1245,7 +1245,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1245
1245
|
processDefinitionId: {
|
|
1246
1246
|
type: "string";
|
|
1247
1247
|
description: string;
|
|
1248
|
-
validate:
|
|
1248
|
+
validate: (value: string) => ProcessDefinitionId;
|
|
1249
1249
|
};
|
|
1250
1250
|
id: {
|
|
1251
1251
|
type: "string";
|
|
@@ -1258,7 +1258,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1258
1258
|
businessId: {
|
|
1259
1259
|
type: "string";
|
|
1260
1260
|
description: string;
|
|
1261
|
-
validate:
|
|
1261
|
+
validate: (value: string) => BusinessId;
|
|
1262
1262
|
};
|
|
1263
1263
|
variables: {
|
|
1264
1264
|
type: "string";
|
|
@@ -1293,12 +1293,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1293
1293
|
"user-task": readonly [{
|
|
1294
1294
|
readonly name: "key";
|
|
1295
1295
|
readonly required: true;
|
|
1296
|
-
readonly validate:
|
|
1296
|
+
readonly validate: (value: string) => UserTaskKey;
|
|
1297
1297
|
}];
|
|
1298
1298
|
job: readonly [{
|
|
1299
1299
|
readonly name: "key";
|
|
1300
1300
|
readonly required: true;
|
|
1301
|
-
readonly validate:
|
|
1301
|
+
readonly validate: (value: string) => JobKey;
|
|
1302
1302
|
}];
|
|
1303
1303
|
};
|
|
1304
1304
|
};
|
|
@@ -1324,7 +1324,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1324
1324
|
job: readonly [{
|
|
1325
1325
|
readonly name: "key";
|
|
1326
1326
|
readonly required: true;
|
|
1327
|
-
readonly validate:
|
|
1327
|
+
readonly validate: (value: string) => JobKey;
|
|
1328
1328
|
}];
|
|
1329
1329
|
};
|
|
1330
1330
|
};
|
|
@@ -1354,7 +1354,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1354
1354
|
job: readonly [{
|
|
1355
1355
|
readonly name: "key";
|
|
1356
1356
|
readonly required: true;
|
|
1357
|
-
readonly validate:
|
|
1357
|
+
readonly validate: (value: string) => JobKey;
|
|
1358
1358
|
}];
|
|
1359
1359
|
};
|
|
1360
1360
|
helpExamples: {
|
|
@@ -1412,7 +1412,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1412
1412
|
incident: readonly [{
|
|
1413
1413
|
readonly name: "key";
|
|
1414
1414
|
readonly required: true;
|
|
1415
|
-
readonly validate:
|
|
1415
|
+
readonly validate: (value: string) => IncidentKey;
|
|
1416
1416
|
}];
|
|
1417
1417
|
};
|
|
1418
1418
|
};
|
|
@@ -1503,7 +1503,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1503
1503
|
variable: readonly [{
|
|
1504
1504
|
readonly name: "key";
|
|
1505
1505
|
readonly required: true;
|
|
1506
|
-
readonly validate:
|
|
1506
|
+
readonly validate: (value: string) => ElementInstanceKey;
|
|
1507
1507
|
}];
|
|
1508
1508
|
};
|
|
1509
1509
|
};
|
|
@@ -1552,7 +1552,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1552
1552
|
businessId: {
|
|
1553
1553
|
type: "string";
|
|
1554
1554
|
description: string;
|
|
1555
|
-
validate:
|
|
1555
|
+
validate: (value: string) => BusinessId;
|
|
1556
1556
|
};
|
|
1557
1557
|
variables: {
|
|
1558
1558
|
type: "string";
|
|
@@ -1599,22 +1599,22 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1599
1599
|
role: readonly [{
|
|
1600
1600
|
readonly name: "roleId";
|
|
1601
1601
|
readonly required: true;
|
|
1602
|
-
readonly validate:
|
|
1602
|
+
readonly validate: (value: string) => RoleId;
|
|
1603
1603
|
}];
|
|
1604
1604
|
user: readonly [{
|
|
1605
1605
|
readonly name: "username";
|
|
1606
1606
|
readonly required: true;
|
|
1607
|
-
readonly validate:
|
|
1607
|
+
readonly validate: (value: string) => Username;
|
|
1608
1608
|
}];
|
|
1609
1609
|
group: readonly [{
|
|
1610
1610
|
readonly name: "groupId";
|
|
1611
1611
|
readonly required: true;
|
|
1612
|
-
readonly validate:
|
|
1612
|
+
readonly validate: (value: string) => GroupId;
|
|
1613
1613
|
}];
|
|
1614
1614
|
"mapping-rule": readonly [{
|
|
1615
1615
|
readonly name: "mappingRuleId";
|
|
1616
1616
|
readonly required: true;
|
|
1617
|
-
readonly validate:
|
|
1617
|
+
readonly validate: (value: string) => MappingRuleId;
|
|
1618
1618
|
}];
|
|
1619
1619
|
};
|
|
1620
1620
|
};
|
|
@@ -1653,22 +1653,22 @@ export declare const COMMAND_REGISTRY: {
|
|
|
1653
1653
|
role: readonly [{
|
|
1654
1654
|
readonly name: "roleId";
|
|
1655
1655
|
readonly required: true;
|
|
1656
|
-
readonly validate:
|
|
1656
|
+
readonly validate: (value: string) => RoleId;
|
|
1657
1657
|
}];
|
|
1658
1658
|
user: readonly [{
|
|
1659
1659
|
readonly name: "username";
|
|
1660
1660
|
readonly required: true;
|
|
1661
|
-
readonly validate:
|
|
1661
|
+
readonly validate: (value: string) => Username;
|
|
1662
1662
|
}];
|
|
1663
1663
|
group: readonly [{
|
|
1664
1664
|
readonly name: "groupId";
|
|
1665
1665
|
readonly required: true;
|
|
1666
|
-
readonly validate:
|
|
1666
|
+
readonly validate: (value: string) => GroupId;
|
|
1667
1667
|
}];
|
|
1668
1668
|
"mapping-rule": readonly [{
|
|
1669
1669
|
readonly name: "mappingRuleId";
|
|
1670
1670
|
readonly required: true;
|
|
1671
|
-
readonly validate:
|
|
1671
|
+
readonly validate: (value: string) => MappingRuleId;
|
|
1672
1672
|
}];
|
|
1673
1673
|
};
|
|
1674
1674
|
};
|