@uipath/maestro-builder-sdk 6.86.0 → 6.86.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 +1 -1
- package/dist/api-members.md +4 -4
- package/dist/core/contribution-bindings.d.ts +13 -1
- package/dist/core/contribution-bindings.js +21 -2
- package/dist/core/refusals.d.ts +1 -1
- package/dist/core/refusals.js +1 -1
- package/dist/decompile.js +9 -4
- package/dist/nodes/process/flow/node-type.js +3 -4
- package/dist/nodes/transform/flow/node-type.js +34 -10
- package/dist/nodes/transform/flow/spec.d.ts +6 -1
- package/dist/serialize.d.ts +1 -1
- package/dist/serialize.js +4 -1
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -269,7 +269,7 @@ could hand you spans for a version you do not have.
|
|
|
269
269
|
| `ToolRef` | type | `dist/core/actions.d.ts:398-407` | Supporting types | One tool on an inline agent — a discriminated union over the kinds the tenant's registry actually serves… |
|
|
270
270
|
| `transform` | function | `dist/nodes/transform/flow/factories.d.ts:7-52` | Actions | Declare a Transform action — a chain of declarative operations over a collection. |
|
|
271
271
|
| `Transformation` | type | `dist/nodes/transform/flow/spec.d.ts:25-26` | Supporting types | What a map does to a field's value. |
|
|
272
|
-
| `TransformInputs` | interface | `dist/nodes/transform/flow/spec.d.ts:84-
|
|
272
|
+
| `TransformInputs` | interface | `dist/nodes/transform/flow/spec.d.ts:84-113` | Option shapes | 3 field(s) |
|
|
273
273
|
| `TransformOperation` | type | `dist/nodes/transform/flow/spec.d.ts:43-60` | Supporting types | One link in the chain. |
|
|
274
274
|
| `TransformVariant` | type | `dist/nodes/transform/flow/spec.d.ts:61-77` | Supporting types | Which Transform node type to emit. |
|
|
275
275
|
| `triggerDescriptor` | function | `dist/core/connectors.d.ts:152-164` | Generated descriptors | Brand a trigger descriptor literal with its where/output types. |
|
package/dist/api-members.md
CHANGED
|
@@ -146,7 +146,7 @@ not find it either.
|
|
|
146
146
|
| `code` | property | `ScriptInputs` | `dist/nodes/script/flow/spec.d.ts:8-9` |
|
|
147
147
|
| `collapsed` | property | `NodeLayout` | `dist/flow-sdk.d.ts:561-562` |
|
|
148
148
|
| `collection` | property | `LoopSpec` | `dist/bpmn/bpmn-sdk.d.ts:81-82` |
|
|
149
|
-
| `collection` | property | `TransformInputs` | `dist/nodes/transform/flow/spec.d.ts:85-
|
|
149
|
+
| `collection` | property | `TransformInputs` | `dist/nodes/transform/flow/spec.d.ts:85-100` |
|
|
150
150
|
| `color` | property | `StickyNote` | `dist/flow-sdk.d.ts:667-668` |
|
|
151
151
|
| `colSpan` | property | `FormFieldSettings` | `dist/core/actions.d.ts:187-188` |
|
|
152
152
|
| `completeWhen` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:2035-2045` |
|
|
@@ -842,7 +842,7 @@ not find it either.
|
|
|
842
842
|
| `operation` | property | `ExternalEventPair` | `dist/case/case-sdk.d.ts:695-696` |
|
|
843
843
|
| `operation` | property | `PendingDataServiceEntity` | `dist/bpmn/data-service.d.ts:172-173` |
|
|
844
844
|
| `operation` | property | `WaitConnectorPlaceholderSpec` | `dist/case/case-sdk.d.ts:471-472` |
|
|
845
|
-
| `operations` | property | `TransformInputs` | `dist/nodes/transform/flow/spec.d.ts:
|
|
845
|
+
| `operations` | property | `TransformInputs` | `dist/nodes/transform/flow/spec.d.ts:111-112` |
|
|
846
846
|
| `operator` | property | `DataFabricFilter` | `dist/nodes/data-fabric/flow/spec.d.ts:30-31` |
|
|
847
847
|
| `operator` | property | `FormFieldRule` | `dist/core/actions.d.ts:159-160` |
|
|
848
848
|
| `options` | property | `ActionField` | `dist/case/case-sdk.d.ts:801-805` |
|
|
@@ -1208,7 +1208,7 @@ not find it either.
|
|
|
1208
1208
|
| `to` | property | `CreateOutgoingCallInputs` | `dist/nodes/agent/flow/spec.d.ts:93-94` |
|
|
1209
1209
|
| `tool` | property | `BuiltinToolRef` | `dist/core/actions.d.ts:571-572` |
|
|
1210
1210
|
| `tools` | property | `InlineAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:374-396` |
|
|
1211
|
-
| `transform` | property | `FlowActionSpecs` | `dist/nodes/transform/flow/spec.d.ts:
|
|
1211
|
+
| `transform` | property | `FlowActionSpecs` | `dist/nodes/transform/flow/spec.d.ts:116-119` |
|
|
1212
1212
|
| `transformation` | property | `FieldMapping` | `dist/nodes/transform/flow/spec.d.ts:30-31` |
|
|
1213
1213
|
| `trigger` | property | `BuiltEntryPoint` | `dist/flow-sdk.d.ts:696-697` |
|
|
1214
1214
|
| `trigger` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:722-724` |
|
|
@@ -1298,7 +1298,7 @@ not find it either.
|
|
|
1298
1298
|
| `variables` | property | `BuiltBpmn` | `dist/bpmn/bpmn-sdk.d.ts:519-520` |
|
|
1299
1299
|
| `variant` | property | `EscalationRef` | `dist/core/actions.d.ts:717-725` |
|
|
1300
1300
|
| `variant` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:321-325` |
|
|
1301
|
-
| `variant` | property | `TransformInputs` | `dist/nodes/transform/flow/spec.d.ts:
|
|
1301
|
+
| `variant` | property | `TransformInputs` | `dist/nodes/transform/flow/spec.d.ts:101-110` |
|
|
1302
1302
|
| `vars` | property | `BuiltCase` | `dist/case/case-sdk.d.ts:1132` |
|
|
1303
1303
|
| `vars` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:720` |
|
|
1304
1304
|
| `vars` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3300-3325` |
|
|
@@ -49,12 +49,24 @@ export interface ContributionBindingPlan {
|
|
|
49
49
|
}
|
|
50
50
|
/** The `<bindings.NAME>` names a definition's `model.context` references, in order, once each. */
|
|
51
51
|
export declare function referencedBindingNames(model: any): string[];
|
|
52
|
+
/**
|
|
53
|
+
* A definition's `model.bindings.values` as descriptor rows (`{ name, default }`).
|
|
54
|
+
* Two shapes are in the field. The current one is rows,
|
|
55
|
+
* `[{ name: 'name', default: 'Notifier' }]`. Older Studio Web files carry an
|
|
56
|
+
* object keyed by name, `{ name: 'API Workflow', folderPath: '' }`, whose values
|
|
57
|
+
* are the defaults: for instance a `uipath.core.api.<key>` node the designer
|
|
58
|
+
* wrote before the type was renamed `uipath.core.api-workflow.<key>`. Reading
|
|
59
|
+
* only rows made compile refuse such a canvas node as
|
|
60
|
+
* CONTRIBUTION_BINDING_UNRESOLVED ("declares no "name" row"), so it could not
|
|
61
|
+
* round-trip (#1674). The process lift reads both shapes the same way.
|
|
62
|
+
*/
|
|
63
|
+
export declare function bindingValueRows(values: unknown): any[];
|
|
52
64
|
/**
|
|
53
65
|
* Plan the entries a contribution-lowered node needs: for each `<bindings.NAME>`
|
|
54
66
|
* its definition's `model.context` references and `supplied` does not cover, one
|
|
55
67
|
* entry built from the definition — `resource`, `resourceKey`, `resourceSubType`
|
|
56
68
|
* from `model.bindings`, and `name`, `default`, `propertyAttribute` from the
|
|
57
|
-
* matching `model.bindings.values` row.
|
|
69
|
+
* matching `model.bindings.values` row (either shape, {@link bindingValueRows}).
|
|
58
70
|
*
|
|
59
71
|
* A supplied entry covers a name when it has the same `resource` and `name`: the
|
|
60
72
|
* contributor's own bindings win, as they always did.
|
|
@@ -36,12 +36,31 @@ export function referencedBindingNames(model) {
|
|
|
36
36
|
}
|
|
37
37
|
return names;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* A definition's `model.bindings.values` as descriptor rows (`{ name, default }`).
|
|
41
|
+
* Two shapes are in the field. The current one is rows,
|
|
42
|
+
* `[{ name: 'name', default: 'Notifier' }]`. Older Studio Web files carry an
|
|
43
|
+
* object keyed by name, `{ name: 'API Workflow', folderPath: '' }`, whose values
|
|
44
|
+
* are the defaults: for instance a `uipath.core.api.<key>` node the designer
|
|
45
|
+
* wrote before the type was renamed `uipath.core.api-workflow.<key>`. Reading
|
|
46
|
+
* only rows made compile refuse such a canvas node as
|
|
47
|
+
* CONTRIBUTION_BINDING_UNRESOLVED ("declares no "name" row"), so it could not
|
|
48
|
+
* round-trip (#1674). The process lift reads both shapes the same way.
|
|
49
|
+
*/
|
|
50
|
+
export function bindingValueRows(values) {
|
|
51
|
+
if (Array.isArray(values))
|
|
52
|
+
return values;
|
|
53
|
+
if (values === null || typeof values !== 'object')
|
|
54
|
+
return [];
|
|
55
|
+
return Object.entries(values)
|
|
56
|
+
.map(([name, value]) => (typeof value === 'string' ? { name, default: value } : { name }));
|
|
57
|
+
}
|
|
39
58
|
/**
|
|
40
59
|
* Plan the entries a contribution-lowered node needs: for each `<bindings.NAME>`
|
|
41
60
|
* its definition's `model.context` references and `supplied` does not cover, one
|
|
42
61
|
* entry built from the definition — `resource`, `resourceKey`, `resourceSubType`
|
|
43
62
|
* from `model.bindings`, and `name`, `default`, `propertyAttribute` from the
|
|
44
|
-
* matching `model.bindings.values` row.
|
|
63
|
+
* matching `model.bindings.values` row (either shape, {@link bindingValueRows}).
|
|
45
64
|
*
|
|
46
65
|
* A supplied entry covers a name when it has the same `resource` and `name`: the
|
|
47
66
|
* contributor's own bindings win, as they always did.
|
|
@@ -78,7 +97,7 @@ export function planContributionBindings(def, supplied = []) {
|
|
|
78
97
|
+ `${def?.nodeType}\` returns for a real resource, or return the bindings from contribute().`),
|
|
79
98
|
};
|
|
80
99
|
}
|
|
81
|
-
const values =
|
|
100
|
+
const values = bindingValueRows(model.bindings.values);
|
|
82
101
|
const subType = model.bindings.resourceSubType;
|
|
83
102
|
const entries = [];
|
|
84
103
|
const problems = [];
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -735,7 +735,7 @@ export declare const REFUSALS: {
|
|
|
735
735
|
readonly TRANSFORM_FILTER_NO_FIELD: "lint";
|
|
736
736
|
readonly TRANSFORM_FILTER_VALUE_EXPR: "lint";
|
|
737
737
|
readonly TRANSFORM_MAP_NO_FIELD: "lint";
|
|
738
|
-
readonly TRANSFORM_NO_COLLECTION: "
|
|
738
|
+
readonly TRANSFORM_NO_COLLECTION: "draft";
|
|
739
739
|
readonly TRANSFORM_NO_GROUP_FIELD: "lint";
|
|
740
740
|
readonly TRANSFORM_NO_OPERATIONS: "lint";
|
|
741
741
|
readonly TRANSFORM_UNKNOWN_OP: "lowering";
|
package/dist/core/refusals.js
CHANGED
|
@@ -808,7 +808,7 @@ export const REFUSALS = {
|
|
|
808
808
|
TRANSFORM_FILTER_NO_FIELD: 'lint',
|
|
809
809
|
TRANSFORM_FILTER_VALUE_EXPR: 'lint',
|
|
810
810
|
TRANSFORM_MAP_NO_FIELD: 'lint',
|
|
811
|
-
TRANSFORM_NO_COLLECTION: '
|
|
811
|
+
TRANSFORM_NO_COLLECTION: 'draft',
|
|
812
812
|
TRANSFORM_NO_GROUP_FIELD: 'lint',
|
|
813
813
|
TRANSFORM_NO_OPERATIONS: 'lint',
|
|
814
814
|
TRANSFORM_UNKNOWN_OP: 'lowering',
|
package/dist/decompile.js
CHANGED
|
@@ -50,7 +50,7 @@ import { OUTCOME_HANDLE_NODE_TYPES } from './core/hitl-routing.js';
|
|
|
50
50
|
import { contributionPort, forwardFanOut } from './core/definition-handles.js';
|
|
51
51
|
import { STICKY_NOTE_TYPE } from './core/definitionless-node-types.js';
|
|
52
52
|
import { eventFilterFromTreeLeaf } from './core/event-filters.js';
|
|
53
|
-
import { referencedBindingNames } from './core/contribution-bindings.js';
|
|
53
|
+
import { bindingValueRows, referencedBindingNames } from './core/contribution-bindings.js';
|
|
54
54
|
import { builtChainSource, chainStatements } from './core/builder-chain.js';
|
|
55
55
|
/**
|
|
56
56
|
* The trigger id of the flow currently being decompiled, so a reference through a
|
|
@@ -1068,7 +1068,7 @@ function resolveTemplateBindings(def, node) {
|
|
|
1068
1068
|
const bound = typeof model.bindings.resourceKey === 'string' && model.bindings.resourceKey !== '';
|
|
1069
1069
|
const nodeModel = node.model;
|
|
1070
1070
|
const nodeContext = Array.isArray(nodeModel?.context) ? nodeModel.context : [];
|
|
1071
|
-
const nodeValues =
|
|
1071
|
+
const nodeValues = bindingValueRows(nodeModel?.bindings?.values);
|
|
1072
1072
|
const keys = new Map();
|
|
1073
1073
|
const defaults = new Map();
|
|
1074
1074
|
const missing = [];
|
|
@@ -1107,7 +1107,8 @@ function resolveTemplateBindings(def, node) {
|
|
|
1107
1107
|
const each = [...keys].map(([n, k]) => `"${n}" → ${k}`).join(', ');
|
|
1108
1108
|
return { def, reason: `${label} names more than one ${resource} (${each}), so its definition stays the template.` };
|
|
1109
1109
|
}
|
|
1110
|
-
|
|
1110
|
+
// Rows, or the older object keyed by name (`bindingValueRows`), each kept in its own shape.
|
|
1111
|
+
const values = model.bindings.values;
|
|
1111
1112
|
return {
|
|
1112
1113
|
def: {
|
|
1113
1114
|
...def,
|
|
@@ -1116,7 +1117,11 @@ function resolveTemplateBindings(def, node) {
|
|
|
1116
1117
|
bindings: {
|
|
1117
1118
|
...model.bindings,
|
|
1118
1119
|
resourceKey: distinct[0],
|
|
1119
|
-
values:
|
|
1120
|
+
values: Array.isArray(values)
|
|
1121
|
+
? values.map((v) => (defaults.has(v?.name) ? { ...v, default: defaults.get(v.name) } : v))
|
|
1122
|
+
: values !== null && typeof values === 'object'
|
|
1123
|
+
? Object.fromEntries(Object.entries(values).map(([n, v]) => [n, defaults.has(n) ? defaults.get(n) : v]))
|
|
1124
|
+
: values,
|
|
1120
1125
|
},
|
|
1121
1126
|
},
|
|
1122
1127
|
},
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* and 4l entries list.
|
|
12
12
|
*/
|
|
13
13
|
import { AGENTIC_PROCESS_FORMS } from '../../../core/agentic-process-forms.js';
|
|
14
|
+
import { bindingValueRows } from '../../../core/contribution-bindings.js';
|
|
14
15
|
import { definitionHasErrorPort } from '../../../core/error-port.js';
|
|
15
16
|
import { Expr } from '../../../core/expr.js';
|
|
16
17
|
import { ownEntry } from '../../../core/own-entry.js';
|
|
@@ -719,11 +720,9 @@ function liftProcess(node, ctx, prefix, kind, form) {
|
|
|
719
720
|
const key = n.type.slice(prefix.length);
|
|
720
721
|
const def = ctx.definition();
|
|
721
722
|
// Descriptor rows (`[{ name, default }]`), or the early `{ name, folderPath }` object.
|
|
722
|
-
const values = def?.model?.bindings?.values;
|
|
723
|
+
const values = bindingValueRows(def?.model?.bindings?.values);
|
|
723
724
|
const binding = (name) => {
|
|
724
|
-
const v =
|
|
725
|
-
? values.find((r) => r?.name === name)?.default
|
|
726
|
-
: values !== null && typeof values === 'object' ? values[name] : undefined;
|
|
725
|
+
const v = values.find((r) => r?.name === name)?.default;
|
|
727
726
|
return typeof v === 'string' ? v : undefined;
|
|
728
727
|
};
|
|
729
728
|
const name = binding('name');
|
|
@@ -80,22 +80,32 @@ function transformInputs(inputs, ctx) {
|
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
82
|
});
|
|
83
|
-
|
|
83
|
+
const collection = collectionPath(inputs.collection, ctx);
|
|
84
|
+
return { ...(collection !== undefined ? { collection: ctx.renameRefs(collection) } : {}), operations };
|
|
84
85
|
}
|
|
85
86
|
/**
|
|
86
87
|
* The `collection` string. A bare reference (`v('x')` / `out('s','p')`) is
|
|
87
88
|
* already the path the runtime wants, so it is emitted verbatim. Anything else
|
|
88
89
|
* has no faithful path form, so it is refused here rather than written (#1518):
|
|
89
|
-
* a missing one would be the string "undefined",
|
|
90
|
+
* a missing one would be the string "undefined" (undefined, so no key at all,
|
|
91
|
+
* for a canvas draft in a draft compile, #1674), a raw array "[object Object]",
|
|
90
92
|
* a raw string `items` reads back as the expression js`items`, and `lit([1,2])`
|
|
91
93
|
* would be "[1,2]", the same text as js`[1,2]`. `compile` does not run `check`
|
|
92
94
|
* (#1497), so this is the only place that stops them. A computed expression
|
|
93
95
|
* (TRANSFORM_COLLECTION_NOT_PATH) is written as its own text, so it stays
|
|
94
96
|
* `check`'s.
|
|
95
97
|
*/
|
|
96
|
-
function collectionPath(collection,
|
|
98
|
+
function collectionPath(collection, ctx) {
|
|
99
|
+
const step = ctx.step;
|
|
97
100
|
if (collection === undefined || collection === null) {
|
|
98
|
-
|
|
101
|
+
const message = `Transform "${step}" has no collection. Point it at the variable or step output holding the array.`;
|
|
102
|
+
// A Transform the canvas saved before its collection was picked (a draft
|
|
103
|
+
// compile, `{ draft: true }`) is written as the file has it: no collection.
|
|
104
|
+
if (ctx.drafting) {
|
|
105
|
+
ctx.draft('TRANSFORM_NO_COLLECTION', message);
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
throw new CompileRefusal('TRANSFORM_NO_COLLECTION', message, `collection: v('catalog')`);
|
|
99
109
|
}
|
|
100
110
|
if (!(collection instanceof Expr)) {
|
|
101
111
|
// Types are stripped at run time, so `collection: [{…}]` or
|
|
@@ -104,12 +114,9 @@ function collectionPath(collection, step) {
|
|
|
104
114
|
+ `collection. That field is a variable PATH — the runtime turns the string into a lookup, so a value there `
|
|
105
115
|
+ `resolves to nothing and the transform silently sees an empty collection.`, typeof collection === 'string' ? `collection: v('${collection}')` : `collection: v('<varName>')`);
|
|
106
116
|
}
|
|
107
|
-
// A decompiled canvas Transform with no collection prints as `lit([])`
|
|
108
|
-
// (`printTransform`), so recompiling it stops here too: this message names
|
|
109
|
-
// the fix for that file as well as for authored inline data.
|
|
110
117
|
if (collection.literal) {
|
|
111
118
|
throw new CompileRefusal('TRANSFORM_COLLECTION_LITERAL', `Transform "${step}" has a literal collection, and that field is a variable PATH, so inline data has no `
|
|
112
|
-
+ `form there.
|
|
119
|
+
+ `form there. Bind `
|
|
113
120
|
+ `\`collection\` to a variable or step output, e.g. \`v('<var>')\`; for inline data, keep the array in a `
|
|
114
121
|
+ `variable default (\`.var('items', types.array, [...])\`) and reference it.`, `collection: v('<var>')`);
|
|
115
122
|
}
|
|
@@ -151,7 +158,10 @@ function transformOutputs(base) {
|
|
|
151
158
|
*/
|
|
152
159
|
function liftTransform(node, variant, ctx) {
|
|
153
160
|
const inputs = node.inputs ?? {};
|
|
154
|
-
|
|
161
|
+
// A blank collection is no collection, as `flow validate` reads it (DATA_TRANSFORM_INCOMPLETE trims it):
|
|
162
|
+
// it lifts as none, so a draft prints with no `collection` instead of js`` (EXPR_SYNTAX).
|
|
163
|
+
const text = ctx.sourceText(inputs.collection);
|
|
164
|
+
const raw = text !== undefined && wireExprBody(text).trim() !== '' ? text : undefined;
|
|
155
165
|
const ops = Array.isArray(inputs.operations) ? inputs.operations : [];
|
|
156
166
|
const operations = ops.map((op) => {
|
|
157
167
|
const cfg = op?.config ?? {};
|
|
@@ -173,6 +183,18 @@ function liftTransform(node, variant, ctx) {
|
|
|
173
183
|
},
|
|
174
184
|
};
|
|
175
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Whether a saved Transform is a draft: the canvas saved it before a collection
|
|
188
|
+
* was picked (no `inputs.collection`). Decompile then marks its step
|
|
189
|
+
* `{ draft: true }` and carries its definition, and compile writes it back with
|
|
190
|
+
* no collection (#1674).
|
|
191
|
+
*/
|
|
192
|
+
function isTransformDraft(node) {
|
|
193
|
+
const c = node.inputs?.collection;
|
|
194
|
+
if (c === undefined || c === null)
|
|
195
|
+
return true;
|
|
196
|
+
return typeof c === 'string' && wireExprBody(c).trim() === '';
|
|
197
|
+
}
|
|
176
198
|
/** `{ k: v, … }` from entries (the decompiler's `objLit`): `''` when there are none. */
|
|
177
199
|
function obj(entries, ctx) {
|
|
178
200
|
return entries.length === 0 ? '' : `{ ${entries.map(([k, v]) => `${ctx.key(k)}: ${v}`).join(', ')} }`;
|
|
@@ -216,7 +238,8 @@ function printTransform({ inputs }, ctx) {
|
|
|
216
238
|
['aggregations', `[${aggs.join(', ')}]`],
|
|
217
239
|
], ctx);
|
|
218
240
|
});
|
|
219
|
-
|
|
241
|
+
// No collection (a canvas draft, #1674) prints as none: the step is marked `{ draft: true }`.
|
|
242
|
+
const collection = inputs.collection !== undefined ? ctx.value(inputs.collection) : undefined;
|
|
220
243
|
return {
|
|
221
244
|
factory: 'transform',
|
|
222
245
|
options: [
|
|
@@ -245,6 +268,7 @@ function transformAt(typeName, variant, version, factory) {
|
|
|
245
268
|
return { inputs: transformInputs(inputs, ctx), ...(typed !== base ? { outputs: typed } : {}) };
|
|
246
269
|
},
|
|
247
270
|
deserialize: (node, ctx) => liftTransform(node, variant, ctx),
|
|
271
|
+
isDraft: (node) => isTransformDraft(node),
|
|
248
272
|
print: printTransform,
|
|
249
273
|
check: ({ inputs }, ctx) => checkTransform(inputs, ctx),
|
|
250
274
|
// The only expression a transform carries is its collection; everything else
|
|
@@ -91,8 +91,13 @@ export interface TransformInputs {
|
|
|
91
91
|
* resolves to nothing, which is why the type is `Expr` and `check` rejects
|
|
92
92
|
* anything that is not a bare `$vars.…` path. Keep static data in a
|
|
93
93
|
* `.var(name, types.array, [...])` default and point here.
|
|
94
|
+
*
|
|
95
|
+
* Optional only so a Transform the canvas saved before its collection was
|
|
96
|
+
* picked can be carried through a round trip: decompile omits it and marks
|
|
97
|
+
* the step `{ draft: true }`. Compile refuses a Transform without one
|
|
98
|
+
* (TRANSFORM_NO_COLLECTION) unless it is such a draft.
|
|
94
99
|
*/
|
|
95
|
-
collection
|
|
100
|
+
collection?: Expr;
|
|
96
101
|
/**
|
|
97
102
|
* Emit a single-purpose variant node instead of the generic Transform.
|
|
98
103
|
* Omit it for the generic (the default).
|
package/dist/serialize.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface SerializeWarning {
|
|
|
33
33
|
}
|
|
34
34
|
export { CONNECTOR_INPUT_MISSING } from './core/connector-inputs.js';
|
|
35
35
|
/** The refusals a draft-tolerant compile reports instead of throwing. */
|
|
36
|
-
export type DraftCode = BindingRefusalCode | typeof CONNECTOR_INPUT_MISSING | 'CONNECTOR_OBJECT_REQUIRED';
|
|
36
|
+
export type DraftCode = BindingRefusalCode | typeof CONNECTOR_INPUT_MISSING | 'CONNECTOR_OBJECT_REQUIRED' | 'TRANSFORM_NO_COLLECTION';
|
|
37
37
|
/** A refusal a draft-tolerant compile reported instead of throwing (see {@link SerializeOpts.draft}). */
|
|
38
38
|
export interface DraftFinding {
|
|
39
39
|
/** The emitted node's id. */
|
package/dist/serialize.js
CHANGED
|
@@ -2419,9 +2419,12 @@ function serializeFlow(built, opts) {
|
|
|
2419
2419
|
// emits (decompile's copy of the canvas file's entry), else refused as the
|
|
2420
2420
|
// ordinary emission refused it (SerializeOpts.carriedDrafts).
|
|
2421
2421
|
if (strict !== undefined) {
|
|
2422
|
+
// A bundled type supplies no definition, so its draft is held to the one the
|
|
2423
|
+
// flow carries for the type at the emitted version (a canvas Transform with
|
|
2424
|
+
// no collection, #1674).
|
|
2422
2425
|
const carried = typeof def?.nodeType === 'string' && typeof def?.version === 'string'
|
|
2423
2426
|
? carriedFor(def.nodeType, def.version)
|
|
2424
|
-
: undefined;
|
|
2427
|
+
: impl.definition === 'bundled' && def === undefined ? carriedFor(impl.typeName, version) : undefined;
|
|
2425
2428
|
if (carried === undefined)
|
|
2426
2429
|
refuse();
|
|
2427
2430
|
def = carried;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.86.
|
|
3
|
+
"version": "6.86.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",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"@types/node": "^22.7.0",
|
|
104
104
|
"esbuild": "^0.28.1"
|
|
105
105
|
},
|
|
106
|
-
"gitref": "
|
|
106
|
+
"gitref": "4cbce76722e41362c4cf5aa885c74d1564d0201b"
|
|
107
107
|
}
|