@uipath/flow-tool 1.202.2 → 1.203.0-preview.180

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.
Files changed (150) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +48 -49
  2. package/dist/{authoring-cyybnqy9.js → authoring-tv4dh80p.js} +31 -9
  3. package/dist/{binding-service-xq110a7q.js → binding-service-1hjkvp7f.js} +37 -29
  4. package/dist/{connector-service-1jp3gvb1.js → connector-service-f50vt5ar.js} +225 -57
  5. package/dist/{conversion-FQTRFHRX-j8vsrk1c.js → conversion-FQTRFHRX-5bww6cg9.js} +11 -10
  6. package/dist/de-FGHEJRCI-gn4cf5gh.js +2697 -0
  7. package/dist/de-MUJPA4EB-dpg7t2rw.js +173 -0
  8. package/dist/{debug-conversation-trigger-q5jwq1x7.js → debug-conversation-trigger-nmd9v41y.js} +21 -18
  9. package/dist/{debug-http-client-4ev9xna7.js → debug-http-client-53qk6pc5.js} +2 -2
  10. package/dist/{debug-service-2skv6t3q.js → debug-service-nyk0s6mc.js} +3 -3
  11. package/dist/{edge-service-crgn8x3q.js → edge-service-qs0fmj4c.js} +19 -16
  12. package/dist/{index-4b8634za.js → embedded-file-reader-0sjt4nkj.js} +96 -16641
  13. package/dist/{en-TBNO2WUV-rfe87pgh.js → en-BWGKA5OE-1qkvb9rn.js} +2 -2
  14. package/dist/en-FBPVNKFN-dqt573xn.js +138 -0
  15. package/dist/en-TBNO2WUV-9nan43e5.js +1936 -0
  16. package/dist/es-7SE7HX2X-8yh1aj2y.js +173 -0
  17. package/dist/es-KR3ZSNMP-0cszm2n3.js +2697 -0
  18. package/dist/es-MX-2MYFZU7X-3rek4r73.js +173 -0
  19. package/dist/es-MX-XXZJGC4R-b4fbwe9d.js +2697 -0
  20. package/dist/first-party-service-srxaftkn.js +27 -0
  21. package/dist/{flow-api-p1jy8t6k.js → flow-api-f49qbvf6.js} +8 -8
  22. package/dist/{flow-debug-service-gtz48pcs.js → flow-debug-service-nvx6c5fm.js} +65 -40
  23. package/dist/{flow-eval-node-target-d4q72qzz.js → flow-eval-node-target-rv41h6g2.js} +24 -17
  24. package/dist/flow-eval-run-api-1bw5e0k4.js +13 -0
  25. package/dist/{flow-eval-run-service-bteardyh.js → flow-eval-run-service-bnpf0zhb.js} +105 -220
  26. package/dist/{flow-eval-service-8wn40enf.js → flow-eval-service-p0fbctsk.js} +350 -306
  27. package/dist/flow-init-service-6c5tj22g.js +42 -0
  28. package/dist/{flow-io-91tv36v5.js → flow-io-c05c9hc7.js} +18 -15
  29. package/dist/{flow-migrate-service-4mxge029.js → flow-migrate-service-6dky7rrg.js} +27 -23
  30. package/dist/{flow-pack-service-9s7wmwpf.js → flow-pack-service-3ms1t8nv.js} +44 -36
  31. package/dist/flow-validate-service-hq93ye0w.js +65 -0
  32. package/dist/fr-MDFKNZ4C-h4a122k9.js +173 -0
  33. package/dist/fr-Y6NPVODW-q5ef3htr.js +2697 -0
  34. package/dist/{governance-fetcher-kn29e4eb.js → governance-fetcher-7b0a301w.js} +6 -5
  35. package/dist/{headless-my7j1typ.js → headless-rkxtgwts.js} +42909 -1756
  36. package/dist/{hitl-service-fmrkamr4.js → hitl-service-fpdb3tf5.js} +18 -15
  37. package/dist/{index-1kgxzh8x.js → index-3ts7y9d3.js} +15 -3
  38. package/dist/{index-gbfvfhkw.js → index-4hhb8jhe.js} +6 -4
  39. package/dist/{index-apf8q9y0.js → index-51z10z84.js} +4 -4
  40. package/dist/{index-d1yqqk6q.js → index-55cym5j7.js} +6 -4
  41. package/dist/index-kmp9fmhb.js +25 -0
  42. package/dist/index-sc7ddh21.js +16742 -0
  43. package/dist/{index-acd6bpqc.js → index-ymsd3pyx.js} +12 -15
  44. package/dist/index.js +13 -24
  45. package/dist/init.js +23 -19
  46. package/dist/{input-reader-mm2ydeh5.js → input-reader-tw0j373f.js} +1 -1
  47. package/dist/ja-Q5PXKJ2V-tzf2rvz2.js +2697 -0
  48. package/dist/ja-UTQEAP34-8e0q6swp.js +173 -0
  49. package/dist/known-types-8dhhqk35.js +19 -0
  50. package/dist/ko-AXCHW2OK-askct7f6.js +173 -0
  51. package/dist/ko-AYBDSRZG-am0h0m2r.js +2697 -0
  52. package/dist/{maestro-automate-entry-6bxz7zxn.js → maestro-automate-entry-pqy9xqm3.js} +2 -2
  53. package/dist/{node-2ja52fbg.js → node-98psr4wc.js} +2344 -376
  54. package/dist/{node-service-1ygyqaed.js → node-service-yfyzjg1s.js} +37 -29
  55. package/dist/{node-sync-service-a4grwf1e.js → node-sync-service-zq2ptsep.js} +15 -15
  56. package/dist/{packager-tool-nnm6kw3x.js → packager-tool-0egkaa38.js} +1 -1
  57. package/dist/{packager-tool-0hrz9qfd.js → packager-tool-10t52r3c.js} +7 -7
  58. package/dist/{packager-tool-eb48j42f.js → packager-tool-13xbv18n.js} +100 -127
  59. package/dist/{packager-tool-nq4rcqqg.js → packager-tool-1frs4sr4.js} +32 -2
  60. package/dist/{packager-tool-bddj2zb4.js → packager-tool-1r5dnt9q.js} +1 -1
  61. package/dist/{packager-tool-f0kd5kq4.js → packager-tool-26ydwf12.js} +130 -15
  62. package/dist/{packager-tool-9ydywwp2.js → packager-tool-321a1806.js} +1 -1
  63. package/dist/packager-tool-35hg551a.js +1889 -0
  64. package/dist/{packager-tool-2csx1z2z.js → packager-tool-3j8sdsc2.js} +31 -30
  65. package/dist/{packager-tool-kscf0zaz.js → packager-tool-4rvnss1x.js} +15 -56
  66. package/dist/{packager-tool-t6exvxxr.js → packager-tool-5060zp48.js} +2 -2
  67. package/dist/packager-tool-53w8skv5.js +262 -0
  68. package/dist/{packager-tool-rew0hp2h.js → packager-tool-6k8s7pt9.js} +269 -23
  69. package/dist/{packager-tool-29eg86w6.js → packager-tool-6rsegsby.js} +6 -7
  70. package/dist/packager-tool-795gzq9k.js +208 -0
  71. package/dist/packager-tool-7q6z6npd.js +1937 -0
  72. package/dist/{packager-tool-h1mds3r4.js → packager-tool-8dj442ex.js} +5 -4
  73. package/dist/packager-tool-8qp60s20.js +12 -0
  74. package/dist/{packager-tool-114a3x6s.js → packager-tool-9kx94sj5.js} +16 -6
  75. package/dist/packager-tool-asvprb1k.js +3513 -0
  76. package/dist/{packager-tool-0d7tcvg1.js → packager-tool-b1xs6aty.js} +4 -1
  77. package/dist/{packager-tool-nmqwgqp7.js → packager-tool-bzry3t7v.js} +9 -9
  78. package/dist/{packager-tool-nt7g81h7.js → packager-tool-carzh1jy.js} +10 -10
  79. package/dist/packager-tool-d88rqwk8.js +135 -0
  80. package/dist/{packager-tool-pm3qh1hy.js → packager-tool-dh5nppv4.js} +1 -1
  81. package/dist/{packager-tool-r87gxwqa.js → packager-tool-e87tzg4y.js} +2 -2
  82. package/dist/{packager-tool-d0w3423x.js → packager-tool-e9yc5m6b.js} +1 -1
  83. package/dist/packager-tool-fvm2dddf.js +6297 -0
  84. package/dist/{packager-tool-3bra2c4j.js → packager-tool-gctpkdzs.js} +1 -1
  85. package/dist/packager-tool-gdtpsdn7.js +342 -0
  86. package/dist/{packager-tool-aa481g36.js → packager-tool-gpwec9sp.js} +6 -6
  87. package/dist/{packager-tool-a1hbfmws.js → packager-tool-gzpvdcnw.js} +124 -2
  88. package/dist/{packager-tool-03hjxcd7.js → packager-tool-h9d8c9rf.js} +1 -1
  89. package/dist/packager-tool-j78fwwhq.js +16 -0
  90. package/dist/packager-tool-jysvpt8p.js +11 -0
  91. package/dist/{packager-tool-5kd7msdf.js → packager-tool-nsmy7aap.js} +5 -5
  92. package/dist/packager-tool-paq9c70w.js +1332 -0
  93. package/dist/{packager-tool-tv33t02p.js → packager-tool-pszx10r5.js} +310 -13
  94. package/dist/{packager-tool-7qzyj26r.js → packager-tool-r45r9gk6.js} +209 -199
  95. package/dist/{packager-tool-sc5tddfj.js → packager-tool-s0mzv3sx.js} +1 -1
  96. package/dist/{packager-tool-pdg7hwvw.js → packager-tool-t9c77psy.js} +3098 -3179
  97. package/dist/{packager-tool-0880myh2.js → packager-tool-v31s32s4.js} +23 -5
  98. package/dist/{packager-tool-vfb74f9p.js → packager-tool-vbser1d9.js} +7 -7
  99. package/dist/packager-tool-vcjq9xkc.js +1895 -0
  100. package/dist/{packager-tool-w20r6n9v.js → packager-tool-vck7ct1e.js} +2877 -2221
  101. package/dist/{packager-tool-e8td7b01.js → packager-tool-vdc8r21p.js} +10328 -16610
  102. package/dist/{packager-tool-yr3bws42.js → packager-tool-vqcnvaae.js} +15 -15
  103. package/dist/{packager-tool-n7x6kxph.js → packager-tool-w22107ex.js} +8 -8
  104. package/dist/packager-tool-w5a1hhyj.js +13 -0
  105. package/dist/{packager-tool-rmh1jea6.js → packager-tool-xsta8jfz.js} +4 -3
  106. package/dist/packager-tool-yvva2vc5.js +261 -0
  107. package/dist/{packager-tool-9y5am147.js → packager-tool-z185rq2a.js} +4 -4
  108. package/dist/{packager-tool-gbzpz3qn.js → packager-tool-z894s8rx.js} +10 -13
  109. package/dist/packager-tool.js +17 -14
  110. package/dist/pt-3DIO5QWG-59b3f4bc.js +173 -0
  111. package/dist/pt-BR-TKHNHMET-dn6zxk1d.js +2697 -0
  112. package/dist/pt-BR-Y6K6XHXK-mp3hwhw1.js +173 -0
  113. package/dist/pt-ROXU257Y-yd80gx6s.js +2697 -0
  114. package/dist/ro-AVAWPKOO-42m6am1w.js +2697 -0
  115. package/dist/ro-BWR3ONRR-vzx3hy8a.js +173 -0
  116. package/dist/ru-GSCT4ARZ-jrxwev63.js +10 -0
  117. package/dist/ru-WBLQ5B2U-s4em88p0.js +10 -0
  118. package/dist/{serialization-BXU6AKAN-n5b0v0kd.js → serialization-BXU6AKAN-z0vcrhpz.js} +13 -12
  119. package/dist/services/connector-binding-validator.d.ts +10 -1
  120. package/dist/services/definitions-lookup.d.ts +27 -0
  121. package/dist/services/flow-debug-service.d.ts +290 -0
  122. package/dist/services/flow-eval-types.d.ts +2 -2
  123. package/dist/services/flow-eval-utils.d.ts +29 -0
  124. package/dist/services/flow-validate-service.d.ts +39 -0
  125. package/dist/services/node-validators/connector-validator.d.ts +8 -0
  126. package/dist/services/vars-reference-rule.d.ts +113 -13
  127. package/dist/{shared-utils-ka4xn0nn.js → shared-utils-wv356cvj.js} +1 -1
  128. package/dist/tidy-service-cxpm6pcy.js +39 -0
  129. package/dist/tool.js +13 -24
  130. package/dist/tr-5IIHSFW5-hw4cewew.js +173 -0
  131. package/dist/tr-JMIP7ZSL-fb67ft9w.js +2696 -0
  132. package/dist/utils/handle-expansion.d.ts +34 -0
  133. package/dist/utils/write-resolved-flow.d.ts +7 -0
  134. package/dist/validation.js +46 -39
  135. package/dist/{variable-service-caa9axmz.js → variable-service-c1f91388.js} +22 -19
  136. package/dist/{wait-for-flow-job-xtnb6zfc.js → wait-for-flow-job-yp3mhy43.js} +8 -8
  137. package/dist/zh-CN-IFFXSEJS-tke4mzty.js +2697 -0
  138. package/dist/zh-CN-R2KU4U5L-tc1hat59.js +173 -0
  139. package/dist/zh-TW-GNKMELBF-j674515r.js +173 -0
  140. package/dist/zh-TW-IYBNYAMG-wcan0qpb.js +2697 -0
  141. package/package.json +3 -2
  142. package/dist/flow-init-service-a4td40wm.js +0 -38
  143. package/dist/flow-validate-service-bd4zxhfx.js +0 -59
  144. package/dist/known-types-eq32py2n.js +0 -20
  145. package/dist/packager-tool-2wefykg9.js +0 -106
  146. package/dist/packager-tool-7t3rgb7f.js +0 -4945
  147. package/dist/packager-tool-8j92afwp.js +0 -58
  148. package/dist/packager-tool-jjpc0yka.js +0 -304
  149. package/dist/tidy-service-44n8x2mn.js +0 -36
  150. /package/dist/{localization-w8ada88j.js → localization-y790z9vm.js} +0 -0
