@camunda8/orchestration-cluster-api 10.0.0-alpha.1 → 10.0.0-alpha.10
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 +76 -0
- package/README.md +78 -1
- package/dist/{chunk-DJPE2IJO.js → chunk-35C35RRO.js} +2852 -15
- package/dist/chunk-35C35RRO.js.map +1 -0
- package/dist/fp/index.cjs +4193 -730
- 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-NxMS1fuh.d.ts → index-CeCL9PcH.d.ts} +3115 -606
- package/dist/{index-DCO1POBR.d.cts → index-DiQH0k_q.d.cts} +3115 -606
- package/dist/index.cjs +4502 -773
- 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 +262 -11
- package/dist/index.js.map +1 -1
- package/dist/{zod.gen-J3DNBFMQ.js → zod.gen-LWXJEF77.js} +1297 -664
- package/dist/zod.gen-LWXJEF77.js.map +1 -0
- package/package.json +7 -6
- package/dist/chunk-DJPE2IJO.js.map +0 -1
- package/dist/zod.gen-J3DNBFMQ.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,79 @@
|
|
|
1
|
+
# [10.0.0-alpha.10](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.9...v10.0.0-alpha.10) (2026-06-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* apply eventual consistency only to first searchVariablesAsDto search ([29387b0](https://github.com/camunda/orchestration-cluster-api-js/commit/29387b0b478e0c9a4d1dd0eaaf82c0481be5ddd8))
|
|
7
|
+
* **deps:** bump camunda-schema-bundler to 2.4.3 for IterationId generation ([16a7c5d](https://github.com/camunda/orchestration-cluster-api-js/commit/16a7c5ddccc52b60b0dab3efc6048daaba687013))
|
|
8
|
+
* **deps:** bump camunda-schema-bundler to 2.4.3 for IterationId generation ([8a8cdae](https://github.com/camunda/orchestration-cluster-api-js/commit/8a8cdae5fe9327a991e9670e4aeb50c6d8591356))
|
|
9
|
+
* wait for all declared variables at the collection level for searchVariablesAsDto ([ba2f911](https://github.com/camunda/orchestration-cluster-api-js/commit/ba2f911e1d6254d25ac68c3ebfaa690ef0d9067a))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add searchVariablesAsDto for DTO-driven typed variable maps ([52a544f](https://github.com/camunda/orchestration-cluster-api-js/commit/52a544fcc37f7ecc86fcfa153859baf6cf653b9b))
|
|
15
|
+
* add searchVariablesAsDto for DTO-driven typed variable maps ([67418f2](https://github.com/camunda/orchestration-cluster-api-js/commit/67418f2f9ccbdc8b535b82cb8a66ec77b66143e0))
|
|
16
|
+
|
|
17
|
+
# [10.0.0-alpha.9](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.8...v10.0.0-alpha.9) (2026-06-04)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* pass author-association to community notification workflow ([82e7f6e](https://github.com/camunda/orchestration-cluster-api-js/commit/82e7f6e5b34c60d122b93a302c84dda1fc28f6f9))
|
|
23
|
+
|
|
24
|
+
# [10.0.0-alpha.8](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.7...v10.0.0-alpha.8) (2026-06-04)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* add Slack notifications for release failures and community events ([051e782](https://github.com/camunda/orchestration-cluster-api-js/commit/051e78230ce2a2eeda53bdc604a99a783e4b5caa))
|
|
30
|
+
* add Slack notifications for release failures and community events ([2981264](https://github.com/camunda/orchestration-cluster-api-js/commit/29812649034d2e961d65a7a80bd8bb2590e77dc1))
|
|
31
|
+
|
|
32
|
+
# [10.0.0-alpha.7](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.6...v10.0.0-alpha.7) (2026-05-18)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* update docker-compose env vars for 8.10 config schema ([d343d56](https://github.com/camunda/orchestration-cluster-api-js/commit/d343d56a54d6b83246e3a2b26b6ce2469c2de77c))
|
|
38
|
+
|
|
39
|
+
# [10.0.0-alpha.6](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.5...v10.0.0-alpha.6) (2026-05-13)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* add example coverage for 4 new operations ([3a2c875](https://github.com/camunda/orchestration-cluster-api-js/commit/3a2c87577bcca87996cc77546216c68fb5124ec5))
|
|
45
|
+
* add example coverage for 4 new operations ([6d757a4](https://github.com/camunda/orchestration-cluster-api-js/commit/6d757a4be85ba733f07bcd08c1b6ae33aacd6c15))
|
|
46
|
+
|
|
47
|
+
# [10.0.0-alpha.5](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.4...v10.0.0-alpha.5) (2026-05-08)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
* add agent instance example coverage ([8a0072d](https://github.com/camunda/orchestration-cluster-api-js/commit/8a0072d03cf426ea895863d7cbdd87178c2e7e2f))
|
|
53
|
+
* v10 migration — bundler 2.4.1, branded type examples, README ([dd4a714](https://github.com/camunda/orchestration-cluster-api-js/commit/dd4a7149682b89d1f8f9c0f627dfef5645b10ea7)), closes [#203](https://github.com/camunda/orchestration-cluster-api-js/issues/203) [#204](https://github.com/camunda/orchestration-cluster-api-js/issues/204)
|
|
54
|
+
|
|
55
|
+
# [10.0.0-alpha.4](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.3...v10.0.0-alpha.4) (2026-04-29)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Bug Fixes
|
|
59
|
+
|
|
60
|
+
* **gen:** apply CAMUNDA_DEFAULT_TENANT_ID to activateJobs tenantIds ([fb7c661](https://github.com/camunda/orchestration-cluster-api-js/commit/fb7c661ba1f24dcfcfd738c6e344df09a2e2c52d))
|
|
61
|
+
|
|
62
|
+
# [10.0.0-alpha.3](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.2...v10.0.0-alpha.3) (2026-04-29)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* **docker:** resolve ambiguous numberOfReplicas config ([ab81098](https://github.com/camunda/orchestration-cluster-api-js/commit/ab810980e7dc3b820f6630ba36b1e191e1dd04ae))
|
|
68
|
+
* getResource is now eventually consistent ([60d6c93](https://github.com/camunda/orchestration-cluster-api-js/commit/60d6c9398934cf5786d444d88472ec8198705ee5))
|
|
69
|
+
|
|
70
|
+
# [10.0.0-alpha.2](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.1...v10.0.0-alpha.2) (2026-04-14)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Bug Fixes
|
|
74
|
+
|
|
75
|
+
* update RELEASE.md with correct promotion procedure and troubleshooting ([10660be](https://github.com/camunda/orchestration-cluster-api-js/commit/10660be8743465c9cd5370af7eed3999972a0716))
|
|
76
|
+
|
|
1
77
|
# [10.0.0-alpha.1](https://github.com/camunda/orchestration-cluster-api-js/compare/v9.1.0-alpha.1...v10.0.0-alpha.1) (2026-04-14)
|
|
2
78
|
|
|
3
79
|
|
package/README.md
CHANGED
|
@@ -149,10 +149,51 @@ await camunda.createDeployment({
|
|
|
149
149
|
});
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
`TenantId.assumeExists()` validates the string against the tenant ID pattern and
|
|
152
|
+
`TenantId.assumeExists()` validates the string against the tenant ID pattern and returns a branded value. The branded value is just a string at runtime, but `assumeExists()` performs validation and can throw if the input is malformed. See [Branded Keys](#branded-keys) for more on this pattern.
|
|
153
153
|
|
|
154
154
|
> **Tip**: If your tenant ID comes from a validated source (environment variable, config file), call `TenantId.assumeExists()` once at startup and pass the branded value throughout your application.
|
|
155
155
|
|
|
156
|
+
## Migrating from 8.9
|
|
157
|
+
|
|
158
|
+
SDK 10.x (for Camunda 8.10) promotes several identifier and name fields from plain `string` to **branded types** via `CamundaKey<T>`. The wire format and runtime API are unchanged — branded values are still plain strings at runtime and are assignable anywhere a `string` is expected (template literals, logging, JSON serialization). Callers need to brand values using `.assumeExists()` (which performs validation) to satisfy the new types.
|
|
159
|
+
|
|
160
|
+
### New branded types
|
|
161
|
+
|
|
162
|
+
| Brand | Used for |
|
|
163
|
+
|-------|----------|
|
|
164
|
+
| `RoleId` | Role identifiers |
|
|
165
|
+
| `GroupId` | Group identifiers |
|
|
166
|
+
| `ClientId` | OAuth client identifiers |
|
|
167
|
+
| `MappingRuleId` | Mapping-rule identifiers |
|
|
168
|
+
| `ClusterVariableName` | Cluster variable names |
|
|
169
|
+
| `AgentInstanceKey` | Agent-instance system keys |
|
|
170
|
+
|
|
171
|
+
### Migration
|
|
172
|
+
|
|
173
|
+
<!-- snippet-source: examples/readme.ts | regions: V9ToV10Migration -->
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
// v9 — plain strings were accepted
|
|
177
|
+
// await camunda.assignRoleToGroup({
|
|
178
|
+
// roleId: 'developer',
|
|
179
|
+
// groupId: 'engineering',
|
|
180
|
+
// });
|
|
181
|
+
|
|
182
|
+
// v10 — use the branded type helpers at the boundary
|
|
183
|
+
await camunda.assignRoleToGroup({
|
|
184
|
+
roleId: RoleId.assumeExists('developer'),
|
|
185
|
+
groupId: GroupId.assumeExists('engineering'),
|
|
186
|
+
});
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Each branded type has an `.assumeExists()` method that validates the string and returns the branded value. Validation runs at call time and can throw if the input is malformed, so call it once at the boundary (startup, config parsing, API response) and pass the branded value through your application. See [Branded Keys](#branded-keys) for more on this pattern.
|
|
190
|
+
|
|
191
|
+
### What does NOT change
|
|
192
|
+
|
|
193
|
+
- The wire format is unchanged — all values are still strings on the wire.
|
|
194
|
+
- No method signatures changed name or arity.
|
|
195
|
+
- Branded values are assignable anywhere a `string` is expected (template literals, logging, JSON serialization), so existing string-handling code continues to work.
|
|
196
|
+
|
|
156
197
|
## Quick Start (Zero‑Config – Recommended)
|
|
157
198
|
|
|
158
199
|
Keep configuration out of application code. Let the factory read `CAMUNDA_*` variables from the environment (12‑factor style). This makes rotation, secret management, and environment promotion safer & simpler.
|
|
@@ -576,6 +617,41 @@ Benchmark results against a single-node local cluster with multiple independent
|
|
|
576
617
|
|
|
577
618
|
BALANCED wins 3 of 4 on pure throughput. The only scenario where LEGACY is faster is extreme overload (800 concurrent requests against a single broker) — and in that case LEGACY accumulates 44,505 errors vs BALANCED's 15,527. The default just works.
|
|
578
619
|
|
|
620
|
+
## Typed Variable Map (DTO-driven search)
|
|
621
|
+
|
|
622
|
+
`searchVariablesAsDto` fetches process variables and binds them to a [Zod](https://zod.dev) schema that acts as the DTO. The schema's keys are the exact variable names to fetch, and its shape drives validation. Only the declared variables are queried (via a `name $in [...]` filter), so memory stays bound by the DTO shape rather than the total number of variables on the instance. Results are paged internally until every declared variable is found or the result set is exhausted.
|
|
623
|
+
|
|
624
|
+
The returned `VariableMap` offers two access modes:
|
|
625
|
+
|
|
626
|
+
- **Lenient** — `has(name)` / `get(name)` for defensive reads that never throw on missing variables.
|
|
627
|
+
- **Strict** — `validate()` returns a fully-typed object, or throws a `ZodError` when a required variable is missing or malformed.
|
|
628
|
+
|
|
629
|
+
If a declared variable is found at more than one scope (for example a local variable shadowing a process-level one), the search throws a `VariableScopeCollisionError` rather than silently picking one. Pass an explicit `scopeKey` to disambiguate.
|
|
630
|
+
|
|
631
|
+
<!-- snippet-source: examples/readme.ts | regions: ReadmeTypedVariables -->
|
|
632
|
+
|
|
633
|
+
```ts
|
|
634
|
+
// The Zod schema is the DTO: its keys are the variable names to fetch, and its
|
|
635
|
+
// shape drives validation. Only these declared variables are queried, so memory
|
|
636
|
+
// stays bound by the DTO — not by the total number of variables on the instance.
|
|
637
|
+
const OrderVariables = z.object({
|
|
638
|
+
orderId: z.string(), // required
|
|
639
|
+
amount: z.number().optional(), // optional
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
const map = await camunda.searchVariablesAsDto(OrderVariables, { processInstanceKey });
|
|
643
|
+
|
|
644
|
+
// Lenient access: defensive reads that never throw on missing variables.
|
|
645
|
+
if (map.has('amount')) {
|
|
646
|
+
console.log('Amount:', map.get('amount'));
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
// Strict access: returns a fully-typed object, or throws a ZodError when a
|
|
650
|
+
// required variable is missing or malformed.
|
|
651
|
+
const order = map.validate(); // { orderId: string; amount?: number }
|
|
652
|
+
console.log('Order:', order.orderId);
|
|
653
|
+
```
|
|
654
|
+
|
|
579
655
|
## Job Workers (Polling API)
|
|
580
656
|
|
|
581
657
|
The SDK provides a lightweight polling job worker for service task job types using `createJobWorker`. It activates jobs in batches (respecting a concurrency limit), validates variables (optional), and offers action helpers on each job.
|
|
@@ -681,6 +757,7 @@ Example patterns:
|
|
|
681
757
|
return job.complete({ variables: { processed: true } });
|
|
682
758
|
|
|
683
759
|
// GOOD: No-arg completion example, sentinel stored for ultimate return
|
|
760
|
+
// biome-ignore lint/correctness/noUnreachable: intentional — showing multiple completion patterns
|
|
684
761
|
const ack = await job.complete();
|
|
685
762
|
// ...
|
|
686
763
|
return ack;
|