@uipath/maestro-builder-sdk 6.125.0 → 6.125.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/decompile.js +10 -3
- package/dist/nodes/trigger/flow/node-type.js +3 -2
- package/dist/serialize.js +17 -5
- package/package.json +2 -2
package/dist/decompile.js
CHANGED
|
@@ -3149,10 +3149,17 @@ function emitChildFlowIn(name, child, trigger, ctx) {
|
|
|
3149
3149
|
return `(\n${renderSegs(parts, ' ')}\n)`;
|
|
3150
3150
|
}
|
|
3151
3151
|
// ─── Entry point ──────────────────────────────────────────────────────────────
|
|
3152
|
-
/**
|
|
3152
|
+
/**
|
|
3153
|
+
* The `flow(id)` argument: the file's id exactly as written, else a slug of its
|
|
3154
|
+
* name. The id is not cosmetic: compile seeds every GUID it mints from it (the
|
|
3155
|
+
* root trigger's `entryPointId`, for one), so any rewrite of it (`deadEnd` to
|
|
3156
|
+
* `deadend`, `Artifact input check` to `artifact-input-check`) gave a no-edit
|
|
3157
|
+
* recompile new GUIDs. Only a file with no id gets a made-up one.
|
|
3158
|
+
*/
|
|
3153
3159
|
function slugId(flow) {
|
|
3154
|
-
|
|
3155
|
-
|
|
3160
|
+
if (typeof flow.id === 'string' && flow.id !== '')
|
|
3161
|
+
return flow.id;
|
|
3162
|
+
const slug = (flow.name ?? 'flow').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
3156
3163
|
return slug || 'flow';
|
|
3157
3164
|
}
|
|
3158
3165
|
// ─── Output backing Variables (#1092) ─────────────────────────────────────────
|
|
@@ -167,8 +167,9 @@ export const manualTriggerType = {
|
|
|
167
167
|
kind: 'manual', typeName: 'core.trigger.manual', factory: 'manual',
|
|
168
168
|
// `.trigger(manual(), { label, version })` names a subflow's Start node (#1050).
|
|
169
169
|
subflowStart: true,
|
|
170
|
-
// The default root
|
|
171
|
-
//
|
|
170
|
+
// The default root's identity (`entryPointId`, `isDefaultEntryPoint`) is the
|
|
171
|
+
// pipeline's, written for every root trigger whose definition declares one;
|
|
172
|
+
// an entry point's is minted here.
|
|
172
173
|
serialize: (_spec, ctx) => ({ inputs: ctx.root.isDefault ? {} : { entryPointId: ctx.entryPointId() } }),
|
|
173
174
|
deserialize: () => ({ kind: 'manual' }),
|
|
174
175
|
// Decompiled source spells the default `manual()` out on purpose: it is more
|
package/dist/serialize.js
CHANGED
|
@@ -30,7 +30,7 @@ import { indexCarriedDefinitions } from './core/carried-definitions.js';
|
|
|
30
30
|
import { sharedDefinition } from './core/shared-definition.js';
|
|
31
31
|
import { FlowBuildError, loweringExpressionErrors } from './flow-expr-check.js';
|
|
32
32
|
import { connectionConnectors } from './bindings-v2.js';
|
|
33
|
-
import { BindingRefusal, bindingLabelRefusal, bindingPairRefusal, connectionStubMessage } from './core/binding-messages.js';
|
|
33
|
+
import { BindingRefusal, GUID_RE, bindingLabelRefusal, bindingPairRefusal, connectionStubMessage } from './core/binding-messages.js';
|
|
34
34
|
import { OUTCOME_HANDLE_NODE_TYPES, assertHitlExitInvariant, hitlExitViolation } from './core/hitl-routing.js';
|
|
35
35
|
import { STICKY_NOTE_TYPE, STICKY_NOTE_TYPE_VERSION } from './core/definitionless-node-types.js';
|
|
36
36
|
import { placeholderPosition } from './node-placement.js';
|
|
@@ -3646,6 +3646,14 @@ function serializeFlow(built, opts, scopeLayout) {
|
|
|
3646
3646
|
// file's default need not be the root named `start`, which is the one
|
|
3647
3647
|
// `.trigger()` has to be (`$vars.start` names it). Two such roots, or a
|
|
3648
3648
|
// `default` that is not a boolean, would leave the mark ambiguous: refused.
|
|
3649
|
+
//
|
|
3650
|
+
// A single-root flow's trigger carries the same identity when its definition
|
|
3651
|
+
// declares `model.entryPointId`, as flow-core's `createWorkflow` writes it, so
|
|
3652
|
+
// a trigger `node add` appends later does not become the default. The GUID is
|
|
3653
|
+
// the one the flow keeps if it later gains an `.entryPoint()`.
|
|
3654
|
+
//
|
|
3655
|
+
// The identity is the serializer's, not the trigger's: a GUID the trigger
|
|
3656
|
+
// wrote is kept and anything else is replaced (publish refuses a non-GUID).
|
|
3649
3657
|
const entryPoints = built.entryPoints ?? [];
|
|
3650
3658
|
const defaultEp = (() => {
|
|
3651
3659
|
const claimed = entryPoints.filter((ep) => ep.options?.default !== undefined && ep.options.default !== false);
|
|
@@ -3667,13 +3675,17 @@ function serializeFlow(built, opts, scopeLayout) {
|
|
|
3667
3675
|
}
|
|
3668
3676
|
return marked[0];
|
|
3669
3677
|
})();
|
|
3670
|
-
if (entryPoints.length) {
|
|
3671
|
-
const { isDefaultEntryPoint:
|
|
3678
|
+
if (entryPoints.length || trigger.model?.entryPointId === true) {
|
|
3679
|
+
const { entryPointId: written, isDefaultEntryPoint: _mark, ...rest } = (trigger.inputs ?? {});
|
|
3672
3680
|
trigger.inputs = {
|
|
3673
|
-
entryPointId:
|
|
3681
|
+
entryPointId: typeof written === 'string' && GUID_RE.test(written) ? written : stableId(`${built.id}:${triggerId}:entryPoint`),
|
|
3682
|
+
// The mark is the serializer's too: `true` on `.trigger()` unless an
|
|
3683
|
+
// `.entryPoint()` says `default: true`. A contributed flag never survives.
|
|
3674
3684
|
...(defaultEp === undefined ? { isDefaultEntryPoint: true } : {}),
|
|
3675
|
-
...
|
|
3685
|
+
...rest,
|
|
3676
3686
|
};
|
|
3687
|
+
}
|
|
3688
|
+
if (entryPoints.length) {
|
|
3677
3689
|
const firstShared = built.steps.find((st) => 'name' in st && st.kind !== 'return');
|
|
3678
3690
|
const sharedTarget = firstShared && 'name' in firstShared ? root.stepNodeId.get(firstShared.name) : undefined;
|
|
3679
3691
|
for (const ep of entryPoints) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.125.
|
|
3
|
+
"version": "6.125.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",
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"@types/node": "^22.7.0",
|
|
129
129
|
"esbuild": "^0.28.1"
|
|
130
130
|
},
|
|
131
|
-
"gitref": "
|
|
131
|
+
"gitref": "c92d8ed283460a1c1ebcbfcb305b58a812662c2d"
|
|
132
132
|
}
|