@@ -2382,7 +2382,7 @@ var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{1
2382
2382
  var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
2383
2383
  var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
2384
2384
  var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
2385
- var PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
2385
+ var PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
2386
2386
  var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
2387
2387
  var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
2388
2388
  var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
@@ -2429,7 +2429,7 @@ var QUOTED_LITERAL_PATTERN = new RegExp([
2429
2429
  `(?<![A-Za-z0-9])"(?:[^\\
2430
2430
  ]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
2431
2431
  ].join("|"), "g");
2432
- var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
2432
+ var JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
2433
2433
  var COLLAPSED_BODY = "{…}";
2434
2434
  var COLLAPSED_BODY_MARKER = "\x01body\x01";
2435
2435
  var MAX_BODY_NESTING = 8;
@@ -2444,10 +2444,13 @@ function collapseJsonBodies(text) {
2444
2444
  }
2445
2445
  return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
2446
2446
  }
2447
- var TRAILING_PROSE_PUNCT = /[.,;:!?)\]}>'"]+$/;
2447
+ var TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`;
2448
2448
  function peelTrailingPunctuation(match) {
2449
- const trailing = match.match(TRAILING_PROSE_PUNCT)?.[0] ?? "";
2450
- return trailing ? [match.slice(0, -trailing.length), trailing] : [match, ""];
2449
+ let end = match.length;
2450
+ while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
2451
+ end -= 1;
2452
+ }
2453
+ return [match.slice(0, end), match.slice(end)];
2451
2454
  }
2452
2455
  function redactUrl(raw) {
2453
2456
  try {
@@ -2750,6 +2753,22 @@ function parseHttpStatusFromMessage(message) {
2750
2753
  const status = Number(match[1]);
2751
2754
  return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
2752
2755
  }
2756
+ function findHttpStatusInGraph(error) {
2757
+ for (const node of walkErrorGraph(error)) {
2758
+ const response = node.response;
2759
+ const explicit = typeof node.status === "number" ? node.status : response?.status;
2760
+ if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
2761
+ return explicit;
2762
+ }
2763
+ if (typeof node.message === "string") {
2764
+ const parsed = parseHttpStatusFromMessage(node.message);
2765
+ if (parsed !== undefined && parsed >= 400) {
2766
+ return parsed;
2767
+ }
2768
+ }
2769
+ }
2770
+ return;
2771
+ }
2753
2772
  function isHtmlDocument(body) {
2754
2773
  return /^\s*(<!doctype html|<html\b)/i.test(body);
2755
2774
  }
@@ -2863,7 +2882,8 @@ async function extractErrorDetails(error, options) {
2863
2882
  }
2864
2883
  let message;
2865
2884
  let result = "Failure";
2866
- const classification = classifyError(status, error);
2885
+ const classificationStatus = status ?? findHttpStatusInGraph(error);
2886
+ const classification = classifyError(classificationStatus, error);
2867
2887
  let retry = classification.retry;
2868
2888
  if (status === 401) {
2869
2889
  message = DEFAULT_401;
@@ -2939,8 +2959,8 @@ async function extractErrorDetails(error, options) {
2939
2959
  details = describeThrownValue(error);
2940
2960
  }
2941
2961
  const context = {};
2942
- if (status) {
2943
- context.httpStatus = status;
2962
+ if (classificationStatus) {
2963
+ context.httpStatus = classificationStatus;
2944
2964
  }
2945
2965
  if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
2946
2966
  context.errorCode = parsedBody.errorCode;
@@ -3520,7 +3540,8 @@ function readRegistryValue(keyPath, valueName) {
3520
3540
  }
3521
3541
  const [error, output] = catchError(() => execFileSync("reg", ["query", keyPath, "/v", valueName], {
3522
3542
  encoding: "utf-8",
3523
- stdio: ["pipe", "pipe", "pipe"]
3543
+ stdio: ["pipe", "pipe", "pipe"],
3544
+ windowsHide: true
3524
3545
  }));
3525
3546
  if (error) {
3526
3547
  return "";
@@ -4235,28 +4256,32 @@ function isPlainRecord(value) {
4235
4256
  const prototype = Object.getPrototypeOf(value);
4236
4257
  return prototype === Object.prototype || prototype === null;
4237
4258
  }
4238
- function extractPagedRows(value) {
4259
+ function splitPagedEnvelope(value) {
4239
4260
  if (Array.isArray(value) || !isPlainRecord(value))
4240
4261
  return null;
4241
- const entries = Object.values(value);
4262
+ const entries = Object.entries(value);
4242
4263
  if (entries.length === 0)
4243
4264
  return null;
4244
- let rows = null;
4245
- let hasScalarSibling = false;
4246
- for (const entry of entries) {
4265
+ let found = null;
4266
+ const meta = Object.create(null);
4267
+ for (const [key, entry] of entries) {
4247
4268
  if (Array.isArray(entry)) {
4248
- if (rows !== null)
4269
+ if (found !== null)
4249
4270
  return null;
4250
- rows = entry;
4271
+ found = { key, rows: entry };
4251
4272
  } else if (entry !== null && typeof entry === "object") {
4252
4273
  return null;
4253
4274
  } else {
4254
- hasScalarSibling = true;
4275
+ meta[key] = entry;
4255
4276
  }
4256
4277
  }
4257
- if (rows === null || !hasScalarSibling)
4278
+ if (found === null || Object.keys(meta).length === 0)
4258
4279
  return null;
4259
- return rows;
4280
+ return { ...found, meta };
4281
+ }
4282
+ function extractPagedRows(value) {
4283
+ const paged = splitPagedEnvelope(value);
4284
+ return paged === null ? null : paged.rows;
4260
4285
  }
4261
4286
  function toLowerCamelCaseKey(key) {
4262
4287
  if (!key)
@@ -4360,6 +4385,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
4360
4385
  }
4361
4386
  break;
4362
4387
  }
4388
+ case "markdown":
4389
+ logFn(renderMarkdown(data));
4390
+ break;
4363
4391
  default: {
4364
4392
  const hasData = "Data" in data && data.Data != null;
4365
4393
  const pagedRows = hasData ? extractPagedRows(data.Data) : null;
@@ -4384,6 +4412,10 @@ function logOutput(data, format = "json", tableRowStyle) {
4384
4412
  printOutput(data, format, (msg) => sink.writeOut(`${msg}
4385
4413
  `), needsAsciiSafeJson(sink), styleFn);
4386
4414
  }
4415
+ var PLUMBING_KEYS = new Set(["code", "log"]);
4416
+ function isPlumbingKey(key) {
4417
+ return PLUMBING_KEYS.has(key.toLowerCase());
4418
+ }
4387
4419
  function cellToString(val) {
4388
4420
  return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
4389
4421
  }
@@ -4399,7 +4431,7 @@ function wrapText(text, width) {
4399
4431
  function printTable(data, logFn, externalLogValue, tableRowStyle) {
4400
4432
  if (data.length === 0)
4401
4433
  return;
4402
- const keys = Object.keys(data[0]).filter((key) => !["code", "log"].includes(key.toLowerCase()));
4434
+ const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
4403
4435
  const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
4404
4436
  const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
4405
4437
  logFn(header);
@@ -4421,7 +4453,7 @@ function isNonEmptyPlainObject(value) {
4421
4453
  }
4422
4454
  var NESTED_INDENT = " ";
4423
4455
  function printVerticalTable(data, logFn = console.log, externalLogValue) {
4424
- const keys = Object.keys(data).filter((key) => !["code", "log"].includes(key.toLowerCase()));
4456
+ const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
4425
4457
  if (keys.length === 0)
4426
4458
  return;
4427
4459
  const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
@@ -4452,7 +4484,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
4452
4484
  function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
4453
4485
  if (data.length === 0)
4454
4486
  return;
4455
- const keys = Object.keys(data[0]).filter((key) => !["code", "log"].includes(key.toLowerCase()));
4487
+ const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
4456
4488
  if (keys.length === 0)
4457
4489
  return;
4458
4490
  if (!process.stdout.isTTY) {
@@ -4526,6 +4558,220 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
4526
4558
  logFn(`Log: ${externalLogValue}`);
4527
4559
  }
4528
4560
  }
4561
+ var MARKDOWN_MAX_CELL = 200;
4562
+ var MARKDOWN_MAX_DEPTH = 3;
4563
+ function markdownHeading(depth) {
4564
+ return "#".repeat(Math.min(3 + depth, 6));
4565
+ }
4566
+ var BACKTICK_RUN = /`+/g;
4567
+ function fencedBlock(text) {
4568
+ const first = text.trimStart()[0];
4569
+ const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
4570
+ const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
4571
+ const fence = "`".repeat(Math.max(3, longestRun + 1));
4572
+ return `${fence}${language}
4573
+ ${text}
4574
+ ${fence}`;
4575
+ }
4576
+ function collapseNewlineRuns(text) {
4577
+ return text.split(/(\s+)/).map((part, index) => index % 2 === 1 && part.includes(`
4578
+ `) ? " " : part).join("");
4579
+ }
4580
+ function markdownCell(value) {
4581
+ const text = value instanceof Date ? value.toISOString() : cellToString(value);
4582
+ return collapseNewlineRuns(text).replace(/\|/g, "\\|");
4583
+ }
4584
+ function markdownLabel(key) {
4585
+ return collapseNewlineRuns(key).replace(/[\\`*|]/g, "\\$&");
4586
+ }
4587
+ function withoutPlumbing(record) {
4588
+ const kept = Object.create(null);
4589
+ for (const [key, value] of Object.entries(record)) {
4590
+ if (!isPlumbingKey(key))
4591
+ kept[key] = value;
4592
+ }
4593
+ return kept;
4594
+ }
4595
+ function rowsWithoutPlumbing(rows) {
4596
+ return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
4597
+ }
4598
+ function markdownTable(rows) {
4599
+ const columns = [];
4600
+ const seen = new Set;
4601
+ for (const row of rows) {
4602
+ for (const key of Object.keys(row)) {
4603
+ if (!seen.has(key)) {
4604
+ seen.add(key);
4605
+ columns.push(key);
4606
+ }
4607
+ }
4608
+ }
4609
+ if (columns.length === 0)
4610
+ return null;
4611
+ const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
4612
+ if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
4613
+ return null;
4614
+ }
4615
+ return [
4616
+ `| ${columns.map(markdownLabel).join(" | ")} |`,
4617
+ `| ${columns.map(() => "---").join(" | ")} |`,
4618
+ ...cells.map((row) => `| ${row.join(" | ")} |`)
4619
+ ].join(`
4620
+ `);
4621
+ }
4622
+ function extractMessageSequence(rows) {
4623
+ const messages = [];
4624
+ for (const row of rows) {
4625
+ const message = extractSingleMessage(row);
4626
+ if (message === null)
4627
+ return null;
4628
+ messages.push(message);
4629
+ }
4630
+ return messages.join(`
4631
+
4632
+ `);
4633
+ }
4634
+ function markdownRows(rows, depth) {
4635
+ if (rows.length === 0)
4636
+ return "(none)";
4637
+ if (!isPlainObjectArray(rows)) {
4638
+ return rows.map((item) => `- ${markdownCell(item)}`).join(`
4639
+ `);
4640
+ }
4641
+ const prose = extractMessageSequence(rows);
4642
+ if (prose !== null)
4643
+ return prose;
4644
+ const table = markdownTable(rows);
4645
+ if (table !== null)
4646
+ return table;
4647
+ if (depth >= MARKDOWN_MAX_DEPTH) {
4648
+ return fencedBlock(JSON.stringify(rows, null, 2));
4649
+ }
4650
+ return rows.map((row, index) => [
4651
+ `${markdownHeading(depth)} ${index + 1}`,
4652
+ markdownObject(row, depth + 1)
4653
+ ].join(`
4654
+
4655
+ `)).join(`
4656
+
4657
+ `);
4658
+ }
4659
+ function markdownObject(obj, depth) {
4660
+ const scalars = [];
4661
+ const blocks = [];
4662
+ for (const [key, value] of Object.entries(obj)) {
4663
+ if (value === undefined)
4664
+ continue;
4665
+ const label = markdownLabel(key);
4666
+ if (Array.isArray(value)) {
4667
+ blocks.push(`${markdownHeading(depth)} ${label}
4668
+
4669
+ ${markdownRows(value, depth + 1)}`);
4670
+ } else if (isNonEmptyPlainObject(value)) {
4671
+ const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
4672
+ if (nested !== "") {
4673
+ blocks.push(`${markdownHeading(depth)} ${label}
4674
+
4675
+ ${nested}`);
4676
+ }
4677
+ } else if (typeof value === "string" && value.includes(`
4678
+ `)) {
4679
+ blocks.push(`**${label}:**
4680
+
4681
+ ${fencedBlock(value)}`);
4682
+ } else {
4683
+ scalars.push(`**${label}:** ${markdownCell(value)}`);
4684
+ }
4685
+ }
4686
+ const sections = scalars.length > 0 ? [scalars.join(`
4687
+ `)] : [];
4688
+ sections.push(...blocks);
4689
+ return sections.join(`
4690
+
4691
+ `);
4692
+ }
4693
+ function extractSingleMessage(payload) {
4694
+ if (!isPlainRecord(payload))
4695
+ return null;
4696
+ const keys = Object.keys(payload);
4697
+ if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
4698
+ return null;
4699
+ const value = payload[keys[0]];
4700
+ return typeof value === "string" ? value : null;
4701
+ }
4702
+ function markdownPayload(payload) {
4703
+ const message = extractSingleMessage(payload);
4704
+ if (message !== null)
4705
+ return message;
4706
+ if (Array.isArray(payload)) {
4707
+ return markdownRows(rowsWithoutPlumbing(payload), 0);
4708
+ }
4709
+ const visible = withoutPlumbing(payload);
4710
+ const paged = splitPagedEnvelope(visible);
4711
+ if (paged !== null) {
4712
+ const meta = markdownObject(paged.meta, 0);
4713
+ const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
4714
+
4715
+ ${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
4716
+ return meta === "" ? rows : `${meta}
4717
+
4718
+ ${rows}`;
4719
+ }
4720
+ return markdownObject(visible, 0);
4721
+ }
4722
+ function isPaginationWorthShowing(value) {
4723
+ if (typeof value !== "object" || value === null)
4724
+ return false;
4725
+ const page = value;
4726
+ return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
4727
+ }
4728
+ function markdownEnvelopeNotes(data) {
4729
+ const envelope = data;
4730
+ const notes = [];
4731
+ const warning = envelope.Warning;
4732
+ if (typeof warning === "string" && warning !== "") {
4733
+ notes.push(`> **Warning:** ${warning}`);
4734
+ }
4735
+ const instructions = envelope.Instructions;
4736
+ if (typeof instructions === "string" && instructions !== "") {
4737
+ notes.push(`> ${instructions}`);
4738
+ }
4739
+ const pagination = envelope.Pagination;
4740
+ if (isPaginationWorthShowing(pagination)) {
4741
+ const body = markdownObject(pagination, 1);
4742
+ if (body !== "") {
4743
+ notes.push(`${markdownHeading(0)} Pagination
4744
+
4745
+ ${body}`);
4746
+ }
4747
+ }
4748
+ const log = envelope.Log;
4749
+ if (typeof log === "string" && log !== "") {
4750
+ notes.push(`**Log:** ${log}`);
4751
+ }
4752
+ return notes;
4753
+ }
4754
+ function renderMarkdown(data) {
4755
+ if (data.Result !== RESULTS.Success) {
4756
+ const failure = data;
4757
+ const sections = [`**Failed:** ${failure.Message}`];
4758
+ if (failure.Data != null) {
4759
+ sections.push(markdownPayload(failure.Data));
4760
+ }
4761
+ if (failure.Instructions) {
4762
+ sections.push(`> ${failure.Instructions}`);
4763
+ }
4764
+ return sections.filter((section) => section !== "").join(`
4765
+
4766
+ `);
4767
+ }
4768
+ if (!("Data" in data) || data.Data == null) {
4769
+ return markdownObject(withoutPlumbing(data), 0);
4770
+ }
4771
+ return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
4772
+
4773
+ `);
4774
+ }
4529
4775
  function toYaml(data) {
4530
4776
  const codec = getYamlCodec();
4531
4777
  if (!codec) {
@@ -6249,4 +6495,4 @@ function trackShipSucceeded(payload) {
6249
6495
  var factorySlot = singleton("PackagerFactoryProvider");
6250
6496
  export { catchError, extractErrorMessage, extractErrorMessageSync, appendOption, ATTACHMENT_INSTRUCTIONS, ATTACHMENT_UPLOAD_INSTRUCTIONS, parseAttachmentSpec, resolveAttachmentInputs, logger, getOutputFormat, getOutputFormatExplicit, RESULTS, EXIT_CODES, Pagination, OutputFormatter, summarizePlatformBody, InvalidArgumentError, Command, isPreviewBuild, processContext, UIPATH_HOME_DIR, DEFAULT_PAGE_SIZE, hashContent, instructionsFor, isGuid, createHiddenDeprecatedTenantOption, parseLimit, parseOffset, parseBoundedInt, registerPackageMetadataOptions, mapPackageMetadataOptions, msToDuration, PollOutcome, ErrorDecision, MIN_INTERVAL_MS, pollUntil, isTerminalStatus, isFailureStatus, ScreenLogger, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, unsupportedSolutionProjectType, readStdin, splitPackagedName, trackShipSucceeded };
6251
6497
 
6252
- //# debugId=6A784772D19B06A064756E2164756E21
6498
+ //# debugId=D645F0A28E70B58464756E2164756E21
@@ -1,7 +1,5 @@
1
1
  import {
2
- generateNodeVariables
3
- } from "./packager-tool-jjpc0yka.js";
4
- import {
2
+ CONNECTION_BINDING_RESOURCE,
5
3
  MINIMUM_SUPPORTED_SCHEMA_VERSION,
6
4
  RESERVED_WORDS,
7
5
  VALID_IDENTIFIER_PATTERN,
@@ -10,17 +8,18 @@ import {
10
8
  executeWritePlan,
11
9
  fileFormatToInMemoryWorkflow,
12
10
  generateNextId,
11
+ generateNodeVariables,
13
12
  inMemoryWorkflowToFileFormat,
14
13
  planWriteThrough,
15
14
  resolveAndConvertWorkflow,
16
15
  workflowFileSchema,
17
16
  workflowSchema
18
- } from "./packager-tool-e8td7b01.js";
17
+ } from "./packager-tool-vcjq9xkc.js";
19
18
  import {
20
19
  __require
21
20
  } from "./packager-tool-1yh8g550.js";
22
21
 
23
- // ../../node_modules/@uipath/flow-core/dist/chunk-PYGLRILU.js
22
+ // ../../node_modules/@uipath/flow-core/dist/chunk-HPJ6Q3LW.js
24
23
  function needsBinding(manifest) {
25
24
  const model = manifest.model;
26
25
  if (!model)
@@ -49,7 +48,7 @@ function createConnectionBinding(connectionId, connectorName) {
49
48
  return createBinding({
50
49
  name: connectorName,
51
50
  value: connectorName,
52
- resource: "connection",
51
+ resource: CONNECTION_BINDING_RESOURCE,
53
52
  resourceKey: connectionId,
54
53
  propertyAttribute: "connection"
55
54
  });
@@ -381,4 +380,4 @@ function summarizeWorkflow(workflow) {
381
380
  }
382
381
  export { needsBinding, createBinding, createConnectionBinding, createFolderKeyBinding, addBindingIfMissing, createBindingsFromManifest, DEFAULT_LAYOUT_OPTIONS, resolveWidth, resolveHeight, GRID_SPACING, snapToGrid, generateNodeId, generateNodeIdAndName, validateIdentifier, generateEdgeId, createNodeFromManifest, createNode, createEdge, addDefinition, addNode, createWorkflow, addEdge, addBinding, addVariable, readWorkflow, writeWorkflow, writeWorkflowWithRefs, validateWorkflow, summarizeWorkflow };
383
382
 
384
- //# debugId=B91CF0AAF9DF6B2D64756E2164756E21
383
+ //# debugId=81D637C113B74B1B64756E2164756E21
@@ -0,0 +1,208 @@
1
+ import {
2
+ isRecord
3
+ } from "./packager-tool-gzpvdcnw.js";
4
+
5
+ // src/services/flow-eval-run-readers.ts
6
+ function asRecordArray(value, label) {
7
+ if (!Array.isArray(value)) {
8
+ throw new Error(`${label} response must be an array`);
9
+ }
10
+ return value.map((item, index) => {
11
+ if (!isRecord(item)) {
12
+ throw new Error(`${label} response item ${index} must be an object`);
13
+ }
14
+ return item;
15
+ });
16
+ }
17
+ function readRecord(value) {
18
+ return isRecord(value) ? value : undefined;
19
+ }
20
+ function readRecordArray(value) {
21
+ if (!Array.isArray(value)) {
22
+ return;
23
+ }
24
+ return value.filter(isRecord);
25
+ }
26
+ function optionalNumber(value) {
27
+ return typeof value === "number" ? value : null;
28
+ }
29
+ function optionalString(value) {
30
+ return typeof value === "string" ? value : "";
31
+ }
32
+ function statusString(value) {
33
+ if (typeof value === "string") {
34
+ return value;
35
+ }
36
+ if (typeof value === "number") {
37
+ const statusByCode = {
38
+ 0: "Pending",
39
+ 1: "Running",
40
+ 2: "Completed",
41
+ 3: "PartiallyCompleted",
42
+ 4: "Failed"
43
+ };
44
+ return statusByCode[value] ?? String(value);
45
+ }
46
+ return "";
47
+ }
48
+ function readEvaluatorScores(value) {
49
+ const records = readRecordArray(value);
50
+ if (!records) {
51
+ return null;
52
+ }
53
+ return records.flatMap((score) => {
54
+ const evaluatorId = score.evaluatorId;
55
+ const scoreValue = score.value;
56
+ if (typeof evaluatorId !== "string" || typeof scoreValue !== "number") {
57
+ return [];
58
+ }
59
+ return [{ evaluatorId, value: scoreValue }];
60
+ });
61
+ }
62
+ function readRemoteEvalSetRun(record) {
63
+ return {
64
+ id: optionalString(record.id),
65
+ workloadId: optionalString(record.workloadId),
66
+ evalSetId: typeof record.evalSetId === "string" ? record.evalSetId : null,
67
+ status: statusString(record.status),
68
+ score: optionalNumber(record.score),
69
+ evaluatorScores: readEvaluatorScores(record.evaluatorScores),
70
+ config: readRecord(record.config) ?? {},
71
+ numberOfEvalsExecuted: optionalNumber(record.numberOfEvalsExecuted),
72
+ durationMilliseconds: optionalNumber(record.durationMilliseconds),
73
+ createdAt: optionalString(record.createdAt),
74
+ updatedAt: optionalString(record.updatedAt)
75
+ };
76
+ }
77
+ function readRemoteEvalRun(record) {
78
+ const snapshot = readRecord(record.evalSnapshot);
79
+ const result = readRecord(record.result);
80
+ return {
81
+ id: optionalString(record.id),
82
+ evalSetRunId: optionalString(record.evalSetRunId),
83
+ evalSnapshot: snapshot ? {
84
+ id: typeof snapshot.id === "string" ? snapshot.id : undefined,
85
+ name: typeof snapshot.name === "string" ? snapshot.name : undefined,
86
+ inputs: readRecord(snapshot.inputs),
87
+ evaluationCriterias: readRecord(snapshot.evaluationCriterias),
88
+ expectedOutput: readRecord(snapshot.expectedOutput) ?? (snapshot.expectedOutput === null ? null : undefined)
89
+ } : undefined,
90
+ status: statusString(record.status),
91
+ result: result ? {
92
+ output: readRecord(result.output),
93
+ scores: readEvaluatorScores(result.scores) ?? undefined,
94
+ score: readRecord(result.score)
95
+ } : null,
96
+ completionMetrics: readRecord(record.completionMetrics),
97
+ evaluatorRuns: readRecordArray(record.evaluatorRuns)?.flatMap((evaluatorRun) => {
98
+ const evaluatorId = evaluatorRun.evaluatorId;
99
+ if (typeof evaluatorId !== "string") {
100
+ return [];
101
+ }
102
+ const evaluatorResult = readRecord(evaluatorRun.result);
103
+ return [
104
+ {
105
+ evaluatorId,
106
+ evaluatorSnapshot: evaluatorRun.evaluatorSnapshot,
107
+ status: typeof evaluatorRun.status === "string" ? evaluatorRun.status : undefined,
108
+ result: evaluatorResult ? {
109
+ output: readRecord(evaluatorResult.output),
110
+ score: readRecord(evaluatorResult.score)
111
+ } : null,
112
+ completionMetrics: readRecord(evaluatorRun.completionMetrics)
113
+ }
114
+ ];
115
+ }),
116
+ error: typeof record.error === "string" || isRecord(record.error) ? record.error : null,
117
+ errorMessage: typeof record.errorMessage === "string" ? record.errorMessage : null,
118
+ createdAt: typeof record.createdAt === "string" ? record.createdAt : undefined,
119
+ updatedAt: typeof record.updatedAt === "string" ? record.updatedAt : undefined
120
+ };
121
+ }
122
+
123
+ // src/services/flow-eval-run-api.ts
124
+ var METADATA_FETCH_TIMEOUT_MS = 30000;
125
+ var MAX_ERROR_BODY_LENGTH = 400;
126
+
127
+ class FlowEvalRunApi {
128
+ async executeAndEvaluate(config, payload) {
129
+ return this.requestJson(config, "/unifiedEvals/workloads/executeAndEvaluate", {
130
+ method: "POST",
131
+ body: JSON.stringify(payload)
132
+ });
133
+ }
134
+ async listEvalSetRuns(config, workloadId) {
135
+ const response = await this.requestJson(config, `/unifiedEvals/workloads/${encodeURIComponent(workloadId)}/evalSetRuns?workloadType=Flow`, { method: "GET" });
136
+ return asRecordArray(response, "Eval set runs").map(readRemoteEvalSetRun);
137
+ }
138
+ async getEvalSetRun(config, workloadId, evalSetRunId) {
139
+ const response = await this.requestJson(config, `/unifiedEvals/workloads/${encodeURIComponent(workloadId)}/evalSetRuns/${encodeURIComponent(evalSetRunId)}?workloadType=Flow`, { method: "GET" });
140
+ if (!isRecord(response)) {
141
+ throw new Error("Eval set run response must be an object");
142
+ }
143
+ return readRemoteEvalSetRun(response);
144
+ }
145
+ async getEvalRuns(config, workloadId, evalSetRunId) {
146
+ const response = await this.requestJson(config, `/unifiedEvals/workloads/${encodeURIComponent(workloadId)}/evalSetRuns/${encodeURIComponent(evalSetRunId)}/evalRuns?workloadType=Flow`, { method: "GET" });
147
+ return asRecordArray(response, "Eval runs").map(readRemoteEvalRun);
148
+ }
149
+ async getSimulatableComponents(config, processKey, processVersion) {
150
+ const params = new URLSearchParams({ workloadType: "Agents" });
151
+ if (processVersion) {
152
+ params.set("processVersion", processVersion);
153
+ }
154
+ const data = await this.requestJson(config, `/unifiedEvals/processes/${encodeURIComponent(processKey)}/simulatableComponents?${params.toString()}`, { method: "GET" }, METADATA_FETCH_TIMEOUT_MS);
155
+ const components = Array.isArray(data.components) ? data.components : [];
156
+ return components.filter((c) => isRecord(c) && typeof c.id === "string" && typeof c.name === "string" && c.isEnabled === true);
157
+ }
158
+ apiBase(config) {
159
+ return `${config.baseUrl}/${config.organizationId}/${config.tenantName}/agentsruntime_/api`;
160
+ }
161
+ headers(config) {
162
+ return {
163
+ Authorization: `Bearer ${config.authToken}`,
164
+ Accept: "application/json",
165
+ "Content-Type": "application/json",
166
+ "X-UiPath-Internal-TenantId": config.tenantId,
167
+ "X-UiPath-Internal-AccountId": config.organizationId
168
+ };
169
+ }
170
+ async requestJson(config, path, request, timeoutMs) {
171
+ let response;
172
+ let text;
173
+ try {
174
+ response = await fetch(`${this.apiBase(config)}${path}`, {
175
+ method: request.method,
176
+ headers: {
177
+ ...this.headers(config),
178
+ ...request.headers
179
+ },
180
+ body: request.body,
181
+ ...timeoutMs !== undefined ? { signal: AbortSignal.timeout(timeoutMs) } : {}
182
+ });
183
+ text = await response.text();
184
+ } catch (err) {
185
+ if (err instanceof DOMException && err.name === "TimeoutError") {
186
+ throw new Error(`Unified eval API request timed out after ${timeoutMs}ms (${request.method} ${path})`);
187
+ }
188
+ throw new Error(`Unified eval API request failed (${request.method} ${path}): ${err instanceof Error ? err.message : String(err)}`);
189
+ }
190
+ if (!response.ok) {
191
+ const body = text.length > MAX_ERROR_BODY_LENGTH ? `${text.slice(0, MAX_ERROR_BODY_LENGTH)}… (truncated)` : text;
192
+ throw new Error(`Unified eval API returned ${response.status}: ${body}`);
193
+ }
194
+ if (!text) {
195
+ throw new Error(`Unified eval API returned ${response.status} with empty body`);
196
+ }
197
+ try {
198
+ return JSON.parse(text);
199
+ } catch {
200
+ const preview = text.length > MAX_ERROR_BODY_LENGTH ? `${text.slice(0, MAX_ERROR_BODY_LENGTH)}… (truncated)` : text;
201
+ throw new Error(`Unified eval API returned ${response.status} with non-JSON body (${request.method} ${path}): ${preview}`);
202
+ }
203
+ }
204
+ }
205
+
206
+ export { FlowEvalRunApi };
207
+
208
+ //# debugId=C7F594BDAF89F66264756E2164756E21