@uipath/flow-tool 1.205.0-preview.276 → 1.206.0-preview.279
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 +14 -12
- package/dist/THIRD-PARTY-NOTICES.md +77 -49
- package/dist/applicationinsights-web-8m26566f.js +17209 -0
- package/dist/authoring-x84r2a2j.js +23 -0
- package/dist/binding-service-s0wvr2xm.js +114 -0
- package/dist/{browser-strategy-6atc7v8s.js → browser-strategy-gnftxwsf.js} +5 -6
- package/dist/connector-library-1yw5r47w.js +99 -0
- package/dist/{connector-service-m08dysc2.js → connector-service-r86mtxwn.js} +270 -275
- package/dist/{conversion-FQTRFHRX-e5wr281j.js → conversion-7O2PDOQB-3wwppx87.js} +477 -472
- package/dist/{de-FGHEJRCI-PK6WALXW-0dnvnmke.js → de-2BEKRUMY-MD7L477H-rj1rmtav.js} +425 -37
- package/dist/{de-WLW6KWOJ-2qnsqdtw.js → de-2BEKRUMY-x4dx0nn9.js} +190 -10
- package/dist/{de-VMMG2MN7-2ecwpg1b.js → de-3CU65EDB-r7r10am9.js} +82 -7
- package/dist/{de-UZI7FJDO-awjpqfz0.js → de-AI7ML6JM-km47f8k4.js} +20 -5
- package/dist/{de-B3EKCNFC-zdwybhh7.js → de-VQWT6L5Y-mch4qwyv.js} +38 -5
- package/dist/{de-XNTCMP5Z-xfkfqg20.js → de-XNTCMP5Z-nd4scb43.js} +1 -4
- package/dist/debug-conversation-trigger-3wzy90kj.js +23 -0
- package/dist/debug-http-client-zydr7tna.js +31 -0
- package/dist/debug-service-hdktqeek.js +60 -0
- package/dist/edge-service-zck3s9ss.js +267 -0
- package/dist/{elk.bundled-vpsbxz0p.js → elk.bundled-phy0zc81.js} +6860 -6860
- package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/en-LAVDF7IQ-ba7wzsxp.js +254 -0
- package/dist/en-LQHKFSEY-zf6a2myg.js +24 -0
- package/dist/en-U2NSIIZN-whenw6wh.js +58 -0
- package/dist/en-WPCQ4JKF-t3x07ggr.js +148 -0
- package/dist/en-X6T4SP2Y-FPGCJIFV-qdfapfzs.js +2756 -0
- package/dist/en-X6T4SP2Y-xe57av1w.js +2752 -0
- package/dist/{es-5THCNRFN-tqwyrdgy.js → es-7ZTQTGKN-11sj0yjx.js} +190 -10
- package/dist/{es-KR3ZSNMP-QLWVVWKJ-5egs0gj9.js → es-7ZTQTGKN-TXQBFYRA-bzh1e1gq.js} +422 -34
- package/dist/{es-EKHIPSW6-ya88nvm0.js → es-EKHIPSW6-asfceac2.js} +1 -4
- package/dist/{es-KEBF3AIM-g5rszh8f.js → es-EP563JWQ-1agj5n4e.js} +38 -5
- package/dist/{es-WY6FZ3HO-zksnn6dp.js → es-KHVY67FO-natcvmmm.js} +82 -7
- package/dist/{es-MX-5RELIXKI-jtjbcxbb.js → es-MX-7KJZPEQN-1fq0a9jr.js} +20 -5
- package/dist/{es-MX-ZP2LJ3V7-k4brnfa9.js → es-MX-F7ZEHSNE-gxpm47vv.js} +82 -7
- package/dist/{es-MX-XXZJGC4R-W6EEIHXR-c2m4yjpj.js → es-MX-IHGRIEWH-23X37OPS-7cqdzpcy.js} +425 -37
- package/dist/{es-MX-TWZBRAXK-gqd9swzw.js → es-MX-IHGRIEWH-g63p0gb4.js} +191 -11
- package/dist/{es-MX-OR6G2SFR-7yykk5ma.js → es-MX-OR6G2SFR-02t13sen.js} +1 -4
- package/dist/{es-MX-EL3CDS3F-sh84yvjr.js → es-MX-S2RFDGDE-x9r0tv30.js} +38 -5
- package/dist/{es-4UBUTCQA-t7hsackg.js → es-SPNKTD5Y-vw5cbgv5.js} +20 -5
- package/dist/filter-engine-dh9s90gb.js +10 -0
- package/dist/first-party-service-ahcc6xc6.js +8 -0
- package/dist/flow-api-d4dvmadm.js +38 -0
- package/dist/{flow-debug-service-gc2ky1ve.js → flow-debug-service-hy21ddd9.js} +151 -195
- package/dist/flow-eval-node-target-tdrwqca7.js +29 -0
- package/dist/flow-eval-run-api-w4j8ra60.js +9 -0
- package/dist/{flow-eval-run-service-2cbr0jtw.js → flow-eval-run-service-5en4ahyn.js} +125 -149
- package/dist/{flow-eval-service-24jbkhhz.js → flow-eval-service-2j28ect1.js} +57 -81
- package/dist/{flow-init-sdk-source-xvdvkq7d.js → flow-init-sdk-source-xnr4bg25.js} +8 -11
- package/dist/flow-init-service-bj3ev9bz.js +26 -0
- package/dist/flow-io-9q6xk473.js +24 -0
- package/dist/{flow-migrate-service-t3pnd2r3.js → flow-migrate-service-dkx85jj5.js} +33 -54
- package/dist/{flow-pack-service-b910q207.js → flow-pack-service-58m51sp8.js} +79 -103
- package/dist/flow-validate-service-9a3zate4.js +46 -0
- package/dist/{fr-DPD4GHX3-exeypjwk.js → fr-7LK3QUWT-a94yejcs.js} +38 -5
- package/dist/{fr-Y6NPVODW-AS7T42TR-v4qe2tha.js → fr-7ZDL4MVO-CXMRZDOF-qjkg6y2r.js} +425 -37
- package/dist/{fr-CERONSRC-edpxhbmb.js → fr-7ZDL4MVO-pd27vwh6.js} +191 -11
- package/dist/{fr-VBM5WRC2-707ha692.js → fr-AXJGUT53-hdg3pmd4.js} +20 -5
- package/dist/{fr-PRMYCRDC-0bk078by.js → fr-I42FODC5-p80x5v4b.js} +83 -8
- package/dist/{fr-IHD66TVT-vfvmefbx.js → fr-IHD66TVT-eq8h0d6c.js} +1 -4
- package/dist/{governance-fetcher-ffvbtwbd.js → governance-fetcher-h8hpcwyh.js} +17 -21
- package/dist/{headless-4x4v3sy6.js → headless-41t9wwb7.js} +2395 -43269
- package/dist/{hitl-service-3m4ce3mt.js → hitl-service-hccqhm63.js} +22 -42
- package/dist/index-4e3w8x62.js +31 -0
- package/dist/{index-fyc0k5dd.js → index-5pzp2qeb.js} +5350 -3271
- package/dist/index-5xh0cjag.js +82 -0
- package/dist/index-7fet3f0s.js +10 -0
- package/dist/index-d4bdedx3.js +32 -0
- package/dist/index-f5kq7265.js +24 -0
- package/dist/index-g2p2ww34.js +39 -0
- package/dist/index-ng011fzs.js +974 -0
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/{index-1b2je9n2.js → index-px95xmkg.js} +290 -268
- package/dist/index-tdwpejt6.js +22 -0
- package/dist/index-z2qk2qn6.js +24 -0
- package/dist/index.js +19 -28
- package/dist/index.umd.min-ttg1qc0x.js +7814 -0
- package/dist/init.js +22 -43
- package/dist/inline-entity-resolver-0neh2b43.js +25 -0
- package/dist/input-reader-zqaep7k7.js +11 -0
- package/dist/{ja-43QL7CGO-c3q8gre9.js → ja-C7GZV6YP-hvtbngr5.js} +20 -5
- package/dist/{ja-HFEQKCZF-hb2f25p8.js → ja-GI3OUHPZ-28fy60r0.js} +83 -8
- package/dist/{ja-JE5ZL7EY-hacj2m31.js → ja-JE5ZL7EY-607k4c7p.js} +1 -4
- package/dist/{ja-Q5PXKJ2V-BR5GRIDQ-fgqqpryf.js → ja-LGAM5HKR-NTPKIZEM-nv67917s.js} +422 -34
- package/dist/{ja-U2MCNHGT-gz0ap1jk.js → ja-LGAM5HKR-sgrtjqjh.js} +190 -10
- package/dist/ja-WY2W6733-ayr36h1f.js +71 -0
- package/dist/{jmespath-e4a59c8w.js → jmespath-wwym30dp.js} +1 -1
- package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/known-types-v9sxcq1c.js +13 -0
- package/dist/{ko-AYBDSRZG-G43C3XUW-kng13fsg.js → ko-7B4SUZB7-2SLI636D-grbtfrcv.js} +424 -36
- package/dist/{ko-XAUYQWDR-zp81gjp4.js → ko-7B4SUZB7-c8wr20sc.js} +190 -10
- package/dist/{ko-DJJRKCG5-5h3k9csc.js → ko-DJJRKCG5-4fekzjn4.js} +1 -4
- package/dist/{ko-LA5OSS5P-mq5h8sbk.js → ko-H2RGQWKJ-9696w762.js} +38 -5
- package/dist/{ko-TLL6Z6CD-wrt3n8a9.js → ko-Q24HSSL4-5vn55pte.js} +20 -5
- package/dist/{ko-B4SEC7QX-thq2wt6a.js → ko-RYKAL74T-10m4z8vw.js} +83 -8
- package/dist/localization-skqjy9nr.js +45 -0
- package/dist/maestro-automate-entry-d1v5q5mv.js +14 -0
- package/dist/{node-xqc0h091.js → node-0jy3qx5b.js} +69 -638
- package/dist/node-service-2nxpk751.js +64 -0
- package/dist/{node-strategy-1dmmhvf3.js → node-strategy-wrjxmbzt.js} +9 -12
- package/dist/node-sync-service-68vq10je.js +56 -0
- package/dist/packager-tool-14rdgz3c.js +55 -0
- package/dist/packager-tool-1rhch6b5.js +496 -0
- package/dist/packager-tool-21t17xzz.js +5073 -0
- package/dist/{packager-tool-pvhx9e12.js → packager-tool-2b0tn4p4.js} +58 -176
- package/dist/{packager-tool-f9jxca9z.js → packager-tool-368bft50.js} +11 -11
- package/dist/{packager-tool-a5afh1dc.js → packager-tool-4fv0sq2h.js} +61 -67
- package/dist/packager-tool-4g87fbz6.js +273 -0
- package/dist/packager-tool-4zt1s51a.js +53 -0
- package/dist/{packager-tool-frjt46rb.js → packager-tool-508ka40b.js} +23 -23
- package/dist/{packager-tool-gbv6f0ac.js → packager-tool-5104bnpv.js} +22 -21
- package/dist/packager-tool-5dgpfh5e.js +1274 -0
- package/dist/packager-tool-5ve5ms3b.js +2393 -0
- package/dist/{packager-tool-dxgrhfq5.js → packager-tool-64r7e4ek.js} +8 -8
- package/dist/{packager-tool-h6pf3qxq.js → packager-tool-65yf8zqb.js} +180 -1237
- package/dist/{packager-tool-1yh8g550.js → packager-tool-6an893wm.js} +12 -3
- package/dist/{packager-tool-htrt75v4.js → packager-tool-6jpvvxyb.js} +27 -22
- package/dist/packager-tool-6vhefpmq.js +461 -0
- package/dist/{packager-tool-1nfbzy0h.js → packager-tool-72xwbsmw.js} +441 -556
- package/dist/packager-tool-7atc775f.js +30 -0
- package/dist/packager-tool-7mxn3e7j.js +27 -0
- package/dist/{packager-tool-wvmtp8zt.js → packager-tool-7qtnffkc.js} +8 -7
- package/dist/{packager-tool-ymma2s85.js → packager-tool-8ba22j6n.js} +9 -6
- package/dist/{packager-tool-apawc11t.js → packager-tool-8ed52y5r.js} +1584 -1261
- package/dist/{packager-tool-v11fm907.js → packager-tool-8n4bdvke.js} +13 -13
- package/dist/{packager-tool-p8gab24q.js → packager-tool-8qypzm9v.js} +424 -404
- package/dist/packager-tool-9217bxm2.js +6 -0
- package/dist/{packager-tool-zfrp8ecz.js → packager-tool-951nhh3e.js} +82 -82
- package/dist/{packager-tool-ap0zt7de.js → packager-tool-99d2kj94.js} +8 -11
- package/dist/{packager-tool-z21c6mbp.js → packager-tool-a1h0q79w.js} +48 -48
- package/dist/{packager-tool-xk78j7dz.js → packager-tool-ac6rvny7.js} +52 -57
- package/dist/{packager-tool-1d64q5s5.js → packager-tool-b2pkwwj1.js} +1273 -1300
- package/dist/{packager-tool-yetpbbey.js → packager-tool-bbkkxbyq.js} +9 -8
- package/dist/{packager-tool-409n51pv.js → packager-tool-d07g2kpn.js} +7 -7
- package/dist/{packager-tool-8zzmg2f3.js → packager-tool-dx6sjbkd.js} +19 -19
- package/dist/{packager-tool-8g5931fz.js → packager-tool-em4ppegs.js} +36 -43
- package/dist/{packager-tool-zgsvggdr.js → packager-tool-f7rk9xhv.js} +4 -4
- package/dist/{packager-tool-jrnjzs5t.js → packager-tool-fzgfb0jt.js} +32175 -36281
- package/dist/{packager-tool-9rmaeaww.js → packager-tool-gdpw0daf.js} +25211 -11966
- package/dist/packager-tool-hk0fnvz5.js +14 -0
- package/dist/{packager-tool-dbsdy4xx.js → packager-tool-jd3v0bh1.js} +4 -4
- package/dist/{packager-tool-tqjfdpda.js → packager-tool-jmrhzfyj.js} +106 -80
- package/dist/{packager-tool-2px5qqm4.js → packager-tool-kz3t4raw.js} +490 -246
- package/dist/{packager-tool-7bam8cjq.js → packager-tool-mdf7bws6.js} +53255 -27261
- package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
- package/dist/{packager-tool-nkrmjr3a.js → packager-tool-mphfxa9g.js} +125 -125
- package/dist/{packager-tool-kn86394c.js → packager-tool-p123mtfx.js} +66 -692
- package/dist/{packager-tool-t7ahhaer.js → packager-tool-pxq0bwp0.js} +208 -138
- package/dist/{packager-tool-j95w4fj3.js → packager-tool-q0f1dvtd.js} +11 -11
- package/dist/{packager-tool-8qp60s20.js → packager-tool-q2f18crb.js} +3 -3
- package/dist/packager-tool-q2kwk5bf.js +57 -0
- package/dist/{packager-tool-09rvpfjd.js → packager-tool-rxqxza90.js} +192 -183
- package/dist/{packager-tool-3m4ve01f.js → packager-tool-ryds9860.js} +33 -36
- package/dist/{packager-tool-ykbahxma.js → packager-tool-t17t9svg.js} +6 -6
- package/dist/{packager-tool-myhbp761.js → packager-tool-vgrswa8p.js} +53 -8
- package/dist/{packager-tool-7hw344bt.js → packager-tool-xb16e3tz.js} +5 -5
- package/dist/{packager-tool-1frs4sr4.js → packager-tool-yewnsyag.js} +37 -5
- package/dist/packager-tool-zdqbp34f.js +14 -0
- package/dist/{packager-tool-pacrqxv2.js → packager-tool-ze3fnf3s.js} +52 -34
- package/dist/packager-tool.js +12 -32
- package/dist/prepare-uip-ad7mfs8t.js +92 -0
- package/dist/{pt-3KUMINBZ-d0fexmny.js → pt-2RGHDOG4-gwe2ptvg.js} +38 -5
- package/dist/{pt-BR-3LGIH33I-tqbrd89y.js → pt-BR-3LGIH33I-hdf332je.js} +1 -4
- package/dist/{pt-BR-USP2T7GD-pedn77m1.js → pt-BR-BIUJXIPU-2sqzhr8y.js} +20 -5
- package/dist/{pt-BR-6VFBW5QT-hsck9gjj.js → pt-BR-IL3KLBID-m1mvqqzb.js} +83 -8
- package/dist/{pt-BR-WNNZTIMN-6fent688.js → pt-BR-JWHVZE6H-gvkknv49.js} +38 -5
- package/dist/{pt-BR-TKHNHMET-4Z5H4N5G-pzw3328h.js → pt-BR-PHLFHMXZ-JFPKUXIZ-gyb27t6e.js} +425 -37
- package/dist/{pt-BR-GNQNAAZ2-xadharv4.js → pt-BR-PHLFHMXZ-n6de4s7z.js} +191 -11
- package/dist/{pt-RMIAKZB4-t80exmp7.js → pt-MHX6JGAX-xfgvdqwg.js} +20 -5
- package/dist/{pt-ROXU257Y-OWZOS54V-ywap2t39.js → pt-N7ZTJT4W-GVODJMRX-p5b51p0b.js} +424 -36
- package/dist/{pt-TO2DARY2-ftcce1bv.js → pt-N7ZTJT4W-d6c67xcn.js} +190 -10
- package/dist/{pt-PFZXVOQH-qshq0b2m.js → pt-PFZXVOQH-xvcm5b61.js} +1 -4
- package/dist/{pt-WOTPKWPZ-1rxcy8hs.js → pt-VLA5IOHO-8t4pze0h.js} +83 -8
- package/dist/{ro-GHOBYW2S-4zevc9dy.js → ro-3RKJNGJZ-xqj14e3d.js} +20 -5
- package/dist/{ro-KMDT7LYJ-yhpnsdvw.js → ro-53TS7SWG-hnjx1c7b.js} +38 -5
- package/dist/{ro-AN5G62WQ-kcj00jwq.js → ro-AN5G62WQ-fzsv2ymm.js} +1 -4
- package/dist/{ro-AVAWPKOO-6WCG756B-v7pjv1hc.js → ro-FLNXVYJI-ZN43XZKK-2tajkc94.js} +422 -34
- package/dist/{ro-WUYJV6OW-a8d9qy1n.js → ro-FLNXVYJI-ytrwabg2.js} +190 -10
- package/dist/{ro-PB44YXML-zmhhwp5h.js → ro-IRNFX376-mh84zk3n.js} +82 -7
- package/dist/{ru-GSCT4ARZ-FTVCGQTL-gee86v14.js → ru-GSCT4ARZ-FTVCGQTL-v3d4ag31.js} +2 -4
- package/dist/ru-GSCT4ARZ-c2cfq4h1.js +7 -0
- package/dist/{ru-T73OPRTC-4knxw497.js → ru-T73OPRTC-50m7tty9.js} +1 -4
- package/dist/{ru-WBLQ5B2U-wemdzdqd.js → ru-WBLQ5B2U-5qpt0mvh.js} +1 -4
- package/dist/{ru-WBLQ5B2U-8r3c7v6d.js → ru-WBLQ5B2U-bf20yr5y.js} +1 -4
- package/dist/{ru-WBLQ5B2U-kdey8qa4.js → ru-WBLQ5B2U-w2wmp3xb.js} +1 -4
- package/dist/{serialization-BXU6AKAN-vdqyr29x.js → serialization-Z3UYT6BW-y9gb55mp.js} +1638 -761
- package/dist/services/extract-schema/default-schema-document.d.ts +31 -0
- package/dist/services/node-service.d.ts +6 -3
- package/dist/services/node-validators/file-node-connection-validator.d.ts +2 -0
- package/dist/services/node-validators/index.d.ts +1 -0
- package/dist/services/orchestrator-connection-field.d.ts +24 -0
- package/dist/services/packaging-utils.d.ts +2 -2
- package/dist/services/vars-reference-rule.d.ts +4 -3
- package/dist/solution-auth-j8x84n5z.js +11 -0
- package/dist/solution-discovery-vn4q32bf.js +38 -0
- package/dist/{tidy-service-hz61ypyj.js → tidy-service-m33hhtc7.js} +37 -55
- package/dist/tool.js +18 -27
- package/dist/{tr-JMIP7ZSL-G3QYPVT2-gswngwcr.js → tr-7AIZZWZ6-ESAESUPL-77g9b7jb.js} +422 -34
- package/dist/{tr-M3F5A6AU-bb0tg39m.js → tr-7AIZZWZ6-pdzp9n0p.js} +190 -10
- package/dist/{tr-SEC6RGZ4-0ttavjya.js → tr-EJKY7DVQ-rkctqva4.js} +83 -8
- package/dist/{tr-KHOCWWLF-8apf5y44.js → tr-KHOCWWLF-m9t24j5y.js} +1 -4
- package/dist/{tr-SC55DYHY-e4zgcd4t.js → tr-PIQY7JIT-2mkwk0kq.js} +38 -5
- package/dist/{tr-GDTLECMM-kngksm3r.js → tr-PQLUUHPC-qsb7btxn.js} +20 -5
- package/dist/utils/container-ports.d.ts +22 -0
- package/dist/utils/handle-expansion.d.ts +57 -3
- package/dist/utils/workflow-file-format.d.ts +14 -0
- package/dist/validation.js +44 -68
- package/dist/{variable-service-9ex4a93n.js → variable-service-ea1erf93.js} +28 -49
- package/dist/{wait-for-flow-job-b0vj8828.js → wait-for-flow-job-a4xtda36.js} +29 -36
- package/dist/{zh-CN-MX7VIOF2-xznrtchf.js → zh-CN-4FH7E7UL-84y6j2ea.js} +82 -7
- package/dist/{zh-CN-4NI2EGMV-8g027vv3.js → zh-CN-4NI2EGMV-dt0wg0wh.js} +1 -4
- package/dist/{zh-CN-IFFXSEJS-MZQ4HU3Z-ge1ynmtz.js → zh-CN-CN2ARPFS-NIQTWDK2-b5c91fwn.js} +422 -34
- package/dist/{zh-CN-C5G4PC7C-ds9gkptg.js → zh-CN-CN2ARPFS-e0p2qrxf.js} +190 -10
- package/dist/{en-BPJVY3U7-xkpj5xc5.js → zh-CN-NIEVKROA-q4tbbwqz.js} +26 -7
- package/dist/{zh-CN-I5D7WHBD-ge92tbx9.js → zh-CN-OHNTHZRI-b0hjkfqn.js} +20 -5
- package/dist/{zh-TW-53SU6EH4-33x57egq.js → zh-TW-53SU6EH4-w0wz3nwg.js} +1 -4
- package/dist/{zh-TW-5SJ3GZT2-bsg054mw.js → zh-TW-5WQA6QTM-hns69sd4.js} +83 -8
- package/dist/{zh-TW-IYBNYAMG-J7FWTQTK-sx8d4ymg.js → zh-TW-7RUFEVFK-VKVRSVTP-jq2pcmar.js} +421 -33
- package/dist/{zh-TW-62HZIG6O-787kdwex.js → zh-TW-7RUFEVFK-qd7myw31.js} +190 -10
- package/dist/{zh-TW-2AVLM723-288pkc1z.js → zh-TW-E4D3Y6ZR-tn3bmzz5.js} +20 -5
- package/dist/{zh-TW-TN3MPNXL-jcgg2hcs.js → zh-TW-MSQM7YTT-m7r7nwnj.js} +38 -5
- package/package.json +2 -2
- package/dist/authoring-e1k40hyw.js +0 -24
- package/dist/binding-service-0qffbxg7.js +0 -157
- package/dist/de-FGHEJRCI-gn4cf5gh.js +0 -2697
- package/dist/de-MUJPA4EB-209jpeqe.js +0 -173
- package/dist/de-UZI7FJDO-mwvc4cxe.js +0 -200
- package/dist/debug-conversation-trigger-2crr9w4n.js +0 -30
- package/dist/debug-http-client-yqjzsnhw.js +0 -32
- package/dist/debug-service-nra3n02y.js +0 -61
- package/dist/edge-service-y44f2rgd.js +0 -170
- package/dist/en-E454CJNK-ytfw06kj.js +0 -98
- package/dist/en-EJCBA3LK-0wb3b1xy.js +0 -146
- package/dist/en-EJCBA3LK-dtpdghgj.js +0 -146
- package/dist/en-GN2ZGWUE-03z2df4k.js +0 -136
- package/dist/en-LQHKFSEY-vvbe8ve9.js +0 -26
- package/dist/en-M7GQYBV2-5nfmpnfz.js +0 -2018
- package/dist/en-TBNO2WUV-77KTKLDE-4ktf0pqw.js +0 -1942
- package/dist/en-TBNO2WUV-9nan43e5.js +0 -1936
- package/dist/es-4UBUTCQA-m1ytpyx2.js +0 -200
- package/dist/es-7SE7HX2X-qda7whn6.js +0 -173
- package/dist/es-KR3ZSNMP-0cszm2n3.js +0 -2697
- package/dist/es-MX-2MYFZU7X-6v0q5rbn.js +0 -173
- package/dist/es-MX-5RELIXKI-9jhqtddc.js +0 -200
- package/dist/es-MX-XXZJGC4R-b4fbwe9d.js +0 -2697
- package/dist/filter-engine-7ep90g7f.js +0 -11
- package/dist/first-party-service-srxaftkn.js +0 -27
- package/dist/flow-api-sat010z1.js +0 -42
- package/dist/flow-eval-node-target-cwxb4kfe.js +0 -52
- package/dist/flow-eval-run-api-xdygjzfv.js +0 -13
- package/dist/flow-init-service-k7k5vx2z.js +0 -47
- package/dist/flow-io-2qdyj5e0.js +0 -44
- package/dist/flow-validate-service-x2mbk3et.js +0 -70
- package/dist/fr-MDFKNZ4C-qmypp92m.js +0 -173
- package/dist/fr-VBM5WRC2-63z7w4mh.js +0 -200
- package/dist/fr-Y6NPVODW-q5ef3htr.js +0 -2697
- package/dist/index-cg9qhfb1.js +0 -635
- package/dist/index-d090f35d.js +0 -66
- package/dist/index-gxcjq6ns.js +0 -110
- package/dist/index-kmp9fmhb.js +0 -25
- package/dist/index-nsn889vf.js +0 -27
- package/dist/index-sqhbn7ew.js +0 -157
- package/dist/index-wycgq0ff.js +0 -3178
- package/dist/index-y1ym28vg.js +0 -667
- package/dist/index.umd.min-fqefd9kn.js +0 -7814
- package/dist/inline-entity-resolver-c854cqma.js +0 -45
- package/dist/input-reader-n7kzdrev.js +0 -12
- package/dist/ja-43QL7CGO-h6qfxfay.js +0 -200
- package/dist/ja-MDG4BKZQ-gayaca2c.js +0 -38
- package/dist/ja-Q5PXKJ2V-tzf2rvz2.js +0 -2697
- package/dist/ja-UTQEAP34-hvyf683h.js +0 -173
- package/dist/known-types-r51zxb9g.js +0 -19
- package/dist/ko-AXCHW2OK-pkwdcbmx.js +0 -173
- package/dist/ko-AYBDSRZG-am0h0m2r.js +0 -2697
- package/dist/ko-TLL6Z6CD-ag6gjynr.js +0 -200
- package/dist/localization-d6gjmrsw.js +0 -47
- package/dist/maestro-automate-entry-6f9act3w.js +0 -22
- package/dist/node-service-d4xpqs0z.js +0 -92
- package/dist/node-sync-service-76b9e4r5.js +0 -61
- package/dist/packager-tool-0gctz400.js +0 -17
- package/dist/packager-tool-4mna26cc.js +0 -133
- package/dist/packager-tool-4x7tzvv0.js +0 -1176
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-6ejqwbw9.js +0 -26
- package/dist/packager-tool-6z1hsm2h.js +0 -143
- package/dist/packager-tool-7ja1b5hh.js +0 -8809
- package/dist/packager-tool-9era57c0.js +0 -28
- package/dist/packager-tool-9jxzgsxc.js +0 -14
- package/dist/packager-tool-c23zrhj8.js +0 -11
- package/dist/packager-tool-d6qf5qmb.js +0 -49
- package/dist/packager-tool-e3yks66r.js +0 -95
- package/dist/packager-tool-e5hj89zm.js +0 -6
- package/dist/packager-tool-e87tzg4y.js +0 -1937
- package/dist/packager-tool-eypvc2kv.js +0 -23
- package/dist/packager-tool-gbgfwx8f.js +0 -2
- package/dist/packager-tool-hk1gxnth.js +0 -11
- package/dist/packager-tool-hxyjn885.js +0 -24
- package/dist/packager-tool-j78fwwhq.js +0 -16
- package/dist/packager-tool-jgfzfqjm.js +0 -53
- package/dist/packager-tool-jysvpt8p.js +0 -11
- package/dist/packager-tool-m3wkcxf5.js +0 -11
- package/dist/packager-tool-mcaf4ewf.js +0 -46
- package/dist/packager-tool-mgcz986r.js +0 -143
- package/dist/packager-tool-p79yh9ww.js +0 -97
- package/dist/packager-tool-paq9c70w.js +0 -1332
- package/dist/packager-tool-pcvhcn2k.js +0 -2019
- package/dist/packager-tool-qkn0c042.js +0 -1922
- package/dist/packager-tool-qszay16r.js +0 -180
- package/dist/packager-tool-red2crtp.js +0 -5367
- package/dist/packager-tool-rs6jm14d.js +0 -23
- package/dist/packager-tool-s7wb0s9n.js +0 -6297
- package/dist/packager-tool-sc961w0q.js +0 -16
- package/dist/packager-tool-skcjythd.js +0 -22085
- package/dist/packager-tool-t07ev0jj.js +0 -1083
- package/dist/packager-tool-xj0agqpk.js +0 -11
- package/dist/packager-tool-z83pga0z.js +0 -1942
- package/dist/pt-3DIO5QWG-hb763vct.js +0 -173
- package/dist/pt-BR-TKHNHMET-dn6zxk1d.js +0 -2697
- package/dist/pt-BR-USP2T7GD-rppy42ym.js +0 -200
- package/dist/pt-BR-Y6K6XHXK-37a932vp.js +0 -173
- package/dist/pt-RMIAKZB4-67enhx3m.js +0 -200
- package/dist/pt-ROXU257Y-yd80gx6s.js +0 -2697
- package/dist/ro-AVAWPKOO-42m6am1w.js +0 -2697
- package/dist/ro-BWR3ONRR-jmap5ajd.js +0 -173
- package/dist/ro-GHOBYW2S-mhnqsgaa.js +0 -200
- package/dist/ru-GSCT4ARZ-1sa9wbr8.js +0 -10
- package/dist/ru-GSCT4ARZ-jrxwev63.js +0 -10
- package/dist/ru-WBLQ5B2U-dpqvtfwr.js +0 -10
- package/dist/ru-WBLQ5B2U-s4em88p0.js +0 -10
- package/dist/shared-utils-tqnx96mg.js +0 -21
- package/dist/solution-auth-8qz5pw7z.js +0 -14
- package/dist/solution-discovery-6t0z143v.js +0 -44
- package/dist/tr-5IIHSFW5-stsb3dar.js +0 -173
- package/dist/tr-GDTLECMM-k5fhmq13.js +0 -200
- package/dist/tr-JMIP7ZSL-fb67ft9w.js +0 -2696
- package/dist/zh-CN-I5D7WHBD-sr5h0a98.js +0 -200
- package/dist/zh-CN-IFFXSEJS-tke4mzty.js +0 -2697
- package/dist/zh-CN-OUMLDKDS-q3a1rr5c.js +0 -38
- package/dist/zh-CN-R2KU4U5L-q4yhc33t.js +0 -173
- package/dist/zh-TW-2AVLM723-xsmap3gk.js +0 -200
- package/dist/zh-TW-GNKMELBF-r4ay2475.js +0 -173
- package/dist/zh-TW-IYBNYAMG-wcan0qpb.js +0 -2697
- /package/dist/{packager-tool-yc4kw997.js → packager-tool-1qg04b7q.js} +0 -0
- /package/dist/{packager-tool-cqtsj6yh.js → packager-tool-2sazb7th.js} +0 -0
- /package/dist/{packager-tool-s9ff3kk4.js → packager-tool-887wr6jm.js} +0 -0
- /package/dist/{packager-tool-aw9v0raw.js → packager-tool-8c7nddd1.js} +0 -0
- /package/dist/{packager-tool-9cq9atem.js → packager-tool-a9xgmn1q.js} +0 -0
- /package/dist/{packager-tool-4kr6g0zw.js → packager-tool-cvh1a0nm.js} +0 -0
- /package/dist/{packager-tool-27avrkyk.js → packager-tool-k3egwd1m.js} +0 -0
- /package/dist/{packager-tool-qa9gftnj.js → packager-tool-mxgybnmt.js} +0 -0
- /package/dist/{packager-tool-10vc8pq4.js → packager-tool-wr7gn964.js} +0 -0
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
isBrowser
|
|
4
|
-
} from "./packager-tool-0gctz400.js";
|
|
5
|
-
import {
|
|
6
|
-
catchError
|
|
7
|
-
} from "./packager-tool-qa9gftnj.js";
|
|
8
|
-
import {
|
|
2
|
+
UIPATH_HOME_DIR,
|
|
9
3
|
AUTH_FILENAME,
|
|
10
4
|
DEFAULT_BASE_URL,
|
|
11
|
-
DEFAULT_REDIRECT_URI
|
|
12
|
-
|
|
13
|
-
} from "./packager-tool-yc4kw997.js";
|
|
5
|
+
DEFAULT_REDIRECT_URI
|
|
6
|
+
} from "./packager-tool-1qg04b7q.js";
|
|
14
7
|
import {
|
|
15
8
|
getFileSystem
|
|
16
|
-
} from "./packager-tool-
|
|
9
|
+
} from "./packager-tool-vgrswa8p.js";
|
|
10
|
+
import {
|
|
11
|
+
isBrowser2,
|
|
12
|
+
getGlobalThis
|
|
13
|
+
} from "./packager-tool-zdqbp34f.js";
|
|
14
|
+
import {
|
|
15
|
+
catchError
|
|
16
|
+
} from "./packager-tool-mxgybnmt.js";
|
|
17
17
|
import {
|
|
18
18
|
__require
|
|
19
|
-
} from "./packager-tool-
|
|
19
|
+
} from "./packager-tool-6an893wm.js";
|
|
20
20
|
|
|
21
21
|
// ../auth/src/config.ts
|
|
22
22
|
var DEFAULT_CLIENT_ID = "36dea5b8-e8bb-423d-8e7b-c808df8f1c00";
|
|
23
23
|
var AUTH_FILE_CONFIG_KEY = Symbol.for("@uipath/auth/AuthFileConfig");
|
|
24
24
|
var globalSlot = globalThis;
|
|
25
|
-
var setAuthFileConfig = (cfg) => {
|
|
26
|
-
globalSlot[AUTH_FILE_CONFIG_KEY] = cfg ?? {};
|
|
27
|
-
};
|
|
28
25
|
var getAuthFileConfig = () => globalSlot[AUTH_FILE_CONFIG_KEY] ?? {};
|
|
29
26
|
|
|
30
27
|
class InvalidBaseUrlError extends Error {
|
|
@@ -289,14 +286,14 @@ function ClientSecretPost2(clientSecret) {
|
|
|
289
286
|
return ClientSecretPost(clientSecret);
|
|
290
287
|
}
|
|
291
288
|
tbi ||= new WeakMap;
|
|
292
|
-
return (as, client, body,
|
|
289
|
+
return (as, client, body, headers) => {
|
|
293
290
|
let auth;
|
|
294
291
|
if (!(auth = tbi.get(client))) {
|
|
295
292
|
assertString2(client.client_secret, '"metadata.client_secret"');
|
|
296
293
|
auth = ClientSecretPost(client.client_secret);
|
|
297
294
|
tbi.set(client, auth);
|
|
298
295
|
}
|
|
299
|
-
return auth(as, client, body,
|
|
296
|
+
return auth(as, client, body, headers);
|
|
300
297
|
};
|
|
301
298
|
}
|
|
302
299
|
function assertString2(input, it) {
|
|
@@ -464,6 +461,7 @@ var exchangeCodeForTokens = async ({
|
|
|
464
461
|
|
|
465
462
|
// ../auth/src/authProfile.ts
|
|
466
463
|
var DEFAULT_AUTH_PROFILE = "default";
|
|
464
|
+
var INHERITED_AUTH_PROFILE_ENV2 = "UIPATH_CLI_INHERITED_PROFILE";
|
|
467
465
|
var PROFILE_DIR = "profiles";
|
|
468
466
|
var PROFILE_NAME_RE = /^[A-Za-z0-9._-]+$/;
|
|
469
467
|
var ACTIVE_AUTH_PROFILE_KEY = Symbol.for("@uipath/auth/ActiveAuthProfile");
|
|
@@ -510,42 +508,13 @@ function normalizeAuthProfileName(profile) {
|
|
|
510
508
|
}
|
|
511
509
|
return profile;
|
|
512
510
|
}
|
|
513
|
-
function
|
|
514
|
-
const normalized = normalizeAuthProfileName(profile);
|
|
515
|
-
const scopedState = profileStorage.getStore();
|
|
516
|
-
if (scopedState !== undefined) {
|
|
517
|
-
if (normalized === undefined) {
|
|
518
|
-
delete scopedState.profile;
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
scopedState.profile = normalized;
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
if (normalized === undefined) {
|
|
525
|
-
delete globalSlot2[ACTIVE_AUTH_PROFILE_KEY];
|
|
526
|
-
return;
|
|
527
|
-
}
|
|
528
|
-
globalSlot2[ACTIVE_AUTH_PROFILE_KEY] = { profile: normalized };
|
|
529
|
-
}
|
|
530
|
-
function clearActiveAuthProfile() {
|
|
531
|
-
const scopedState = profileStorage.getStore();
|
|
532
|
-
if (scopedState !== undefined) {
|
|
533
|
-
delete scopedState.profile;
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
delete globalSlot2[ACTIVE_AUTH_PROFILE_KEY];
|
|
537
|
-
}
|
|
538
|
-
function getActiveAuthProfile() {
|
|
511
|
+
function getActiveAuthProfile2() {
|
|
539
512
|
const scopedState = profileStorage.getStore();
|
|
540
513
|
if (scopedState !== undefined) {
|
|
541
514
|
return scopedState.profile;
|
|
542
515
|
}
|
|
543
516
|
return globalSlot2[ACTIVE_AUTH_PROFILE_KEY]?.profile;
|
|
544
517
|
}
|
|
545
|
-
function runWithAuthProfile(profile, fn) {
|
|
546
|
-
const normalized = normalizeAuthProfileName(profile);
|
|
547
|
-
return profileStorage.run(normalized === undefined ? {} : { profile: normalized }, fn);
|
|
548
|
-
}
|
|
549
518
|
function resolveAuthProfileFilePath(profile) {
|
|
550
519
|
const normalized = normalizeAuthProfileName(profile);
|
|
551
520
|
if (normalized === undefined) {
|
|
@@ -555,66 +524,9 @@ function resolveAuthProfileFilePath(profile) {
|
|
|
555
524
|
return fs.path.join(fs.env.homedir(), UIPATH_HOME_DIR, PROFILE_DIR, normalized, AUTH_FILENAME);
|
|
556
525
|
}
|
|
557
526
|
function getActiveAuthProfileFilePath() {
|
|
558
|
-
const profile =
|
|
527
|
+
const profile = getActiveAuthProfile2();
|
|
559
528
|
return profile ? resolveAuthProfileFilePath(profile) : undefined;
|
|
560
529
|
}
|
|
561
|
-
function getAuthProfilesRootPath() {
|
|
562
|
-
const fs = getFileSystem();
|
|
563
|
-
return fs.path.join(fs.env.homedir(), UIPATH_HOME_DIR, PROFILE_DIR);
|
|
564
|
-
}
|
|
565
|
-
function resolveAuthProfileDirPath(profile) {
|
|
566
|
-
const normalized = normalizeAuthProfileName(profile);
|
|
567
|
-
if (normalized === undefined) {
|
|
568
|
-
throw new AuthProfileValidationError(`"${DEFAULT_AUTH_PROFILE}" is the built-in profile and does not have a profile directory.`);
|
|
569
|
-
}
|
|
570
|
-
const fs = getFileSystem();
|
|
571
|
-
return fs.path.join(getAuthProfilesRootPath(), normalized);
|
|
572
|
-
}
|
|
573
|
-
async function listAuthProfileNamesAsync() {
|
|
574
|
-
const fs = getFileSystem();
|
|
575
|
-
const root = getAuthProfilesRootPath();
|
|
576
|
-
if (!await fs.exists(root)) {
|
|
577
|
-
return [];
|
|
578
|
-
}
|
|
579
|
-
const [readError, entries] = await catchError(fs.readdir(root));
|
|
580
|
-
if (readError || !entries) {
|
|
581
|
-
return [];
|
|
582
|
-
}
|
|
583
|
-
const names = [];
|
|
584
|
-
for (const entry of entries) {
|
|
585
|
-
if (!PROFILE_NAME_RE.test(entry) || entry === DEFAULT_AUTH_PROFILE) {
|
|
586
|
-
continue;
|
|
587
|
-
}
|
|
588
|
-
const stats = await fs.stat(fs.path.join(root, entry));
|
|
589
|
-
if (stats?.isDirectory()) {
|
|
590
|
-
names.push(entry);
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
return names.sort((a, b) => a.localeCompare(b));
|
|
594
|
-
}
|
|
595
|
-
async function authProfileExistsAsync(profile) {
|
|
596
|
-
const fs = getFileSystem();
|
|
597
|
-
const [pathError, dir] = catchError(() => resolveAuthProfileDirPath(profile));
|
|
598
|
-
if (pathError || dir === undefined) {
|
|
599
|
-
return false;
|
|
600
|
-
}
|
|
601
|
-
const stats = await fs.stat(dir);
|
|
602
|
-
return stats?.isDirectory() === true;
|
|
603
|
-
}
|
|
604
|
-
async function deleteAuthProfileAsync(profile) {
|
|
605
|
-
const dir = resolveAuthProfileDirPath(profile);
|
|
606
|
-
const fs = getFileSystem();
|
|
607
|
-
const relativeToRoot = fs.path.relative(getAuthProfilesRootPath(), dir);
|
|
608
|
-
if (relativeToRoot === "" || relativeToRoot.startsWith("..") || fs.path.isAbsolute(relativeToRoot)) {
|
|
609
|
-
throw new AuthProfileValidationError(`Refusing to delete "${profile}": resolved path escapes the profiles directory.`);
|
|
610
|
-
}
|
|
611
|
-
const stats = await fs.stat(dir);
|
|
612
|
-
if (stats?.isDirectory() !== true) {
|
|
613
|
-
return;
|
|
614
|
-
}
|
|
615
|
-
await fs.rm(dir);
|
|
616
|
-
return dir;
|
|
617
|
-
}
|
|
618
530
|
|
|
619
531
|
// ../auth/src/utils/jwt.ts
|
|
620
532
|
class InvalidIssuerError extends Error {
|
|
@@ -641,7 +553,7 @@ var parseJWT = (token) => {
|
|
|
641
553
|
}
|
|
642
554
|
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
643
555
|
let decodedString;
|
|
644
|
-
if (
|
|
556
|
+
if (isBrowser2() && typeof atob !== "undefined") {
|
|
645
557
|
decodedString = atob(base64);
|
|
646
558
|
} else {
|
|
647
559
|
decodedString = Buffer.from(base64, "base64").toString();
|
|
@@ -737,7 +649,7 @@ var pickScopes = (claims) => {
|
|
|
737
649
|
const scopes = Array.isArray(raw) ? raw.filter((entry) => asString(entry) !== undefined) : typeof raw === "string" ? raw.split(/\s+/).filter(Boolean) : [];
|
|
738
650
|
return scopes.length > 0 ? scopes : undefined;
|
|
739
651
|
};
|
|
740
|
-
var
|
|
652
|
+
var resolveSessionIdentity2 = (accessToken, authFlow) => {
|
|
741
653
|
const claims = accessToken ? decodeClaims(accessToken) : undefined;
|
|
742
654
|
const email = pickEmail(claims);
|
|
743
655
|
const type = resolveIdentityType(claims, authFlow, email);
|
|
@@ -782,6 +694,8 @@ var ENV_AUTH_VARS = {
|
|
|
782
694
|
};
|
|
783
695
|
|
|
784
696
|
class EnvAuthConfigError extends Error {
|
|
697
|
+
errorCode = "configuration_error";
|
|
698
|
+
retry = "RetryWillNotFix";
|
|
785
699
|
constructor(message) {
|
|
786
700
|
super(message);
|
|
787
701
|
this.name = "EnvAuthConfigError";
|
|
@@ -820,11 +734,11 @@ var readAuthFromEnv = () => {
|
|
|
820
734
|
if (!rawUrl) {
|
|
821
735
|
throw new EnvAuthConfigError(`${ENV_AUTH_VARS.token} is not a JWT (treating it as an opaque token, ` + `e.g. a Personal Access Token). Set ${OPAQUE_TOKEN_BASE_URL_VAR} to the ` + `UiPath base URL if this is a PAT, or fix the token if it was meant to ` + `be a JWT (parse error: ${parseErrorMessage}).`);
|
|
822
736
|
}
|
|
823
|
-
const
|
|
737
|
+
const baseUrl = resolveBaseUrl(rawUrl, `Failed to validate ${OPAQUE_TOKEN_BASE_URL_VAR}`);
|
|
824
738
|
return {
|
|
825
739
|
loginStatus: "Logged in",
|
|
826
740
|
accessToken,
|
|
827
|
-
baseUrl
|
|
741
|
+
baseUrl,
|
|
828
742
|
organizationName,
|
|
829
743
|
organizationId,
|
|
830
744
|
tenantName,
|
|
@@ -840,7 +754,7 @@ var readAuthFromEnv = () => {
|
|
|
840
754
|
const baseUrl = resolveBaseUrl(iss, "Failed to derive server URL from token 'iss' claim");
|
|
841
755
|
const expiration = getTokenExpiration(accessToken);
|
|
842
756
|
const loginStatus = expiration && expiration <= new Date ? "Expired" : "Logged in";
|
|
843
|
-
const identity =
|
|
757
|
+
const identity = resolveSessionIdentity2(accessToken);
|
|
844
758
|
const scopes = readTokenScopes(accessToken);
|
|
845
759
|
return {
|
|
846
760
|
loginStatus,
|
|
@@ -969,9 +883,6 @@ var parseResourceUrl = (url) => {
|
|
|
969
883
|
};
|
|
970
884
|
};
|
|
971
885
|
var ROBOT_CLIENT_LOADER_KEY = Symbol.for("@uipath/auth/RobotClientLoader");
|
|
972
|
-
var registerRobotClientLoader = (loader) => {
|
|
973
|
-
globalThis[ROBOT_CLIENT_LOADER_KEY] = loader;
|
|
974
|
-
};
|
|
975
886
|
var getRegisteredRobotClientLoader = () => {
|
|
976
887
|
const loader = globalThis[ROBOT_CLIENT_LOADER_KEY];
|
|
977
888
|
return typeof loader === "function" ? loader : undefined;
|
|
@@ -988,7 +899,7 @@ var defaultLoadModule = async () => {
|
|
|
988
899
|
return mod;
|
|
989
900
|
};
|
|
990
901
|
var tryRobotClientFallback = async (options = {}) => {
|
|
991
|
-
if (
|
|
902
|
+
if (isBrowser2())
|
|
992
903
|
return;
|
|
993
904
|
if (!options.force) {
|
|
994
905
|
if (process.env.CI || process.env.GITHUB_ACTIONS) {
|
|
@@ -1127,9 +1038,12 @@ var refreshAccessToken = async ({
|
|
|
1127
1038
|
body: tokenParams
|
|
1128
1039
|
});
|
|
1129
1040
|
const tokenData = await tokenResponse.json();
|
|
1130
|
-
if (
|
|
1041
|
+
if (tokenResponse.status === 400 || tokenResponse.status === 401) {
|
|
1131
1042
|
throw new TokenRefreshOAuthError;
|
|
1132
1043
|
}
|
|
1044
|
+
if (!tokenResponse.ok) {
|
|
1045
|
+
throw new Error(`Token refresh failed: HTTP ${tokenResponse.status}`);
|
|
1046
|
+
}
|
|
1133
1047
|
const newAccessToken = tokenData.access_token;
|
|
1134
1048
|
const newRefreshToken = tokenData.refresh_token;
|
|
1135
1049
|
if (typeof newAccessToken !== "string" || typeof newRefreshToken !== "string") {
|
|
@@ -1145,7 +1059,6 @@ var refreshAccessToken = async ({
|
|
|
1145
1059
|
var AUTH_FLOW_ENV_VAR = "UIPATH_AUTH_FLOW";
|
|
1146
1060
|
|
|
1147
1061
|
// ../auth/src/utils/envFile.ts
|
|
1148
|
-
var DEFAULT_AUTH_FILENAME = AUTH_FILENAME;
|
|
1149
1062
|
var DEFAULT_ENV_FILENAME = `${UIPATH_HOME_DIR}/${AUTH_FILENAME}`;
|
|
1150
1063
|
var KNOWN_ERROR_CODES = new Set([
|
|
1151
1064
|
"EISDIR",
|
|
@@ -1193,20 +1106,20 @@ var probeAsync = async (fs, candidate) => {
|
|
|
1193
1106
|
var resolveEnvFileLocationAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) => {
|
|
1194
1107
|
const fs = getFileSystem();
|
|
1195
1108
|
if (fs.path.isAbsolute(envFilePath)) {
|
|
1196
|
-
const
|
|
1197
|
-
return
|
|
1109
|
+
const probe = await probeAsync(fs, envFilePath);
|
|
1110
|
+
return probe.exists ? { exists: true, absolutePath: envFilePath, source: "absolute" } : {
|
|
1198
1111
|
exists: false,
|
|
1199
1112
|
absolutePath: envFilePath,
|
|
1200
1113
|
source: "absolute",
|
|
1201
|
-
...
|
|
1114
|
+
...probe.unusable ? { unusable: probe.unusable } : {}
|
|
1202
1115
|
};
|
|
1203
1116
|
}
|
|
1204
1117
|
const cwd = opts?.cwd ?? fs.env.cwd();
|
|
1205
1118
|
let searchDir = cwd;
|
|
1206
1119
|
while (true) {
|
|
1207
1120
|
const candidate = fs.path.join(searchDir, envFilePath);
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1121
|
+
const probe = await probeAsync(fs, candidate);
|
|
1122
|
+
if (probe.exists) {
|
|
1210
1123
|
return {
|
|
1211
1124
|
exists: true,
|
|
1212
1125
|
absolutePath: candidate,
|
|
@@ -1308,15 +1221,9 @@ var saveEnvFileAsync = async ({
|
|
|
1308
1221
|
};
|
|
1309
1222
|
|
|
1310
1223
|
// ../auth/src/loginStatus.ts
|
|
1311
|
-
var CredentialSource;
|
|
1312
|
-
((CredentialSource2) => {
|
|
1313
|
-
CredentialSource2["SavedLogin"] = "saved-login";
|
|
1314
|
-
CredentialSource2["Robot"] = "robot";
|
|
1315
|
-
CredentialSource2["EnvironmentVariables"] = "env-vars";
|
|
1316
|
-
})(CredentialSource ||= {});
|
|
1317
1224
|
var defaultRobotTenantIdCache = new Map;
|
|
1318
1225
|
var ROBOT_TENANT_LOOKUP_TIMEOUT_MS = 5000;
|
|
1319
|
-
var
|
|
1226
|
+
var getLoginStatusAsync2 = async (options = {}) => {
|
|
1320
1227
|
return getLoginStatusWithDeps(options);
|
|
1321
1228
|
};
|
|
1322
1229
|
var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
|
|
@@ -1346,7 +1253,7 @@ var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
|
|
|
1346
1253
|
if (isEnvAuthEnabled()) {
|
|
1347
1254
|
return readAuthFromEnv();
|
|
1348
1255
|
}
|
|
1349
|
-
const activeProfile =
|
|
1256
|
+
const activeProfile = getActiveAuthProfile2();
|
|
1350
1257
|
const activeProfileFilePath = getActiveAuthProfileFilePath();
|
|
1351
1258
|
const usingActiveProfile = activeProfile !== undefined && (options.envFilePath === undefined || options.envFilePath === activeProfileFilePath);
|
|
1352
1259
|
const envFilePath = options.envFilePath ?? activeProfileFilePath ?? DEFAULT_ENV_FILENAME;
|
|
@@ -1544,7 +1451,7 @@ async function buildFileStatus(tokens, credentials, globalHint) {
|
|
|
1544
1451
|
return result;
|
|
1545
1452
|
}
|
|
1546
1453
|
function identityFields(accessToken, credentials) {
|
|
1547
|
-
const identity =
|
|
1454
|
+
const identity = resolveSessionIdentity2(accessToken, parseAuthFlow(credentials[AUTH_FLOW_ENV_VAR]));
|
|
1548
1455
|
const scopes = readTokenScopes(accessToken);
|
|
1549
1456
|
return {
|
|
1550
1457
|
...identity ? { identity } : {},
|
|
@@ -1552,7 +1459,7 @@ function identityFields(accessToken, credentials) {
|
|
|
1552
1459
|
};
|
|
1553
1460
|
}
|
|
1554
1461
|
async function buildRobotStatus(robotCreds, deps) {
|
|
1555
|
-
const identity =
|
|
1462
|
+
const identity = resolveSessionIdentity2(robotCreds.accessToken);
|
|
1556
1463
|
const scopes = readTokenScopes(robotCreds.accessToken);
|
|
1557
1464
|
const tenant = robotCreds.tenantId ? { tenantId: robotCreds.tenantId } : await resolveRobotTenantId(robotCreds, deps);
|
|
1558
1465
|
return {
|
|
@@ -1855,26 +1762,38 @@ function errorMessage(error) {
|
|
|
1855
1762
|
}
|
|
1856
1763
|
|
|
1857
1764
|
// ../auth/src/authContext.ts
|
|
1858
|
-
|
|
1859
|
-
|
|
1765
|
+
class AuthContextUnavailableError extends Error {
|
|
1766
|
+
instructionContext;
|
|
1767
|
+
sessionHint;
|
|
1768
|
+
errorCode = "authentication_required";
|
|
1769
|
+
retry = "RetryWillNotFix";
|
|
1770
|
+
constructor(message, instructionContext = "auth", sessionHint) {
|
|
1771
|
+
super(message);
|
|
1772
|
+
this.instructionContext = instructionContext;
|
|
1773
|
+
this.sessionHint = sessionHint;
|
|
1774
|
+
this.name = "AuthContextUnavailableError";
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
var getAuthContext2 = async (options = {}) => {
|
|
1778
|
+
const status = await getLoginStatusAsync2({
|
|
1860
1779
|
ensureTokenValidityMinutes: options.ensureTokenValidityMinutes,
|
|
1861
1780
|
envFilePath: options.envFilePath
|
|
1862
1781
|
});
|
|
1863
1782
|
if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
|
|
1864
|
-
throw new
|
|
1783
|
+
throw new AuthContextUnavailableError(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.", "auth", status.hint);
|
|
1865
1784
|
}
|
|
1866
|
-
const tenantName = options.tenant
|
|
1785
|
+
const tenantName = options.tenant || status.tenantName;
|
|
1867
1786
|
if (options.requireOrganizationId && !status.organizationId) {
|
|
1868
|
-
throw new
|
|
1787
|
+
throw new AuthContextUnavailableError("Organization ID not available. Ensure you are logged in with an organization context.", "identity");
|
|
1869
1788
|
}
|
|
1870
1789
|
if (options.requireOrganizationName && !status.organizationName) {
|
|
1871
|
-
throw new
|
|
1790
|
+
throw new AuthContextUnavailableError("Organization name not available. Ensure you are logged in with an organization context.", "identity");
|
|
1872
1791
|
}
|
|
1873
1792
|
if (options.requireTenantId && !status.tenantId) {
|
|
1874
|
-
throw new
|
|
1793
|
+
throw new AuthContextUnavailableError(`Tenant ID not available. Ensure UIPATH_TENANT_ID is set.${status.hint ? ` ${status.hint}` : ""}`, "identity", status.hint);
|
|
1875
1794
|
}
|
|
1876
|
-
if (options.requireTenantName && tenantName
|
|
1877
|
-
throw new
|
|
1795
|
+
if (options.requireTenantName && !tenantName) {
|
|
1796
|
+
throw new AuthContextUnavailableError("Tenant not provided and UIPATH_TENANT_NAME not set. Run 'uip login' to select a tenant, or use 'uip login tenant set <tenant>' to switch tenants.", "identity");
|
|
1878
1797
|
}
|
|
1879
1798
|
return {
|
|
1880
1799
|
baseUrl: status.baseUrl,
|
|
@@ -1886,561 +1805,16 @@ var getAuthContext = async (options = {}) => {
|
|
|
1886
1805
|
identity: status.identity
|
|
1887
1806
|
};
|
|
1888
1807
|
};
|
|
1889
|
-
var getAuthEnv = async (options = {}) => {
|
|
1890
|
-
const authEnv = {};
|
|
1891
|
-
let status;
|
|
1892
|
-
try {
|
|
1893
|
-
status = await getLoginStatusAsync(options);
|
|
1894
|
-
} catch {
|
|
1895
|
-
return { authEnv };
|
|
1896
|
-
}
|
|
1897
|
-
if (status.loginStatus === "Logged in" && status.accessToken) {
|
|
1898
|
-
authEnv.UIPATH_ACCESS_TOKEN = status.accessToken;
|
|
1899
|
-
if (status.baseUrl) {
|
|
1900
|
-
const org = status.organizationName || status.organizationId;
|
|
1901
|
-
const tenant = status.tenantName || status.tenantId;
|
|
1902
|
-
if (org && tenant) {
|
|
1903
|
-
authEnv.UIPATH_URL = `${status.baseUrl.replace(/\/+$/, "")}/${org}/${tenant}`;
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
if (status.organizationId)
|
|
1907
|
-
authEnv.UIPATH_ORGANIZATION_ID = status.organizationId;
|
|
1908
|
-
if (status.organizationName)
|
|
1909
|
-
authEnv.UIPATH_ORGANIZATION_NAME = status.organizationName;
|
|
1910
|
-
if (status.tenantId)
|
|
1911
|
-
authEnv.UIPATH_TENANT_ID = status.tenantId;
|
|
1912
|
-
if (status.tenantName)
|
|
1913
|
-
authEnv.UIPATH_TENANT_NAME = status.tenantName;
|
|
1914
|
-
}
|
|
1915
|
-
return { authEnv, loginStatus: status };
|
|
1916
|
-
};
|
|
1917
|
-
// ../auth/src/authProfileDetails.ts
|
|
1918
|
-
var ORGANIZATION_NAME_KEY = "UIPATH_ORGANIZATION_NAME";
|
|
1919
|
-
var TENANT_NAME_KEY = "UIPATH_TENANT_NAME";
|
|
1920
|
-
var URL_KEY = "UIPATH_URL";
|
|
1921
|
-
var ACCESS_TOKEN_KEY = "UIPATH_ACCESS_TOKEN";
|
|
1922
|
-
function statusFromToken(accessToken) {
|
|
1923
|
-
if (!accessToken) {
|
|
1924
|
-
return { status: "Not logged in" };
|
|
1925
|
-
}
|
|
1926
|
-
const expiration = getTokenExpiration(accessToken);
|
|
1927
|
-
if (expiration === undefined) {
|
|
1928
|
-
return { status: "Logged in" };
|
|
1929
|
-
}
|
|
1930
|
-
return {
|
|
1931
|
-
status: expiration.getTime() <= Date.now() ? "Expired" : "Logged in",
|
|
1932
|
-
expiresAt: expiration.toISOString()
|
|
1933
|
-
};
|
|
1934
|
-
}
|
|
1935
|
-
async function describeAuthProfileAsync(name, filePath, active) {
|
|
1936
|
-
const base = {
|
|
1937
|
-
name,
|
|
1938
|
-
active,
|
|
1939
|
-
...filePath ? { path: filePath } : {}
|
|
1940
|
-
};
|
|
1941
|
-
if (!filePath) {
|
|
1942
|
-
return { ...base, status: "Not logged in" };
|
|
1943
|
-
}
|
|
1944
|
-
const fs = getFileSystem();
|
|
1945
|
-
const [readError, content] = await catchError(fs.readFile(filePath, "utf-8"));
|
|
1946
|
-
if (readError) {
|
|
1947
|
-
return { ...base, status: "Unreadable" };
|
|
1948
|
-
}
|
|
1949
|
-
if (content === null || content === undefined) {
|
|
1950
|
-
return { ...base, status: "Not logged in" };
|
|
1951
|
-
}
|
|
1952
|
-
const values = parseEnvContent(content);
|
|
1953
|
-
return {
|
|
1954
|
-
...base,
|
|
1955
|
-
...values[ORGANIZATION_NAME_KEY] ? { organizationName: values[ORGANIZATION_NAME_KEY] } : {},
|
|
1956
|
-
...values[TENANT_NAME_KEY] ? { tenantName: values[TENANT_NAME_KEY] } : {},
|
|
1957
|
-
...values[URL_KEY] ? { url: values[URL_KEY] } : {},
|
|
1958
|
-
...statusFromToken(values[ACCESS_TOKEN_KEY])
|
|
1959
|
-
};
|
|
1960
|
-
}
|
|
1961
|
-
async function describeAuthProfilesAsync() {
|
|
1962
|
-
const activeProfile = getActiveAuthProfile();
|
|
1963
|
-
const [defaultPathError, defaultLocation] = await catchError(resolveEnvFilePathAsync());
|
|
1964
|
-
const rows = [
|
|
1965
|
-
await describeAuthProfileAsync(DEFAULT_AUTH_PROFILE, defaultPathError ? undefined : defaultLocation?.absolutePath, activeProfile === undefined)
|
|
1966
|
-
];
|
|
1967
|
-
for (const name of await listAuthProfileNamesAsync()) {
|
|
1968
|
-
rows.push(await describeAuthProfileAsync(name, resolveAuthProfileFilePath(name), activeProfile === name));
|
|
1969
|
-
}
|
|
1970
|
-
return rows;
|
|
1971
|
-
}
|
|
1972
|
-
// ../auth/src/tokenGrant.ts
|
|
1973
|
-
var requestClientCredentialsToken = async ({
|
|
1974
|
-
tokenEndpoint,
|
|
1975
|
-
baseUrl,
|
|
1976
|
-
params,
|
|
1977
|
-
buildError
|
|
1978
|
-
}) => {
|
|
1979
|
-
const tokenResponse = await fetch(tokenEndpoint, {
|
|
1980
|
-
method: "POST",
|
|
1981
|
-
headers: {
|
|
1982
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
1983
|
-
},
|
|
1984
|
-
body: new URLSearchParams(params)
|
|
1985
|
-
});
|
|
1986
|
-
const [parseError, tokenData] = await catchError(tokenResponse.json());
|
|
1987
|
-
if (!tokenResponse.ok) {
|
|
1988
|
-
const data = parseError ? {} : tokenData ?? {};
|
|
1989
|
-
throw buildError({
|
|
1990
|
-
status: tokenResponse.status,
|
|
1991
|
-
errorType: data.error || "authentication_failed",
|
|
1992
|
-
errorDesc: data.error_description || "Unknown error"
|
|
1993
|
-
});
|
|
1994
|
-
}
|
|
1995
|
-
if (parseError || !tokenData) {
|
|
1996
|
-
throw buildError({
|
|
1997
|
-
status: tokenResponse.status,
|
|
1998
|
-
errorType: "invalid_response",
|
|
1999
|
-
errorDesc: "Token endpoint returned a non-JSON response."
|
|
2000
|
-
});
|
|
2001
|
-
}
|
|
2002
|
-
if (!tokenData.access_token) {
|
|
2003
|
-
throw buildError({
|
|
2004
|
-
status: tokenResponse.status,
|
|
2005
|
-
errorType: "invalid_response",
|
|
2006
|
-
errorDesc: "Token endpoint response did not include an access_token."
|
|
2007
|
-
});
|
|
2008
|
-
}
|
|
2009
|
-
return {
|
|
2010
|
-
UIPATH_ACCESS_TOKEN: tokenData.access_token,
|
|
2011
|
-
UIPATH_URL: baseUrl
|
|
2012
|
-
};
|
|
2013
|
-
};
|
|
2014
|
-
|
|
2015
|
-
// ../auth/src/clientCredentials.ts
|
|
2016
|
-
class ClientCredentialsAuthenticationError extends Error {
|
|
2017
|
-
status;
|
|
2018
|
-
constructor(message, status) {
|
|
2019
|
-
super(message);
|
|
2020
|
-
this.name = "ClientCredentialsAuthenticationError";
|
|
2021
|
-
this.status = status;
|
|
2022
|
-
}
|
|
2023
|
-
}
|
|
2024
|
-
var buildClientCredentialsError = ({
|
|
2025
|
-
status,
|
|
2026
|
-
errorType,
|
|
2027
|
-
errorDesc
|
|
2028
|
-
}) => {
|
|
2029
|
-
let troubleshooting = "";
|
|
2030
|
-
if (errorType === "invalid_client" || status === 401) {
|
|
2031
|
-
troubleshooting = `
|
|
2032
|
-
|
|
2033
|
-
Troubleshooting:` + `
|
|
2034
|
-
• Verify your Client ID is correct` + `
|
|
2035
|
-
• Ensure your Client Secret hasn't expired` + `
|
|
2036
|
-
• Check that the external application is enabled in UiPath` + `
|
|
2037
|
-
• Confirm you're using the correct authority URL`;
|
|
2038
|
-
} else if (errorType === "invalid_scope") {
|
|
2039
|
-
troubleshooting = `
|
|
2040
|
-
|
|
2041
|
-
Troubleshooting:` + `
|
|
2042
|
-
• The requested scopes may not be available for your account` + `
|
|
2043
|
-
• Try using default scopes or contact your UiPath administrator`;
|
|
2044
|
-
}
|
|
2045
|
-
return new ClientCredentialsAuthenticationError(`Client Credentials authentication failed (${status})
|
|
2046
|
-
` + `Error: ${errorType}
|
|
2047
|
-
` + `Details: ${errorDesc}${troubleshooting}`, status);
|
|
2048
|
-
};
|
|
2049
|
-
var clientCredentialsLogin = async ({
|
|
2050
|
-
clientId,
|
|
2051
|
-
clientSecret,
|
|
2052
|
-
scope,
|
|
2053
|
-
authority
|
|
2054
|
-
}) => {
|
|
2055
|
-
const config = await resolveConfigAsync({
|
|
2056
|
-
customAuthority: authority,
|
|
2057
|
-
customClientId: clientId,
|
|
2058
|
-
customClientSecret: clientSecret,
|
|
2059
|
-
customScopes: scope
|
|
2060
|
-
});
|
|
2061
|
-
const params = {
|
|
2062
|
-
grant_type: "client_credentials",
|
|
2063
|
-
client_id: config.clientId,
|
|
2064
|
-
client_secret: config.clientSecret ?? ""
|
|
2065
|
-
};
|
|
2066
|
-
if (config.scopes.length > 0) {
|
|
2067
|
-
params.scope = config.scopes.join(" ");
|
|
2068
|
-
}
|
|
2069
|
-
return await requestClientCredentialsToken({
|
|
2070
|
-
tokenEndpoint: config.tokenEndpoint,
|
|
2071
|
-
baseUrl: config.baseUrl,
|
|
2072
|
-
params,
|
|
2073
|
-
buildError: buildClientCredentialsError
|
|
2074
|
-
});
|
|
2075
|
-
};
|
|
2076
|
-
// ../auth/src/federatedCredentials.ts
|
|
2077
|
-
var JWT_BEARER_ASSERTION_TYPE = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
|
|
2078
|
-
|
|
2079
|
-
class FederatedCredentialsAuthenticationError extends Error {
|
|
2080
|
-
status;
|
|
2081
|
-
constructor(message, status) {
|
|
2082
|
-
super(message);
|
|
2083
|
-
this.name = "FederatedCredentialsAuthenticationError";
|
|
2084
|
-
this.status = status;
|
|
2085
|
-
}
|
|
2086
|
-
}
|
|
2087
|
-
var buildFederatedError = ({
|
|
2088
|
-
status,
|
|
2089
|
-
errorType,
|
|
2090
|
-
errorDesc
|
|
2091
|
-
}) => {
|
|
2092
|
-
let troubleshooting = "";
|
|
2093
|
-
if (errorType === "invalid_client" || errorType === "invalid_grant" || errorType === "invalid_request" || status === 401) {
|
|
2094
|
-
troubleshooting = `
|
|
2095
|
-
|
|
2096
|
-
Troubleshooting:` + `
|
|
2097
|
-
• Verify your Client ID matches the external application` + `
|
|
2098
|
-
• Confirm a federated credential is registered on the app whose` + `
|
|
2099
|
-
issuer, audience, and subject exactly match the token's claims` + `
|
|
2100
|
-
(list them: uip admin external-apps federated-credentials list <client-id>)` + `
|
|
2101
|
-
• Check the token was issued by the expected provider and has not expired` + `
|
|
2102
|
-
• Confirm you're using the correct authority URL`;
|
|
2103
|
-
} else if (errorType === "invalid_scope") {
|
|
2104
|
-
troubleshooting = `
|
|
2105
|
-
|
|
2106
|
-
Troubleshooting:` + `
|
|
2107
|
-
• The requested scopes may not be available for your application` + `
|
|
2108
|
-
• Try using default scopes or contact your UiPath administrator`;
|
|
2109
|
-
}
|
|
2110
|
-
return new FederatedCredentialsAuthenticationError(`Federated Credentials authentication failed (${status})
|
|
2111
|
-
` + `Error: ${errorType}
|
|
2112
|
-
` + `Details: ${errorDesc}${troubleshooting}`, status);
|
|
2113
|
-
};
|
|
2114
|
-
var federatedCredentialsLogin = async ({
|
|
2115
|
-
clientId,
|
|
2116
|
-
clientAssertion,
|
|
2117
|
-
scope,
|
|
2118
|
-
authority
|
|
2119
|
-
}) => {
|
|
2120
|
-
const config = await resolveConfigAsync({
|
|
2121
|
-
customAuthority: authority,
|
|
2122
|
-
customClientId: clientId,
|
|
2123
|
-
customClientAssertion: clientAssertion,
|
|
2124
|
-
customScopes: scope
|
|
2125
|
-
});
|
|
2126
|
-
const params = {
|
|
2127
|
-
grant_type: "client_credentials",
|
|
2128
|
-
client_id: config.clientId,
|
|
2129
|
-
client_assertion: clientAssertion,
|
|
2130
|
-
client_assertion_type: JWT_BEARER_ASSERTION_TYPE
|
|
2131
|
-
};
|
|
2132
|
-
if (config.scopes.length > 0) {
|
|
2133
|
-
params.scope = config.scopes.join(" ");
|
|
2134
|
-
}
|
|
2135
|
-
return await requestClientCredentialsToken({
|
|
2136
|
-
tokenEndpoint: config.tokenEndpoint,
|
|
2137
|
-
baseUrl: config.baseUrl,
|
|
2138
|
-
params,
|
|
2139
|
-
buildError: buildFederatedError
|
|
2140
|
-
});
|
|
2141
|
-
};
|
|
2142
1808
|
// ../auth/src/selectTenant.ts
|
|
2143
1809
|
var TENANT_SELECTION_REQUIRED_CODE = "TENANT_SELECTION_REQUIRED";
|
|
2144
1810
|
var INVALID_TENANT_CODE = "INVALID_TENANT";
|
|
2145
|
-
|
|
2146
|
-
class TenantSelectionError extends Error {
|
|
2147
|
-
availableTenants;
|
|
2148
|
-
organizationName;
|
|
2149
|
-
constructor(message, organizationName, availableTenants) {
|
|
2150
|
-
super(message);
|
|
2151
|
-
this.organizationName = organizationName;
|
|
2152
|
-
this.availableTenants = availableTenants;
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
class TenantSelectionRequiredError extends TenantSelectionError {
|
|
2157
|
-
code = TENANT_SELECTION_REQUIRED_CODE;
|
|
2158
|
-
constructor(organizationName, availableTenants) {
|
|
2159
|
-
super(`Multiple tenants available in organization "${organizationName}"; none selected.`, organizationName, availableTenants);
|
|
2160
|
-
this.name = "TenantSelectionRequiredError";
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
class InvalidTenantError extends TenantSelectionError {
|
|
2165
|
-
code = INVALID_TENANT_CODE;
|
|
2166
|
-
requestedTenant;
|
|
2167
|
-
constructor(requestedTenant, organizationName, availableTenants) {
|
|
2168
|
-
super(`Invalid tenant requested: "${requestedTenant}"
|
|
2169
|
-
` + `Organization: ${organizationName}
|
|
2170
|
-
` + `Available tenants: ${availableTenants.join(", ")}`, organizationName, availableTenants);
|
|
2171
|
-
this.name = "InvalidTenantError";
|
|
2172
|
-
this.requestedTenant = requestedTenant;
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
1811
|
var TENANT_SELECTION_CODES = new Set([
|
|
2176
1812
|
TENANT_SELECTION_REQUIRED_CODE,
|
|
2177
1813
|
INVALID_TENANT_CODE
|
|
2178
1814
|
]);
|
|
2179
|
-
function isTenantSelectionError(error) {
|
|
2180
|
-
if (!(error instanceof Object) || !("code" in error)) {
|
|
2181
|
-
return false;
|
|
2182
|
-
}
|
|
2183
|
-
const code = error.code;
|
|
2184
|
-
return typeof code === "string" && TENANT_SELECTION_CODES.has(code) && Array.isArray(error.availableTenants);
|
|
2185
|
-
}
|
|
2186
|
-
var selectTenantWithDeps = async (baseUrl, accessToken, organizationId, targetTenantName, interactive, deps = {}) => {
|
|
2187
|
-
const {
|
|
2188
|
-
fetchTenantsAndOrgs = fetchTenantsAndOrganizations,
|
|
2189
|
-
selectFromList
|
|
2190
|
-
} = deps;
|
|
2191
|
-
const data = await fetchTenantsAndOrgs(baseUrl, accessToken, organizationId);
|
|
2192
|
-
const { tenants, organization } = data;
|
|
2193
|
-
if (!tenants || tenants.length === 0) {
|
|
2194
|
-
throw new Error("No tenants found for this organization");
|
|
2195
|
-
}
|
|
2196
|
-
const tenantNames = tenants.map((tenant) => tenant.name);
|
|
2197
|
-
let selectedIndex;
|
|
2198
|
-
if (targetTenantName !== undefined) {
|
|
2199
|
-
selectedIndex = tenants.findIndex((tenant) => tenant.name === targetTenantName);
|
|
2200
|
-
if (selectedIndex === -1) {
|
|
2201
|
-
throw new InvalidTenantError(targetTenantName, organization.name, tenantNames);
|
|
2202
|
-
}
|
|
2203
|
-
} else if (tenants.length === 1) {
|
|
2204
|
-
selectedIndex = 0;
|
|
2205
|
-
} else if (interactive) {
|
|
2206
|
-
if (!selectFromList) {
|
|
2207
|
-
throw new Error("Interactive tenant selection requires a `selectFromList` callback. " + "Pass one via the `deps` argument of `selectTenantWithDeps`.");
|
|
2208
|
-
}
|
|
2209
|
-
selectedIndex = await selectFromList(tenantNames, "Select a tenant:");
|
|
2210
|
-
} else {
|
|
2211
|
-
throw new TenantSelectionRequiredError(organization.name, tenantNames);
|
|
2212
|
-
}
|
|
2213
|
-
const selectedTenant = tenants[selectedIndex];
|
|
2214
|
-
return [selectedTenant.name, selectedTenant.id, organization.name];
|
|
2215
|
-
};
|
|
2216
|
-
|
|
2217
|
-
// ../auth/src/interactive.ts
|
|
2218
|
-
var interactiveLoginWithDeps = async (options, deps) => {
|
|
2219
|
-
const {
|
|
2220
|
-
resolveConfig = resolveConfigAsync,
|
|
2221
|
-
clientCredentials = clientCredentialsLogin,
|
|
2222
|
-
federatedCredentials = federatedCredentialsLogin,
|
|
2223
|
-
auth = authenticate,
|
|
2224
|
-
saveEnvFile = saveEnvFileAsync,
|
|
2225
|
-
loadEnvFile = loadEnvFileAsync,
|
|
2226
|
-
getFs = getFileSystem,
|
|
2227
|
-
jwtParser = parseJWT,
|
|
2228
|
-
issuerAsserter = assertIssuerMatchesAuthority,
|
|
2229
|
-
tenantSelector = (baseUrl, accessToken, organizationId, tenantName, interactive2) => selectTenantWithDeps(baseUrl, accessToken, organizationId, tenantName, interactive2, { selectFromList: options.selectFromList })
|
|
2230
|
-
} = deps;
|
|
2231
|
-
const {
|
|
2232
|
-
envFilePath,
|
|
2233
|
-
scope,
|
|
2234
|
-
authority,
|
|
2235
|
-
clientId,
|
|
2236
|
-
clientSecret,
|
|
2237
|
-
clientAssertion,
|
|
2238
|
-
tenant,
|
|
2239
|
-
organization,
|
|
2240
|
-
interactive,
|
|
2241
|
-
onEvent,
|
|
2242
|
-
timeoutMs,
|
|
2243
|
-
noBrowser,
|
|
2244
|
-
signal
|
|
2245
|
-
} = options;
|
|
2246
|
-
const emit = (event) => {
|
|
2247
|
-
if (!onEvent)
|
|
2248
|
-
return;
|
|
2249
|
-
try {
|
|
2250
|
-
onEvent(event);
|
|
2251
|
-
} catch {}
|
|
2252
|
-
};
|
|
2253
|
-
const deliverAuthUrl = (url) => {
|
|
2254
|
-
try {
|
|
2255
|
-
onEvent?.({ type: "auth-url", url });
|
|
2256
|
-
} catch (error) {
|
|
2257
|
-
throw new Error("Failed to deliver the authorize URL to the onEvent subscriber; " + "cannot continue headless login.", { cause: error });
|
|
2258
|
-
}
|
|
2259
|
-
};
|
|
2260
|
-
const config = await resolveConfig({
|
|
2261
|
-
customAuthority: authority,
|
|
2262
|
-
customClientId: clientId,
|
|
2263
|
-
customClientSecret: clientSecret,
|
|
2264
|
-
customClientAssertion: clientAssertion
|
|
2265
|
-
});
|
|
2266
|
-
const { clientSecret: resolvedSecret } = config;
|
|
2267
|
-
if (noBrowser && !resolvedSecret && !clientAssertion && !onEvent) {
|
|
2268
|
-
throw new Error("noBrowser login requires an onEvent subscriber to receive the " + "auth-url event — the authorize URL is delivered through it.");
|
|
2269
|
-
}
|
|
2270
|
-
const authFlow = clientAssertion ? "federated_credentials" : resolvedSecret ? "client_credentials" : "authorization_code";
|
|
2271
|
-
const authPromise = clientAssertion ? (async () => {
|
|
2272
|
-
return await federatedCredentials({
|
|
2273
|
-
clientId: config.clientId,
|
|
2274
|
-
clientAssertion,
|
|
2275
|
-
authority: config.baseUrl,
|
|
2276
|
-
scope
|
|
2277
|
-
});
|
|
2278
|
-
})() : resolvedSecret ? (async () => {
|
|
2279
|
-
return await clientCredentials({
|
|
2280
|
-
clientId: config.clientId,
|
|
2281
|
-
clientSecret: resolvedSecret,
|
|
2282
|
-
authority: config.baseUrl,
|
|
2283
|
-
scope
|
|
2284
|
-
});
|
|
2285
|
-
})() : (async () => {
|
|
2286
|
-
const authTokens = await auth({
|
|
2287
|
-
baseUrl: authority,
|
|
2288
|
-
clientId,
|
|
2289
|
-
clientSecret,
|
|
2290
|
-
scope,
|
|
2291
|
-
organization,
|
|
2292
|
-
timeoutMs,
|
|
2293
|
-
noBrowser,
|
|
2294
|
-
signal,
|
|
2295
|
-
onAuthUrl: noBrowser ? (url) => deliverAuthUrl(url) : undefined,
|
|
2296
|
-
onPortReclaimed: ({ pid }) => emit({
|
|
2297
|
-
type: "port-reclaimed",
|
|
2298
|
-
message: `A previous 'uip login'${pid === undefined ? "" : ` (PID ${pid})`} was still holding the callback port ` + `(${new URL(DEFAULT_REDIRECT_URI).port}) and was released; continuing with this login.`
|
|
2299
|
-
})
|
|
2300
|
-
});
|
|
2301
|
-
return {
|
|
2302
|
-
UIPATH_ACCESS_TOKEN: authTokens.accessToken,
|
|
2303
|
-
UIPATH_REFRESH_TOKEN: authTokens.refreshToken
|
|
2304
|
-
};
|
|
2305
|
-
})();
|
|
2306
|
-
const [authError, tokens] = await catchError(authPromise);
|
|
2307
|
-
if (authError) {
|
|
2308
|
-
throw authError;
|
|
2309
|
-
}
|
|
2310
|
-
issuerAsserter(tokens.UIPATH_ACCESS_TOKEN, config.baseUrl);
|
|
2311
|
-
const credentials = {
|
|
2312
|
-
...tokens,
|
|
2313
|
-
UIPATH_URL: config.baseUrl,
|
|
2314
|
-
[AUTH_FLOW_ENV_VAR]: authFlow
|
|
2315
|
-
};
|
|
2316
|
-
if (authFlow !== "authorization_code") {
|
|
2317
|
-
credentials.UIPATH_REFRESH_TOKEN = undefined;
|
|
2318
|
-
}
|
|
2319
|
-
try {
|
|
2320
|
-
const tokenData = jwtParser(tokens.UIPATH_ACCESS_TOKEN);
|
|
2321
|
-
const orgId = tokenData.prtId || tokenData.organizationId || tokenData.prt_id;
|
|
2322
|
-
if (typeof orgId !== "string" || orgId.length === 0) {
|
|
2323
|
-
throw new Error("Organization ID not available from login token. Cannot establish an active tenant.");
|
|
2324
|
-
}
|
|
2325
|
-
credentials.UIPATH_ORGANIZATION_ID = orgId;
|
|
2326
|
-
if (organization) {
|
|
2327
|
-
credentials.UIPATH_ORGANIZATION_NAME = organization;
|
|
2328
|
-
}
|
|
2329
|
-
const [tenantName, tenantId, orgName] = await tenantSelector(config.baseUrl, tokens.UIPATH_ACCESS_TOKEN, orgId, tenant, interactive);
|
|
2330
|
-
credentials.UIPATH_ORGANIZATION_NAME = orgName;
|
|
2331
|
-
credentials.UIPATH_TENANT_NAME = tenantName;
|
|
2332
|
-
credentials.UIPATH_TENANT_ID = tenantId;
|
|
2333
|
-
} catch (error) {
|
|
2334
|
-
if (!isTenantSelectionError(error)) {
|
|
2335
|
-
emit({
|
|
2336
|
-
type: "tenant-fetch-failed",
|
|
2337
|
-
message: error instanceof Error ? error.message : String(error)
|
|
2338
|
-
});
|
|
2339
|
-
}
|
|
2340
|
-
throw error;
|
|
2341
|
-
}
|
|
2342
|
-
const fs = getFs();
|
|
2343
|
-
const requestedPath = envFilePath ?? DEFAULT_ENV_FILENAME;
|
|
2344
|
-
let savePath = requestedPath;
|
|
2345
|
-
let savedLocally = false;
|
|
2346
|
-
if (!fs.path.isAbsolute(savePath)) {
|
|
2347
|
-
let searchDir = fs.env.cwd();
|
|
2348
|
-
while (true) {
|
|
2349
|
-
const candidate = fs.path.join(searchDir, savePath);
|
|
2350
|
-
if (await fs.exists(candidate)) {
|
|
2351
|
-
try {
|
|
2352
|
-
const existing = await loadEnvFile({
|
|
2353
|
-
envPath: candidate
|
|
2354
|
-
});
|
|
2355
|
-
if (existing.UIPATH_ACCESS_TOKEN) {
|
|
2356
|
-
savePath = candidate;
|
|
2357
|
-
savedLocally = true;
|
|
2358
|
-
break;
|
|
2359
|
-
}
|
|
2360
|
-
} catch {}
|
|
2361
|
-
}
|
|
2362
|
-
const parentDir = fs.path.dirname(searchDir);
|
|
2363
|
-
if (parentDir === searchDir) {
|
|
2364
|
-
break;
|
|
2365
|
-
}
|
|
2366
|
-
searchDir = parentDir;
|
|
2367
|
-
}
|
|
2368
|
-
}
|
|
2369
|
-
let saveRelease;
|
|
2370
|
-
try {
|
|
2371
|
-
if (typeof fs.acquireLock === "function") {
|
|
2372
|
-
saveRelease = await fs.acquireLock(savePath);
|
|
2373
|
-
}
|
|
2374
|
-
} catch {
|
|
2375
|
-
saveRelease = undefined;
|
|
2376
|
-
}
|
|
2377
|
-
try {
|
|
2378
|
-
await saveEnvFile({
|
|
2379
|
-
envPath: savePath,
|
|
2380
|
-
data: credentials,
|
|
2381
|
-
merge: true
|
|
2382
|
-
});
|
|
2383
|
-
} finally {
|
|
2384
|
-
if (saveRelease) {
|
|
2385
|
-
await saveRelease().catch(() => {});
|
|
2386
|
-
}
|
|
2387
|
-
}
|
|
2388
|
-
const reportedPath = fs.path.isAbsolute(savePath) ? savePath : fs.path.join(fs.env.homedir(), savePath);
|
|
2389
|
-
emit({
|
|
2390
|
-
type: "saved",
|
|
2391
|
-
path: reportedPath,
|
|
2392
|
-
locality: savedLocally ? "local" : "global"
|
|
2393
|
-
});
|
|
2394
|
-
return credentials;
|
|
2395
|
-
};
|
|
2396
|
-
var interactiveLogin = async (options) => {
|
|
2397
|
-
return interactiveLoginWithDeps(options, {});
|
|
2398
|
-
};
|
|
2399
|
-
// ../auth/src/logout.ts
|
|
2400
|
-
async function logoutWithDeps(options, deps = {}) {
|
|
2401
|
-
const {
|
|
2402
|
-
resolveEnvFilePath = resolveEnvFilePathAsync,
|
|
2403
|
-
getFileSystem: getFs = getFileSystem,
|
|
2404
|
-
clearBreaker = clearRefreshBreaker,
|
|
2405
|
-
getActiveProfileFilePath = getActiveAuthProfileFilePath
|
|
2406
|
-
} = deps;
|
|
2407
|
-
const fs = getFs();
|
|
2408
|
-
const { absolutePath } = await resolveEnvFilePath(options.file ?? getActiveProfileFilePath());
|
|
2409
|
-
if (absolutePath && await fs.exists(absolutePath)) {
|
|
2410
|
-
let release;
|
|
2411
|
-
try {
|
|
2412
|
-
if (typeof fs.acquireLock === "function") {
|
|
2413
|
-
release = await fs.acquireLock(absolutePath);
|
|
2414
|
-
}
|
|
2415
|
-
} catch {
|
|
2416
|
-
release = undefined;
|
|
2417
|
-
}
|
|
2418
|
-
try {
|
|
2419
|
-
await fs.rm(absolutePath);
|
|
2420
|
-
await clearBreaker(absolutePath);
|
|
2421
|
-
} finally {
|
|
2422
|
-
if (release) {
|
|
2423
|
-
await release().catch(() => {});
|
|
2424
|
-
}
|
|
2425
|
-
}
|
|
2426
|
-
return {
|
|
2427
|
-
success: true,
|
|
2428
|
-
message: `Logged out successfully. Removed ${absolutePath}`,
|
|
2429
|
-
removedPath: absolutePath
|
|
2430
|
-
};
|
|
2431
|
-
}
|
|
2432
|
-
return {
|
|
2433
|
-
success: false,
|
|
2434
|
-
message: "No credentials file found. You are already logged out.",
|
|
2435
|
-
reason: "no_credentials_file"
|
|
2436
|
-
};
|
|
2437
|
-
}
|
|
2438
|
-
async function logout(options) {
|
|
2439
|
-
return logoutWithDeps(options);
|
|
2440
|
-
}
|
|
2441
1815
|
|
|
2442
1816
|
// ../auth/src/index.ts
|
|
2443
|
-
var
|
|
1817
|
+
var authenticate2 = async ({
|
|
2444
1818
|
baseUrl,
|
|
2445
1819
|
clientId,
|
|
2446
1820
|
clientSecret,
|
|
@@ -2470,7 +1844,7 @@ var authenticate = async ({
|
|
|
2470
1844
|
let effectiveRedirectUri;
|
|
2471
1845
|
if (redirectUri) {
|
|
2472
1846
|
effectiveRedirectUri = redirectUri.toString();
|
|
2473
|
-
} else if (
|
|
1847
|
+
} else if (isBrowser2()) {
|
|
2474
1848
|
const origin = getGlobalThis()?.window?.location?.origin ?? "";
|
|
2475
1849
|
effectiveRedirectUri = `${origin}/oidc/login`;
|
|
2476
1850
|
} else {
|
|
@@ -2494,11 +1868,11 @@ var authenticate = async ({
|
|
|
2494
1868
|
}
|
|
2495
1869
|
const authUrl = `${authorizationEndpoint}?${authParams.toString()}`;
|
|
2496
1870
|
let strategy;
|
|
2497
|
-
if (
|
|
2498
|
-
const { BrowserAuthStrategy } = await import("./browser-strategy-
|
|
1871
|
+
if (isBrowser2()) {
|
|
1872
|
+
const { BrowserAuthStrategy } = await import("./browser-strategy-gnftxwsf.js");
|
|
2499
1873
|
strategy = new BrowserAuthStrategy;
|
|
2500
1874
|
} else {
|
|
2501
|
-
const { NodeAuthStrategy } = await import("./node-strategy-
|
|
1875
|
+
const { NodeAuthStrategy } = await import("./node-strategy-wrjxmbzt.js");
|
|
2502
1876
|
strategy = new NodeAuthStrategy;
|
|
2503
1877
|
}
|
|
2504
1878
|
const code = await strategy.execute(authUrl, effectiveRedirectUriUrl, state, {
|
|
@@ -2518,6 +1892,6 @@ var authenticate = async ({
|
|
|
2518
1892
|
});
|
|
2519
1893
|
};
|
|
2520
1894
|
|
|
2521
|
-
export {
|
|
1895
|
+
export { INHERITED_AUTH_PROFILE_ENV2, getActiveAuthProfile2, resolveSessionIdentity2, getLoginStatusAsync2, getAuthContext2, authenticate2 };
|
|
2522
1896
|
|
|
2523
|
-
//# debugId=
|
|
1897
|
+
//# debugId=C74D85E4430C6FA964756E2164756E21
|