@uipath/maestro-builder-sdk 6.86.0 → 6.86.2
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 +76 -76
- package/dist/api-members.md +344 -344
- package/dist/bpmn/bpmn-expr-check.js +15 -3
- package/dist/bpmn/bpmn-sdk.d.ts +8 -2
- package/dist/bpmn/check.js +9 -1
- 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
|
@@ -55,10 +55,22 @@ function checkExpr(expr, where, roots, out) {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Check every `=`-expression VALUE of a `field → expression` map (keys are targets).
|
|
60
|
+
*
|
|
61
|
+
* A value need not be a string. A script task's `inputs` are the keys of its `args`
|
|
62
|
+
* JSON body, and the designer nests objects there (`{"args":{"name":"=vars.x"}}`), so
|
|
63
|
+
* a nested value is walked for the `=`-strings inside it, as a connector's inputs are.
|
|
64
|
+
* Handing it to `checkExpr` as if it were a string is what crashed `build()` with
|
|
65
|
+
* `expr.replace is not a function` on six deployed processes.
|
|
66
|
+
*/
|
|
59
67
|
function checkExprValues(rec, where, roots, out) {
|
|
60
|
-
for (const v of Object.values(rec ?? {}))
|
|
61
|
-
|
|
68
|
+
for (const v of Object.values(rec ?? {})) {
|
|
69
|
+
if (typeof v === 'string')
|
|
70
|
+
checkExpr(v, where, roots, out);
|
|
71
|
+
else
|
|
72
|
+
deepExprStrings(v, where, roots, out);
|
|
73
|
+
}
|
|
62
74
|
}
|
|
63
75
|
/** Reach `=`-expression strings anywhere in a connector's (possibly nested) inputs. */
|
|
64
76
|
function deepExprStrings(val, where, roots, out) {
|
package/dist/bpmn/bpmn-sdk.d.ts
CHANGED
|
@@ -138,7 +138,8 @@ export type BpmnNode = {
|
|
|
138
138
|
scriptFormat: string;
|
|
139
139
|
/** The `uipath:scriptVersion` value — see {@link ScriptTaskOpts.scriptVersion}. */
|
|
140
140
|
scriptVersion: string;
|
|
141
|
-
inputs
|
|
141
|
+
/** The `args` keys after the envelope — see {@link ScriptTaskOpts.inputs}. */
|
|
142
|
+
inputs: Record<string, unknown>;
|
|
142
143
|
outputs: Record<string, string>;
|
|
143
144
|
/** The mapping's extension type — see {@link ScriptTaskOpts.type}. */
|
|
144
145
|
type: string;
|
|
@@ -929,8 +930,13 @@ export interface ScriptTaskOpts extends ActivityOpts {
|
|
|
929
930
|
* `"iterator[0]":"=iterator[0]"` to scope a loop body — and for a key the author
|
|
930
931
|
* knows the runtime reads. `vars` and `metadata` given here override the envelope's
|
|
931
932
|
* values, which is never useful but keeps a round trip byte-faithful.
|
|
933
|
+
*
|
|
934
|
+
* A value is any JSON value, not only a string: `args` is a JSON body, and the
|
|
935
|
+
* designer writes nested objects into it (`{"args":{"name":"=vars.Var_Name"}}`).
|
|
936
|
+
* Every `=`-string inside a nested value is an expression and is checked like a
|
|
937
|
+
* top-level one.
|
|
932
938
|
*/
|
|
933
|
-
inputs?: Record<string,
|
|
939
|
+
inputs?: Record<string, unknown>;
|
|
934
940
|
/**
|
|
935
941
|
* `uipath:output` rows: variable id → `=`-expression.
|
|
936
942
|
*
|
package/dist/bpmn/check.js
CHANGED
|
@@ -992,6 +992,14 @@ function isRuntimeDuration(v) {
|
|
|
992
992
|
}
|
|
993
993
|
/** The `args` keys the platform itself writes and injects — not an author's inputs. */
|
|
994
994
|
const SCRIPT_ENVELOPE_KEYS = new Set(['vars', 'metadata', 'iterator']);
|
|
995
|
+
/**
|
|
996
|
+
* What the SCRIPT_BARE_INPUT_REF message suggests reading instead of a bare `inputs`
|
|
997
|
+
* key: the key's expression without its `=`. An `args` value can be any JSON value
|
|
998
|
+
* (the designer nests objects there), so a non-string one is shown as JSON.
|
|
999
|
+
*/
|
|
1000
|
+
function bareInputHint(value) {
|
|
1001
|
+
return typeof value === 'string' ? value.replace(/^=/, '') : JSON.stringify(value);
|
|
1002
|
+
}
|
|
995
1003
|
/**
|
|
996
1004
|
* Whether a script body mentions `name` as a bare identifier — not after `.` (a property
|
|
997
1005
|
* read such as `vars.amount`), not inside a string or comment. The body is otherwise not
|
|
@@ -1045,7 +1053,7 @@ function checkActivityFields(n, diags) {
|
|
|
1045
1053
|
message: `Script task "${n.id}" reads ${bare.map((k) => `\`${k}\``).join(', ')} as a bare identifier, but the platform ` +
|
|
1046
1054
|
`injects only \`vars\`, \`metadata\` and \`iterator\` into a script's scope — on the cloud this faults with ` +
|
|
1047
1055
|
`\`${bare[0]} is not defined\` after check, compile and validate have all passed. ` +
|
|
1048
|
-
`Read the variable as \`vars.<id>\` (${bare.map((k) => `\`${n.inputs[k]
|
|
1056
|
+
`Read the variable as \`vars.<id>\` (${bare.map((k) => `\`${bareInputHint(n.inputs[k])}\``).join(', ')}) and drop the \`inputs\` entry.`,
|
|
1049
1057
|
where: n.id,
|
|
1050
1058
|
});
|
|
1051
1059
|
}
|
|
@@ -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.2",
|
|
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": "cc066edcd1025c03c024ae3ffe2115cee3e87fc6"
|
|
107
107
|
}
|