@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
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import {
|
|
2
|
+
regenerateBindingsFile
|
|
3
|
+
} from "./packager-tool-v86fdwvs.js";
|
|
4
|
+
import {
|
|
5
|
+
getConnectorInfo,
|
|
6
|
+
getNode,
|
|
7
|
+
isConnectorNode
|
|
8
|
+
} from "./packager-tool-v9psxdy5.js";
|
|
9
|
+
import {
|
|
10
|
+
isKnownSdkNodeType
|
|
11
|
+
} from "./packager-tool-7exrv6w7.js";
|
|
12
|
+
import {
|
|
13
|
+
readFlowWorkflow,
|
|
14
|
+
writeFlowWorkflow
|
|
15
|
+
} from "./packager-tool-94w17vf8.js";
|
|
16
|
+
import {
|
|
17
|
+
addBinding,
|
|
18
|
+
addNode,
|
|
19
|
+
createBinding,
|
|
20
|
+
generateNodeIdAndName
|
|
21
|
+
} from "./packager-tool-tn5e7wnb.js";
|
|
22
|
+
import {
|
|
23
|
+
catchError,
|
|
24
|
+
logger
|
|
25
|
+
} from "./packager-tool-5qaxht3k.js";
|
|
26
|
+
import {
|
|
27
|
+
getFileSystem
|
|
28
|
+
} from "./packager-tool-0v3s8r01.js";
|
|
29
|
+
|
|
30
|
+
// src/services/node-service.ts
|
|
31
|
+
class NodeTypeNotFoundError extends Error {
|
|
32
|
+
code = "NodeTypeNotFound";
|
|
33
|
+
instructions;
|
|
34
|
+
constructor(message, instructions) {
|
|
35
|
+
super(message);
|
|
36
|
+
this.name = "NodeTypeNotFoundError";
|
|
37
|
+
this.instructions = instructions;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
class NodeTypeNotEnabledError extends Error {
|
|
42
|
+
code = "NodeTypeNotEnabled";
|
|
43
|
+
instructions;
|
|
44
|
+
constructor(message, instructions) {
|
|
45
|
+
super(message);
|
|
46
|
+
this.name = "NodeTypeNotEnabledError";
|
|
47
|
+
this.instructions = instructions;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
class SourceRequiredError extends Error {
|
|
52
|
+
code = "SourceRequired";
|
|
53
|
+
instructions;
|
|
54
|
+
constructor(message, instructions) {
|
|
55
|
+
super(message);
|
|
56
|
+
this.name = "SourceRequiredError";
|
|
57
|
+
this.instructions = instructions;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
var listNodesInFlow = async (filePath) => {
|
|
61
|
+
const { workflow } = await readFlowWorkflow(filePath);
|
|
62
|
+
const nodes = workflow.nodes.map((n) => ({
|
|
63
|
+
id: n.id,
|
|
64
|
+
type: n.type,
|
|
65
|
+
label: n.display.label ?? "",
|
|
66
|
+
position: n.ui.position
|
|
67
|
+
}));
|
|
68
|
+
return { nodes, count: nodes.length };
|
|
69
|
+
};
|
|
70
|
+
var PROCESS_NODE_PREFIXES = [
|
|
71
|
+
"uipath.core.rpa-workflow.",
|
|
72
|
+
"uipath.agent.resource.tool.process.",
|
|
73
|
+
"uipath.core.agent.",
|
|
74
|
+
"uipath.core.api-workflow."
|
|
75
|
+
];
|
|
76
|
+
function isProcessNode(manifest) {
|
|
77
|
+
return PROCESS_NODE_PREFIXES.some((prefix) => manifest.nodeType?.startsWith(prefix));
|
|
78
|
+
}
|
|
79
|
+
function extractProcessGuid(nodeType) {
|
|
80
|
+
const match = nodeType.match(/^(?:uipath\.core\.rpa-workflow|uipath\.agent\.resource\.tool\.process|uipath\.core\.agent|uipath\.core\.api-workflow)\.([0-9a-f-]+)$/i);
|
|
81
|
+
if (!match) {
|
|
82
|
+
throw new Error(`Invalid process node type: "${nodeType}". ` + "Expected a known prefix followed by a process GUID.");
|
|
83
|
+
}
|
|
84
|
+
return match[1];
|
|
85
|
+
}
|
|
86
|
+
function resolveProcessTarget(node, definitions) {
|
|
87
|
+
if (!isProcessNode({ nodeType: node.type }))
|
|
88
|
+
return;
|
|
89
|
+
let subType = "Process";
|
|
90
|
+
if (definitions) {
|
|
91
|
+
const sameType = definitions.filter((d) => d.nodeType === node.type);
|
|
92
|
+
const def = sameType.find((d) => node.typeVersion !== undefined && d.version === node.typeVersion) ?? sameType[0];
|
|
93
|
+
const model = def?.model;
|
|
94
|
+
const defBindings = model?.bindings;
|
|
95
|
+
if (defBindings?.resourceSubType)
|
|
96
|
+
subType = defBindings.resourceSubType;
|
|
97
|
+
if (defBindings?.resourceKey) {
|
|
98
|
+
return { key: defBindings.resourceKey, subType };
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return { key: extractProcessGuid(node.type), subType };
|
|
102
|
+
}
|
|
103
|
+
function resolveProcessTargetKey(node, definitions) {
|
|
104
|
+
return resolveProcessTarget(node, definitions)?.key;
|
|
105
|
+
}
|
|
106
|
+
function createProcessBindings(manifest) {
|
|
107
|
+
const processGuid = extractProcessGuid(manifest.nodeType);
|
|
108
|
+
const model = manifest.model;
|
|
109
|
+
const rawValues = model?.bindings?.values;
|
|
110
|
+
let processName;
|
|
111
|
+
let folderPath;
|
|
112
|
+
if (Array.isArray(rawValues)) {
|
|
113
|
+
processName = rawValues.find((v) => v.propertyAttribute === "name")?.default ?? "";
|
|
114
|
+
folderPath = rawValues.find((v) => v.propertyAttribute === "folderPath")?.default;
|
|
115
|
+
} else {
|
|
116
|
+
processName = rawValues?.name ?? "";
|
|
117
|
+
folderPath = rawValues?.folderPath;
|
|
118
|
+
}
|
|
119
|
+
if (folderPath == null) {
|
|
120
|
+
throw new Error("Manifest is missing model.bindings.values.folderPath. " + "Cannot create process bindings without a folder path.");
|
|
121
|
+
}
|
|
122
|
+
const subType = model?.bindings?.resourceSubType ?? "Process";
|
|
123
|
+
const resourceKey = model?.bindings?.resourceKey ?? processGuid;
|
|
124
|
+
const nameBinding = createBinding({
|
|
125
|
+
name: "name",
|
|
126
|
+
value: processName,
|
|
127
|
+
resource: "process",
|
|
128
|
+
resourceKey,
|
|
129
|
+
propertyAttribute: "name",
|
|
130
|
+
resourceSubType: subType
|
|
131
|
+
});
|
|
132
|
+
const folderBinding = createBinding({
|
|
133
|
+
name: "folderPath",
|
|
134
|
+
value: folderPath,
|
|
135
|
+
resource: "process",
|
|
136
|
+
resourceKey,
|
|
137
|
+
propertyAttribute: "folderPath",
|
|
138
|
+
resourceSubType: subType
|
|
139
|
+
});
|
|
140
|
+
if (folderPath === "" && folderBinding.default === undefined) {
|
|
141
|
+
folderBinding.default = "";
|
|
142
|
+
}
|
|
143
|
+
return { nameBinding, folderBinding };
|
|
144
|
+
}
|
|
145
|
+
function resolveProcessBindingsInContext(node, nameBinding, folderBinding) {
|
|
146
|
+
const model = node.model;
|
|
147
|
+
if (!model?.context)
|
|
148
|
+
return;
|
|
149
|
+
for (const entry of model.context) {
|
|
150
|
+
if (entry.name === "name" && typeof entry.value === "string") {
|
|
151
|
+
entry.default = nameBinding.default;
|
|
152
|
+
entry.value = `=bindings.${nameBinding.id}`;
|
|
153
|
+
} else if (entry.name === "folderPath" && typeof entry.value === "string") {
|
|
154
|
+
entry.default = folderBinding.default;
|
|
155
|
+
entry.value = `=bindings.${folderBinding.id}`;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
var UNRESOLVED_BINDING_PATTERN = /^<bindings\.\w+>$/;
|
|
160
|
+
function ensureProcessBindings(workflow) {
|
|
161
|
+
const nodes = workflow.nodes;
|
|
162
|
+
const definitions = workflow.definitions ?? [];
|
|
163
|
+
let bindingsCreated = 0;
|
|
164
|
+
for (const node of nodes) {
|
|
165
|
+
if (!isProcessNode({ nodeType: node.type }))
|
|
166
|
+
continue;
|
|
167
|
+
const nodeModel = node.model;
|
|
168
|
+
const defModel = definitions.find((d) => d.nodeType === node.type)?.model;
|
|
169
|
+
const hasUnresolved = [nodeModel, defModel].some((m) => m?.context?.some((entry) => typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)));
|
|
170
|
+
if (!hasUnresolved)
|
|
171
|
+
continue;
|
|
172
|
+
const definition = definitions.find((d) => d.nodeType === node.type);
|
|
173
|
+
if (!definition)
|
|
174
|
+
continue;
|
|
175
|
+
const [err, bindings] = catchError(() => createProcessBindings(definition));
|
|
176
|
+
if (err) {
|
|
177
|
+
logger.warn(`Skipping binding resolution for node "${node.id}": ${err.message}`);
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
const { nameBinding, folderBinding } = bindings;
|
|
181
|
+
const beforeCount = workflow.bindings?.length ?? 0;
|
|
182
|
+
addBinding(workflow, nameBinding);
|
|
183
|
+
addBinding(workflow, folderBinding);
|
|
184
|
+
const storedBindings = workflow.bindings;
|
|
185
|
+
const storedName = storedBindings.find((b) => b.resourceKey === nameBinding.resourceKey && b.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
|
|
186
|
+
const storedFolder = storedBindings.find((b) => b.resourceKey === folderBinding.resourceKey && b.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
|
|
187
|
+
resolveProcessBindingsInContext(node, storedName, storedFolder);
|
|
188
|
+
if (defModel?.context) {
|
|
189
|
+
for (const entry of defModel.context) {
|
|
190
|
+
if (entry.name === "name" && typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
|
|
191
|
+
entry.default = storedName.default;
|
|
192
|
+
entry.value = `=bindings.${storedName.id}`;
|
|
193
|
+
} else if (entry.name === "folderPath" && typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
|
|
194
|
+
entry.default = storedFolder.default;
|
|
195
|
+
entry.value = `=bindings.${storedFolder.id}`;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
const added = (workflow.bindings?.length ?? 0) - beforeCount;
|
|
200
|
+
bindingsCreated += added;
|
|
201
|
+
logger.info(`Resolved process bindings for node "${node.id}" (${node.type})`);
|
|
202
|
+
}
|
|
203
|
+
if (bindingsCreated > 0) {
|
|
204
|
+
logger.info(`ensureProcessBindings: created ${bindingsCreated} binding(s) for directly-authored nodes`);
|
|
205
|
+
}
|
|
206
|
+
return bindingsCreated;
|
|
207
|
+
}
|
|
208
|
+
var BINDING_REF_PATTERN = /^=bindings\.(.+)$/;
|
|
209
|
+
function collectNodeBindingRefs(node) {
|
|
210
|
+
const refs = new Set;
|
|
211
|
+
if (node.inputs) {
|
|
212
|
+
for (const value of Object.values(node.inputs)) {
|
|
213
|
+
if (typeof value === "string") {
|
|
214
|
+
const match = value.match(BINDING_REF_PATTERN);
|
|
215
|
+
if (match)
|
|
216
|
+
refs.add(match[1]);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return refs;
|
|
221
|
+
}
|
|
222
|
+
function collectNodeBindingResourceKeys(node, bindings, definitions) {
|
|
223
|
+
const keys = new Set;
|
|
224
|
+
const processKey = resolveProcessTargetKey(node, definitions);
|
|
225
|
+
if (processKey) {
|
|
226
|
+
keys.add(processKey);
|
|
227
|
+
}
|
|
228
|
+
const inputs = node.inputs;
|
|
229
|
+
if (typeof inputs?.detail?.connectionResourceId === "string") {
|
|
230
|
+
keys.add(inputs.detail.connectionResourceId);
|
|
231
|
+
}
|
|
232
|
+
const refs = collectNodeBindingRefs(node);
|
|
233
|
+
for (const binding of bindings) {
|
|
234
|
+
if (refs.has(binding.id)) {
|
|
235
|
+
keys.add(binding.resourceKey);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return keys;
|
|
239
|
+
}
|
|
240
|
+
var addNodeToFlow = async (filePath, nodeType, options = {}) => {
|
|
241
|
+
const [registryErr, registryManifest] = await catchError(getNode(nodeType));
|
|
242
|
+
let manifest = registryManifest ?? null;
|
|
243
|
+
if (registryErr) {
|
|
244
|
+
logger.debug(`Registry node lookup failed for ${nodeType}: ${registryErr.message}`);
|
|
245
|
+
}
|
|
246
|
+
let localErr = null;
|
|
247
|
+
if (!manifest) {
|
|
248
|
+
const [err, localManifest] = await catchError(getNode(nodeType, { local: true }));
|
|
249
|
+
manifest = localManifest ?? null;
|
|
250
|
+
if (err) {
|
|
251
|
+
localErr = err;
|
|
252
|
+
logger.warn(`In-solution node lookup failed for ${nodeType}: ${err.message}`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
if (!manifest) {
|
|
256
|
+
if (isKnownSdkNodeType(nodeType)) {
|
|
257
|
+
throw new NodeTypeNotEnabledError(`Node type '${nodeType}' is not enabled for this tenant.`, "Ask an admin to enable the feature flag for this node type, " + "or run `uip maestro flow registry list` to see every " + "known type with its `AvailableOnTenant` flag.");
|
|
258
|
+
}
|
|
259
|
+
const details = [
|
|
260
|
+
registryErr && `Registry lookup failed: ${registryErr.message}`,
|
|
261
|
+
localErr && `In-solution lookup failed: ${localErr.message}`
|
|
262
|
+
].filter(Boolean).join(". ");
|
|
263
|
+
const hint = details || "If this is an in-solution node, make sure you are running " + "from inside a solution directory (with a .uipx file in CWD, parent, or grandparent).";
|
|
264
|
+
throw new NodeTypeNotFoundError(`Node type not found: ${nodeType}. ${hint}`, "Run `uip maestro flow registry search <keyword>` to find the " + "correct node type, or `uip maestro flow registry list` " + "to see every known type (including ones not enabled on this tenant).");
|
|
265
|
+
}
|
|
266
|
+
if (manifest.model?.source === true) {
|
|
267
|
+
const fromFlag = typeof options.source === "string" && options.source.length > 0;
|
|
268
|
+
const inputsSourceCandidate = options.inputs?.source;
|
|
269
|
+
const fromInputs = typeof inputsSourceCandidate === "string" && inputsSourceCandidate.length > 0;
|
|
270
|
+
if (!fromFlag && !fromInputs) {
|
|
271
|
+
throw new SourceRequiredError(`Node type "${nodeType}" requires a source UUID at inputs.source. Pass --source <uuid>.`, "Use the agent's ProjectId (returned by " + '`uip agent init "<flow-dir>" --inline-in-flow`) for inline ' + "agent nodes, or the resource id declared in the parent " + "inline agent's `resources[]` for agent-tool resource nodes. " + '`--input \'{"source":"<uuid>"}\'` is also accepted.');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
const { workflow, refMap } = await readFlowWorkflow(filePath);
|
|
275
|
+
const existingIds = new Set(workflow.nodes.map((n) => n.id));
|
|
276
|
+
const existingDefCount = workflow.definitions.length;
|
|
277
|
+
const { id, displayName } = generateNodeIdAndName(options.label ?? manifest.display.label, existingIds);
|
|
278
|
+
const bindingsBefore = workflow.bindings?.length ?? 0;
|
|
279
|
+
const node = addNode(workflow, manifest, id, options.position ?? { x: 0, y: 0 }, options.label ?? displayName);
|
|
280
|
+
const schema = manifest.inputDefinition;
|
|
281
|
+
if (manifest.inputDefaults === undefined && schema?.type === "object") {
|
|
282
|
+
for (const schemaKey of Object.keys(schema)) {
|
|
283
|
+
delete node.inputs[schemaKey];
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
let bindingsCreated = 0;
|
|
287
|
+
if (isProcessNode(manifest)) {
|
|
288
|
+
const { nameBinding, folderBinding } = createProcessBindings(manifest);
|
|
289
|
+
addBinding(workflow, nameBinding);
|
|
290
|
+
addBinding(workflow, folderBinding);
|
|
291
|
+
const storedBindings = workflow.bindings;
|
|
292
|
+
const storedName = storedBindings.find((b) => b.resourceKey === nameBinding.resourceKey && b.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
|
|
293
|
+
const storedFolder = storedBindings.find((b) => b.resourceKey === folderBinding.resourceKey && b.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
|
|
294
|
+
if (folderBinding.default === "" && storedFolder.default === undefined) {
|
|
295
|
+
storedFolder.default = "";
|
|
296
|
+
}
|
|
297
|
+
resolveProcessBindingsInContext(node, storedName, storedFolder);
|
|
298
|
+
bindingsCreated = (workflow.bindings?.length ?? 0) - bindingsBefore;
|
|
299
|
+
}
|
|
300
|
+
if (options.inputs && Object.keys(options.inputs).length > 0) {
|
|
301
|
+
node.inputs = { ...node.inputs ?? {}, ...options.inputs };
|
|
302
|
+
}
|
|
303
|
+
const manifestModel = manifest.model;
|
|
304
|
+
if (manifestModel?.source === true) {
|
|
305
|
+
if (typeof options.source === "string" && options.source.length > 0) {
|
|
306
|
+
const inputs = node.inputs ?? {};
|
|
307
|
+
inputs.source = options.source;
|
|
308
|
+
node.inputs = inputs;
|
|
309
|
+
}
|
|
310
|
+
if (node.model) {
|
|
311
|
+
delete node.model;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (typeof options.parent === "string" && options.parent.length > 0) {
|
|
315
|
+
const allNodes = workflow.nodes;
|
|
316
|
+
if (!allNodes.some((n) => n.id === options.parent)) {
|
|
317
|
+
throw new Error(`--parent value "${options.parent}" is not an existing node id in this flow. ` + "Run 'uip maestro flow node list <file>' to see valid ids.");
|
|
318
|
+
}
|
|
319
|
+
node.parentId = options.parent;
|
|
320
|
+
}
|
|
321
|
+
await writeFlowWorkflow(filePath, workflow, refMap);
|
|
322
|
+
if (isProcessNode(manifest)) {
|
|
323
|
+
const fs = getFileSystem();
|
|
324
|
+
const [regenErr] = await catchError(regenerateBindingsFile(fs, filePath));
|
|
325
|
+
if (regenErr) {
|
|
326
|
+
logger.warn(`Failed to regenerate bindings_v2.json after adding ${manifest.nodeType}: ${regenErr.message}`);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const definitionAdded = workflow.definitions.length > existingDefCount;
|
|
330
|
+
const variableCount = workflow.variables?.nodes?.length ?? 0;
|
|
331
|
+
if (isConnectorNode(manifest)) {
|
|
332
|
+
const connInfo = getConnectorInfo(manifest);
|
|
333
|
+
return {
|
|
334
|
+
node,
|
|
335
|
+
definitionAdded,
|
|
336
|
+
bindingsCreated,
|
|
337
|
+
variableCount,
|
|
338
|
+
connectorInfo: connInfo ?? undefined
|
|
339
|
+
};
|
|
340
|
+
} else {
|
|
341
|
+
return { node, definitionAdded, bindingsCreated, variableCount };
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
function removeConnectedEdges(workflow, nodeId) {
|
|
345
|
+
const edges = workflow.edges ?? [];
|
|
346
|
+
const before = edges.length;
|
|
347
|
+
workflow.edges = edges.filter((e) => e.sourceNodeId !== nodeId && e.targetNodeId !== nodeId);
|
|
348
|
+
return before - workflow.edges.length;
|
|
349
|
+
}
|
|
350
|
+
function removeOrphanedBindings(workflow, deletedNodeKeys, remainingNodes, bindings) {
|
|
351
|
+
if (deletedNodeKeys.size === 0 || bindings.length === 0)
|
|
352
|
+
return 0;
|
|
353
|
+
const defs = workflow.definitions ?? [];
|
|
354
|
+
const remainingKeys = new Set;
|
|
355
|
+
for (const node of remainingNodes) {
|
|
356
|
+
for (const key of collectNodeBindingResourceKeys(node, bindings, defs)) {
|
|
357
|
+
remainingKeys.add(key);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
const before = bindings.length;
|
|
361
|
+
workflow.bindings = bindings.filter((b) => !deletedNodeKeys.has(b.resourceKey) || remainingKeys.has(b.resourceKey));
|
|
362
|
+
return before - workflow.bindings.length;
|
|
363
|
+
}
|
|
364
|
+
function connectorConnectionBindingName(node, definitions) {
|
|
365
|
+
if (!node.type.startsWith("uipath.connector"))
|
|
366
|
+
return "";
|
|
367
|
+
const def = definitions.find((d) => d.nodeType === node.type);
|
|
368
|
+
const context = def?.model?.context;
|
|
369
|
+
const connectorKey = context?.find((c) => c.name === "connectorKey")?.value;
|
|
370
|
+
return typeof connectorKey === "string" && connectorKey.length > 0 ? `${connectorKey} connection` : "";
|
|
371
|
+
}
|
|
372
|
+
function removeOrphanedConnectorStub(workflow, deletedNode, remainingNodes, definitions) {
|
|
373
|
+
const stubName = connectorConnectionBindingName(deletedNode, definitions);
|
|
374
|
+
if (!stubName)
|
|
375
|
+
return 0;
|
|
376
|
+
const stillOwned = remainingNodes.some((n) => connectorConnectionBindingName(n, definitions) === stubName);
|
|
377
|
+
if (stillOwned)
|
|
378
|
+
return 0;
|
|
379
|
+
const bindings = workflow.bindings ?? [];
|
|
380
|
+
if (bindings.length === 0)
|
|
381
|
+
return 0;
|
|
382
|
+
const before = bindings.length;
|
|
383
|
+
workflow.bindings = bindings.filter((b) => !(b.resource?.toLowerCase() === "connection" && b.propertyAttribute === "ConnectionId" && !b.resourceKey && !b.default && b.name === stubName));
|
|
384
|
+
return before - workflow.bindings.length;
|
|
385
|
+
}
|
|
386
|
+
function removeOrphanedDefinitions(workflow, remainingNodes) {
|
|
387
|
+
const definitions = workflow.definitions ?? [];
|
|
388
|
+
const usedKeys = new Set(remainingNodes.map((n) => `${n.type}:${n.typeVersion}`));
|
|
389
|
+
const before = definitions.length;
|
|
390
|
+
workflow.definitions = definitions.filter((d) => usedKeys.has(`${d.nodeType}:${d.version}`));
|
|
391
|
+
return before - workflow.definitions.length;
|
|
392
|
+
}
|
|
393
|
+
function removeVariableUpdates(workflow, nodeId) {
|
|
394
|
+
const variables = workflow.variables;
|
|
395
|
+
if (!variables?.variableUpdates)
|
|
396
|
+
return 0;
|
|
397
|
+
const updates = variables.variableUpdates[nodeId];
|
|
398
|
+
if (!updates)
|
|
399
|
+
return 0;
|
|
400
|
+
const count = updates.length;
|
|
401
|
+
delete variables.variableUpdates[nodeId];
|
|
402
|
+
return count;
|
|
403
|
+
}
|
|
404
|
+
function removeNodeVariables(workflow, nodeId) {
|
|
405
|
+
const variables = workflow.variables;
|
|
406
|
+
if (!variables?.nodes)
|
|
407
|
+
return 0;
|
|
408
|
+
const before = variables.nodes.length;
|
|
409
|
+
variables.nodes = variables.nodes.filter((v) => v.binding.nodeId !== nodeId);
|
|
410
|
+
return before - variables.nodes.length;
|
|
411
|
+
}
|
|
412
|
+
var deleteNodeFromFlow = async (filePath, nodeId) => {
|
|
413
|
+
const { workflow, refMap } = await readFlowWorkflow(filePath);
|
|
414
|
+
const nodes = workflow.nodes;
|
|
415
|
+
const nodeIndex = nodes.findIndex((n) => n.id === nodeId);
|
|
416
|
+
if (nodeIndex === -1) {
|
|
417
|
+
const available = nodes.map((n) => n.id).join(", ") || "(none)";
|
|
418
|
+
throw new Error(`Node not found: "${nodeId}". Available node IDs: ${available}`);
|
|
419
|
+
}
|
|
420
|
+
const targetNode = nodes[nodeIndex];
|
|
421
|
+
const deletedWasProcessNode = isProcessNode({ nodeType: targetNode.type });
|
|
422
|
+
const deletedNode = {
|
|
423
|
+
id: targetNode.id,
|
|
424
|
+
type: targetNode.type,
|
|
425
|
+
label: targetNode.display.label ?? "",
|
|
426
|
+
position: targetNode.ui.position
|
|
427
|
+
};
|
|
428
|
+
const bindings = workflow.bindings ?? [];
|
|
429
|
+
const definitions = workflow.definitions ?? [];
|
|
430
|
+
const deletedNodeResourceKeys = collectNodeBindingResourceKeys(targetNode, bindings, definitions);
|
|
431
|
+
nodes.splice(nodeIndex, 1);
|
|
432
|
+
const edgesRemoved = removeConnectedEdges(workflow, nodeId);
|
|
433
|
+
const bindingsRemoved = removeOrphanedBindings(workflow, deletedNodeResourceKeys, nodes, bindings) + removeOrphanedConnectorStub(workflow, targetNode, nodes, definitions);
|
|
434
|
+
const definitionsRemoved = removeOrphanedDefinitions(workflow, nodes);
|
|
435
|
+
const variablesRemoved = removeNodeVariables(workflow, nodeId);
|
|
436
|
+
const variableUpdatesRemoved = removeVariableUpdates(workflow, nodeId);
|
|
437
|
+
await writeFlowWorkflow(filePath, workflow, refMap);
|
|
438
|
+
if (deletedWasProcessNode || bindingsRemoved > 0) {
|
|
439
|
+
const fs = getFileSystem();
|
|
440
|
+
const [regenErr] = await catchError(regenerateBindingsFile(fs, filePath));
|
|
441
|
+
if (regenErr) {
|
|
442
|
+
logger.warn(`Failed to regenerate bindings_v2.json after deleting ${targetNode.type}: ${regenErr.message}`);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return {
|
|
446
|
+
deletedNode,
|
|
447
|
+
edgesRemoved,
|
|
448
|
+
bindingsRemoved,
|
|
449
|
+
definitionsRemoved,
|
|
450
|
+
variablesRemoved,
|
|
451
|
+
variableUpdatesRemoved
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
export { NodeTypeNotFoundError, NodeTypeNotEnabledError, SourceRequiredError, listNodesInFlow, PROCESS_NODE_PREFIXES, isProcessNode, resolveProcessTarget, resolveProcessTargetKey, ensureProcessBindings, collectNodeBindingResourceKeys, addNodeToFlow, deleteNodeFromFlow };
|
|
456
|
+
|
|
457
|
+
//# debugId=77D74C5CA8BE20AA64756E2164756E21
|