@uipath/flow-tool 1.201.0 → 1.202.0-preview.136

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 (234) hide show
  1. package/dist/{authoring-7r6g06c7.js → authoring-wpa6d0vf.js} +74 -48
  2. package/dist/binding-service-dh91hw9e.js +141 -0
  3. package/dist/{browser-strategy-rkcvc6tn.js → browser-strategy-6atc7v8s.js} +3 -3
  4. package/dist/connector-service-d9ph9kx1.js +948 -0
  5. package/dist/{conversion-H2VEEYLB-ng48mbf7.js → conversion-QANACVCM-zs0hhfjv.js} +39 -33
  6. package/dist/{de-5KVP66U6-f7knj511.js → de-5KVP66U6-1bnf4zt5.js} +52 -52
  7. package/dist/de-6U7ECGHH-xwsw33fk.js +35 -0
  8. package/dist/{de-5HU6GFWV-4EZK6G7N-yrh21f52.js → de-7XQXX2DK-IDWR6CAR-n4z245kt.js} +857 -845
  9. package/dist/{de-5HU6GFWV-zheyw6d2.js → de-7XQXX2DK-tqdy5n2b.js} +857 -845
  10. package/dist/{de-HKTOVV4H-d5yw5j21.js → de-HKTOVV4H-pe9w0xn8.js} +46 -46
  11. package/dist/{de-XLT4QPIP-0rtw349w.js → de-XLT4QPIP-kj81dxjc.js} +9 -9
  12. package/dist/debug-conversation-trigger-452frzyz.js +41 -0
  13. package/dist/debug-http-client-wd6xb8v4.js +31 -0
  14. package/dist/debug-service-fvyexnb1.js +58 -0
  15. package/dist/edge-service-e77bndbe.js +162 -0
  16. package/dist/{elk.bundled-pydbzeez.js → elk.bundled-vpsbxz0p.js} +3 -3
  17. package/dist/{en-MABQK6C4-REWE2WG2-8dp4cqdg.js → en-5ZGC5VQ3-EWX7ILY7-rmtj70fk.js} +898 -898
  18. package/dist/{en-MABQK6C4-nkzq2j8t.js → en-5ZGC5VQ3-h581y30k.js} +897 -897
  19. package/dist/en-EPWMLP2N-2wvge238.js +28 -0
  20. package/dist/{en-UNT7BE26-rhh65jry.js → en-LQHKFSEY-vvbe8ve9.js} +13 -11
  21. package/dist/{en-P4AS26D7-szrzfxz1.js → en-P4AS26D7-zptp77bm.js} +45 -45
  22. package/dist/{en-4KXU7N7B-66fntxa2.js → en-X3S6IZ5J-nhkg6pwn.js} +54 -60
  23. package/dist/{es-MX-H2EAXLYI-qwnqt48x.js → es-MX-H2EAXLYI-j42kfkxy.js} +46 -46
  24. package/dist/es-MX-NHTIP5YM-ar6zfx95.js +35 -0
  25. package/dist/{es-MX-OKNDG2NH-c1k1s1tg.js → es-MX-OKNDG2NH-tcac6j4g.js} +9 -9
  26. package/dist/{es-MX-POESXYP2-UW6VP5QI-cd3a79g9.js → es-MX-U2VN3SZW-KYAJ2ONK-kdram1g1.js} +857 -845
  27. package/dist/{es-MX-POESXYP2-9538722k.js → es-MX-U2VN3SZW-anynsmd8.js} +857 -845
  28. package/dist/{es-MX-XAVLOQW3-9b3cp9n8.js → es-MX-XAVLOQW3-q00km2y7.js} +52 -52
  29. package/dist/{es-NQICVYSQ-aa9z3nhs.js → es-NQICVYSQ-3dtqgget.js} +9 -9
  30. package/dist/{es-O4PAV2CR-jwfaawwk.js → es-O4PAV2CR-0g23ve3v.js} +46 -46
  31. package/dist/es-PQ3RA33Q-y4kxhjfr.js +35 -0
  32. package/dist/{es-VFPNVMP5-thm0z9sr.js → es-VFPNVMP5-bx2c337j.js} +52 -52
  33. package/dist/{es-LUTYN7U7-IY5QWOUF-k2aefzc0.js → es-ZGCPPOME-24PJEGPV-rn86z9kn.js} +857 -845
  34. package/dist/{es-LUTYN7U7-ye5zn4sn.js → es-ZGCPPOME-8gazspjj.js} +857 -845
  35. package/dist/flow-api-wv8p8xbd.js +36 -0
  36. package/dist/flow-debug-service-tfbefas6.js +741 -0
  37. package/dist/flow-eval-node-target-c6wea7rz.js +44 -0
  38. package/dist/flow-eval-run-service-01kdky72.js +961 -0
  39. package/dist/flow-eval-service-ft8e16jz.js +1338 -0
  40. package/dist/flow-init-service-mva4crty.js +35 -0
  41. package/dist/flow-io-r318sjrw.js +36 -0
  42. package/dist/flow-migrate-service-rwcdx60q.js +119 -0
  43. package/dist/flow-pack-service-p4hxyj9e.js +280 -0
  44. package/dist/flow-validate-service-j25pxpwz.js +57 -0
  45. package/dist/{fr-5YRGHXF5-q6b63yg0.js → fr-5YRGHXF5-kz1ywpv6.js} +46 -46
  46. package/dist/{fr-E5MDO4EG-exvrs7ge.js → fr-E5MDO4EG-c3mkty2t.js} +52 -52
  47. package/dist/{fr-PFHIL7YZ-cxnshwa8.js → fr-PFHIL7YZ-2n589p47.js} +9 -9
  48. package/dist/fr-R4L3OAWI-30khpsmn.js +35 -0
  49. package/dist/{fr-LJIK56LW-STG6QR3T-cextvv8q.js → fr-T3G5GZCT-TU4IKBEG-k6xz1s1f.js} +857 -845
  50. package/dist/{fr-LJIK56LW-xf3xf2kh.js → fr-T3G5GZCT-y3f7xb1q.js} +857 -845
  51. package/dist/governance-fetcher-j9cx4f1d.js +391 -0
  52. package/dist/headless-h1myzz32.js +177196 -0
  53. package/dist/hitl-service-kvt5wms4.js +256 -0
  54. package/dist/index-1kgxzh8x.js +143 -0
  55. package/dist/index-4zrwgb3c.js +111 -0
  56. package/dist/index-ev4mdg5y.js +4801 -0
  57. package/dist/{index-er6vy3jk.js → index-eybzsdcc.js} +295 -317
  58. package/dist/{index-hsadteg4.js → index-h8cph72k.js} +4 -4
  59. package/dist/{index-p50kx6jv.js → index-k5tbd184.js} +276 -276
  60. package/dist/index-n33np76r.js +630 -0
  61. package/dist/{index-9f8q2ege.js → index-p3vk57z7.js} +27 -27
  62. package/dist/{index-dhcd9b82.js → index-w0z4s69j.js} +166 -81
  63. package/dist/index.js +29 -32
  64. package/dist/{index.umd.min-drpc57vn.js → index.umd.min-fqefd9kn.js} +3 -3
  65. package/dist/init.js +24 -25
  66. package/dist/input-reader-6pwhtp8v.js +11 -0
  67. package/dist/{ja-FGEGLBJ3-w9byjhze.js → ja-BI5K3JDZ-77zat4z2.js} +857 -845
  68. package/dist/{ja-FGEGLBJ3-MG3BSWXD-vq19zt2p.js → ja-BI5K3JDZ-GTIHISTZ-s6n3r2ab.js} +857 -845
  69. package/dist/{ja-DPO5PPLO-s2a7j3nj.js → ja-DPO5PPLO-mysfmznx.js} +52 -52
  70. package/dist/{ja-P4OSE367-8ywxep9a.js → ja-P4OSE367-srr3qypg.js} +9 -9
  71. package/dist/{ja-SDAPAVCR-943p5gx7.js → ja-SDAPAVCR-kg39dfap.js} +46 -46
  72. package/dist/ja-ZHKCBE5W-x73w6x3e.js +35 -0
  73. package/dist/{js-yaml-cggj6w7q.js → js-yaml-87cdx6bm.js} +27 -19
  74. package/dist/known-types-a20evmmg.js +20 -0
  75. package/dist/ko-6W7OGLLB-mnmqc584.js +35 -0
  76. package/dist/{ko-ITOPNIYI-qz39kamf.js → ko-ITOPNIYI-hmxd2asd.js} +52 -52
  77. package/dist/{ko-TUAK3G3A-s25w0ckg.js → ko-JOBF5V7N-4bv0mjje.js} +857 -845
  78. package/dist/{ko-TUAK3G3A-TBEBKOTM-ns78t2rv.js → ko-JOBF5V7N-O7T4HKIE-ape840y0.js} +857 -845
  79. package/dist/{ko-NAGOZLC3-wb3y9yhh.js → ko-NAGOZLC3-gaxxsnd2.js} +46 -46
  80. package/dist/{ko-PYOS2KJP-5sbj5bp8.js → ko-PYOS2KJP-e7dshyxy.js} +9 -9
  81. package/dist/localization-h8a53z6p.js +47 -0
  82. package/dist/{node-gd4469ea.js → node-cnrcrrb0.js} +7973 -7166
  83. package/dist/node-service-8g5x5d2y.js +70 -0
  84. package/dist/{node-strategy-8gzp67xs.js → node-strategy-gc4sg6a2.js} +132 -16
  85. package/dist/node-sync-service-e2reh33c.js +42 -0
  86. package/dist/{packager-tool-9qecd4wb.js → packager-tool-0gctz400.js} +5 -2
  87. package/dist/{packager-tool-1cb0d5e0.js → packager-tool-0v3s8r01.js} +2 -2
  88. package/dist/{packager-tool-wckvcay0.js → packager-tool-1yh8g550.js} +9 -7
  89. package/dist/packager-tool-27avrkyk.js +15 -0
  90. package/dist/packager-tool-2wefykg9.js +106 -0
  91. package/dist/packager-tool-4fhgws0x.js +757 -0
  92. package/dist/{packager-tool-7yjpwj92.js → packager-tool-4hx14snw.js} +49 -48
  93. package/dist/{packager-tool-3wygxefb.js → packager-tool-58q3tvh7.js} +10 -10
  94. package/dist/{packager-tool-cvwr40ax.js → packager-tool-5qaxht3k.js} +1425 -550
  95. package/dist/packager-tool-5z1eg3ea.js +33289 -0
  96. package/dist/{packager-tool-17cn3xb7.js → packager-tool-6m078z5s.js} +13388 -19366
  97. package/dist/packager-tool-7b6tpg7y.js +77 -0
  98. package/dist/packager-tool-7exrv6w7.js +23 -0
  99. package/dist/packager-tool-8dszjcg5.js +4892 -0
  100. package/dist/packager-tool-8j92afwp.js +58 -0
  101. package/dist/packager-tool-94w17vf8.js +85 -0
  102. package/dist/{packager-tool-vdd02vns.js → packager-tool-9bec251q.js} +543 -1493
  103. package/dist/packager-tool-a1hbfmws.js +399 -0
  104. package/dist/{packager-tool-tq9q9m77.js → packager-tool-a42jnpy5.js} +3 -9
  105. package/dist/packager-tool-abbtfk2v.js +54 -0
  106. package/dist/packager-tool-cdwpc9fh.js +4945 -0
  107. package/dist/packager-tool-e0p2zsyc.js +97 -0
  108. package/dist/packager-tool-eebq62fq.js +540 -0
  109. package/dist/{packager-tool-m6x5sczh.js → packager-tool-em5r6g6j.js} +14 -21
  110. package/dist/packager-tool-eypvc2kv.js +23 -0
  111. package/dist/packager-tool-f0kd5kq4.js +2327 -0
  112. package/dist/packager-tool-fjaa8d3v.js +289 -0
  113. package/dist/packager-tool-g0eha8ge.js +121 -0
  114. package/dist/packager-tool-g9y14b10.js +54 -0
  115. package/dist/packager-tool-gbgfwx8f.js +2 -0
  116. package/dist/packager-tool-jc34wvrw.js +64 -0
  117. package/dist/packager-tool-k99nf3pq.js +25 -0
  118. package/dist/{packager-tool-hr0xg6q8.js → packager-tool-kn91khp6.js} +17 -13
  119. package/dist/{packager-tool-jysvpt8p.js → packager-tool-m3wkcxf5.js} +2 -2
  120. package/dist/{packager-tool-78a3szsp.js → packager-tool-m5qfverj.js} +1720 -2014
  121. package/dist/packager-tool-mwvbq6ef.js +79 -0
  122. package/dist/packager-tool-nq4rcqqg.js +87 -0
  123. package/dist/packager-tool-nxx8naxv.js +4234 -0
  124. package/dist/{packager-tool-3y0k15sv.js → packager-tool-p9stswjj.js} +2858 -19342
  125. package/dist/packager-tool-r0xpcqwg.js +188 -0
  126. package/dist/packager-tool-raq2wbwp.js +18 -0
  127. package/dist/{packager-tool-y3dezh8k.js → packager-tool-rs6jm14d.js} +6 -4
  128. package/dist/packager-tool-s9ff3kk4.js +6 -0
  129. package/dist/{packager-tool-pbsghbmj.js → packager-tool-sykgshez.js} +2 -2
  130. package/dist/packager-tool-tf3d2y8z.js +31 -0
  131. package/dist/packager-tool-tn5e7wnb.js +384 -0
  132. package/dist/packager-tool-v2rkcehq.js +457 -0
  133. package/dist/packager-tool-v86fdwvs.js +262 -0
  134. package/dist/packager-tool-v9psxdy5.js +8185 -0
  135. package/dist/packager-tool-v9rrz038.js +602 -0
  136. package/dist/packager-tool-vpqyvh4c.js +304 -0
  137. package/dist/packager-tool-wcha0e5r.js +443 -0
  138. package/dist/{packager-tool-1gt6js73.js → packager-tool-xhzfwa5p.js} +6 -4
  139. package/dist/{packager-tool-5arsyj36.js → packager-tool-yc4kw997.js} +4 -2
  140. package/dist/{packager-tool-pkq70dec.js → packager-tool-ywqc9rtf.js} +31 -3
  141. package/dist/{packager-tool-0567pxpm.js → packager-tool-z9bfhmm5.js} +10 -10
  142. package/dist/{packager-tool-gmrwvnyh.js → packager-tool-zfrp8ecz.js} +8 -58
  143. package/dist/{packager-tool-3vdpx9ng.js → packager-tool-zke08y39.js} +1121 -1846
  144. package/dist/packager-tool.js +17 -17
  145. package/dist/{pt-7TR74ZMB-1g8my56g.js → pt-7TR74ZMB-bmphh4x2.js} +46 -46
  146. package/dist/{pt-BR-7XGDXRDJ-TR5D7JYL-533wvy7p.js → pt-BR-7DYX2YPT-LZYH4YFD-bx43vx3z.js} +857 -845
  147. package/dist/{pt-BR-7XGDXRDJ-espnkgrj.js → pt-BR-7DYX2YPT-fqxqzqtf.js} +857 -845
  148. package/dist/{pt-BR-BXURWX4W-dqr4dnf9.js → pt-BR-BXURWX4W-bwfcwhk1.js} +52 -52
  149. package/dist/{pt-BR-DXXSYJDO-bn84ewp7.js → pt-BR-DXXSYJDO-a2tp13v7.js} +46 -46
  150. package/dist/pt-BR-UQCYHKMJ-q78n7q70.js +35 -0
  151. package/dist/{pt-BR-Z3TUDJHM-n7ngej6s.js → pt-BR-Z3TUDJHM-8v73x9s7.js} +9 -9
  152. package/dist/pt-D6A6MVB2-yvxca8vz.js +35 -0
  153. package/dist/{pt-TMVOOITK-myha14p9.js → pt-HTXGGX6Y-97t21dty.js} +857 -845
  154. package/dist/{pt-TMVOOITK-H2ADYHSD-ezpggv33.js → pt-HTXGGX6Y-ZHQSDFKI-vehfxadc.js} +857 -845
  155. package/dist/{pt-KSBWHAVQ-hd52bpsz.js → pt-KSBWHAVQ-mhvhgr2p.js} +9 -9
  156. package/dist/{pt-YI4VE4YQ-v7gjeg82.js → pt-YI4VE4YQ-wdkn2dcf.js} +52 -52
  157. package/dist/ro-4TMBHS5M-jz0anpt6.js +35 -0
  158. package/dist/{ro-BJFER5OI-334n28rj.js → ro-BJFER5OI-83tq8vxh.js} +46 -46
  159. package/dist/{ro-2VALF3S5-NXBJUEZN-nqw1zs33.js → ro-KTNQ3MNU-XIE6YPQN-gen8p82z.js} +857 -845
  160. package/dist/{ro-2VALF3S5-cdz5afkr.js → ro-KTNQ3MNU-y08n1x5g.js} +857 -845
  161. package/dist/{ro-RKXZUG7Z-cm3xn3fj.js → ro-RKXZUG7Z-nndrrsq7.js} +52 -52
  162. package/dist/{ro-VZUZTAMR-tccygznf.js → ro-VZUZTAMR-f4q0g3em.js} +9 -9
  163. package/dist/{ru-GSCT4ARZ-qj8dm4dp.js → ru-GSCT4ARZ-1sa9wbr8.js} +1 -1
  164. package/dist/{ru-GSCT4ARZ-FTVCGQTL-5nh4jf2e.js → ru-GSCT4ARZ-FTVCGQTL-gee86v14.js} +1 -1
  165. package/dist/{ru-T73OPRTC-mp5gn7gs.js → ru-T73OPRTC-4knxw497.js} +1 -1
  166. package/dist/{ru-WBLQ5B2U-awt245ky.js → ru-WBLQ5B2U-8r3c7v6d.js} +1 -1
  167. package/dist/ru-WBLQ5B2U-kdey8qa4.js +10 -0
  168. package/dist/{ru-WBLQ5B2U-57ezmxzz.js → ru-WBLQ5B2U-wemdzdqd.js} +1 -1
  169. package/dist/{serialization-GAW7UFOK-9hkdmmd2.js → serialization-J5QK3HPY-bgewpt6f.js} +158 -152
  170. package/dist/services/expression-validator.d.ts +28 -0
  171. package/dist/services/flow-eval-schema/types.d.ts +17 -0
  172. package/dist/services/flow-validate-service.d.ts +26 -0
  173. package/dist/services/node-validators/js-expression-syntax-validator.d.ts +6 -3
  174. package/dist/services/tidy-service.d.ts +26 -0
  175. package/dist/services/vars-reference-rule.d.ts +156 -0
  176. package/dist/shared-utils-8xdq6f04.js +20 -0
  177. package/dist/tidy-service-ashgyfwj.js +34 -0
  178. package/dist/tool.js +30 -33
  179. package/dist/{tr-AA6O2WSR-ga1xnymp.js → tr-AA6O2WSR-86ba4bdf.js} +52 -52
  180. package/dist/tr-GSQQ6SOT-hv1gyeaa.js +35 -0
  181. package/dist/{tr-RQTZ2DMS-bpgd4kma.js → tr-RQTZ2DMS-w3cwv8s4.js} +46 -46
  182. package/dist/{tr-W4AVRSQ4-bt3qqqdy.js → tr-W4AVRSQ4-hjr81xzk.js} +9 -9
  183. package/dist/{tr-RIFCEXFH-BZS7S7QK-q465b62g.js → tr-XHSSPNK7-GW5KVXR3-2w3f1ss6.js} +857 -845
  184. package/dist/{tr-RIFCEXFH-hgkb4g8y.js → tr-XHSSPNK7-cmqyc4wd.js} +857 -845
  185. package/dist/utils/handle-expansion.d.ts +16 -0
  186. package/dist/validation.js +47 -27
  187. package/dist/variable-service-er7ph4br.js +152 -0
  188. package/dist/wait-for-flow-job-45p1a444.js +134 -0
  189. package/dist/{zh-CN-IP3FMXWM-H3JI2XUM-ta4yac7h.js → zh-CN-2EHQT23P-T5XRQCVS-ac17dpc1.js} +857 -845
  190. package/dist/{zh-CN-IP3FMXWM-1cfarhcp.js → zh-CN-2EHQT23P-mr63c4xz.js} +857 -845
  191. package/dist/{zh-CN-6YRAN57T-j7jp34ws.js → zh-CN-6YRAN57T-rd7x2tqs.js} +9 -9
  192. package/dist/zh-CN-EDFRBU32-vvj7tmaq.js +35 -0
  193. package/dist/{zh-CN-R2KLHXQV-wttmznep.js → zh-CN-R2KLHXQV-agqr45ds.js} +52 -52
  194. package/dist/{zh-CN-ZC6LT4IN-vty9mvv8.js → zh-CN-ZC6LT4IN-kbzvvzz5.js} +46 -46
  195. package/dist/zh-TW-HAICM6DE-rh7k3cq7.js +35 -0
  196. package/dist/{zh-TW-AGIDXIPF-R4XZRDJZ-cgxxz5k4.js → zh-TW-MGZCE5BT-P6FLIUAR-zmq07vhs.js} +857 -845
  197. package/dist/{zh-TW-AGIDXIPF-n6r6w7vy.js → zh-TW-MGZCE5BT-c4ekmrz9.js} +857 -845
  198. package/dist/{zh-TW-R7Y5KVMU-q81f4z2p.js → zh-TW-R7Y5KVMU-m61y07e3.js} +46 -46
  199. package/dist/{zh-TW-RJGCQANM-gqn0aca0.js → zh-TW-RJGCQANM-w0x3qc1p.js} +52 -52
  200. package/dist/{zh-TW-SO2245GN-m5kh88bg.js → zh-TW-SO2245GN-n2bn1gg4.js} +9 -9
  201. package/package.json +2 -2
  202. package/dist/de-5KVP66U6-t37qr521.js +0 -161
  203. package/dist/de-WMKOGI7B-6dc1zdnp.js +0 -143
  204. package/dist/en-4KXU7N7B-24v330b5.js +0 -118
  205. package/dist/en-X4DLPKLJ-1h9gj5c1.js +0 -110
  206. package/dist/es-BVPGJUWA-0k59eqfv.js +0 -143
  207. package/dist/es-MX-U6YL5KQX-k4qvpgd4.js +0 -143
  208. package/dist/es-MX-XAVLOQW3-47a405kf.js +0 -161
  209. package/dist/es-VFPNVMP5-6sftsdxe.js +0 -161
  210. package/dist/fr-E5MDO4EG-f3x1jeqw.js +0 -161
  211. package/dist/fr-EKTTDR7Z-m2t68j0m.js +0 -143
  212. package/dist/ja-DPO5PPLO-fmbg7zt2.js +0 -161
  213. package/dist/ja-Y2YBTXNN-5sszk2zv.js +0 -143
  214. package/dist/ko-ITOPNIYI-aqy82jk8.js +0 -161
  215. package/dist/ko-S33XAV26-rfsv9myd.js +0 -143
  216. package/dist/packager-tool-0sz8se22.js +0 -10671
  217. package/dist/packager-tool-8mqydhz8.js +0 -9850
  218. package/dist/packager-tool-p9j43p8h.js +0 -115
  219. package/dist/packager-tool-v74yk918.js +0 -107
  220. package/dist/packager-tool-xj0agqpk.js +0 -11
  221. package/dist/pt-BR-BXURWX4W-xzyndmrx.js +0 -161
  222. package/dist/pt-BR-JO45SCNI-mt93s33c.js +0 -143
  223. package/dist/pt-W3NA4LIZ-fwd1q4j0.js +0 -143
  224. package/dist/pt-YI4VE4YQ-521681zf.js +0 -161
  225. package/dist/ro-RKXZUG7Z-pdztdafr.js +0 -161
  226. package/dist/ro-WLKX6HF5-b9tj8q67.js +0 -143
  227. package/dist/ru-WBLQ5B2U-8xd4gpv2.js +0 -10
  228. package/dist/ru-WBLQ5B2U-mswqs9wc.js +0 -10
  229. package/dist/tr-3U2W2XCA-43ptfc0m.js +0 -143
  230. package/dist/tr-AA6O2WSR-bj9n80k8.js +0 -161
  231. package/dist/zh-CN-IPZYQR3P-egjmvyjf.js +0 -143
  232. package/dist/zh-CN-R2KLHXQV-x6gnk2n0.js +0 -161
  233. package/dist/zh-TW-RJGCQANM-tt8j5wv2.js +0 -161
  234. package/dist/zh-TW-YPVSQVGT-b378ztph.js +0 -143
