@camunda8/orchestration-cluster-api 1.2.2 → 1.2.3
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 +8 -2
- package/README.md +25 -0
- package/dist/{chunk-HAWDB7KV.js → chunk-C4KMECWH.js} +5 -3
- package/dist/chunk-C4KMECWH.js.map +1 -0
- package/dist/fp/index.cjs +4 -2
- package/dist/fp/index.cjs.map +1 -1
- package/dist/fp/index.d.cts +1 -1
- package/dist/fp/index.d.ts +1 -1
- package/dist/fp/index.js +1 -1
- package/dist/{index-WJHww8O1.d.cts → index-4i6euXtC.d.cts} +2 -0
- package/dist/{index-Cp8OPyAq.d.ts → index-BozZ_h8n.d.ts} +2 -0
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-HAWDB7KV.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
## [1.2.
|
|
1
|
+
## [1.2.3](https://github.com/camunda/orchestration-cluster-api-js/compare/v1.2.2...v1.2.3) (2025-12-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* support fetchVariables in job worker ([b672d8d](https://github.com/camunda/orchestration-cluster-api-js/commit/b672d8d3ec499624a58d1db2b8e920f3ccc77ebc))
|
|
2
7
|
|
|
8
|
+
## [1.2.2](https://github.com/camunda/orchestration-cluster-api-js/compare/v1.2.1...v1.2.2) (2025-12-01)
|
|
3
9
|
|
|
4
10
|
### Bug Fixes
|
|
5
11
|
|
|
6
|
-
|
|
12
|
+
- set default requestTimeout to 0 ([c18a22a](https://github.com/camunda/orchestration-cluster-api-js/commit/c18a22a0f5dacfcd6b16ac16d8260307a17f87d9))
|
|
7
13
|
|
|
8
14
|
## [1.2.1](https://github.com/camunda/orchestration-cluster-api-js/compare/v1.2.0...v1.2.1) (2025-11-28)
|
|
9
15
|
|
package/README.md
CHANGED
|
@@ -398,6 +398,8 @@ const worker = client.createJobWorker({
|
|
|
398
398
|
maxParallelJobs: 10,
|
|
399
399
|
timeoutMs: 15_000, // long‑poll timeout (server side requestTimeout)
|
|
400
400
|
pollIntervalMs: 100, // delay between polls when no jobs / at capacity
|
|
401
|
+
// Optional: only fetch specific variables during activation
|
|
402
|
+
fetchVariables: ['orderId'],
|
|
401
403
|
inputSchema: Input, // validates incoming variables if validateSchemas true
|
|
402
404
|
outputSchema: Output, // validates variables passed to complete(...)
|
|
403
405
|
validateSchemas: true, // set false for max throughput (skip Zod)
|
|
@@ -416,6 +418,29 @@ process.on('SIGINT', () => {
|
|
|
416
418
|
});
|
|
417
419
|
```
|
|
418
420
|
|
|
421
|
+
Note on variable fetching:
|
|
422
|
+
|
|
423
|
+
- `fetchVariables: string[]` limits variables returned on activated jobs to the specified keys. If omitted, all visible variables at activation scope are returned. This maps to the REST API field `fetchVariable`.
|
|
424
|
+
|
|
425
|
+
TypeScript inference:
|
|
426
|
+
|
|
427
|
+
- When you provide `inputSchema`, the type of `fetchVariables` is constrained to the keys of the inferred `variables` type from that schema. Example:
|
|
428
|
+
|
|
429
|
+
```ts
|
|
430
|
+
const Input = z.object({ orderId: z.string(), amount: z.number() });
|
|
431
|
+
client.createJobWorker({
|
|
432
|
+
jobType: 'process-order',
|
|
433
|
+
maxParallelJobs: 5,
|
|
434
|
+
jobTimeoutMs: 30_000,
|
|
435
|
+
inputSchema: Input,
|
|
436
|
+
// Only allows 'orderId' | 'amount' here at compile-time
|
|
437
|
+
fetchVariables: ['orderId', 'amount'],
|
|
438
|
+
jobHandler: async (job) => job.complete(),
|
|
439
|
+
});
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
- Without `inputSchema`, `fetchVariables` defaults to `string[]`.
|
|
443
|
+
|
|
419
444
|
### Job Handler Semantics
|
|
420
445
|
|
|
421
446
|
Your `jobHandler` must ultimately invoke exactly one of:
|
|
@@ -228,7 +228,9 @@ var JobWorker = class {
|
|
|
228
228
|
worker: this._name,
|
|
229
229
|
maxJobsToActivate: batchSize,
|
|
230
230
|
requestTimeout: this._cfg.pollTimeoutMs ?? DEFAULT_LONGPOLL_TIMEOUT,
|
|
231
|
-
timeout: this._cfg.jobTimeoutMs
|
|
231
|
+
timeout: this._cfg.jobTimeoutMs,
|
|
232
|
+
// API expects `fetchVariable`; map from config `fetchVariables`
|
|
233
|
+
...this._cfg.fetchVariables && this._cfg.fetchVariables.length > 0 ? { fetchVariable: this._cfg.fetchVariables } : {}
|
|
232
234
|
};
|
|
233
235
|
this._log.debug(() => ["activation.request", { batchSize }]);
|
|
234
236
|
let result = [];
|
|
@@ -9624,7 +9626,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
|
|
|
9624
9626
|
}
|
|
9625
9627
|
|
|
9626
9628
|
// src/runtime/version.ts
|
|
9627
|
-
var packageVersion = "1.2.
|
|
9629
|
+
var packageVersion = "1.2.3";
|
|
9628
9630
|
|
|
9629
9631
|
// src/runtime/supportLogger.ts
|
|
9630
9632
|
var NoopSupportLogger = class {
|
|
@@ -18880,4 +18882,4 @@ export {
|
|
|
18880
18882
|
withTimeoutTE,
|
|
18881
18883
|
eventuallyTE
|
|
18882
18884
|
};
|
|
18883
|
-
//# sourceMappingURL=chunk-
|
|
18885
|
+
//# sourceMappingURL=chunk-C4KMECWH.js.map
|