@uipath/maestro-builder-sdk 6.10.0 → 6.10.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.
package/dist/decompile.js CHANGED
@@ -1923,15 +1923,37 @@ function armCb(param, segs) {
1923
1923
  * fall-off End the serializer always appends; it now decompiles to an explicit
1924
1924
  * `.return({}, { version })` so the End's exact definition version survives the
1925
1925
  * round trip (design §5.3) — recompiling emits the identical node.
1926
+ *
1927
+ * An End written by the designer or the product CLI carries its returned value
1928
+ * ONLY in `outputs[name].source` — it writes no `variableUpdates` row. Reading
1929
+ * updates alone decompiled such an End to `.return({})` and silently dropped the
1930
+ * value it returned (a Decision's two Ends returning `'nice day'` /
1931
+ * `'bring a jacket'` both came back empty). So an output whose source is not the
1932
+ * identity `$vars.<name>` mapping `endOutputs` fills in is a returned value too.
1926
1933
  */
1927
1934
  function returnSeg(node, ctx) {
1928
1935
  const updates = ctx.flow.variables?.variableUpdates?.[node.id] ?? [];
1929
1936
  const opts = returnOptsArg(node);
1930
- if (updates.length === 0)
1931
- return `.return({}${opts})`;
1932
1937
  const entries = updates.map((u) => `${key(u.variableId)}: ${emitVal(u.expression, ctx.imp, ctx.inputNames)}`);
1938
+ const written = new Set(updates.map((u) => u.variableId));
1939
+ for (const [name, out] of Object.entries(node.outputs ?? {})) {
1940
+ if (written.has(name))
1941
+ continue;
1942
+ const source = out?.source;
1943
+ const raw = unwrapSource(source);
1944
+ if (raw === undefined || isIdentityEndSource(raw, name))
1945
+ continue;
1946
+ entries.push(`${key(name)}: ${emitVal(source, ctx.imp, ctx.inputNames)}`);
1947
+ }
1948
+ if (entries.length === 0)
1949
+ return `.return({}${opts})`;
1933
1950
  return `.return({ ${entries.join(', ')} }${opts})`;
1934
1951
  }
1952
+ /** The fill-in mapping `endOutputs` writes for an output no `.return` named: `=js:$vars.<name>`. */
1953
+ function isIdentityEndSource(raw, name) {
1954
+ const body = raw.startsWith('=js:') ? raw.slice(4) : raw;
1955
+ return body.trim() === `$vars.${name}`;
1956
+ }
1935
1957
  /**
1936
1958
  * The options argument for a `.return(...)` — `version`, plus the End's `name`
1937
1959
  * and `label` when they are not what the serializer would derive on its own.
@@ -187,16 +187,27 @@ export declare function candidateResolvesAllLine(label: string, lookups: number)
187
187
  export declare function candidateExhaustedLine(label: string, field: string, scanned: number): string;
188
188
  /** The terminal report's line for a candidate whose lookup failed for another reason: the error, verbatim. */
189
189
  export declare function candidateErrorLine(label: string, error: unknown): string;
190
+ /**
191
+ * The command that shows what a lookup's collection holds on one connection.
192
+ *
193
+ * Every refusal that ends in "check the value" carries it: the value the author
194
+ * wrote may be one the task never named (an invented Slack channel), and
195
+ * without this line the only way to learn the real values is to leave the
196
+ * documented loop. The skills eval customer-escalation dead-ended exactly
197
+ * there on 2026-09-25 (UiPath/flow-builder-sdk#817).
198
+ */
199
+ export declare function collectionListingHint(connectorKey: string, collection: string, connectionId: string): string;
190
200
  /**
191
201
  * An explicit `--connection-id` / `--connection` is the author's decision and
192
202
  * is not overridden. The alternatives are still named, because the whole cost
193
203
  * of this bug was not knowing they existed. `first` is the exhausted lookup's
194
- * own message; `others` the pasteable listing of the other candidates.
204
+ * own message; `others` the pasteable listing of the other candidates; `hint`
205
+ * the {@link collectionListingHint} for the pinned connection.
195
206
  */
196
- export declare function pinnedConnectionExhaustedMessage(first: string, connectorKey: string, othersCount: number, othersListing: string): string;
207
+ export declare function pinnedConnectionExhaustedMessage(first: string, connectorKey: string, othersCount: number, othersListing: string, hint: string): string;
197
208
  /** The listing of other connections itself failed; the original lookup failure is what the author asked about. */
198
209
  export declare function candidateListingFailedMessage(first: string, error: unknown): string;
199
- export declare function onlyConnectionMessage(first: string, connectorKey: string): string;
210
+ export declare function onlyConnectionMessage(first: string, connectorKey: string, hint: string): string;
200
211
  /** Two or more candidates resolve everything: reported, never chosen between. */
201
212
  export declare function severalConnectionsResolveMessage(count: number, connectorKey: string, listing: string): string;
202
213
  /**
@@ -443,13 +443,27 @@ export function candidateExhaustedLine(label, field, scanned) {
443
443
  export function candidateErrorLine(label, error) {
444
444
  return ` ${label} ${messageOf(error)}`;
445
445
  }
446
+ /**
447
+ * The command that shows what a lookup's collection holds on one connection.
448
+ *
449
+ * Every refusal that ends in "check the value" carries it: the value the author
450
+ * wrote may be one the task never named (an invented Slack channel), and
451
+ * without this line the only way to learn the real values is to leave the
452
+ * documented loop. The skills eval customer-escalation dead-ended exactly
453
+ * there on 2026-09-25 (UiPath/flow-builder-sdk#817).
454
+ */
455
+ export function collectionListingHint(connectorKey, collection, connectionId) {
456
+ return (`To see what ${pyRepr(collection)} holds on this connection:\n` +
457
+ ` uip is resources run list ${connectorKey} ${collection} --connection-id ${connectionId}`);
458
+ }
446
459
  /**
447
460
  * An explicit `--connection-id` / `--connection` is the author's decision and
448
461
  * is not overridden. The alternatives are still named, because the whole cost
449
462
  * of this bug was not knowing they existed. `first` is the exhausted lookup's
450
- * own message; `others` the pasteable listing of the other candidates.
463
+ * own message; `others` the pasteable listing of the other candidates; `hint`
464
+ * the {@link collectionListingHint} for the pinned connection.
451
465
  */
452
- export function pinnedConnectionExhaustedMessage(first, connectorKey, othersCount, othersListing) {
466
+ export function pinnedConnectionExhaustedMessage(first, connectorKey, othersCount, othersListing, hint) {
453
467
  let extra = "";
454
468
  if (othersCount > 0) {
455
469
  extra =
@@ -457,14 +471,16 @@ export function pinnedConnectionExhaustedMessage(first, connectorKey, othersCoun
457
471
  `${othersListing}\n` +
458
472
  "Re-run against one of those, or check the value. This run kept the connection you named.";
459
473
  }
460
- return `${PREFIX}${first}${extra}`;
474
+ return `${PREFIX}${first}${extra}\n${hint}`;
461
475
  }
462
476
  /** The listing of other connections itself failed; the original lookup failure is what the author asked about. */
463
477
  export function candidateListingFailedMessage(first, error) {
464
478
  return `${PREFIX}${first}\n(could not list other connections: ${messageOf(error)})`;
465
479
  }
466
- export function onlyConnectionMessage(first, connectorKey) {
467
- return (`${PREFIX}${first}\n` + `This is the only enabled ${connectorKey} connection on the tenant, so the value is what to check.`);
480
+ export function onlyConnectionMessage(first, connectorKey, hint) {
481
+ return (`${PREFIX}${first}\n` +
482
+ `This is the only enabled ${connectorKey} connection on the tenant, so the value is what to check.\n` +
483
+ hint);
468
484
  }
469
485
  /** Two or more candidates resolve everything: reported, never chosen between. */
470
486
  export function severalConnectionsResolveMessage(count, connectorKey, listing) {
@@ -484,9 +500,7 @@ export function noConnectionResolvesMessage(connectorKey, first, lines, connecti
484
500
  `${first.field}: ${first.by}=${pyRepr(first.value)}\n` +
485
501
  `${lines.join("\n")}\n` +
486
502
  "Every candidate was read to the end, so the value is what to check now. " +
487
- `To see what ${pyRepr(first.collection)} holds:\n` +
488
- ` uip is resources run list ${connectorKey} ${first.collection} ` +
489
- `--connection-id ${connectionId}`);
503
+ collectionListingHint(connectorKey, first.collection, connectionId));
490
504
  }
491
505
  // ---------------------------------------------------------------------------
492
506
  // The event path
@@ -1,5 +1,5 @@
1
1
  import { ConnectionRefusal, candidateConnections, candidateListing } from "./connections.js";
2
- import { PrepareRefusal, candidateErrorLine, candidateExhaustedLine, candidateLabel, candidateListingFailedMessage, candidateResolvesAllLine, noConnectionResolvesMessage, onlyConnectionMessage, pinnedConnectionExhaustedMessage, severalConnectionsResolveMessage, tryingOtherConnectionsLine, } from "./messages.js";
2
+ import { PrepareRefusal, candidateErrorLine, candidateExhaustedLine, candidateLabel, candidateListingFailedMessage, candidateResolvesAllLine, collectionListingHint, noConnectionResolvesMessage, onlyConnectionMessage, pinnedConnectionExhaustedMessage, severalConnectionsResolveMessage, tryingOtherConnectionsLine, } from "./messages.js";
3
3
  import { LookupExhausted, ResolutionRefusal, resolveOne } from "./resolve.js";
4
4
  import { pyGet, pyStrAny } from "./support.js";
5
5
  /**
@@ -61,7 +61,7 @@ export async function retryOtherConnections(ctx, plan, first) {
61
61
  throw error;
62
62
  throw new PrepareRefusal(candidateListingFailedMessage(first.message, error), "LOOKUP_EXHAUSTED_PINNED");
63
63
  }
64
- throw new PrepareRefusal(pinnedConnectionExhaustedMessage(first.message, ctx.connectorKey, others.length, candidateListing(others)), "LOOKUP_EXHAUSTED_PINNED");
64
+ throw new PrepareRefusal(pinnedConnectionExhaustedMessage(first.message, ctx.connectorKey, others.length, candidateListing(others), collectionListingHint(ctx.connectorKey, first.collection, ctx.connectionId)), "LOOKUP_EXHAUSTED_PINNED");
65
65
  }
66
66
  let candidates;
67
67
  try {
@@ -76,7 +76,7 @@ export async function retryOtherConnections(ctx, plan, first) {
76
76
  }
77
77
  const others = candidates.filter((row) => !sameId(row));
78
78
  if (others.length === 0) {
79
- throw new PrepareRefusal(onlyConnectionMessage(first.message, ctx.connectorKey), "LOOKUP_EXHAUSTED_ONLY_CONNECTION");
79
+ throw new PrepareRefusal(onlyConnectionMessage(first.message, ctx.connectorKey, collectionListingHint(ctx.connectorKey, first.collection, ctx.connectionId)), "LOOKUP_EXHAUSTED_ONLY_CONNECTION");
80
80
  }
81
81
  ctx.reporter.info(tryingOtherConnectionsLine(first.field, others.length, ctx.connectorKey));
82
82
  const winners = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.10.0",
3
+ "version": "6.10.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",
@@ -92,5 +92,5 @@
92
92
  "@types/node": "^22.7.0",
93
93
  "esbuild": "^0.28.1"
94
94
  },
95
- "gitref": "d50db2eeec64253d691dc9512ee9e7027062665b"
95
+ "gitref": "0c68e2f56257719fc7db812ce8cdb3e097c5444c"
96
96
  }