@uipath/maestro-builder-sdk 6.86.16 → 6.86.18
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/case/decompile.d.ts +2 -0
- package/dist/case/decompile.js +19 -11
- package/dist/case/preserve.d.ts +2 -1
- package/dist/case/serialize.js +4 -0
- package/package.json +2 -2
package/dist/case/decompile.d.ts
CHANGED
package/dist/case/decompile.js
CHANGED
|
@@ -705,7 +705,7 @@ const ACTION_DATA_KEYS = new Set([
|
|
|
705
705
|
const ACTION_INPUT_ROW_KEYS = new Set([
|
|
706
706
|
'name', 'type', 'subType', 'displayName', 'value', 'required', 'options', 'body', 'source', 'id', 'var', 'elementId',
|
|
707
707
|
]);
|
|
708
|
-
const ACTION_OUTPUT_ROW_KEYS = new Set([...ACTION_INPUT_ROW_KEYS, 'target', 'originalVar', '_jsonSchema']);
|
|
708
|
+
const ACTION_OUTPUT_ROW_KEYS = new Set([...ACTION_INPUT_ROW_KEYS, 'target', 'originalVar', '_jsonSchema', 'jsonSchema']);
|
|
709
709
|
function actionFields(rows, side, owner) {
|
|
710
710
|
if (!rows?.length)
|
|
711
711
|
return undefined;
|
|
@@ -725,6 +725,11 @@ function actionFields(rows, side, owner) {
|
|
|
725
725
|
// Compile writes an output's `_jsonSchema` as a copy of its `body`.
|
|
726
726
|
if (row._jsonSchema !== undefined && JSON.stringify(row._jsonSchema) !== JSON.stringify(row.body))
|
|
727
727
|
throw new Error(`${owner} form output "${row.name ?? '?'}" has a _jsonSchema that is not a copy of its body.`);
|
|
728
|
+
// The Designer can also save a structured output's schema as `jsonSchema`,
|
|
729
|
+
// a third copy of its `body` that nothing reads to run the case; it is
|
|
730
|
+
// carried (`actionOutputShape`) only as that copy.
|
|
731
|
+
if (row.jsonSchema !== undefined && (row.body === undefined || JSON.stringify(row.jsonSchema) !== JSON.stringify(row.body)))
|
|
732
|
+
throw new Error(`${owner} form output "${row.name ?? '?'}" has a jsonSchema that is not a copy of its body.`);
|
|
728
733
|
}
|
|
729
734
|
const defaultSource = (row) => (side === 'output' ? `=${row.name ?? ''}` : undefined);
|
|
730
735
|
return `[${rows.map((row) => opts([
|
|
@@ -1349,12 +1354,6 @@ function outputTargetOf(row) {
|
|
|
1349
1354
|
return 'originalVar';
|
|
1350
1355
|
return undefined;
|
|
1351
1356
|
}
|
|
1352
|
-
/**
|
|
1353
|
-
* Fields of a resource io row that change what the plan does and that no
|
|
1354
|
-
* builder call writes, so decompile refuses them by name rather than carry
|
|
1355
|
-
* them. `renamed` makes the platform name the output after its `displayName`.
|
|
1356
|
-
*/
|
|
1357
|
-
const RESOURCE_ROW_REFUSED = new Set(['renamed']);
|
|
1358
1357
|
/**
|
|
1359
1358
|
* What a resource task's (process, agent, rpa, API workflow, ...) io row needs
|
|
1360
1359
|
* beyond what compile writes, recorded in its identity:
|
|
@@ -1362,7 +1361,10 @@ const RESOURCE_ROW_REFUSED = new Set(['renamed']);
|
|
|
1362
1361
|
* - `fields`: the Case Designer's copy of the resource parameter's definition,
|
|
1363
1362
|
* which no builder call writes and nothing reads to run the case:
|
|
1364
1363
|
* `displayName`, `title`, `description`, `body` and its `_jsonSchema` copy,
|
|
1365
|
-
* `subType`, `items`, schema keywords (`format`, `minimum`, `enum`, ...)
|
|
1364
|
+
* `subType`, `items`, schema keywords (`format`, `minimum`, `enum`, ...),
|
|
1365
|
+
* and `renamed: true`, the Designer's mark that the author renamed the
|
|
1366
|
+
* output's variable label (its variable picker then lists the output under
|
|
1367
|
+
* its `displayName`; the row's `var` still names what it writes).
|
|
1366
1368
|
* For example `{ displayName: 'echoIn', title: 'echoIn' }`.
|
|
1367
1369
|
* - `omit: ['target']`: an extract the Designer saved with no `target`
|
|
1368
1370
|
* (compile writes `target: "=<id>"` on every extract).
|
|
@@ -1377,8 +1379,11 @@ function resourceRowShape(task, row, side) {
|
|
|
1377
1379
|
const written = side === 'inputs' ? RESOURCE_INPUT_WRITTEN : RESOURCE_OUTPUT_WRITTEN;
|
|
1378
1380
|
const fields = {};
|
|
1379
1381
|
for (const [key, value] of Object.entries(row)) {
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
+
// `renamed` marks an output whose variable label the author renamed. An
|
|
1383
|
+
// input has no variable to rename, so the flag means nothing the Designer
|
|
1384
|
+
// writes there, and it is refused by name rather than carried.
|
|
1385
|
+
if (key === 'renamed' && side === 'inputs')
|
|
1386
|
+
throw new Error(`${task.type} task "${task.displayName ?? task.id ?? '?'}" input "${row.name ?? '?'}" has unsupported field "renamed".`);
|
|
1382
1387
|
// An input `required` / `default` `.inputs()` cannot type (`required: "true"`, an object default) is carried.
|
|
1383
1388
|
if ((key === 'default' || key === 'required') && side === 'inputs' && !isTypedInputField(key, value))
|
|
1384
1389
|
fields[key] = value;
|
|
@@ -2183,7 +2188,8 @@ function actionInputShape(task, row) {
|
|
|
2183
2188
|
* way: `omit` lists the fields the Designer row lacks (`target`, which compile
|
|
2184
2189
|
* always writes; `_jsonSchema` beside a `body`; `elementId`), `target` names
|
|
2185
2190
|
* the variable a target spelled as `=<var>` or `=<originalVar>` names
|
|
2186
|
-
* (`outputTargetOf`),
|
|
2191
|
+
* (`outputTargetOf`), `bodyCopies` lists the extra copies of its `body` it was
|
|
2192
|
+
* saved with (`jsonSchema`), and `elementId`
|
|
2187
2193
|
* is carried when it names another element than the task (the converter wires
|
|
2188
2194
|
* an output to its task only on a matching `elementId`).
|
|
2189
2195
|
*/
|
|
@@ -2202,6 +2208,8 @@ function actionOutputShape(task, row) {
|
|
|
2202
2208
|
...(row.elementId !== undefined && row.elementId !== task.elementId ? { elementId: row.elementId } : {}),
|
|
2203
2209
|
...(omit.length ? { omit } : {}),
|
|
2204
2210
|
...(targetOf ? { target: targetOf } : {}),
|
|
2211
|
+
// `actionFields` has checked it is a copy of `body`.
|
|
2212
|
+
...(row.jsonSchema !== undefined ? { bodyCopies: ['jsonSchema'] } : {}),
|
|
2205
2213
|
};
|
|
2206
2214
|
}
|
|
2207
2215
|
/**
|
package/dist/case/preserve.d.ts
CHANGED
|
@@ -188,7 +188,7 @@ interface StageIdentity {
|
|
|
188
188
|
elementId?: string;
|
|
189
189
|
fields?: Record<string, unknown>;
|
|
190
190
|
}>;
|
|
191
|
-
/** `originalVar` only when it is not the row's `id` (the serializer's own spelling). `elementId` when an action form output names another element than its task. `fields` as on an input. `omit`: the fields an action form output (`target`, `_jsonSchema`, `elementId`) or a resource extract (`target`) was saved without that compile writes. `target`: which of the row's variables its saved `target` names when that is not its id (`=<var>` or `=<originalVar>`; compile writes `=<id>`). */
|
|
191
|
+
/** `originalVar` only when it is not the row's `id` (the serializer's own spelling). `elementId` when an action form output names another element than its task. `fields` as on an input. `omit`: the fields an action form output (`target`, `_jsonSchema`, `elementId`) or a resource extract (`target`) was saved without that compile writes. `target`: which of the row's variables its saved `target` names when that is not its id (`=<var>` or `=<originalVar>`; compile writes `=<id>`). `bodyCopies`: the extra copies of its `body` an action form output was saved with (`jsonSchema`), which compile writes back from the body. */
|
|
192
192
|
/** `var` and `custom: true`: a custom row whose label (`name`) is not the name of the variable it assigns. */
|
|
193
193
|
outputs?: Array<{
|
|
194
194
|
name: string;
|
|
@@ -198,6 +198,7 @@ interface StageIdentity {
|
|
|
198
198
|
fields?: Record<string, unknown>;
|
|
199
199
|
omit?: string[];
|
|
200
200
|
target?: 'var' | 'originalVar';
|
|
201
|
+
bodyCopies?: string[];
|
|
201
202
|
var?: string;
|
|
202
203
|
custom?: true;
|
|
203
204
|
}>;
|
package/dist/case/serialize.js
CHANGED
|
@@ -1383,6 +1383,10 @@ function applyPreservedIdentities(result, preservation) {
|
|
|
1383
1383
|
rowRenames.push(() => { delete target[field]; });
|
|
1384
1384
|
if (target && actionRows && typeof row.elementId === 'string')
|
|
1385
1385
|
rowRenames.push(() => { target.elementId = row.elementId; });
|
|
1386
|
+
// An action form output saved with a `jsonSchema` copy of its body gets the copy back, from the body it compiles with.
|
|
1387
|
+
if (target && actionRows && row.bodyCopies?.includes('jsonSchema'))
|
|
1388
|
+
rowRenames.push(() => { if (target.body !== undefined)
|
|
1389
|
+
target.jsonSchema = structuredClone(target.body); });
|
|
1386
1390
|
carryRowShape(target, row);
|
|
1387
1391
|
// A nested own-name row (`app_id: '=response.app_id'`, written bare since
|
|
1388
1392
|
// builder-sdk#1241) whose carried id is not its variable is a row an
|
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.18",
|
|
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": "084694cb55926a5d346d171315535674674b19fa"
|
|
107
107
|
}
|