@uipath/maestro-builder-sdk 6.120.1 → 6.120.2

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.
@@ -2296,9 +2296,25 @@ function conditionIdentityOf(condition, ambiguousSlas = new Map(), siblings = [c
2296
2296
  ...(rule.uipath?.outputs?.length
2297
2297
  ? { outputs: rule.uipath.outputs.map((row) => ({ name: row.name ?? '', ...(row.id ? { id: row.id } : {}) })) }
2298
2298
  : {}),
2299
+ // Its input rows (the event `body` subscription) carry ids too, which
2300
+ // compile mints as `v<name>`; a Designer row's own id comes back.
2301
+ ...(ruleInputIdentity(rule.uipath?.inputs)),
2299
2302
  }))),
2300
2303
  };
2301
2304
  }
2305
+ /**
2306
+ * A wait-for-connector rule's input rows by name and id (`conditionIdentityOf`),
2307
+ * when one has an id compile would not mint: compile writes `v<name>`
2308
+ * (`vbody`), so an SDK-written rule records nothing.
2309
+ */
2310
+ function ruleInputIdentity(inputs) {
2311
+ if (!Array.isArray(inputs))
2312
+ return {};
2313
+ const rows = inputs;
2314
+ if (!rows.some((row) => typeof row?.id === 'string' && row.id !== `v${String(row?.name ?? '')}`))
2315
+ return {};
2316
+ return { inputs: rows.map((row) => ({ name: typeof row?.name === 'string' ? row.name : '', ...(typeof row?.id === 'string' ? { id: row.id } : {}) })) };
2317
+ }
2302
2318
  function slaIdentity(sla) {
2303
2319
  return {
2304
2320
  ...(sla.id ? { id: sla.id } : {}),
@@ -186,6 +186,10 @@ interface ConditionIdentity {
186
186
  name: string;
187
187
  id?: string;
188
188
  }>;
189
+ inputs?: Array<{
190
+ name: string;
191
+ id?: string;
192
+ }>;
189
193
  }>>;
190
194
  }
191
195
  interface SlaIdentity {
@@ -1537,6 +1537,17 @@ function applyPreservedIdentities(result, preservation, warn) {
1537
1537
  pins.push({ index, rule });
1538
1538
  if (rule.outputs)
1539
1539
  takeOutputRows(ruleTarget?.[bagField]?.outputs ?? [], rule.outputs);
1540
+ if (rule.inputs) {
1541
+ // By name when the name is unique on both sides, else by position, as a task's inputs.
1542
+ const rows = ruleTarget?.[bagField]?.inputs ?? [];
1543
+ const once = (names, name) => names.filter((n) => n === name).length === 1;
1544
+ rule.inputs.forEach((row, index) => {
1545
+ const byName = once(rule.inputs.map((r) => r.name), row.name) && once(rows.map((r) => r?.name), row.name);
1546
+ const input = byName ? rows.find((r) => r?.name === row.name) : rows[index];
1547
+ if (input && input.name === row.name)
1548
+ takeRow(input, row.id, false);
1549
+ });
1550
+ }
1540
1551
  }));
1541
1552
  });
1542
1553
  // Each pin goes to the condition it was saved on. Ids pair up by position,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.120.1",
3
+ "version": "6.120.2",
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": "1f02abfad19d46ac341673048803e61e7b88b50b"
127
+ "gitref": "53cda99a37bbc03af9ea7b89bc2a0c60d231ac28"
128
128
  }