@uipath/maestro-builder-sdk 6.122.11 → 6.122.12
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/merge.js +26 -15
- package/package.json +2 -2
package/dist/merge.js
CHANGED
|
@@ -958,6 +958,9 @@ function withoutStaleConnectionRows(rows, originalNodes, mergedNodes) {
|
|
|
958
958
|
*
|
|
959
959
|
* Kept: a row no edited node references (one a sidecar file uses, say), a row
|
|
960
960
|
* a subflow node or an edited node references, and every row without a baseline.
|
|
961
|
+
* Except: an unreferenced row the baseline lacks goes when the original's row
|
|
962
|
+
* with its id is referenced by a kept node (the recompile resolved a label stub
|
|
963
|
+
* for a node the merge discarded).
|
|
961
964
|
*/
|
|
962
965
|
function withoutRowsMintedForKeptNodes(rows, original, edited, baseline, keptFromOriginal, fieldwise) {
|
|
963
966
|
if (!baseline || !rows || (keptFromOriginal.size === 0 && fieldwise.size === 0))
|
|
@@ -978,25 +981,33 @@ function withoutRowsMintedForKeptNodes(rows, original, edited, baseline, keptFro
|
|
|
978
981
|
const all = (edited.bindings ?? []);
|
|
979
982
|
const fromOriginal = new Set((original.bindings ?? []).map(bindingIdentity));
|
|
980
983
|
const inBaseline = new Set((baseline.bindings ?? []).map(bindingIdentity));
|
|
984
|
+
const originalRows = (original.bindings ?? []);
|
|
985
|
+
const originalById = new Map(originalRows.map((o) => [o.id, o]));
|
|
986
|
+
const editedIds = new Map(all.map((o) => [bindingIdentity(o), o.id]));
|
|
987
|
+
const refersTo = (row, pool, text) => {
|
|
988
|
+
const key = keyOf(row);
|
|
989
|
+
if (key !== '' && text.includes(spelled(key)))
|
|
990
|
+
return true;
|
|
991
|
+
const placeholder = typeof row.name === 'string' ? spelled(`<bindings.${row.name}>`) : undefined;
|
|
992
|
+
if (placeholder === undefined || !text.includes(placeholder))
|
|
993
|
+
return false;
|
|
994
|
+
const others = pool.filter((o) => o.name === row.name && keyOf(o) !== key);
|
|
995
|
+
return key === ''
|
|
996
|
+
? !others.some((o) => text.includes(spelled(keyOf(o))))
|
|
997
|
+
: others.length === 0;
|
|
998
|
+
};
|
|
981
999
|
return rows.filter((b) => {
|
|
982
1000
|
const identity = bindingIdentity(b);
|
|
983
|
-
if (fromOriginal.has(identity)
|
|
1001
|
+
if (fromOriginal.has(identity))
|
|
984
1002
|
return true;
|
|
985
|
-
const
|
|
986
|
-
const others = typeof b.name === 'string'
|
|
987
|
-
? all.filter((o) => o.name === b.name && keyOf(o) !== key)
|
|
988
|
-
: [];
|
|
989
|
-
const placeholder = typeof b.name === 'string' ? spelled(`<bindings.${b.name}>`) : undefined;
|
|
990
|
-
const references = (text) => {
|
|
991
|
-
if (key !== '' && text.includes(spelled(key)))
|
|
992
|
-
return true;
|
|
993
|
-
if (placeholder === undefined || !text.includes(placeholder))
|
|
994
|
-
return false;
|
|
995
|
-
return key === ''
|
|
996
|
-
? !others.some((o) => text.includes(spelled(keyOf(o))))
|
|
997
|
-
: others.length === 0;
|
|
998
|
-
};
|
|
1003
|
+
const references = (text) => refersTo(b, all, text);
|
|
999
1004
|
const referencers = nodes.filter((n) => references(n.text));
|
|
1005
|
+
if (!inBaseline.has(identity)) {
|
|
1006
|
+
if (referencers.length > 0)
|
|
1007
|
+
return true;
|
|
1008
|
+
const counterpart = originalById.get(editedIds.get(identity));
|
|
1009
|
+
return !counterpart || !nodes.some((n) => n.kept && refersTo(counterpart, originalRows, n.text));
|
|
1010
|
+
}
|
|
1000
1011
|
const needs = (n) => !n.kept && (n.changed === undefined || references(n.changed));
|
|
1001
1012
|
return !(referencers.length > 0 && !referencers.some(needs));
|
|
1002
1013
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.122.
|
|
3
|
+
"version": "6.122.12",
|
|
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",
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
"@types/node": "^22.7.0",
|
|
127
127
|
"esbuild": "^0.28.1"
|
|
128
128
|
},
|
|
129
|
-
"gitref": "
|
|
129
|
+
"gitref": "e4610a40c97f809bd25b618ffd9943c408653791"
|
|
130
130
|
}
|