@uipath/flow-tool 1.201.0 → 1.202.0-preview.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{authoring-7r6g06c7.js → authoring-wpa6d0vf.js} +74 -48
- package/dist/binding-service-dh91hw9e.js +141 -0
- package/dist/{browser-strategy-rkcvc6tn.js → browser-strategy-6atc7v8s.js} +3 -3
- package/dist/connector-service-d9ph9kx1.js +948 -0
- package/dist/{conversion-H2VEEYLB-ng48mbf7.js → conversion-QANACVCM-zs0hhfjv.js} +39 -33
- package/dist/{de-5KVP66U6-f7knj511.js → de-5KVP66U6-1bnf4zt5.js} +52 -52
- package/dist/de-6U7ECGHH-xwsw33fk.js +35 -0
- package/dist/{de-5HU6GFWV-4EZK6G7N-yrh21f52.js → de-7XQXX2DK-IDWR6CAR-n4z245kt.js} +857 -845
- package/dist/{de-5HU6GFWV-zheyw6d2.js → de-7XQXX2DK-tqdy5n2b.js} +857 -845
- package/dist/{de-HKTOVV4H-d5yw5j21.js → de-HKTOVV4H-pe9w0xn8.js} +46 -46
- package/dist/{de-XLT4QPIP-0rtw349w.js → de-XLT4QPIP-kj81dxjc.js} +9 -9
- package/dist/debug-conversation-trigger-452frzyz.js +41 -0
- package/dist/debug-http-client-wd6xb8v4.js +31 -0
- package/dist/debug-service-fvyexnb1.js +58 -0
- package/dist/edge-service-e77bndbe.js +162 -0
- package/dist/{elk.bundled-pydbzeez.js → elk.bundled-vpsbxz0p.js} +3 -3
- package/dist/{en-MABQK6C4-REWE2WG2-8dp4cqdg.js → en-5ZGC5VQ3-EWX7ILY7-rmtj70fk.js} +898 -898
- package/dist/{en-MABQK6C4-nkzq2j8t.js → en-5ZGC5VQ3-h581y30k.js} +897 -897
- package/dist/en-EPWMLP2N-2wvge238.js +28 -0
- package/dist/{en-UNT7BE26-rhh65jry.js → en-LQHKFSEY-vvbe8ve9.js} +13 -11
- package/dist/{en-P4AS26D7-szrzfxz1.js → en-P4AS26D7-zptp77bm.js} +45 -45
- package/dist/{en-4KXU7N7B-66fntxa2.js → en-X3S6IZ5J-nhkg6pwn.js} +54 -60
- package/dist/{es-MX-H2EAXLYI-qwnqt48x.js → es-MX-H2EAXLYI-j42kfkxy.js} +46 -46
- package/dist/es-MX-NHTIP5YM-ar6zfx95.js +35 -0
- package/dist/{es-MX-OKNDG2NH-c1k1s1tg.js → es-MX-OKNDG2NH-tcac6j4g.js} +9 -9
- package/dist/{es-MX-POESXYP2-UW6VP5QI-cd3a79g9.js → es-MX-U2VN3SZW-KYAJ2ONK-kdram1g1.js} +857 -845
- package/dist/{es-MX-POESXYP2-9538722k.js → es-MX-U2VN3SZW-anynsmd8.js} +857 -845
- package/dist/{es-MX-XAVLOQW3-9b3cp9n8.js → es-MX-XAVLOQW3-q00km2y7.js} +52 -52
- package/dist/{es-NQICVYSQ-aa9z3nhs.js → es-NQICVYSQ-3dtqgget.js} +9 -9
- package/dist/{es-O4PAV2CR-jwfaawwk.js → es-O4PAV2CR-0g23ve3v.js} +46 -46
- package/dist/es-PQ3RA33Q-y4kxhjfr.js +35 -0
- package/dist/{es-VFPNVMP5-thm0z9sr.js → es-VFPNVMP5-bx2c337j.js} +52 -52
- package/dist/{es-LUTYN7U7-IY5QWOUF-k2aefzc0.js → es-ZGCPPOME-24PJEGPV-rn86z9kn.js} +857 -845
- package/dist/{es-LUTYN7U7-ye5zn4sn.js → es-ZGCPPOME-8gazspjj.js} +857 -845
- package/dist/flow-api-wv8p8xbd.js +36 -0
- package/dist/flow-debug-service-tfbefas6.js +741 -0
- package/dist/flow-eval-node-target-c6wea7rz.js +44 -0
- package/dist/flow-eval-run-service-01kdky72.js +961 -0
- package/dist/flow-eval-service-ft8e16jz.js +1338 -0
- package/dist/flow-init-service-mva4crty.js +35 -0
- package/dist/flow-io-r318sjrw.js +36 -0
- package/dist/flow-migrate-service-rwcdx60q.js +119 -0
- package/dist/flow-pack-service-p4hxyj9e.js +280 -0
- package/dist/flow-validate-service-j25pxpwz.js +57 -0
- package/dist/{fr-5YRGHXF5-q6b63yg0.js → fr-5YRGHXF5-kz1ywpv6.js} +46 -46
- package/dist/{fr-E5MDO4EG-exvrs7ge.js → fr-E5MDO4EG-c3mkty2t.js} +52 -52
- package/dist/{fr-PFHIL7YZ-cxnshwa8.js → fr-PFHIL7YZ-2n589p47.js} +9 -9
- package/dist/fr-R4L3OAWI-30khpsmn.js +35 -0
- package/dist/{fr-LJIK56LW-STG6QR3T-cextvv8q.js → fr-T3G5GZCT-TU4IKBEG-k6xz1s1f.js} +857 -845
- package/dist/{fr-LJIK56LW-xf3xf2kh.js → fr-T3G5GZCT-y3f7xb1q.js} +857 -845
- package/dist/governance-fetcher-j9cx4f1d.js +391 -0
- package/dist/headless-h1myzz32.js +177196 -0
- package/dist/hitl-service-kvt5wms4.js +256 -0
- package/dist/index-1kgxzh8x.js +143 -0
- package/dist/index-4zrwgb3c.js +111 -0
- package/dist/index-ev4mdg5y.js +4801 -0
- package/dist/{index-er6vy3jk.js → index-eybzsdcc.js} +295 -317
- package/dist/{index-hsadteg4.js → index-h8cph72k.js} +4 -4
- package/dist/{index-p50kx6jv.js → index-k5tbd184.js} +276 -276
- package/dist/index-n33np76r.js +630 -0
- package/dist/{index-9f8q2ege.js → index-p3vk57z7.js} +27 -27
- package/dist/{index-dhcd9b82.js → index-w0z4s69j.js} +166 -81
- package/dist/index.js +29 -32
- package/dist/{index.umd.min-drpc57vn.js → index.umd.min-fqefd9kn.js} +3 -3
- package/dist/init.js +24 -25
- package/dist/input-reader-6pwhtp8v.js +11 -0
- package/dist/{ja-FGEGLBJ3-w9byjhze.js → ja-BI5K3JDZ-77zat4z2.js} +857 -845
- package/dist/{ja-FGEGLBJ3-MG3BSWXD-vq19zt2p.js → ja-BI5K3JDZ-GTIHISTZ-s6n3r2ab.js} +857 -845
- package/dist/{ja-DPO5PPLO-s2a7j3nj.js → ja-DPO5PPLO-mysfmznx.js} +52 -52
- package/dist/{ja-P4OSE367-8ywxep9a.js → ja-P4OSE367-srr3qypg.js} +9 -9
- package/dist/{ja-SDAPAVCR-943p5gx7.js → ja-SDAPAVCR-kg39dfap.js} +46 -46
- package/dist/ja-ZHKCBE5W-x73w6x3e.js +35 -0
- package/dist/{js-yaml-cggj6w7q.js → js-yaml-87cdx6bm.js} +27 -19
- package/dist/known-types-a20evmmg.js +20 -0
- package/dist/ko-6W7OGLLB-mnmqc584.js +35 -0
- package/dist/{ko-ITOPNIYI-qz39kamf.js → ko-ITOPNIYI-hmxd2asd.js} +52 -52
- package/dist/{ko-TUAK3G3A-s25w0ckg.js → ko-JOBF5V7N-4bv0mjje.js} +857 -845
- package/dist/{ko-TUAK3G3A-TBEBKOTM-ns78t2rv.js → ko-JOBF5V7N-O7T4HKIE-ape840y0.js} +857 -845
- package/dist/{ko-NAGOZLC3-wb3y9yhh.js → ko-NAGOZLC3-gaxxsnd2.js} +46 -46
- package/dist/{ko-PYOS2KJP-5sbj5bp8.js → ko-PYOS2KJP-e7dshyxy.js} +9 -9
- package/dist/localization-h8a53z6p.js +47 -0
- package/dist/{node-gd4469ea.js → node-cnrcrrb0.js} +7973 -7166
- package/dist/node-service-8g5x5d2y.js +70 -0
- package/dist/{node-strategy-8gzp67xs.js → node-strategy-gc4sg6a2.js} +132 -16
- package/dist/node-sync-service-e2reh33c.js +42 -0
- package/dist/{packager-tool-9qecd4wb.js → packager-tool-0gctz400.js} +5 -2
- package/dist/{packager-tool-1cb0d5e0.js → packager-tool-0v3s8r01.js} +2 -2
- package/dist/{packager-tool-wckvcay0.js → packager-tool-1yh8g550.js} +9 -7
- package/dist/packager-tool-27avrkyk.js +15 -0
- package/dist/packager-tool-2wefykg9.js +106 -0
- package/dist/packager-tool-4fhgws0x.js +757 -0
- package/dist/{packager-tool-7yjpwj92.js → packager-tool-4hx14snw.js} +49 -48
- package/dist/{packager-tool-3wygxefb.js → packager-tool-58q3tvh7.js} +10 -10
- package/dist/{packager-tool-cvwr40ax.js → packager-tool-5qaxht3k.js} +1425 -550
- package/dist/packager-tool-5z1eg3ea.js +33289 -0
- package/dist/{packager-tool-17cn3xb7.js → packager-tool-6m078z5s.js} +13388 -19366
- package/dist/packager-tool-7b6tpg7y.js +77 -0
- package/dist/packager-tool-7exrv6w7.js +23 -0
- package/dist/packager-tool-8dszjcg5.js +4892 -0
- package/dist/packager-tool-8j92afwp.js +58 -0
- package/dist/packager-tool-94w17vf8.js +85 -0
- package/dist/{packager-tool-vdd02vns.js → packager-tool-9bec251q.js} +543 -1493
- package/dist/packager-tool-a1hbfmws.js +399 -0
- package/dist/{packager-tool-tq9q9m77.js → packager-tool-a42jnpy5.js} +3 -9
- package/dist/packager-tool-abbtfk2v.js +54 -0
- package/dist/packager-tool-cdwpc9fh.js +4945 -0
- package/dist/packager-tool-e0p2zsyc.js +97 -0
- package/dist/packager-tool-eebq62fq.js +540 -0
- package/dist/{packager-tool-m6x5sczh.js → packager-tool-em5r6g6j.js} +14 -21
- package/dist/packager-tool-eypvc2kv.js +23 -0
- package/dist/packager-tool-f0kd5kq4.js +2327 -0
- package/dist/packager-tool-fjaa8d3v.js +289 -0
- package/dist/packager-tool-g0eha8ge.js +121 -0
- package/dist/packager-tool-g9y14b10.js +54 -0
- package/dist/packager-tool-gbgfwx8f.js +2 -0
- package/dist/packager-tool-jc34wvrw.js +64 -0
- package/dist/packager-tool-k99nf3pq.js +25 -0
- package/dist/{packager-tool-hr0xg6q8.js → packager-tool-kn91khp6.js} +17 -13
- package/dist/{packager-tool-jysvpt8p.js → packager-tool-m3wkcxf5.js} +2 -2
- package/dist/{packager-tool-78a3szsp.js → packager-tool-m5qfverj.js} +1720 -2014
- package/dist/packager-tool-mwvbq6ef.js +79 -0
- package/dist/packager-tool-nq4rcqqg.js +87 -0
- package/dist/packager-tool-nxx8naxv.js +4234 -0
- package/dist/{packager-tool-3y0k15sv.js → packager-tool-p9stswjj.js} +2858 -19342
- package/dist/packager-tool-r0xpcqwg.js +188 -0
- package/dist/packager-tool-raq2wbwp.js +18 -0
- package/dist/{packager-tool-y3dezh8k.js → packager-tool-rs6jm14d.js} +6 -4
- package/dist/packager-tool-s9ff3kk4.js +6 -0
- package/dist/{packager-tool-pbsghbmj.js → packager-tool-sykgshez.js} +2 -2
- package/dist/packager-tool-tf3d2y8z.js +31 -0
- package/dist/packager-tool-tn5e7wnb.js +384 -0
- package/dist/packager-tool-v2rkcehq.js +457 -0
- package/dist/packager-tool-v86fdwvs.js +262 -0
- package/dist/packager-tool-v9psxdy5.js +8185 -0
- package/dist/packager-tool-v9rrz038.js +602 -0
- package/dist/packager-tool-vpqyvh4c.js +304 -0
- package/dist/packager-tool-wcha0e5r.js +443 -0
- package/dist/{packager-tool-1gt6js73.js → packager-tool-xhzfwa5p.js} +6 -4
- package/dist/{packager-tool-5arsyj36.js → packager-tool-yc4kw997.js} +4 -2
- package/dist/{packager-tool-pkq70dec.js → packager-tool-ywqc9rtf.js} +31 -3
- package/dist/{packager-tool-0567pxpm.js → packager-tool-z9bfhmm5.js} +10 -10
- package/dist/{packager-tool-gmrwvnyh.js → packager-tool-zfrp8ecz.js} +8 -58
- package/dist/{packager-tool-3vdpx9ng.js → packager-tool-zke08y39.js} +1121 -1846
- package/dist/packager-tool.js +17 -17
- package/dist/{pt-7TR74ZMB-1g8my56g.js → pt-7TR74ZMB-bmphh4x2.js} +46 -46
- package/dist/{pt-BR-7XGDXRDJ-TR5D7JYL-533wvy7p.js → pt-BR-7DYX2YPT-LZYH4YFD-bx43vx3z.js} +857 -845
- package/dist/{pt-BR-7XGDXRDJ-espnkgrj.js → pt-BR-7DYX2YPT-fqxqzqtf.js} +857 -845
- package/dist/{pt-BR-BXURWX4W-dqr4dnf9.js → pt-BR-BXURWX4W-bwfcwhk1.js} +52 -52
- package/dist/{pt-BR-DXXSYJDO-bn84ewp7.js → pt-BR-DXXSYJDO-a2tp13v7.js} +46 -46
- package/dist/pt-BR-UQCYHKMJ-q78n7q70.js +35 -0
- package/dist/{pt-BR-Z3TUDJHM-n7ngej6s.js → pt-BR-Z3TUDJHM-8v73x9s7.js} +9 -9
- package/dist/pt-D6A6MVB2-yvxca8vz.js +35 -0
- package/dist/{pt-TMVOOITK-myha14p9.js → pt-HTXGGX6Y-97t21dty.js} +857 -845
- package/dist/{pt-TMVOOITK-H2ADYHSD-ezpggv33.js → pt-HTXGGX6Y-ZHQSDFKI-vehfxadc.js} +857 -845
- package/dist/{pt-KSBWHAVQ-hd52bpsz.js → pt-KSBWHAVQ-mhvhgr2p.js} +9 -9
- package/dist/{pt-YI4VE4YQ-v7gjeg82.js → pt-YI4VE4YQ-wdkn2dcf.js} +52 -52
- package/dist/ro-4TMBHS5M-jz0anpt6.js +35 -0
- package/dist/{ro-BJFER5OI-334n28rj.js → ro-BJFER5OI-83tq8vxh.js} +46 -46
- package/dist/{ro-2VALF3S5-NXBJUEZN-nqw1zs33.js → ro-KTNQ3MNU-XIE6YPQN-gen8p82z.js} +857 -845
- package/dist/{ro-2VALF3S5-cdz5afkr.js → ro-KTNQ3MNU-y08n1x5g.js} +857 -845
- package/dist/{ro-RKXZUG7Z-cm3xn3fj.js → ro-RKXZUG7Z-nndrrsq7.js} +52 -52
- package/dist/{ro-VZUZTAMR-tccygznf.js → ro-VZUZTAMR-f4q0g3em.js} +9 -9
- package/dist/{ru-GSCT4ARZ-qj8dm4dp.js → ru-GSCT4ARZ-1sa9wbr8.js} +1 -1
- package/dist/{ru-GSCT4ARZ-FTVCGQTL-5nh4jf2e.js → ru-GSCT4ARZ-FTVCGQTL-gee86v14.js} +1 -1
- package/dist/{ru-T73OPRTC-mp5gn7gs.js → ru-T73OPRTC-4knxw497.js} +1 -1
- package/dist/{ru-WBLQ5B2U-awt245ky.js → ru-WBLQ5B2U-8r3c7v6d.js} +1 -1
- package/dist/ru-WBLQ5B2U-kdey8qa4.js +10 -0
- package/dist/{ru-WBLQ5B2U-57ezmxzz.js → ru-WBLQ5B2U-wemdzdqd.js} +1 -1
- package/dist/{serialization-GAW7UFOK-9hkdmmd2.js → serialization-J5QK3HPY-bgewpt6f.js} +158 -152
- package/dist/services/expression-validator.d.ts +28 -0
- package/dist/services/flow-eval-schema/types.d.ts +17 -0
- package/dist/services/flow-validate-service.d.ts +26 -0
- package/dist/services/node-validators/js-expression-syntax-validator.d.ts +6 -3
- package/dist/services/tidy-service.d.ts +26 -0
- package/dist/services/vars-reference-rule.d.ts +156 -0
- package/dist/shared-utils-8xdq6f04.js +20 -0
- package/dist/tidy-service-ashgyfwj.js +34 -0
- package/dist/tool.js +30 -33
- package/dist/{tr-AA6O2WSR-ga1xnymp.js → tr-AA6O2WSR-86ba4bdf.js} +52 -52
- package/dist/tr-GSQQ6SOT-hv1gyeaa.js +35 -0
- package/dist/{tr-RQTZ2DMS-bpgd4kma.js → tr-RQTZ2DMS-w3cwv8s4.js} +46 -46
- package/dist/{tr-W4AVRSQ4-bt3qqqdy.js → tr-W4AVRSQ4-hjr81xzk.js} +9 -9
- package/dist/{tr-RIFCEXFH-BZS7S7QK-q465b62g.js → tr-XHSSPNK7-GW5KVXR3-2w3f1ss6.js} +857 -845
- package/dist/{tr-RIFCEXFH-hgkb4g8y.js → tr-XHSSPNK7-cmqyc4wd.js} +857 -845
- package/dist/utils/handle-expansion.d.ts +16 -0
- package/dist/validation.js +47 -27
- package/dist/variable-service-er7ph4br.js +152 -0
- package/dist/wait-for-flow-job-45p1a444.js +134 -0
- package/dist/{zh-CN-IP3FMXWM-H3JI2XUM-ta4yac7h.js → zh-CN-2EHQT23P-T5XRQCVS-ac17dpc1.js} +857 -845
- package/dist/{zh-CN-IP3FMXWM-1cfarhcp.js → zh-CN-2EHQT23P-mr63c4xz.js} +857 -845
- package/dist/{zh-CN-6YRAN57T-j7jp34ws.js → zh-CN-6YRAN57T-rd7x2tqs.js} +9 -9
- package/dist/zh-CN-EDFRBU32-vvj7tmaq.js +35 -0
- package/dist/{zh-CN-R2KLHXQV-wttmznep.js → zh-CN-R2KLHXQV-agqr45ds.js} +52 -52
- package/dist/{zh-CN-ZC6LT4IN-vty9mvv8.js → zh-CN-ZC6LT4IN-kbzvvzz5.js} +46 -46
- package/dist/zh-TW-HAICM6DE-rh7k3cq7.js +35 -0
- package/dist/{zh-TW-AGIDXIPF-R4XZRDJZ-cgxxz5k4.js → zh-TW-MGZCE5BT-P6FLIUAR-zmq07vhs.js} +857 -845
- package/dist/{zh-TW-AGIDXIPF-n6r6w7vy.js → zh-TW-MGZCE5BT-c4ekmrz9.js} +857 -845
- package/dist/{zh-TW-R7Y5KVMU-q81f4z2p.js → zh-TW-R7Y5KVMU-m61y07e3.js} +46 -46
- package/dist/{zh-TW-RJGCQANM-gqn0aca0.js → zh-TW-RJGCQANM-w0x3qc1p.js} +52 -52
- package/dist/{zh-TW-SO2245GN-m5kh88bg.js → zh-TW-SO2245GN-n2bn1gg4.js} +9 -9
- package/package.json +2 -2
- package/dist/de-5KVP66U6-t37qr521.js +0 -161
- package/dist/de-WMKOGI7B-6dc1zdnp.js +0 -143
- package/dist/en-4KXU7N7B-24v330b5.js +0 -118
- package/dist/en-X4DLPKLJ-1h9gj5c1.js +0 -110
- package/dist/es-BVPGJUWA-0k59eqfv.js +0 -143
- package/dist/es-MX-U6YL5KQX-k4qvpgd4.js +0 -143
- package/dist/es-MX-XAVLOQW3-47a405kf.js +0 -161
- package/dist/es-VFPNVMP5-6sftsdxe.js +0 -161
- package/dist/fr-E5MDO4EG-f3x1jeqw.js +0 -161
- package/dist/fr-EKTTDR7Z-m2t68j0m.js +0 -143
- package/dist/ja-DPO5PPLO-fmbg7zt2.js +0 -161
- package/dist/ja-Y2YBTXNN-5sszk2zv.js +0 -143
- package/dist/ko-ITOPNIYI-aqy82jk8.js +0 -161
- package/dist/ko-S33XAV26-rfsv9myd.js +0 -143
- package/dist/packager-tool-0sz8se22.js +0 -10671
- package/dist/packager-tool-8mqydhz8.js +0 -9850
- package/dist/packager-tool-p9j43p8h.js +0 -115
- package/dist/packager-tool-v74yk918.js +0 -107
- package/dist/packager-tool-xj0agqpk.js +0 -11
- package/dist/pt-BR-BXURWX4W-xzyndmrx.js +0 -161
- package/dist/pt-BR-JO45SCNI-mt93s33c.js +0 -143
- package/dist/pt-W3NA4LIZ-fwd1q4j0.js +0 -143
- package/dist/pt-YI4VE4YQ-521681zf.js +0 -161
- package/dist/ro-RKXZUG7Z-pdztdafr.js +0 -161
- package/dist/ro-WLKX6HF5-b9tj8q67.js +0 -143
- package/dist/ru-WBLQ5B2U-8xd4gpv2.js +0 -10
- package/dist/ru-WBLQ5B2U-mswqs9wc.js +0 -10
- package/dist/tr-3U2W2XCA-43ptfc0m.js +0 -143
- package/dist/tr-AA6O2WSR-bj9n80k8.js +0 -161
- package/dist/zh-CN-IPZYQR3P-egjmvyjf.js +0 -143
- package/dist/zh-CN-R2KLHXQV-x6gnk2n0.js +0 -161
- package/dist/zh-TW-RJGCQANM-tt8j5wv2.js +0 -161
- package/dist/zh-TW-YPVSQVGT-b378ztph.js +0 -143
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-0v3s8r01.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS,
|
|
6
6
|
__require,
|
|
7
7
|
__toESM
|
|
8
|
-
} from "./packager-tool-
|
|
8
|
+
} from "./packager-tool-1yh8g550.js";
|
|
9
9
|
|
|
10
10
|
// ../../node_modules/commander/lib/error.js
|
|
11
|
-
var require_error = __commonJS((exports)
|
|
11
|
+
var require_error = __commonJS(function(exports) {
|
|
12
12
|
class CommanderError extends Error {
|
|
13
13
|
constructor(exitCode, code, message) {
|
|
14
14
|
super(message);
|
|
@@ -32,7 +32,7 @@ var require_error = __commonJS((exports) => {
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
// ../../node_modules/commander/lib/argument.js
|
|
35
|
-
var require_argument = __commonJS((exports)
|
|
35
|
+
var require_argument = __commonJS(function(exports) {
|
|
36
36
|
var { InvalidArgumentError } = require_error();
|
|
37
37
|
|
|
38
38
|
class Argument {
|
|
@@ -112,7 +112,7 @@ var require_argument = __commonJS((exports) => {
|
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
// ../../node_modules/commander/lib/help.js
|
|
115
|
-
var require_help = __commonJS((exports)
|
|
115
|
+
var require_help = __commonJS(function(exports) {
|
|
116
116
|
var { humanReadableArgName } = require_argument();
|
|
117
117
|
|
|
118
118
|
class Help {
|
|
@@ -469,7 +469,7 @@ ${itemIndentStr}`);
|
|
|
469
469
|
});
|
|
470
470
|
|
|
471
471
|
// ../../node_modules/commander/lib/option.js
|
|
472
|
-
var require_option = __commonJS((exports)
|
|
472
|
+
var require_option = __commonJS(function(exports) {
|
|
473
473
|
var { InvalidArgumentError } = require_error();
|
|
474
474
|
|
|
475
475
|
class Option {
|
|
@@ -653,7 +653,7 @@ var require_option = __commonJS((exports) => {
|
|
|
653
653
|
});
|
|
654
654
|
|
|
655
655
|
// ../../node_modules/commander/lib/suggestSimilar.js
|
|
656
|
-
var require_suggestSimilar = __commonJS((exports)
|
|
656
|
+
var require_suggestSimilar = __commonJS(function(exports) {
|
|
657
657
|
var maxDistance = 3;
|
|
658
658
|
function editDistance(a, b) {
|
|
659
659
|
if (Math.abs(a.length - b.length) > maxDistance)
|
|
@@ -726,7 +726,7 @@ var require_suggestSimilar = __commonJS((exports) => {
|
|
|
726
726
|
});
|
|
727
727
|
|
|
728
728
|
// ../../node_modules/commander/lib/command.js
|
|
729
|
-
var require_command = __commonJS((exports)
|
|
729
|
+
var require_command = __commonJS(function(exports) {
|
|
730
730
|
var EventEmitter = __require("node:events").EventEmitter;
|
|
731
731
|
var childProcess = __require("node:child_process");
|
|
732
732
|
var path = __require("node:path");
|
|
@@ -2081,7 +2081,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2081
2081
|
});
|
|
2082
2082
|
|
|
2083
2083
|
// ../../node_modules/commander/index.js
|
|
2084
|
-
var require_commander = __commonJS((exports)
|
|
2084
|
+
var require_commander = __commonJS(function(exports) {
|
|
2085
2085
|
var { Argument } = require_argument();
|
|
2086
2086
|
var { Command } = require_command();
|
|
2087
2087
|
var { CommanderError, InvalidArgumentError } = require_error();
|
|
@@ -2100,21 +2100,171 @@ var require_commander = __commonJS((exports) => {
|
|
|
2100
2100
|
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
2101
2101
|
});
|
|
2102
2102
|
|
|
2103
|
-
//
|
|
2104
|
-
var
|
|
2105
|
-
var
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2103
|
+
// ../common/src/telemetry/pseudonymize.ts
|
|
2104
|
+
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
2105
|
+
var PSEUDONYM_HEX_LENGTH = 32;
|
|
2106
|
+
var SHA256_K = new Uint32Array([
|
|
2107
|
+
1116352408,
|
|
2108
|
+
1899447441,
|
|
2109
|
+
3049323471,
|
|
2110
|
+
3921009573,
|
|
2111
|
+
961987163,
|
|
2112
|
+
1508970993,
|
|
2113
|
+
2453635748,
|
|
2114
|
+
2870763221,
|
|
2115
|
+
3624381080,
|
|
2116
|
+
310598401,
|
|
2117
|
+
607225278,
|
|
2118
|
+
1426881987,
|
|
2119
|
+
1925078388,
|
|
2120
|
+
2162078206,
|
|
2121
|
+
2614888103,
|
|
2122
|
+
3248222580,
|
|
2123
|
+
3835390401,
|
|
2124
|
+
4022224774,
|
|
2125
|
+
264347078,
|
|
2126
|
+
604807628,
|
|
2127
|
+
770255983,
|
|
2128
|
+
1249150122,
|
|
2129
|
+
1555081692,
|
|
2130
|
+
1996064986,
|
|
2131
|
+
2554220882,
|
|
2132
|
+
2821834349,
|
|
2133
|
+
2952996808,
|
|
2134
|
+
3210313671,
|
|
2135
|
+
3336571891,
|
|
2136
|
+
3584528711,
|
|
2137
|
+
113926993,
|
|
2138
|
+
338241895,
|
|
2139
|
+
666307205,
|
|
2140
|
+
773529912,
|
|
2141
|
+
1294757372,
|
|
2142
|
+
1396182291,
|
|
2143
|
+
1695183700,
|
|
2144
|
+
1986661051,
|
|
2145
|
+
2177026350,
|
|
2146
|
+
2456956037,
|
|
2147
|
+
2730485921,
|
|
2148
|
+
2820302411,
|
|
2149
|
+
3259730800,
|
|
2150
|
+
3345764771,
|
|
2151
|
+
3516065817,
|
|
2152
|
+
3600352804,
|
|
2153
|
+
4094571909,
|
|
2154
|
+
275423344,
|
|
2155
|
+
430227734,
|
|
2156
|
+
506948616,
|
|
2157
|
+
659060556,
|
|
2158
|
+
883997877,
|
|
2159
|
+
958139571,
|
|
2160
|
+
1322822218,
|
|
2161
|
+
1537002063,
|
|
2162
|
+
1747873779,
|
|
2163
|
+
1955562222,
|
|
2164
|
+
2024104815,
|
|
2165
|
+
2227730452,
|
|
2166
|
+
2361852424,
|
|
2167
|
+
2428436474,
|
|
2168
|
+
2756734187,
|
|
2169
|
+
3204031479,
|
|
2170
|
+
3329325298
|
|
2171
|
+
]);
|
|
2172
|
+
var SHA256_INITIAL_STATE = new Uint32Array([
|
|
2173
|
+
1779033703,
|
|
2174
|
+
3144134277,
|
|
2175
|
+
1013904242,
|
|
2176
|
+
2773480762,
|
|
2177
|
+
1359893119,
|
|
2178
|
+
2600822924,
|
|
2179
|
+
528734635,
|
|
2180
|
+
1541459225
|
|
2181
|
+
]);
|
|
2182
|
+
function rotr(value, bits) {
|
|
2183
|
+
return (value >>> bits | value << 32 - bits) >>> 0;
|
|
2184
|
+
}
|
|
2185
|
+
function sha256Hex(input) {
|
|
2186
|
+
const bytes = new TextEncoder().encode(input);
|
|
2187
|
+
const paddedLength = bytes.length + 9 + 63 >> 6 << 6;
|
|
2188
|
+
const buffer = new Uint8Array(paddedLength);
|
|
2189
|
+
buffer.set(bytes);
|
|
2190
|
+
buffer[bytes.length] = 128;
|
|
2191
|
+
const view = new DataView(buffer.buffer);
|
|
2192
|
+
const bitLength = bytes.length * 8;
|
|
2193
|
+
view.setUint32(paddedLength - 8, Math.floor(bitLength / 4294967296));
|
|
2194
|
+
view.setUint32(paddedLength - 4, bitLength >>> 0);
|
|
2195
|
+
const state = SHA256_INITIAL_STATE.slice();
|
|
2196
|
+
const schedule = new Uint32Array(64);
|
|
2197
|
+
for (let offset = 0;offset < paddedLength; offset += 64) {
|
|
2198
|
+
for (let i = 0;i < 16; i++) {
|
|
2199
|
+
schedule[i] = view.getUint32(offset + i * 4);
|
|
2200
|
+
}
|
|
2201
|
+
for (let i = 16;i < 64; i++) {
|
|
2202
|
+
const x = schedule[i - 15];
|
|
2203
|
+
const y = schedule[i - 2];
|
|
2204
|
+
const s0 = (rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3) >>> 0;
|
|
2205
|
+
const s1 = (rotr(y, 17) ^ rotr(y, 19) ^ y >>> 10) >>> 0;
|
|
2206
|
+
schedule[i] = schedule[i - 16] + s0 + schedule[i - 7] + s1 >>> 0;
|
|
2207
|
+
}
|
|
2208
|
+
let a = state[0];
|
|
2209
|
+
let b = state[1];
|
|
2210
|
+
let c = state[2];
|
|
2211
|
+
let d = state[3];
|
|
2212
|
+
let e = state[4];
|
|
2213
|
+
let f = state[5];
|
|
2214
|
+
let g = state[6];
|
|
2215
|
+
let h = state[7];
|
|
2216
|
+
for (let i = 0;i < 64; i++) {
|
|
2217
|
+
const s1 = (rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25)) >>> 0;
|
|
2218
|
+
const ch = (e & f ^ ~e & g) >>> 0;
|
|
2219
|
+
const temp1 = h + s1 + ch + SHA256_K[i] + schedule[i] >>> 0;
|
|
2220
|
+
const s0 = (rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22)) >>> 0;
|
|
2221
|
+
const maj = (a & b ^ a & c ^ b & c) >>> 0;
|
|
2222
|
+
const temp2 = s0 + maj >>> 0;
|
|
2223
|
+
h = g;
|
|
2224
|
+
g = f;
|
|
2225
|
+
f = e;
|
|
2226
|
+
e = d + temp1 >>> 0;
|
|
2227
|
+
d = c;
|
|
2228
|
+
c = b;
|
|
2229
|
+
b = a;
|
|
2230
|
+
a = temp1 + temp2 >>> 0;
|
|
2231
|
+
}
|
|
2232
|
+
state[0] = state[0] + a >>> 0;
|
|
2233
|
+
state[1] = state[1] + b >>> 0;
|
|
2234
|
+
state[2] = state[2] + c >>> 0;
|
|
2235
|
+
state[3] = state[3] + d >>> 0;
|
|
2236
|
+
state[4] = state[4] + e >>> 0;
|
|
2237
|
+
state[5] = state[5] + f >>> 0;
|
|
2238
|
+
state[6] = state[6] + g >>> 0;
|
|
2239
|
+
state[7] = state[7] + h >>> 0;
|
|
2240
|
+
}
|
|
2241
|
+
let hex = "";
|
|
2242
|
+
for (const word of state) {
|
|
2243
|
+
hex += word.toString(16).padStart(8, "0");
|
|
2244
|
+
}
|
|
2245
|
+
return hex;
|
|
2246
|
+
}
|
|
2247
|
+
function resolveSha256Hex() {
|
|
2248
|
+
try {
|
|
2249
|
+
const nodeCrypto = __require("node:crypto");
|
|
2250
|
+
const createHash = nodeCrypto?.createHash;
|
|
2251
|
+
if (typeof createHash !== "function") {
|
|
2252
|
+
return sha256Hex;
|
|
2253
|
+
}
|
|
2254
|
+
const native = (input) => createHash("sha256").update(input, "utf8").digest("hex");
|
|
2255
|
+
return native("abc") === sha256Hex("abc") ? native : sha256Hex;
|
|
2256
|
+
} catch {
|
|
2257
|
+
return sha256Hex;
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
var cachedSha256Hex;
|
|
2261
|
+
function digest(input) {
|
|
2262
|
+
cachedSha256Hex ??= resolveSha256Hex();
|
|
2263
|
+
return cachedSha256Hex(input);
|
|
2264
|
+
}
|
|
2265
|
+
function pseudonymize(input) {
|
|
2266
|
+
return digest(`${PSEUDONYM_DOMAIN}${input}`).slice(0, PSEUDONYM_HEX_LENGTH);
|
|
2267
|
+
}
|
|
2118
2268
|
|
|
2119
2269
|
// ../common/src/singleton.ts
|
|
2120
2270
|
var PREFIX = "@uipath/common/";
|
|
@@ -2146,19 +2296,323 @@ function singleton(ctorOrName) {
|
|
|
2146
2296
|
};
|
|
2147
2297
|
}
|
|
2148
2298
|
|
|
2149
|
-
// ../common/src/
|
|
2150
|
-
var
|
|
2151
|
-
function
|
|
2152
|
-
|
|
2299
|
+
// ../common/src/telemetry/supplied-values.ts
|
|
2300
|
+
var suppliedValuesSlot = singleton("TelemetrySuppliedArgumentValues");
|
|
2301
|
+
function activeEntries() {
|
|
2302
|
+
const existing = suppliedValuesSlot.get();
|
|
2303
|
+
return Array.isArray(existing) ? existing : [];
|
|
2304
|
+
}
|
|
2305
|
+
var MIN_SCRUBBABLE_LENGTH = 4;
|
|
2306
|
+
function recordSuppliedArgumentValues(values) {
|
|
2307
|
+
const flat = [];
|
|
2308
|
+
const push = (value) => {
|
|
2309
|
+
if (Array.isArray(value)) {
|
|
2310
|
+
for (const item of value) {
|
|
2311
|
+
push(item);
|
|
2312
|
+
}
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2315
|
+
if (typeof value === "string" && value.length >= MIN_SCRUBBABLE_LENGTH) {
|
|
2316
|
+
flat.push(value);
|
|
2317
|
+
}
|
|
2318
|
+
};
|
|
2319
|
+
push(values);
|
|
2320
|
+
const entry = { values: flat };
|
|
2321
|
+
suppliedValuesSlot.set([...activeEntries(), entry]);
|
|
2322
|
+
return entry;
|
|
2153
2323
|
}
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2324
|
+
function releaseSuppliedArgumentValues(entry) {
|
|
2325
|
+
suppliedValuesSlot.set(activeEntries().filter((held) => held !== entry));
|
|
2326
|
+
}
|
|
2327
|
+
function getSuppliedArgumentValues() {
|
|
2328
|
+
const all = new Set;
|
|
2329
|
+
for (const entry of activeEntries()) {
|
|
2330
|
+
for (const value of entry.values) {
|
|
2331
|
+
all.add(value);
|
|
2332
|
+
}
|
|
2157
2333
|
}
|
|
2158
|
-
return
|
|
2159
|
-
}
|
|
2334
|
+
return [...all].sort((a, b) => b.length - a.length);
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
2338
|
+
var REDACTED = "[REDACTED]";
|
|
2339
|
+
var MAX_VALUE_LENGTH = 280;
|
|
2340
|
+
var MAX_STACK_LENGTH = 4096;
|
|
2341
|
+
var MAX_SCAN_LENGTH = MAX_STACK_LENGTH;
|
|
2342
|
+
function truncate(value, maxLength) {
|
|
2343
|
+
return value.length > maxLength ? `${value.slice(0, maxLength)}…` : value;
|
|
2344
|
+
}
|
|
2345
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
2346
|
+
"token",
|
|
2347
|
+
"tokens",
|
|
2348
|
+
"secret",
|
|
2349
|
+
"secrets",
|
|
2350
|
+
"password",
|
|
2351
|
+
"passwords",
|
|
2352
|
+
"pwd",
|
|
2353
|
+
"credential",
|
|
2354
|
+
"credentials",
|
|
2355
|
+
"auth",
|
|
2356
|
+
"authentication",
|
|
2357
|
+
"authorization",
|
|
2358
|
+
"authority",
|
|
2359
|
+
"cert",
|
|
2360
|
+
"certificate",
|
|
2361
|
+
"certificates"
|
|
2362
|
+
]);
|
|
2363
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
2364
|
+
"api",
|
|
2365
|
+
"access",
|
|
2366
|
+
"client",
|
|
2367
|
+
"private",
|
|
2368
|
+
"public",
|
|
2369
|
+
"signing",
|
|
2370
|
+
"encryption",
|
|
2371
|
+
"session",
|
|
2372
|
+
"master",
|
|
2373
|
+
"shared",
|
|
2374
|
+
"root",
|
|
2375
|
+
"ssh",
|
|
2376
|
+
"rsa",
|
|
2377
|
+
"aes",
|
|
2378
|
+
"hmac",
|
|
2379
|
+
"oauth"
|
|
2380
|
+
]);
|
|
2381
|
+
var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
2382
|
+
var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
2383
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
2384
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
2385
|
+
var PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
2386
|
+
var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
|
|
2387
|
+
var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
|
|
2388
|
+
var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
|
|
2389
|
+
var HOST_PORT_PATTERN = /(?<![/@.\w-])(?!\d+\.\d+\.\d+\.\d+:)[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)+:\d{1,5}\b/g;
|
|
2390
|
+
var SOURCE_FILE_EXTENSIONS = new Set([
|
|
2391
|
+
"ts",
|
|
2392
|
+
"tsx",
|
|
2393
|
+
"js",
|
|
2394
|
+
"jsx",
|
|
2395
|
+
"mjs",
|
|
2396
|
+
"cjs",
|
|
2397
|
+
"cts",
|
|
2398
|
+
"mts",
|
|
2399
|
+
"py",
|
|
2400
|
+
"cs",
|
|
2401
|
+
"java",
|
|
2402
|
+
"go",
|
|
2403
|
+
"rs",
|
|
2404
|
+
"rb",
|
|
2405
|
+
"php",
|
|
2406
|
+
"sh",
|
|
2407
|
+
"ps1",
|
|
2408
|
+
"json",
|
|
2409
|
+
"jsonc",
|
|
2410
|
+
"yaml",
|
|
2411
|
+
"yml",
|
|
2412
|
+
"xml",
|
|
2413
|
+
"xaml",
|
|
2414
|
+
"md",
|
|
2415
|
+
"txt",
|
|
2416
|
+
"log",
|
|
2417
|
+
"css",
|
|
2418
|
+
"html",
|
|
2419
|
+
"htm",
|
|
2420
|
+
"csproj",
|
|
2421
|
+
"nuspec",
|
|
2422
|
+
"sql"
|
|
2423
|
+
]);
|
|
2424
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
2425
|
+
var QUOTED_LITERAL_MAX_SPAN = 200;
|
|
2426
|
+
var QUOTED_LITERAL_PATTERN = new RegExp([
|
|
2427
|
+
`(?<![A-Za-z0-9])'(?:[^\\
|
|
2428
|
+
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?'(?![A-Za-z0-9])`,
|
|
2429
|
+
`(?<![A-Za-z0-9])"(?:[^\\
|
|
2430
|
+
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
|
|
2431
|
+
].join("|"), "g");
|
|
2432
|
+
var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
|
|
2433
|
+
var COLLAPSED_BODY = "{…}";
|
|
2434
|
+
var COLLAPSED_BODY_MARKER = "\x01body\x01";
|
|
2435
|
+
var MAX_BODY_NESTING = 8;
|
|
2436
|
+
function collapseJsonBodies(text) {
|
|
2437
|
+
let out = text;
|
|
2438
|
+
for (let pass = 0;pass < MAX_BODY_NESTING; pass++) {
|
|
2439
|
+
const next = out.replace(JSON_BODY_PATTERN, COLLAPSED_BODY_MARKER);
|
|
2440
|
+
if (next === out) {
|
|
2441
|
+
break;
|
|
2442
|
+
}
|
|
2443
|
+
out = next;
|
|
2444
|
+
}
|
|
2445
|
+
return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
|
|
2446
|
+
}
|
|
2447
|
+
var TRAILING_PROSE_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
2448
|
+
function peelTrailingPunctuation(match) {
|
|
2449
|
+
const trailing = match.match(TRAILING_PROSE_PUNCT)?.[0] ?? "";
|
|
2450
|
+
return trailing ? [match.slice(0, -trailing.length), trailing] : [match, ""];
|
|
2451
|
+
}
|
|
2452
|
+
function redactUrl(raw) {
|
|
2453
|
+
try {
|
|
2454
|
+
const url = new URL(raw);
|
|
2455
|
+
return `${url.protocol}//${url.host}`;
|
|
2456
|
+
} catch {
|
|
2457
|
+
return `url#${pseudonymize(raw)}`;
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
function redactValueDetectors(value, maxLength = MAX_VALUE_LENGTH) {
|
|
2461
|
+
let out = truncate(value, MAX_SCAN_LENGTH);
|
|
2462
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
2463
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
2464
|
+
const [core, trailing] = peelTrailingPunctuation(match);
|
|
2465
|
+
return `${redactUrl(core)}${trailing}`;
|
|
2466
|
+
});
|
|
2467
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
2468
|
+
out = out.replace(UNC_PATH_PATTERN, (_match, before, path) => {
|
|
2469
|
+
const [core, trailing] = peelTrailingPunctuation(path);
|
|
2470
|
+
return `${before}unc#${pseudonymize(core)}${trailing}`;
|
|
2471
|
+
});
|
|
2472
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${pseudonymize(match)}`);
|
|
2473
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${pseudonymize(match)}`);
|
|
2474
|
+
out = out.replace(HOST_PORT_PATTERN, (match) => {
|
|
2475
|
+
const split = match.lastIndexOf(":");
|
|
2476
|
+
const host = match.slice(0, split);
|
|
2477
|
+
const extension = host.slice(host.lastIndexOf(".") + 1).toLowerCase();
|
|
2478
|
+
if (SOURCE_FILE_EXTENSIONS.has(extension)) {
|
|
2479
|
+
return match;
|
|
2480
|
+
}
|
|
2481
|
+
return `host#${pseudonymize(host)}:${match.slice(split + 1)}`;
|
|
2482
|
+
});
|
|
2483
|
+
out = out.replace(PADDED_BASE64_PATTERN, () => REDACTED);
|
|
2484
|
+
out = out.replace(BASE64_WITH_PLUS_PATTERN, (match) => match.includes("+") ? REDACTED : match);
|
|
2485
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
2486
|
+
return truncate(out, maxLength);
|
|
2487
|
+
}
|
|
2488
|
+
function redactSpanName(name) {
|
|
2489
|
+
return redactValueDetectors(truncate(name, MAX_SCAN_LENGTH).replace(QUOTED_LITERAL_PATTERN, (match) => `${match[0]}<redacted>${match[0]}`));
|
|
2490
|
+
}
|
|
2491
|
+
var HTTP_DEPENDENCY_NAME = /^([A-Z]+) (\/.*)$/s;
|
|
2492
|
+
function redactHttpDependencyName(name) {
|
|
2493
|
+
const parts = HTTP_DEPENDENCY_NAME.exec(name);
|
|
2494
|
+
if (!parts) {
|
|
2495
|
+
return redactMessage(name);
|
|
2496
|
+
}
|
|
2497
|
+
return `${parts[1]} ${redactMessage(parts[2])}`;
|
|
2498
|
+
}
|
|
2499
|
+
function redactMessage(value) {
|
|
2500
|
+
let out = collapseJsonBodies(truncate(value, MAX_SCAN_LENGTH)).replace(QUOTED_LITERAL_PATTERN, (match) => `${match[0]}<redacted>${match[0]}`);
|
|
2501
|
+
for (const supplied of getSuppliedArgumentValues()) {
|
|
2502
|
+
out = out.split(supplied).join(REDACTED);
|
|
2503
|
+
}
|
|
2504
|
+
return redactValueDetectors(out);
|
|
2505
|
+
}
|
|
2506
|
+
var MESSAGE_NAMES = new Set([
|
|
2507
|
+
"message",
|
|
2508
|
+
"errormessage",
|
|
2509
|
+
"errmessage",
|
|
2510
|
+
"error_message",
|
|
2511
|
+
"msg",
|
|
2512
|
+
"detail",
|
|
2513
|
+
"details",
|
|
2514
|
+
"reason",
|
|
2515
|
+
"instructions",
|
|
2516
|
+
"warning"
|
|
2517
|
+
]);
|
|
2518
|
+
function isFreeFormValue(name, value) {
|
|
2519
|
+
return MESSAGE_NAMES.has(name.toLowerCase()) || /['"{[]/.test(value);
|
|
2520
|
+
}
|
|
2521
|
+
function redactError(error) {
|
|
2522
|
+
const safe = new Error(redactMessage(error.message ?? ""));
|
|
2523
|
+
safe.name = error.name;
|
|
2524
|
+
safe.stack = typeof error.stack === "string" ? redactStack(error.stack) : undefined;
|
|
2525
|
+
return safe;
|
|
2526
|
+
}
|
|
2527
|
+
function redactStack(stack) {
|
|
2528
|
+
const bounded = truncate(stack, MAX_STACK_LENGTH);
|
|
2529
|
+
const firstBreak = bounded.indexOf(`
|
|
2530
|
+
`);
|
|
2531
|
+
if (firstBreak === -1) {
|
|
2532
|
+
return redactMessage(bounded);
|
|
2533
|
+
}
|
|
2534
|
+
return `${redactMessage(bounded.slice(0, firstBreak))}
|
|
2535
|
+
${redactValueDetectors(bounded.slice(firstBreak + 1), MAX_STACK_LENGTH)}`;
|
|
2536
|
+
}
|
|
2537
|
+
function nameTokens(name) {
|
|
2538
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t) => t.toLowerCase()).filter(Boolean);
|
|
2539
|
+
}
|
|
2540
|
+
function isSensitiveName(name) {
|
|
2541
|
+
const tokens = nameTokens(name);
|
|
2542
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
2543
|
+
const token = tokens[i];
|
|
2544
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
2545
|
+
return true;
|
|
2546
|
+
}
|
|
2547
|
+
if (token === "key" || token === "keys") {
|
|
2548
|
+
const prev = tokens[i - 1];
|
|
2549
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
2550
|
+
return true;
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2554
|
+
return false;
|
|
2555
|
+
}
|
|
2556
|
+
function redactProperty(name, value) {
|
|
2557
|
+
if (value === undefined || value === null) {
|
|
2558
|
+
return;
|
|
2559
|
+
}
|
|
2560
|
+
if (isSensitiveName(name)) {
|
|
2561
|
+
return REDACTED;
|
|
2562
|
+
}
|
|
2563
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
2564
|
+
return value;
|
|
2565
|
+
}
|
|
2566
|
+
if (typeof value !== "string") {
|
|
2567
|
+
return "[OBJECT]";
|
|
2568
|
+
}
|
|
2569
|
+
return isFreeFormValue(name, value) ? redactMessage(value) : redactValueDetectors(value);
|
|
2570
|
+
}
|
|
2571
|
+
function redactProperties(properties) {
|
|
2572
|
+
const out = {};
|
|
2573
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
2574
|
+
const redacted = redactProperty(name, value);
|
|
2575
|
+
if (redacted !== undefined) {
|
|
2576
|
+
out[name] = redacted;
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
return out;
|
|
2580
|
+
}
|
|
2160
2581
|
|
|
2161
2582
|
// ../common/src/catch-error.ts
|
|
2583
|
+
var MAX_SERIALIZED_LENGTH = 500;
|
|
2584
|
+
var TRUNCATION_SUFFIX = "…(truncated)";
|
|
2585
|
+
var REDACTED2 = "[REDACTED]";
|
|
2586
|
+
function cap(text) {
|
|
2587
|
+
return text.length > MAX_SERIALIZED_LENGTH ? `${text.slice(0, MAX_SERIALIZED_LENGTH)}${TRUNCATION_SUFFIX}` : text;
|
|
2588
|
+
}
|
|
2589
|
+
function omitSensitive(key, value) {
|
|
2590
|
+
return key.length > 0 && isSensitiveName(key) ? REDACTED2 : value;
|
|
2591
|
+
}
|
|
2592
|
+
function describeThrownValue(value) {
|
|
2593
|
+
if (typeof value !== "object" || value === null) {
|
|
2594
|
+
return String(value);
|
|
2595
|
+
}
|
|
2596
|
+
let message;
|
|
2597
|
+
try {
|
|
2598
|
+
message = value.message;
|
|
2599
|
+
} catch {
|
|
2600
|
+
message = undefined;
|
|
2601
|
+
}
|
|
2602
|
+
if (typeof message === "string" && message.length > 0) {
|
|
2603
|
+
return cap(message);
|
|
2604
|
+
}
|
|
2605
|
+
try {
|
|
2606
|
+
const json = JSON.stringify(value, omitSensitive);
|
|
2607
|
+
if (json !== undefined) {
|
|
2608
|
+
return cap(json);
|
|
2609
|
+
}
|
|
2610
|
+
} catch {}
|
|
2611
|
+
return String(value);
|
|
2612
|
+
}
|
|
2613
|
+
function toError(error) {
|
|
2614
|
+
return error instanceof Error ? error : new Error(describeThrownValue(error), { cause: error });
|
|
2615
|
+
}
|
|
2162
2616
|
function isPromiseLike(value) {
|
|
2163
2617
|
return value !== null && typeof value === "object" && typeof value.then === "function";
|
|
2164
2618
|
}
|
|
@@ -2173,17 +2627,11 @@ function catchError(fnOrPromise) {
|
|
|
2173
2627
|
}
|
|
2174
2628
|
return [undefined, result];
|
|
2175
2629
|
} catch (error) {
|
|
2176
|
-
return [
|
|
2177
|
-
error instanceof Error ? error : new Error(String(error)),
|
|
2178
|
-
undefined
|
|
2179
|
-
];
|
|
2630
|
+
return [toError(error), undefined];
|
|
2180
2631
|
}
|
|
2181
2632
|
}
|
|
2182
2633
|
function settlePromiseLike(thenable) {
|
|
2183
|
-
return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [
|
|
2184
|
-
error instanceof Error ? error : new Error(String(error)),
|
|
2185
|
-
undefined
|
|
2186
|
-
]);
|
|
2634
|
+
return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [toError(error), undefined]);
|
|
2187
2635
|
}
|
|
2188
2636
|
|
|
2189
2637
|
// ../common/src/error-handler.ts
|
|
@@ -2488,7 +2936,7 @@ async function extractErrorDetails(error, options) {
|
|
|
2488
2936
|
} else if (typeof err.message === "string") {
|
|
2489
2937
|
details = err.message;
|
|
2490
2938
|
} else {
|
|
2491
|
-
details =
|
|
2939
|
+
details = describeThrownValue(error);
|
|
2492
2940
|
}
|
|
2493
2941
|
const context = {};
|
|
2494
2942
|
if (status) {
|
|
@@ -2576,55 +3024,9 @@ function extractErrorMessageSync(error) {
|
|
|
2576
3024
|
return error.message;
|
|
2577
3025
|
}
|
|
2578
3026
|
}
|
|
2579
|
-
return
|
|
3027
|
+
return describeThrownValue(error);
|
|
2580
3028
|
}
|
|
2581
3029
|
|
|
2582
|
-
// ../common/src/attachment-binding.ts
|
|
2583
|
-
function appendOption(value, previous) {
|
|
2584
|
-
return [...previous ?? [], value];
|
|
2585
|
-
}
|
|
2586
|
-
var ATTACHMENT_INSTRUCTIONS = "Provide --attachment as 'name=path' where 'name' matches a file-typed workflow input variable and 'path' points at a readable local file. Repeat the flag to attach multiple files.";
|
|
2587
|
-
var ATTACHMENT_UPLOAD_INSTRUCTIONS = "Check that the active tenant has Orchestrator access and the file is readable, then retry.";
|
|
2588
|
-
function parseAttachmentSpec(spec) {
|
|
2589
|
-
const eq = spec.indexOf("=");
|
|
2590
|
-
if (eq <= 0) {
|
|
2591
|
-
throw new Error(`Invalid --attachment format: '${spec}'. Expected 'name=path' where name matches a file-typed workflow input variable.`);
|
|
2592
|
-
}
|
|
2593
|
-
const name = spec.substring(0, eq);
|
|
2594
|
-
const path = spec.substring(eq + 1);
|
|
2595
|
-
if (!name || !path) {
|
|
2596
|
-
throw new Error(`Invalid --attachment format: '${spec}'. Expected 'name=path' with non-empty name and path.`);
|
|
2597
|
-
}
|
|
2598
|
-
return { name, path };
|
|
2599
|
-
}
|
|
2600
|
-
async function resolveAttachmentInputs(specs, upload) {
|
|
2601
|
-
const fs = getFileSystem();
|
|
2602
|
-
const prepared = await Promise.all(specs.map(async (spec) => {
|
|
2603
|
-
const bytes = await fs.readFile(spec.path).catch(async (err) => {
|
|
2604
|
-
throw new Error(`Cannot read --attachment '${spec.path}' for variable '${spec.name}': ${await extractErrorMessage(err)}`);
|
|
2605
|
-
});
|
|
2606
|
-
if (bytes === null) {
|
|
2607
|
-
throw new Error(`--attachment '${spec.path}' for variable '${spec.name}' is empty or could not be read.`);
|
|
2608
|
-
}
|
|
2609
|
-
return {
|
|
2610
|
-
...spec,
|
|
2611
|
-
bytes,
|
|
2612
|
-
fileName: fs.path.basename(spec.path)
|
|
2613
|
-
};
|
|
2614
|
-
}));
|
|
2615
|
-
return Promise.all(prepared.map(async (p) => {
|
|
2616
|
-
const reference = await upload(p.bytes, p.fileName).catch(async (err) => {
|
|
2617
|
-
throw new Error(`Failed to upload --attachment '${p.path}' for variable '${p.name}': ${await extractErrorMessage(err)}`);
|
|
2618
|
-
});
|
|
2619
|
-
return { name: p.name, path: p.path, reference };
|
|
2620
|
-
}));
|
|
2621
|
-
}
|
|
2622
|
-
// ../common/src/command-examples.ts
|
|
2623
|
-
var examplesByCommand = new WeakMap;
|
|
2624
|
-
Command.prototype.examples = function(examples) {
|
|
2625
|
-
examplesByCommand.set(this, examples);
|
|
2626
|
-
return this;
|
|
2627
|
-
};
|
|
2628
3030
|
// ../common/src/output-context.ts
|
|
2629
3031
|
function createStorage() {
|
|
2630
3032
|
const [error, mod] = catchError(() => __require("node:async_hooks"));
|
|
@@ -2736,45 +3138,40 @@ class SimpleLogger {
|
|
|
2736
3138
|
this.pendingInit
|
|
2737
3139
|
]).then(() => getFileSystem().appendFile(path, `${timestamp} ${formatted}`).catch(() => {}));
|
|
2738
3140
|
}
|
|
2739
|
-
|
|
2740
|
-
if (this.level > 0 /* DEBUG */)
|
|
2741
|
-
return;
|
|
2742
|
-
const formatted = this.format(`[DEBUG] ${message}`, args);
|
|
3141
|
+
write(formatted) {
|
|
2743
3142
|
if (this.isFileLoggingActive()) {
|
|
2744
3143
|
this.writeToFile(formatted);
|
|
2745
3144
|
} else {
|
|
2746
3145
|
getOutputSink().writeErr(formatted);
|
|
2747
3146
|
}
|
|
2748
3147
|
}
|
|
3148
|
+
debug(message, ...args) {
|
|
3149
|
+
if (this.level > 0 /* DEBUG */)
|
|
3150
|
+
return;
|
|
3151
|
+
const formatted = this.format(`[DEBUG] ${message}`, args);
|
|
3152
|
+
this.write(formatted);
|
|
3153
|
+
}
|
|
2749
3154
|
info(message, ...args) {
|
|
2750
3155
|
if (this.level > 1 /* INFO */)
|
|
2751
3156
|
return;
|
|
2752
3157
|
const formatted = this.format(message, args);
|
|
2753
|
-
|
|
2754
|
-
this.writeToFile(formatted);
|
|
2755
|
-
} else {
|
|
2756
|
-
getOutputSink().writeErr(formatted);
|
|
2757
|
-
}
|
|
3158
|
+
this.write(formatted);
|
|
2758
3159
|
}
|
|
2759
3160
|
warn(message, ...args) {
|
|
2760
3161
|
if (this.level > 2 /* WARN */)
|
|
2761
3162
|
return;
|
|
2762
3163
|
const formatted = this.format(`[WARN] ${message}`, args);
|
|
2763
|
-
|
|
2764
|
-
this.writeToFile(formatted);
|
|
2765
|
-
} else {
|
|
2766
|
-
getOutputSink().writeErr(formatted);
|
|
2767
|
-
}
|
|
3164
|
+
this.write(formatted);
|
|
2768
3165
|
}
|
|
2769
3166
|
error(message, ...args) {
|
|
2770
3167
|
if (this.level > 3 /* ERROR */)
|
|
2771
3168
|
return;
|
|
2772
3169
|
const formatted = this.format(`[ERROR] ${message}`, args);
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
3170
|
+
this.write(formatted);
|
|
3171
|
+
}
|
|
3172
|
+
report(message) {
|
|
3173
|
+
const formatted = this.format(message, []);
|
|
3174
|
+
this.write(formatted);
|
|
2778
3175
|
}
|
|
2779
3176
|
getLevel() {
|
|
2780
3177
|
return this.level;
|
|
@@ -2847,18 +3244,23 @@ function getLogFilePath() {
|
|
|
2847
3244
|
return logger.getLogFilePath();
|
|
2848
3245
|
}
|
|
2849
3246
|
|
|
3247
|
+
// ../common/src/exit-code.ts
|
|
3248
|
+
function setExitCode(code) {
|
|
3249
|
+
process.exitCode = code;
|
|
3250
|
+
}
|
|
3251
|
+
|
|
2850
3252
|
// ../common/src/output-codecs.ts
|
|
2851
3253
|
var yamlSlot = singleton("YamlCodec");
|
|
2852
3254
|
var jmespathSlot = singleton("JmespathCodec");
|
|
2853
3255
|
async function loadOutputCodecsAsync(needed) {
|
|
2854
3256
|
const loads = [];
|
|
2855
3257
|
if (needed.yaml && yamlSlot.get() === undefined) {
|
|
2856
|
-
loads.push(import("./js-yaml-
|
|
3258
|
+
loads.push(import("./js-yaml-87cdx6bm.js").then((mod) => {
|
|
2857
3259
|
yamlSlot.set(mod);
|
|
2858
3260
|
}));
|
|
2859
3261
|
}
|
|
2860
3262
|
if (needed.filter && jmespathSlot.get() === undefined) {
|
|
2861
|
-
loads.push(import("./index-
|
|
3263
|
+
loads.push(import("./index-p3vk57z7.js").then((mod) => {
|
|
2862
3264
|
jmespathSlot.set(mod);
|
|
2863
3265
|
}));
|
|
2864
3266
|
}
|
|
@@ -3139,27 +3541,41 @@ class LoggerTelemetryProvider {
|
|
|
3139
3541
|
...this.analyticsUniqueId ? { analyticsUniqueId: this.analyticsUniqueId } : {}
|
|
3140
3542
|
};
|
|
3141
3543
|
}
|
|
3142
|
-
async trackEvent(
|
|
3143
|
-
logger.debug(formatMessage("Event",
|
|
3544
|
+
async trackEvent({ name, properties }) {
|
|
3545
|
+
logger.debug(formatMessage("Event", name, this.enrich(properties)));
|
|
3144
3546
|
}
|
|
3145
|
-
async trackException(
|
|
3547
|
+
async trackException({
|
|
3548
|
+
error,
|
|
3549
|
+
properties
|
|
3550
|
+
}) {
|
|
3146
3551
|
logger.error(formatMessage("Exception", error.message, this.enrich({
|
|
3147
3552
|
...properties,
|
|
3148
3553
|
stack: error.stack
|
|
3149
3554
|
})));
|
|
3150
3555
|
}
|
|
3151
|
-
async trackRequest(
|
|
3556
|
+
async trackRequest({
|
|
3557
|
+
name,
|
|
3558
|
+
durationMs,
|
|
3559
|
+
success,
|
|
3560
|
+
properties
|
|
3561
|
+
}) {
|
|
3152
3562
|
logger.debug(formatMessage("Request", name, this.enrich({
|
|
3153
3563
|
...properties,
|
|
3154
|
-
duration: `${
|
|
3564
|
+
duration: `${durationMs}ms`,
|
|
3155
3565
|
success
|
|
3156
3566
|
})));
|
|
3157
3567
|
}
|
|
3158
|
-
async trackDependency(
|
|
3568
|
+
async trackDependency({
|
|
3569
|
+
name,
|
|
3570
|
+
type,
|
|
3571
|
+
durationMs,
|
|
3572
|
+
success,
|
|
3573
|
+
properties
|
|
3574
|
+
}) {
|
|
3159
3575
|
logger.debug(formatMessage("Dependency", name, this.enrich({
|
|
3160
3576
|
...properties,
|
|
3161
3577
|
type,
|
|
3162
|
-
duration: `${
|
|
3578
|
+
duration: `${durationMs}ms`,
|
|
3163
3579
|
success
|
|
3164
3580
|
})));
|
|
3165
3581
|
}
|
|
@@ -3415,144 +3831,16 @@ function getGlobalTelemetryProperties() {
|
|
|
3415
3831
|
return telemetryPropsSlot.get();
|
|
3416
3832
|
}
|
|
3417
3833
|
|
|
3418
|
-
// ../common/src/telemetry/
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
"secrets",
|
|
3426
|
-
"password",
|
|
3427
|
-
"passwords",
|
|
3428
|
-
"pwd",
|
|
3429
|
-
"credential",
|
|
3430
|
-
"credentials",
|
|
3431
|
-
"auth",
|
|
3432
|
-
"authentication",
|
|
3433
|
-
"authorization",
|
|
3434
|
-
"authority",
|
|
3435
|
-
"cert",
|
|
3436
|
-
"certificate",
|
|
3437
|
-
"certificates"
|
|
3438
|
-
]);
|
|
3439
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
3440
|
-
"api",
|
|
3441
|
-
"access",
|
|
3442
|
-
"client",
|
|
3443
|
-
"private",
|
|
3444
|
-
"public",
|
|
3445
|
-
"signing",
|
|
3446
|
-
"encryption",
|
|
3447
|
-
"session",
|
|
3448
|
-
"master",
|
|
3449
|
-
"shared",
|
|
3450
|
-
"root",
|
|
3451
|
-
"ssh",
|
|
3452
|
-
"rsa",
|
|
3453
|
-
"aes",
|
|
3454
|
-
"hmac",
|
|
3455
|
-
"oauth"
|
|
3456
|
-
]);
|
|
3457
|
-
var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
3458
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
3459
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
3460
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
3461
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
3462
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
3463
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
3464
|
-
function shortHash(input) {
|
|
3465
|
-
let hash = 2166136261;
|
|
3466
|
-
for (let i = 0;i < input.length; i++) {
|
|
3467
|
-
hash ^= input.charCodeAt(i);
|
|
3468
|
-
hash = Math.imul(hash, 16777619);
|
|
3469
|
-
}
|
|
3470
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
3471
|
-
}
|
|
3472
|
-
function redactUrl(raw) {
|
|
3473
|
-
try {
|
|
3474
|
-
const url = new URL(raw);
|
|
3475
|
-
return `${url.protocol}//${url.host}`;
|
|
3476
|
-
} catch {
|
|
3477
|
-
return `url#${shortHash(raw)}`;
|
|
3478
|
-
}
|
|
3479
|
-
}
|
|
3480
|
-
function redactValueDetectors(value) {
|
|
3481
|
-
let out = value;
|
|
3482
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
3483
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
3484
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
3485
|
-
const core = trailing ? match.slice(0, -trailing.length) : match;
|
|
3486
|
-
return `${redactUrl(core)}${trailing}`;
|
|
3487
|
-
});
|
|
3488
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
3489
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
3490
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
3491
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
3492
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
3493
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
3494
|
-
}
|
|
3495
|
-
return out;
|
|
3496
|
-
}
|
|
3497
|
-
function redactValue(value) {
|
|
3498
|
-
return redactValueDetectors(value);
|
|
3499
|
-
}
|
|
3500
|
-
function redactError(error) {
|
|
3501
|
-
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
3502
|
-
safe.name = error.name;
|
|
3503
|
-
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
3504
|
-
return safe;
|
|
3505
|
-
}
|
|
3506
|
-
function nameTokens(name) {
|
|
3507
|
-
return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t) => t.toLowerCase()).filter(Boolean);
|
|
3508
|
-
}
|
|
3509
|
-
function isSensitiveName(name) {
|
|
3510
|
-
const tokens = nameTokens(name);
|
|
3511
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
3512
|
-
const token = tokens[i];
|
|
3513
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
3514
|
-
return true;
|
|
3515
|
-
}
|
|
3516
|
-
if (token === "key" || token === "keys") {
|
|
3517
|
-
const prev = tokens[i - 1];
|
|
3518
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
3519
|
-
return true;
|
|
3520
|
-
}
|
|
3521
|
-
}
|
|
3522
|
-
}
|
|
3523
|
-
return false;
|
|
3524
|
-
}
|
|
3525
|
-
function redactProperty(name, value) {
|
|
3526
|
-
if (value === undefined || value === null) {
|
|
3527
|
-
return;
|
|
3528
|
-
}
|
|
3529
|
-
if (isSensitiveName(name)) {
|
|
3530
|
-
return REDACTED;
|
|
3531
|
-
}
|
|
3532
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
3533
|
-
return value;
|
|
3534
|
-
}
|
|
3535
|
-
if (typeof value !== "string") {
|
|
3536
|
-
return "[OBJECT]";
|
|
3537
|
-
}
|
|
3538
|
-
return redactValueDetectors(value);
|
|
3539
|
-
}
|
|
3540
|
-
function redactProperties(properties) {
|
|
3541
|
-
const out = {};
|
|
3542
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
3543
|
-
const redacted = redactProperty(name, value);
|
|
3544
|
-
if (redacted !== undefined) {
|
|
3545
|
-
out[name] = redacted;
|
|
3546
|
-
}
|
|
3547
|
-
}
|
|
3548
|
-
return out;
|
|
3834
|
+
// ../common/src/telemetry/span-clock.ts
|
|
3835
|
+
function startSpanClock() {
|
|
3836
|
+
const started = performance.now();
|
|
3837
|
+
return {
|
|
3838
|
+
startedAt: new Date(performance.timeOrigin + started),
|
|
3839
|
+
elapsedMs: () => performance.now() - started
|
|
3840
|
+
};
|
|
3549
3841
|
}
|
|
3550
3842
|
|
|
3551
3843
|
// ../common/src/telemetry/telemetry-service.ts
|
|
3552
|
-
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
3553
|
-
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
3554
|
-
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
3555
|
-
|
|
3556
3844
|
class TelemetryService {
|
|
3557
3845
|
telemetryProvider;
|
|
3558
3846
|
contextStorage;
|
|
@@ -3572,36 +3860,39 @@ class TelemetryService {
|
|
|
3572
3860
|
this.defaultProperties = properties === undefined ? undefined : { ...this.defaultProperties, ...properties };
|
|
3573
3861
|
}
|
|
3574
3862
|
trackEvent(name, properties) {
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3863
|
+
this.telemetryProvider.trackEvent({
|
|
3864
|
+
name: redactSpanName(name),
|
|
3865
|
+
properties: this.enrichProperties(properties),
|
|
3866
|
+
...this.leafCorrelation()
|
|
3867
|
+
});
|
|
3578
3868
|
}
|
|
3579
|
-
trackException(error, properties) {
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3869
|
+
trackException(error, properties, context) {
|
|
3870
|
+
this.telemetryProvider.trackException({
|
|
3871
|
+
error: redactError(error),
|
|
3872
|
+
properties: this.enrichProperties(properties),
|
|
3873
|
+
...this.leafCorrelation(context)
|
|
3874
|
+
});
|
|
3583
3875
|
}
|
|
3584
3876
|
async trackRequest(name, fn, properties) {
|
|
3585
|
-
const parentContext = this.
|
|
3877
|
+
const parentContext = this.getActiveContext();
|
|
3586
3878
|
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
3587
3879
|
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
3880
|
+
const clock = startSpanClock();
|
|
3588
3881
|
const context = {
|
|
3589
3882
|
operationId,
|
|
3590
3883
|
...parentId !== undefined ? { parentId } : {},
|
|
3591
|
-
id: this.generateId()
|
|
3884
|
+
id: this.generateId(),
|
|
3885
|
+
startedAt: clock.startedAt
|
|
3592
3886
|
};
|
|
3593
|
-
const startTime = performance.now();
|
|
3594
3887
|
try {
|
|
3595
3888
|
const result = await this.contextStorage.run(context, fn);
|
|
3596
|
-
const durationMs =
|
|
3597
|
-
|
|
3598
|
-
await this.telemetryProvider.trackRequest(name, durationMs, true, enrichedProperties);
|
|
3889
|
+
const durationMs = clock.elapsedMs();
|
|
3890
|
+
await this.telemetryProvider.trackRequest(this.spanFor(name, durationMs, true, properties, context));
|
|
3599
3891
|
return result;
|
|
3600
3892
|
} catch (error) {
|
|
3601
|
-
const durationMs =
|
|
3893
|
+
const durationMs = clock.elapsedMs();
|
|
3602
3894
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
3603
|
-
|
|
3604
|
-
await this.telemetryProvider.trackRequest(name, durationMs, false, enrichedProperties);
|
|
3895
|
+
await this.telemetryProvider.trackRequest(this.spanFor(name, durationMs, false, { ...properties, errorMessage: err.message }, context));
|
|
3605
3896
|
throw error;
|
|
3606
3897
|
}
|
|
3607
3898
|
}
|
|
@@ -3610,8 +3901,7 @@ class TelemetryService {
|
|
|
3610
3901
|
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
3611
3902
|
id: this.generateId()
|
|
3612
3903
|
};
|
|
3613
|
-
|
|
3614
|
-
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
3904
|
+
this.telemetryProvider.trackRequest(this.spanFor(name, durationMs, success, properties, requestContext));
|
|
3615
3905
|
}
|
|
3616
3906
|
createRequestContext() {
|
|
3617
3907
|
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
@@ -3619,7 +3909,8 @@ class TelemetryService {
|
|
|
3619
3909
|
return {
|
|
3620
3910
|
operationId,
|
|
3621
3911
|
...parentId !== undefined ? { parentId } : {},
|
|
3622
|
-
id: this.generateId()
|
|
3912
|
+
id: this.generateId(),
|
|
3913
|
+
startedAt: startSpanClock().startedAt
|
|
3623
3914
|
};
|
|
3624
3915
|
}
|
|
3625
3916
|
inboundParentIdFor(operationId) {
|
|
@@ -3630,58 +3921,84 @@ class TelemetryService {
|
|
|
3630
3921
|
return this.contextStorage.run(context, fn);
|
|
3631
3922
|
}
|
|
3632
3923
|
createDependencyContext() {
|
|
3633
|
-
const parentContext = this.
|
|
3924
|
+
const parentContext = this.getActiveContext();
|
|
3634
3925
|
if (!parentContext) {
|
|
3635
3926
|
return;
|
|
3636
3927
|
}
|
|
3637
3928
|
return {
|
|
3638
3929
|
operationId: parentContext.operationId,
|
|
3639
3930
|
parentId: parentContext.id,
|
|
3640
|
-
id: this.generateId()
|
|
3931
|
+
id: this.generateId(),
|
|
3932
|
+
startedAt: startSpanClock().startedAt
|
|
3641
3933
|
};
|
|
3642
3934
|
}
|
|
3643
3935
|
trackDependencyResult(name, type, durationMs, success, properties, context, resultCode) {
|
|
3644
|
-
|
|
3645
|
-
|
|
3936
|
+
this.telemetryProvider.trackDependency({
|
|
3937
|
+
...this.spanFor(redactHttpDependencyName(name), durationMs, success, properties, context),
|
|
3938
|
+
type,
|
|
3939
|
+
...resultCode !== undefined ? { resultCode } : {}
|
|
3940
|
+
});
|
|
3646
3941
|
}
|
|
3647
3942
|
async trackDependencyOperation(name, type, fn, properties) {
|
|
3648
|
-
const
|
|
3943
|
+
const clock = startSpanClock();
|
|
3944
|
+
const parentContext = this.getActiveContext();
|
|
3649
3945
|
const childContext = parentContext !== undefined ? {
|
|
3650
3946
|
operationId: parentContext.operationId,
|
|
3651
3947
|
parentId: parentContext.id,
|
|
3652
|
-
id: this.generateId()
|
|
3653
|
-
|
|
3654
|
-
|
|
3948
|
+
id: this.generateId(),
|
|
3949
|
+
startedAt: clock.startedAt
|
|
3950
|
+
} : {
|
|
3951
|
+
...this.createRequestContext(),
|
|
3952
|
+
startedAt: clock.startedAt
|
|
3953
|
+
};
|
|
3655
3954
|
try {
|
|
3656
3955
|
const result = await this.contextStorage.run(childContext, fn);
|
|
3657
|
-
const durationMs =
|
|
3658
|
-
|
|
3659
|
-
|
|
3956
|
+
const durationMs = clock.elapsedMs();
|
|
3957
|
+
await this.telemetryProvider.trackDependency({
|
|
3958
|
+
...this.spanFor(name, durationMs, true, properties, childContext),
|
|
3959
|
+
type
|
|
3960
|
+
});
|
|
3660
3961
|
return result;
|
|
3661
3962
|
} catch (error) {
|
|
3662
|
-
const durationMs =
|
|
3963
|
+
const durationMs = clock.elapsedMs();
|
|
3663
3964
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
3664
|
-
|
|
3665
|
-
|
|
3965
|
+
await this.telemetryProvider.trackDependency({
|
|
3966
|
+
...this.spanFor(name, durationMs, false, { ...properties, errorMessage: err.message }, childContext),
|
|
3967
|
+
type
|
|
3968
|
+
});
|
|
3666
3969
|
throw error;
|
|
3667
3970
|
}
|
|
3668
3971
|
}
|
|
3669
|
-
|
|
3972
|
+
getActiveContext() {
|
|
3670
3973
|
return this.contextStorage.getContext();
|
|
3671
3974
|
}
|
|
3672
|
-
|
|
3975
|
+
leafCorrelation(explicit) {
|
|
3976
|
+
const context = explicit ?? this.getActiveContext();
|
|
3977
|
+
return {
|
|
3978
|
+
operationId: context?.operationId ?? this.operationId ?? getTelemetryOperationId(),
|
|
3979
|
+
...context !== undefined ? { parentId: context.id } : {}
|
|
3980
|
+
};
|
|
3981
|
+
}
|
|
3982
|
+
spanFor(name, durationMs, success, properties, context) {
|
|
3983
|
+
return {
|
|
3984
|
+
name: redactSpanName(name),
|
|
3985
|
+
durationMs,
|
|
3986
|
+
success,
|
|
3987
|
+
properties: this.enrichProperties(properties),
|
|
3988
|
+
operationId: context.operationId,
|
|
3989
|
+
...context.parentId !== undefined ? { parentId: context.parentId } : {},
|
|
3990
|
+
id: context.id,
|
|
3991
|
+
...context.startedAt !== undefined ? { startedAt: context.startedAt } : {}
|
|
3992
|
+
};
|
|
3993
|
+
}
|
|
3994
|
+
enrichProperties(properties) {
|
|
3673
3995
|
const globalProperties = getGlobalTelemetryProperties();
|
|
3674
3996
|
const enriched = {
|
|
3675
3997
|
...getExecutionContextTelemetryProperties(),
|
|
3676
3998
|
...globalProperties,
|
|
3677
3999
|
...this.defaultProperties,
|
|
3678
4000
|
...redactProperties(properties ?? {}),
|
|
3679
|
-
[TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource()
|
|
3680
|
-
...context ? {
|
|
3681
|
-
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
3682
|
-
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
3683
|
-
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
3684
|
-
} : {}
|
|
4001
|
+
[TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource()
|
|
3685
4002
|
};
|
|
3686
4003
|
return enriched;
|
|
3687
4004
|
}
|
|
@@ -3698,6 +4015,81 @@ class TelemetryService {
|
|
|
3698
4015
|
return hex;
|
|
3699
4016
|
}
|
|
3700
4017
|
}
|
|
4018
|
+
// ../common/src/timings.ts
|
|
4019
|
+
var TIMINGS_ENV_VAR = "UIP_TIMINGS";
|
|
4020
|
+
function createStorage2() {
|
|
4021
|
+
const [error, mod] = catchError(() => __require("node:async_hooks"));
|
|
4022
|
+
if (error || typeof mod?.AsyncLocalStorage !== "function") {
|
|
4023
|
+
return {
|
|
4024
|
+
getStore: () => {
|
|
4025
|
+
return;
|
|
4026
|
+
},
|
|
4027
|
+
run: (_store, fn) => fn()
|
|
4028
|
+
};
|
|
4029
|
+
}
|
|
4030
|
+
return new mod.AsyncLocalStorage;
|
|
4031
|
+
}
|
|
4032
|
+
var storageSlot = singleton("TimingStorage");
|
|
4033
|
+
var stateSlot = singleton("Timings");
|
|
4034
|
+
var rootStartedSlot = singleton("TimingsRootStarted");
|
|
4035
|
+
var longLivedHostSlot = singleton("TimingsLongLivedHost");
|
|
4036
|
+
var storage = storageSlot.getOrInit(createStorage2, (value) => ("getStore" in value));
|
|
4037
|
+
function newState(baseline) {
|
|
4038
|
+
return { baseline, httpMs: 0, httpCalls: 0 };
|
|
4039
|
+
}
|
|
4040
|
+
function getState() {
|
|
4041
|
+
const scoped = storage.getStore();
|
|
4042
|
+
if (scoped) {
|
|
4043
|
+
return scoped;
|
|
4044
|
+
}
|
|
4045
|
+
const pinned = livePinnedState();
|
|
4046
|
+
if (pinned !== undefined) {
|
|
4047
|
+
return pinned;
|
|
4048
|
+
}
|
|
4049
|
+
return newState(processStartIsInvocationStart() ? 0 : performance.now());
|
|
4050
|
+
}
|
|
4051
|
+
function livePinnedState() {
|
|
4052
|
+
const pinned = stateSlot.get();
|
|
4053
|
+
return pinned !== undefined && "httpCalls" in pinned && !pinned.finished ? pinned : undefined;
|
|
4054
|
+
}
|
|
4055
|
+
function processStartIsInvocationStart() {
|
|
4056
|
+
return !rootStartedSlot.get(false) && !longLivedHostSlot.get(false);
|
|
4057
|
+
}
|
|
4058
|
+
function timingsEnabled() {
|
|
4059
|
+
if (typeof process === "undefined") {
|
|
4060
|
+
return false;
|
|
4061
|
+
}
|
|
4062
|
+
const value = process.env?.[TIMINGS_ENV_VAR];
|
|
4063
|
+
if (value === undefined) {
|
|
4064
|
+
return false;
|
|
4065
|
+
}
|
|
4066
|
+
const normalized = value.trim().toLowerCase();
|
|
4067
|
+
return normalized === "1" || normalized === "true";
|
|
4068
|
+
}
|
|
4069
|
+
function recordExitCode(exitCode) {
|
|
4070
|
+
if (!timingsEnabled()) {
|
|
4071
|
+
return;
|
|
4072
|
+
}
|
|
4073
|
+
getState().exitCode = exitCode;
|
|
4074
|
+
}
|
|
4075
|
+
function invocationStartedAt() {
|
|
4076
|
+
return new Date(performance.timeOrigin + getState().baseline);
|
|
4077
|
+
}
|
|
4078
|
+
function invocationElapsedMs() {
|
|
4079
|
+
return performance.now() - getState().baseline;
|
|
4080
|
+
}
|
|
4081
|
+
function markCommandStart() {
|
|
4082
|
+
if (!timingsEnabled()) {
|
|
4083
|
+
return;
|
|
4084
|
+
}
|
|
4085
|
+
getState().commandStart = performance.now();
|
|
4086
|
+
}
|
|
4087
|
+
function recordCommandDuration(durationMs) {
|
|
4088
|
+
if (!timingsEnabled()) {
|
|
4089
|
+
return;
|
|
4090
|
+
}
|
|
4091
|
+
getState().commandMs = durationMs;
|
|
4092
|
+
}
|
|
3701
4093
|
// ../common/src/telemetry/proxy-http-agent.ts
|
|
3702
4094
|
var slot = singleton("ProxyAuthHttpsAgent");
|
|
3703
4095
|
|
|
@@ -3718,6 +4110,9 @@ function getGlobalTelemetryInstance() {
|
|
|
3718
4110
|
}
|
|
3719
4111
|
return;
|
|
3720
4112
|
}
|
|
4113
|
+
function setGlobalTelemetryInstance(instance) {
|
|
4114
|
+
telemetryInstanceSlot.set(instance);
|
|
4115
|
+
}
|
|
3721
4116
|
var _localTelemetryInstance;
|
|
3722
4117
|
function getTelemetryInstance() {
|
|
3723
4118
|
const global = getGlobalTelemetryInstance();
|
|
@@ -3725,6 +4120,7 @@ function getTelemetryInstance() {
|
|
|
3725
4120
|
return global;
|
|
3726
4121
|
if (!_localTelemetryInstance) {
|
|
3727
4122
|
_localTelemetryInstance = new TelemetryService(new LoggerTelemetryProvider, new NodeContextStorage);
|
|
4123
|
+
setGlobalTelemetryInstance(_localTelemetryInstance);
|
|
3728
4124
|
}
|
|
3729
4125
|
return _localTelemetryInstance;
|
|
3730
4126
|
}
|
|
@@ -3737,6 +4133,14 @@ var telemetry = new Proxy({}, {
|
|
|
3737
4133
|
});
|
|
3738
4134
|
|
|
3739
4135
|
// ../common/src/formatter.ts
|
|
4136
|
+
var ANSI_STYLES = {
|
|
4137
|
+
red: "\x1B[31m",
|
|
4138
|
+
dim: "\x1B[2m"
|
|
4139
|
+
};
|
|
4140
|
+
var ANSI_RESET = "\x1B[0m";
|
|
4141
|
+
function styleLine(line, style) {
|
|
4142
|
+
return style ? `${ANSI_STYLES[style]}${line}${ANSI_RESET}` : line;
|
|
4143
|
+
}
|
|
3740
4144
|
var CLI_ERROR_CODES = [
|
|
3741
4145
|
"invalid_argument",
|
|
3742
4146
|
"authentication_required",
|
|
@@ -3808,23 +4212,6 @@ function derivePaginationHasMore(returned, limit, offset, total, nextPage) {
|
|
|
3808
4212
|
}
|
|
3809
4213
|
return (offset ?? 0) + returned < total;
|
|
3810
4214
|
}
|
|
3811
|
-
|
|
3812
|
-
class SuccessOutput {
|
|
3813
|
-
Result = RESULTS.Success;
|
|
3814
|
-
Code;
|
|
3815
|
-
Data;
|
|
3816
|
-
Pagination;
|
|
3817
|
-
Instructions;
|
|
3818
|
-
Log;
|
|
3819
|
-
constructor(code, data) {
|
|
3820
|
-
this.Code = code;
|
|
3821
|
-
this.Data = data;
|
|
3822
|
-
const logPath = getLogFilePath();
|
|
3823
|
-
if (logPath) {
|
|
3824
|
-
this.Log = logPath;
|
|
3825
|
-
}
|
|
3826
|
-
}
|
|
3827
|
-
}
|
|
3828
4215
|
function escapeNonAscii(jsonText) {
|
|
3829
4216
|
return jsonText.replace(/[\u0080-\uffff]/g, (c) => {
|
|
3830
4217
|
const hex = c.charCodeAt(0).toString(16).padStart(4, "0");
|
|
@@ -3889,19 +4276,45 @@ function toPascalCaseKey(key) {
|
|
|
3889
4276
|
const lowerCamelKey = toLowerCamelCaseKey(key);
|
|
3890
4277
|
return lowerCamelKey ? lowerCamelKey.charAt(0).toUpperCase() + lowerCamelKey.slice(1) : lowerCamelKey;
|
|
3891
4278
|
}
|
|
3892
|
-
function
|
|
4279
|
+
function collectVerbatimRefs(value, into) {
|
|
4280
|
+
if (typeof value !== "object" || value === null)
|
|
4281
|
+
return;
|
|
4282
|
+
if (into.has(value))
|
|
4283
|
+
return;
|
|
4284
|
+
into.add(value);
|
|
4285
|
+
for (const nested of Array.isArray(value) ? value : Object.values(value)) {
|
|
4286
|
+
collectVerbatimRefs(nested, into);
|
|
4287
|
+
}
|
|
4288
|
+
}
|
|
4289
|
+
function toPascalCaseData(value, verbatimKeys, subtrees) {
|
|
4290
|
+
if (subtrees?.mode === "skip" && typeof value === "object" && value !== null && subtrees.refs.has(value)) {
|
|
4291
|
+
return value;
|
|
4292
|
+
}
|
|
3893
4293
|
if (Array.isArray(value))
|
|
3894
|
-
return value.map(toPascalCaseData);
|
|
4294
|
+
return value.map((entry) => toPascalCaseData(entry, verbatimKeys, subtrees));
|
|
3895
4295
|
if (!isPlainRecord(value))
|
|
3896
4296
|
return value;
|
|
3897
4297
|
const result = {};
|
|
3898
4298
|
for (const [key, nestedValue] of Object.entries(value)) {
|
|
3899
|
-
|
|
4299
|
+
const pascalKey = toPascalCaseKey(key);
|
|
4300
|
+
if (verbatimKeys?.has(pascalKey)) {
|
|
4301
|
+
result[pascalKey] = nestedValue;
|
|
4302
|
+
if (subtrees?.mode === "collect") {
|
|
4303
|
+
collectVerbatimRefs(nestedValue, subtrees.refs);
|
|
4304
|
+
}
|
|
4305
|
+
continue;
|
|
4306
|
+
}
|
|
4307
|
+
result[pascalKey] = toPascalCaseData(nestedValue, verbatimKeys, subtrees);
|
|
3900
4308
|
}
|
|
3901
4309
|
return result;
|
|
3902
4310
|
}
|
|
3903
|
-
function normalizeDataKeys(data) {
|
|
3904
|
-
return toPascalCaseData(data);
|
|
4311
|
+
function normalizeDataKeys(data, verbatimKeys, subtrees) {
|
|
4312
|
+
return toPascalCaseData(data, verbatimKeys, subtrees);
|
|
4313
|
+
}
|
|
4314
|
+
function toVerbatimKeySet(preserve) {
|
|
4315
|
+
if (!Array.isArray(preserve))
|
|
4316
|
+
return;
|
|
4317
|
+
return new Set(preserve.map(toPascalCaseKey));
|
|
3905
4318
|
}
|
|
3906
4319
|
function normalizeOutputKeys(data) {
|
|
3907
4320
|
const result = {};
|
|
@@ -3911,7 +4324,7 @@ function normalizeOutputKeys(data) {
|
|
|
3911
4324
|
}
|
|
3912
4325
|
return result;
|
|
3913
4326
|
}
|
|
3914
|
-
function printOutput(data, format = "json", logFn, asciiSafe = false) {
|
|
4327
|
+
function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowStyle) {
|
|
3915
4328
|
if (!data) {
|
|
3916
4329
|
logFn("Empty response object. No data to display.");
|
|
3917
4330
|
return;
|
|
@@ -3946,7 +4359,7 @@ function printOutput(data, format = "json", logFn, asciiSafe = false) {
|
|
|
3946
4359
|
if (hasData && !(rows !== null && rows.length === 0)) {
|
|
3947
4360
|
const logValue = data.Log;
|
|
3948
4361
|
if (rows !== null) {
|
|
3949
|
-
printResizableTable(rows, logFn, logValue);
|
|
4362
|
+
printResizableTable(rows, logFn, logValue, undefined, tableRowStyle);
|
|
3950
4363
|
} else {
|
|
3951
4364
|
printVerticalTable(data.Data, logFn, logValue);
|
|
3952
4365
|
}
|
|
@@ -3957,10 +4370,11 @@ function printOutput(data, format = "json", logFn, asciiSafe = false) {
|
|
|
3957
4370
|
}
|
|
3958
4371
|
}
|
|
3959
4372
|
}
|
|
3960
|
-
function logOutput(data, format = "json") {
|
|
4373
|
+
function logOutput(data, format = "json", tableRowStyle) {
|
|
3961
4374
|
const sink = getOutputSink();
|
|
4375
|
+
const styleFn = sink.capabilities.isInteractive && sink.capabilities.supportsColor ? tableRowStyle : undefined;
|
|
3962
4376
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
3963
|
-
`), needsAsciiSafeJson(sink));
|
|
4377
|
+
`), needsAsciiSafeJson(sink), styleFn);
|
|
3964
4378
|
}
|
|
3965
4379
|
function cellToString(val) {
|
|
3966
4380
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
@@ -3974,7 +4388,7 @@ function wrapText(text, width) {
|
|
|
3974
4388
|
}
|
|
3975
4389
|
return lines;
|
|
3976
4390
|
}
|
|
3977
|
-
function printTable(data, logFn, externalLogValue) {
|
|
4391
|
+
function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
3978
4392
|
if (data.length === 0)
|
|
3979
4393
|
return;
|
|
3980
4394
|
const keys = Object.keys(data[0]).filter((key) => !["code", "log"].includes(key.toLowerCase()));
|
|
@@ -3984,7 +4398,7 @@ function printTable(data, logFn, externalLogValue) {
|
|
|
3984
4398
|
logFn(keys.map((_, i) => "-".repeat(maxWidths[i])).join("-|-"));
|
|
3985
4399
|
data.forEach((item) => {
|
|
3986
4400
|
const row = keys.map((key, i) => cellToString(item[key]).padEnd(maxWidths[i])).join(" | ");
|
|
3987
|
-
logFn(row);
|
|
4401
|
+
logFn(styleLine(row, tableRowStyle?.(item)));
|
|
3988
4402
|
});
|
|
3989
4403
|
if (externalLogValue) {
|
|
3990
4404
|
logFn("");
|
|
@@ -4027,14 +4441,14 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
4027
4441
|
logFn(`Log: ${externalLogValue}`);
|
|
4028
4442
|
}
|
|
4029
4443
|
}
|
|
4030
|
-
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth) {
|
|
4444
|
+
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
4031
4445
|
if (data.length === 0)
|
|
4032
4446
|
return;
|
|
4033
4447
|
const keys = Object.keys(data[0]).filter((key) => !["code", "log"].includes(key.toLowerCase()));
|
|
4034
4448
|
if (keys.length === 0)
|
|
4035
4449
|
return;
|
|
4036
4450
|
if (!process.stdout.isTTY) {
|
|
4037
|
-
printTable(data, logFn, externalLogValue);
|
|
4451
|
+
printTable(data, logFn, externalLogValue, tableRowStyle);
|
|
4038
4452
|
return;
|
|
4039
4453
|
}
|
|
4040
4454
|
const naturalWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
@@ -4042,7 +4456,7 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
4042
4456
|
const totalWidth = naturalWidths.reduce((a, b) => a + b, 0) + separatorTotal;
|
|
4043
4457
|
const termWidth = availableWidth ?? (process.stdout.columns || 120);
|
|
4044
4458
|
if (totalWidth <= termWidth) {
|
|
4045
|
-
printTable(data, logFn, externalLogValue);
|
|
4459
|
+
printTable(data, logFn, externalLogValue, tableRowStyle);
|
|
4046
4460
|
return;
|
|
4047
4461
|
}
|
|
4048
4462
|
const overflow = totalWidth - termWidth;
|
|
@@ -4088,6 +4502,7 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
4088
4502
|
logFn(header);
|
|
4089
4503
|
logFn(keys.map((_, i) => "-".repeat(finalWidths[i])).join("-|-"));
|
|
4090
4504
|
data.forEach((item) => {
|
|
4505
|
+
const style = tableRowStyle?.(item);
|
|
4091
4506
|
const cellLines = keys.map((key, i) => wrapText(cellToString(item[key]), finalWidths[i]));
|
|
4092
4507
|
const lineCount = Math.max(...cellLines.map((l) => l.length));
|
|
4093
4508
|
for (let line = 0;line < lineCount; line++) {
|
|
@@ -4095,7 +4510,7 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
4095
4510
|
const val = line < cellLines[i].length ? cellLines[i][line] : "";
|
|
4096
4511
|
return val.padEnd(finalWidths[i]);
|
|
4097
4512
|
}).join(" | ");
|
|
4098
|
-
logFn(row);
|
|
4513
|
+
logFn(styleLine(row, style));
|
|
4099
4514
|
}
|
|
4100
4515
|
});
|
|
4101
4516
|
if (externalLogValue) {
|
|
@@ -4239,30 +4654,36 @@ var OutputFormatter;
|
|
|
4239
4654
|
((OutputFormatter) => {
|
|
4240
4655
|
function success(data, options) {
|
|
4241
4656
|
data.Log ??= getLogFilePath() || undefined;
|
|
4242
|
-
const normalize =
|
|
4657
|
+
const normalize = options?.preserveDataKeys !== true;
|
|
4658
|
+
const verbatim = toVerbatimKeySet(options?.preserveDataKeys);
|
|
4659
|
+
const subtrees = verbatim && {
|
|
4660
|
+
refs: new Set,
|
|
4661
|
+
mode: "collect"
|
|
4662
|
+
};
|
|
4243
4663
|
if (normalize) {
|
|
4244
|
-
data.Data = normalizeDataKeys(data.Data);
|
|
4664
|
+
data.Data = normalizeDataKeys(data.Data, verbatim, subtrees);
|
|
4245
4665
|
}
|
|
4246
4666
|
const filter = getOutputFilter();
|
|
4247
4667
|
if (filter) {
|
|
4248
4668
|
const filtered = applyFilter(data.Data, filter);
|
|
4249
|
-
data.Data = normalize ? normalizeDataKeys(filtered) : filtered;
|
|
4669
|
+
data.Data = normalize ? normalizeDataKeys(filtered, verbatim, subtrees && { refs: subtrees.refs, mode: "skip" }) : filtered;
|
|
4250
4670
|
}
|
|
4251
|
-
logOutput(normalizeOutputKeys(data), getOutputFormat());
|
|
4671
|
+
logOutput(normalizeOutputKeys(data), getOutputFormat(), options?.tableRowStyle);
|
|
4252
4672
|
}
|
|
4253
4673
|
OutputFormatter.success = success;
|
|
4254
4674
|
function error(data) {
|
|
4255
4675
|
data.Log ??= getLogFilePath() || undefined;
|
|
4256
4676
|
data.ErrorCode ??= defaultErrorCodeForFailure(data);
|
|
4257
4677
|
data.Retry ??= defaultRetryForErrorCode(data.ErrorCode);
|
|
4258
|
-
|
|
4678
|
+
const exitCode = EXIT_CODES[data.Result] ?? 1;
|
|
4679
|
+
setExitCode(exitCode);
|
|
4259
4680
|
recordCommandFailureTelemetry({
|
|
4260
4681
|
result: data.Result,
|
|
4261
4682
|
errorCode: data.ErrorCode,
|
|
4262
4683
|
retry: data.Retry,
|
|
4263
4684
|
message: data.Message,
|
|
4264
4685
|
context: data.Context,
|
|
4265
|
-
exitCode
|
|
4686
|
+
exitCode,
|
|
4266
4687
|
errorClass: data.TelemetryErrorClass,
|
|
4267
4688
|
terminalOutcome: data.TelemetryTerminalOutcome,
|
|
4268
4689
|
terminalSignal: data.TelemetryTerminalSignal
|
|
@@ -4339,6 +4760,34 @@ var OutputFormatter;
|
|
|
4339
4760
|
OutputFormatter.formatToString = formatToString;
|
|
4340
4761
|
})(OutputFormatter ||= {});
|
|
4341
4762
|
|
|
4763
|
+
// ../../node_modules/commander/esm.mjs
|
|
4764
|
+
var import__ = __toESM(require_commander(), 1);
|
|
4765
|
+
var {
|
|
4766
|
+
program,
|
|
4767
|
+
createCommand,
|
|
4768
|
+
createArgument,
|
|
4769
|
+
createOption,
|
|
4770
|
+
CommanderError,
|
|
4771
|
+
InvalidArgumentError,
|
|
4772
|
+
InvalidOptionArgumentError,
|
|
4773
|
+
Command,
|
|
4774
|
+
Argument,
|
|
4775
|
+
Option,
|
|
4776
|
+
Help
|
|
4777
|
+
} = import__.default;
|
|
4778
|
+
|
|
4779
|
+
// ../common/src/preview.ts
|
|
4780
|
+
var previewSlot = singleton("PreviewBuild");
|
|
4781
|
+
function isPreviewBuild() {
|
|
4782
|
+
return previewSlot.get(false) ?? false;
|
|
4783
|
+
}
|
|
4784
|
+
Command.prototype.previewCommand = function(nameAndArgs, opts) {
|
|
4785
|
+
if (isPreviewBuild()) {
|
|
4786
|
+
return this.command(nameAndArgs, opts);
|
|
4787
|
+
}
|
|
4788
|
+
return new Command(nameAndArgs.split(/\s+/)[0] ?? nameAndArgs);
|
|
4789
|
+
};
|
|
4790
|
+
|
|
4342
4791
|
// ../common/src/telemetry/command-attribution.ts
|
|
4343
4792
|
var LEGACY_SKILL_NAMESPACE = "uipath:";
|
|
4344
4793
|
var MAX_SKILL_NAME_LENGTH = 80;
|
|
@@ -4492,6 +4941,57 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
4492
4941
|
};
|
|
4493
4942
|
}
|
|
4494
4943
|
|
|
4944
|
+
// ../common/src/telemetry/command-name.ts
|
|
4945
|
+
var TELEMETRY_COMMAND_ROOT = "uip";
|
|
4946
|
+
function commandTelemetryName(parts) {
|
|
4947
|
+
const tokens = [];
|
|
4948
|
+
for (const part of parts) {
|
|
4949
|
+
const pieces = String(part ?? "").split(/\s+/).filter((token) => token && !token.startsWith("-") && token !== TELEMETRY_COMMAND_ROOT);
|
|
4950
|
+
if (pieces.every(isCommandToken)) {
|
|
4951
|
+
tokens.push(...pieces);
|
|
4952
|
+
continue;
|
|
4953
|
+
}
|
|
4954
|
+
tokens.push(UNKNOWN_TOKEN);
|
|
4955
|
+
}
|
|
4956
|
+
return [TELEMETRY_COMMAND_ROOT, ...tokens].join(".");
|
|
4957
|
+
}
|
|
4958
|
+
var COMMAND_TOKEN_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
|
|
4959
|
+
var MAX_COMMAND_TOKEN_LENGTH = 32;
|
|
4960
|
+
var GUID_TOKEN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
4961
|
+
function isCommandToken(token) {
|
|
4962
|
+
return token.length <= MAX_COMMAND_TOKEN_LENGTH && COMMAND_TOKEN_PATTERN.test(token) && !GUID_TOKEN.test(token) && !/^\d+$/.test(token);
|
|
4963
|
+
}
|
|
4964
|
+
var UNKNOWN_TOKEN = "<unknown>";
|
|
4965
|
+
|
|
4966
|
+
// ../common/src/telemetry/invocation-request.ts
|
|
4967
|
+
var requestContextSlot = singleton("TelemetryInvocationRequestContext");
|
|
4968
|
+
function activeContext() {
|
|
4969
|
+
return telemetry.getActiveContext?.();
|
|
4970
|
+
}
|
|
4971
|
+
function runWithInvocationRequest(fn) {
|
|
4972
|
+
const context = telemetry.createRequestContext();
|
|
4973
|
+
context.startedAt = invocationStartedAt();
|
|
4974
|
+
requestContextSlot.set(context);
|
|
4975
|
+
return telemetry.runWithContext(context, fn);
|
|
4976
|
+
}
|
|
4977
|
+
function ensureInvocationRequestScope(fn) {
|
|
4978
|
+
if (activeContext() !== undefined) {
|
|
4979
|
+
return fn();
|
|
4980
|
+
}
|
|
4981
|
+
const kept = requestContextSlot.get();
|
|
4982
|
+
return kept === undefined ? runWithInvocationRequest(fn) : telemetry.runWithContext(kept, fn);
|
|
4983
|
+
}
|
|
4984
|
+
function getInvocationRequestContext() {
|
|
4985
|
+
return activeContext() ?? requestContextSlot.get();
|
|
4986
|
+
}
|
|
4987
|
+
function emitInvocationRequest(name, success, properties) {
|
|
4988
|
+
const context = getInvocationRequestContext();
|
|
4989
|
+
telemetry.trackRequestResult(name, invocationElapsedMs(), success, properties, context);
|
|
4990
|
+
if (context !== undefined && requestContextSlot.get() === context) {
|
|
4991
|
+
requestContextSlot.clear();
|
|
4992
|
+
}
|
|
4993
|
+
}
|
|
4994
|
+
|
|
4495
4995
|
// ../common/src/trackedAction.ts
|
|
4496
4996
|
var pollSignalSlot = singleton("PollSignal");
|
|
4497
4997
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
@@ -4499,28 +4999,74 @@ var retryHintValues = new Set(RETRY_HINTS);
|
|
|
4499
4999
|
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
4500
5000
|
var processContext = {
|
|
4501
5001
|
exit: (code) => {
|
|
4502
|
-
|
|
5002
|
+
recordExitCode(code);
|
|
5003
|
+
setExitCode(code);
|
|
4503
5004
|
},
|
|
4504
5005
|
get pollSignal() {
|
|
4505
5006
|
return pollSignalSlot.get();
|
|
4506
5007
|
}
|
|
4507
5008
|
};
|
|
5009
|
+
var TELEMETRY_ARG_VALUE_WITHHELD = "<provided>";
|
|
5010
|
+
var TELEMETRY_ARG_VALUE_DEFAULTED = "<default>";
|
|
5011
|
+
function recordableArgValue(value, choices) {
|
|
5012
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
5013
|
+
return value;
|
|
5014
|
+
}
|
|
5015
|
+
if (choices && choices.length > 0) {
|
|
5016
|
+
if (typeof value === "string" && choices.includes(value)) {
|
|
5017
|
+
return value;
|
|
5018
|
+
}
|
|
5019
|
+
if (Array.isArray(value) && value.length > 0 && value.every((entry) => typeof entry === "string" && choices.includes(entry))) {
|
|
5020
|
+
return value.join(",");
|
|
5021
|
+
}
|
|
5022
|
+
}
|
|
5023
|
+
return TELEMETRY_ARG_VALUE_WITHHELD;
|
|
5024
|
+
}
|
|
4508
5025
|
function extractCommandParams(cmd) {
|
|
4509
5026
|
const params = {};
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
5027
|
+
forEachSuppliedArgument(cmd, (name, value, choices, defaulted) => {
|
|
5028
|
+
const recordable = recordableArgValue(value, choices);
|
|
5029
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = recordable === TELEMETRY_ARG_VALUE_WITHHELD && defaulted ? TELEMETRY_ARG_VALUE_DEFAULTED : recordable;
|
|
5030
|
+
});
|
|
5031
|
+
return params;
|
|
5032
|
+
}
|
|
5033
|
+
function isDefaultedOption(cmd, name) {
|
|
5034
|
+
const source = cmd.getOptionValueSource?.(name);
|
|
5035
|
+
return source === "default" || source === "implied";
|
|
5036
|
+
}
|
|
5037
|
+
function isDefaultedPositional(cmd, index) {
|
|
5038
|
+
return index >= (cmd.args?.length ?? 0);
|
|
5039
|
+
}
|
|
5040
|
+
function forEachSuppliedArgument(cmd, visit) {
|
|
4515
5041
|
const registered = cmd.registeredArguments ?? [];
|
|
4516
5042
|
const processed = cmd.processedArgs ?? [];
|
|
4517
5043
|
for (let i = 0;i < registered.length; i++) {
|
|
4518
|
-
|
|
5044
|
+
const name = registered[i].name();
|
|
5045
|
+
if (name && processed[i] !== undefined) {
|
|
5046
|
+
visit(name, processed[i], registered[i].argChoices, isDefaultedPositional(cmd, i));
|
|
5047
|
+
}
|
|
5048
|
+
}
|
|
5049
|
+
const choicesByAttribute = new Map;
|
|
5050
|
+
for (const option of cmd.options) {
|
|
5051
|
+
choicesByAttribute.set(option.attributeName(), option.argChoices);
|
|
4519
5052
|
}
|
|
4520
5053
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
4521
|
-
|
|
5054
|
+
if (key && value !== undefined) {
|
|
5055
|
+
visit(key, value, choicesByAttribute.get(key), isDefaultedOption(cmd, key));
|
|
5056
|
+
}
|
|
4522
5057
|
}
|
|
4523
|
-
|
|
5058
|
+
}
|
|
5059
|
+
function withheldArgumentValues(cmd) {
|
|
5060
|
+
const values = [];
|
|
5061
|
+
forEachSuppliedArgument(cmd, (_name, value, choices, defaulted) => {
|
|
5062
|
+
if (defaulted) {
|
|
5063
|
+
return;
|
|
5064
|
+
}
|
|
5065
|
+
if (recordableArgValue(value, choices) === TELEMETRY_ARG_VALUE_WITHHELD) {
|
|
5066
|
+
values.push(value);
|
|
5067
|
+
}
|
|
5068
|
+
});
|
|
5069
|
+
return values;
|
|
4524
5070
|
}
|
|
4525
5071
|
function deriveCommandPath(cmd) {
|
|
4526
5072
|
const parts = [];
|
|
@@ -4535,7 +5081,7 @@ function deriveCommandPath(cmd) {
|
|
|
4535
5081
|
if (parts.length > 1) {
|
|
4536
5082
|
parts.shift();
|
|
4537
5083
|
}
|
|
4538
|
-
return
|
|
5084
|
+
return commandTelemetryName(parts);
|
|
4539
5085
|
}
|
|
4540
5086
|
function isCliErrorCode(value) {
|
|
4541
5087
|
return typeof value === "string" && cliErrorCodeValues.has(value);
|
|
@@ -4575,79 +5121,80 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
4575
5121
|
});
|
|
4576
5122
|
const telemetryName = deriveCommandPath(command);
|
|
4577
5123
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
4578
|
-
|
|
4579
|
-
const
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
5124
|
+
markCommandStart();
|
|
5125
|
+
const supplied = recordSuppliedArgumentValues(withheldArgumentValues(command));
|
|
5126
|
+
try {
|
|
5127
|
+
const startTime = performance.now();
|
|
5128
|
+
let errorMessage;
|
|
5129
|
+
let fallbackExitCode = EXIT_CODES.Success;
|
|
5130
|
+
clearRecordedCommandFailureTelemetry();
|
|
5131
|
+
const [error] = await catchError(ensureInvocationRequestScope(() => {
|
|
5132
|
+
const violation = implicitLimitViolation(command);
|
|
5133
|
+
if (violation) {
|
|
5134
|
+
return Promise.reject(violation);
|
|
5135
|
+
}
|
|
5136
|
+
return fn(...args);
|
|
5137
|
+
}));
|
|
5138
|
+
if (error) {
|
|
5139
|
+
errorMessage = error instanceof Error ? error.message : String(error);
|
|
5140
|
+
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
5141
|
+
const typed = error;
|
|
5142
|
+
const customInstructions = typeof typed.instructions === "string" ? typed.instructions : undefined;
|
|
5143
|
+
const customResult = typeof typed.result === "string" && typed.result !== RESULTS.Success && Object.values(RESULTS).includes(typed.result) ? typed.result : undefined;
|
|
5144
|
+
const finalResult = customResult ?? RESULTS.Failure;
|
|
5145
|
+
const typedErrorCode = typed.errorCode ?? typed.ErrorCode;
|
|
5146
|
+
const customErrorCode = isCliErrorCode(typedErrorCode) ? typedErrorCode : undefined;
|
|
5147
|
+
const typedRetry = typed.retry ?? typed.Retry;
|
|
5148
|
+
const customRetry = isRetryHint(typedRetry) ? typedRetry : undefined;
|
|
5149
|
+
const typedContext = typed.context ?? typed.Context;
|
|
5150
|
+
const customContext = isErrorContext(typedContext) ? typedContext : undefined;
|
|
5151
|
+
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
5152
|
+
fallbackExitCode = cancellationExitCode ?? EXIT_CODES[finalResult];
|
|
5153
|
+
OutputFormatter.error({
|
|
5154
|
+
Result: finalResult,
|
|
5155
|
+
...customErrorCode ? { ErrorCode: customErrorCode } : {},
|
|
5156
|
+
Message: errorMessage,
|
|
5157
|
+
Instructions: customInstructions ?? commandHelpHint(telemetryName),
|
|
5158
|
+
...customRetry ? { Retry: customRetry } : {},
|
|
5159
|
+
...customContext ? { Context: customContext } : {}
|
|
5160
|
+
});
|
|
5161
|
+
context.exit(fallbackExitCode);
|
|
5162
|
+
}
|
|
5163
|
+
const durationMs = performance.now() - startTime;
|
|
5164
|
+
recordCommandDuration(durationMs);
|
|
5165
|
+
const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess(fallbackExitCode);
|
|
5166
|
+
const recordedFailure = takeRecordedCommandFailureTelemetry();
|
|
5167
|
+
const success = !error && exitCode === 0;
|
|
5168
|
+
const terminalTelemetry = buildCommandTerminalTelemetryProperties({
|
|
5169
|
+
error,
|
|
5170
|
+
exitCode,
|
|
5171
|
+
recordedFailure,
|
|
5172
|
+
pollSignal: context.pollSignal
|
|
4612
5173
|
});
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
}
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
4635
|
-
command: "true",
|
|
4636
|
-
...terminalTelemetry,
|
|
4637
|
-
...errorMessage ? { errorMessage } : {}
|
|
4638
|
-
});
|
|
4639
|
-
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
5174
|
+
if (terminalTelemetry.error_class === "internal" && error) {
|
|
5175
|
+
telemetry.trackException(error instanceof Error ? error : new Error(String(error)), { command_name: telemetryName }, getInvocationRequestContext());
|
|
5176
|
+
}
|
|
5177
|
+
const commandParams = extractCommandParams(command);
|
|
5178
|
+
if (props) {
|
|
5179
|
+
for (const key of Object.keys(props)) {
|
|
5180
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
5181
|
+
}
|
|
5182
|
+
}
|
|
5183
|
+
const baseProperties = redactProperties({
|
|
5184
|
+
...commandParams,
|
|
5185
|
+
...props,
|
|
5186
|
+
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
5187
|
+
command: "true",
|
|
5188
|
+
...terminalTelemetry,
|
|
5189
|
+
...errorMessage ? { errorMessage } : {}
|
|
5190
|
+
});
|
|
5191
|
+
emitInvocationRequest(telemetryName, success, baseProperties);
|
|
5192
|
+
} finally {
|
|
5193
|
+
releaseSuppliedArgumentValues(supplied);
|
|
5194
|
+
}
|
|
4640
5195
|
});
|
|
4641
5196
|
};
|
|
4642
|
-
|
|
4643
|
-
var COMPLETER_SYMBOL = Symbol.for("@uipath/common/completer");
|
|
4644
|
-
// ../common/src/console-guard.ts
|
|
4645
|
-
var guardInstalledSlot = singleton("ConsoleGuardInstalled");
|
|
4646
|
-
var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
|
|
4647
|
-
// ../common/src/constants.ts
|
|
4648
|
-
var UIPATH_HOME_DIR = ".uipath";
|
|
4649
|
-
var DEFAULT_PAGE_SIZE = 50;
|
|
4650
|
-
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
5197
|
+
|
|
4651
5198
|
// ../common/src/content-hash.ts
|
|
4652
5199
|
function isBrowserRuntime() {
|
|
4653
5200
|
const runtime = globalThis;
|
|
@@ -4657,8 +5204,8 @@ async function hashContent(content) {
|
|
|
4657
5204
|
const encoder = new TextEncoder;
|
|
4658
5205
|
const bytes = encoder.encode(content);
|
|
4659
5206
|
if (globalThis.crypto?.subtle) {
|
|
4660
|
-
const
|
|
4661
|
-
return Array.from(new Uint8Array(
|
|
5207
|
+
const digest2 = await globalThis.crypto.subtle.digest("SHA-256", bytes);
|
|
5208
|
+
return Array.from(new Uint8Array(digest2), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
4662
5209
|
}
|
|
4663
5210
|
if (!isBrowserRuntime()) {
|
|
4664
5211
|
const crypto2 = await import("node:crypto");
|
|
@@ -4666,121 +5213,7 @@ async function hashContent(content) {
|
|
|
4666
5213
|
}
|
|
4667
5214
|
throw new Error("Unable to compute SHA-256 hash in this environment.");
|
|
4668
5215
|
}
|
|
4669
|
-
|
|
4670
|
-
function extractHttpStatus(err) {
|
|
4671
|
-
if (!err || typeof err !== "object")
|
|
4672
|
-
return;
|
|
4673
|
-
const e = err;
|
|
4674
|
-
const structured = e.response?.status ?? e.status ?? e.statusCode;
|
|
4675
|
-
if (structured !== undefined)
|
|
4676
|
-
return structured;
|
|
4677
|
-
return typeof e.message === "string" ? parseHttpStatusFromMessage(e.message) : undefined;
|
|
4678
|
-
}
|
|
4679
|
-
var GENERIC = "Check authentication and parameters";
|
|
4680
|
-
function instructionsFor(ctx, err) {
|
|
4681
|
-
switch (ctx) {
|
|
4682
|
-
case "auth":
|
|
4683
|
-
return "Run 'uip login' to authenticate. To inspect the current session, run 'uip whoami'.";
|
|
4684
|
-
case "identity":
|
|
4685
|
-
return "Select an active tenant with 'uip login tenant set <tenant>' and ensure your login includes an organization";
|
|
4686
|
-
case "input-parse":
|
|
4687
|
-
return "Ensure --inputs is valid JSON or pipe JSON via stdin";
|
|
4688
|
-
case "input-validate":
|
|
4689
|
-
return "Fix the flagged input fields to match the process's input schema";
|
|
4690
|
-
case "flag-format":
|
|
4691
|
-
return "Check the flag value format — see --help for the expected shape";
|
|
4692
|
-
case "permissions":
|
|
4693
|
-
return "Confirm your user has the required permissions in this folder/tenant, or re-authenticate with 'uip login' if your session has lapsed";
|
|
4694
|
-
case "backend": {
|
|
4695
|
-
const status = extractHttpStatus(err);
|
|
4696
|
-
if (status === 401) {
|
|
4697
|
-
return "Re-authenticate with 'uip login' — your session is invalid or expired";
|
|
4698
|
-
}
|
|
4699
|
-
if (status === 403) {
|
|
4700
|
-
return "Confirm your user has access to the folder and the required permissions";
|
|
4701
|
-
}
|
|
4702
|
-
if (status === 404) {
|
|
4703
|
-
return "Verify the resource exists in the current folder/tenant";
|
|
4704
|
-
}
|
|
4705
|
-
if (status === 400) {
|
|
4706
|
-
return "Request was rejected — check flag values and inputs";
|
|
4707
|
-
}
|
|
4708
|
-
if (status !== undefined && status >= 500 && status < 600) {
|
|
4709
|
-
return "Orchestrator returned a server error — retry; if it persists, check service status";
|
|
4710
|
-
}
|
|
4711
|
-
const permission = describePermissionError(err);
|
|
4712
|
-
if (permission) {
|
|
4713
|
-
return permission.instructions;
|
|
4714
|
-
}
|
|
4715
|
-
const connectivity = describeConnectivityError(err);
|
|
4716
|
-
if (connectivity) {
|
|
4717
|
-
return connectivity.instructions;
|
|
4718
|
-
}
|
|
4719
|
-
return GENERIC;
|
|
4720
|
-
}
|
|
4721
|
-
}
|
|
4722
|
-
}
|
|
4723
|
-
// ../common/src/guid.ts
|
|
4724
|
-
var GUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
4725
|
-
function isGuid(value) {
|
|
4726
|
-
return GUID_REGEX.test(value);
|
|
4727
|
-
}
|
|
4728
|
-
// ../common/src/host-global-options.ts
|
|
4729
|
-
var HOST_GLOBAL_OPTIONS_WITH_VALUE = [
|
|
4730
|
-
"--output",
|
|
4731
|
-
"--output-filter",
|
|
4732
|
-
"--log-level",
|
|
4733
|
-
"--log-file",
|
|
4734
|
-
"--profile"
|
|
4735
|
-
];
|
|
4736
|
-
var HOST_GLOBAL_FLAGS = [
|
|
4737
|
-
"--json",
|
|
4738
|
-
"--interactive",
|
|
4739
|
-
"--no-interactive"
|
|
4740
|
-
];
|
|
4741
|
-
var VALUE_OPTIONS = new Set(HOST_GLOBAL_OPTIONS_WITH_VALUE);
|
|
4742
|
-
var BOOLEAN_FLAGS = new Set(HOST_GLOBAL_FLAGS);
|
|
4743
|
-
// ../common/src/interactivity-context.ts
|
|
4744
|
-
var modeSlot = singleton("InteractivityMode");
|
|
4745
|
-
var interactiveFlagSlot = singleton("InteractiveFlag");
|
|
4746
|
-
// ../common/src/option-aliases.ts
|
|
4747
|
-
function warnDeprecatedOptionAlias(deprecatedFlag, preferredFlag) {
|
|
4748
|
-
getOutputSink().writeErr(`[WARN] ${deprecatedFlag} is deprecated. Use ${preferredFlag} instead.
|
|
4749
|
-
`);
|
|
4750
|
-
}
|
|
4751
|
-
var TENANT_SWITCH_COMMAND = "uip login tenant set <tenant>";
|
|
4752
|
-
function createHiddenDeprecatedTenantOption(flags = "-t, --tenant <tenant-name>") {
|
|
4753
|
-
return new Option(flags, `Tenant name. Deprecated; use ${TENANT_SWITCH_COMMAND} to switch active tenants.`).hideHelp().argParser((tenant) => {
|
|
4754
|
-
warnDeprecatedTenantOption(tenant);
|
|
4755
|
-
return tenant;
|
|
4756
|
-
});
|
|
4757
|
-
}
|
|
4758
|
-
function warnDeprecatedTenantOption(tenant) {
|
|
4759
|
-
if (tenant === undefined)
|
|
4760
|
-
return;
|
|
4761
|
-
warnDeprecatedOptionAlias("--tenant", TENANT_SWITCH_COMMAND);
|
|
4762
|
-
}
|
|
4763
|
-
// ../common/src/option-validators.ts
|
|
4764
|
-
function parseLimit(raw, _previous) {
|
|
4765
|
-
return parseBoundedInt(raw, "--limit", { min: 1, max: 1e4 });
|
|
4766
|
-
}
|
|
4767
|
-
function parseOffset(raw, _previous) {
|
|
4768
|
-
return parseBoundedInt(raw, "--offset", { min: 0, max: 1e6 });
|
|
4769
|
-
}
|
|
4770
|
-
function parseBoundedInt(raw, optionName, bounds) {
|
|
4771
|
-
const normalized = raw.trim();
|
|
4772
|
-
if (normalized === "") {
|
|
4773
|
-
throw new InvalidArgumentError(`${optionName} requires a value (got empty).`);
|
|
4774
|
-
}
|
|
4775
|
-
if (!/^-?\d+$/.test(normalized)) {
|
|
4776
|
-
throw new InvalidArgumentError(`${optionName} must be an integer, got '${normalized}'.`);
|
|
4777
|
-
}
|
|
4778
|
-
const n = parseInt(normalized, 10);
|
|
4779
|
-
if (n < bounds.min || n > bounds.max) {
|
|
4780
|
-
throw new InvalidArgumentError(`${optionName} must be between ${bounds.min} and ${bounds.max}, got ${n}.`);
|
|
4781
|
-
}
|
|
4782
|
-
return n;
|
|
4783
|
-
}
|
|
5216
|
+
|
|
4784
5217
|
// ../common/src/package-metadata-options.ts
|
|
4785
5218
|
function registerPackageMetadataOptions(command) {
|
|
4786
5219
|
return command.option("--author <author>", "Package author").option("--description <text>", "Package description").option("--repository-url <url>", "Source repository URL (recorded in the package for traceability)").option("--repository-commit <sha>", "Source repository commit hash (recorded in the package for traceability)").option("--repository-branch <branch>", "Source repository branch").option("--repository-type <type>", "Source repository type (defaults to 'git' when --repository-url is set)").option("--release-notes <text>", "Release notes for the package").option("--project-url <url>", "Automation Hub idea URL");
|
|
@@ -4808,6 +5241,7 @@ function mapPackageMetadataOptions(opts) {
|
|
|
4808
5241
|
}
|
|
4809
5242
|
return fields;
|
|
4810
5243
|
}
|
|
5244
|
+
|
|
4811
5245
|
// ../common/src/polling/format-utils.ts
|
|
4812
5246
|
function msToDuration(ms) {
|
|
4813
5247
|
if (!Number.isFinite(ms) || ms < 0) {
|
|
@@ -4819,6 +5253,7 @@ function msToDuration(ms) {
|
|
|
4819
5253
|
const s = totalSec % 60;
|
|
4820
5254
|
return [h, m, s].map((v) => String(v).padStart(2, "0")).join(":");
|
|
4821
5255
|
}
|
|
5256
|
+
|
|
4822
5257
|
// ../common/src/polling/types.ts
|
|
4823
5258
|
var PollOutcome = {
|
|
4824
5259
|
Completed: "completed",
|
|
@@ -4845,13 +5280,6 @@ var BACKOFF_DEFAULTS = {
|
|
|
4845
5280
|
};
|
|
4846
5281
|
var MIN_INTERVAL_MS = 100;
|
|
4847
5282
|
|
|
4848
|
-
// ../common/src/polling/poll-failure-mapping.ts
|
|
4849
|
-
var REASON_BY_OUTCOME = {
|
|
4850
|
-
[PollOutcome.Timeout]: "poll_timeout",
|
|
4851
|
-
[PollOutcome.Failed]: "poll_failed",
|
|
4852
|
-
[PollOutcome.Interrupted]: "poll_failed",
|
|
4853
|
-
[PollOutcome.Aborted]: "poll_aborted"
|
|
4854
|
-
};
|
|
4855
5283
|
// ../common/src/polling/poll-until.ts
|
|
4856
5284
|
function resolveIntervalFn(options) {
|
|
4857
5285
|
if (typeof options.intervalMs === "function") {
|
|
@@ -5232,6 +5660,7 @@ async function handleErrorAndSleep(error, source, cfg, state, ctx) {
|
|
|
5232
5660
|
await doSleep(computeErrorSleepMs(cfg, state, ctx), cfg);
|
|
5233
5661
|
return;
|
|
5234
5662
|
}
|
|
5663
|
+
|
|
5235
5664
|
// ../common/src/polling/terminal-statuses.ts
|
|
5236
5665
|
var TERMINAL_STATUSES = new Set([
|
|
5237
5666
|
"completed",
|
|
@@ -5262,6 +5691,418 @@ function isFailureStatus(status) {
|
|
|
5262
5691
|
}
|
|
5263
5692
|
return FAILURE_STATUSES.has(status.toLowerCase());
|
|
5264
5693
|
}
|
|
5694
|
+
// ../common/src/polling/poll-failure-mapping.ts
|
|
5695
|
+
var REASON_BY_OUTCOME = {
|
|
5696
|
+
[PollOutcome.Timeout]: "poll_timeout",
|
|
5697
|
+
[PollOutcome.Failed]: "poll_failed",
|
|
5698
|
+
[PollOutcome.Interrupted]: "poll_failed",
|
|
5699
|
+
[PollOutcome.Aborted]: "poll_aborted"
|
|
5700
|
+
};
|
|
5701
|
+
// ../common/src/stdin.ts
|
|
5702
|
+
async function readStdin() {
|
|
5703
|
+
if (process.stdin.isTTY) {
|
|
5704
|
+
return null;
|
|
5705
|
+
}
|
|
5706
|
+
return new Promise((resolve, reject) => {
|
|
5707
|
+
let data = "";
|
|
5708
|
+
process.stdin.setEncoding("utf8");
|
|
5709
|
+
process.stdin.on("data", (chunk) => {
|
|
5710
|
+
data += chunk;
|
|
5711
|
+
});
|
|
5712
|
+
process.stdin.on("end", () => resolve(data.trim() || null));
|
|
5713
|
+
process.stdin.on("error", reject);
|
|
5714
|
+
});
|
|
5715
|
+
}
|
|
5716
|
+
|
|
5717
|
+
// ../common/src/attachment-binding.ts
|
|
5718
|
+
function appendOption(value, previous) {
|
|
5719
|
+
return [...previous ?? [], value];
|
|
5720
|
+
}
|
|
5721
|
+
var ATTACHMENT_INSTRUCTIONS = "Provide --attachment as 'name=path' where 'name' matches a file-typed workflow input variable and 'path' points at a readable local file. Repeat the flag to attach multiple files.";
|
|
5722
|
+
var ATTACHMENT_UPLOAD_INSTRUCTIONS = "Check that the active tenant has Orchestrator access and the file is readable, then retry.";
|
|
5723
|
+
function parseAttachmentSpec(spec) {
|
|
5724
|
+
const eq = spec.indexOf("=");
|
|
5725
|
+
if (eq <= 0) {
|
|
5726
|
+
throw new Error(`Invalid --attachment format: '${spec}'. Expected 'name=path' where name matches a file-typed workflow input variable.`);
|
|
5727
|
+
}
|
|
5728
|
+
const name = spec.substring(0, eq);
|
|
5729
|
+
const path = spec.substring(eq + 1);
|
|
5730
|
+
if (!name || !path) {
|
|
5731
|
+
throw new Error(`Invalid --attachment format: '${spec}'. Expected 'name=path' with non-empty name and path.`);
|
|
5732
|
+
}
|
|
5733
|
+
return { name, path };
|
|
5734
|
+
}
|
|
5735
|
+
async function resolveAttachmentInputs(specs, upload) {
|
|
5736
|
+
const fs = getFileSystem();
|
|
5737
|
+
const prepared = await Promise.all(specs.map(async (spec) => {
|
|
5738
|
+
const bytes = await fs.readFile(spec.path).catch(async (err) => {
|
|
5739
|
+
throw new Error(`Cannot read --attachment '${spec.path}' for variable '${spec.name}': ${await extractErrorMessage(err)}`);
|
|
5740
|
+
});
|
|
5741
|
+
if (bytes === null) {
|
|
5742
|
+
throw new Error(`--attachment '${spec.path}' for variable '${spec.name}' is empty or could not be read.`);
|
|
5743
|
+
}
|
|
5744
|
+
return {
|
|
5745
|
+
...spec,
|
|
5746
|
+
bytes,
|
|
5747
|
+
fileName: fs.path.basename(spec.path)
|
|
5748
|
+
};
|
|
5749
|
+
}));
|
|
5750
|
+
return Promise.all(prepared.map(async (p) => {
|
|
5751
|
+
const reference = await upload(p.bytes, p.fileName).catch(async (err) => {
|
|
5752
|
+
throw new Error(`Failed to upload --attachment '${p.path}' for variable '${p.name}': ${await extractErrorMessage(err)}`);
|
|
5753
|
+
});
|
|
5754
|
+
return { name: p.name, path: p.path, reference };
|
|
5755
|
+
}));
|
|
5756
|
+
}
|
|
5757
|
+
// ../common/src/classified-failure.ts
|
|
5758
|
+
var MAX_QUOTED_BODY_CHARS = 200;
|
|
5759
|
+
function summarizePlatformBody(body) {
|
|
5760
|
+
const trimmed = body.trim().replace(/\s+/g, " ");
|
|
5761
|
+
return trimmed.length > MAX_QUOTED_BODY_CHARS ? `${trimmed.slice(0, MAX_QUOTED_BODY_CHARS)}…` : trimmed;
|
|
5762
|
+
}
|
|
5763
|
+
// ../common/src/command-examples.ts
|
|
5764
|
+
var examplesByCommand = new WeakMap;
|
|
5765
|
+
Command.prototype.examples = function(examples) {
|
|
5766
|
+
examplesByCommand.set(this, examples);
|
|
5767
|
+
return this;
|
|
5768
|
+
};
|
|
5769
|
+
// ../common/src/completer.ts
|
|
5770
|
+
var COMPLETER_SYMBOL = Symbol.for("@uipath/common/completer");
|
|
5771
|
+
// ../common/src/console-guard.ts
|
|
5772
|
+
var guardInstalledSlot = singleton("ConsoleGuardInstalled");
|
|
5773
|
+
var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
|
|
5774
|
+
// ../common/src/constants.ts
|
|
5775
|
+
var UIPATH_HOME_DIR = ".uipath";
|
|
5776
|
+
var DEFAULT_PAGE_SIZE = 50;
|
|
5777
|
+
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
5778
|
+
// ../common/src/entity-name-rules.ts
|
|
5779
|
+
var RESERVED_SQL_KEYWORDS_LOWER = new Set(["group", "order"]);
|
|
5780
|
+
var RESERVED_FIELD_NAMES_LOWER = new Set([
|
|
5781
|
+
"id",
|
|
5782
|
+
"createdby",
|
|
5783
|
+
"createtime",
|
|
5784
|
+
"updatedby",
|
|
5785
|
+
"updatetime",
|
|
5786
|
+
"recordowner",
|
|
5787
|
+
"version"
|
|
5788
|
+
]);
|
|
5789
|
+
var RESERVED_KEYWORDS_LOWER = new Set([
|
|
5790
|
+
"abstract",
|
|
5791
|
+
"as",
|
|
5792
|
+
"base",
|
|
5793
|
+
"bool",
|
|
5794
|
+
"break",
|
|
5795
|
+
"byte",
|
|
5796
|
+
"case",
|
|
5797
|
+
"catch",
|
|
5798
|
+
"char",
|
|
5799
|
+
"checked",
|
|
5800
|
+
"class",
|
|
5801
|
+
"const",
|
|
5802
|
+
"continue",
|
|
5803
|
+
"decimal",
|
|
5804
|
+
"default",
|
|
5805
|
+
"delegate",
|
|
5806
|
+
"do",
|
|
5807
|
+
"double",
|
|
5808
|
+
"else",
|
|
5809
|
+
"enum",
|
|
5810
|
+
"event",
|
|
5811
|
+
"explicit",
|
|
5812
|
+
"extern",
|
|
5813
|
+
"false",
|
|
5814
|
+
"finally",
|
|
5815
|
+
"fixed",
|
|
5816
|
+
"float",
|
|
5817
|
+
"for",
|
|
5818
|
+
"foreach",
|
|
5819
|
+
"goto",
|
|
5820
|
+
"if",
|
|
5821
|
+
"implicit",
|
|
5822
|
+
"in",
|
|
5823
|
+
"int",
|
|
5824
|
+
"interface",
|
|
5825
|
+
"internal",
|
|
5826
|
+
"is",
|
|
5827
|
+
"lock",
|
|
5828
|
+
"long",
|
|
5829
|
+
"namespace",
|
|
5830
|
+
"new",
|
|
5831
|
+
"null",
|
|
5832
|
+
"object",
|
|
5833
|
+
"operator",
|
|
5834
|
+
"out",
|
|
5835
|
+
"override",
|
|
5836
|
+
"params",
|
|
5837
|
+
"private",
|
|
5838
|
+
"protected",
|
|
5839
|
+
"public",
|
|
5840
|
+
"readonly",
|
|
5841
|
+
"ref",
|
|
5842
|
+
"return",
|
|
5843
|
+
"sbyte",
|
|
5844
|
+
"sealed",
|
|
5845
|
+
"short",
|
|
5846
|
+
"sizeof",
|
|
5847
|
+
"stackalloc",
|
|
5848
|
+
"static",
|
|
5849
|
+
"string",
|
|
5850
|
+
"struct",
|
|
5851
|
+
"switch",
|
|
5852
|
+
"this",
|
|
5853
|
+
"throw",
|
|
5854
|
+
"true",
|
|
5855
|
+
"try",
|
|
5856
|
+
"typeof",
|
|
5857
|
+
"uint",
|
|
5858
|
+
"ulong",
|
|
5859
|
+
"unchecked",
|
|
5860
|
+
"unsafe",
|
|
5861
|
+
"ushort",
|
|
5862
|
+
"using",
|
|
5863
|
+
"virtual",
|
|
5864
|
+
"void",
|
|
5865
|
+
"volatile",
|
|
5866
|
+
"while",
|
|
5867
|
+
"addhandler",
|
|
5868
|
+
"addressof",
|
|
5869
|
+
"alias",
|
|
5870
|
+
"and",
|
|
5871
|
+
"andalso",
|
|
5872
|
+
"boolean",
|
|
5873
|
+
"byref",
|
|
5874
|
+
"byval",
|
|
5875
|
+
"call",
|
|
5876
|
+
"cbool",
|
|
5877
|
+
"cbyte",
|
|
5878
|
+
"cchar",
|
|
5879
|
+
"cdate",
|
|
5880
|
+
"cdbl",
|
|
5881
|
+
"cdec",
|
|
5882
|
+
"cint",
|
|
5883
|
+
"clng",
|
|
5884
|
+
"cobj",
|
|
5885
|
+
"csbyte",
|
|
5886
|
+
"cshort",
|
|
5887
|
+
"csng",
|
|
5888
|
+
"cstr",
|
|
5889
|
+
"ctype",
|
|
5890
|
+
"cuint",
|
|
5891
|
+
"culng",
|
|
5892
|
+
"cushort",
|
|
5893
|
+
"date",
|
|
5894
|
+
"declare",
|
|
5895
|
+
"dim",
|
|
5896
|
+
"directcast",
|
|
5897
|
+
"each",
|
|
5898
|
+
"elseif",
|
|
5899
|
+
"end",
|
|
5900
|
+
"endif",
|
|
5901
|
+
"erase",
|
|
5902
|
+
"error",
|
|
5903
|
+
"exit",
|
|
5904
|
+
"friend",
|
|
5905
|
+
"function",
|
|
5906
|
+
"get",
|
|
5907
|
+
"gettype",
|
|
5908
|
+
"getxmlnamespace",
|
|
5909
|
+
"global",
|
|
5910
|
+
"gosub",
|
|
5911
|
+
"goto",
|
|
5912
|
+
"handles",
|
|
5913
|
+
"implements",
|
|
5914
|
+
"imports",
|
|
5915
|
+
"inherits",
|
|
5916
|
+
"integer",
|
|
5917
|
+
"isnot",
|
|
5918
|
+
"let",
|
|
5919
|
+
"lib",
|
|
5920
|
+
"like",
|
|
5921
|
+
"loop",
|
|
5922
|
+
"me",
|
|
5923
|
+
"mod",
|
|
5924
|
+
"module",
|
|
5925
|
+
"mustinherit",
|
|
5926
|
+
"mustoverride",
|
|
5927
|
+
"mybase",
|
|
5928
|
+
"myclass",
|
|
5929
|
+
"narrowing",
|
|
5930
|
+
"next",
|
|
5931
|
+
"not",
|
|
5932
|
+
"nothing",
|
|
5933
|
+
"notinheritable",
|
|
5934
|
+
"notoverridable",
|
|
5935
|
+
"of",
|
|
5936
|
+
"on",
|
|
5937
|
+
"option",
|
|
5938
|
+
"optional",
|
|
5939
|
+
"or",
|
|
5940
|
+
"orelse",
|
|
5941
|
+
"overloads",
|
|
5942
|
+
"overridable",
|
|
5943
|
+
"overrides",
|
|
5944
|
+
"paramarray",
|
|
5945
|
+
"partial",
|
|
5946
|
+
"property",
|
|
5947
|
+
"raiseevent",
|
|
5948
|
+
"redim",
|
|
5949
|
+
"rem",
|
|
5950
|
+
"removehandler",
|
|
5951
|
+
"resume",
|
|
5952
|
+
"select",
|
|
5953
|
+
"set",
|
|
5954
|
+
"shadows",
|
|
5955
|
+
"shared",
|
|
5956
|
+
"single",
|
|
5957
|
+
"step",
|
|
5958
|
+
"stop",
|
|
5959
|
+
"structure",
|
|
5960
|
+
"sub",
|
|
5961
|
+
"synclock",
|
|
5962
|
+
"then",
|
|
5963
|
+
"to",
|
|
5964
|
+
"trycast",
|
|
5965
|
+
"uinteger",
|
|
5966
|
+
"ushort",
|
|
5967
|
+
"variant",
|
|
5968
|
+
"wend",
|
|
5969
|
+
"when",
|
|
5970
|
+
"widening",
|
|
5971
|
+
"with",
|
|
5972
|
+
"withevents",
|
|
5973
|
+
"writeonly",
|
|
5974
|
+
"xor"
|
|
5975
|
+
]);
|
|
5976
|
+
// ../common/src/error-instructions.ts
|
|
5977
|
+
function extractHttpStatus(err) {
|
|
5978
|
+
if (!err || typeof err !== "object")
|
|
5979
|
+
return;
|
|
5980
|
+
const e = err;
|
|
5981
|
+
const structured = e.response?.status ?? e.status ?? e.statusCode;
|
|
5982
|
+
if (structured !== undefined)
|
|
5983
|
+
return structured;
|
|
5984
|
+
return typeof e.message === "string" ? parseHttpStatusFromMessage(e.message) : undefined;
|
|
5985
|
+
}
|
|
5986
|
+
var GENERIC = "Check authentication and parameters";
|
|
5987
|
+
function instructionsFor(ctx, err) {
|
|
5988
|
+
switch (ctx) {
|
|
5989
|
+
case "auth":
|
|
5990
|
+
return "Run 'uip login' to authenticate. To inspect the current session, run 'uip whoami'.";
|
|
5991
|
+
case "identity":
|
|
5992
|
+
return "Select an active tenant with 'uip login tenant set <tenant>' and ensure your login includes an organization";
|
|
5993
|
+
case "input-parse":
|
|
5994
|
+
return "Ensure --inputs is valid JSON or pipe JSON via stdin";
|
|
5995
|
+
case "input-validate":
|
|
5996
|
+
return "Fix the flagged input fields to match the process's input schema";
|
|
5997
|
+
case "flag-format":
|
|
5998
|
+
return "Check the flag value format — see --help for the expected shape";
|
|
5999
|
+
case "permissions":
|
|
6000
|
+
return "Confirm your user has the required permissions in this folder/tenant, or re-authenticate with 'uip login' if your session has lapsed";
|
|
6001
|
+
case "backend": {
|
|
6002
|
+
const status = extractHttpStatus(err);
|
|
6003
|
+
if (status === 401) {
|
|
6004
|
+
return "Re-authenticate with 'uip login' — your session is invalid or expired";
|
|
6005
|
+
}
|
|
6006
|
+
if (status === 403) {
|
|
6007
|
+
return "Confirm your user has access to the resource, and the required permissions in this folder or tenant";
|
|
6008
|
+
}
|
|
6009
|
+
if (status === 404) {
|
|
6010
|
+
return "Verify the resource exists in the current folder/tenant";
|
|
6011
|
+
}
|
|
6012
|
+
if (status === 400 || status === 422) {
|
|
6013
|
+
return "Request was rejected — check flag values and inputs";
|
|
6014
|
+
}
|
|
6015
|
+
if (status === 405) {
|
|
6016
|
+
return "Check the command name and the base URL in use — the endpoint may not exist";
|
|
6017
|
+
}
|
|
6018
|
+
if (status === 408) {
|
|
6019
|
+
return "The request timed out — retry; if it persists, narrow the request (e.g. --limit on list commands)";
|
|
6020
|
+
}
|
|
6021
|
+
if (status === 409) {
|
|
6022
|
+
return "The resource already exists, or changed since it was read — list it to see the current state";
|
|
6023
|
+
}
|
|
6024
|
+
if (status === 413) {
|
|
6025
|
+
return "The upload is over the size limit — exclude unused dependencies or drop large files, then retry";
|
|
6026
|
+
}
|
|
6027
|
+
if (status === 429) {
|
|
6028
|
+
return "Rate limit reached — wait and retry; when the service suggests a delay, Retry and Context.retryAfter carry it";
|
|
6029
|
+
}
|
|
6030
|
+
if (status !== undefined && status >= 500 && status < 600) {
|
|
6031
|
+
return "The service returned a server error — retry; if it persists, check service status";
|
|
6032
|
+
}
|
|
6033
|
+
const permission = describePermissionError(err);
|
|
6034
|
+
if (permission) {
|
|
6035
|
+
return permission.instructions;
|
|
6036
|
+
}
|
|
6037
|
+
const connectivity = describeConnectivityError(err);
|
|
6038
|
+
if (connectivity) {
|
|
6039
|
+
return connectivity.instructions;
|
|
6040
|
+
}
|
|
6041
|
+
return GENERIC;
|
|
6042
|
+
}
|
|
6043
|
+
}
|
|
6044
|
+
}
|
|
6045
|
+
// ../common/src/guid.ts
|
|
6046
|
+
var GUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
6047
|
+
function isGuid(value) {
|
|
6048
|
+
return GUID_REGEX.test(value);
|
|
6049
|
+
}
|
|
6050
|
+
// ../common/src/host-global-options.ts
|
|
6051
|
+
var HOST_GLOBAL_OPTIONS_WITH_VALUE = [
|
|
6052
|
+
"--output",
|
|
6053
|
+
"--output-filter",
|
|
6054
|
+
"--log-level",
|
|
6055
|
+
"--log-file",
|
|
6056
|
+
"--profile"
|
|
6057
|
+
];
|
|
6058
|
+
var HOST_GLOBAL_FLAGS = [
|
|
6059
|
+
"--json",
|
|
6060
|
+
"--interactive",
|
|
6061
|
+
"--no-interactive"
|
|
6062
|
+
];
|
|
6063
|
+
var VALUE_OPTIONS = new Set(HOST_GLOBAL_OPTIONS_WITH_VALUE);
|
|
6064
|
+
var BOOLEAN_FLAGS = new Set(HOST_GLOBAL_FLAGS);
|
|
6065
|
+
// ../common/src/interactivity-context.ts
|
|
6066
|
+
var modeSlot = singleton("InteractivityMode");
|
|
6067
|
+
var interactiveFlagSlot = singleton("InteractiveFlag");
|
|
6068
|
+
// ../common/src/option-aliases.ts
|
|
6069
|
+
function warnDeprecatedOptionAlias(deprecatedFlag, preferredFlag) {
|
|
6070
|
+
getOutputSink().writeErr(`[WARN] ${deprecatedFlag} is deprecated. Use ${preferredFlag} instead.
|
|
6071
|
+
`);
|
|
6072
|
+
}
|
|
6073
|
+
var TENANT_SWITCH_COMMAND = "uip login tenant set <tenant>";
|
|
6074
|
+
function createHiddenDeprecatedTenantOption(flags = "-t, --tenant <tenant-name>") {
|
|
6075
|
+
return new Option(flags, `Tenant name. Deprecated; use ${TENANT_SWITCH_COMMAND} to switch active tenants.`).hideHelp().argParser((tenant) => {
|
|
6076
|
+
warnDeprecatedTenantOption(tenant);
|
|
6077
|
+
return tenant;
|
|
6078
|
+
});
|
|
6079
|
+
}
|
|
6080
|
+
function warnDeprecatedTenantOption(tenant) {
|
|
6081
|
+
if (tenant === undefined)
|
|
6082
|
+
return;
|
|
6083
|
+
warnDeprecatedOptionAlias("--tenant", TENANT_SWITCH_COMMAND);
|
|
6084
|
+
}
|
|
6085
|
+
// ../common/src/option-validators.ts
|
|
6086
|
+
function parseLimit(raw, _previous) {
|
|
6087
|
+
return parseBoundedInt(raw, "--limit", { min: 1, max: 1e4 });
|
|
6088
|
+
}
|
|
6089
|
+
function parseOffset(raw, _previous) {
|
|
6090
|
+
return parseBoundedInt(raw, "--offset", { min: 0, max: 1e6 });
|
|
6091
|
+
}
|
|
6092
|
+
function parseBoundedInt(raw, optionName, bounds) {
|
|
6093
|
+
const normalized = raw.trim();
|
|
6094
|
+
if (normalized === "") {
|
|
6095
|
+
throw new InvalidArgumentError(`${optionName} requires a value (got empty).`);
|
|
6096
|
+
}
|
|
6097
|
+
if (!/^-?\d+$/.test(normalized)) {
|
|
6098
|
+
throw new InvalidArgumentError(`${optionName} must be an integer, got '${normalized}'.`);
|
|
6099
|
+
}
|
|
6100
|
+
const n = parseInt(normalized, 10);
|
|
6101
|
+
if (n < bounds.min || n > bounds.max) {
|
|
6102
|
+
throw new InvalidArgumentError(`${optionName} must be between ${bounds.min} and ${bounds.max}, got ${n}.`);
|
|
6103
|
+
}
|
|
6104
|
+
return n;
|
|
6105
|
+
}
|
|
5265
6106
|
// ../common/src/screen-logger.ts
|
|
5266
6107
|
var ScreenLogger;
|
|
5267
6108
|
((ScreenLogger) => {
|
|
@@ -5353,25 +6194,59 @@ function unsupportedSolutionProjectType(projectType) {
|
|
|
5353
6194
|
}
|
|
5354
6195
|
return projectType.toLowerCase() === "library" ? LIBRARY_NOT_A_PROJECT : null;
|
|
5355
6196
|
}
|
|
5356
|
-
// ../common/src/
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
6197
|
+
// ../common/src/telemetry/packaged-name.ts
|
|
6198
|
+
function splitPackagedName(packaged) {
|
|
6199
|
+
const separator = packaged.lastIndexOf("@");
|
|
6200
|
+
if (separator <= 0) {
|
|
6201
|
+
return { name: packaged };
|
|
5360
6202
|
}
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
process.stdin.on("data", (chunk) => {
|
|
5365
|
-
data += chunk;
|
|
5366
|
-
});
|
|
5367
|
-
process.stdin.on("end", () => resolve(data.trim() || null));
|
|
5368
|
-
process.stdin.on("error", reject);
|
|
5369
|
-
});
|
|
6203
|
+
const name = packaged.slice(0, separator);
|
|
6204
|
+
const version = packaged.slice(separator + 1);
|
|
6205
|
+
return version ? { name, version } : { name };
|
|
5370
6206
|
}
|
|
5371
6207
|
// ../common/src/telemetry/ship-succeeded.ts
|
|
5372
6208
|
var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
|
|
6209
|
+
function getShippedKeys() {
|
|
6210
|
+
const existing = shippedKeysSlot.get();
|
|
6211
|
+
if (existing) {
|
|
6212
|
+
return existing;
|
|
6213
|
+
}
|
|
6214
|
+
const keys = new Set;
|
|
6215
|
+
shippedKeysSlot.set(keys);
|
|
6216
|
+
return keys;
|
|
6217
|
+
}
|
|
6218
|
+
function dedupeKey(payload) {
|
|
6219
|
+
return [
|
|
6220
|
+
payload.command_name,
|
|
6221
|
+
payload.ship_kind,
|
|
6222
|
+
payload.target,
|
|
6223
|
+
payload.project_type,
|
|
6224
|
+
payload.artifact_correlation_key ?? payload.package_version_key ?? payload.deployment_key ?? payload.solution_id ?? payload.package_name ?? ""
|
|
6225
|
+
].join("|");
|
|
6226
|
+
}
|
|
6227
|
+
function withPseudonymizedIdentifiers(payload) {
|
|
6228
|
+
return {
|
|
6229
|
+
...payload,
|
|
6230
|
+
...payload.package_name === undefined ? {} : {
|
|
6231
|
+
package_name: `package#${pseudonymize(payload.package_name)}`
|
|
6232
|
+
},
|
|
6233
|
+
...payload.artifact_correlation_key === undefined ? {} : {
|
|
6234
|
+
artifact_correlation_key: `artifact#${pseudonymize(payload.artifact_correlation_key)}`
|
|
6235
|
+
}
|
|
6236
|
+
};
|
|
6237
|
+
}
|
|
6238
|
+
function trackShipSucceeded(payload) {
|
|
6239
|
+
const keys = getShippedKeys();
|
|
6240
|
+
const key = dedupeKey(payload);
|
|
6241
|
+
if (keys.has(key)) {
|
|
6242
|
+
return false;
|
|
6243
|
+
}
|
|
6244
|
+
keys.add(key);
|
|
6245
|
+
telemetry.trackEvent(CommonTelemetryEvents.ShipSucceeded, redactProperties(withPseudonymizedIdentifiers(payload)));
|
|
6246
|
+
return true;
|
|
6247
|
+
}
|
|
5373
6248
|
// ../common/src/tool-provider.ts
|
|
5374
6249
|
var factorySlot = singleton("PackagerFactoryProvider");
|
|
5375
|
-
export { catchError, extractErrorMessage, extractErrorMessageSync, appendOption, ATTACHMENT_INSTRUCTIONS, ATTACHMENT_UPLOAD_INSTRUCTIONS, parseAttachmentSpec, resolveAttachmentInputs,
|
|
6250
|
+
export { catchError, extractErrorMessage, extractErrorMessageSync, appendOption, ATTACHMENT_INSTRUCTIONS, ATTACHMENT_UPLOAD_INSTRUCTIONS, parseAttachmentSpec, resolveAttachmentInputs, logger, getOutputFormat, getOutputFormatExplicit, RESULTS, EXIT_CODES, Pagination, OutputFormatter, summarizePlatformBody, InvalidArgumentError, Command, isPreviewBuild, processContext, UIPATH_HOME_DIR, DEFAULT_PAGE_SIZE, hashContent, instructionsFor, isGuid, createHiddenDeprecatedTenantOption, parseLimit, parseOffset, parseBoundedInt, registerPackageMetadataOptions, mapPackageMetadataOptions, msToDuration, PollOutcome, ErrorDecision, MIN_INTERVAL_MS, pollUntil, isTerminalStatus, isFailureStatus, ScreenLogger, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, unsupportedSolutionProjectType, readStdin, splitPackagedName, trackShipSucceeded };
|
|
5376
6251
|
|
|
5377
|
-
//# debugId=
|
|
6252
|
+
//# debugId=D69DC188B195149264756E2164756E21
|