@camunda8/orchestration-cluster-api 10.0.0-alpha.50 → 10.0.0-alpha.51
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/CHANGELOG.md +7 -0
- package/dist/{CamundaClient-DuZf_I-y.d.ts → CamundaClient-OXKUnqNo.d.ts} +21 -5
- package/dist/{CamundaClient-DBZ5xkfB.d.cts → CamundaClient-l7Fr9q7O.d.cts} +21 -5
- package/dist/{chunk-GMNYLSVD.js → chunk-YSF65QLU.js} +56 -58
- package/dist/chunk-YSF65QLU.js.map +1 -0
- package/dist/effect/index.cjs +54 -53
- package/dist/effect/index.cjs.map +1 -1
- package/dist/effect/index.d.cts +1 -1
- package/dist/effect/index.d.ts +1 -1
- package/dist/effect/index.js +1 -2
- package/dist/effect/index.js.map +1 -1
- package/dist/index.cjs +55 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/logger.js +0 -1
- package/dist/runtime/platform/browser.cjs +31 -0
- package/dist/runtime/platform/browser.cjs.map +1 -0
- package/dist/runtime/platform/browser.d.cts +13 -0
- package/dist/runtime/platform/browser.d.ts +13 -0
- package/dist/runtime/platform/browser.js +6 -0
- package/dist/runtime/platform/browser.js.map +1 -0
- package/dist/runtime/platform/node.cjs +57 -0
- package/dist/runtime/platform/node.cjs.map +1 -0
- package/dist/runtime/platform/node.d.cts +13 -0
- package/dist/runtime/platform/node.d.ts +13 -0
- package/dist/runtime/platform/node.js +22 -0
- package/dist/runtime/platform/node.js.map +1 -0
- package/dist/types-CFJMx8u5.d.cts +35 -0
- package/dist/types-CFJMx8u5.d.ts +35 -0
- package/dist/{zod.gen-PGIXLAJW.js → zod.gen-3QBNYVN3.js} +1 -3
- package/dist/{zod.gen-PGIXLAJW.js.map → zod.gen-3QBNYVN3.js.map} +1 -1
- package/package.json +17 -4
- package/dist/chunk-DGUM43GV.js +0 -11
- package/dist/chunk-DGUM43GV.js.map +0 -1
- package/dist/chunk-GMNYLSVD.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [10.0.0-alpha.51](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.50...v10.0.0-alpha.51) (2026-10-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* make the sdk bundleable for browsers via a #platform seam ([#538](https://github.com/camunda/orchestration-cluster-api-js/issues/538)) ([2270fd3](https://github.com/camunda/orchestration-cluster-api-js/commit/2270fd39b9fe1ad86816b95d7837faf30f162b13)), closes [#platform](https://github.com/camunda/orchestration-cluster-api-js/issues/platform) [#537](https://github.com/camunda/orchestration-cluster-api-js/issues/537) [#platform](https://github.com/camunda/orchestration-cluster-api-js/issues/platform) [#platform](https://github.com/camunda/orchestration-cluster-api-js/issues/platform) [#platform](https://github.com/camunda/orchestration-cluster-api-js/issues/platform) [#platform](https://github.com/camunda/orchestration-cluster-api-js/issues/platform) [#platform](https://github.com/camunda/orchestration-cluster-api-js/issues/platform) [#platform](https://github.com/camunda/orchestration-cluster-api-js/issues/platform)
|
|
7
|
+
|
|
1
8
|
# [10.0.0-alpha.50](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.49...v10.0.0-alpha.50) (2026-09-30)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -17972,6 +17972,13 @@ type CancelProcessInstanceErrors = {
|
|
|
17972
17972
|
* The process instance is not found.
|
|
17973
17973
|
*/
|
|
17974
17974
|
404: ProblemDetail;
|
|
17975
|
+
/**
|
|
17976
|
+
* The process instance cannot be canceled, for example because it is already being
|
|
17977
|
+
* terminated or because it is a child process instance.
|
|
17978
|
+
* More details are provided in the response body.
|
|
17979
|
+
*
|
|
17980
|
+
*/
|
|
17981
|
+
409: ProblemDetail;
|
|
17975
17982
|
/**
|
|
17976
17983
|
* An internal error occurred while processing the request.
|
|
17977
17984
|
*/
|
|
@@ -23109,7 +23116,8 @@ interface TelemetryRetryEvent {
|
|
|
23109
23116
|
* Each thread is generic — the handler module path is sent with each job message,
|
|
23110
23117
|
* and threads cache loaded handlers by module path.
|
|
23111
23118
|
*
|
|
23112
|
-
*
|
|
23119
|
+
* Node built-ins come from the `#platform` seam, so browser bundles never see a
|
|
23120
|
+
* `node:` specifier (the browser build resolves `node` to `undefined`).
|
|
23113
23121
|
*/
|
|
23114
23122
|
|
|
23115
23123
|
/**
|
|
@@ -24834,8 +24842,12 @@ declare const createProcessInstance: <ThrowOnError extends boolean = true>(optio
|
|
|
24834
24842
|
* Cancel process instances (batch)
|
|
24835
24843
|
*
|
|
24836
24844
|
* Cancels multiple active or suspended process instances.
|
|
24837
|
-
*
|
|
24838
|
-
*
|
|
24845
|
+
* Only ACTIVE and SUSPENDED root instances can be cancelled. A state filter narrows the batch
|
|
24846
|
+
* to the given states. Requesting any state other than ACTIVE or SUSPENDED through the `$eq` or
|
|
24847
|
+
* `$in` operators is rejected. Other state operators (`$neq`, `$exists`, `$like`) are applied as
|
|
24848
|
+
* given, and the batch remains limited to ACTIVE and SUSPENDED instances. Without a state filter,
|
|
24849
|
+
* both ACTIVE and SUSPENDED instances are selected. Any given filter for parentProcessInstanceKey
|
|
24850
|
+
* is ignored and overridden during this batch operation.
|
|
24839
24851
|
* This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).
|
|
24840
24852
|
*
|
|
24841
24853
|
*/
|
|
@@ -29130,8 +29142,12 @@ declare class CamundaClientBase {
|
|
|
29130
29142
|
* Cancel process instances (batch)
|
|
29131
29143
|
*
|
|
29132
29144
|
* Cancels multiple active or suspended process instances.
|
|
29133
|
-
*
|
|
29134
|
-
*
|
|
29145
|
+
* Only ACTIVE and SUSPENDED root instances can be cancelled. A state filter narrows the batch
|
|
29146
|
+
* to the given states. Requesting any state other than ACTIVE or SUSPENDED through the `$eq` or
|
|
29147
|
+
* `$in` operators is rejected. Other state operators (`$neq`, `$exists`, `$like`) are applied as
|
|
29148
|
+
* given, and the batch remains limited to ACTIVE and SUSPENDED instances. Without a state filter,
|
|
29149
|
+
* both ACTIVE and SUSPENDED instances are selected. Any given filter for parentProcessInstanceKey
|
|
29150
|
+
* is ignored and overridden during this batch operation.
|
|
29135
29151
|
* This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).
|
|
29136
29152
|
*
|
|
29137
29153
|
*
|
|
@@ -17972,6 +17972,13 @@ type CancelProcessInstanceErrors = {
|
|
|
17972
17972
|
* The process instance is not found.
|
|
17973
17973
|
*/
|
|
17974
17974
|
404: ProblemDetail;
|
|
17975
|
+
/**
|
|
17976
|
+
* The process instance cannot be canceled, for example because it is already being
|
|
17977
|
+
* terminated or because it is a child process instance.
|
|
17978
|
+
* More details are provided in the response body.
|
|
17979
|
+
*
|
|
17980
|
+
*/
|
|
17981
|
+
409: ProblemDetail;
|
|
17975
17982
|
/**
|
|
17976
17983
|
* An internal error occurred while processing the request.
|
|
17977
17984
|
*/
|
|
@@ -23109,7 +23116,8 @@ interface TelemetryRetryEvent {
|
|
|
23109
23116
|
* Each thread is generic — the handler module path is sent with each job message,
|
|
23110
23117
|
* and threads cache loaded handlers by module path.
|
|
23111
23118
|
*
|
|
23112
|
-
*
|
|
23119
|
+
* Node built-ins come from the `#platform` seam, so browser bundles never see a
|
|
23120
|
+
* `node:` specifier (the browser build resolves `node` to `undefined`).
|
|
23113
23121
|
*/
|
|
23114
23122
|
|
|
23115
23123
|
/**
|
|
@@ -24834,8 +24842,12 @@ declare const createProcessInstance: <ThrowOnError extends boolean = true>(optio
|
|
|
24834
24842
|
* Cancel process instances (batch)
|
|
24835
24843
|
*
|
|
24836
24844
|
* Cancels multiple active or suspended process instances.
|
|
24837
|
-
*
|
|
24838
|
-
*
|
|
24845
|
+
* Only ACTIVE and SUSPENDED root instances can be cancelled. A state filter narrows the batch
|
|
24846
|
+
* to the given states. Requesting any state other than ACTIVE or SUSPENDED through the `$eq` or
|
|
24847
|
+
* `$in` operators is rejected. Other state operators (`$neq`, `$exists`, `$like`) are applied as
|
|
24848
|
+
* given, and the batch remains limited to ACTIVE and SUSPENDED instances. Without a state filter,
|
|
24849
|
+
* both ACTIVE and SUSPENDED instances are selected. Any given filter for parentProcessInstanceKey
|
|
24850
|
+
* is ignored and overridden during this batch operation.
|
|
24839
24851
|
* This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).
|
|
24840
24852
|
*
|
|
24841
24853
|
*/
|
|
@@ -29130,8 +29142,12 @@ declare class CamundaClientBase {
|
|
|
29130
29142
|
* Cancel process instances (batch)
|
|
29131
29143
|
*
|
|
29132
29144
|
* Cancels multiple active or suspended process instances.
|
|
29133
|
-
*
|
|
29134
|
-
*
|
|
29145
|
+
* Only ACTIVE and SUSPENDED root instances can be cancelled. A state filter narrows the batch
|
|
29146
|
+
* to the given states. Requesting any state other than ACTIVE or SUSPENDED through the `$eq` or
|
|
29147
|
+
* `$in` operators is rejected. Other state operators (`$neq`, `$exists`, `$like`) are applied as
|
|
29148
|
+
* given, and the batch remains limited to ACTIVE and SUSPENDED instances. Without a state filter,
|
|
29149
|
+
* both ACTIVE and SUSPENDED instances are selected. Any given filter for parentProcessInstanceKey
|
|
29150
|
+
* is ignored and overridden during this batch operation.
|
|
29135
29151
|
* This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).
|
|
29136
29152
|
*
|
|
29137
29153
|
*
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger
|
|
3
3
|
} from "./chunk-LXWPMQOS.js";
|
|
4
|
-
import {
|
|
5
|
-
__require
|
|
6
|
-
} from "./chunk-DGUM43GV.js";
|
|
7
4
|
|
|
8
5
|
// src/runtime/clock.ts
|
|
9
6
|
var SLEW_DIVISOR = 16;
|
|
@@ -965,6 +962,9 @@ function paginate(fetchPage, body, opts = {}) {
|
|
|
965
962
|
};
|
|
966
963
|
}
|
|
967
964
|
|
|
965
|
+
// src/gen/CamundaClient.ts
|
|
966
|
+
import { node as node6 } from "#platform";
|
|
967
|
+
|
|
968
968
|
// src/gen/core/serverSentEvents.gen.ts
|
|
969
969
|
var __STANDARD_REQUEST_INIT_KEYS = [
|
|
970
970
|
"method",
|
|
@@ -1244,7 +1244,7 @@ var serializeObjectParam = ({
|
|
|
1244
1244
|
|
|
1245
1245
|
// src/gen/core/utils.gen.ts
|
|
1246
1246
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
1247
|
-
var defaultPathSerializer = ({ path
|
|
1247
|
+
var defaultPathSerializer = ({ path, url: _url }) => {
|
|
1248
1248
|
let url = _url;
|
|
1249
1249
|
const matches = _url.match(PATH_PARAM_RE);
|
|
1250
1250
|
if (matches) {
|
|
@@ -1263,7 +1263,7 @@ var defaultPathSerializer = ({ path: path2, url: _url }) => {
|
|
|
1263
1263
|
name = name.substring(1);
|
|
1264
1264
|
style = "matrix";
|
|
1265
1265
|
}
|
|
1266
|
-
const value =
|
|
1266
|
+
const value = path[name];
|
|
1267
1267
|
if (value === void 0 || value === null) {
|
|
1268
1268
|
continue;
|
|
1269
1269
|
}
|
|
@@ -1304,15 +1304,15 @@ var defaultPathSerializer = ({ path: path2, url: _url }) => {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
var getUrl = ({
|
|
1306
1306
|
baseUrl,
|
|
1307
|
-
path
|
|
1307
|
+
path,
|
|
1308
1308
|
query,
|
|
1309
1309
|
querySerializer,
|
|
1310
1310
|
url: _url
|
|
1311
1311
|
}) => {
|
|
1312
1312
|
const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
|
|
1313
1313
|
let url = (baseUrl ?? "") + pathUrl;
|
|
1314
|
-
if (
|
|
1315
|
-
url = defaultPathSerializer({ path
|
|
1314
|
+
if (path) {
|
|
1315
|
+
url = defaultPathSerializer({ path, url });
|
|
1316
1316
|
}
|
|
1317
1317
|
let search = query ? querySerializer(query) : "";
|
|
1318
1318
|
if (search.startsWith("?")) {
|
|
@@ -4060,6 +4060,7 @@ var getVariable = (options) => (options.client ?? client).get({
|
|
|
4060
4060
|
});
|
|
4061
4061
|
|
|
4062
4062
|
// src/runtime/auth.ts
|
|
4063
|
+
import { node } from "#platform";
|
|
4063
4064
|
var CamundaAuthError = class extends Error {
|
|
4064
4065
|
constructor(code, message, cause) {
|
|
4065
4066
|
super(`${code}: ${message}`);
|
|
@@ -4115,11 +4116,10 @@ var OAuthManager = class {
|
|
|
4115
4116
|
} catch {
|
|
4116
4117
|
}
|
|
4117
4118
|
}
|
|
4118
|
-
if (!this.session && this.cfg.oauth.cacheDir && this.isNode()) {
|
|
4119
|
+
if (!this.session && this.cfg.oauth.cacheDir && node && this.isNode()) {
|
|
4119
4120
|
try {
|
|
4120
|
-
const fs =
|
|
4121
|
-
const
|
|
4122
|
-
const file = path2.join(this.cfg.oauth.cacheDir, `${this.storageKey}.json`);
|
|
4121
|
+
const { fs, path } = node;
|
|
4122
|
+
const file = path.join(this.cfg.oauth.cacheDir, `${this.storageKey}.json`);
|
|
4123
4123
|
if (fs.existsSync(file)) {
|
|
4124
4124
|
const raw = fs.readFileSync(file, "utf8");
|
|
4125
4125
|
this.token = JSON.parse(raw);
|
|
@@ -4135,13 +4135,12 @@ var OAuthManager = class {
|
|
|
4135
4135
|
this.session.setItem(this.storageKey, JSON.stringify(this.token));
|
|
4136
4136
|
} catch {
|
|
4137
4137
|
}
|
|
4138
|
-
} else if (this.cfg.oauth.cacheDir && this.isNode()) {
|
|
4138
|
+
} else if (this.cfg.oauth.cacheDir && node && this.isNode()) {
|
|
4139
4139
|
try {
|
|
4140
|
-
const fs =
|
|
4141
|
-
const path2 = __require("path");
|
|
4140
|
+
const { fs, path } = node;
|
|
4142
4141
|
if (!fs.existsSync(this.cfg.oauth.cacheDir))
|
|
4143
4142
|
fs.mkdirSync(this.cfg.oauth.cacheDir, { recursive: true });
|
|
4144
|
-
const file =
|
|
4143
|
+
const file = path.join(this.cfg.oauth.cacheDir, `${this.storageKey}.json`);
|
|
4145
4144
|
const tmp = `${file}.tmp`;
|
|
4146
4145
|
fs.writeFileSync(tmp, JSON.stringify(this.token), { mode: 384 });
|
|
4147
4146
|
fs.renameSync(tmp, file);
|
|
@@ -4191,11 +4190,10 @@ var OAuthManager = class {
|
|
|
4191
4190
|
if (opts.disk) {
|
|
4192
4191
|
if (this.session) {
|
|
4193
4192
|
this.session.removeItem(this.storageKey);
|
|
4194
|
-
} else if (this.cfg.oauth.cacheDir && this.isNode()) {
|
|
4193
|
+
} else if (this.cfg.oauth.cacheDir && node && this.isNode()) {
|
|
4195
4194
|
try {
|
|
4196
|
-
const fs =
|
|
4197
|
-
const
|
|
4198
|
-
const file = path2.join(this.cfg.oauth.cacheDir, `${this.storageKey}.json`);
|
|
4195
|
+
const { fs, path } = node;
|
|
4196
|
+
const file = path.join(this.cfg.oauth.cacheDir, `${this.storageKey}.json`);
|
|
4199
4197
|
if (fs.existsSync(file)) fs.unlinkSync(file);
|
|
4200
4198
|
} catch {
|
|
4201
4199
|
}
|
|
@@ -4399,17 +4397,14 @@ function createAuthFacade(config, opts) {
|
|
|
4399
4397
|
else if (cfg.auth.strategy === "BASIC") basic = new BasicAuthManager(cfg);
|
|
4400
4398
|
const fetcher = (input, init) => opts?.fetch ? opts.fetch(input, init) : fetch(input, init);
|
|
4401
4399
|
let nodeAgent = null;
|
|
4402
|
-
if (cfg.mtls && typeof process !== "undefined" && process.versions?.node) {
|
|
4400
|
+
if (cfg.mtls && node && typeof process !== "undefined" && process.versions?.node) {
|
|
4403
4401
|
try {
|
|
4404
|
-
const fs =
|
|
4405
|
-
const https = __require("https");
|
|
4402
|
+
const { fs, https } = node;
|
|
4406
4403
|
const material = {};
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
if (cfg.mtls.key || cfg.mtls.keyPath)
|
|
4410
|
-
|
|
4411
|
-
if (cfg.mtls.ca || cfg.mtls.caPath)
|
|
4412
|
-
material.ca = cfg.mtls.ca || fs.readFileSync(cfg.mtls.caPath, "utf8");
|
|
4404
|
+
const pem = (inline, path) => inline || (path ? fs.readFileSync(path, "utf8") : inline);
|
|
4405
|
+
if (cfg.mtls.cert || cfg.mtls.certPath) material.cert = pem(cfg.mtls.cert, cfg.mtls.certPath);
|
|
4406
|
+
if (cfg.mtls.key || cfg.mtls.keyPath) material.key = pem(cfg.mtls.key, cfg.mtls.keyPath);
|
|
4407
|
+
if (cfg.mtls.ca || cfg.mtls.caPath) material.ca = pem(cfg.mtls.ca, cfg.mtls.caPath);
|
|
4413
4408
|
if (cfg.mtls.keyPassphrase) material.passphrase = cfg.mtls.keyPassphrase;
|
|
4414
4409
|
nodeAgent = new https.Agent(material);
|
|
4415
4410
|
try {
|
|
@@ -4459,7 +4454,6 @@ function createAuthFacade(config, opts) {
|
|
|
4459
4454
|
}
|
|
4460
4455
|
|
|
4461
4456
|
// src/runtime/unifiedConfiguration.ts
|
|
4462
|
-
import path from "path";
|
|
4463
4457
|
import { createEnv } from "typed-env";
|
|
4464
4458
|
|
|
4465
4459
|
// src/runtime/configSchema.ts
|
|
@@ -4718,6 +4712,7 @@ function allKeys() {
|
|
|
4718
4712
|
}
|
|
4719
4713
|
|
|
4720
4714
|
// src/runtime/unifiedConfiguration.ts
|
|
4715
|
+
import { node as node2 } from "#platform";
|
|
4721
4716
|
var CamundaConfigurationError = class extends Error {
|
|
4722
4717
|
errors;
|
|
4723
4718
|
constructor(errors) {
|
|
@@ -5176,7 +5171,7 @@ function hydrateConfig(options = {}) {
|
|
|
5176
5171
|
},
|
|
5177
5172
|
supportLog: {
|
|
5178
5173
|
enabled: reqBool("CAMUNDA_SUPPORT_LOG_ENABLED"),
|
|
5179
|
-
filePath: rawMap.CAMUNDA_SUPPORT_LOG_FILE_PATH || (typeof process !== "undefined" && typeof process.cwd === "function" ? path.join(process.cwd(), "camunda-support.log") : "camunda-support.log")
|
|
5174
|
+
filePath: rawMap.CAMUNDA_SUPPORT_LOG_FILE_PATH || (node2 && typeof process !== "undefined" && typeof process.cwd === "function" ? node2.path.join(process.cwd(), "camunda-support.log") : "camunda-support.log")
|
|
5180
5175
|
},
|
|
5181
5176
|
workerDefaults: rawMap.CAMUNDA_WORKER_TIMEOUT || rawMap.CAMUNDA_WORKER_MAX_CONCURRENT_JOBS || rawMap.CAMUNDA_WORKER_REQUEST_TIMEOUT || rawMap.CAMUNDA_WORKER_NAME || rawMap.CAMUNDA_WORKER_STARTUP_JITTER_MAX_SECONDS ? {
|
|
5182
5177
|
jobTimeoutMs: rawMap.CAMUNDA_WORKER_TIMEOUT ? parseInt(rawMap.CAMUNDA_WORKER_TIMEOUT, 10) : void 0,
|
|
@@ -5443,9 +5438,10 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
|
|
|
5443
5438
|
}
|
|
5444
5439
|
|
|
5445
5440
|
// src/runtime/version.ts
|
|
5446
|
-
var packageVersion = "10.0.0-alpha.
|
|
5441
|
+
var packageVersion = "10.0.0-alpha.51";
|
|
5447
5442
|
|
|
5448
5443
|
// src/runtime/supportLogger.ts
|
|
5444
|
+
import { node as node3 } from "#platform";
|
|
5449
5445
|
var NoopSupportLogger = class {
|
|
5450
5446
|
log(_message, _addTimestamp = true) {
|
|
5451
5447
|
}
|
|
@@ -5498,9 +5494,9 @@ var CamundaSupportLogger = class {
|
|
|
5498
5494
|
constructor(config) {
|
|
5499
5495
|
const enabled = !!config.supportLog?.enabled;
|
|
5500
5496
|
this.enabled = enabled;
|
|
5501
|
-
this.filepath = config.supportLog?.filePath || (typeof process !== "undefined" ?
|
|
5502
|
-
if (!this.enabled || !isNode()) return;
|
|
5503
|
-
const fs =
|
|
5497
|
+
this.filepath = config.supportLog?.filePath || (node3 && typeof process !== "undefined" ? node3.path.join(process.cwd(), "camunda-support.log") : "camunda-support.log");
|
|
5498
|
+
if (!this.enabled || !isNode() || !node3) return;
|
|
5499
|
+
const { fs } = node3;
|
|
5504
5500
|
if (fs.existsSync(this.filepath)) {
|
|
5505
5501
|
let n = 1;
|
|
5506
5502
|
const base = this.filepath;
|
|
@@ -5517,8 +5513,8 @@ var CamundaSupportLogger = class {
|
|
|
5517
5513
|
writeSupportLogPreamble(this, config);
|
|
5518
5514
|
}
|
|
5519
5515
|
log(message, addTimestamp = true) {
|
|
5520
|
-
if (!this.enabled || !isNode()) return;
|
|
5521
|
-
const fs =
|
|
5516
|
+
if (!this.enabled || !isNode() || !node3) return;
|
|
5517
|
+
const { fs } = node3;
|
|
5522
5518
|
const msg = typeof message === "object" ? safeStringify(message) : String(message);
|
|
5523
5519
|
const line = addTimestamp ? `[${(/* @__PURE__ */ new Date()).toISOString()}]: ${msg}
|
|
5524
5520
|
` : `${msg}
|
|
@@ -5561,7 +5557,8 @@ function writeSupportLogPreamble(logger, config) {
|
|
|
5561
5557
|
);
|
|
5562
5558
|
logger.log(`Camunda SDK version: ${packageVersion}`, false);
|
|
5563
5559
|
try {
|
|
5564
|
-
|
|
5560
|
+
if (!node3) throw new Error("node:os unavailable");
|
|
5561
|
+
const { os } = node3;
|
|
5565
5562
|
const osInfo = {
|
|
5566
5563
|
platform: os.platform(),
|
|
5567
5564
|
release: os.release(),
|
|
@@ -6035,6 +6032,7 @@ async function applySchemaValidation(opts) {
|
|
|
6035
6032
|
|
|
6036
6033
|
// src/runtime/validationExtras.ts
|
|
6037
6034
|
import { ZodObject as ZodObject2 } from "zod";
|
|
6035
|
+
import { node as node4 } from "#platform";
|
|
6038
6036
|
var seenCaptures = /* @__PURE__ */ new Set();
|
|
6039
6037
|
function hash(str) {
|
|
6040
6038
|
let h = 0, i = 0;
|
|
@@ -6047,7 +6045,7 @@ function detectExtrasAndMaybeThrow(opts) {
|
|
|
6047
6045
|
if (!value || typeof value !== "object") return;
|
|
6048
6046
|
if (!schema || !(schema instanceof ZodObject2)) return;
|
|
6049
6047
|
const extras = {};
|
|
6050
|
-
const visit = (val, sch,
|
|
6048
|
+
const visit = (val, sch, path) => {
|
|
6051
6049
|
if (!val || typeof val !== "object") return;
|
|
6052
6050
|
if (sch instanceof ZodObject2) {
|
|
6053
6051
|
const shape = sch.shape;
|
|
@@ -6055,12 +6053,12 @@ function detectExtrasAndMaybeThrow(opts) {
|
|
|
6055
6053
|
const keys = Object.keys(val);
|
|
6056
6054
|
const unknown = keys.filter((k) => !expected.has(k));
|
|
6057
6055
|
if (unknown.length) {
|
|
6058
|
-
extras[
|
|
6056
|
+
extras[path || "/"] = unknown;
|
|
6059
6057
|
}
|
|
6060
6058
|
if (settings.deep) {
|
|
6061
6059
|
for (const k of keys) {
|
|
6062
6060
|
if (expected.has(k)) {
|
|
6063
|
-
visit(val[k], shape[k],
|
|
6061
|
+
visit(val[k], shape[k], path ? `${path}.${k}` : k);
|
|
6064
6062
|
}
|
|
6065
6063
|
}
|
|
6066
6064
|
}
|
|
@@ -6079,8 +6077,8 @@ function detectExtrasAndMaybeThrow(opts) {
|
|
|
6079
6077
|
}
|
|
6080
6078
|
if (settings.captureDir) {
|
|
6081
6079
|
try {
|
|
6082
|
-
|
|
6083
|
-
const pathMod =
|
|
6080
|
+
if (!node4) throw new Error("node:fs unavailable");
|
|
6081
|
+
const { fs, path: pathMod } = node4;
|
|
6084
6082
|
if (!fs.existsSync(settings.captureDir))
|
|
6085
6083
|
fs.mkdirSync(settings.captureDir, { recursive: true, mode: 448 });
|
|
6086
6084
|
const sig = `${operationId}|${flatIssues.sort().join("|")}`;
|
|
@@ -6927,6 +6925,7 @@ function installClientCallHandler(port, client2) {
|
|
|
6927
6925
|
}
|
|
6928
6926
|
|
|
6929
6927
|
// src/runtime/threadPool.ts
|
|
6928
|
+
import { node as node5 } from "#platform";
|
|
6930
6929
|
var ThreadPool = class {
|
|
6931
6930
|
_pool = [];
|
|
6932
6931
|
_pending = /* @__PURE__ */ new Map();
|
|
@@ -6939,6 +6938,9 @@ var ThreadPool = class {
|
|
|
6939
6938
|
_Worker;
|
|
6940
6939
|
_onThreadReady;
|
|
6941
6940
|
constructor(client2, size) {
|
|
6941
|
+
if (!node5) {
|
|
6942
|
+
throw new Error("Threaded job workers are only available in Node.js environments");
|
|
6943
|
+
}
|
|
6942
6944
|
this._client = client2;
|
|
6943
6945
|
this._log = client2.logger().scope("thread-pool");
|
|
6944
6946
|
this._ready = this._init(size);
|
|
@@ -7087,11 +7089,9 @@ var ThreadPool = class {
|
|
|
7087
7089
|
return pw;
|
|
7088
7090
|
}
|
|
7089
7091
|
async _init(requestedSize) {
|
|
7090
|
-
const
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
import("crypto")
|
|
7094
|
-
]);
|
|
7092
|
+
const n = node5;
|
|
7093
|
+
const workerThreads = await n.loadWorkerThreads();
|
|
7094
|
+
const { path: pathMod, crypto, fs, url } = n;
|
|
7095
7095
|
this._Worker = workerThreads.Worker;
|
|
7096
7096
|
const { join } = pathMod;
|
|
7097
7097
|
this._node = {
|
|
@@ -7100,15 +7100,13 @@ var ThreadPool = class {
|
|
|
7100
7100
|
};
|
|
7101
7101
|
const cpus = await (async () => {
|
|
7102
7102
|
try {
|
|
7103
|
-
const os =
|
|
7103
|
+
const { os } = n;
|
|
7104
7104
|
return os.availableParallelism?.() || os.cpus().length;
|
|
7105
7105
|
} catch {
|
|
7106
7106
|
return 4;
|
|
7107
7107
|
}
|
|
7108
7108
|
})();
|
|
7109
7109
|
const size = requestedSize ?? cpus;
|
|
7110
|
-
const fs = await import("fs");
|
|
7111
|
-
const url = await import("url");
|
|
7112
7110
|
const dir = typeof __dirname !== "undefined" ? __dirname : pathMod.dirname(url.fileURLToPath(import.meta.url));
|
|
7113
7111
|
const jsPath = join(dir, "threadWorkerEntry.js");
|
|
7114
7112
|
if (fs.existsSync(jsPath)) {
|
|
@@ -7552,7 +7550,7 @@ var CamundaClientBase = class {
|
|
|
7552
7550
|
_schemasPromise = null;
|
|
7553
7551
|
_loadSchemas() {
|
|
7554
7552
|
if (!this._schemasPromise) {
|
|
7555
|
-
this._schemasPromise = import("./zod.gen-
|
|
7553
|
+
this._schemasPromise = import("./zod.gen-3QBNYVN3.js");
|
|
7556
7554
|
}
|
|
7557
7555
|
return this._schemasPromise;
|
|
7558
7556
|
}
|
|
@@ -21603,13 +21601,13 @@ var CamundaClientBase = class {
|
|
|
21603
21601
|
if (!Array.isArray(resourceFilenames) || resourceFilenames.length === 0) {
|
|
21604
21602
|
throw new Error("resourceFilenames must be a non-empty string[]");
|
|
21605
21603
|
}
|
|
21606
|
-
if (typeof process === "undefined" || !process.versions?.node) {
|
|
21604
|
+
if (!node6 || typeof process === "undefined" || !process.versions?.node) {
|
|
21607
21605
|
throw new Error("deployResourcesFromFiles is only available in Node.js environments");
|
|
21608
21606
|
}
|
|
21609
|
-
const
|
|
21610
|
-
|
|
21611
|
-
|
|
21612
|
-
|
|
21607
|
+
const {
|
|
21608
|
+
fsPromises: { readFile },
|
|
21609
|
+
path: pathMod
|
|
21610
|
+
} = node6;
|
|
21613
21611
|
const mimeFor = (filename) => {
|
|
21614
21612
|
const ext = filename.toLowerCase().split(".").pop() || "";
|
|
21615
21613
|
switch (ext) {
|
|
@@ -21735,4 +21733,4 @@ export {
|
|
|
21735
21733
|
CamundaClientBase,
|
|
21736
21734
|
CamundaClient
|
|
21737
21735
|
};
|
|
21738
|
-
//# sourceMappingURL=chunk-
|
|
21736
|
+
//# sourceMappingURL=chunk-YSF65QLU.js.map
|