@bpmnkit/core 1.9.0 → 1.10.1

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.
Files changed (110) hide show
  1. package/agent-cards/bpmn.md +3 -3
  2. package/builder-reference.md +11 -9
  3. package/dist/bpmn/auto-layout.js +82 -26
  4. package/dist/bpmn/bpmn-builder.d.ts +84 -7
  5. package/dist/bpmn/bpmn-builder.js +313 -78
  6. package/dist/bpmn/bpmn-model.d.ts +2 -0
  7. package/dist/bpmn/bpmn-parser.js +68 -76
  8. package/dist/bpmn/bpmn-serializer.js +60 -19
  9. package/dist/bpmn/bpmnlint.js +4 -69
  10. package/dist/bpmn/builder-rules.d.ts +20 -0
  11. package/dist/bpmn/builder-rules.js +120 -0
  12. package/dist/bpmn/camunda-compat-data.d.ts +10 -148
  13. package/dist/bpmn/camunda-compat-data.js +16 -407
  14. package/dist/bpmn/camunda-compat-feel.d.ts +3 -0
  15. package/dist/bpmn/camunda-compat-feel.js +1 -1
  16. package/dist/bpmn/camunda-compat.js +7 -6
  17. package/dist/bpmn/camunda7/export.js +4 -1
  18. package/dist/bpmn/camunda7/juel.js +2 -1
  19. package/dist/bpmn/camunda7/migrate.d.ts +23 -0
  20. package/dist/bpmn/camunda7/migrate.js +75 -3
  21. package/dist/bpmn/compact-stream.js +2 -1
  22. package/dist/bpmn/compact.d.ts +80 -4
  23. package/dist/bpmn/compact.js +220 -38
  24. package/dist/bpmn/feel-condition.d.ts +9 -0
  25. package/dist/bpmn/feel-condition.js +19 -0
  26. package/dist/bpmn/full-operations.js +31 -4
  27. package/dist/bpmn/index.d.ts +13 -3
  28. package/dist/bpmn/index.js +16 -15
  29. package/dist/bpmn/operations.d.ts +4 -4
  30. package/dist/bpmn/operations.js +14 -2
  31. package/dist/bpmn/optimize/bpmnlint-rules.js +7 -40
  32. package/dist/bpmn/optimize/index.js +15 -1
  33. package/dist/bpmn/optimize/tasks.js +12 -3
  34. package/dist/bpmn/process-delta.d.ts +18 -0
  35. package/dist/bpmn/process-delta.js +20 -2
  36. package/dist/bpmn/process-text-writer.js +27 -1
  37. package/dist/bpmn/process-text.d.ts +9 -3
  38. package/dist/bpmn/process-text.js +122 -16
  39. package/dist/bpmn/stable-ids.d.ts +2 -0
  40. package/dist/bpmn/stable-ids.js +8 -0
  41. package/dist/bpmn/zeebe-extensions.js +2 -1
  42. package/dist/bpmn/zeebe-placement.js +6 -129
  43. package/dist/bpmn/zeebe-validate/context.d.ts +132 -0
  44. package/dist/bpmn/zeebe-validate/context.js +241 -0
  45. package/dist/bpmn/zeebe-validate/gate.d.ts +87 -0
  46. package/dist/bpmn/zeebe-validate/gate.js +492 -0
  47. package/dist/bpmn/zeebe-validate/index.d.ts +37 -0
  48. package/dist/bpmn/zeebe-validate/index.js +106 -0
  49. package/dist/bpmn/zeebe-validate/rules/events.d.ts +4 -0
  50. package/dist/bpmn/zeebe-validate/rules/events.js +580 -0
  51. package/dist/bpmn/zeebe-validate/rules/extensions.d.ts +4 -0
  52. package/dist/bpmn/zeebe-validate/rules/extensions.js +411 -0
  53. package/dist/bpmn/zeebe-validate/rules/gateways.d.ts +3 -0
  54. package/dist/bpmn/zeebe-validate/rules/gateways.js +296 -0
  55. package/dist/bpmn/zeebe-validate/rules/references.d.ts +3 -0
  56. package/dist/bpmn/zeebe-validate/rules/references.js +495 -0
  57. package/dist/bpmn/zeebe-validate/rules/structure.d.ts +3 -0
  58. package/dist/bpmn/zeebe-validate/rules/structure.js +629 -0
  59. package/dist/bpmn/zeebe-validate/rules/tasks.d.ts +4 -0
  60. package/dist/bpmn/zeebe-validate/rules/tasks.js +446 -0
  61. package/dist/bpmn/zeebe-validate/xml.d.ts +15 -0
  62. package/dist/bpmn/zeebe-validate/xml.js +1062 -0
  63. package/dist/bpmn/zeebe-validate/xsd.d.ts +19 -0
  64. package/dist/bpmn/zeebe-validate/xsd.js +350 -0
  65. package/dist/connectors/aliases.js +1 -0
  66. package/dist/connectors/apply-element.d.ts +5 -2
  67. package/dist/connectors/apply-element.js +6 -0
  68. package/dist/connectors/apply-many.d.ts +9 -2
  69. package/dist/connectors/apply-many.js +17 -2
  70. package/dist/connectors/apply.d.ts +4 -2
  71. package/dist/connectors/deployability.d.ts +27 -0
  72. package/dist/connectors/deployability.js +41 -0
  73. package/dist/connectors/index.d.ts +1 -0
  74. package/dist/connectors/lines.d.ts +10 -0
  75. package/dist/connectors/lines.js +13 -4
  76. package/dist/connectors/templates/generated.js +10101 -3188
  77. package/dist/dmn/dmn-model.d.ts +24 -4
  78. package/dist/dmn/dmn-parser.js +37 -3
  79. package/dist/dmn/dmn-serializer.js +48 -47
  80. package/dist/dmn/lint.js +4 -11
  81. package/dist/errors.d.ts +30 -1
  82. package/dist/errors.js +31 -0
  83. package/dist/form/form-model.d.ts +11 -0
  84. package/dist/form/form-parser.d.ts +1 -0
  85. package/dist/form/form-parser.js +48 -12
  86. package/dist/form/form-serializer.js +40 -17
  87. package/dist/form/lint.js +6 -40
  88. package/dist/generated/bpmn-elements.d.ts +5 -0
  89. package/dist/generated/bpmn-elements.js +151 -0
  90. package/dist/generated/camunda-compat-data.d.ts +148 -0
  91. package/dist/generated/camunda-compat-data.js +371 -0
  92. package/dist/generated/dmn-elements.d.ts +12 -0
  93. package/dist/generated/dmn-elements.js +45 -0
  94. package/dist/generated/form-elements.d.ts +5 -0
  95. package/dist/generated/form-elements.js +45 -0
  96. package/dist/generated/lint-rules.d.ts +17 -0
  97. package/dist/generated/lint-rules.js +116 -0
  98. package/dist/generated/zeebe-elements.d.ts +10 -0
  99. package/dist/generated/zeebe-elements.js +168 -0
  100. package/dist/generated/zeebe-rules.d.ts +25 -0
  101. package/dist/generated/zeebe-rules.js +202 -0
  102. package/dist/index.d.ts +10 -4
  103. package/dist/index.js +4 -1
  104. package/dist/layout/annotations.js +21 -1
  105. package/dist/layout/orthogonal.js +9 -3
  106. package/dist/plan/compile.d.ts +26 -1
  107. package/dist/plan/compile.js +48 -6
  108. package/dist/plan/merge.d.ts +2 -1
  109. package/dist/plan/merge.js +13 -5
  110. package/package.json +2 -2