@@ -0,0 +1,188 @@
1
+ import {
2
+ getEvaluatorRef,
3
+ isRecord,
4
+ stripJsonExt
5
+ } from "./packager-tool-8j92afwp.js";
6
+ import {
7
+ ensureDirectory
8
+ } from "./packager-tool-jc34wvrw.js";
9
+ import {
10
+ readUipxFile
11
+ } from "./packager-tool-eebq62fq.js";
12
+ import {
13
+ catchError
14
+ } from "./packager-tool-5qaxht3k.js";
15
+
16
+ // src/services/flow-eval-paths.ts
17
+ function readWorkflowId(flowContent) {
18
+ const [parseError, parsed] = catchError(() => JSON.parse(flowContent));
19
+ if (parseError) {
20
+ return;
21
+ }
22
+ if (!isRecord(parsed) || typeof parsed.id !== "string") {
23
+ return;
24
+ }
25
+ if (parsed.id === "" || parsed.id.includes("/") || parsed.id.includes("\\") || parsed.id.includes("..")) {
26
+ return;
27
+ }
28
+ return parsed.id;
29
+ }
30
+
31
+ class FlowEvalPathResolver {
32
+ fs;
33
+ constructor(fs) {
34
+ this.fs = fs;
35
+ }
36
+ async resolveEvalRoot(projectPath, create) {
37
+ const absoluteProjectPath = await this.resolveFlowProjectPath(projectPath);
38
+ const scopedRoot = await this.resolveWorkflowScopedEvalRoot(absoluteProjectPath);
39
+ const candidates = [
40
+ ...scopedRoot ? [scopedRoot] : [],
41
+ this.fs.path.join(absoluteProjectPath, "evals", "default"),
42
+ this.fs.path.join(absoluteProjectPath, "evals")
43
+ ];
44
+ for (const candidate of candidates) {
45
+ const evalSets = this.fs.path.join(candidate, "eval-sets");
46
+ const evaluators = this.fs.path.join(candidate, "evaluators");
47
+ if (await this.fs.exists(evalSets) || await this.fs.exists(evaluators)) {
48
+ return candidate;
49
+ }
50
+ }
51
+ if (!create) {
52
+ return null;
53
+ }
54
+ const root = scopedRoot ?? this.fs.path.join(absoluteProjectPath, "evals", "default");
55
+ await ensureDirectory(this.fs, this.fs.path.join(root, "eval-sets"));
56
+ await ensureDirectory(this.fs, this.fs.path.join(root, "evaluators"));
57
+ return root;
58
+ }
59
+ async resolveFlowProjectPath(projectPath) {
60
+ const absolutePath = this.fs.path.resolve(projectPath);
61
+ if (!await this.fs.exists(absolutePath)) {
62
+ throw new Error(`Path ${absolutePath} does not exist. Provide --path pointing to a Flow project directory or solution directory.`);
63
+ }
64
+ const [statError, stat] = await catchError(this.fs.stat(absolutePath));
65
+ if (statError || !stat?.isDirectory()) {
66
+ throw new Error(`Path ${absolutePath} is not a directory. Provide --path pointing to a Flow project directory or solution directory.`);
67
+ }
68
+ const [flowFileError] = await catchError(this.findFlowFile(absolutePath));
69
+ if (!flowFileError) {
70
+ return absolutePath;
71
+ }
72
+ const [uipxError, uipxResult] = await catchError(readUipxFile(this.fs, absolutePath));
73
+ if (uipxError || !uipxResult) {
74
+ return absolutePath;
75
+ }
76
+ const flowProjects = uipxResult.uipx.Projects.filter((project) => project.Type === "Flow");
77
+ if (flowProjects.length === 0) {
78
+ throw new Error(`No Flow project found in solution directory ${absolutePath}. Provide --path pointing to a Flow project directory.`);
79
+ }
80
+ const flowProjectPaths = flowProjects.map((project) => this.fs.path.join(absolutePath, this.fs.path.dirname(project.ProjectRelativePath)));
81
+ if (flowProjects.length > 1) {
82
+ throw new Error(`Multiple Flow projects found in solution directory ${absolutePath}. Provide --path pointing to one of: ${flowProjectPaths.join(", ")}`);
83
+ }
84
+ return flowProjectPaths[0];
85
+ }
86
+ async resolveWorkflowScopedEvalRoot(projectPath) {
87
+ const [flowFileError, flowFilePath] = await catchError(this.findFlowFile(projectPath));
88
+ if (flowFileError) {
89
+ return;
90
+ }
91
+ const [readError, flowContent] = await catchError(this.fs.readFile(flowFilePath, "utf-8"));
92
+ if (readError) {
93
+ return;
94
+ }
95
+ const workflowId = readWorkflowId(String(flowContent));
96
+ return workflowId ? this.fs.path.join(projectPath, "evals", workflowId) : undefined;
97
+ }
98
+ async findFlowFile(projectPath) {
99
+ const candidates = [
100
+ projectPath,
101
+ this.fs.path.join(projectPath, "content"),
102
+ this.fs.path.join(projectPath, "flow_files")
103
+ ];
104
+ for (const dir of candidates) {
105
+ if (!await this.fs.exists(dir)) {
106
+ continue;
107
+ }
108
+ const stat = await this.fs.stat(dir);
109
+ if (!stat?.isDirectory()) {
110
+ continue;
111
+ }
112
+ const entries = await this.fs.readdir(dir);
113
+ const flowFile = entries.find((entry) => entry.endsWith(".flow"));
114
+ if (flowFile) {
115
+ return this.fs.path.join(dir, flowFile);
116
+ }
117
+ }
118
+ throw new Error(`No .flow file found in ${projectPath}.`);
119
+ }
120
+ async readDefaultEntryPointNodeId(projectPath) {
121
+ const [findError, flowFilePath] = await catchError(this.findFlowFile(projectPath));
122
+ if (findError || !flowFilePath) {
123
+ return;
124
+ }
125
+ const [readError, content] = await catchError(this.fs.readFile(flowFilePath, "utf-8"));
126
+ if (readError) {
127
+ return;
128
+ }
129
+ const [parseError, nodeId] = catchError(() => readStartNodeId(String(content)));
130
+ if (parseError) {
131
+ return;
132
+ }
133
+ return nodeId;
134
+ }
135
+ }
136
+ function readStartNodeId(flowContent) {
137
+ const parsed = JSON.parse(flowContent);
138
+ if (!isRecord(parsed) || !Array.isArray(parsed.nodes)) {
139
+ return;
140
+ }
141
+ const nodes = parsed.nodes.filter(isRecord);
142
+ const defaultEntry = nodes.find((node) => {
143
+ const inputs = isRecord(node.inputs) ? node.inputs : undefined;
144
+ if (inputs?.isDefaultEntryPoint === true) {
145
+ return true;
146
+ }
147
+ const model = isRecord(node.model) ? node.model : undefined;
148
+ return model?.isDefaultEntryPoint === true;
149
+ });
150
+ const startNode = defaultEntry ?? nodes.find((node) => {
151
+ const model = isRecord(node.model) ? node.model : undefined;
152
+ return model?.type === "bpmn:StartEvent" || node.type === "core.trigger.manual";
153
+ }) ?? nodes[0];
154
+ return typeof startNode?.id === "string" ? startNode.id : undefined;
155
+ }
156
+
157
+ // src/services/flow-eval-selectors.ts
158
+ function findEvaluator(evaluators, idOrName) {
159
+ return evaluators.find((ev) => ev.id === idOrName || ev.name === idOrName || getEvaluatorRef(ev) === idOrName) ?? null;
160
+ }
161
+ function findEvalSet(sets, idOrName) {
162
+ return sets.find((set) => set.id === idOrName || set.name === idOrName || stripJsonExt(set.fileName ?? "") === idOrName) ?? null;
163
+ }
164
+ function getLinkedEvaluators(allEvaluators, evalSet) {
165
+ const refs = new Set(evalSet.evaluatorRefs.map(stripJsonExt));
166
+ return allEvaluators.filter((evaluator) => {
167
+ const candidates = [
168
+ evaluator.id,
169
+ evaluator.fileName,
170
+ getEvaluatorRef(evaluator)
171
+ ].filter((value) => value !== undefined);
172
+ return candidates.some((candidate) => refs.has(stripJsonExt(candidate)));
173
+ });
174
+ }
175
+ function removeEvaluatorRefFromSet(evalSet, evaluator) {
176
+ const removedRefs = new Set([
177
+ evaluator.id,
178
+ getEvaluatorRef(evaluator),
179
+ evaluator.fileName
180
+ ]);
181
+ const before = evalSet.evaluatorRefs.length;
182
+ evalSet.evaluatorRefs = evalSet.evaluatorRefs.filter((ref) => !removedRefs.has(ref));
183
+ return evalSet.evaluatorRefs.length !== before;
184
+ }
185
+
186
+ export { readWorkflowId, FlowEvalPathResolver, readStartNodeId, findEvaluator, findEvalSet, getLinkedEvaluators, removeEvaluatorRefFromSet };
187
+
188
+ //# debugId=8C8FD74CA22CF5FB64756E2164756E21
@@ -0,0 +1,18 @@
1
+ import {
2
+ logger
3
+ } from "./packager-tool-5qaxht3k.js";
4
+ import {
5
+ inMemoryWorkflowToFileFormat
6
+ } from "./packager-tool-m5qfverj.js";
7
+
8
+ // src/utils/write-resolved-flow.ts
9
+ async function writeResolvedFlow(fs, dir, name, workflow) {
10
+ const resolvedFileFormat = inMemoryWorkflowToFileFormat(workflow);
11
+ const resolvedPath = fs.path.join(dir, `${name}.flow.resolved`);
12
+ await fs.writeFile(resolvedPath, JSON.stringify(resolvedFileFormat, null, 2));
13
+ logger.info(`Resolved flow written to ${resolvedPath}`);
14
+ }
15
+
16
+ export { writeResolvedFlow };
17
+
18
+ //# debugId=AE0D61ABCE2DA4C364756E2164756E21
@@ -1,4 +1,4 @@
1
- // ../../node_modules/@uipath/flow-migrations/dist/chunk-PF22ZHE3.js
1
+ // ../../node_modules/@uipath/flow-migrations/dist/chunk-PLXZTKXD.js
2
2
  var createMigration_invalidDownInput_message = "Invalid input for down-migration {{fromVersion}} → {{toVersion}}";
