@uipath/maestro-builder-sdk 6.85.6 → 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 +57 -57
- package/dist/api-members.md +213 -213
- 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 +9 -3
- package/dist/bpmn/bpmn-sdk.js +8 -7
- package/dist/bpmn/check.js +26 -0
- package/dist/bpmn/decompile.js +96 -2
- package/dist/check.js +23 -18
- package/dist/core/refusals.d.ts +2 -2
- package/dist/core/refusals.js +2 -2
- package/dist/decompile.js +38 -30
- package/dist/flow-sdk.d.ts +16 -6
- package/dist/flow-sdk.js +4 -5
- package/dist/serialize.js +13 -4
- package/package.json +2 -2
package/dist/flow-sdk.js
CHANGED
|
@@ -977,9 +977,6 @@ class FlowBuilder extends StepList {
|
|
|
977
977
|
* @defaultValue the manual trigger
|
|
978
978
|
*/
|
|
979
979
|
trigger(spec, options) {
|
|
980
|
-
if (options?.updates) {
|
|
981
|
-
throw new CompileRefusal('UPDATES_NOT_SUPPORTED', '.trigger(): { updates } is not supported — a trigger has not run anything to assign from.');
|
|
982
|
-
}
|
|
983
980
|
this._trigger = spec;
|
|
984
981
|
if (options)
|
|
985
982
|
this._triggerOptions = options;
|
|
@@ -1028,7 +1025,8 @@ class FlowBuilder extends StepList {
|
|
|
1028
1025
|
* `conversationTrigger()`, or `voiceTrigger()`.
|
|
1029
1026
|
* @param options - `version` (exact trigger definition version), `label`
|
|
1030
1027
|
* (what the canvas shows on the trigger node; default: the trigger
|
|
1031
|
-
* definition's label, e.g. `Manual trigger`),
|
|
1028
|
+
* definition's label, e.g. `Manual trigger`), `updates` (variable rows run when this root fires; see
|
|
1029
|
+
* {@link NodeOptions.updates}), and `inputs` — this root's scoped inputs, declared like
|
|
1032
1030
|
* `.input()`.
|
|
1033
1031
|
* @param prefixFn - Optional sub-builder for the root's prefix steps.
|
|
1034
1032
|
* @returns This builder, so calls chain.
|
|
@@ -1043,11 +1041,12 @@ class FlowBuilder extends StepList {
|
|
|
1043
1041
|
this._entryPoints.push({
|
|
1044
1042
|
id,
|
|
1045
1043
|
trigger: trigger,
|
|
1046
|
-
...(options?.version !== undefined || options?.label !== undefined
|
|
1044
|
+
...(options?.version !== undefined || options?.label !== undefined || options?.updates !== undefined
|
|
1047
1045
|
? {
|
|
1048
1046
|
options: {
|
|
1049
1047
|
...(options.version !== undefined ? { version: options.version } : {}),
|
|
1050
1048
|
...(options.label !== undefined ? { label: options.label } : {}),
|
|
1049
|
+
...(options.updates !== undefined ? { updates: options.updates } : {}),
|
|
1051
1050
|
},
|
|
1052
1051
|
}
|
|
1053
1052
|
: {}),
|
package/dist/serialize.js
CHANGED
|
@@ -1954,6 +1954,11 @@ function serializeFlow(built, opts) {
|
|
|
1954
1954
|
});
|
|
1955
1955
|
start.inputs = {};
|
|
1956
1956
|
scope.nodes.push(start);
|
|
1957
|
+
// The child's `.trigger(manual(), { updates })`: rows run when the caller starts it (#1673).
|
|
1958
|
+
const startUpdates = child.triggerOptions?.updates;
|
|
1959
|
+
if (startUpdates && Object.keys(startUpdates).length > 0) {
|
|
1960
|
+
scope.variableUpdates[startId] = [...(scope.variableUpdates[startId] ?? []), ...renderUpdates(startUpdates, scope.rename)];
|
|
1961
|
+
}
|
|
1957
1962
|
const tails = emit(child.steps, [{ node: startId, port: 'output' }], scope);
|
|
1958
1963
|
// Same as the root's implicit End — mapped against the SUBFLOW's own
|
|
1959
1964
|
// outputs, which is the scope the product validates a subflow body in.
|
|
@@ -3518,10 +3523,13 @@ function serializeFlow(built, opts) {
|
|
|
3518
3523
|
// event's output rows in order, so the row sees the trigger's input mapping
|
|
3519
3524
|
// (measured live, #924). The default root's row is written against `start`
|
|
3520
3525
|
// and renamed with every other `input()` read, so `.triggerId()` follows.
|
|
3526
|
+
// The root's own `{ updates }` (`.trigger(spec, { updates })`,
|
|
3527
|
+
// `.entryPoint(id, spec, { updates })`) follow the copies, in the order
|
|
3528
|
+
// written, so they can read a variable a copy just set (#1673).
|
|
3521
3529
|
{
|
|
3522
3530
|
const roots = [
|
|
3523
|
-
{ node: built.triggerId ?? 'start', read: 'start', inputs: built.inputs },
|
|
3524
|
-
...entryPoints.map((ep) => ({ node: ep.id, read: ep.id, inputs: ep.inputs })),
|
|
3531
|
+
{ node: built.triggerId ?? 'start', read: 'start', inputs: built.inputs, updates: built.triggerOptions?.updates },
|
|
3532
|
+
...entryPoints.map((ep) => ({ node: ep.id, read: ep.id, inputs: ep.inputs, updates: ep.options?.updates })),
|
|
3525
3533
|
];
|
|
3526
3534
|
for (const r of roots) {
|
|
3527
3535
|
const copies = {};
|
|
@@ -3529,9 +3537,10 @@ function serializeFlow(built, opts) {
|
|
|
3529
3537
|
if (inp.shared !== undefined)
|
|
3530
3538
|
copies[inp.shared] = new Expr(`$vars.${r.read}.output.${inp.name}`);
|
|
3531
3539
|
}
|
|
3532
|
-
|
|
3540
|
+
const rows = [...renderUpdates(copies, root.rename), ...renderUpdates(r.updates ?? {}, root.rename)];
|
|
3541
|
+
if (rows.length === 0)
|
|
3533
3542
|
continue;
|
|
3534
|
-
root.variableUpdates[r.node] = [...(root.variableUpdates[r.node] ?? []), ...
|
|
3543
|
+
root.variableUpdates[r.node] = [...(root.variableUpdates[r.node] ?? []), ...rows];
|
|
3535
3544
|
}
|
|
3536
3545
|
}
|
|
3537
3546
|
const globals = [];
|
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
|
}
|