@@ -4,162 +4,24 @@
4
4
  *
5
5
  * Taken from `bpmnlint-plugin-camunda-compat` 2.61.0 (MIT, © Camunda Services
6
6
  * GmbH), the rule set Camunda Modeler lints with through `@camunda/linting`
7
- * 3.57.0:
7
+ * 3.57.0; the FEEL built-in table is from `@camunda/feel-builtins` 1.4.1
8
+ * (MIT, © Camunda Services GmbH).
8
9
  *
9
- * - `index.js` — which rule each `camunda-cloud-X-Y` config enables;
10
- * - `rules/camunda-cloud/element-type/config.js` — element and event
11
- * definition support per version;
12
- * - `rules/camunda-cloud/implementation/config.js` — which task implementation
13
- * each element takes, from which version;
14
- * - `rules/camunda-cloud/timer/config.js` — timer properties per event type;
15
- * - `rules/camunda-cloud/connector-properties/config.js` — inbound connector
16
- * properties per version;
17
- * - the version constants inside the individual rules.
18
- *
19
- * The FEEL built-in table is from `@camunda/feel-builtins` 1.4.1, which the
20
- * plugin's `feel-compatibility` rule reads.
21
- *
22
- * When the plugin moves, update the tables here and `CAMUNDA_COMPAT_PLUGIN_VERSION`
23
- * together; nothing else in BPMN Kit hard-codes a Camunda version for these checks.
10
+ * The tables live in `spec/compat-rules.json` (shared with the Rust crates) and
11
+ * are generated into `../generated/camunda-compat-data.ts` by `pnpm spec:gen`.
12
+ * This module re-exports them and rebuilds `TIMER_SUPPORT`'s functions from the
13
+ * data's 2x2 table. When the plugin moves, update the JSON, including
14
+ * `source`; nothing else in BPMN Kit hard-codes a Camunda version for these checks.
24
15
  *
25
16
  * @packageDocumentation
26
17
  */
