@uipath/maestro-builder-sdk 6.120.23 → 6.120.24
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 +16 -0
- package/dist/case/preserve.d.ts +1 -1
- package/dist/case/serialize.js +5 -0
- package/package.json +2 -2
package/dist/case/decompile.js
CHANGED
|
@@ -2723,6 +2723,21 @@ function unaliasedOwnNameRow(row, plan) {
|
|
|
2723
2723
|
const root = [...(plan.variables?.inputOutputs ?? []), ...(plan.variables?.inputs ?? []), ...(plan.variables?.outputs ?? [])];
|
|
2724
2724
|
return root.some((entry) => entry?.id === row.id) ? { noAlias: true } : {};
|
|
2725
2725
|
}
|
|
2726
|
+
/**
|
|
2727
|
+
* An own-name output (`id == var`) saved as the controlled alias
|
|
2728
|
+
* (`originalVar: <id>`) while no root variable has its id. Compile writes the
|
|
2729
|
+
* alias only beside a root variable of that id (serialize's variables merge),
|
|
2730
|
+
* so it writes this row bare. Recorded as `originalVar: <id>`, so compile
|
|
2731
|
+
* writes the saved spelling back. For example a process output `{ id:
|
|
2732
|
+
* 'region', var: 'region', originalVar: 'region' }` in a plan whose
|
|
2733
|
+
* `variables` declare no `region`. The mirror of {@link unaliasedOwnNameRow}.
|
|
2734
|
+
*/
|
|
2735
|
+
function rootlessAliasRow(row, plan) {
|
|
2736
|
+
if (row.custom === true || typeof row.id !== 'string' || row.id !== row.var || row.originalVar !== row.id)
|
|
2737
|
+
return {};
|
|
2738
|
+
const root = [...(plan.variables?.inputOutputs ?? []), ...(plan.variables?.inputs ?? []), ...(plan.variables?.outputs ?? [])];
|
|
2739
|
+
return root.some((entry) => entry?.id === row.id) ? {} : { originalVar: row.id };
|
|
2740
|
+
}
|
|
2726
2741
|
/**
|
|
2727
2742
|
* A custom (`{ assign }`) output row's saved fields that compile does not
|
|
2728
2743
|
* write as saved (`customRowShape`): its own `id`, an `elementId` other than
|
|
@@ -2812,6 +2827,7 @@ function identityPreservation(plan) {
|
|
|
2812
2827
|
// or the variable an own-name extract wrote first (`firstResults`).
|
|
2813
2828
|
...(typeof row.originalVar === 'string' && row.originalVar !== row.id && (row.custom !== true || task.type === 'action')
|
|
2814
2829
|
? { originalVar: row.originalVar } : {}),
|
|
2830
|
+
...rootlessAliasRow(row, plan),
|
|
2815
2831
|
...unaliasedOwnNameRow(row, plan),
|
|
2816
2832
|
...actionOutputShape(task, row),
|
|
2817
2833
|
...resourceRowShape(task, row, 'outputs'),
|
package/dist/case/preserve.d.ts
CHANGED
|
@@ -278,7 +278,7 @@ interface StageIdentity {
|
|
|
278
278
|
omit?: string[];
|
|
279
279
|
taskElementId?: true;
|
|
280
280
|
}>;
|
|
281
|
-
/** `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. */
|
|
281
|
+
/** `originalVar` only when it is not the row's `id` (the serializer's own spelling), or when it is the `id` of an own-name row with no root variable of that id, which compile writes with none. `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. */
|
|
282
282
|
/** `var` and `custom: true`: a custom row whose label (`name`) is not the name of the variable it assigns. */
|
|
283
283
|
/**
|
|
284
284
|
* `noAlias: true`: an own-name row saved with no `originalVar` beside a root variable of its id, which compile writes as the alias `originalVar: <id>`.
|
package/dist/case/serialize.js
CHANGED
|
@@ -1592,12 +1592,17 @@ function applyPreservedIdentities(result, preservation, warn) {
|
|
|
1592
1592
|
// - An output whose `target` names its variable, or the one it wrote before
|
|
1593
1593
|
// a reassignment, rather than its id gets that spelling back from the
|
|
1594
1594
|
// row's final names: `{ var: 'status', target: '=status' }`.
|
|
1595
|
+
// - An own-name row saved as the alias of its own id (`originalVar: <id>`)
|
|
1596
|
+
// with no root variable of that id gets the alias back while it still
|
|
1597
|
+
// has that id and compile wrote it bare (`rootlessAliasRow`).
|
|
1595
1598
|
if (wanted.target || wanted.originalVar !== undefined) {
|
|
1596
1599
|
const field = wanted.target;
|
|
1597
1600
|
targetSpellings.push(() => {
|
|
1598
1601
|
if (wanted.originalVar !== undefined && row.id === row.var && wanted.originalVar !== row.id
|
|
1599
1602
|
&& (row.originalVar === undefined || row.originalVar === row.id))
|
|
1600
1603
|
row.originalVar = wanted.originalVar;
|
|
1604
|
+
else if (wanted.originalVar !== undefined && row.id === row.var && wanted.originalVar === row.id && row.originalVar === undefined)
|
|
1605
|
+
row.originalVar = row.id;
|
|
1601
1606
|
if (field && typeof row.target === 'string' && typeof row[field] === 'string' && row[field])
|
|
1602
1607
|
row.target = `=${row[field]}`;
|
|
1603
1608
|
});
|
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.24",
|
|
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": "fa9d7fa6d274cb05bdcc5cb9d4ce176c1d77a5fa"
|
|
128
128
|
}
|