@camunda8/orchestration-cluster-api 10.0.0-alpha.45 → 10.0.0-alpha.47
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 +14 -0
- package/dist/{CamundaClient-BiHf6wkM.d.cts → CamundaClient-78u32335.d.cts} +97 -52
- package/dist/{CamundaClient-3psgxgtn.d.ts → CamundaClient-ZgFCv8e5.d.ts} +97 -52
- package/dist/{chunk-B5HJCAHJ.js → chunk-R6I2BEEE.js} +63 -14
- package/dist/chunk-R6I2BEEE.js.map +1 -0
- package/dist/effect/index.cjs +92 -29
- package/dist/effect/index.cjs.map +1 -1
- package/dist/effect/index.d.cts +3 -3
- package/dist/effect/index.d.ts +3 -3
- package/dist/effect/index.js +6 -6
- package/dist/effect/index.js.map +1 -1
- package/dist/index.cjs +88 -25
- 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 -2
- package/dist/index.js.map +1 -1
- package/dist/threadWorkerEntry.cjs +5 -5
- package/dist/threadWorkerEntry.cjs.map +1 -1
- package/dist/threadWorkerEntry.js +5 -5
- package/dist/threadWorkerEntry.js.map +1 -1
- package/dist/{zod.gen-A3RZUVR4.js → zod.gen-YV3IADCI.js} +26 -12
- package/dist/zod.gen-YV3IADCI.js.map +1 -0
- package/package.json +2 -2
- package/dist/chunk-B5HJCAHJ.js.map +0 -1
- package/dist/zod.gen-A3RZUVR4.js.map +0 -1
|
@@ -857,7 +857,7 @@ var JobWorker = class {
|
|
|
857
857
|
errorMessage: e?.message || "Handler error",
|
|
858
858
|
retries: typeof retries === "number" ? Math.max(0, retries - 1) : 0,
|
|
859
859
|
// Fence the failure against a superseded activation when leased.
|
|
860
|
-
...raw.
|
|
860
|
+
...raw.jobLeaseToken != null ? { jobLeaseToken: raw.jobLeaseToken } : {}
|
|
861
861
|
});
|
|
862
862
|
} catch (failErr) {
|
|
863
863
|
this._log.error("job.fail.error", failErr);
|
|
@@ -873,7 +873,7 @@ var JobWorker = class {
|
|
|
873
873
|
jobKey: raw.jobKey,
|
|
874
874
|
errorMessage: msg,
|
|
875
875
|
// Fence the failure against a superseded activation when leased.
|
|
876
|
-
...raw.
|
|
876
|
+
...raw.jobLeaseToken != null ? { jobLeaseToken: raw.jobLeaseToken } : {}
|
|
877
877
|
});
|
|
878
878
|
} catch (e) {
|
|
879
879
|
this._log.error("job.fail.validation.error", e);
|
|
@@ -3882,6 +3882,12 @@ var getClusterStatus = (options) => (options?.client ?? client).get({
|
|
|
3882
3882
|
url: "/cluster/v2/status",
|
|
3883
3883
|
...options
|
|
3884
3884
|
});
|
|
3885
|
+
var getClusterUpgradeStatus = (options) => (options?.client ?? client).get({
|
|
3886
|
+
requestValidator: void 0,
|
|
3887
|
+
responseValidator: void 0,
|
|
3888
|
+
url: "/cluster/v2/status/upgrade",
|
|
3889
|
+
...options
|
|
3890
|
+
});
|
|
3885
3891
|
var getClusterTopology = (options) => (options?.client ?? client).get({
|
|
3886
3892
|
requestValidator: void 0,
|
|
3887
3893
|
responseValidator: void 0,
|
|
@@ -5429,7 +5435,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
|
|
|
5429
5435
|
}
|
|
5430
5436
|
|
|
5431
5437
|
// src/runtime/version.ts
|
|
5432
|
-
var packageVersion = "10.0.0-alpha.
|
|
5438
|
+
var packageVersion = "10.0.0-alpha.47";
|
|
5433
5439
|
|
|
5434
5440
|
// src/runtime/supportLogger.ts
|
|
5435
5441
|
var NoopSupportLogger = class {
|
|
@@ -6482,7 +6488,7 @@ function enrichActivatedJob(raw, client2, log, clock = client2.clock) {
|
|
|
6482
6488
|
variables,
|
|
6483
6489
|
jobKey: raw.jobKey,
|
|
6484
6490
|
...result !== void 0 && { result },
|
|
6485
|
-
...raw.
|
|
6491
|
+
...raw.jobLeaseToken != null ? { jobLeaseToken: raw.jobLeaseToken } : {}
|
|
6486
6492
|
});
|
|
6487
6493
|
} finally {
|
|
6488
6494
|
ack();
|
|
@@ -6494,7 +6500,7 @@ function enrichActivatedJob(raw, client2, log, clock = client2.clock) {
|
|
|
6494
6500
|
await client2.failJob({
|
|
6495
6501
|
...reason,
|
|
6496
6502
|
jobKey: raw.jobKey,
|
|
6497
|
-
...raw.
|
|
6503
|
+
...raw.jobLeaseToken != null ? { jobLeaseToken: raw.jobLeaseToken } : {}
|
|
6498
6504
|
});
|
|
6499
6505
|
} finally {
|
|
6500
6506
|
ack();
|
|
@@ -6506,7 +6512,7 @@ function enrichActivatedJob(raw, client2, log, clock = client2.clock) {
|
|
|
6506
6512
|
await client2.throwJobError({
|
|
6507
6513
|
...error,
|
|
6508
6514
|
jobKey: raw.jobKey,
|
|
6509
|
-
...raw.
|
|
6515
|
+
...raw.jobLeaseToken != null ? { jobLeaseToken: raw.jobLeaseToken } : {}
|
|
6510
6516
|
});
|
|
6511
6517
|
} finally {
|
|
6512
6518
|
ack();
|
|
@@ -6530,12 +6536,12 @@ function enrichActivatedJob(raw, client2, log, clock = client2.clock) {
|
|
|
6530
6536
|
job.modifyJobTimeout = ({ newTimeoutMs }) => client2.updateJob({
|
|
6531
6537
|
changeset: { timeout: newTimeoutMs },
|
|
6532
6538
|
jobKey: raw.jobKey,
|
|
6533
|
-
...raw.
|
|
6539
|
+
...raw.jobLeaseToken != null ? { jobLeaseToken: raw.jobLeaseToken } : {}
|
|
6534
6540
|
});
|
|
6535
6541
|
job.modifyRetries = ({ retries }) => client2.updateJob({
|
|
6536
6542
|
changeset: { retries },
|
|
6537
6543
|
jobKey: raw.jobKey,
|
|
6538
|
-
...raw.
|
|
6544
|
+
...raw.jobLeaseToken != null ? { jobLeaseToken: raw.jobLeaseToken } : {}
|
|
6539
6545
|
});
|
|
6540
6546
|
return job;
|
|
6541
6547
|
}
|
|
@@ -6727,7 +6733,7 @@ var ThreadedJobWorker = class {
|
|
|
6727
6733
|
errorMessage: err?.message || "Thread handler error",
|
|
6728
6734
|
retries: typeof raw.retries === "number" ? Math.max(0, raw.retries - 1) : 0,
|
|
6729
6735
|
// Fence the failure against a superseded activation when leased.
|
|
6730
|
-
...raw.
|
|
6736
|
+
...raw.jobLeaseToken != null ? { jobLeaseToken: raw.jobLeaseToken } : {}
|
|
6731
6737
|
}).catch((failErr) => {
|
|
6732
6738
|
this._log.error("job.fail.error", failErr);
|
|
6733
6739
|
}).finally(() => {
|
|
@@ -6874,7 +6880,7 @@ var ThreadedJobWorker = class {
|
|
|
6874
6880
|
jobKey: raw.jobKey,
|
|
6875
6881
|
errorMessage: msg,
|
|
6876
6882
|
// Fence the failure against a superseded activation when leased.
|
|
6877
|
-
...raw.
|
|
6883
|
+
...raw.jobLeaseToken != null ? { jobLeaseToken: raw.jobLeaseToken } : {}
|
|
6878
6884
|
});
|
|
6879
6885
|
} catch (e) {
|
|
6880
6886
|
this._log.error("job.fail.validation.error", e);
|
|
@@ -7538,7 +7544,7 @@ var CamundaClientBase = class {
|
|
|
7538
7544
|
_schemasPromise = null;
|
|
7539
7545
|
_loadSchemas() {
|
|
7540
7546
|
if (!this._schemasPromise) {
|
|
7541
|
-
this._schemasPromise = import("./zod.gen-
|
|
7547
|
+
this._schemasPromise = import("./zod.gen-YV3IADCI.js");
|
|
7542
7548
|
}
|
|
7543
7549
|
return this._schemasPromise;
|
|
7544
7550
|
}
|
|
@@ -7734,8 +7740,8 @@ var CamundaClientBase = class {
|
|
|
7734
7740
|
}
|
|
7735
7741
|
if (data && data.jobs && _body && _body.withLease === true) {
|
|
7736
7742
|
for (const _el of data.jobs) {
|
|
7737
|
-
if (_el.
|
|
7738
|
-
const _e = new Error("activateJobs: withLease=true was requested but the server returned an item without '
|
|
7743
|
+
if (_el.jobLeaseToken == null) {
|
|
7744
|
+
const _e = new Error("activateJobs: withLease=true was requested but the server returned an item without 'jobLeaseToken' \u2014 the server may predate this feature. Refusing to silently mis-type the dependent field.");
|
|
7739
7745
|
_e.name = "PresentWhenUnsupportedError";
|
|
7740
7746
|
_e.nonRetryable = true;
|
|
7741
7747
|
throw _e;
|
|
@@ -11956,6 +11962,49 @@ var CamundaClientBase = class {
|
|
|
11956
11962
|
return this._invokeWithRetry(() => call(), { opId: "getClusterTopology", exempt: false, retryOverride: options?.retry });
|
|
11957
11963
|
});
|
|
11958
11964
|
}
|
|
11965
|
+
getClusterUpgradeStatus(arg, options) {
|
|
11966
|
+
return toCancelable2(async (signal) => {
|
|
11967
|
+
const opts = { client: this._client, signal, throwOnError: false };
|
|
11968
|
+
const call = async () => {
|
|
11969
|
+
try {
|
|
11970
|
+
const _raw = await getClusterUpgradeStatus(opts);
|
|
11971
|
+
let data = this._evaluateResponse(_raw, "getClusterUpgradeStatus", (resp) => {
|
|
11972
|
+
const st = resp.status ?? resp.response?.status;
|
|
11973
|
+
if (!st) return void 0;
|
|
11974
|
+
const candidate = st === 429 || st === 503 || st === 500;
|
|
11975
|
+
if (!candidate) return void 0;
|
|
11976
|
+
let prob = void 0;
|
|
11977
|
+
if (resp.error && typeof resp.error === "object") prob = resp.error;
|
|
11978
|
+
const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
|
|
11979
|
+
err.status = st;
|
|
11980
|
+
err.name = "HttpSdkError";
|
|
11981
|
+
if (prob) {
|
|
11982
|
+
for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
|
|
11983
|
+
}
|
|
11984
|
+
const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
|
|
11985
|
+
if (!isBp) err.nonRetryable = true;
|
|
11986
|
+
return err;
|
|
11987
|
+
});
|
|
11988
|
+
const _respSchemaName = "zGetClusterUpgradeStatusResponse";
|
|
11989
|
+
if (this._isVoidResponse(_respSchemaName)) {
|
|
11990
|
+
data = void 0;
|
|
11991
|
+
}
|
|
11992
|
+
if (this._validation.settings.res !== "none") {
|
|
11993
|
+
const _schemas = await this._loadSchemas();
|
|
11994
|
+
const _schema = _schemas.zGetClusterUpgradeStatusResponse;
|
|
11995
|
+
if (_schema) {
|
|
11996
|
+
const maybeR = await this._validation.gateResponse("getClusterUpgradeStatus", _schema, data);
|
|
11997
|
+
if (this._validation.settings.res === "strict") data = maybeR;
|
|
11998
|
+
}
|
|
11999
|
+
}
|
|
12000
|
+
return data;
|
|
12001
|
+
} catch (e) {
|
|
12002
|
+
throw e;
|
|
12003
|
+
}
|
|
12004
|
+
};
|
|
12005
|
+
return this._invokeWithRetry(() => call(), { opId: "getClusterUpgradeStatus", exempt: false, retryOverride: options?.retry });
|
|
12006
|
+
});
|
|
12007
|
+
}
|
|
11959
12008
|
getDecisionDefinition(arg, consistencyManagement, options) {
|
|
11960
12009
|
if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
|
|
11961
12010
|
const useConsistency = consistencyManagement.consistency;
|
|
@@ -21677,4 +21726,4 @@ export {
|
|
|
21677
21726
|
createCamundaClient,
|
|
21678
21727
|
CamundaClient
|
|
21679
21728
|
};
|
|
21680
|
-
//# sourceMappingURL=chunk-
|
|
21729
|
+
//# sourceMappingURL=chunk-R6I2BEEE.js.map
|