3
3
  var createMigration_invalidDownOutput_message = "Invalid output for down-migration {{fromVersion}} → {{toVersion}}";
4
4
  var createMigration_invalidInput_message = "Invalid input for migration {{fromVersion}} → {{toVersion}}";
@@ -6,6 +6,7 @@ var createMigration_invalidOutput_message = "Invalid output for migration {{from
6
6
  var downgradeWorkflow_missingDown_message = "Downgrade path is missing {{fromVersion}} → {{toVersion}}";
7
7
  var downgradeWorkflow_noPath_message = "No downgrade path from {{fromVersion}} to {{toVersion}}";
8
8
  var migrate_chain_noMigrationFound_message = "No migration found from version {{current}}. Cannot reach {{toVersion}}.";
9
+ var migrationValidation_deprecatedNode_message = "{{label}} is on version {{currentVersion}}, which is no longer supported. Upgrade to {{latestVersion}} before running this process.";
9
10
  var en_default = {
10
11
  createMigration_invalidDownInput_message,
11
12
  createMigration_invalidDownOutput_message,
@@ -13,9 +14,10 @@ var en_default = {
13
14
  createMigration_invalidOutput_message,
14
15
  downgradeWorkflow_missingDown_message,
15
16
  downgradeWorkflow_noPath_message,
16
- migrate_chain_noMigrationFound_message
17
+ migrate_chain_noMigrationFound_message,
18
+ migrationValidation_deprecatedNode_message
17
19
  };
18
20
 
19
- export { createMigration_invalidDownInput_message, createMigration_invalidDownOutput_message, createMigration_invalidInput_message, createMigration_invalidOutput_message, downgradeWorkflow_missingDown_message, downgradeWorkflow_noPath_message, migrate_chain_noMigrationFound_message, en_default };
21
+ export { createMigration_invalidDownInput_message, createMigration_invalidDownOutput_message, createMigration_invalidInput_message, createMigration_invalidOutput_message, downgradeWorkflow_missingDown_message, downgradeWorkflow_noPath_message, migrate_chain_noMigrationFound_message, migrationValidation_deprecatedNode_message, en_default };
20
22
 
21
- //# debugId=F2DA66301ADBA78364756E2164756E21
23
+ //# debugId=BC7DD8AD7874F44864756E2164756E21
@@ -0,0 +1,6 @@
1
+ // ../../node_modules/@uipath/flow-expression-model/dist/chunk-EYTLLV4Z.js
2
+ var EXPRESSION_MODEL_NAMESPACE = "expressionModel";
3
+
4
+ export { EXPRESSION_MODEL_NAMESPACE };
5
+
6
+ //# debugId=84A1129EBE7188B564756E2164756E21
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  toolsFactoryRepository
3
- } from "./packager-tool-7yjpwj92.js";
3
+ } from "./packager-tool-4hx14snw.js";
4
4
  import {
5
5
  FlowToolFactory
6
- } from "./packager-tool-17cn3xb7.js";
6
+ } from "./packager-tool-6m078z5s.js";
7
7
 
