@uipath/maestro-builder-sdk 6.85.7 → 6.86.0
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/dist/api-index.md +4 -4
- package/dist/api-members.md +1 -1
- package/dist/bpmn/bpmn-expr-check.d.ts +13 -5
- package/dist/bpmn/bpmn-expr-check.js +32 -9
- package/dist/bpmn/bpmn-sdk.d.ts +4 -0
- package/dist/bpmn/bpmn-sdk.js +8 -7
- package/dist/bpmn/check.js +26 -0
- package/dist/core/refusals.d.ts +2 -2
- package/dist/core/refusals.js +2 -2
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -418,8 +418,8 @@ could hand you spans for a version you do not have.
|
|
|
418
418
|
| `BindingOpts` | interface | `dist/bpmn/bpmn-sdk.d.ts:1046-1113` | Option shapes | Options for `.binding()`. |
|
|
419
419
|
| `BindingsRegistry` | class | `dist/bpmn/bpmn-sdk.d.ts:2101-2125` | Supporting types | Collects `uipath:binding` declarations, de-duped by id. |
|
|
420
420
|
| `BoundaryOpts` | interface | `dist/bpmn/bpmn-sdk.d.ts:773-797` | Option shapes | Options for `.boundaryEvent()`: the activity it attaches to, whether it interrupts that activity, and the event… |
|
|
421
|
-
| `bpmn` | function | `dist/bpmn/bpmn-sdk.d.ts:
|
|
422
|
-
| `BpmnBuilder` | class | `dist/bpmn/bpmn-sdk.d.ts:3564-
|
|
421
|
+
| `bpmn` | function | `dist/bpmn/bpmn-sdk.d.ts:3812-3831` | BPMN authoring | Start building a BPMN process with the given id. |
|
|
422
|
+
| `BpmnBuilder` | class | `dist/bpmn/bpmn-sdk.d.ts:3564-3736` | Builders | The top-level process builder `bpmn()` returns — every graph method of the shared scope (events, gateways, tasks,… |
|
|
423
423
|
| `BpmnConnectorOpts` | type | `dist/bpmn/bpmn-sdk.d.ts:3342-3381` | Option shapes | `.connector()` options: the shared connector options, plus the BPMN-only display `name` and output-variable override. |
|
|
424
424
|
| `BpmnFlow` | interface | `dist/bpmn/bpmn-sdk.d.ts:364-384` | Supporting types | One sequence flow in the built graph — the edge from `source` to `target` (`bpmn:sequenceFlow`). |
|
|
425
425
|
| `BpmnNode` | type | `dist/bpmn/bpmn-sdk.d.ts:90-298` | Supporting types | One node in the built graph — a discriminated union with one arm per BPMN element kind, which the serializer walks into… |
|
|
@@ -447,8 +447,8 @@ could hand you spans for a version you do not have.
|
|
|
447
447
|
| `ErrorHandlerOpts` | interface | `dist/bpmn/bpmn-sdk.d.ts:1852-1864` | Option shapes | Options for ActivityBuilder.onError. |
|
|
448
448
|
| `ErrorLike` | type | `dist/bpmn/bpmn-sdk.d.ts:44-55` | Supporting types | What an author passes for an error definition. |
|
|
449
449
|
| `ErrorMappingRow` | interface | `dist/bpmn/bpmn-sdk.d.ts:299-347` | Supporting types | One row of `uipath:errorMapping` — how an activity classifies one kind of failure. |
|
|
450
|
-
| `errorSchema` | const | `dist/bpmn/bpmn-sdk.d.ts:
|
|
451
|
-
| `errorSchemaWithResponse` | const | `dist/bpmn/bpmn-sdk.d.ts:
|
|
450
|
+
| `errorSchema` | const | `dist/bpmn/bpmn-sdk.d.ts:3737-3778` | BPMN authoring | The `Error` variable's shape — the platform's own error envelope. |
|
|
451
|
+
| `errorSchemaWithResponse` | const | `dist/bpmn/bpmn-sdk.d.ts:3779-3811` | BPMN authoring | The same envelope plus `response` — what a node whose failure carries a payload writes, and what the same source calls… |
|
|
452
452
|
| `EventDef` | type | `dist/bpmn/bpmn-sdk.d.ts:56-74` | Supporting types | The resolved event definition attached to an event node. |
|
|
453
453
|
| `EventFilter` | type | `dist/core/actions.d.ts:927-978` | Supporting types | One filter condition on the event payload. |
|
|
454
454
|
| `EventKind` | type | `dist/bpmn/bpmn-sdk.d.ts:77-78` | Supporting types | The four non-boundary event element kinds a BpmnNode can be. |
|
package/dist/api-members.md
CHANGED
|
@@ -114,7 +114,7 @@ not find it either.
|
|
|
114
114
|
| `break` | method | `StepList` | `dist/flow-sdk.d.ts:1094-1103` |
|
|
115
115
|
| `breakEnabled` | property | `DoWhileOptions` | `dist/flow-sdk.d.ts:425-426` |
|
|
116
116
|
| `breakEnabled` | property | `LoopOptions` | `dist/flow-sdk.d.ts:412-416` |
|
|
117
|
-
| `build` | method | `BpmnBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3726-
|
|
117
|
+
| `build` | method | `BpmnBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3726-3735` |
|
|
118
118
|
| `build` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:2066-2071` |
|
|
119
119
|
| `build` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1633-1639` |
|
|
120
120
|
| `businessEvent` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:2055-2065` |
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* bpmn-expr-check — the BPMN adapter over the shared `core/expr-check`, run by
|
|
3
|
-
* `
|
|
3
|
+
* `check()` (`checkExpressions` in check.ts). Its codes are `lint` (decided on #1712):
|
|
4
|
+
* the serializer writes the read as authored and `bpmn compile` does not refuse it.
|
|
5
|
+
* Not by `BpmnBuilder.build()`: a throw there stopped every path that builds first,
|
|
6
|
+
* so such a process could not be checked, merged or round-tripped (#1676).
|
|
4
7
|
*
|
|
5
8
|
* A BPMN `=`-expression reads a declared variable as `=vars.<name>` (a gateway
|
|
6
9
|
* flow `condition`, a script `input`, a multi-instance `collection`/`completion`,
|
|
@@ -27,14 +30,19 @@ import { CompileRefusal } from '../core/compile-refusal.js';
|
|
|
27
30
|
/** A diagnostic plus the element it was found in. */
|
|
28
31
|
export interface BpmnLocatedDiagnostic extends ExprDiagnostic {
|
|
29
32
|
where: string;
|
|
33
|
+
/** The id of the flow or element the expression is on. */
|
|
34
|
+
elementId?: string;
|
|
30
35
|
}
|
|
31
36
|
/** Every first-level expression problem in a built BPMN process, stamped with its location. */
|
|
32
37
|
export declare function checkBpmnExpressions(built: BuiltBpmn): BpmnLocatedDiagnostic[];
|
|
33
38
|
/**
|
|
34
|
-
*
|
|
35
|
-
* undeclared `vars.<name>` reference.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
39
|
+
* Was thrown by `BpmnBuilder.build()` when the first-level expression check found an
|
|
40
|
+
* undeclared `vars.<name>` reference. `message` lists every problem; `diagnostics`
|
|
41
|
+
* carries them structured.
|
|
42
|
+
*
|
|
43
|
+
* @deprecated Nothing throws it since #1676: `check()` reports the same diagnostics,
|
|
44
|
+
* and `compile` writes the read as authored (the codes are `lint`). Kept so code
|
|
45
|
+
* that names the class still compiles.
|
|
38
46
|
*/
|
|
39
47
|
export declare class BpmnBuildError extends CompileRefusal {
|
|
40
48
|
readonly diagnostics: BpmnLocatedDiagnostic[];
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* bpmn-expr-check — the BPMN adapter over the shared `core/expr-check`, run by
|
|
3
|
-
* `
|
|
3
|
+
* `check()` (`checkExpressions` in check.ts). Its codes are `lint` (decided on #1712):
|
|
4
|
+
* the serializer writes the read as authored and `bpmn compile` does not refuse it.
|
|
5
|
+
* Not by `BpmnBuilder.build()`: a throw there stopped every path that builds first,
|
|
6
|
+
* so such a process could not be checked, merged or round-tripped (#1676).
|
|
4
7
|
*
|
|
5
8
|
* A BPMN `=`-expression reads a declared variable as `=vars.<name>` (a gateway
|
|
6
9
|
* flow `condition`, a script `input`, a multi-instance `collection`/`completion`,
|
|
@@ -85,10 +88,25 @@ function walk(nodes, flows, rootsIn, out) {
|
|
|
85
88
|
for (const n of nodes)
|
|
86
89
|
for (const name of nodeDeclaredVars(n))
|
|
87
90
|
roots.vars.add(name);
|
|
88
|
-
for (const f of flows)
|
|
89
|
-
|
|
91
|
+
for (const f of flows) {
|
|
92
|
+
const found = [];
|
|
93
|
+
checkExpr(f.condition, `flow "${f.id}" condition`, roots, found);
|
|
94
|
+
for (const d of found)
|
|
95
|
+
out.push({ ...d, elementId: f.id });
|
|
96
|
+
}
|
|
90
97
|
for (const n of nodes) {
|
|
91
|
-
|
|
98
|
+
walkNode(n, roots, out);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/** The expressions on one node, each finding stamped with its id; a sub-process recurses into its own scope. */
|
|
102
|
+
function walkNode(n, roots, located) {
|
|
103
|
+
const at = `${n.kind} "${n.id}"`;
|
|
104
|
+
const out = [];
|
|
105
|
+
const flush = () => {
|
|
106
|
+
for (const d of out.splice(0))
|
|
107
|
+
located.push({ ...d, elementId: n.id });
|
|
108
|
+
};
|
|
109
|
+
{
|
|
92
110
|
// An errorMapping row's `condition` is an expression on EVERY activity kind, so
|
|
93
111
|
// it is checked before the per-kind arms rather than inside them. Worth checking
|
|
94
112
|
// here specifically because the CANVAS treats an undeclared reference in it as a
|
|
@@ -159,9 +177,11 @@ function walk(nodes, flows, rootsIn, out) {
|
|
|
159
177
|
subRoots.varIds.add(v.id);
|
|
160
178
|
}
|
|
161
179
|
checkExpr(n.loop?.completion, `${at} loop completion`, subRoots, out);
|
|
162
|
-
|
|
180
|
+
flush();
|
|
181
|
+
walk(n.nodes, n.flows, subRoots, located);
|
|
163
182
|
}
|
|
164
183
|
}
|
|
184
|
+
flush();
|
|
165
185
|
}
|
|
166
186
|
/** Every first-level expression problem in a built BPMN process, stamped with its location. */
|
|
167
187
|
export function checkBpmnExpressions(built) {
|
|
@@ -209,10 +229,13 @@ function connectorBindingNames(nodes) {
|
|
|
209
229
|
return out;
|
|
210
230
|
}
|
|
211
231
|
/**
|
|
212
|
-
*
|
|
213
|
-
* undeclared `vars.<name>` reference.
|
|
214
|
-
*
|
|
215
|
-
*
|
|
232
|
+
* Was thrown by `BpmnBuilder.build()` when the first-level expression check found an
|
|
233
|
+
* undeclared `vars.<name>` reference. `message` lists every problem; `diagnostics`
|
|
234
|
+
* carries them structured.
|
|
235
|
+
*
|
|
236
|
+
* @deprecated Nothing throws it since #1676: `check()` reports the same diagnostics,
|
|
237
|
+
* and `compile` writes the read as authored (the codes are `lint`). Kept so code
|
|
238
|
+
* that names the class still compiles.
|
|
216
239
|
*/
|
|
217
240
|
export class BpmnBuildError extends CompileRefusal {
|
|
218
241
|
diagnostics;
|
package/dist/bpmn/bpmn-sdk.d.ts
CHANGED
|
@@ -3726,6 +3726,10 @@ export declare class BpmnBuilder extends ScopeBuilder {
|
|
|
3726
3726
|
/**
|
|
3727
3727
|
* Finish the process and return the graph the serializer turns into XML.
|
|
3728
3728
|
*
|
|
3729
|
+
* It does not check expressions: `check()` reports an undeclared `vars.<name>` read
|
|
3730
|
+
* and `compile` writes it as authored, so a process that already reads one can be
|
|
3731
|
+
* checked, merged and round-tripped.
|
|
3732
|
+
*
|
|
3729
3733
|
* @returns The built process — its elements, flows and variables.
|
|
3730
3734
|
*/
|
|
3731
3735
|
build(): BuiltBpmn;
|
package/dist/bpmn/bpmn-sdk.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { connector as makeConnector } from '../core/actions.js';
|
|
2
|
-
import { checkBpmnExpressions, BpmnBuildError } from './bpmn-expr-check.js';
|
|
3
2
|
import { BPMN_SCHEMA_VERSIONS } from './format-profile.js';
|
|
4
3
|
import { schemaVersionRefusal } from '../schema-version.js';
|
|
5
4
|
import { bindingRequiredFields, REGISTRY_GAPS, registryType } from './typed-node.js';
|
|
@@ -2899,6 +2898,10 @@ export class BpmnBuilder extends ScopeBuilder {
|
|
|
2899
2898
|
/**
|
|
2900
2899
|
* Finish the process and return the graph the serializer turns into XML.
|
|
2901
2900
|
*
|
|
2901
|
+
* It does not check expressions: `check()` reports an undeclared `vars.<name>` read
|
|
2902
|
+
* and `compile` writes it as authored, so a process that already reads one can be
|
|
2903
|
+
* checked, merged and round-tripped.
|
|
2904
|
+
*
|
|
2902
2905
|
* @returns The built process — its elements, flows and variables.
|
|
2903
2906
|
*/
|
|
2904
2907
|
build() {
|
|
@@ -2966,12 +2969,10 @@ export class BpmnBuilder extends ScopeBuilder {
|
|
|
2966
2969
|
schemas: this._schemas,
|
|
2967
2970
|
preservation: this._preservation,
|
|
2968
2971
|
};
|
|
2969
|
-
//
|
|
2970
|
-
//
|
|
2971
|
-
//
|
|
2972
|
-
|
|
2973
|
-
if (errors.length)
|
|
2974
|
-
throw new BpmnBuildError(built, errors);
|
|
2972
|
+
// No expression check here: `check()` reports an undeclared `vars.<name>` read,
|
|
2973
|
+
// and `compile` writes it as authored (both codes are `lint`, decided on #1712).
|
|
2974
|
+
// It threw here, and every path builds first, so a process that already read one
|
|
2975
|
+
// could not be checked, merged or round-tripped (#1676).
|
|
2975
2976
|
return built;
|
|
2976
2977
|
}
|
|
2977
2978
|
}
|
package/dist/bpmn/check.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { checkBpmnExpressions } from './bpmn-expr-check.js';
|
|
1
2
|
import { allNodes, collectSerializerRefusals, folderCompanionKeys, implicitNodeVars, processId } from './serialize.js';
|
|
2
3
|
import { KNOWN_METHOD_SET } from './known-methods.js';
|
|
3
4
|
import { EQUALS_EXPR_DIALECT, checkConnectorLookups, checkConnectorResources, checkConnectorSchema, } from '../core/connector-checks.js';
|
|
@@ -87,6 +88,7 @@ export function check(built, opts = {}) {
|
|
|
87
88
|
const diags = [];
|
|
88
89
|
// Duplicate and missing ids (`documentIdProblems`) are the serializer's.
|
|
89
90
|
checkScope(built.nodes, built.flows, 'process', diags, true);
|
|
91
|
+
checkExpressions(built, diags);
|
|
90
92
|
checkScopedVars(built, diags);
|
|
91
93
|
checkVariableOrder(built, diags);
|
|
92
94
|
checkFolderBindings(built, diags);
|
|
@@ -100,6 +102,30 @@ export function check(built, opts = {}) {
|
|
|
100
102
|
diags.push(...serializerRefusals(built, opts, diags));
|
|
101
103
|
return diags;
|
|
102
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* The first-level expression check (bpmn-expr-check): an undeclared `vars.<name>` or
|
|
107
|
+
* `bindings.<name>` read, or a declared variable read without `vars.`.
|
|
108
|
+
*
|
|
109
|
+
* Both codes are `lint` (decided on #1712): the serializer writes the read exactly as
|
|
110
|
+
* authored, so `compile` writes it and `check` is where it is reported. It ran in
|
|
111
|
+
* `BpmnBuilder.build()` and threw, which stopped every path that builds first, so a
|
|
112
|
+
* process that already read an undeclared variable could not be checked, merged or
|
|
113
|
+
* round-tripped (#1676).
|
|
114
|
+
*/
|
|
115
|
+
function checkExpressions(built, diags) {
|
|
116
|
+
const nodeIds = new Set(allNodes(built.nodes).map((n) => n.id));
|
|
117
|
+
for (const d of checkBpmnExpressions(built)) {
|
|
118
|
+
diags.push({
|
|
119
|
+
level: d.level,
|
|
120
|
+
code: d.code,
|
|
121
|
+
// The suggestion goes in the message too: the CLI prints `[code] message` only.
|
|
122
|
+
message: `in ${d.where}: ${d.message}${d.suggestion ? ` (did you mean "${d.suggestion}"?)` : ''}`,
|
|
123
|
+
where: d.elementId ?? d.where,
|
|
124
|
+
...(d.suggestion ? { suggestion: d.suggestion } : {}),
|
|
125
|
+
...(d.elementId !== undefined && nodeIds.has(d.elementId) ? { nodeId: d.elementId } : {}),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
103
129
|
/**
|
|
104
130
|
* Every refusal `compile` would raise for `built`: the serializer's model step,
|
|
105
131
|
* run in collect mode (`collectSerializerRefusals`), each placed on its element.
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -328,9 +328,9 @@ export declare const REFUSALS: {
|
|
|
328
328
|
readonly EVENT_UNPREPARED: "lint";
|
|
329
329
|
readonly EVENT_WHERE_NOT_SCALAR: "lowering";
|
|
330
330
|
readonly EXCEPTION_STAGE_REQUIRED: "lint";
|
|
331
|
-
readonly EXPR_BARE_VAR_REF: "
|
|
331
|
+
readonly EXPR_BARE_VAR_REF: "lint";
|
|
332
332
|
readonly EXPR_SYNTAX: "lowering";
|
|
333
|
-
readonly EXPR_UNDECLARED_REF: "
|
|
333
|
+
readonly EXPR_UNDECLARED_REF: "lint";
|
|
334
334
|
readonly EXTERNAL_TASK_CONNECTION: "lowering";
|
|
335
335
|
readonly EXTERNAL_TASK_DESCRIPTOR: "lint";
|
|
336
336
|
readonly EXTERNAL_TASK_DESCRIPTOR_CONTRACT: "lowering";
|
package/dist/core/refusals.js
CHANGED
|
@@ -401,9 +401,9 @@ export const REFUSALS = {
|
|
|
401
401
|
EVENT_UNPREPARED: 'lint',
|
|
402
402
|
EVENT_WHERE_NOT_SCALAR: 'lowering',
|
|
403
403
|
EXCEPTION_STAGE_REQUIRED: 'lint',
|
|
404
|
-
EXPR_BARE_VAR_REF: '
|
|
404
|
+
EXPR_BARE_VAR_REF: 'lint',
|
|
405
405
|
EXPR_SYNTAX: 'lowering',
|
|
406
|
-
EXPR_UNDECLARED_REF: '
|
|
406
|
+
EXPR_UNDECLARED_REF: 'lint',
|
|
407
407
|
EXTERNAL_TASK_CONNECTION: 'lowering',
|
|
408
408
|
EXTERNAL_TASK_DESCRIPTOR: 'lint',
|
|
409
409
|
EXTERNAL_TASK_DESCRIPTOR_CONTRACT: 'lowering',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.86.0",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"@types/node": "^22.7.0",
|
|
104
104
|
"esbuild": "^0.28.1"
|
|
105
105
|
},
|
|
106
|
-
"gitref": "
|
|
106
|
+
"gitref": "bfdbdb061db59abbdde112348bd09fdc99cc32ca"
|
|
107
107
|
}
|