@uipath/maestro-builder-sdk 6.43.0 → 6.44.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/dist/api-index.md +66 -65
- package/dist/api-members.md +228 -226
- package/dist/check.js +101 -7
- package/dist/core/actions.d.ts +9 -0
- package/dist/core/form-field-type.d.ts +7 -0
- package/dist/core/form-field-type.js +12 -2
- package/dist/decompile.js +204 -34
- package/dist/flow-expr-check.js +5 -0
- package/dist/flow-node-type.d.ts +9 -0
- package/dist/flow-sdk.d.ts +40 -5
- package/dist/flow-sdk.js +14 -1
- package/dist/flow-step-variables.d.ts +4 -0
- package/dist/flow-step-variables.js +22 -0
- package/dist/loop-version.d.ts +23 -6
- package/dist/loop-version.js +37 -15
- package/dist/merge.d.ts +5 -3
- package/dist/merge.js +20 -10
- package/dist/node-placement.d.ts +6 -5
- package/dist/node-placement.js +25 -10
- package/dist/nodes/hitl/flow/check.js +15 -0
- package/dist/nodes/hitl/flow/node-type.js +18 -3
- package/dist/nodes/process/flow/node-type.js +17 -2
- package/dist/serialize.js +56 -15
- package/package.json +2 -2
package/dist/serialize.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import ixpDefinition from './core/ixp-definition.json' with { type: 'json' };
|
|
10
10
|
import { BUNDLED_DEFINITIONS, bundledVersions } from './flow-definitions.js';
|
|
11
|
-
import { LOOP_DEFAULT_VERSION, bodyUsesBreak, loopHasInnerHandles, loopVersion, loopVersionRefusal } from './loop-version.js';
|
|
12
|
-
import { Expr, toExpr, SCHEDULE_PRESETS, parseIxpProjectType, flatNameSegmentsOf } from './flow-sdk.js';
|
|
11
|
+
import { LOOP_DEFAULT_VERSION, bodyUsesBreak, loopDeclaredInputs, loopHasInnerHandles, loopVersion, loopVersionRefusal } from './loop-version.js';
|
|
12
|
+
import { Expr, toExpr, SCHEDULE_PRESETS, parseIxpProjectType, flatNameSegmentsOf, parallelFork } from './flow-sdk.js';
|
|
13
13
|
import { FlowAction, FlowTrigger } from './core/node-classes.js';
|
|
14
14
|
import { connectorRawNodeRefusal } from './core/connector-raw-node.js';
|
|
15
15
|
import { rawNodeInputProblem, registeredRawType } from './raw-node-advice.js';
|
|
@@ -1656,6 +1656,12 @@ function stepNamesOf(steps, out = [], terminates) {
|
|
|
1656
1656
|
// End id is claimed as `end`); `stepToRef` has no `name` at all (it is one edge).
|
|
1657
1657
|
if ('name' in s && s.kind !== 'return')
|
|
1658
1658
|
out.push(s.name);
|
|
1659
|
+
// A `.parallel` with a fork node claims that node's name too (#1310).
|
|
1660
|
+
if (s.kind === 'parallel') {
|
|
1661
|
+
const fork = parallelFork(s.options);
|
|
1662
|
+
if (fork)
|
|
1663
|
+
out.push(fork.name);
|
|
1664
|
+
}
|
|
1659
1665
|
// How many `.terminate`s hold each name, so a clash gets the right remedy (#1239).
|
|
1660
1666
|
if (s.kind === 'terminate' && terminates)
|
|
1661
1667
|
terminates.set(s.name, (terminates.get(s.name) ?? 0) + 1);
|
|
@@ -1705,6 +1711,11 @@ function namedNodesOf(steps, out = { steps: [], ends: [] }, seenEnds = new Set()
|
|
|
1705
1711
|
}
|
|
1706
1712
|
else if ('name' in s)
|
|
1707
1713
|
out.steps.push(s.name);
|
|
1714
|
+
if (s.kind === 'parallel') {
|
|
1715
|
+
const fork = parallelFork(s.options);
|
|
1716
|
+
if (fork)
|
|
1717
|
+
out.steps.push(fork.name);
|
|
1718
|
+
}
|
|
1708
1719
|
if (s.kind === 'stepToList')
|
|
1709
1720
|
namedNodesOf(s.body, out, seenEnds);
|
|
1710
1721
|
else if (s.kind === 'branch') {
|
|
@@ -3227,6 +3238,29 @@ export function serialize(built, opts = {}) {
|
|
|
3227
3238
|
// one, hang the run with no incident. check reports both
|
|
3228
3239
|
// (HITL_FAN_OUT_INTO_JOIN, HITL_END_OUTCOME_IN_PARALLEL); this is the
|
|
3229
3240
|
// compile-side half, and it fails closed.
|
|
3241
|
+
// The fork, when the author names one (`{ fork }`, #1310): a merge node
|
|
3242
|
+
// with one incoming edge and one edge per arm — the gateway Studio Web
|
|
3243
|
+
// draws for a parallel split. The arms then leave from it instead of
|
|
3244
|
+
// from the step before.
|
|
3245
|
+
const fork = parallelFork(step.options);
|
|
3246
|
+
if (fork) {
|
|
3247
|
+
// The gateway waits for a token on EVERY incoming edge, so two tails
|
|
3248
|
+
// that are alternatives — a `.branch()`'s or `.switch()`'s arms, a
|
|
3249
|
+
// fan-out task's outcomes — must not both enter it: only one fires
|
|
3250
|
+
// and the arms never start. Fails closed, as the join does.
|
|
3251
|
+
if (tails.length > 1) {
|
|
3252
|
+
throw new Error(`.parallel("${step.name}"): its fork "${fork.name}" would receive ${tails.length} alternative edges `
|
|
3253
|
+
+ `(${tails.map((t) => `${t.node}@${t.port}`).join(', ')}), and only one of them fires while the gateway `
|
|
3254
|
+
+ `waits for all of them. Add a step before the .parallel so the paths meet there first, or drop { fork }.`);
|
|
3255
|
+
}
|
|
3256
|
+
const forkId = stepUid(scope, fork.name);
|
|
3257
|
+
const forkNode = makeNode(NODE_TYPE.merge, forkId, fork.label ?? fork.name, { parentId, requestedVersion: fork.version ?? step.options?.version });
|
|
3258
|
+
forkNode.inputs = {};
|
|
3259
|
+
scope.nodes.push(forkNode);
|
|
3260
|
+
for (const t of tails)
|
|
3261
|
+
addEdge(scope, t, forkId);
|
|
3262
|
+
tails = [{ node: forkId, port: successPort(NODE_TYPE.merge) }];
|
|
3263
|
+
}
|
|
3230
3264
|
const armTails = [];
|
|
3231
3265
|
const endsBefore = hitlEndExits.length;
|
|
3232
3266
|
for (const arm of step.arms) {
|
|
@@ -3292,23 +3326,30 @@ export function serialize(built, opts = {}) {
|
|
|
3292
3326
|
// An option or a .break() the pinned version's definition cannot express
|
|
3293
3327
|
// is a contradiction the author must resolve, not a silent drop; `check`
|
|
3294
3328
|
// reports the same refusal from the same helper (#1186).
|
|
3295
|
-
const
|
|
3329
|
+
const version = loopVersion(o);
|
|
3330
|
+
// The definition the loop compiles against decides its handles AND its
|
|
3331
|
+
// inputs: a carried `core.logic.loop@1.0` (a designer-saved file's own)
|
|
3332
|
+
// keeps its `output`/`loopBack` pair, where the bundled lookup alone
|
|
3333
|
+
// would have written 2.4's `start`/`continue` onto a 1.0 node (#1311),
|
|
3334
|
+
// and an option is written when that definition declares the input
|
|
3335
|
+
// (the carried 1.0 declares `completionCondition`; the bundled 1.0.0
|
|
3336
|
+
// does not) and refused when it does not.
|
|
3337
|
+
const loopDef = definitionFor(NODE_TYPE.loop, version);
|
|
3338
|
+
const refusal = loopVersionRefusal(step.name, o, usesBreak, loopDef);
|
|
3296
3339
|
if (refusal)
|
|
3297
3340
|
throw new Error(refusal);
|
|
3298
|
-
const
|
|
3299
|
-
const
|
|
3341
|
+
const v24 = loopHasInnerHandles(version, loopDef);
|
|
3342
|
+
const declared = loopDeclaredInputs(loopDef);
|
|
3300
3343
|
const id = stepUid(scope, step.name);
|
|
3301
3344
|
const node = makeNode(NODE_TYPE.loop, id, step.options?.label ?? step.label ?? step.name, { parentId, requestedVersion: version });
|
|
3302
|
-
node.inputs =
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
}
|
|
3311
|
-
: { collection: renderValue(step.collection, scope.rename), parallel: o.parallel ?? false };
|
|
3345
|
+
node.inputs = {
|
|
3346
|
+
collection: renderValue(step.collection, scope.rename),
|
|
3347
|
+
parallel: o.parallel ?? false,
|
|
3348
|
+
...(o.completionCondition !== undefined && (v24 || 'completionCondition' in declared)
|
|
3349
|
+
? { completionCondition: renameRefs(o.completionCondition.js, scope.rename) }
|
|
3350
|
+
: {}),
|
|
3351
|
+
...(v24 || 'breakEnabled' in declared ? { breakEnabled: (o.breakEnabled ?? false) || usesBreak } : {}),
|
|
3352
|
+
};
|
|
3312
3353
|
scope.nodes.push(node);
|
|
3313
3354
|
for (const t of tails)
|
|
3314
3355
|
addEdge(scope, t, id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.44.1",
|
|
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",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"@types/node": "^22.7.0",
|
|
94
94
|
"esbuild": "^0.28.1"
|
|
95
95
|
},
|
|
96
|
-
"gitref": "
|
|
96
|
+
"gitref": "7e2a9339fd00189290ce2ac453aa52636426d6ce"
|
|
97
97
|
}
|