27
- /** The `bpmnlint-plugin-camunda-compat` release these tables were taken from. */
28
- export declare const CAMUNDA_COMPAT_PLUGIN_VERSION = "2.61.0";
29
- /**
30
- * The Camunda 8 (and Camunda Cloud 1.x) versions the plugin ships a
31
- * `camunda-cloud-X-Y` config for, oldest first.
32
- */
33
- export declare const CAMUNDA_COMPAT_VERSIONS: readonly ["1.0", "1.1", "1.2", "1.3", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5", "8.6", "8.7", "8.8", "8.9", "8.10"];
34
- /** A version in `CAMUNDA_COMPAT_VERSIONS`. */
35
- export type CamundaCompatVersion = (typeof CAMUNDA_COMPAT_VERSIONS)[number];
36
- /** `_` stands for "no event definition". */
37
- type EventSupport = Readonly<Record<string, CamundaCompatVersion>>;
38
- /**
39
- * First version supporting each element, keyed by BPMN type. Events map their
40
- * event definition (or `_` for none) to a version instead. A flow element whose
41
- * type is absent — `bpmn:ComplexGateway`, `bpmn:Transaction` — is supported by
42
- * no version.
43
- */
44
- export declare const ELEMENT_SUPPORT: Readonly<Record<string, CamundaCompatVersion | EventSupport>>;
45
- /** The three ways Zeebe implements a task, as `zeebe:` extension element names. */
46
- export type ImplementationKind = "calledDecision" | "script" | "taskDefinition";
47
- /** First version each element accepts each implementation kind in. */
48
- export declare const IMPLEMENTATION_SUPPORT: Readonly<Record<ImplementationKind, Readonly<Record<string, CamundaCompatVersion | EventSupport>>>>;
49
- /** The timer properties of `bpmn:TimerEventDefinition`. */
50
- export type TimerProperty = "timeCycle" | "timeDate" | "timeDuration";
18
+ import { type CamundaCompatVersion, type TimerProperty } from "../generated/camunda-compat-data.js";
19
+ export { CAMUNDA_COMPAT_PLUGIN_VERSION, CAMUNDA_COMPAT_RULES, CAMUNDA_COMPAT_VERSIONS, CRON_TIMER_SINCE, ELEMENT_SUPPORT, FEATURE_SINCE, FEEL_BUILTIN_SINCE, IMPLEMENTATION_SUPPORT, INBOUND_CONNECTOR_PROPERTY_SINCE, } from "../generated/camunda-compat-data.js";
20
+ export type { CamundaCompatCoverage, CamundaCompatRule, CamundaCompatVersion, ImplementationKind, TimerProperty, } from "../generated/camunda-compat-data.js";
51
21
  /**
52
22
  * First version each timer property is allowed in, per event type. `null`
53
23
  * means never; the functions receive whether the event interrupts and whether
54
24
  * it starts an event sub-process.
55
25
  */
56
26
  export declare const TIMER_SUPPORT: Readonly<Record<string, Readonly<Record<TimerProperty, (interrupting: boolean, inEventSubProcess: boolean) => CamundaCompatVersion | null>>>>;
57
- /** First version a timer cycle may be a cron expression rather than ISO 8601. */
58
- export declare const CRON_TIMER_SINCE: CamundaCompatVersion;
59
- /**
60
- * First version each property-level feature is supported in — the version
61
- * constants of the plugin's `no-*` rules, gathered in one place.
62
- */
63
- export declare const FEATURE_SINCE: {
64
- /** `zeebe:modelerTemplate`, an applied element template (`no-template`). */
65
- readonly modelerTemplate: "8.0";
66
- /** `zeebe:properties` on any element (`no-zeebe-properties`). */
67
- readonly zeebeProperties: "8.1";
68
- /** `candidateUsers` on `zeebe:assignmentDefinition` (`no-candidate-users`). */
69
- readonly candidateUsers: "8.2";
70
- /** `propagateAllParentVariables="false"` (`no-propagate-all-parent-variables`). */
71
- readonly propagateAllParentVariablesFalse: "8.2";
72
- /** `zeebe:taskSchedule` (`no-task-schedule`). */
73
- readonly taskSchedule: "8.2";
74
- /** A catch event without an `errorRef` (`error-reference`). */
75
- readonly errorCatchWithoutRef: "8.2";
76
- /** An error code expression on a throw event (`no-expression`). */
77
- readonly errorCodeExpression: "8.2";
78
- /** A form on a start event (`start-event-form`). */
79
- readonly startEventForm: "8.3";
80
- /** A signal start event inside a sub-process (`no-signal-event-sub-process`). */
81
- readonly signalEventSubProcess: "8.3";
82
- /** A collapsed sub-process (`collapsed-subprocess`). */
83
- readonly collapsedSubProcess: "8.4";
84
- /** `formId` on a job-worker user task, in Desktop Modeler (`user-task-form`). */
85
- readonly userTaskFormId: "8.4";
86
- /** `zeebe:userTask`, the Camunda user task (`no-zeebe-user-task`). */
87
- readonly zeebeUserTask: "8.5";
88
- /** `bindingType` other than `latest` (`no-binding-type`). */
89
- readonly bindingType: "8.6";
90
- /** `zeebe:executionListeners` (`no-execution-listeners`). */
91
- readonly executionListeners: "8.6";
92
- /** `zeebe:priorityDefinition` (`no-priority-definition`). */
93
- readonly priorityDefinition: "8.6";
94
- /** `zeebe:versionTag` on a process (`no-version-tag`). */
95
- readonly versionTag: "8.6";
96
- /** Completion condition and output collection on ad-hoc sub-processes (`ad-hoc-sub-process`). */
97
- readonly adHocCompletion: "8.8";
98
- /** `zeebe:taskListeners` (`no-task-listeners`). */
99
- readonly taskListeners: "8.8";
100
- /** A `zeebe:input` without `source` (`io-mapping`). */
101
- readonly inputWithoutSource: "8.8";
102
- /** `businessId` on `zeebe:calledElement` (`no-business-id`). */
103
- readonly businessId: "8.10";
104
- /** Headers on execution listeners (`no-execution-listener-headers`). */
105
- readonly executionListenerHeaders: "8.10";
106
- /** `beforeAll` execution listeners (`no-before-all-execution-listener`). */
107
- readonly beforeAllExecutionListener: "8.10";
108
- /** `cancel` execution listeners (`no-cancel-execution-listener`). */
109
- readonly cancelExecutionListener: "8.10";
110
- /** `zeebe:jobPriorityDefinition` (`no-job-priority-definition`). */
111
- readonly jobPriorityDefinition: "8.10";
112
- /** A FEEL expression as the version tag of a called decision (`version-tag`). */
113
- readonly decisionVersionTagExpression: "8.10";
114
- /** `camunda.secrets.NAME`, superseding `{{secrets.NAME}}` (`secrets`). */
115
- readonly camundaSecrets: "8.10";
116
- /** `zeebe:agentDefinition` marks an agentic ad-hoc sub-process (the agent rules). */
117
- readonly agentDefinition: "8.10";
118
- };
119
- /**
120
- * First version each Camunda FEEL built-in function is available in, for
121
- * `feel-compatibility`. Functions every version has are absent.
122
- *
123
- * Taken from the `engines.camunda` ranges of `@camunda/feel-builtins` 1.4.1
124
- * (MIT, © Camunda Services GmbH) — `camundaBuiltins` and
125
- * `camundaReservedNameBuiltins` — the table the plugin 2.61.0 checks against.
126
- * Every range there is `>=X.Y`.
127
- */
128
- export declare const FEEL_BUILTIN_SINCE: Readonly<Record<string, CamundaCompatVersion>>;
129
- /**
130
- * Inbound connector properties (`zeebe:property` names) that need a newer
131
- * Camunda version, and the `inbound.type` values of the connectors that take
132
- * them — `rules/camunda-cloud/connector-properties/config.js` of the plugin.
133
- */
134
- export declare const INBOUND_CONNECTOR_PROPERTY_SINCE: Readonly<Record<string, {
135
- since: CamundaCompatVersion;
136
- connectors: readonly string[];
137
- }>>;
138
- /** Whether BPMN Kit runs a plugin rule, and how closely. */
139
- export type CamundaCompatCoverage = "implemented" | "partial" | "existing" | "not-implemented";
140
- /** One `bpmnlint-plugin-camunda-compat` rule. */
141
- export interface CamundaCompatRule {
142
- /** The severity the plugin's configs give it. */
143
- severity: "error" | "warn";
144
- /** First config that enables it; absent for "every version". */
145
- since?: CamundaCompatVersion;
146
- /** First config that no longer enables it; absent for "still enabled". */
147
- until?: CamundaCompatVersion;
148
- /**
149
- * - `implemented` — `analyzeCamundaCompat` reports it as `compat/<rule>`;
150
- * - `partial` — reported, with the difference in `note`;
151
- * - `existing` — another BPMN Kit finding (`equivalents`) reports the same problem;
152
- * - `not-implemented` — not checked; `note` says why.
153
- */
154
- coverage: CamundaCompatCoverage;
155
- /** BPMN Kit findings outside `compat/*` that report the same problem. */
156
- equivalents?: readonly string[];
157
- note?: string;
158
- }
159
- /**
160
- * Every rule of the plugin's `camunda-cloud-*` configs, with the versions it
161
- * is enabled for — `index.js` of the plugin, as data.
162
- */
163
- export declare const CAMUNDA_COMPAT_RULES: Readonly<Record<string, CamundaCompatRule>>;
164
- export {};
165
27
  //# sourceMappingURL=camunda-compat-data.d.ts.map
@@ -4,420 +4,29 @@
4
4
  *
5
5
  * Taken from `bpmnlint-plugin-camunda-compat` 2.61.0 (MIT, © Camunda Services
6
6
  * GmbH), the rule set Camunda Modeler lints with through `@camunda/linting`
7
- * 3.57.0:
7
+ * 3.57.0; the FEEL built-in table is from `@camunda/feel-builtins` 1.4.1
8
+ * (MIT, © Camunda Services GmbH).
8
9
  *
9
- * - `index.js` — which rule each `camunda-cloud-X-Y` config enables;
10
- * - `rules/camunda-cloud/element-type/config.js` — element and event
11
- * definition support per version;
12
- * - `rules/camunda-cloud/implementation/config.js` — which task implementation
13
- * each element takes, from which version;
14
- * - `rules/camunda-cloud/timer/config.js` — timer properties per event type;
15
- * - `rules/camunda-cloud/connector-properties/config.js` — inbound connector
16
- * properties per version;
17
- * - the version constants inside the individual rules.
18
- *
19
- * The FEEL built-in table is from `@camunda/feel-builtins` 1.4.1, which the
20
- * plugin's `feel-compatibility` rule reads.
21
- *
22
- * When the plugin moves, update the tables here and `CAMUNDA_COMPAT_PLUGIN_VERSION`
23
- * together; nothing else in BPMN Kit hard-codes a Camunda version for these checks.
10
+ * The tables live in `spec/compat-rules.json` (shared with the Rust crates) and
11
+ * are generated into `../generated/camunda-compat-data.ts` by `pnpm spec:gen`.
12
+ * This module re-exports them and rebuilds `TIMER_SUPPORT`'s functions from the
13
+ * data's 2x2 table. When the plugin moves, update the JSON, including
14
+ * `source`; nothing else in BPMN Kit hard-codes a Camunda version for these checks.
24
15
  *
25
16
  * @packageDocumentation
26
17
  */
27
- /** The `bpmnlint-plugin-camunda-compat` release these tables were taken from. */
28
- export const CAMUNDA_COMPAT_PLUGIN_VERSION = "2.61.0";
29
- /**
30
- * The Camunda 8 (and Camunda Cloud 1.x) versions the plugin ships a
31
- * `camunda-cloud-X-Y` config for, oldest first.
32
- */
33
- export const CAMUNDA_COMPAT_VERSIONS = [
34
- "1.0",
35
- "1.1",
36
- "1.2",
37
- "1.3",
38
- "8.0",
39
- "8.1",
40
- "8.2",
41
- "8.3",
42
- "8.4",
43
- "8.5",
44
- "8.6",
45
- "8.7",
46
- "8.8",
47
- "8.9",
48
- "8.10",
49
- ];
50
- /**
51
- * First version supporting each element, keyed by BPMN type. Events map their
52
- * event definition (or `_` for none) to a version instead. A flow element whose
53
- * type is absent — `bpmn:ComplexGateway`, `bpmn:Transaction` — is supported by
54
- * no version.
55
- */
56
- export const ELEMENT_SUPPORT = {
57
- "bpmn:BoundaryEvent": {
58
- "bpmn:CompensateEventDefinition": "8.5",
59
- "bpmn:ConditionalEventDefinition": "8.9",
60
- "bpmn:ErrorEventDefinition": "1.0",
61
- "bpmn:EscalationEventDefinition": "8.2",
62
- "bpmn:MessageEventDefinition": "1.0",
63
- "bpmn:TimerEventDefinition": "1.0",
64
- "bpmn:SignalEventDefinition": "8.3",
65
- },
66
- "bpmn:BusinessRuleTask": "1.1",
67
- "bpmn:CallActivity": "1.0",
68
- "bpmn:DataObject": "8.0",
69
- "bpmn:DataObjectReference": "8.0",
70
- "bpmn:DataStoreReference": "8.0",
71
- "bpmn:EndEvent": {
72
- _: "1.0",
73
- "bpmn:CompensateEventDefinition": "8.5",
74
- "bpmn:ErrorEventDefinition": "1.0",
75
- "bpmn:EscalationEventDefinition": "8.2",
76
- "bpmn:MessageEventDefinition": "1.2",
77
- "bpmn:SignalEventDefinition": "8.3",
78
- "bpmn:TerminateEventDefinition": "8.1",
79
- },
80
- "bpmn:EventBasedGateway": "1.0",
81
- "bpmn:ExclusiveGateway": "1.0",
82
- "bpmn:InclusiveGateway": "8.1",
83
- "bpmn:IntermediateCatchEvent": {
84
- "bpmn:ConditionalEventDefinition": "8.9",
85
- "bpmn:MessageEventDefinition": "1.0",
86
- "bpmn:LinkEventDefinition": "8.2",
87
- "bpmn:TimerEventDefinition": "1.0",
88
- "bpmn:SignalEventDefinition": "8.3",
89
- },
90
- "bpmn:IntermediateThrowEvent": {
91
- _: "1.1",
92
- "bpmn:CompensateEventDefinition": "8.5",
93
- "bpmn:EscalationEventDefinition": "8.2",
94
- "bpmn:LinkEventDefinition": "8.2",
95
- "bpmn:MessageEventDefinition": "1.2",
96
- "bpmn:SignalEventDefinition": "8.3",
97
- },
98
- "bpmn:ManualTask": "1.1",
99
- "bpmn:ParallelGateway": "1.0",
100
- "bpmn:ReceiveTask": "1.0",
101
- "bpmn:ScriptTask": "1.1",
102
- "bpmn:SendTask": "1.1",
103
- "bpmn:ServiceTask": "1.0",
104
- "bpmn:StartEvent": {
105
- _: "1.0",
106
- "bpmn:ConditionalEventDefinition": "8.9",
107
- "bpmn:ErrorEventDefinition": "1.0",
108
- "bpmn:EscalationEventDefinition": "8.2",
109
- "bpmn:MessageEventDefinition": "1.0",
110
- "bpmn:SignalEventDefinition": "8.2",
111
- "bpmn:TimerEventDefinition": "1.0",
112
- },
113
- "bpmn:SubProcess": "1.0",
114
- "bpmn:Task": "8.2",
115
- "bpmn:UserTask": "1.0",
116
- "bpmn:AdHocSubProcess": "8.7",
117
- };
118
- /** First version each element accepts each implementation kind in. */
119
- export const IMPLEMENTATION_SUPPORT = {
120
- calledDecision: {
121
- "bpmn:BusinessRuleTask": "1.3",
122
- },
123
- taskDefinition: {
124
- "bpmn:AdHocSubProcess": "8.8",
125
- "bpmn:BusinessRuleTask": "1.1",
126
- "bpmn:IntermediateThrowEvent": { "bpmn:MessageEventDefinition": "1.2" },
127
- "bpmn:EndEvent": { "bpmn:MessageEventDefinition": "1.2" },
128
- "bpmn:ScriptTask": "1.1",
129
- "bpmn:SendTask": "1.1",
130
- "bpmn:ServiceTask": "1.0",
131
- },
132
- script: {
133
- "bpmn:ScriptTask": "8.2",
134
- },
135
- };
18
+ import { TIMER_SUPPORT_TABLE, } from "../generated/camunda-compat-data.js";
19
+ export { CAMUNDA_COMPAT_PLUGIN_VERSION, CAMUNDA_COMPAT_RULES, CAMUNDA_COMPAT_VERSIONS, CRON_TIMER_SINCE, ELEMENT_SUPPORT, FEATURE_SINCE, FEEL_BUILTIN_SINCE, IMPLEMENTATION_SUPPORT, INBOUND_CONNECTOR_PROPERTY_SINCE, } from "../generated/camunda-compat-data.js";
136
20
  /**
137
21
  * First version each timer property is allowed in, per event type. `null`
138
22
  * means never; the functions receive whether the event interrupts and whether
139
23
  * it starts an event sub-process.
140
24
  */
141
- export const TIMER_SUPPORT = {
142
- "bpmn:StartEvent": {
143
- timeCycle: (interrupting, inEventSubProcess) => !interrupting || !inEventSubProcess ? "1.0" : null,
144
- timeDate: () => "1.0",
145
- timeDuration: (_, inEventSubProcess) => (inEventSubProcess ? "1.0" : null),
146
- },
147
- "bpmn:BoundaryEvent": {
148
- timeCycle: (interrupting) => (!interrupting ? "1.0" : null),
149
- timeDate: () => "8.3",
150
- timeDuration: () => "1.0",
151
- },
152
- "bpmn:IntermediateCatchEvent": {
153
- timeCycle: () => null,
154
- timeDate: () => "8.3",
155
- timeDuration: () => "1.0",
156
- },
157
- };
158
- /** First version a timer cycle may be a cron expression rather than ISO 8601. */
159
- export const CRON_TIMER_SINCE = "8.1";
160
- /**
161
- * First version each property-level feature is supported in — the version
162
- * constants of the plugin's `no-*` rules, gathered in one place.
163
- */
164
- export const FEATURE_SINCE = {
165
- /** `zeebe:modelerTemplate`, an applied element template (`no-template`). */
166
- modelerTemplate: "8.0",
167
- /** `zeebe:properties` on any element (`no-zeebe-properties`). */
168
- zeebeProperties: "8.1",
169
- /** `candidateUsers` on `zeebe:assignmentDefinition` (`no-candidate-users`). */
170
- candidateUsers: "8.2",
171
- /** `propagateAllParentVariables="false"` (`no-propagate-all-parent-variables`). */
172
- propagateAllParentVariablesFalse: "8.2",
173
- /** `zeebe:taskSchedule` (`no-task-schedule`). */
174
- taskSchedule: "8.2",
175
- /** A catch event without an `errorRef` (`error-reference`). */
176
- errorCatchWithoutRef: "8.2",
177
- /** An error code expression on a throw event (`no-expression`). */
178
- errorCodeExpression: "8.2",
179
- /** A form on a start event (`start-event-form`). */
180
- startEventForm: "8.3",
181
- /** A signal start event inside a sub-process (`no-signal-event-sub-process`). */
182
- signalEventSubProcess: "8.3",
183
- /** A collapsed sub-process (`collapsed-subprocess`). */
184
- collapsedSubProcess: "8.4",
185
- /** `formId` on a job-worker user task, in Desktop Modeler (`user-task-form`). */
186
- userTaskFormId: "8.4",
187
- /** `zeebe:userTask`, the Camunda user task (`no-zeebe-user-task`). */
188
- zeebeUserTask: "8.5",
189
- /** `bindingType` other than `latest` (`no-binding-type`). */
190
- bindingType: "8.6",
191
- /** `zeebe:executionListeners` (`no-execution-listeners`). */
192
- executionListeners: "8.6",
193
- /** `zeebe:priorityDefinition` (`no-priority-definition`). */
194
- priorityDefinition: "8.6",
195
- /** `zeebe:versionTag` on a process (`no-version-tag`). */
196
- versionTag: "8.6",
197
- /** Completion condition and output collection on ad-hoc sub-processes (`ad-hoc-sub-process`). */
198
- adHocCompletion: "8.8",
199
- /** `zeebe:taskListeners` (`no-task-listeners`). */
200
- taskListeners: "8.8",
201
- /** A `zeebe:input` without `source` (`io-mapping`). */
202
- inputWithoutSource: "8.8",
203
- /** `businessId` on `zeebe:calledElement` (`no-business-id`). */
204
- businessId: "8.10",
205
- /** Headers on execution listeners (`no-execution-listener-headers`). */
206
- executionListenerHeaders: "8.10",
207
- /** `beforeAll` execution listeners (`no-before-all-execution-listener`). */
208
- beforeAllExecutionListener: "8.10",
209
- /** `cancel` execution listeners (`no-cancel-execution-listener`). */
210
- cancelExecutionListener: "8.10",
211
- /** `zeebe:jobPriorityDefinition` (`no-job-priority-definition`). */
212
- jobPriorityDefinition: "8.10",
213
- /** A FEEL expression as the version tag of a called decision (`version-tag`). */
214
- decisionVersionTagExpression: "8.10",
215
- /** `camunda.secrets.NAME`, superseding `{{secrets.NAME}}` (`secrets`). */
216
- camundaSecrets: "8.10",
217
- /** `zeebe:agentDefinition` marks an agentic ad-hoc sub-process (the agent rules). */
218
- agentDefinition: "8.10",
219
- };
220
- /**
221
- * First version each Camunda FEEL built-in function is available in, for
222
- * `feel-compatibility`. Functions every version has are absent.
223
- *
224
- * Taken from the `engines.camunda` ranges of `@camunda/feel-builtins` 1.4.1
225
- * (MIT, © Camunda Services GmbH) — `camundaBuiltins` and
226
- * `camundaReservedNameBuiltins` — the table the plugin 2.61.0 checks against.
227
- * Every range there is `>=X.Y`.
228
- */
229
- export const FEEL_BUILTIN_SINCE = {
230
- "context merge": "8.2",
231
- "last day of month": "8.2",
232
- "random number": "8.2",
233
- assert: "8.3",
234
- "duplicate values": "8.3",
235
- "get or else": "8.3",
236
- "is empty": "8.6",
237
- "to base64": "8.6",
238
- trim: "8.6",
239
- uuid: "8.6",
240
- partition: "8.7",
241
- fromAi: "8.8",
242
- "is blank": "8.8",
243
- "from base64": "8.9",
244
- "from json": "8.9",
245
- "to json": "8.9",
246
- };
247
- /**
248
- * Inbound connector properties (`zeebe:property` names) that need a newer
249
- * Camunda version, and the `inbound.type` values of the connectors that take
250
- * them — `rules/camunda-cloud/connector-properties/config.js` of the plugin.
251
- */
252
- export const INBOUND_CONNECTOR_PROPERTY_SINCE = {
253
- messageTtl: {
254
- since: "8.6",
255
- connectors: [
256
- "io.camunda:webhook:1",
257
- "io.camunda:connector-rabbitmq-inbound:1",
258
- "io.camunda:http-polling:1",
259
- "io.camunda:connector-kafka-inbound:1",
260
- "io.camunda:slack-webhook:1",
261
- "io.camunda:aws-sqs-inbound:1",
262
- "io.camunda:aws-sns-webhook:1",
263
- ],
264
- },
265
- consumeUnmatchedEvents: {
266
- since: "8.6",
267
- connectors: [
268
- "io.camunda:webhook:1",
269
- "io.camunda:connector-rabbitmq-inbound:1",
270
- "io.camunda:http-polling:1",
271
- "io.camunda:connector-kafka-inbound:1",
272
- "io.camunda:slack-webhook:1",
273
- "io.camunda:aws-sqs-inbound:1",
274
- "io.camunda:aws-sns-webhook:1",
275
- ],
276
- },
277
- deduplicationModeManualFlag: {
278
- since: "8.6",
279
- connectors: [
280
- "io.camunda:connector-rabbitmq-inbound:1",
281
- "io.camunda:http-polling:1",
282
- "io.camunda:connector-kafka-inbound:1",
283
- "io.camunda:aws-sqs-inbound:1",
284
- ],
285
- },
286
- };
287
- /**
288
- * Every rule of the plugin's `camunda-cloud-*` configs, with the versions it
289
- * is enabled for — `index.js` of the plugin, as data.
290
- */
291
- export const CAMUNDA_COMPAT_RULES = {
292
- "ad-hoc-sub-process": { severity: "error", since: "8.7", coverage: "implemented" },
293
- "agent-fromai-contract": { severity: "error", since: "8.8", coverage: "implemented" },
294
- "agent-tool-documentation": {
295
- severity: "warn",
296
- since: "8.8",
297
- coverage: "existing",
298
- equivalents: ["agentic/tool-no-description"],
299
- note: "BPMN Kit's `agentic/tool-no-description` reports the same gap.",
300
- },
301
- "agent-tool-output-key": { severity: "warn", since: "8.8", coverage: "implemented" },
302
- "before-all-execution-listener": { severity: "error", since: "8.10", coverage: "implemented" },
303
- "called-element": {
304
- severity: "error",
305
- coverage: "implemented",
306
- equivalents: ["deploy/call-activity-no-process"],
307
- },
308
- "cancel-execution-listener": { severity: "error", since: "8.10", coverage: "implemented" },
309
- "collapsed-subprocess": { severity: "error", until: "8.4", coverage: "implemented" },
310
- "connector-properties": { severity: "warn", since: "8.0", coverage: "implemented" },
311
- "duplicate-execution-listener-headers": {
312
- severity: "error",
313
- since: "8.10",
314
- coverage: "implemented",
315
- },
316
- "duplicate-execution-listeners": { severity: "error", since: "8.6", coverage: "implemented" },
317
- "duplicate-task-headers": { severity: "error", coverage: "implemented" },
318
- "element-type": { severity: "error", coverage: "implemented" },
319
- "error-reference": { severity: "error", coverage: "implemented" },
320
- "escalation-boundary-event-attached-to-ref": {
321
- severity: "error",
322
- since: "8.2",
323
- coverage: "implemented",
324
- },
325
- "escalation-reference": { severity: "error", since: "8.2", coverage: "implemented" },
326
- "event-based-gateway-target": { severity: "error", coverage: "implemented" },
327
- "executable-process": {
328
- severity: "error",
329
- coverage: "existing",
330
- equivalents: ["deploy/process-not-executable"],
331
- note: "`deploy/process-not-executable` reports every non-executable process; the plugin only complains when none is executable.",
332
- },
333
- "execution-listener": { severity: "error", since: "8.6", coverage: "implemented" },
334
- feel: {
335
- severity: "error",
336
- coverage: "existing",
337
- equivalents: ["feel-syntax/parse-error"],
338
- note: "BPMN Kit's own FEEL parser reports syntax errors as `feel-syntax/parse-error`.",
339
- },
340
- "feel-compatibility": {
341
- severity: "error",
342
- coverage: "implemented",
343
- note: "Parses with `@bpmnkit/feel` rather than the plugin's lezer-feel grammar, so an expression only one of the two parsers accepts is judged differently.",
344
- },
345
- implementation: {
346
- severity: "error",
347
- coverage: "implemented",
348
- equivalents: ["deploy/service-task-no-type"],
349
- },
350
- "inclusive-gateway": { severity: "error", since: "8.1", until: "8.6", coverage: "implemented" },
351
- "io-mapping": { severity: "error", coverage: "implemented" },
352
- "link-event": {
353
- severity: "error",
354
- since: "8.2",
355
- coverage: "implemented",
356
- equivalents: ["flow/link-event-mismatch"],
357
- note: "Where bpmnlint's `link-event` runs (`flow/link-event-mismatch`), it reports the same unnamed or duplicate link event, and that finding stays.",
358
- },
359
- "loop-characteristics": { severity: "error", coverage: "implemented" },
360
- "message-reference": {
361
- severity: "error",
362
- coverage: "implemented",
363
- equivalents: ["deploy/message-start-no-name"],
364
- },
365
- "no-before-all-execution-listener": {
366
- severity: "error",
367
- since: "8.6",
368
- until: "8.10",
369
- coverage: "implemented",
370
- },
371
- "no-binding-type": { severity: "error", until: "8.6", coverage: "implemented" },
372
- "no-business-id": { severity: "error", until: "8.10", coverage: "implemented" },
373
- "no-candidate-users": { severity: "error", until: "8.2", coverage: "implemented" },
374
- "no-cancel-execution-listener": { severity: "error", until: "8.10", coverage: "implemented" },
375
- "no-execution-listener-headers": { severity: "error", until: "8.10", coverage: "implemented" },
376
- "no-execution-listeners": { severity: "error", until: "8.6", coverage: "implemented" },
377
- "no-expression": { severity: "error", coverage: "implemented" },
378
- "no-interrupting-event-subprocess": { severity: "error", since: "8.7", coverage: "implemented" },
379
- "no-job-priority-definition": { severity: "error", until: "8.10", coverage: "implemented" },
380
- "no-loop": { severity: "error", coverage: "implemented" },
381
- "no-multiple-none-start-events": { severity: "error", coverage: "implemented" },
382
- "no-priority-definition": { severity: "error", until: "8.6", coverage: "implemented" },
383
- "no-propagate-all-parent-variables": { severity: "error", until: "8.2", coverage: "implemented" },
384
- "no-signal-event-sub-process": {
385
- severity: "error",
386
- since: "8.2",
387
- until: "8.3",
388
- coverage: "implemented",
389
- },
390
- "no-task-listeners": { severity: "error", until: "8.8", coverage: "implemented" },
391
- "no-task-schedule": { severity: "error", until: "8.2", coverage: "implemented" },
392
- "no-template": { severity: "error", until: "8.0", coverage: "implemented" },
393
- "no-version-tag": { severity: "error", until: "8.6", coverage: "implemented" },
394
- "no-zeebe-properties": { severity: "error", until: "8.1", coverage: "implemented" },
395
- "no-zeebe-user-task": { severity: "error", until: "8.5", coverage: "implemented" },
396
- "priority-definition": { severity: "error", since: "8.6", coverage: "implemented" },
397
- secrets: { severity: "warn", since: "8.3", coverage: "implemented" },
398
- "sequence-flow-condition": {
399
- severity: "error",
400
- coverage: "implemented",
401
- equivalents: ["feel/empty-condition"],
402
- },
403
- "signal-reference": { severity: "error", since: "8.3", coverage: "implemented" },
404
- "start-event-form": { severity: "error", coverage: "implemented" },
405
- "start-event-form-embedded": { severity: "warn", since: "8.9", coverage: "implemented" },
406
- subscription: {
407
- severity: "error",
408
- coverage: "partial",
409
- equivalents: ["deploy/message-catch-no-correlation"],
410
- note: "A `zeebe:subscription` placed on the catch element instead of on its `bpmn:message` is reported as the plugin reports it: the message is missing its subscription. BPMN Kit's builders write it on the message.",
411
- },
412
- "task-listener": { severity: "error", since: "8.8", coverage: "implemented" },
413
- "task-schedule": { severity: "error", since: "8.2", coverage: "implemented" },
414
- timer: { severity: "error", coverage: "implemented" },
415
- "unresolvable-secret-reference": { severity: "error", since: "8.10", coverage: "implemented" },
416
- "user-task-definition": { severity: "warn", coverage: "implemented" },
417
- "user-task-form": { severity: "error", coverage: "implemented" },
418
- "variable-name": { severity: "error", coverage: "implemented" },
419
- "version-tag": { severity: "error", since: "8.6", coverage: "implemented" },
420
- "wait-for-completion": { severity: "error", since: "8.5", coverage: "implemented" },
421
- "zeebe-user-task": { severity: "warn", since: "8.6", coverage: "implemented" },
422
- };
25
+ export const TIMER_SUPPORT = Object.fromEntries(Object.entries(TIMER_SUPPORT_TABLE).map(([eventType, props]) => [
26
+ eventType,
27
+ Object.fromEntries(Object.entries(props).map(([property, cell]) => [
28
+ property,
29
+ (interrupting, inEventSubProcess) => cell[interrupting ? "interrupting" : "nonInterrupting"][inEventSubProcess ? "inEventSubProcess" : "elsewhere"],
30
+ ])),
31
+ ]));
423
32
  //# sourceMappingURL=camunda-compat-data.js.map
@@ -10,6 +10,9 @@
10
10
  *
11
11
  * @packageDocumentation
12
12
  */
13
+ import { type FeelNode } from "@bpmnkit/feel";
14
+ /** Direct sub-expressions of a node, in source order. */
15
+ export declare function feelChildren(node: FeelNode): FeelNode[];
13
16
  /**
14
17
  * The built-in functions an expression calls, as `@bpmn-io/feel-analyzer`
15
18
  * reports them to the plugin: a call counts as a built-in call only when the
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import { parseExpression } from "@bpmnkit/feel";
14
14
  /** Direct sub-expressions of a node, in source order. */
15
- function feelChildren(node) {
15
+ export function feelChildren(node) {
16
16
  switch (node.kind) {
17
17
  case "list":
18
18
  return node.items;