@uipath/maestro-builder-sdk 6.10.0 → 6.10.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 +24 -2
- package/package.json +2 -2
package/dist/decompile.js
CHANGED
|
@@ -1923,15 +1923,37 @@ function armCb(param, segs) {
|
|
|
1923
1923
|
* fall-off End the serializer always appends; it now decompiles to an explicit
|
|
1924
1924
|
* `.return({}, { version })` so the End's exact definition version survives the
|
|
1925
1925
|
* round trip (design §5.3) — recompiling emits the identical node.
|
|
1926
|
+
*
|
|
1927
|
+
* An End written by the designer or the product CLI carries its returned value
|
|
1928
|
+
* ONLY in `outputs[name].source` — it writes no `variableUpdates` row. Reading
|
|
1929
|
+
* updates alone decompiled such an End to `.return({})` and silently dropped the
|
|
1930
|
+
* value it returned (a Decision's two Ends returning `'nice day'` /
|
|
1931
|
+
* `'bring a jacket'` both came back empty). So an output whose source is not the
|
|
1932
|
+
* identity `$vars.<name>` mapping `endOutputs` fills in is a returned value too.
|
|
1926
1933
|
*/
|
|
1927
1934
|
function returnSeg(node, ctx) {
|
|
1928
1935
|
const updates = ctx.flow.variables?.variableUpdates?.[node.id] ?? [];
|
|
1929
1936
|
const opts = returnOptsArg(node);
|
|
1930
|
-
if (updates.length === 0)
|
|
1931
|
-
return `.return({}${opts})`;
|
|
1932
1937
|
const entries = updates.map((u) => `${key(u.variableId)}: ${emitVal(u.expression, ctx.imp, ctx.inputNames)}`);
|
|
1938
|
+
const written = new Set(updates.map((u) => u.variableId));
|
|
1939
|
+
for (const [name, out] of Object.entries(node.outputs ?? {})) {
|
|
1940
|
+
if (written.has(name))
|
|
1941
|
+
continue;
|
|
1942
|
+
const source = out?.source;
|
|
1943
|
+
const raw = unwrapSource(source);
|
|
1944
|
+
if (raw === undefined || isIdentityEndSource(raw, name))
|
|
1945
|
+
continue;
|
|
1946
|
+
entries.push(`${key(name)}: ${emitVal(source, ctx.imp, ctx.inputNames)}`);
|
|
1947
|
+
}
|
|
1948
|
+
if (entries.length === 0)
|
|
1949
|
+
return `.return({}${opts})`;
|
|
1933
1950
|
return `.return({ ${entries.join(', ')} }${opts})`;
|
|
1934
1951
|
}
|
|
1952
|
+
/** The fill-in mapping `endOutputs` writes for an output no `.return` named: `=js:$vars.<name>`. */
|
|
1953
|
+
function isIdentityEndSource(raw, name) {
|
|
1954
|
+
const body = raw.startsWith('=js:') ? raw.slice(4) : raw;
|
|
1955
|
+
return body.trim() === `$vars.${name}`;
|
|
1956
|
+
}
|
|
1935
1957
|
/**
|
|
1936
1958
|
* The options argument for a `.return(...)` — `version`, plus the End's `name`
|
|
1937
1959
|
* and `label` when they are not what the serializer would derive on its own.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.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",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"@types/node": "^22.7.0",
|
|
93
93
|
"esbuild": "^0.28.1"
|
|
94
94
|
},
|
|
95
|
-
"gitref": "
|
|
95
|
+
"gitref": "388e366bc878b0b6701b2842d56479125f6a9edd"
|
|
96
96
|
}
|