@uipath/maestro-builder-sdk 6.120.7 → 6.120.8
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.js +13 -2
- package/dist/case/preserve.d.ts +2 -1
- package/dist/case/preserve.js +5 -0
- package/dist/case/serialize.js +4 -1
- package/package.json +2 -2
package/dist/case/decompile.js
CHANGED
|
@@ -743,9 +743,9 @@ const ACTION_DATA_KEYS = new Set([
|
|
|
743
743
|
*/
|
|
744
744
|
const ACTION_INPUT_ROW_KEYS = new Set([
|
|
745
745
|
'name', 'type', 'subType', 'displayName', 'value', 'required', 'options', 'body', 'source', 'id', 'var', 'elementId',
|
|
746
|
-
'canonicalId',
|
|
746
|
+
'canonicalId', 'target',
|
|
747
747
|
]);
|
|
748
|
-
const ACTION_OUTPUT_ROW_KEYS = new Set([...ACTION_INPUT_ROW_KEYS, '
|
|
748
|
+
const ACTION_OUTPUT_ROW_KEYS = new Set([...ACTION_INPUT_ROW_KEYS, 'originalVar', '_jsonSchema', 'jsonSchema']
|
|
749
749
|
.filter((key) => key !== 'canonicalId'));
|
|
750
750
|
function actionFields(rows, side, owner) {
|
|
751
751
|
if (!rows?.length)
|
|
@@ -761,6 +761,11 @@ function actionFields(rows, side, owner) {
|
|
|
761
761
|
// stamps on a row (and then skips it on); it is carried only as a copy of
|
|
762
762
|
// the id (`actionInputShape`), since any other value renames how the
|
|
763
763
|
// Designer spells references to the row.
|
|
764
|
+
// An input's `target` is the slot Studio Web says it fills (`"bodyField"`, the
|
|
765
|
+
// HITL task arguments); nothing reads it to run the case, so it is carried
|
|
766
|
+
// verbatim (`actionInputShape`), as long as it is a string.
|
|
767
|
+
if (side === 'input' && row.target !== undefined && typeof row.target !== 'string')
|
|
768
|
+
throw new Error(`${owner} form input "${row.name ?? '?'}" has a non-string target ${JSON.stringify(row.target)}.`);
|
|
764
769
|
if (side === 'input' && row.canonicalId !== undefined && (row.id === undefined || row.canonicalId !== row.id))
|
|
765
770
|
throw new Error(`${owner} form input "${row.name ?? '?'}" has canonicalId "${String(row.canonicalId)}", which is not its id.`);
|
|
766
771
|
if (row.var !== undefined && side === 'input' && row.var !== row.id)
|
|
@@ -2430,10 +2435,14 @@ function prunePreservation(preservation, plan) {
|
|
|
2430
2435
|
* writes such a row with no `elementId`, so it is recorded even when the
|
|
2431
2436
|
* task's `elementId` is the `<stageId>-<taskId>` compile writes. Any other
|
|
2432
2437
|
* `elementId` is carried as the value itself.
|
|
2438
|
+
* - A `target` (`"bodyField"`) is carried on any row, e.g. the Designer's
|
|
2439
|
+
* { name: 'note', type: 'string', target: 'bodyField', value: '=vars.note' }
|
|
2440
|
+
* records `{ name: 'note', target: 'bodyField' }`.
|
|
2433
2441
|
*/
|
|
2434
2442
|
function actionInputShape(task, row) {
|
|
2435
2443
|
if (task.type !== 'action')
|
|
2436
2444
|
return {};
|
|
2445
|
+
const target = typeof row.target === 'string' ? { target: row.target } : {};
|
|
2437
2446
|
const omit = [];
|
|
2438
2447
|
if (row.type === undefined)
|
|
2439
2448
|
omit.push('type');
|
|
@@ -2442,6 +2451,7 @@ function actionInputShape(task, row) {
|
|
|
2442
2451
|
return {
|
|
2443
2452
|
...(own ? { taskElementId: true } : row.elementId !== undefined ? { elementId: row.elementId } : {}),
|
|
2444
2453
|
...(omit.length ? { omit } : {}),
|
|
2454
|
+
...target,
|
|
2445
2455
|
};
|
|
2446
2456
|
}
|
|
2447
2457
|
if (row.var === undefined)
|
|
@@ -2453,6 +2463,7 @@ function actionInputShape(task, row) {
|
|
|
2453
2463
|
// `actionFields` has checked it is a copy of the id.
|
|
2454
2464
|
...(row.canonicalId !== undefined ? { canonicalId: true } : {}),
|
|
2455
2465
|
...(omit.length ? { omit } : {}),
|
|
2466
|
+
...target,
|
|
2456
2467
|
};
|
|
2457
2468
|
}
|
|
2458
2469
|
/**
|
package/dist/case/preserve.d.ts
CHANGED
|
@@ -235,13 +235,14 @@ interface StageIdentity {
|
|
|
235
235
|
entryConditions?: ConditionIdentity[];
|
|
236
236
|
/** The resource the rows' `fields` / `omit` describe; they are applied only while the task still names it. */
|
|
237
237
|
resource?: ResourceTaskIdentity;
|
|
238
|
-
/** `elementId` only for an action form input whose row names another element than its task. `canonicalId: true`: an action form input saved with the schema migration's `canonicalId`, a copy of its id. `fields`: a resource task row's Designer fields compile does not write (`displayName`, `title`, `body`, ...). */
|
|
238
|
+
/** `elementId` only for an action form input whose row names another element than its task. `canonicalId: true`: an action form input saved with the schema migration's `canonicalId`, a copy of its id. `target`: the slot an action form input was saved with (`"bodyField"`), which compile does not write. `fields`: a resource task row's Designer fields compile does not write (`displayName`, `title`, `body`, ...). */
|
|
239
239
|
/** `omit` on an action form input: the fields compile writes that it was saved without (`type`; `var`, `elementId` on a row with an id). `taskElementId: true`: the row was saved with its task's `elementId`; compile writes back the task's final `elementId` (see `elementId` above). An action form input with no id, which compile writes with no `elementId`, carries it whenever its `elementId` is the task's. */
|
|
240
240
|
inputs?: Array<{
|
|
241
241
|
name: string;
|
|
242
242
|
id?: string;
|
|
243
243
|
elementId?: string;
|
|
244
244
|
canonicalId?: true;
|
|
245
|
+
target?: string;
|
|
245
246
|
fields?: Record<string, unknown>;
|
|
246
247
|
omit?: string[];
|
|
247
248
|
taskElementId?: true;
|
package/dist/case/preserve.js
CHANGED
|
@@ -385,6 +385,11 @@ export function caseJsonPreservationErrors(payload) {
|
|
|
385
385
|
errors.push(`task "${task.name}" ${side} "${row.name}" omits "${String(field)}", which is not an omittable field`);
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
|
+
for (const stage of payload.identities?.stages ?? [])
|
|
389
|
+
for (const task of (stage.tasks ?? []).flat())
|
|
390
|
+
for (const row of task.inputs ?? [])
|
|
391
|
+
if (row.target !== undefined && typeof row.target !== 'string')
|
|
392
|
+
errors.push(`task "${task.name}" input "${row.name}" target must be a string`);
|
|
388
393
|
for (const stage of payload.identities?.stages ?? [])
|
|
389
394
|
for (const task of (stage.tasks ?? []).flat())
|
|
390
395
|
for (const row of task.outputs ?? []) {
|
package/dist/case/serialize.js
CHANGED
|
@@ -1750,8 +1750,11 @@ function applyPreservedIdentities(result, preservation, warn) {
|
|
|
1750
1750
|
if (input && row.taskElementId === true)
|
|
1751
1751
|
elementIdRows.saved.add(input);
|
|
1752
1752
|
// An action form input is written `{ name, type, value }`; the Designer's
|
|
1753
|
-
// row also has its id, `var` (the id) and `elementId`, which come back
|
|
1753
|
+
// row also has its id, `var` (the id) and `elementId`, which come back,
|
|
1754
|
+
// and the `target` it was saved with (`"bodyField"`), on any row.
|
|
1754
1755
|
if (task?.type === 'action' && input && input.id === undefined && input.name === row.name) {
|
|
1756
|
+
if (typeof row.target === 'string' && input.target === undefined)
|
|
1757
|
+
input.target = row.target;
|
|
1755
1758
|
// The fields the row was saved without: a `type` compile defaulted
|
|
1756
1759
|
// to `string` (a type the source spells stays, `string` included),
|
|
1757
1760
|
// and the `var` / `elementId` of a row with an id.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.120.
|
|
3
|
+
"version": "6.120.8",
|
|
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",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"@types/node": "^22.7.0",
|
|
125
125
|
"esbuild": "^0.28.1"
|
|
126
126
|
},
|
|
127
|
-
"gitref": "
|
|
127
|
+
"gitref": "3a3d4e840c450128bb797ce23c1bcbcb2a783704"
|
|
128
128
|
}
|