8
8
  // src/packager-tool.ts
9
9
  function registerPackagerFactories() {
@@ -0,0 +1,31 @@
1
+ // src/utils/pending-stall.ts
2
+ var PENDING_NORMAL_SECONDS = 60;
3
+ var PENDING_STALLED_SECONDS = 600;
4
+ function pendingSecondsFor(state, creationTime, now = Date.now()) {
5
+ if (state !== "Pending" || !creationTime) {
6
+ return;
7
+ }
8
+ const created = creationTime instanceof Date ? creationTime : new Date(creationTime);
9
+ const elapsedMs = now - created.getTime();
10
+ if (Number.isNaN(elapsedMs) || elapsedMs < 0) {
11
+ return;
12
+ }
13
+ return Math.round(elapsedMs / 1000);
14
+ }
15
+ function pendingStallInstructions(pendingSeconds) {
16
+ if (pendingSeconds >= PENDING_STALLED_SECONDS) {
17
+ return `Pending for ${pendingSeconds}s, past the ${PENDING_STALLED_SECONDS}s mark where the Flow runtime counts ` + `as stalled rather than slow. Stop polling this job — more polling will not start it. Check that the ` + `tenant can run Flow processes ('uip or machines list', 'uip maestro flow job list --state Pending' for ` + `a backlog), then escalate with this job key.`;
18
+ }
19
+ if (pendingSeconds >= PENDING_NORMAL_SECONDS) {
20
+ return `Pending for ${pendingSeconds}s. A Flow job normally starts within ${PENDING_NORMAL_SECONDS}s. Keep ` + `polling until ${PENDING_STALLED_SECONDS}s, then treat the runtime as stalled and stop.`;
21
+ }
22
+ return `Pending for ${pendingSeconds}s — normal. A Flow job usually starts within ${PENDING_NORMAL_SECONDS}s; ` + `treat it as stalled once it has been Pending for ${PENDING_STALLED_SECONDS}s.`;
23
+ }
24
+
25
+ // src/utils/wait-for-flow-job-defaults.ts
26
+ var DEFAULT_TIMEOUT_MS = 1800000;
27
+ var DEFAULT_INTERVAL_MS = 5000;
28
+
29
+ export { PENDING_NORMAL_SECONDS, PENDING_STALLED_SECONDS, pendingSecondsFor, pendingStallInstructions, DEFAULT_TIMEOUT_MS, DEFAULT_INTERVAL_MS };
30
+
31
+ //# debugId=D37FC2A9077F372264756E2164756E21
@@ -0,0 +1,384 @@
1
+ import {
2
+ generateNodeVariables
3
+ } from "./packager-tool-vpqyvh4c.js";
4
+ import {
5
+ MINIMUM_SUPPORTED_SCHEMA_VERSION,
6
+ RESERVED_WORDS,
7
+ VALID_IDENTIFIER_PATTERN,
8
+ coerceInputsViaSchema,
9
+ createRefResolver,
10
+ executeWritePlan,
11
+ fileFormatToInMemoryWorkflow,
12
+ generateNextId,
13
+ inMemoryWorkflowToFileFormat,
14
+ planWriteThrough,
15
+ resolveAndConvertWorkflow,
16
+ workflowFileSchema,
17
+ workflowSchema
18
+ } from "./packager-tool-m5qfverj.js";
19
+ import {
20
+ __require
21
+ } from "./packager-tool-1yh8g550.js";
22
+
23
+ // ../../node_modules/@uipath/flow-core/dist/chunk-PYGLRILU.js
24
+ function needsBinding(manifest) {
25
+ const model = manifest.model;
26
+ if (!model)
27
+ return false;
28
+ if (model.bindings !== undefined)
29
+ return true;
30
+ const context = model.context;
31
+ if (!context || typeof context !== "object")
32
+ return false;
33
+ const connectionKeys = ["connection", "folderKey", "connectionId"];
34
+ return Object.keys(context).some((k) => connectionKeys.includes(k));
35
+ }
36
+ function createBinding(options) {
37
+ return {
38
+ id: generateNextId("b", 8),
39
+ name: options.name,
40
+ type: "string",
41
+ resource: options.resource,
42
+ resourceKey: options.resourceKey ?? options.resource,
43
+ ...options.value && { default: options.value },
44
+ ...options.propertyAttribute && { propertyAttribute: options.propertyAttribute },
45
+ ...options.resourceSubType && { resourceSubType: options.resourceSubType }
46
+ };
47
+ }
48
+ function createConnectionBinding(connectionId, connectorName) {
49
+ return createBinding({
50
+ name: connectorName,
51
+ value: connectorName,
52
+ resource: "connection",
53
+ resourceKey: connectionId,
54
+ propertyAttribute: "connection"
55
+ });
56
+ }
57
+ function createFolderKeyBinding(connectionId, folderKey) {
58
+ return createBinding({
59
+ name: folderKey,
60
+ value: folderKey,
61
+ resource: "folderKey",
62
+ resourceKey: connectionId,
63
+ propertyAttribute: "folderKey"
64
+ });
65
+ }
66
+ function addBindingIfMissing(bindings, binding) {
67
+ const exists = bindings.some((b) => b.name === binding.name && b.resource === binding.resource && b.resourceKey === binding.resourceKey && b.propertyAttribute === binding.propertyAttribute);
68
+ if (exists)
69
+ return bindings;
70
+ return [...bindings, binding];
71
+ }
72
+ function createBindingsFromManifest(manifest) {
73
+ const model = manifest.model;
74
+ const bindingsTemplate = model?.bindings;
75
+ if (!bindingsTemplate?.values)
76
+ return [];
77
+ return bindingsTemplate.values.map((v) => createBinding({
78
+ name: v.name,
79
+ value: v.default ?? "",
80
+ resource: bindingsTemplate.resource,
81
+ resourceKey: bindingsTemplate.resourceKey,
82
+ propertyAttribute: v.propertyAttribute,
83
+ resourceSubType: bindingsTemplate.resourceSubType
84
+ }));
85
+ }
86
+
87
+ // ../../node_modules/@uipath/flow-core/dist/chunk-GCUQRSSY.js
88
+ var DEFAULT_TRIGGER_POSITION = { x: 256, y: 144 };
89
+ var DEFAULT_LAYOUT_OPTIONS = {
90
+ algorithm: "layered",
91
+ direction: "RIGHT",
92
+ nodeSpacing: 96,
93
+ layerSpacing: 96,
94
+ minimizeCrossings: true,
95
+ straightenEdges: true,
96
+ compact: false,
97
+ animate: true,
98
+ animationDuration: 500
99
+ };
100
+ function resolveWidth(node) {
101
+ return node.measured?.width ?? node.width ?? 96;
102
+ }
103
+ function resolveHeight(node) {
104
+ return node.measured?.height ?? node.height ?? 96;
105
+ }
106
+ var GRID_SPACING = 16;
107
+ function snapToGrid(value, gridSize = GRID_SPACING) {
108
+ return Math.round(value / gridSize) * gridSize;
109
+ }
110
+
111
+ // ../../node_modules/@uipath/flow-core/dist/index.js
112
+ function sanitizeNodeLabel(label) {
113
+ const words = label.split(/[^a-zA-Z0-9]+/).filter(Boolean);
114
+ if (words.length === 0)
115
+ return "node";
116
+ return words.map((word, index) => {
117
+ const lower = word.toLowerCase();
118
+ if (index === 0)
119
+ return lower;
120
+ return lower.charAt(0).toUpperCase() + lower.slice(1);
121
+ }).join("");
122
+ }
123
+ function lowerCaseFirstLetter(str) {
124
+ if (!str)
125
+ return str;
126
+ return str.charAt(0).toLowerCase() + str.slice(1);
127
+ }
128
+ function generateNodeId(label, existingIds) {
129
+ return generateNodeIdAndName(label, existingIds).id;
130
+ }
131
+ function generateNodeIdAndName(label, existingIds) {
132
+ const idSet = existingIds instanceof Set ? existingIds : new Set(existingIds);
133
+ const baseId = lowerCaseFirstLetter(sanitizeNodeLabel(label).replace("createNew", ""));
134
+ let index = 1;
135
+ let candidateId = `${baseId}${index}`;
136
+ while (idSet.has(candidateId)) {
137
+ index++;
138
+ candidateId = `${baseId}${index}`;
139
+ }
140
+ return {
141
+ id: candidateId,
142
+ displayName: label ? index > 1 ? `${label} ${index}` : label : `Node${index > 1 ? ` ${index}` : ""}`
143
+ };
144
+ }
145
+ function validateIdFormat(id) {
146
+ if (!id || !id.trim()) {
147
+ return "ID is required";
148
+ }
149
+ const trimmed = id.trim();
150
+ if (!VALID_IDENTIFIER_PATTERN.test(trimmed)) {
151
+ if (/^\d/.test(trimmed))
152
+ return "ID cannot start with a number";
153
+ if (/\s/.test(trimmed))
154
+ return "ID cannot contain spaces";
155
+ if (/[^a-zA-Z0-9_]/.test(trimmed))
156
+ return "ID can only contain letters, numbers, and underscores";
157
+ return "ID must start with a letter or underscore";
158
+ }
159
+ if (RESERVED_WORDS.includes(trimmed)) {
160
+ return `"${trimmed}" is a reserved word`;
161
+ }
162
+ return;
163
+ }
164
+ function validateIdentifier(id, existingIds, currentNodeId) {
165
+ const formatError = validateIdFormat(id);
166
+ if (formatError)
167
+ return formatError;
168
+ const idSet = existingIds instanceof Set ? existingIds : new Set(existingIds);
169
+ if (currentNodeId && id === currentNodeId) {
170
+ return;
171
+ }
172
+ if (idSet.has(id) && id !== currentNodeId) {
173
+ return `ID "${id}" is already in use by a node or variable`;
174
+ }
175
+ return;
176
+ }
177
+ function generateEdgeId(source, sourceHandle, target, targetHandle, existingIds) {
178
+ const baseId = `${source}-${sourceHandle ?? "default"}-${target}-${targetHandle ?? "default"}`;
179
+ if (!existingIds || !existingIds.has(baseId)) {
180
+ return baseId;
181
+ }
182
+ let index = 2;
183
+ let candidateId = `${baseId}-${index}`;
184
+ while (existingIds.has(candidateId)) {
185
+ index++;
186
+ candidateId = `${baseId}-${index}`;
187
+ }
188
+ return candidateId;
189
+ }
190
+ function getInputDefaults(manifest) {
191
+ const raw = manifest.inputDefaults ? structuredClone(manifest.inputDefaults) : manifest.inputDefinition ? structuredClone(manifest.inputDefinition) : {};
192
+ const inputDefinition = manifest.inputDefinition;
193
+ const inputProps = inputDefinition?.properties ?? {};
194
+ for (const [key, value] of Object.entries(raw)) {
195
+ raw[key] = coerceInputsViaSchema(value, inputProps[key]);
196
+ }
197
+ return raw;
198
+ }
199
+ function createNodeFromManifest(manifest, id, position = { x: 0, y: 0 }, label) {
200
+ const manifestModel = manifest.model;
201
+ const inputs = getInputDefaults(manifest);
202
+ if (manifestModel?.entryPointId) {
203
+ inputs.entryPointId = crypto.randomUUID();
204
+ }
205
+ if (manifestModel?.source) {
206
+ inputs.source = crypto.randomUUID();
207
+ }
208
+ return {
209
+ id,
210
+ type: manifest.nodeType,
211
+ typeVersion: manifest.version,
212
+ ui: { position },
213
+ display: { label: label ?? manifest.display?.label ?? id },
214
+ inputs
215
+ };
216
+ }
217
+ function createNode(options) {
218
+ if (!options.typeVersion) {
219
+ throw new Error("createNode requires an explicit typeVersion");
220
+ }
221
+ return {
222
+ id: options.id,
223
+ type: options.type,
224
+ typeVersion: options.typeVersion,
225
+ ui: { position: options.position ?? { x: 0, y: 0 } },
226
+ display: { label: options.label ?? options.id },
227
+ inputs: options.inputs ?? {}
228
+ };
229
+ }
230
+ function createEdge(options) {
231
+ const sourcePort = options.sourcePort ?? "default";
232
+ const targetPort = options.targetPort ?? "default";
233
+ const id = options.id ?? generateEdgeId(options.source, sourcePort, options.target, targetPort, options.existingIds);
234
+ return {
235
+ id,
236
+ sourceNodeId: options.source,
237
+ sourcePort,
238
+ targetNodeId: options.target,
239
+ targetPort
240
+ };
241
+ }
242
+ function addDefinition(workflow, manifest) {
243
+ const defs = workflow.definitions;
244
+ const already = defs.some((d) => d.nodeType === manifest.nodeType && d.version === manifest.version);
245
+ if (!already) {
246
+ defs.push(manifest);
247
+ }
248
+ }
249
+ function addNode(workflow, manifest, id, position, label) {
250
+ const node = createNodeFromManifest(manifest, id, position, label);
251
+ if (node.inputs?.entryPointId) {
252
+ const hasDefault = workflow.nodes.some((n) => n.inputs?.isDefaultEntryPoint === true);
253
+ if (!hasDefault) {
254
+ node.inputs.isDefaultEntryPoint = true;
255
+ }
256
+ }
257
+ workflow.nodes.push(node);
258
+ addDefinition(workflow, manifest);
259
+ const manifestBindings = createBindingsFromManifest(manifest);
260
+ if (manifestBindings.length > 0) {
261
+ let bindings = workflow.bindings ?? [];
262
+ for (const b of manifestBindings)
263
+ bindings = addBindingIfMissing(bindings, b);
264
+ workflow.bindings = bindings;
265
+ }
266
+ workflow.variables = {
267
+ ...workflow.variables,
268
+ nodes: generateNodeVariables(workflow.nodes, workflow.definitions)
269
+ };
270
+ return node;
271
+ }
272
+ function createWorkflow(options) {
273
+ const id = options?.id ?? crypto.randomUUID();
274
+ const name = options?.name ?? "Untitled Workflow";
275
+ const nodes = [];
276
+ const definitions = [];
277
+ if (options?.triggerManifest) {
278
+ const triggerNode = createNodeFromManifest(options.triggerManifest, "start", { ...DEFAULT_TRIGGER_POSITION });
279
+ if (triggerNode.inputs?.entryPointId) {
280
+ triggerNode.inputs.isDefaultEntryPoint = true;
281
+ }
282
+ nodes.push(triggerNode);
283
+ definitions.push(options.triggerManifest);
284
+ }
285
+ return {
286
+ id,
287
+ version: MINIMUM_SUPPORTED_SCHEMA_VERSION,
288
+ name,
289
+ nodes,
290
+ edges: [],
291
+ definitions
292
+ };
293
+ }
294
+ function addEdge(workflow, options) {
295
+ const existingIds = new Set(workflow.edges.map((e) => e.id));
296
+ const edge = createEdge({ ...options, existingIds });
297
+ workflow.edges.push(edge);
298
+ return edge;
299
+ }
300
+ function addBinding(workflow, binding) {
301
+ const current = workflow.bindings ?? [];
302
+ const updated = addBindingIfMissing(current, binding);
303
+ workflow.bindings = updated;
304
+ }
305
+ function addVariable(workflow, variable) {
306
+ if (!workflow.variables) {
307
+ workflow.variables = { globals: [], nodes: [] };
308
+ }
309
+ if (!workflow.variables.globals) {
310
+ workflow.variables.globals = [];
311
+ }
312
+ workflow.variables.globals.push(variable);
313
+ }
314
+ var cachedNodeFs;
315
+ async function getNodeFs() {
316
+ if (cachedNodeFs)
317
+ return cachedNodeFs;
318
+ const nodeFs = await import("fs");
319
+ cachedNodeFs = {
320
+ readFile: (p, enc) => nodeFs.promises.readFile(p, enc),
321
+ writeFile: (p, c, enc) => nodeFs.promises.writeFile(p, c, enc)
322
+ };
323
+ return cachedNodeFs;
324
+ }
325
+ async function readWorkflow(filePath, fs) {
326
+ const filesystem = fs ?? await getNodeFs();
327
+ const refResolver = createRefResolver((resolvedPath) => filesystem.readFile(resolvedPath, "utf-8"));
328
+ const content = await filesystem.readFile(filePath, "utf-8");
329
+ const raw = JSON.parse(content);
330
+ const { workflow } = await resolveAndConvertWorkflow(raw, refResolver, { baseUri: filePath });
331
+ return workflowSchema.parse(workflow);
332
+ }
333
+ async function writeWorkflow(filePath, workflow, fs) {
334
+ const filesystem = fs ?? await getNodeFs();
335
+ const fileFormat = inMemoryWorkflowToFileFormat(workflow);
336
+ await filesystem.writeFile(filePath, JSON.stringify(fileFormat, null, 2), "utf-8");
337
+ }
338
+ async function writeWorkflowWithRefs(filePath, workflow, refMap, fs) {
339
+ const filesystem = fs ?? await getNodeFs();
340
+ const fileFormat = inMemoryWorkflowToFileFormat(workflow);
341
+ const plan = planWriteThrough(fileFormat, refMap);
342
+ await executeWritePlan(plan, {
343
+ writeMainFile: async (content) => {
344
+ await filesystem.writeFile(filePath, content, "utf-8");
345
+ },
346
+ writeRefFile: async (refPath, content) => {
347
+ const path = await import("path");
348
+ const absPath = path.resolve(path.dirname(filePath), refPath);
349
+ await filesystem.writeFile(absPath, content, "utf-8");
350
+ }
351
+ });
352
+ }
353
+ function validateWorkflow(workflow) {
354
+ const file = workflowFileSchema.parse(workflow);
355
+ return fileFormatToInMemoryWorkflow(file);
356
+ }
357
+ function summarizeWorkflow(workflow) {
358
+ const nodes = workflow.nodes;
359
+ const edges = workflow.edges;
360
+ return {
361
+ id: workflow.id,
362
+ name: workflow.name,
363
+ version: workflow.version,
364
+ nodeCount: nodes.length,
365
+ edgeCount: edges.length,
366
+ nodes: nodes.map((n) => ({
367
+ id: n.id,
368
+ type: n.type,
369
+ label: n.display?.label
370
+ })),
371
+ edges: edges.map((e) => ({
372
+ source: e.sourceNodeId,
373
+ target: e.targetNodeId
374
+ })),
375
+ variableCount: {
376
+ globals: workflow.variables?.globals?.length ?? 0,
377
+ nodes: workflow.variables?.nodes?.length ?? 0
378
+ },
379
+ hasBindings: (workflow.bindings?.length ?? 0) > 0
380
+ };
381
+ }
382
+ 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
+
384
+ //# debugId=B91CF0AAF9DF6B2D64756E2164756E21