@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.
- package/agent-cards/bpmn.md +3 -3
- package/builder-reference.md +11 -9
- package/dist/bpmn/auto-layout.js +82 -26
- package/dist/bpmn/bpmn-builder.d.ts +84 -7
- package/dist/bpmn/bpmn-builder.js +313 -78
- package/dist/bpmn/bpmn-model.d.ts +2 -0
- package/dist/bpmn/bpmn-parser.js +68 -76
- package/dist/bpmn/bpmn-serializer.js +60 -19
- package/dist/bpmn/bpmnlint.js +4 -69
- package/dist/bpmn/builder-rules.d.ts +20 -0
- package/dist/bpmn/builder-rules.js +120 -0
- package/dist/bpmn/camunda-compat-data.d.ts +10 -148
- package/dist/bpmn/camunda-compat-data.js +16 -407
- package/dist/bpmn/camunda-compat-feel.d.ts +3 -0
- package/dist/bpmn/camunda-compat-feel.js +1 -1
- package/dist/bpmn/camunda-compat.js +7 -6
- package/dist/bpmn/camunda7/export.js +4 -1
- package/dist/bpmn/camunda7/juel.js +2 -1
- package/dist/bpmn/camunda7/migrate.d.ts +23 -0
- package/dist/bpmn/camunda7/migrate.js +75 -3
- package/dist/bpmn/compact-stream.js +2 -1
- package/dist/bpmn/compact.d.ts +80 -4
- package/dist/bpmn/compact.js +220 -38
- package/dist/bpmn/feel-condition.d.ts +9 -0
- package/dist/bpmn/feel-condition.js +19 -0
- package/dist/bpmn/full-operations.js +31 -4
- package/dist/bpmn/index.d.ts +13 -3
- package/dist/bpmn/index.js +16 -15
- package/dist/bpmn/operations.d.ts +4 -4
- package/dist/bpmn/operations.js +14 -2
- package/dist/bpmn/optimize/bpmnlint-rules.js +7 -40
- package/dist/bpmn/optimize/index.js +15 -1
- package/dist/bpmn/optimize/tasks.js +12 -3
- package/dist/bpmn/process-delta.d.ts +18 -0
- package/dist/bpmn/process-delta.js +20 -2
- package/dist/bpmn/process-text-writer.js +27 -1
- package/dist/bpmn/process-text.d.ts +9 -3
- package/dist/bpmn/process-text.js +122 -16
- package/dist/bpmn/stable-ids.d.ts +2 -0
- package/dist/bpmn/stable-ids.js +8 -0
- package/dist/bpmn/zeebe-extensions.js +2 -1
- package/dist/bpmn/zeebe-placement.js +6 -129
- package/dist/bpmn/zeebe-validate/context.d.ts +132 -0
- package/dist/bpmn/zeebe-validate/context.js +241 -0
- package/dist/bpmn/zeebe-validate/gate.d.ts +87 -0
- package/dist/bpmn/zeebe-validate/gate.js +492 -0
- package/dist/bpmn/zeebe-validate/index.d.ts +37 -0
- package/dist/bpmn/zeebe-validate/index.js +106 -0
- package/dist/bpmn/zeebe-validate/rules/events.d.ts +4 -0
- package/dist/bpmn/zeebe-validate/rules/events.js +580 -0
- package/dist/bpmn/zeebe-validate/rules/extensions.d.ts +4 -0
- package/dist/bpmn/zeebe-validate/rules/extensions.js +411 -0
- package/dist/bpmn/zeebe-validate/rules/gateways.d.ts +3 -0
- package/dist/bpmn/zeebe-validate/rules/gateways.js +296 -0
- package/dist/bpmn/zeebe-validate/rules/references.d.ts +3 -0
- package/dist/bpmn/zeebe-validate/rules/references.js +495 -0
- package/dist/bpmn/zeebe-validate/rules/structure.d.ts +3 -0
- package/dist/bpmn/zeebe-validate/rules/structure.js +629 -0
- package/dist/bpmn/zeebe-validate/rules/tasks.d.ts +4 -0
- package/dist/bpmn/zeebe-validate/rules/tasks.js +446 -0
- package/dist/bpmn/zeebe-validate/xml.d.ts +15 -0
- package/dist/bpmn/zeebe-validate/xml.js +1062 -0
- package/dist/bpmn/zeebe-validate/xsd.d.ts +19 -0
- package/dist/bpmn/zeebe-validate/xsd.js +350 -0
- package/dist/connectors/aliases.js +1 -0
- package/dist/connectors/apply-element.d.ts +5 -2
- package/dist/connectors/apply-element.js +6 -0
- package/dist/connectors/apply-many.d.ts +9 -2
- package/dist/connectors/apply-many.js +17 -2
- package/dist/connectors/apply.d.ts +4 -2
- package/dist/connectors/deployability.d.ts +27 -0
- package/dist/connectors/deployability.js +41 -0
- package/dist/connectors/index.d.ts +1 -0
- package/dist/connectors/lines.d.ts +10 -0
- package/dist/connectors/lines.js +13 -4
- package/dist/connectors/templates/generated.js +10101 -3188
- package/dist/dmn/dmn-model.d.ts +24 -4
- package/dist/dmn/dmn-parser.js +37 -3
- package/dist/dmn/dmn-serializer.js +48 -47
- package/dist/dmn/lint.js +4 -11
- package/dist/errors.d.ts +30 -1
- package/dist/errors.js +31 -0
- package/dist/form/form-model.d.ts +11 -0
- package/dist/form/form-parser.d.ts +1 -0
- package/dist/form/form-parser.js +48 -12
- package/dist/form/form-serializer.js +40 -17
- package/dist/form/lint.js +6 -40
- package/dist/generated/bpmn-elements.d.ts +5 -0
- package/dist/generated/bpmn-elements.js +151 -0
- package/dist/generated/camunda-compat-data.d.ts +148 -0
- package/dist/generated/camunda-compat-data.js +371 -0
- package/dist/generated/dmn-elements.d.ts +12 -0
- package/dist/generated/dmn-elements.js +45 -0
- package/dist/generated/form-elements.d.ts +5 -0
- package/dist/generated/form-elements.js +45 -0
- package/dist/generated/lint-rules.d.ts +17 -0
- package/dist/generated/lint-rules.js +116 -0
- package/dist/generated/zeebe-elements.d.ts +10 -0
- package/dist/generated/zeebe-elements.js +168 -0
- package/dist/generated/zeebe-rules.d.ts +25 -0
- package/dist/generated/zeebe-rules.js +202 -0
- package/dist/index.d.ts +10 -4
- package/dist/index.js +4 -1
- package/dist/layout/annotations.js +21 -1
- package/dist/layout/orthogonal.js +9 -3
- package/dist/plan/compile.d.ts +26 -1
- package/dist/plan/compile.js +48 -6
- package/dist/plan/merge.d.ts +2 -1
- package/dist/plan/merge.js +13 -5
- package/package.json +2 -2
package/dist/connectors/lines.js
CHANGED
|
@@ -14,6 +14,7 @@ import { applyTemplateToElement, messageRefOf } from "./apply-element.js";
|
|
|
14
14
|
import { evalCondition, resolveValues } from "./apply.js";
|
|
15
15
|
import { connectorAlias, connectorCards, templateIdForAlias } from "./cards.js";
|
|
16
16
|
import { allTemplates, getTemplate, isSecretField, propertyKey } from "./catalog.js";
|
|
17
|
+
import { appliedDeployProblems } from "./deployability.js";
|
|
17
18
|
/**
|
|
18
19
|
* How to write `with` lines — the system prompt of the connect pass, which
|
|
19
20
|
* configures the connectors of a diagram that already has its shape. The
|
|
@@ -442,9 +443,13 @@ function applyApiService(service, values, written, out) {
|
|
|
442
443
|
*
|
|
443
444
|
* Pass `parseProcessText(text).connectors` with the expanded diagram, or the
|
|
444
445
|
* lines of a change script with the ids they resolve to.
|
|
446
|
+
*
|
|
447
|
+
* Unless `validate: false`, the configured elements are then checked with Zeebe's
|
|
448
|
+
* deploy rules; each error is a problem on the line that configured the element.
|
|
445
449
|
*/
|
|
446
450
|
export function applyConnectorLines(definitions, lines, options = {}) {
|
|
447
451
|
const out = { definitions, problems: [], fixes: [], questions: [] };
|
|
452
|
+
const lineOf = new Map();
|
|
448
453
|
for (const line of lines) {
|
|
449
454
|
const resolved = resolveConnectorLine(line, options);
|
|
450
455
|
for (const message of resolved.problems)
|
|
@@ -459,10 +464,11 @@ export function applyConnectorLines(definitions, lines, options = {}) {
|
|
|
459
464
|
const kept = current?.unknownAttributes["zeebe:modelerTemplate"] === template.id
|
|
460
465
|
? readValues(out.definitions, current, template)
|
|
461
466
|
: {};
|
|
462
|
-
const applied = applyTemplateToElement(out.definitions, line.elementId, template, {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
467
|
+
const applied = applyTemplateToElement(out.definitions, line.elementId, template, { ...kept, ...resolved.values },
|
|
468
|
+
// Checked once below, when every line has been applied.
|
|
469
|
+
{ validate: false });
|
|
470
|
+
if (!lineOf.has(line.elementId))
|
|
471
|
+
lineOf.set(line.elementId, line.line);
|
|
466
472
|
out.definitions = applied.definitions;
|
|
467
473
|
const card = resolved.card;
|
|
468
474
|
const head = `with ${line.id}: ${card.alias}${card.operation ? ` ${card.operation}` : ""}`;
|
|
@@ -490,6 +496,9 @@ export function applyConnectorLines(definitions, lines, options = {}) {
|
|
|
490
496
|
}
|
|
491
497
|
}
|
|
492
498
|
}
|
|
499
|
+
for (const problem of appliedDeployProblems(out.definitions, [...lineOf.keys()], options)) {
|
|
500
|
+
out.problems.push({ line: lineOf.get(problem.elementId) ?? 0, message: problem.message });
|
|
501
|
+
}
|
|
493
502
|
return out;
|
|
494
503
|
}
|
|
495
504
|
function elementOf(definitions, id) {
|