@uipath/flow-tool 1.206.0-preview.306 → 1.207.0-preview.307
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/README.md +2 -1
- package/dist/THIRD-PARTY-NOTICES.md +12 -12
- package/dist/{applicationinsights-web-8m26566f.js → applicationinsights-web-c6epsatg.js} +1 -1
- package/dist/{authoring-az69rn0j.js → authoring-f5ttjy3d.js} +5 -5
- package/dist/{binding-service-jdzw5h8a.js → binding-service-b4kes1cr.js} +37 -34
- package/dist/{browser-strategy-gnftxwsf.js → browser-strategy-1nk8hgcf.js} +1 -1
- package/dist/case-catalog-h4fjn6q3.js +304 -0
- package/dist/{connector-library-1yw5r47w.js → connector-library-844myxz2.js} +20 -6
- package/dist/{connector-service-yq01bg3n.js → connector-service-xjszs9v3.js} +156 -76
- package/dist/{conversion-7O2PDOQB-xx5zfw6n.js → conversion-A2KZVSOA-313011c5.js} +256 -90
- package/dist/{de-AI7ML6JM-km47f8k4.js → de-B6IFKV43-9sk50xx0.js} +164 -2
- package/dist/{de-2BEKRUMY-x4dx0nn9.js → de-HF4GJ4EK-NX7YTOSY-xvwqrst4.js} +1282 -10
- package/dist/{de-2BEKRUMY-MD7L477H-7mwat6r6.js → de-HF4GJ4EK-xrrajtht.js} +1277 -15
- package/dist/{de-VQWT6L5Y-mch4qwyv.js → de-IQ44WEAK-ayb953tp.js} +19 -4
- package/dist/{de-3CU65EDB-r7r10am9.js → de-T4OCQPNU-hrqdjart.js} +6 -6
- package/dist/{debug-conversation-trigger-62ebex43.js → debug-conversation-trigger-j20ms2xc.js} +4 -9
- package/dist/{debug-http-client-ykzhg1zx.js → debug-http-client-fypqjmfs.js} +6 -5
- package/dist/{debug-service-xq8vhrkq.js → debug-service-zv5hj0cx.js} +11 -6
- package/dist/{edge-service-w5jbtehr.js → edge-service-8jrhdfvf.js} +41 -31
- package/dist/{elk.bundled-phy0zc81.js → elk.bundled-pfmz610v.js} +1 -1
- package/dist/{embedded-file-reader-pxpwcq3n.js → embedded-file-reader-k94wt612.js} +16 -16
- package/dist/{en-LAVDF7IQ-ba7wzsxp.js → en-5JIPZTS5-v0f9wmd2.js} +4 -2
- package/dist/{en-X6T4SP2Y-FPGCJIFV-wsbs6fqx.js → en-ETY46SDS-RI6EZCN6-x64e1cks.js} +67 -3
- package/dist/{en-X6T4SP2Y-xe57av1w.js → en-ETY46SDS-yfqhqvbx.js} +66 -2
- package/dist/{en-WPCQ4JKF-jnj0q4e1.js → en-JZXY3PYE-m54g0zx7.js} +4 -4
- package/dist/{en-LQHKFSEY-jz2knr92.js → en-LQHKFSEY-bypy1p39.js} +1 -1
- package/dist/{en-U2NSIIZN-whenw6wh.js → en-T6VSEF3E-1hq4zfrt.js} +5 -3
- package/dist/{es-SPNKTD5Y-vw5cbgv5.js → es-AQW6PFIU-q2mz247f.js} +164 -2
- package/dist/{es-7ZTQTGKN-TXQBFYRA-q5v6wcmn.js → es-IYP2OLUY-7SKYGF6A-rd9jrktp.js} +1272 -11
- package/dist/{es-7ZTQTGKN-11sj0yjx.js → es-IYP2OLUY-98xsbyd5.js} +1271 -10
- package/dist/{es-MX-S2RFDGDE-x9r0tv30.js → es-MX-A2DFN7CA-q5m62f60.js} +19 -4
- package/dist/{es-MX-IHGRIEWH-23X37OPS-vx539dfs.js → es-MX-D2MN3U37-0y5q0nbe.js} +1276 -15
- package/dist/{es-MX-IHGRIEWH-g63p0gb4.js → es-MX-D2MN3U37-D74A6FRL-y7xh0r57.js} +1281 -10
- package/dist/{es-MX-7KJZPEQN-1fq0a9jr.js → es-MX-KWITVBWE-w49gknha.js} +164 -2
- package/dist/{es-MX-F7ZEHSNE-gxpm47vv.js → es-MX-YQNHSXDT-fd5ybreb.js} +6 -6
- package/dist/{es-EP563JWQ-1agj5n4e.js → es-TNUPGHGG-886me0sq.js} +19 -4
- package/dist/{es-KHVY67FO-natcvmmm.js → es-YHECPVFB-7jsrxa01.js} +6 -6
- package/dist/extraction-availability-service-h08mngty.js +343 -0
- package/dist/{first-party-service-6b9ajm57.js → first-party-service-qfg2m05s.js} +1 -1
- package/dist/{flow-api-1hr7z6qc.js → flow-api-bmg7beey.js} +15 -12
- package/dist/{flow-debug-service-vt2k0v46.js → flow-debug-service-jb9jxat1.js} +232 -156
- package/dist/flow-eval-node-target-scxb918a.js +31 -0
- package/dist/flow-eval-run-api-g6sphtf3.js +11 -0
- package/dist/{flow-eval-run-service-vh2041qg.js → flow-eval-run-service-n68xb9sk.js} +116 -119
- package/dist/{flow-eval-service-q2zp54gq.js → flow-eval-service-88qyrg7d.js} +141 -337
- package/dist/{flow-init-sdk-source-vg1ckdrf.js → flow-init-sdk-source-t2q2w6v7.js} +5 -5
- package/dist/flow-init-service-v6jvdmqa.js +27 -0
- package/dist/flow-io-4z79xnb3.js +29 -0
- package/dist/{flow-migrate-service-wgrz2msp.js → flow-migrate-service-gbdh07zh.js} +20 -20
- package/dist/{flow-pack-service-kze10925.js → flow-pack-service-gca3ekj7.js} +89 -90
- package/dist/flow-validate-service-z0z4ndn8.js +49 -0
- package/dist/{fr-7LK3QUWT-a94yejcs.js → fr-EPBGOBOP-rs7qy97k.js} +19 -4
- package/dist/{fr-7ZDL4MVO-pd27vwh6.js → fr-NISALSPL-3ANDQPI3-gjhmym96.js} +1282 -10
- package/dist/{fr-7ZDL4MVO-CXMRZDOF-b816xj36.js → fr-NISALSPL-vzfmygd7.js} +1277 -15
- package/dist/{fr-AXJGUT53-hdg3pmd4.js → fr-RNWK2TMC-dpyzj366.js} +164 -2
- package/dist/{fr-I42FODC5-p80x5v4b.js → fr-W3AFCEDL-cjfr0xqp.js} +6 -6
- package/dist/{governance-fetcher-y0q4m57j.js → governance-fetcher-26h7eqrk.js} +7 -7
- package/dist/{headless-41t9wwb7.js → headless-23ywyx9h.js} +390 -195
- package/dist/{hitl-service-8rvw1zsh.js → hitl-service-v94wsz1f.js} +11 -11
- package/dist/{index-wss1mf5j.js → index-9a52zr4w.js} +3033 -767
- package/dist/{index-t2f7scza.js → index-db1djbzm.js} +12 -8
- package/dist/{index-amqqhge1.js → index-ewg6ygg0.js} +1 -1
- package/dist/{index-r44xc976.js → index-eyjrdzgx.js} +5 -5
- package/dist/{index-7fet3f0s.js → index-h67w2p9p.js} +3 -3
- package/dist/index-kwrhrb9p.js +161 -0
- package/dist/{index-f5kq7265.js → index-r6crd7tx.js} +6 -4
- package/dist/{index-ng011fzs.js → index-r6y07e14.js} +94 -74
- package/dist/{index-vvf52vnn.js → index-re7r0ezw.js} +34 -27
- package/dist/{index-5y5pbdx5.js → index-sazh9ymk.js} +13 -11
- package/dist/{index-5pzp2qeb.js → index-v3w1930f.js} +18 -18
- package/dist/{index-d4bdedx3.js → index-ynw2efd8.js} +6 -4
- package/dist/index.js +16 -14
- package/dist/{index.umd.min-ttg1qc0x.js → index.umd.min-5yxdz5j3.js} +1 -1
- package/dist/init.js +18 -17
- package/dist/{inline-entity-resolver-aty0xw8s.js → inline-entity-resolver-r7ebmssg.js} +11 -11
- package/dist/input-reader-3zvbsn6a.js +12 -0
- package/dist/integration-service-fetcher-0vdd4pbb.js +65 -0
- package/dist/{ja-C7GZV6YP-hvtbngr5.js → ja-DH4I3GEF-ywyhhppa.js} +164 -2
- package/dist/{ja-LGAM5HKR-sgrtjqjh.js → ja-HTS2Q4YG-4ahnq47y.js} +1277 -10
- package/dist/{ja-LGAM5HKR-NTPKIZEM-aaj773vd.js → ja-HTS2Q4YG-7Q6WUI6H-j8dkhe93.js} +1278 -11
- package/dist/{ja-WY2W6733-ayr36h1f.js → ja-HWFIXC2V-gg9xvhsv.js} +19 -4
- package/dist/{ja-GI3OUHPZ-28fy60r0.js → ja-WOANIGX4-qnyzk2t8.js} +6 -6
- package/dist/{jmespath-wwym30dp.js → jmespath-dbsejrwn.js} +1 -1
- package/dist/json-input-pj18qjt0.js +17 -0
- package/dist/{known-types-v9sxcq1c.js → known-types-pen5h5kz.js} +4 -4
- package/dist/{ko-7B4SUZB7-2SLI636D-khdzwz6c.js → ko-3JFGTMNY-VT6UQ3IS-z5n880em.js} +1272 -11
- package/dist/{ko-7B4SUZB7-c8wr20sc.js → ko-3JFGTMNY-qnf1bnef.js} +1271 -10
- package/dist/{ko-H2RGQWKJ-9696w762.js → ko-L3BMYD3Q-exfhqfbh.js} +19 -4
- package/dist/{ko-Q24HSSL4-5vn55pte.js → ko-R5BCWVO7-whzgmh6q.js} +164 -2
- package/dist/{ko-RYKAL74T-10m4z8vw.js → ko-RMOVRC7M-whyynn7n.js} +6 -6
- package/dist/library-option-9fqvdh8v.js +14 -0
- package/dist/localization-axzmx1mb.js +45 -0
- package/dist/{maestro-automate-entry-d1v5q5mv.js → maestro-automate-entry-mrap5xmt.js} +2 -2
- package/dist/manifest-hmeqvk74.js +60 -0
- package/dist/node-service-d6211mt9.js +65 -0
- package/dist/{node-strategy-wrjxmbzt.js → node-strategy-2r78gtca.js} +2 -2
- package/dist/{node-sync-service-6h12t41d.js → node-sync-service-6wbypdgb.js} +22 -15
- package/dist/node-w3wny6qw.js +172 -0
- package/dist/packager-tool-0x8g8b5r.js +25 -0
- package/dist/{packager-tool-vgrswa8p.js → packager-tool-1db1wqdy.js} +30 -8
- package/dist/packager-tool-1yew22sn.js +9 -0
- package/dist/{packager-tool-14rdgz3c.js → packager-tool-3sxg16ft.js} +7 -7
- package/dist/packager-tool-40bxn7j2.js +63 -0
- package/dist/{packager-tool-6an893wm.js → packager-tool-4f4jp7ez.js} +3 -3
- package/dist/packager-tool-4gh9ftn8.js +224 -0
- package/dist/{packager-tool-pxq0bwp0.js → packager-tool-4hn7v05x.js} +16 -9
- package/dist/packager-tool-4skf6ak1.js +31 -0
- package/dist/{packager-tool-951nhh3e.js → packager-tool-5n1v6y3q.js} +1 -1
- package/dist/{packager-tool-2b0tn4p4.js → packager-tool-6azsz9h8.js} +7 -7
- package/dist/{packager-tool-zydkpqta.js → packager-tool-6sqq0mzd.js} +330 -902
- package/dist/{packager-tool-54jdtyk4.js → packager-tool-7d6y5paj.js} +11 -11
- package/dist/{packager-tool-ac6rvny7.js → packager-tool-7re5d8aq.js} +1139 -466
- package/dist/{packager-tool-4w37xezc.js → packager-tool-7tmtjb7p.js} +13 -13
- package/dist/{packager-tool-6an563h8.js → packager-tool-7wpb19zf.js} +10 -3
- package/dist/packager-tool-8qc7ram5.js +16 -0
- package/dist/packager-tool-942v78s9.js +40 -0
- package/dist/packager-tool-9tv5cyhr.js +16 -0
- package/dist/{packager-tool-7atc775f.js → packager-tool-ajx79m52.js} +1 -1
- package/dist/{packager-tool-p7f12rkc.js → packager-tool-b14qj57y.js} +9 -7
- package/dist/packager-tool-bbq5kbb9.js +318 -0
- package/dist/{packager-tool-xhrm7cgz.js → packager-tool-bcsjm5hv.js} +470 -315
- package/dist/{packager-tool-xdaxdc00.js → packager-tool-bn09xgy8.js} +14 -14
- package/dist/{packager-tool-m30d5s5s.js → packager-tool-bv24wxxz.js} +24 -10
- package/dist/{packager-tool-1qg04b7q.js → packager-tool-bzcphfa8.js} +4 -2
- package/dist/packager-tool-c8mn8jr0.js +1060 -0
- package/dist/{packager-tool-gdpw0daf.js → packager-tool-dmhmcav3.js} +3773 -2625
- package/dist/{packager-tool-vb1ect63.js → packager-tool-e8bxpwdp.js} +21 -21
- package/dist/{packager-tool-m1y5ah6s.js → packager-tool-f3htkspn.js} +215 -233
- package/dist/{packager-tool-y1bcfvcs.js → packager-tool-frt20zp9.js} +2 -2
- package/dist/packager-tool-geh2qybm.js +179 -0
- package/dist/{packager-tool-1rhch6b5.js → packager-tool-gjjr2a2w.js} +66 -19
- package/dist/{packager-tool-v1q6601f.js → packager-tool-hyx81x30.js} +584 -651
- package/dist/{packager-tool-67h9vcvz.js → packager-tool-j6m8nkms.js} +1123 -295
- package/dist/{packager-tool-64r7e4ek.js → packager-tool-jjnfwfd4.js} +2 -2
- package/dist/packager-tool-kh1taypp.js +41 -0
- package/dist/{packager-tool-dc12ytg5.js → packager-tool-krr2x2ny.js} +10 -10
- package/dist/{packager-tool-pdt4jmnw.js → packager-tool-m2h98d2z.js} +246 -61
- package/dist/{packager-tool-9m5vba43.js → packager-tool-md1vcqh4.js} +233 -14
- package/dist/{packager-tool-4g87fbz6.js → packager-tool-mm6a12y4.js} +8 -8
- package/dist/{packager-tool-2n6eg5eq.js → packager-tool-mvzswn9n.js} +134 -68
- package/dist/{packager-tool-x4xdtsbp.js → packager-tool-n4fky033.js} +15328 -7171
- package/dist/{packager-tool-hyd7qpfw.js → packager-tool-npm5tzpt.js} +489 -118
- package/dist/packager-tool-p8ncdnsj.js +30 -0
- package/dist/{packager-tool-m126jzdd.js → packager-tool-qkdbfkev.js} +14 -11
- package/dist/{packager-tool-7mxn3e7j.js → packager-tool-qtz83h01.js} +4 -2
- package/dist/{packager-tool-hk0fnvz5.js → packager-tool-qx8wvedy.js} +1 -1
- package/dist/{packager-tool-q2kwk5bf.js → packager-tool-qyhvgenw.js} +6 -4
- package/dist/{packager-tool-6pyaaxzk.js → packager-tool-rcjtmknf.js} +351 -42
- package/dist/{packager-tool-jjkypwge.js → packager-tool-s8jxyjgj.js} +15 -4
- package/dist/packager-tool-swvgkcq7.js +5973 -0
- package/dist/{packager-tool-fzgfb0jt.js → packager-tool-t0e7fvqz.js} +1228 -759
- package/dist/packager-tool-t0zz0jtb.js +423 -0
- package/dist/{packager-tool-p123mtfx.js → packager-tool-tgawhrva.js} +58 -16
- package/dist/{packager-tool-yewnsyag.js → packager-tool-vg16h3pk.js} +80 -6
- package/dist/{packager-tool-dbc4hv4n.js → packager-tool-vtz6gvav.js} +8 -8
- package/dist/{packager-tool-f4t73ja0.js → packager-tool-wk6jaz9m.js} +228 -487
- package/dist/packager-tool-wvf6b31h.js +50 -0
- package/dist/packager-tool-xgh2t48c.js +255 -0
- package/dist/{packager-tool-w9bkq7zb.js → packager-tool-xgvp8a8g.js} +10 -10
- package/dist/{packager-tool-h1vt1vr2.js → packager-tool-ybn5fymq.js} +2 -2
- package/dist/packager-tool-yszyrt27.js +184 -0
- package/dist/packager-tool-yx0hy6pt.js +125 -0
- package/dist/{packager-tool-ze3fnf3s.js → packager-tool-zap4kd3z.js} +7 -2
- package/dist/{packager-tool-dr3zc9n9.js → packager-tool-zgzpqfcs.js} +13 -6
- package/dist/{node-tx150jvs.js → packager-tool-zrh55d4c.js} +190 -286
- package/dist/packager-tool.js +9 -9
- package/dist/{prepare-uip-ad7mfs8t.js → prepare-uip-8frvq826.js} +39 -6
- package/dist/provision-node-service-b8nkty72.js +86 -0
- package/dist/{pt-2RGHDOG4-gwe2ptvg.js → pt-6RCFX6CY-v42k92ey.js} +19 -4
- package/dist/{pt-BR-BIUJXIPU-2sqzhr8y.js → pt-BR-6TBBEDQS-y3f2vg5d.js} +164 -2
- package/dist/{pt-BR-PHLFHMXZ-JFPKUXIZ-1cttmarb.js → pt-BR-7H7BP5DT-IOHWNCIU-kzbjgs8p.js} +1277 -11
- package/dist/{pt-BR-PHLFHMXZ-n6de4s7z.js → pt-BR-7H7BP5DT-z2e5aaj1.js} +1276 -10
- package/dist/{pt-BR-JWHVZE6H-gvkknv49.js → pt-BR-HDVM5NFA-azfx4gg9.js} +19 -4
- package/dist/{pt-BR-IL3KLBID-m1mvqqzb.js → pt-BR-HJIMGPPX-s18rb4vg.js} +6 -6
- package/dist/{pt-VLA5IOHO-8t4pze0h.js → pt-DZG5FPWK-6czrqk2t.js} +6 -6
- package/dist/{pt-N7ZTJT4W-GVODJMRX-ek3zjp9k.js → pt-QWGSZKMD-RTKSQCYA-j9wqwb10.js} +1272 -11
- package/dist/{pt-N7ZTJT4W-d6c67xcn.js → pt-QWGSZKMD-m50nrkx8.js} +1271 -10
- package/dist/{pt-MHX6JGAX-xfgvdqwg.js → pt-ZSQC5RZ3-8kp3g1z5.js} +164 -2
- package/dist/{ro-FLNXVYJI-ZN43XZKK-zrcvcsj5.js → ro-B7G474JK-9k2jjk88.js} +1271 -15
- package/dist/{ro-FLNXVYJI-ytrwabg2.js → ro-B7G474JK-Q3BAA4S3-1ss8n5t0.js} +1276 -10
- package/dist/{ro-53TS7SWG-hnjx1c7b.js → ro-EEKX2X3R-tz9prn67.js} +19 -4
- package/dist/{ro-3RKJNGJZ-xqj14e3d.js → ro-P33AQ6ZL-s92z1mgg.js} +164 -2
- package/dist/{ro-IRNFX376-mh84zk3n.js → ro-SX7RUXGR-kknxsr3g.js} +6 -6
- package/dist/ru-FNRVPXE5-7q150qf8.js +7 -0
- package/dist/ru-GSCT4ARZ-6OTD7JLB-j2ny4frk.js +12 -0
- package/dist/schema-document-service-007f2kw4.js +30 -0
- package/dist/{serialization-Z3UYT6BW-c994gtwh.js → serialization-7CB4AREI-b012f3vq.js} +482 -6161
- package/dist/services/binding-id-rule.d.ts +13 -0
- package/dist/services/binding-resource-types.d.ts +12 -0
- package/dist/services/extract-schema/default-schema-document.d.ts +9 -4
- package/dist/services/extract-schema/types.d.ts +73 -0
- package/dist/services/extract-schema/validate-schema-document.d.ts +75 -0
- package/dist/services/flow-scopes.d.ts +15 -0
- package/dist/services/flow-structure-checks.d.ts +8 -0
- package/dist/services/flow-validate-service.d.ts +44 -11
- package/dist/services/idp-processor-provisioning.d.ts +35 -0
- package/dist/services/node-service.d.ts +17 -23
- package/dist/services/node-validators/extract-schema-validator.d.ts +13 -0
- package/dist/services/node-validators/index.d.ts +1 -0
- package/dist/services/node-validators/js-expression-syntax-validator.d.ts +2 -1
- package/dist/services/node-validators/types.d.ts +2 -7
- package/dist/services/vars-reference-rule.d.ts +6 -0
- package/dist/solution-auth-k0s83ake.js +11 -0
- package/dist/{solution-definition-helper-6zwd9hjs.js → solution-definition-helper-qjj01xh0.js} +1 -1
- package/dist/{solution-discovery-wwwynadq.js → solution-discovery-v5qatmz2.js} +7 -7
- package/dist/taggable-variables-nc8td6er.js +134 -0
- package/dist/{tidy-service-g9qcarr9.js → tidy-service-ehhraxge.js} +17 -18
- package/dist/tool.js +16 -14
- package/dist/{tr-PIQY7JIT-2mkwk0kq.js → tr-B6TLBSLH-1797wxkh.js} +19 -4
- package/dist/{tr-7AIZZWZ6-pdzp9n0p.js → tr-FX7WCKK2-CEOTUJRD-pv26erw5.js} +1276 -10
- package/dist/{tr-7AIZZWZ6-ESAESUPL-kgj5s586.js → tr-FX7WCKK2-x3rx9fjt.js} +1271 -15
- package/dist/{tr-EJKY7DVQ-rkctqva4.js → tr-OUB57VJ6-52t7zdzb.js} +6 -6
- package/dist/{tr-PQLUUHPC-qsb7btxn.js → tr-XD73CQAA-tb2nrpyp.js} +164 -2
- package/dist/utils/handle-expansion.d.ts +2 -2
- package/dist/validation.js +42 -39
- package/dist/{variable-service-1s0z3e9j.js → variable-service-m8m88dy6.js} +17 -12
- package/dist/{wait-for-flow-job-vy4t4tbj.js → wait-for-flow-job-k990nmdn.js} +15 -12
- package/dist/{zh-CN-NIEVKROA-q4tbbwqz.js → zh-CN-7KN22KSH-mwvgyym6.js} +19 -4
- package/dist/{zh-CN-4FH7E7UL-84y6j2ea.js → zh-CN-FKWWWLFR-n15rj6p8.js} +6 -6
- package/dist/{zh-CN-OHNTHZRI-b0hjkfqn.js → zh-CN-GWP3B2EM-c07fm17a.js} +164 -2
- package/dist/{zh-CN-CN2ARPFS-e0p2qrxf.js → zh-CN-NCMB6YM5-BB2LRIMQ-tj7kwma4.js} +1276 -10
- package/dist/{zh-CN-CN2ARPFS-NIQTWDK2-0t4qqqdc.js → zh-CN-NCMB6YM5-drw9bnxg.js} +1271 -15
- package/dist/{zh-TW-E4D3Y6ZR-tn3bmzz5.js → zh-TW-2DLUOA7C-9khqnr4r.js} +164 -2
- package/dist/{zh-TW-5WQA6QTM-hns69sd4.js → zh-TW-52QTEYIZ-2mj7hy3e.js} +6 -6
- package/dist/{zh-TW-MSQM7YTT-m7r7nwnj.js → zh-TW-I7BH3XP2-7rb4xpzg.js} +19 -4
- package/dist/{zh-TW-7RUFEVFK-VKVRSVTP-8zmewakq.js → zh-TW-UNIEJPLE-4vxzbphe.js} +1272 -16
- package/dist/{zh-TW-7RUFEVFK-qd7myw31.js → zh-TW-UNIEJPLE-ECGOEPYS-wv5068r9.js} +1277 -11
- package/package.json +2 -2
- package/dist/flow-eval-node-target-20cnm783.js +0 -29
- package/dist/flow-eval-run-api-w4j8ra60.js +0 -9
- package/dist/flow-init-service-4rvjej8m.js +0 -26
- package/dist/flow-io-e7t1s141.js +0 -24
- package/dist/flow-validate-service-wfkxyvkc.js +0 -46
- package/dist/input-reader-jjq3r7ry.js +0 -11
- package/dist/localization-erchshqr.js +0 -45
- package/dist/node-service-2mbw4sjk.js +0 -64
- package/dist/packager-tool-08dsxdz8.js +0 -56
- package/dist/packager-tool-2sazb7th.js +0 -2
- package/dist/packager-tool-9217bxm2.js +0 -6
- package/dist/packager-tool-cvh1a0nm.js +0 -16
- package/dist/packager-tool-d07g2kpn.js +0 -25
- package/dist/packager-tool-f7rk9xhv.js +0 -50
- package/dist/packager-tool-jd3v0bh1.js +0 -26
- package/dist/packager-tool-k3egwd1m.js +0 -15
- package/dist/packager-tool-mfj268wk.js +0 -18
- package/dist/packager-tool-q0f1dvtd.js +0 -40
- package/dist/packager-tool-wr7gn964.js +0 -2
- package/dist/packager-tool-z1w16vjv.js +0 -461
- package/dist/ru-GSCT4ARZ-FTVCGQTL-7d8rpmsn.js +0 -12
- package/dist/ru-T73OPRTC-50m7tty9.js +0 -7
- package/dist/services/connector-request-buckets.d.ts +0 -1
- package/dist/services/flow-eval-file-store.d.ts +0 -1
- package/dist/services/inline-entity-resolver.d.ts +0 -22
- package/dist/services/packaging-utils.d.ts +0 -130
- package/dist/services/preview-id-rule.d.ts +0 -33
- package/dist/services/ui-only-node-types.d.ts +0 -1
- package/dist/solution-auth-j8x84n5z.js +0 -11
- package/dist/utils/flow-io.d.ts +0 -19
- package/dist/utils/workflow-file-format.d.ts +0 -14
|
@@ -0,0 +1,1060 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getLoginStatusAsync2
|
|
3
|
+
} from "./packager-tool-tgawhrva.js";
|
|
4
|
+
import {
|
|
5
|
+
getFileSystem
|
|
6
|
+
} from "./packager-tool-1db1wqdy.js";
|
|
7
|
+
import {
|
|
8
|
+
catchError2
|
|
9
|
+
} from "./packager-tool-4hn7v05x.js";
|
|
10
|
+
import {
|
|
11
|
+
classifyThrownError,
|
|
12
|
+
UIPATH_HOME_DIR2,
|
|
13
|
+
hashContent
|
|
14
|
+
} from "./packager-tool-bcsjm5hv.js";
|
|
15
|
+
import {
|
|
16
|
+
AGENT_TOOL_CONNECTOR_NODE_PREFIX2,
|
|
17
|
+
DEFAULT_FETCHERS2,
|
|
18
|
+
MANIFEST_FEATURE_FLAGS2,
|
|
19
|
+
ManifestClient2
|
|
20
|
+
} from "./packager-tool-dmhmcav3.js";
|
|
21
|
+
import {
|
|
22
|
+
searchWithFilters2
|
|
23
|
+
} from "./packager-tool-xb16e3tz.js";
|
|
24
|
+
import {
|
|
25
|
+
enrichConnectorNode2
|
|
26
|
+
} from "./packager-tool-6sqq0mzd.js";
|
|
27
|
+
import {
|
|
28
|
+
selectMaestroNodes,
|
|
29
|
+
listKnownSdkNodes2
|
|
30
|
+
} from "./packager-tool-4skf6ak1.js";
|
|
31
|
+
import {
|
|
32
|
+
findSolutionFromCwd2,
|
|
33
|
+
buildInSolutionNodes2,
|
|
34
|
+
unknownContractWarning2
|
|
35
|
+
} from "./packager-tool-bn09xgy8.js";
|
|
36
|
+
import {
|
|
37
|
+
resolveMaestroRegistry
|
|
38
|
+
} from "./packager-tool-jjnfwfd4.js";
|
|
39
|
+
|
|
40
|
+
// ../maestro-sdk/src/registry/is-precache.ts
|
|
41
|
+
async function resolveLibraryJsonDir() {
|
|
42
|
+
const snapshot = await resolveMaestroRegistry();
|
|
43
|
+
return snapshot?.libraryJson ?? null;
|
|
44
|
+
}
|
|
45
|
+
async function readIndex() {
|
|
46
|
+
const fs = getFileSystem();
|
|
47
|
+
const dir = await resolveLibraryJsonDir();
|
|
48
|
+
if (!dir)
|
|
49
|
+
return null;
|
|
50
|
+
const indexPath = fs.path.join(dir, "index.json");
|
|
51
|
+
const [readError, content] = await catchError2(fs.readFile(indexPath, "utf-8"));
|
|
52
|
+
if (readError || content === null)
|
|
53
|
+
return null;
|
|
54
|
+
const [parseError, parsed] = catchError2(() => JSON.parse(content));
|
|
55
|
+
if (parseError || !parsed || !Array.isArray(parsed.entries))
|
|
56
|
+
return null;
|
|
57
|
+
return parsed.entries;
|
|
58
|
+
}
|
|
59
|
+
async function listPrecacheEntries() {
|
|
60
|
+
const entries = await readIndex();
|
|
61
|
+
return entries ?? [];
|
|
62
|
+
}
|
|
63
|
+
async function getPrecacheNode(nodeType, options) {
|
|
64
|
+
const fs = getFileSystem();
|
|
65
|
+
const dir = await resolveLibraryJsonDir();
|
|
66
|
+
if (!dir)
|
|
67
|
+
return null;
|
|
68
|
+
const indexPath = fs.path.join(dir, "index.json");
|
|
69
|
+
const [indexReadError, indexContent] = await catchError2(fs.readFile(indexPath, "utf-8"));
|
|
70
|
+
if (indexReadError || indexContent === null)
|
|
71
|
+
return null;
|
|
72
|
+
const [indexParseError, parsed] = catchError2(() => JSON.parse(indexContent));
|
|
73
|
+
if (indexParseError || !parsed || !Array.isArray(parsed.entries))
|
|
74
|
+
return null;
|
|
75
|
+
const lowerNodeType = nodeType.toLowerCase();
|
|
76
|
+
let matches = parsed.entries.filter((e) => e.nodeType.toLowerCase() === lowerNodeType);
|
|
77
|
+
if (options?.objectName) {
|
|
78
|
+
const lowerObject = options.objectName.toLowerCase();
|
|
79
|
+
matches = matches.filter((e) => e.objectName.toLowerCase() === lowerObject);
|
|
80
|
+
}
|
|
81
|
+
if (matches.length !== 1)
|
|
82
|
+
return null;
|
|
83
|
+
const entry = matches[0];
|
|
84
|
+
const v1defPath = fs.path.join(dir, entry.path.replace(/\.json$/, ".v1def.json"));
|
|
85
|
+
const [readError, content] = await catchError2(fs.readFile(v1defPath, "utf-8"));
|
|
86
|
+
if (readError || content === null)
|
|
87
|
+
return null;
|
|
88
|
+
const [parseError, manifest] = catchError2(() => JSON.parse(content));
|
|
89
|
+
if (parseError || !manifest)
|
|
90
|
+
return null;
|
|
91
|
+
return manifest;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ../maestro-sdk/src/registry/node-storage.ts
|
|
95
|
+
var CACHE_FORMAT_VERSION = 8;
|
|
96
|
+
var INDEX_FILE = "index.json";
|
|
97
|
+
var METADATA_FILE = "index.meta.json";
|
|
98
|
+
var SEARCH_INDEX_FILE = "search-index.json";
|
|
99
|
+
var ESSENTIALS_INDEX_FILE = "get-essentials.json";
|
|
100
|
+
var WRITE_LOCK_FILE = ".index-write.lock";
|
|
101
|
+
var CONNECTOR_FETCH_FILE = "connector-nodes.json";
|
|
102
|
+
var MISS_REFRESH_PREFIX = "miss-refresh-";
|
|
103
|
+
function nodeCacheScope(login) {
|
|
104
|
+
const baseUrl = login.baseUrl?.trim().replace(/\/+$/, "");
|
|
105
|
+
const organizationId = login.organizationId?.trim();
|
|
106
|
+
const tenantId = login.tenantId?.trim();
|
|
107
|
+
if (!baseUrl || !organizationId || !tenantId)
|
|
108
|
+
return;
|
|
109
|
+
return [baseUrl, organizationId, tenantId].join("|").toLowerCase();
|
|
110
|
+
}
|
|
111
|
+
async function saveConnectorFetch(scope, options, result) {
|
|
112
|
+
const fs = getFileSystem();
|
|
113
|
+
const dir = await resolveNodeStorageDir();
|
|
114
|
+
await fs.mkdir(dir);
|
|
115
|
+
await writeTempAndRename(fs, fs.path.join(dir, CONNECTOR_FETCH_FILE), JSON.stringify({
|
|
116
|
+
cacheVersion: CACHE_FORMAT_VERSION,
|
|
117
|
+
scope,
|
|
118
|
+
options,
|
|
119
|
+
fetchedAt: Date.now(),
|
|
120
|
+
result
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
async function loadConnectorFetch(scope, options) {
|
|
124
|
+
const fs = getFileSystem();
|
|
125
|
+
const path = fs.path.join(await resolveNodeStorageDir(), CONNECTOR_FETCH_FILE);
|
|
126
|
+
const [readError, content] = await catchError2(fs.readFile(path, "utf-8"));
|
|
127
|
+
if (readError || content === null)
|
|
128
|
+
return null;
|
|
129
|
+
const [parseError, record] = catchError2(() => JSON.parse(content));
|
|
130
|
+
if (parseError || !record || record.cacheVersion !== CACHE_FORMAT_VERSION || record.scope !== scope || record.options !== options || typeof record.fetchedAt !== "number" || !record.result) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
return { fetchedAt: record.fetchedAt, result: record.result };
|
|
134
|
+
}
|
|
135
|
+
async function missRefreshPath(fs, scope) {
|
|
136
|
+
const name = `${MISS_REFRESH_PREFIX}${(await hashContent(scope)).slice(0, 16)}.json`;
|
|
137
|
+
return fs.path.join(await resolveNodeStorageDir(), name);
|
|
138
|
+
}
|
|
139
|
+
async function loadMissRefreshAt(scope) {
|
|
140
|
+
const fs = getFileSystem();
|
|
141
|
+
const [readError, content] = await catchError2(fs.readFile(await missRefreshPath(fs, scope), "utf-8"));
|
|
142
|
+
if (readError || content === null)
|
|
143
|
+
return;
|
|
144
|
+
const [parseError, record] = catchError2(() => JSON.parse(content));
|
|
145
|
+
if (parseError || record?.scope !== scope)
|
|
146
|
+
return;
|
|
147
|
+
return typeof record.at === "number" ? record.at : undefined;
|
|
148
|
+
}
|
|
149
|
+
async function saveMissRefreshAt(scope, at) {
|
|
150
|
+
const fs = getFileSystem();
|
|
151
|
+
await fs.mkdir(await resolveNodeStorageDir());
|
|
152
|
+
await writeTempAndRename(fs, await missRefreshPath(fs, scope), JSON.stringify({ scope, at }));
|
|
153
|
+
}
|
|
154
|
+
async function resolveNodeStorageDir() {
|
|
155
|
+
const fs = getFileSystem();
|
|
156
|
+
return fs.path.join(fs.env.homedir(), UIPATH_HOME_DIR2, "nodes");
|
|
157
|
+
}
|
|
158
|
+
function buildSearchIndex(nodes) {
|
|
159
|
+
return nodes.map((node) => ({
|
|
160
|
+
nodeType: node.nodeType,
|
|
161
|
+
category: node.category,
|
|
162
|
+
tags: node.tags,
|
|
163
|
+
version: node.version,
|
|
164
|
+
description: node.description,
|
|
165
|
+
display: node.display === undefined ? undefined : {
|
|
166
|
+
label: node.display.label,
|
|
167
|
+
description: node.display.description
|
|
168
|
+
}
|
|
169
|
+
}));
|
|
170
|
+
}
|
|
171
|
+
function isEssentialNodeType(nodeType) {
|
|
172
|
+
if (typeof nodeType !== "string" || nodeType.length === 0)
|
|
173
|
+
return false;
|
|
174
|
+
const lowerNodeType = nodeType.toLowerCase();
|
|
175
|
+
return lowerNodeType.startsWith("core.") || lowerNodeType.startsWith("uipath.core.") || lowerNodeType === "uipath.human-in-the-loop";
|
|
176
|
+
}
|
|
177
|
+
function buildEssentialsIndex(nodes) {
|
|
178
|
+
return nodes.filter((node) => isEssentialNodeType(node.nodeType));
|
|
179
|
+
}
|
|
180
|
+
function createDerivedArtifact(nodes, sourceHash) {
|
|
181
|
+
return {
|
|
182
|
+
cacheVersion: CACHE_FORMAT_VERSION,
|
|
183
|
+
sourceHash,
|
|
184
|
+
generatedAt: Date.now(),
|
|
185
|
+
nodes
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function normalizeMetadata(metadata) {
|
|
189
|
+
return {
|
|
190
|
+
...metadata,
|
|
191
|
+
cacheVersion: metadata.cacheVersion ?? 0
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
async function writeTempAndRename(fs, targetPath, content) {
|
|
195
|
+
const tempPath = `${targetPath}.tmp-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
196
|
+
await fs.writeFile(tempPath, content);
|
|
197
|
+
await fs.rename(tempPath, targetPath);
|
|
198
|
+
}
|
|
199
|
+
async function writeNodeArtifacts(fs, dir, nodes, scope, missingSources, syncedAt) {
|
|
200
|
+
const indexPath = fs.path.join(dir, INDEX_FILE);
|
|
201
|
+
const searchIndexPath = fs.path.join(dir, SEARCH_INDEX_FILE);
|
|
202
|
+
const essentialsIndexPath = fs.path.join(dir, ESSENTIALS_INDEX_FILE);
|
|
203
|
+
const metaPath = fs.path.join(dir, METADATA_FILE);
|
|
204
|
+
const indexContent = JSON.stringify(nodes);
|
|
205
|
+
const hash = await hashContent(indexContent);
|
|
206
|
+
const searchContent = JSON.stringify(createDerivedArtifact(buildSearchIndex(nodes), hash));
|
|
207
|
+
const essentialsContent = JSON.stringify(createDerivedArtifact(buildEssentialsIndex(nodes), hash));
|
|
208
|
+
const metadataContent = JSON.stringify({
|
|
209
|
+
lastSync: syncedAt,
|
|
210
|
+
nodeCount: nodes.length,
|
|
211
|
+
hash,
|
|
212
|
+
cacheVersion: CACHE_FORMAT_VERSION,
|
|
213
|
+
...scope && { scope },
|
|
214
|
+
...missingSources?.length && { missingSources }
|
|
215
|
+
});
|
|
216
|
+
await writeTempAndRename(fs, searchIndexPath, searchContent);
|
|
217
|
+
await writeTempAndRename(fs, essentialsIndexPath, essentialsContent);
|
|
218
|
+
await writeTempAndRename(fs, indexPath, indexContent);
|
|
219
|
+
await writeTempAndRename(fs, metaPath, metadataContent);
|
|
220
|
+
return nodes.length;
|
|
221
|
+
}
|
|
222
|
+
async function commitNodeIndexUnderLock(nodes, scope, missingSources, protectExistingSources = false, syncedAt = Date.now()) {
|
|
223
|
+
const fs = getFileSystem();
|
|
224
|
+
const dir = await resolveNodeStorageDir();
|
|
225
|
+
await fs.mkdir(dir);
|
|
226
|
+
const releaseLock = await fs.acquireLock(fs.path.join(dir, WRITE_LOCK_FILE));
|
|
227
|
+
const [writeError, result] = await catchError2((async () => {
|
|
228
|
+
const current = await loadIndexMetadata();
|
|
229
|
+
const scopedSnapshot = scope !== undefined && current?.scope === scope ? await loadScopedNodeIndex(scope) : null;
|
|
230
|
+
if (protectExistingSources && scopedSnapshot !== null) {
|
|
231
|
+
const previouslyMissing = new Set(scopedSnapshot.metadata.missingSources?.map((failure) => failure.source) ?? []);
|
|
232
|
+
const newlyMissingSources = missingSources?.filter((failure) => !previouslyMissing.has(failure.source)) ?? [];
|
|
233
|
+
if (newlyMissingSources.length > 0) {
|
|
234
|
+
return { committed: false, newlyMissingSources };
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const hash = await hashContent(JSON.stringify(nodes));
|
|
238
|
+
if (current && current.cacheVersion === CACHE_FORMAT_VERSION && current.hash === hash && current.scope === scope && (scope === undefined || scopedSnapshot !== null) && await areDerivedArtifactsCurrent()) {
|
|
239
|
+
const { missingSources: _previous, ...rest } = current;
|
|
240
|
+
await writeTempAndRename(fs, fs.path.join(dir, METADATA_FILE), JSON.stringify({
|
|
241
|
+
...rest,
|
|
242
|
+
cacheVersion: CACHE_FORMAT_VERSION,
|
|
243
|
+
lastSync: syncedAt,
|
|
244
|
+
...missingSources?.length && { missingSources }
|
|
245
|
+
}));
|
|
246
|
+
return {
|
|
247
|
+
committed: true,
|
|
248
|
+
nodeCount: current.nodeCount
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
return {
|
|
252
|
+
committed: true,
|
|
253
|
+
nodeCount: await writeNodeArtifacts(fs, dir, nodes, scope, missingSources, syncedAt)
|
|
254
|
+
};
|
|
255
|
+
})());
|
|
256
|
+
const [releaseError] = await catchError2(releaseLock());
|
|
257
|
+
if (writeError)
|
|
258
|
+
throw writeError;
|
|
259
|
+
if (releaseError)
|
|
260
|
+
throw releaseError;
|
|
261
|
+
return result;
|
|
262
|
+
}
|
|
263
|
+
async function commitNodeIndex(nodes, scope, missingSources) {
|
|
264
|
+
const result = await commitNodeIndexUnderLock(nodes, scope, missingSources);
|
|
265
|
+
if (!result.committed)
|
|
266
|
+
throw new Error("Unexpected refused node index commit");
|
|
267
|
+
return result.nodeCount;
|
|
268
|
+
}
|
|
269
|
+
async function commitNodeIndexForReader(nodes, scope, missingSources, syncedAt) {
|
|
270
|
+
return commitNodeIndexUnderLock(nodes, scope, missingSources, true, syncedAt);
|
|
271
|
+
}
|
|
272
|
+
async function loadScopedNodeIndex(scope) {
|
|
273
|
+
const metadata = await loadIndexMetadata();
|
|
274
|
+
if (!metadata || metadata.cacheVersion !== CACHE_FORMAT_VERSION || metadata.scope !== scope) {
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
277
|
+
const fs = getFileSystem();
|
|
278
|
+
const indexPath = fs.path.join(await resolveNodeStorageDir(), INDEX_FILE);
|
|
279
|
+
const [readError, content] = await catchError2(fs.readFile(indexPath, "utf-8"));
|
|
280
|
+
if (readError || content === null)
|
|
281
|
+
return null;
|
|
282
|
+
if (await hashContent(content) !== metadata.hash)
|
|
283
|
+
return null;
|
|
284
|
+
const [parseError, nodes] = catchError2(() => JSON.parse(content));
|
|
285
|
+
if (parseError || !Array.isArray(nodes))
|
|
286
|
+
return null;
|
|
287
|
+
return { nodes, metadata };
|
|
288
|
+
}
|
|
289
|
+
async function loadNodeIndex() {
|
|
290
|
+
const fs = getFileSystem();
|
|
291
|
+
const dir = await resolveNodeStorageDir();
|
|
292
|
+
const indexPath = fs.path.join(dir, INDEX_FILE);
|
|
293
|
+
if (!await fs.exists(indexPath)) {
|
|
294
|
+
throw new Error("No node index found. Please run 'uip [flow|maestro] registry pull' to sync nodes first.");
|
|
295
|
+
}
|
|
296
|
+
const metadata = await loadIndexMetadata();
|
|
297
|
+
if (!metadata || metadata.cacheVersion !== CACHE_FORMAT_VERSION) {
|
|
298
|
+
throw new Error("Node index is outdated. Please run 'uip [flow|maestro] registry pull' to sync nodes first.");
|
|
299
|
+
}
|
|
300
|
+
const [error, content] = await catchError2(fs.readFile(indexPath, "utf-8"));
|
|
301
|
+
if (error) {
|
|
302
|
+
throw new Error(`Failed to load node index: ${error.message}`);
|
|
303
|
+
}
|
|
304
|
+
if (content === null) {
|
|
305
|
+
throw new Error("No node index found. Please run 'uip [flow|maestro] registry pull' to sync nodes first.");
|
|
306
|
+
}
|
|
307
|
+
const [parseError, parsed] = catchError2(() => JSON.parse(content));
|
|
308
|
+
if (parseError) {
|
|
309
|
+
throw new Error(`Failed to load node index: ${parseError.message}`);
|
|
310
|
+
}
|
|
311
|
+
return parsed;
|
|
312
|
+
}
|
|
313
|
+
async function loadIndexMetadata() {
|
|
314
|
+
const fs = getFileSystem();
|
|
315
|
+
const dir = await resolveNodeStorageDir();
|
|
316
|
+
const metaPath = fs.path.join(dir, METADATA_FILE);
|
|
317
|
+
if (!await fs.exists(metaPath)) {
|
|
318
|
+
return null;
|
|
319
|
+
}
|
|
320
|
+
const [error, content] = await catchError2(fs.readFile(metaPath, "utf-8"));
|
|
321
|
+
if (error || content === null) {
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
const [parseError, parsed] = catchError2(() => JSON.parse(content));
|
|
325
|
+
if (parseError || parsed === null) {
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
return normalizeMetadata(parsed);
|
|
329
|
+
}
|
|
330
|
+
function isDerivedArtifact(value) {
|
|
331
|
+
if (typeof value !== "object" || value === null)
|
|
332
|
+
return false;
|
|
333
|
+
const artifact = value;
|
|
334
|
+
return typeof artifact.cacheVersion === "number" && typeof artifact.sourceHash === "string" && typeof artifact.generatedAt === "number" && Array.isArray(artifact.nodes);
|
|
335
|
+
}
|
|
336
|
+
async function loadValidDerivedArtifact(fileName, scope) {
|
|
337
|
+
const fs = getFileSystem();
|
|
338
|
+
const dir = await resolveNodeStorageDir();
|
|
339
|
+
const indexPath = fs.path.join(dir, INDEX_FILE);
|
|
340
|
+
if (!await fs.exists(indexPath)) {
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
343
|
+
const metadata = await loadIndexMetadata();
|
|
344
|
+
if (!metadata || metadata.cacheVersion !== CACHE_FORMAT_VERSION || typeof metadata.hash !== "string" || scope !== undefined && metadata.scope !== scope) {
|
|
345
|
+
return null;
|
|
346
|
+
}
|
|
347
|
+
const artifactPath = fs.path.join(dir, fileName);
|
|
348
|
+
const [readError, content] = await catchError2(fs.readFile(artifactPath, "utf-8"));
|
|
349
|
+
if (readError || content === null) {
|
|
350
|
+
return null;
|
|
351
|
+
}
|
|
352
|
+
const [parseError, parsed] = catchError2(() => JSON.parse(content));
|
|
353
|
+
if (parseError || !isDerivedArtifact(parsed)) {
|
|
354
|
+
return null;
|
|
355
|
+
}
|
|
356
|
+
if (parsed.cacheVersion !== CACHE_FORMAT_VERSION || parsed.sourceHash !== metadata.hash) {
|
|
357
|
+
return null;
|
|
358
|
+
}
|
|
359
|
+
return { nodes: parsed.nodes, metadata };
|
|
360
|
+
}
|
|
361
|
+
async function loadValidSearchIndex() {
|
|
362
|
+
return (await loadValidDerivedArtifact(SEARCH_INDEX_FILE))?.nodes ?? null;
|
|
363
|
+
}
|
|
364
|
+
async function loadValidEssentialsIndex() {
|
|
365
|
+
return (await loadValidDerivedArtifact(ESSENTIALS_INDEX_FILE))?.nodes ?? null;
|
|
366
|
+
}
|
|
367
|
+
async function loadScopedSearchIndex(scope) {
|
|
368
|
+
return loadValidDerivedArtifact(SEARCH_INDEX_FILE, scope);
|
|
369
|
+
}
|
|
370
|
+
async function loadScopedEssentialsIndex(scope) {
|
|
371
|
+
return loadValidDerivedArtifact(ESSENTIALS_INDEX_FILE, scope);
|
|
372
|
+
}
|
|
373
|
+
async function areDerivedArtifactsCurrent() {
|
|
374
|
+
const searchIndex = await loadValidSearchIndex();
|
|
375
|
+
if (searchIndex === null)
|
|
376
|
+
return false;
|
|
377
|
+
const essentialsIndex = await loadValidEssentialsIndex();
|
|
378
|
+
return essentialsIndex !== null;
|
|
379
|
+
}
|
|
380
|
+
async function rederiveNodeIndexArtifacts() {
|
|
381
|
+
const fs = getFileSystem();
|
|
382
|
+
const dir = await resolveNodeStorageDir();
|
|
383
|
+
await fs.mkdir(dir);
|
|
384
|
+
const releaseLock = await fs.acquireLock(fs.path.join(dir, WRITE_LOCK_FILE));
|
|
385
|
+
const [rederiveError, count] = await catchError2((async () => {
|
|
386
|
+
const nodes = await loadNodeIndex();
|
|
387
|
+
const metadata = await loadIndexMetadata();
|
|
388
|
+
const hash = await hashContent(JSON.stringify(nodes));
|
|
389
|
+
const sameNodes = metadata !== null && metadata.hash === hash;
|
|
390
|
+
const scope = sameNodes ? metadata.scope : undefined;
|
|
391
|
+
return writeNodeArtifacts(fs, dir, nodes, scope, sameNodes ? metadata.missingSources : undefined, Date.now());
|
|
392
|
+
})());
|
|
393
|
+
const [releaseError] = await catchError2(releaseLock());
|
|
394
|
+
if (rederiveError)
|
|
395
|
+
throw rederiveError;
|
|
396
|
+
if (releaseError)
|
|
397
|
+
throw releaseError;
|
|
398
|
+
return count;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// ../maestro-sdk/src/registry/node-sync-service.ts
|
|
402
|
+
var MANIFEST_VALIDATION_SOURCE = "manifest validation";
|
|
403
|
+
var MANIFEST_VALIDATION_NEXT_STEP2 = "Fix or remove the tenant resource named in the validation error, then run 'registry pull' again.";
|
|
404
|
+
var TENANT_MANIFEST_INVALID = "TenantManifestInvalid";
|
|
405
|
+
|
|
406
|
+
class TenantManifestInvalidError2 extends Error {
|
|
407
|
+
code = TENANT_MANIFEST_INVALID;
|
|
408
|
+
ootbNodes;
|
|
409
|
+
constructor(failures, ootbNodes = []) {
|
|
410
|
+
super(`The tenant manifest failed validation, so only OOTB nodes are available (${failures.map((f) => `${f.source}: ${f.reason}`).join("; ")}). ${MANIFEST_VALIDATION_NEXT_STEP2}`);
|
|
411
|
+
this.name = "TenantManifestInvalidError";
|
|
412
|
+
this.ootbNodes = ootbNodes;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
function isTenantManifestInvalidError2(error) {
|
|
416
|
+
return error instanceof Error && error.code === TENANT_MANIFEST_INVALID;
|
|
417
|
+
}
|
|
418
|
+
var TENANT_MANIFEST_UNAVAILABLE = "TenantManifestUnavailable";
|
|
419
|
+
|
|
420
|
+
class PartialNodeSourcesError extends Error {
|
|
421
|
+
errorCode;
|
|
422
|
+
retry;
|
|
423
|
+
constructor(failures) {
|
|
424
|
+
super(`Unavailable node sources: ${failures.map((failure) => `${failure.source}: ${failure.reason}`).join("; ")}`);
|
|
425
|
+
this.name = "PartialNodeSourcesError";
|
|
426
|
+
this.errorCode = failures.some((failure) => /(?:\bHTTP\s+|\bfetch failed:\s*)401\b/i.test(failure.reason)) ? "authentication_required" : failures.some((failure) => /(?:\bHTTP\s+|\bfetch failed:\s*)403\b/i.test(failure.reason)) ? "permission_denied" : undefined;
|
|
427
|
+
this.retry = this.errorCode ? "RetryWillNotFix" : "RetryLater";
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
class TenantManifestUnavailableError2 extends Error {
|
|
432
|
+
code = TENANT_MANIFEST_UNAVAILABLE;
|
|
433
|
+
errorCode;
|
|
434
|
+
retry;
|
|
435
|
+
ootbNodes;
|
|
436
|
+
constructor(cause, ootbNodes = []) {
|
|
437
|
+
const inferred = classifyThrownError(cause);
|
|
438
|
+
const nextStep = inferred.errorCode === "authentication_required" ? "Run 'uip login', then run the command again." : inferred.errorCode === "permission_denied" ? "Ask for access to the missing node sources, then run the command again." : "Check your connection and run the command again; if your session expired, run 'uip login' first.";
|
|
439
|
+
const partialCacheStep = cause instanceof PartialNodeSourcesError ? " If this persists, run 'uip maestro flow registry pull --force' to cache the nodes that are available." : "";
|
|
440
|
+
super(`Could not refresh this tenant's nodes (${describeFailureReason(cause)}), so only OOTB nodes are available. ${nextStep}${partialCacheStep}`, { cause });
|
|
441
|
+
this.name = "TenantManifestUnavailableError";
|
|
442
|
+
this.ootbNodes = ootbNodes;
|
|
443
|
+
this.errorCode = inferred.errorCode;
|
|
444
|
+
this.retry = inferred.errorCode === "unknown_error" ? "RetryLater" : inferred.retry;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function isTenantManifestUnavailableError2(error) {
|
|
448
|
+
return error instanceof Error && error.code === TENANT_MANIFEST_UNAVAILABLE;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
class SessionExpiredError extends Error {
|
|
452
|
+
errorCode = "authentication_required";
|
|
453
|
+
retry = "RetryWillNotFix";
|
|
454
|
+
constructor(loginStatus) {
|
|
455
|
+
super(loginStatus === "Refresh Failed" ? "your session could not be refreshed" : "your session expired");
|
|
456
|
+
this.name = "SessionExpiredError";
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
var MAX_FAILURE_REASON_LENGTH = 500;
|
|
460
|
+
function stringifyReason(reason) {
|
|
461
|
+
if (reason instanceof Error)
|
|
462
|
+
return reason.message;
|
|
463
|
+
if (typeof reason === "string")
|
|
464
|
+
return reason;
|
|
465
|
+
try {
|
|
466
|
+
return JSON.stringify(reason) ?? String(reason);
|
|
467
|
+
} catch {
|
|
468
|
+
return String(reason);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
function describeFailureReason(reason) {
|
|
472
|
+
const text = stringifyReason(reason);
|
|
473
|
+
return text.length > MAX_FAILURE_REASON_LENGTH ? `${text.slice(0, MAX_FAILURE_REASON_LENGTH)}...` : text;
|
|
474
|
+
}
|
|
475
|
+
function toPullFailures(failures) {
|
|
476
|
+
return failures.map((failure) => ({
|
|
477
|
+
source: failure.source,
|
|
478
|
+
reason: describeFailureReason(failure.reason)
|
|
479
|
+
}));
|
|
480
|
+
}
|
|
481
|
+
var CACHE_EXPIRATION = 30 * 60 * 1000;
|
|
482
|
+
async function readLoginStatus() {
|
|
483
|
+
const [loginError, loginStatus] = await catchError2(getLoginStatusAsync2());
|
|
484
|
+
return loginError ? { loginStatus: "Not logged in" } : loginStatus;
|
|
485
|
+
}
|
|
486
|
+
function hasRemoteSession(loginStatus) {
|
|
487
|
+
return loginStatus.loginStatus === "Logged in" && !!loginStatus.baseUrl && !!loginStatus.accessToken && !!loginStatus.tenantId && !!loginStatus.organizationId;
|
|
488
|
+
}
|
|
489
|
+
async function gatedNodeFailure2(nodeType) {
|
|
490
|
+
if (!hasRemoteSession(await readLoginStatus())) {
|
|
491
|
+
return {
|
|
492
|
+
message: `Node type '${nodeType}' is not in the built-in registry, and the tenant's nodes were not checked.`,
|
|
493
|
+
instructions: "Run 'uip login' and select a tenant, then run the command again.",
|
|
494
|
+
errorCode: "authentication_required"
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
return {
|
|
498
|
+
message: `Node type '${nodeType}' is not enabled for this tenant.`,
|
|
499
|
+
instructions: "Ask an admin to enable the feature flag for this node type, " + "or run `uip maestro flow registry list` to see every " + "known type with its `AvailableOnTenant` flag.",
|
|
500
|
+
errorCode: "not_enabled"
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
function loginScope(loginStatus) {
|
|
504
|
+
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.accessToken) {
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
return nodeCacheScope(loginStatus);
|
|
508
|
+
}
|
|
509
|
+
function isFreshFor(meta, scope) {
|
|
510
|
+
return meta !== null && scope !== undefined && meta.scope === scope && Date.now() - meta.lastSync < CACHE_EXPIRATION;
|
|
511
|
+
}
|
|
512
|
+
function isMissingIndexError(error) {
|
|
513
|
+
return error.message.includes("No node index found") || error.message.includes("Node index is outdated");
|
|
514
|
+
}
|
|
515
|
+
async function pullNodes2(options = {}) {
|
|
516
|
+
const { force = false } = options;
|
|
517
|
+
const loginStatus = await getLoginStatusAsync2();
|
|
518
|
+
if (force) {
|
|
519
|
+
const refreshResult = await refreshNodes(loginStatus);
|
|
520
|
+
const meta = await loadIndexMetadata();
|
|
521
|
+
return {
|
|
522
|
+
syncedCount: refreshResult.nodeCount || meta?.nodeCount || 0,
|
|
523
|
+
fromCache: false,
|
|
524
|
+
source: refreshResult.source,
|
|
525
|
+
cacheWritten: refreshResult.cacheWritten,
|
|
526
|
+
info: refreshResult.info,
|
|
527
|
+
failures: refreshResult.failures,
|
|
528
|
+
missingSources: refreshResult.missingSources
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
const meta = await loadIndexMetadata();
|
|
532
|
+
const scope = loginScope(loginStatus);
|
|
533
|
+
if (meta) {
|
|
534
|
+
const ageMs = Date.now() - meta.lastSync;
|
|
535
|
+
let needsRefresh = false;
|
|
536
|
+
if (isFreshFor(meta, scope)) {
|
|
537
|
+
let syncedCount = meta.nodeCount;
|
|
538
|
+
if (!await areDerivedArtifactsCurrent()) {
|
|
539
|
+
const [rederiveError, nodeCount] = await catchError2(rederiveNodeIndexArtifacts());
|
|
540
|
+
if (rederiveError) {
|
|
541
|
+
if (!isMissingIndexError(rederiveError)) {
|
|
542
|
+
throw rederiveError;
|
|
543
|
+
}
|
|
544
|
+
needsRefresh = true;
|
|
545
|
+
} else {
|
|
546
|
+
syncedCount = nodeCount;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
const current = await loadIndexMetadata();
|
|
550
|
+
if (!needsRefresh && isFreshFor(current, scope)) {
|
|
551
|
+
return {
|
|
552
|
+
syncedCount,
|
|
553
|
+
fromCache: true,
|
|
554
|
+
ageMinutes: Math.round(ageMs / 60000),
|
|
555
|
+
missingSources: current.missingSources
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
const refreshResult = await refreshNodes(loginStatus);
|
|
561
|
+
const refreshedMeta = await loadIndexMetadata();
|
|
562
|
+
return {
|
|
563
|
+
syncedCount: refreshResult.nodeCount || refreshedMeta?.nodeCount || 0,
|
|
564
|
+
fromCache: false,
|
|
565
|
+
source: refreshResult.source,
|
|
566
|
+
cacheWritten: refreshResult.cacheWritten,
|
|
567
|
+
info: refreshResult.info,
|
|
568
|
+
failures: refreshResult.failures,
|
|
569
|
+
missingSources: refreshResult.missingSources
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
async function refreshNodes(loginStatus) {
|
|
573
|
+
const pullResult = await pullRemoteNodes2(loginStatus);
|
|
574
|
+
if (!pullResult.cacheable) {
|
|
575
|
+
return {
|
|
576
|
+
cacheWritten: false,
|
|
577
|
+
nodeCount: pullResult.nodes.length,
|
|
578
|
+
source: pullResult.source,
|
|
579
|
+
info: pullResult.info,
|
|
580
|
+
failures: pullResult.failures
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
const nodeCount = await commitNodeIndex(pullResult.nodes, pullResult.scope, pullResult.missingSources);
|
|
584
|
+
return {
|
|
585
|
+
cacheWritten: true,
|
|
586
|
+
nodeCount,
|
|
587
|
+
source: pullResult.source,
|
|
588
|
+
missingSources: pullResult.missingSources
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
var ENABLED_MANIFEST_FLAGS = new Set([
|
|
592
|
+
MANIFEST_FEATURE_FLAGS2.EXTRACT_DOCUMENT,
|
|
593
|
+
MANIFEST_FEATURE_FLAGS2.CONVERSATION_TRIGGER,
|
|
594
|
+
MANIFEST_FEATURE_FLAGS2.CONVERSATIONAL_WAIT_FOR_MESSAGE,
|
|
595
|
+
MANIFEST_FEATURE_FLAGS2.CONVERSATIONAL_SEND_MESSAGE,
|
|
596
|
+
MANIFEST_FEATURE_FLAGS2.CONVERSATIONAL_GET_CONVERSATION_CONTEXT,
|
|
597
|
+
MANIFEST_FEATURE_FLAGS2.READ_ENTITY,
|
|
598
|
+
MANIFEST_FEATURE_FLAGS2.CREATE_ENTITY,
|
|
599
|
+
MANIFEST_FEATURE_FLAGS2.UPDATE_ENTITY,
|
|
600
|
+
MANIFEST_FEATURE_FLAGS2.DELETE_ENTITY,
|
|
601
|
+
MANIFEST_FEATURE_FLAGS2.READ_FILE,
|
|
602
|
+
MANIFEST_FEATURE_FLAGS2.CREATE_FILE
|
|
603
|
+
]);
|
|
604
|
+
async function pullRemoteNodes2(loginStatus, options = {}) {
|
|
605
|
+
const pulled = await pullNodesForEveryRuntime(loginStatus, options);
|
|
606
|
+
return { ...pulled, nodes: selectMaestroNodes(pulled.nodes) };
|
|
607
|
+
}
|
|
608
|
+
function cachingConnectorFetcher(scope, reuse, onReuse = () => {}) {
|
|
609
|
+
return async (config, fetchOptions) => {
|
|
610
|
+
const key = JSON.stringify(fetchOptions);
|
|
611
|
+
if (reuse && scope !== undefined) {
|
|
612
|
+
const [, cached] = await catchError2(loadConnectorFetch(scope, key));
|
|
613
|
+
const age = cached ? Date.now() - cached.fetchedAt : -1;
|
|
614
|
+
if (cached && age >= 0 && age < CACHE_EXPIRATION) {
|
|
615
|
+
onReuse(cached.fetchedAt);
|
|
616
|
+
return cached.result;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
const result = await DEFAULT_FETCHERS2.fetchConnectorNodes(config, fetchOptions);
|
|
620
|
+
if (scope !== undefined) {
|
|
621
|
+
await catchError2(saveConnectorFetch(scope, key, result));
|
|
622
|
+
}
|
|
623
|
+
return result;
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
async function pullNodesForEveryRuntime(loginStatus, options = {}) {
|
|
627
|
+
loginStatus ??= await getLoginStatusAsync2();
|
|
628
|
+
let connectorsFetchedAt;
|
|
629
|
+
const client = new ManifestClient2({
|
|
630
|
+
baseUrl: loginStatus.baseUrl || "localhost",
|
|
631
|
+
getFeatureFlag: (flag) => ENABLED_MANIFEST_FLAGS.has(flag),
|
|
632
|
+
fetchers: {
|
|
633
|
+
fetchConnectorNodes: cachingConnectorFetcher(loginScope(loginStatus), options.reuseConnectors === true, (fetchedAt) => {
|
|
634
|
+
connectorsFetchedAt = fetchedAt;
|
|
635
|
+
})
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
if (loginStatus.loginStatus === "Expired" || loginStatus.loginStatus === "Refresh Failed") {
|
|
639
|
+
const sessionError = new SessionExpiredError(loginStatus.loginStatus);
|
|
640
|
+
const manifest = await client.getManifest({
|
|
641
|
+
inlineAgentNodes: true
|
|
642
|
+
});
|
|
643
|
+
return {
|
|
644
|
+
nodes: manifest.nodes || [],
|
|
645
|
+
source: "ootb",
|
|
646
|
+
cacheable: false,
|
|
647
|
+
info: `Using OOTB nodes because ${sessionError.message}. Run 'uip login' to get this tenant's nodes. Cache was not updated.`,
|
|
648
|
+
refreshError: sessionError
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
if (!hasRemoteSession(loginStatus)) {
|
|
652
|
+
const manifest = await client.getManifest({
|
|
653
|
+
inlineAgentNodes: true
|
|
654
|
+
});
|
|
655
|
+
return {
|
|
656
|
+
nodes: manifest.nodes || [],
|
|
657
|
+
source: "ootb",
|
|
658
|
+
cacheable: false,
|
|
659
|
+
info: "Using OOTB nodes because you are not logged in. Cache was not updated."
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
const authContext = {
|
|
663
|
+
accessToken: loginStatus.accessToken,
|
|
664
|
+
tenantId: loginStatus.tenantId,
|
|
665
|
+
organizationId: loginStatus.organizationId
|
|
666
|
+
};
|
|
667
|
+
const [manifestError, diagnostics] = await catchError2(client.getManifestWithDiagnostics({
|
|
668
|
+
auth: authContext,
|
|
669
|
+
includeIntegrationTriggers: true,
|
|
670
|
+
inlineAgentNodes: true,
|
|
671
|
+
conversationalAgentNodes: true,
|
|
672
|
+
excludeIntsvcConnectorHttpRequest: true
|
|
673
|
+
}));
|
|
674
|
+
if (!manifestError) {
|
|
675
|
+
const nodes = diagnostics.manifest.nodes || [];
|
|
676
|
+
const syncedAt = connectorsFetchedAt !== undefined ? { syncedAt: Math.min(Date.now(), connectorsFetchedAt) } : {};
|
|
677
|
+
if (diagnostics.failures.length === 0) {
|
|
678
|
+
return {
|
|
679
|
+
nodes,
|
|
680
|
+
source: "authenticated",
|
|
681
|
+
cacheable: true,
|
|
682
|
+
scope: nodeCacheScope(loginStatus),
|
|
683
|
+
...syncedAt
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
const failures = toPullFailures(diagnostics.failures);
|
|
687
|
+
const ootbOnly = failures.some((failure) => failure.source === MANIFEST_VALIDATION_SOURCE);
|
|
688
|
+
if (!ootbOnly) {
|
|
689
|
+
return {
|
|
690
|
+
nodes,
|
|
691
|
+
source: "authenticated",
|
|
692
|
+
cacheable: true,
|
|
693
|
+
scope: nodeCacheScope(loginStatus),
|
|
694
|
+
missingSources: failures,
|
|
695
|
+
...syncedAt
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
return {
|
|
699
|
+
nodes,
|
|
700
|
+
source: "ootb",
|
|
701
|
+
cacheable: false,
|
|
702
|
+
failures,
|
|
703
|
+
info: "The tenant manifest failed validation; using OOTB nodes without updating cache."
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
const fallbackManifest = await client.getManifest({
|
|
707
|
+
inlineAgentNodes: true
|
|
708
|
+
});
|
|
709
|
+
return {
|
|
710
|
+
nodes: fallbackManifest.nodes || [],
|
|
711
|
+
source: "ootb",
|
|
712
|
+
cacheable: false,
|
|
713
|
+
info: `Failed to refresh authenticated nodes with error: ${manifestError}. Using OOTB nodes without updating cache.`,
|
|
714
|
+
refreshError: manifestError
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
function missingSourceNames(missingSources) {
|
|
718
|
+
return (missingSources ?? []).map((missing) => missing.source);
|
|
719
|
+
}
|
|
720
|
+
async function getNodesWithCacheFallback() {
|
|
721
|
+
const { nodes, fromCache, failures, refreshError, missingSources } = await loadCurrentTenantNodes2();
|
|
722
|
+
if (failures?.length) {
|
|
723
|
+
throw new TenantManifestInvalidError2(failures, nodes);
|
|
724
|
+
}
|
|
725
|
+
if (refreshError) {
|
|
726
|
+
throw new TenantManifestUnavailableError2(refreshError, nodes);
|
|
727
|
+
}
|
|
728
|
+
return {
|
|
729
|
+
result: nodes,
|
|
730
|
+
missingSources: missingSourceNames(missingSources),
|
|
731
|
+
fromCache
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
var CONNECTOR_CATALOG_PREFIXES = [
|
|
735
|
+
"uipath.connector.",
|
|
736
|
+
AGENT_TOOL_CONNECTOR_NODE_PREFIX2
|
|
737
|
+
];
|
|
738
|
+
function isConnectorCatalogType(lowerNodeType) {
|
|
739
|
+
return CONNECTOR_CATALOG_PREFIXES.some((prefix) => lowerNodeType.startsWith(prefix));
|
|
740
|
+
}
|
|
741
|
+
var MISS_REFRESH_INTERVAL = 60 * 1000;
|
|
742
|
+
async function refreshOnMiss(reuseConnectors) {
|
|
743
|
+
const scope = loginScope(await readLoginStatus());
|
|
744
|
+
if (scope === undefined)
|
|
745
|
+
return null;
|
|
746
|
+
const [, last] = await catchError2(loadMissRefreshAt(scope));
|
|
747
|
+
const age = typeof last === "number" ? Date.now() - last : -1;
|
|
748
|
+
if (age >= 0 && age < MISS_REFRESH_INTERVAL) {
|
|
749
|
+
return null;
|
|
750
|
+
}
|
|
751
|
+
await catchError2(saveMissRefreshAt(scope, Date.now()));
|
|
752
|
+
const [error, refreshed] = await catchError2(loadCurrentTenantNodes2({ force: true, reuseConnectors }));
|
|
753
|
+
if (error || refreshed.failures?.length || refreshed.refreshError) {
|
|
754
|
+
return null;
|
|
755
|
+
}
|
|
756
|
+
return {
|
|
757
|
+
result: refreshed.nodes,
|
|
758
|
+
missingSources: missingSourceNames(refreshed.missingSources)
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
async function loadFreshDerivedIndex(load) {
|
|
762
|
+
const scope = loginScope(await readLoginStatus());
|
|
763
|
+
if (scope === undefined)
|
|
764
|
+
return null;
|
|
765
|
+
const [, cached] = await catchError2(load(scope));
|
|
766
|
+
return cached && isFreshFor(cached.metadata, scope) ? {
|
|
767
|
+
result: cached.nodes,
|
|
768
|
+
missingSources: missingSourceNames(cached.metadata.missingSources)
|
|
769
|
+
} : null;
|
|
770
|
+
}
|
|
771
|
+
async function loadCurrentTenantNodes2(options = {}) {
|
|
772
|
+
const loginStatus = await readLoginStatus();
|
|
773
|
+
const scope = loginScope(loginStatus);
|
|
774
|
+
if (scope !== undefined) {
|
|
775
|
+
const [, scoped] = await catchError2(loadScopedNodeIndex(scope));
|
|
776
|
+
if (!options.force && scoped && isFreshFor(scoped.metadata, scope)) {
|
|
777
|
+
return {
|
|
778
|
+
nodes: scoped.nodes,
|
|
779
|
+
fromCache: true,
|
|
780
|
+
source: "cache",
|
|
781
|
+
missingSources: scoped.metadata.missingSources
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
const pullResult = await pullRemoteNodes2(loginStatus, {
|
|
786
|
+
reuseConnectors: options.reuseConnectors
|
|
787
|
+
});
|
|
788
|
+
if (pullResult.cacheable) {
|
|
789
|
+
const [commitError, commit] = await catchError2(commitNodeIndexForReader(pullResult.nodes, pullResult.scope, pullResult.missingSources, pullResult.syncedAt));
|
|
790
|
+
const unavailableSources = commit && !commit.committed ? commit.newlyMissingSources : commitError ? pullResult.missingSources : undefined;
|
|
791
|
+
if (unavailableSources?.length) {
|
|
792
|
+
if (commit && !commit.committed && scope !== undefined) {
|
|
793
|
+
const [, latest] = await catchError2(loadScopedNodeIndex(scope));
|
|
794
|
+
if (latest && isFreshFor(latest.metadata, scope) && !latest.metadata.missingSources?.length) {
|
|
795
|
+
return {
|
|
796
|
+
nodes: latest.nodes,
|
|
797
|
+
fromCache: true,
|
|
798
|
+
source: "cache"
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
const fallback = await pullRemoteNodes2({
|
|
803
|
+
loginStatus: "Not logged in"
|
|
804
|
+
});
|
|
805
|
+
const refreshError = new PartialNodeSourcesError(unavailableSources);
|
|
806
|
+
return {
|
|
807
|
+
nodes: fallback.nodes,
|
|
808
|
+
fromCache: false,
|
|
809
|
+
source: "ootb",
|
|
810
|
+
refreshError
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
return {
|
|
815
|
+
nodes: pullResult.nodes,
|
|
816
|
+
fromCache: false,
|
|
817
|
+
source: pullResult.source,
|
|
818
|
+
info: pullResult.info,
|
|
819
|
+
failures: pullResult.failures,
|
|
820
|
+
refreshError: pullResult.refreshError,
|
|
821
|
+
missingSources: pullResult.missingSources
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
async function getLocalSolutionSnapshot2() {
|
|
825
|
+
const ctx = await findSolutionFromCwd2();
|
|
826
|
+
if (!ctx) {
|
|
827
|
+
throw new Error("No .uipx solution file found in current directory, its parent, or its grandparent. " + "Run this command from inside a solution project directory.");
|
|
828
|
+
}
|
|
829
|
+
return buildInSolutionNodes2(ctx);
|
|
830
|
+
}
|
|
831
|
+
async function getLocalSolutionNodes() {
|
|
832
|
+
return (await getLocalSolutionSnapshot2()).manifests;
|
|
833
|
+
}
|
|
834
|
+
function localContractWarning2(snapshot, shown) {
|
|
835
|
+
const types = new Set(shown.map((n) => n.nodeType).filter((t) => typeof t === "string").map((t) => t.toLowerCase()));
|
|
836
|
+
return unknownContractWarning2(snapshot.unknownContracts.filter((p) => p.nodeTypes.some((t) => types.has(t.toLowerCase()))));
|
|
837
|
+
}
|
|
838
|
+
function filterNodesByKeyword2(nodes, keyword) {
|
|
839
|
+
const lowerKeyword = keyword.toLowerCase();
|
|
840
|
+
return nodes.filter((node) => {
|
|
841
|
+
if (node.nodeType?.toLowerCase().includes(lowerKeyword)) {
|
|
842
|
+
return true;
|
|
843
|
+
}
|
|
844
|
+
if (node.category?.toLowerCase().includes(lowerKeyword)) {
|
|
845
|
+
return true;
|
|
846
|
+
}
|
|
847
|
+
if (node.tags?.some((tag) => tag.toLowerCase().includes(lowerKeyword))) {
|
|
848
|
+
return true;
|
|
849
|
+
}
|
|
850
|
+
if (node.display?.label?.toLowerCase().includes(lowerKeyword)) {
|
|
851
|
+
return true;
|
|
852
|
+
}
|
|
853
|
+
if (node.description?.toLowerCase().includes(lowerKeyword)) {
|
|
854
|
+
return true;
|
|
855
|
+
}
|
|
856
|
+
if (node.display?.description?.toLowerCase().includes(lowerKeyword)) {
|
|
857
|
+
return true;
|
|
858
|
+
}
|
|
859
|
+
return false;
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
function findNodeByType2(nodes, nodeType) {
|
|
863
|
+
const lowerNodeType = nodeType.toLowerCase();
|
|
864
|
+
return nodes.find((node) => node.nodeType?.toLowerCase() === lowerNodeType) ?? null;
|
|
865
|
+
}
|
|
866
|
+
async function listNodes2(options) {
|
|
867
|
+
if (options?.local)
|
|
868
|
+
return getLocalSolutionNodes();
|
|
869
|
+
return (await listNodesWithDiagnostics2()).result;
|
|
870
|
+
}
|
|
871
|
+
async function listNodesWithDiagnostics2() {
|
|
872
|
+
const precacheEntries = await listPrecacheEntries();
|
|
873
|
+
const snapshot = await getNodesWithCacheFallback();
|
|
874
|
+
const registryCacheNodes = snapshot.result;
|
|
875
|
+
if (precacheEntries.length === 0)
|
|
876
|
+
return snapshot;
|
|
877
|
+
const byType = new Map;
|
|
878
|
+
for (const entry of precacheEntries) {
|
|
879
|
+
const key = entry.nodeType.toLowerCase();
|
|
880
|
+
const bucket = byType.get(key) ?? [];
|
|
881
|
+
bucket.push(entry);
|
|
882
|
+
byType.set(key, bucket);
|
|
883
|
+
}
|
|
884
|
+
const uniquePrecache = [];
|
|
885
|
+
for (const [, entries] of byType) {
|
|
886
|
+
if (entries.length !== 1)
|
|
887
|
+
continue;
|
|
888
|
+
uniquePrecache.push(entries[0]);
|
|
889
|
+
}
|
|
890
|
+
const precacheTypes = new Set(uniquePrecache.map((e) => e.nodeType.toLowerCase()));
|
|
891
|
+
const merged = registryCacheNodes.filter((n) => typeof n.nodeType !== "string" || !precacheTypes.has(n.nodeType.toLowerCase()));
|
|
892
|
+
for (const entry of uniquePrecache) {
|
|
893
|
+
merged.push({
|
|
894
|
+
nodeType: entry.nodeType,
|
|
895
|
+
version: entry.version,
|
|
896
|
+
category: "connector",
|
|
897
|
+
tags: ["connector"],
|
|
898
|
+
display: { label: entry.label }
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
return { result: merged, missingSources: snapshot.missingSources };
|
|
902
|
+
}
|
|
903
|
+
function unionWithKnownSdkNodes(tenantNodes) {
|
|
904
|
+
const seen = new Set;
|
|
905
|
+
const result = [];
|
|
906
|
+
for (const node of tenantNodes) {
|
|
907
|
+
const type = typeof node.nodeType === "string" ? node.nodeType.toLowerCase() : null;
|
|
908
|
+
if (type !== null) {
|
|
909
|
+
if (seen.has(type))
|
|
910
|
+
continue;
|
|
911
|
+
seen.add(type);
|
|
912
|
+
}
|
|
913
|
+
result.push(node);
|
|
914
|
+
}
|
|
915
|
+
for (const known of listKnownSdkNodes2()) {
|
|
916
|
+
const type = typeof known.nodeType === "string" ? known.nodeType.toLowerCase() : null;
|
|
917
|
+
if (type === null || seen.has(type))
|
|
918
|
+
continue;
|
|
919
|
+
seen.add(type);
|
|
920
|
+
result.push(known);
|
|
921
|
+
}
|
|
922
|
+
return result;
|
|
923
|
+
}
|
|
924
|
+
async function loadSearchSummariesWithCacheFallback() {
|
|
925
|
+
const cached = await loadFreshDerivedIndex(loadScopedSearchIndex);
|
|
926
|
+
if (cached)
|
|
927
|
+
return { ...cached, fromCache: true };
|
|
928
|
+
const snapshot = await getNodesWithCacheFallback();
|
|
929
|
+
return {
|
|
930
|
+
result: buildSearchIndex(snapshot.result),
|
|
931
|
+
missingSources: snapshot.missingSources,
|
|
932
|
+
fromCache: snapshot.fromCache
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
async function searchNodeSummariesWithAvailabilityAndDiagnostics2(keyword, filters) {
|
|
936
|
+
const snapshot = await loadSearchSummariesWithCacheFallback();
|
|
937
|
+
const found = searchSummaries(snapshot.result, keyword, filters);
|
|
938
|
+
if (found.length > 0 || !snapshot.fromCache || !keyword && !filters) {
|
|
939
|
+
return { result: found, missingSources: snapshot.missingSources };
|
|
940
|
+
}
|
|
941
|
+
const refreshed = await refreshOnMiss(false);
|
|
942
|
+
return refreshed ? {
|
|
943
|
+
result: searchSummaries(buildSearchIndex(refreshed.result), keyword, filters),
|
|
944
|
+
missingSources: refreshed.missingSources
|
|
945
|
+
} : { result: found, missingSources: snapshot.missingSources };
|
|
946
|
+
}
|
|
947
|
+
function searchSummaries(tenantNodes, keyword, filters) {
|
|
948
|
+
const tenantTypes = new Set(tenantNodes.map((node) => node.nodeType?.toLowerCase()).filter((type) => typeof type === "string"));
|
|
949
|
+
const merged = tenantNodes.map((node) => ({
|
|
950
|
+
node,
|
|
951
|
+
availableOnTenant: true
|
|
952
|
+
}));
|
|
953
|
+
for (const knownNode of listKnownSdkNodes2()) {
|
|
954
|
+
const type = knownNode.nodeType?.toLowerCase();
|
|
955
|
+
if (typeof type !== "string" || tenantTypes.has(type))
|
|
956
|
+
continue;
|
|
957
|
+
tenantTypes.add(type);
|
|
958
|
+
merged.push({
|
|
959
|
+
node: buildSearchIndex([knownNode])[0],
|
|
960
|
+
availableOnTenant: false
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
const availabilityByType = new Map(merged.map((entry) => typeof entry.node.nodeType === "string" ? [
|
|
964
|
+
entry.node.nodeType.toLowerCase(),
|
|
965
|
+
entry.availableOnTenant
|
|
966
|
+
] : null).filter((entry) => entry !== null));
|
|
967
|
+
return searchWithFilters2(merged.map((entry) => entry.node), keyword, filters).map((node) => ({
|
|
968
|
+
node,
|
|
969
|
+
availableOnTenant: typeof node.nodeType === "string" ? availabilityByType.get(node.nodeType.toLowerCase()) ?? true : true
|
|
970
|
+
}));
|
|
971
|
+
}
|
|
972
|
+
async function searchNodes2(keyword, options) {
|
|
973
|
+
let nodes;
|
|
974
|
+
if (options?.local) {
|
|
975
|
+
nodes = await getLocalSolutionNodes();
|
|
976
|
+
} else {
|
|
977
|
+
const tenantNodes = await getNodesWithCacheFallback();
|
|
978
|
+
nodes = unionWithKnownSdkNodes(tenantNodes.result);
|
|
979
|
+
}
|
|
980
|
+
return filterNodesByKeyword2(nodes, keyword);
|
|
981
|
+
}
|
|
982
|
+
async function getNode2(nodeType, options) {
|
|
983
|
+
return (await getNodeWithDiagnostics(nodeType, options)).result;
|
|
984
|
+
}
|
|
985
|
+
async function getNodeWithDiagnostics(nodeType, options) {
|
|
986
|
+
const lowerNodeType = nodeType.toLowerCase();
|
|
987
|
+
if (!options?.local && lowerNodeType.startsWith("uipath.connector.")) {
|
|
988
|
+
const precached = await getPrecacheNode(nodeType);
|
|
989
|
+
if (precached)
|
|
990
|
+
return { result: precached, missingSources: [] };
|
|
991
|
+
}
|
|
992
|
+
if (!options?.local && isEssentialNodeType(nodeType)) {
|
|
993
|
+
const essentials = await loadFreshDerivedIndex(loadScopedEssentialsIndex);
|
|
994
|
+
const node = essentials?.result.find((node) => node.nodeType?.toLowerCase() === lowerNodeType) ?? null;
|
|
995
|
+
if (node) {
|
|
996
|
+
return {
|
|
997
|
+
result: node,
|
|
998
|
+
missingSources: essentials?.missingSources ?? []
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
if (options?.local) {
|
|
1003
|
+
return {
|
|
1004
|
+
result: findNodeByType2(await getLocalSolutionNodes(), nodeType),
|
|
1005
|
+
missingSources: []
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
const [error, snapshot] = await catchError2(getNodesWithCacheFallback());
|
|
1009
|
+
if (error) {
|
|
1010
|
+
if (error instanceof TenantManifestInvalidError2 || error instanceof TenantManifestUnavailableError2) {
|
|
1011
|
+
const ootbNode = findNodeByType2(error.ootbNodes, nodeType);
|
|
1012
|
+
if (ootbNode)
|
|
1013
|
+
return { result: ootbNode, missingSources: [] };
|
|
1014
|
+
}
|
|
1015
|
+
throw error;
|
|
1016
|
+
}
|
|
1017
|
+
const node = findNodeByType2(snapshot.result, nodeType);
|
|
1018
|
+
if (node || !snapshot.fromCache || options?.refreshOnMiss === false) {
|
|
1019
|
+
return { result: node, missingSources: snapshot.missingSources };
|
|
1020
|
+
}
|
|
1021
|
+
const refreshed = await refreshOnMiss(!isConnectorCatalogType(lowerNodeType));
|
|
1022
|
+
return refreshed ? {
|
|
1023
|
+
result: findNodeByType2(refreshed.result, nodeType),
|
|
1024
|
+
missingSources: refreshed.missingSources
|
|
1025
|
+
} : { result: null, missingSources: snapshot.missingSources };
|
|
1026
|
+
}
|
|
1027
|
+
async function getNodeEnriched2(nodeType, connectionId, options) {
|
|
1028
|
+
return (await getNodeEnrichedWithDiagnostics2(nodeType, connectionId, options)).result;
|
|
1029
|
+
}
|
|
1030
|
+
async function getNodeEnrichedWithDiagnostics2(nodeType, connectionId, options) {
|
|
1031
|
+
const snapshot = await getNodeWithDiagnostics(nodeType, options);
|
|
1032
|
+
return {
|
|
1033
|
+
result: snapshot.result ? await enrichConnectorNode2(snapshot.result, connectionId) : null,
|
|
1034
|
+
missingSources: snapshot.missingSources
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
async function getLocalNodeEnriched2(nodeType, connectionId) {
|
|
1038
|
+
const snapshot = await getLocalSolutionSnapshot2();
|
|
1039
|
+
const node = findNodeByType2(snapshot.manifests, nodeType);
|
|
1040
|
+
if (!node)
|
|
1041
|
+
return { node: null };
|
|
1042
|
+
return {
|
|
1043
|
+
node: await enrichConnectorNode2(node, connectionId),
|
|
1044
|
+
warning: localContractWarning2(snapshot, [node])
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
async function searchNodesWithFilters2(keyword, filters, options) {
|
|
1048
|
+
let nodes;
|
|
1049
|
+
if (options?.local) {
|
|
1050
|
+
nodes = await getLocalSolutionNodes();
|
|
1051
|
+
} else {
|
|
1052
|
+
const tenantNodes = await getNodesWithCacheFallback();
|
|
1053
|
+
nodes = unionWithKnownSdkNodes(tenantNodes.result);
|
|
1054
|
+
}
|
|
1055
|
+
return searchWithFilters2(nodes, keyword, filters);
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
export { MANIFEST_VALIDATION_NEXT_STEP2, TenantManifestInvalidError2, isTenantManifestInvalidError2, TenantManifestUnavailableError2, isTenantManifestUnavailableError2, gatedNodeFailure2, pullNodes2, pullRemoteNodes2, loadCurrentTenantNodes2, getLocalSolutionSnapshot2, localContractWarning2, filterNodesByKeyword2, findNodeByType2, listNodes2, listNodesWithDiagnostics2, searchNodeSummariesWithAvailabilityAndDiagnostics2, searchNodes2, getNode2, getNodeEnriched2, getNodeEnrichedWithDiagnostics2, getLocalNodeEnriched2, searchNodesWithFilters2 };
|
|
1059
|
+
|
|
1060
|
+
//# debugId=1BECBE567BA5F60164756E2164756E21
|