@uipath/maestro-builder-sdk 6.120.26 → 6.120.27

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.
@@ -2870,6 +2870,10 @@ rehome,
2870
2870
  lifted = new Set()) {
2871
2871
  // var id -> the declaration `implicitNodeVars` would derive for it
2872
2872
  const candidates = new Map();
2873
+ // Variables more than one candidate row writes. Never derived: which writer
2874
+ // `implicitNodeVars` would pick depends on the source's node order, so the
2875
+ // declaration stays an explicit `.var()` and keeps its own `elementId`.
2876
+ const writtenTwice = new Set();
2873
2877
  const walk = (container) => {
2874
2878
  for (const el of container.flowElements ?? []) {
2875
2879
  const payload = payloadOf(el);
@@ -2905,6 +2909,8 @@ lifted = new Set()) {
2905
2909
  for (const row of payload.output ?? []) {
2906
2910
  if (!row.var)
2907
2911
  continue;
2912
+ if (candidates.has(row.var))
2913
+ writtenTwice.add(row.var);
2908
2914
  // A lifted connector's two variables are claimed the way `.connector()` claims
2909
2915
  // them — `json`, named after the id, no schema — so a file's own `jsonSchema`
2910
2916
  // declaration with a body stays an explicit `.var()` rather than being folded
@@ -2930,8 +2936,8 @@ lifted = new Set()) {
2930
2936
  : { owner: el.id, ...rowDeclaration({ name: row.name, type: row.type, schema: row.body }) });
2931
2937
  }
2932
2938
  }
2933
- if (el.$type === 'bpmn:SubProcess')
2934
- walk(el);
2939
+ // No recursion into a sub-process: `implicitNodeVars` derives a nested node's
2940
+ // declaration into its sub-process, so no process-level declaration is derived from it.
2935
2941
  }
2936
2942
  };
2937
2943
  walk(process);
@@ -2947,7 +2953,7 @@ lifted = new Set()) {
2947
2953
  const folds = new Map();
2948
2954
  for (const v of varsExt?.inputOutput ?? []) {
2949
2955
  const c = candidates.get(v.id);
2950
- if (!c)
2956
+ if (!c || writtenTwice.has(v.id))
2951
2957
  continue;
2952
2958
  // The derived declaration takes the ROW's name when it has one, the id otherwise.
2953
2959
  if ((v.name ?? v.id) !== (c.name ?? v.id))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.120.26",
3
+ "version": "6.120.27",
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": "a09722a6d8633af46769fdf92acfd976c065902b"
127
+ "gitref": "e2286e821c50dabec57ad7c8d0ec9b70815af67b"
128
128
  }