@uipath/flow-tool 1.204.0 → 1.205.0-preview.258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/THIRD-PARTY-NOTICES.md +39 -15
- package/dist/{authoring-bppe07p0.js → authoring-e1k40hyw.js} +6 -5
- package/dist/{binding-service-xwgsn35p.js → binding-service-pdtxvvt8.js} +38 -30
- package/dist/{connector-service-r0w8ztas.js → connector-service-pm9hfmsv.js} +224 -47
- package/dist/de-UZI7FJDO-awjpqfz0.js +200 -0
- package/dist/{de-MUJPA4EB-dpg7t2rw.js → de-UZI7FJDO-mwvc4cxe.js} +29 -2
- package/dist/{de-FGHEJRCI-rv513mfh.js → de-WLW6KWOJ-2qnsqdtw.js} +238 -31
- package/dist/debug-conversation-trigger-xsm3ycqx.js +30 -0
- package/dist/{debug-http-client-p4kf38yt.js → debug-http-client-yqjzsnhw.js} +5 -4
- package/dist/{debug-service-893erynq.js → debug-service-nra3n02y.js} +6 -5
- package/dist/{edge-service-yzsfw4bs.js → edge-service-mddnjwb0.js} +16 -12
- package/dist/{embedded-file-reader-v8c2yj2a.js → embedded-file-reader-r66242ey.js} +2 -2
- package/dist/en-EJCBA3LK-0wb3b1xy.js +146 -0
- package/dist/{en-FBPVNKFN-dqt573xn.js → en-EJCBA3LK-dtpdghgj.js} +12 -4
- package/dist/{en-BWGKA5OE-1qkvb9rn.js → en-M7GQYBV2-5nfmpnfz.js} +88 -6
- package/dist/{es-7SE7HX2X-8yh1aj2y.js → es-4UBUTCQA-m1ytpyx2.js} +29 -2
- package/dist/es-4UBUTCQA-t7hsackg.js +200 -0
- package/dist/{es-KR3ZSNMP-84zphx0x.js → es-5THCNRFN-tqwyrdgy.js} +235 -28
- package/dist/{es-MX-2MYFZU7X-3rek4r73.js → es-MX-5RELIXKI-9jhqtddc.js} +29 -2
- package/dist/es-MX-5RELIXKI-jtjbcxbb.js +200 -0
- package/dist/{es-MX-XXZJGC4R-2mr8jtgm.js → es-MX-TWZBRAXK-gqd9swzw.js} +237 -30
- package/dist/filter-engine-7ep90g7f.js +11 -0
- package/dist/{flow-api-kjvpsxhw.js → flow-api-sat010z1.js} +16 -10
- package/dist/{flow-debug-service-dd10rg08.js → flow-debug-service-dw0d9cv7.js} +96 -58
- package/dist/{flow-eval-node-target-2ekp77s6.js → flow-eval-node-target-wttmdm4v.js} +17 -17
- package/dist/flow-eval-run-api-xdygjzfv.js +13 -0
- package/dist/{flow-eval-run-service-twzbmeq6.js → flow-eval-run-service-g09w4m9m.js} +73 -80
- package/dist/{flow-eval-service-ckwx7d5z.js → flow-eval-service-jfkz0tae.js} +167 -415
- package/dist/{flow-init-sdk-source-z9qx1zkt.js → flow-init-sdk-source-xvdvkq7d.js} +6 -5
- package/dist/{flow-init-service-m6swzk43.js → flow-init-service-5v6zwhas.js} +19 -15
- package/dist/{flow-io-tnrc53z6.js → flow-io-64tmj8n7.js} +15 -11
- package/dist/{flow-migrate-service-625gppk0.js → flow-migrate-service-bjxs35ac.js} +16 -12
- package/dist/{flow-pack-service-qdpvrmme.js → flow-pack-service-s75qhtn5.js} +47 -38
- package/dist/flow-validate-service-rbvgesrb.js +70 -0
- package/dist/{fr-Y6NPVODW-8vr1ja4b.js → fr-CERONSRC-edpxhbmb.js} +237 -30
- package/dist/{fr-MDFKNZ4C-h4a122k9.js → fr-VBM5WRC2-63z7w4mh.js} +29 -2
- package/dist/fr-VBM5WRC2-707ha692.js +200 -0
- package/dist/{governance-fetcher-zq8zmfjb.js → governance-fetcher-tw83p74c.js} +7 -6
- package/dist/{hitl-service-r19zvqsz.js → hitl-service-hgg9tr5j.js} +15 -11
- package/dist/{index-b8n7hv68.js → index-09mfatmh.js} +6 -5
- package/dist/{index-aaq9rwfv.js → index-1b2je9n2.js} +1088 -233
- package/dist/index-d090f35d.js +66 -0
- package/dist/{index-yj4xk2aw.js → index-dgdnbb2g.js} +7 -5
- package/dist/{index-ng2f77my.js → index-fyc0k5dd.js} +985 -617
- package/dist/{index-vrhcbxnk.js → index-nsn889vf.js} +6 -5
- package/dist/{index-2s8rmmw6.js → index-sqhbn7ew.js} +4 -4
- package/dist/{index-tnz5ks4t.js → index-wycgq0ff.js} +65 -2230
- package/dist/index.js +17 -14
- package/dist/init.js +19 -15
- package/dist/inline-entity-resolver-2qqf1635.js +45 -0
- package/dist/input-reader-n7kzdrev.js +12 -0
- package/dist/{ja-UTQEAP34-8e0q6swp.js → ja-43QL7CGO-c3q8gre9.js} +29 -2
- package/dist/ja-43QL7CGO-h6qfxfay.js +200 -0
- package/dist/{ja-Q5PXKJ2V-p4msxzjd.js → ja-U2MCNHGT-gz0ap1jk.js} +235 -28
- package/dist/{known-types-q6fcyq2e.js → known-types-3025scz1.js} +5 -5
- package/dist/ko-TLL6Z6CD-ag6gjynr.js +200 -0
- package/dist/{ko-AXCHW2OK-askct7f6.js → ko-TLL6Z6CD-wrt3n8a9.js} +29 -2
- package/dist/{ko-AYBDSRZG-41mdmsg1.js → ko-XAUYQWDR-zp81gjp4.js} +237 -30
- package/dist/{maestro-automate-entry-qak46eg0.js → maestro-automate-entry-6f9act3w.js} +2 -2
- package/dist/{node-ccwecksf.js → node-1wzjq3jb.js} +29 -15
- package/dist/{node-service-w8gsy23p.js → node-service-0hxtt2x6.js} +41 -30
- package/dist/{node-strategy-fdnkvq4a.js → node-strategy-1dmmhvf3.js} +1 -1
- package/dist/node-sync-service-n7r4ma3a.js +61 -0
- package/dist/{packager-tool-s4etvs59.js → packager-tool-0j8v36qh.js} +1 -1
- package/dist/packager-tool-10vc8pq4.js +2 -0
- package/dist/{packager-tool-pw6j69m5.js → packager-tool-445qgxdk.js} +1802 -378
- package/dist/packager-tool-4kr6g0zw.js +16 -0
- package/dist/packager-tool-4x7tzvv0.js +1176 -0
- package/dist/{packager-tool-86rhxbf1.js → packager-tool-5regytfc.js} +6 -4
- package/dist/{packager-tool-d88rqwk8.js → packager-tool-6z1hsm2h.js} +13 -5
- package/dist/{packager-tool-jaa5gcbv.js → packager-tool-71gqkgg6.js} +6 -6
- package/dist/packager-tool-7hw344bt.js +107 -0
- package/dist/{packager-tool-m8xtf5ej.js → packager-tool-8g5931fz.js} +7 -4
- package/dist/{packager-tool-h9tzz0qd.js → packager-tool-961vsbsc.js} +15 -10
- package/dist/{packager-tool-zzc2yp2h.js → packager-tool-99gban46.js} +172 -71
- package/dist/packager-tool-9era57c0.js +28 -0
- package/dist/packager-tool-9jxzgsxc.js +14 -0
- package/dist/{packager-tool-zxp4hya4.js → packager-tool-a5afh1dc.js} +34 -13
- package/dist/{packager-tool-02f63a08.js → packager-tool-apawc11t.js} +88 -762
- package/dist/{packager-tool-tf3d2y8z.js → packager-tool-aw9v0raw.js} +2 -2
- package/dist/{packager-tool-6y0f9qg5.js → packager-tool-b3k0mkke.js} +463 -327
- package/dist/packager-tool-cqtsj6yh.js +2 -0
- package/dist/{packager-tool-5nqhxb9e.js → packager-tool-dwd6cc01.js} +16110 -13031
- package/dist/{packager-tool-t605qewm.js → packager-tool-dxgrhfq5.js} +2 -2
- package/dist/{packager-tool-awkq26v0.js → packager-tool-e7kvq8hf.js} +5 -3
- package/dist/packager-tool-fc1xdt3y.js +35 -0
- package/dist/{packager-tool-3dc9gz35.js → packager-tool-frjt46rb.js} +1 -1
- package/dist/{packager-tool-cn7e7cx2.js → packager-tool-gcap41av.js} +668 -57
- package/dist/packager-tool-hj5x3p8g.js +23 -0
- package/dist/{packager-tool-k91rd9nx.js → packager-tool-hvgn6t66.js} +6 -24
- package/dist/{packager-tool-w5a1hhyj.js → packager-tool-hxyjn885.js} +13 -2
- package/dist/{packager-tool-hhy1gr2k.js → packager-tool-jgfzfqjm.js} +1 -1
- package/dist/{packager-tool-6h69pd2a.js → packager-tool-kn86394c.js} +127 -61
- package/dist/packager-tool-mgcz986r.js +143 -0
- package/dist/{packager-tool-3h2ktz6q.js → packager-tool-myhbp761.js} +11 -1
- package/dist/{packager-tool-hp5vnk8p.js → packager-tool-ndev7vbj.js} +13 -13
- package/dist/{packager-tool-dynm8fz9.js → packager-tool-nj4vcnq9.js} +20 -8
- package/dist/{packager-tool-ayc9nhpa.js → packager-tool-nk16zaz3.js} +519 -437
- package/dist/{packager-tool-vzbttaje.js → packager-tool-nts5rrch.js} +5 -6
- package/dist/{packager-tool-vbfz8k7w.js → packager-tool-p8gab24q.js} +52 -32
- package/dist/{packager-tool-stq8800d.js → packager-tool-pacrqxv2.js} +17 -4
- package/dist/{packager-tool-7q6z6npd.js → packager-tool-pcvhcn2k.js} +93 -11
- package/dist/packager-tool-phw8ydjx.js +331 -0
- package/dist/packager-tool-qcqb9hf8.js +26 -0
- package/dist/{packager-tool-n89vrpex.js → packager-tool-skcjythd.js} +10907 -25608
- package/dist/{packager-tool-1ca047de.js → packager-tool-sqpesv2e.js} +12 -56
- package/dist/packager-tool-t7ahhaer.js +877 -0
- package/dist/{packager-tool-peawy22c.js → packager-tool-tqjfdpda.js} +53 -8
- package/dist/{packager-tool-y8egb0fa.js → packager-tool-wds3myef.js} +2573 -535
- package/dist/{packager-tool-5tjzg56t.js → packager-tool-wh660fny.js} +1 -1
- package/dist/{packager-tool-tyg399d6.js → packager-tool-wze74wyk.js} +74 -47
- package/dist/packager-tool-xj0agqpk.js +11 -0
- package/dist/packager-tool-xk78j7dz.js +1256 -0
- package/dist/{packager-tool-py93409h.js → packager-tool-ymma2s85.js} +2 -2
- package/dist/packager-tool-z0yxfhdj.js +40 -0
- package/dist/packager-tool.js +13 -10
- package/dist/{pt-BR-TKHNHMET-sn91xyq0.js → pt-BR-GNQNAAZ2-xadharv4.js} +237 -30
- package/dist/{pt-BR-Y6K6XHXK-mp3hwhw1.js → pt-BR-USP2T7GD-pedn77m1.js} +29 -2
- package/dist/pt-BR-USP2T7GD-rppy42ym.js +200 -0
- package/dist/{pt-3DIO5QWG-59b3f4bc.js → pt-RMIAKZB4-67enhx3m.js} +29 -2
- package/dist/pt-RMIAKZB4-t80exmp7.js +200 -0
- package/dist/{pt-ROXU257Y-2f6bxev4.js → pt-TO2DARY2-ftcce1bv.js} +237 -30
- package/dist/ro-GHOBYW2S-4zevc9dy.js +200 -0
- package/dist/{ro-BWR3ONRR-vzx3hy8a.js → ro-GHOBYW2S-mhnqsgaa.js} +29 -2
- package/dist/{ro-AVAWPKOO-b89pw79r.js → ro-WUYJV6OW-a8d9qy1n.js} +235 -28
- package/dist/ru-WBLQ5B2U-dpqvtfwr.js +10 -0
- package/dist/services/connector-request-buckets.d.ts +1 -0
- package/dist/services/flow-eval-file-store.d.ts +1 -11
- package/dist/services/flow-eval-utils.d.ts +1 -32
- package/dist/services/flow-validate-service.d.ts +51 -0
- package/dist/services/inline-entity-resolver.d.ts +22 -0
- package/dist/services/node-service.d.ts +21 -1
- package/dist/services/packaging-utils.d.ts +15 -2
- package/dist/{shared-utils-pnbvyyb2.js → shared-utils-tqnx96mg.js} +4 -3
- package/dist/solution-auth-8qz5pw7z.js +14 -0
- package/dist/solution-discovery-vqravtkh.js +44 -0
- package/dist/{tidy-service-4fd4mjpb.js → tidy-service-fdctmeww.js} +143 -39
- package/dist/tool.js +17 -14
- package/dist/{tr-5IIHSFW5-hw4cewew.js → tr-GDTLECMM-k5fhmq13.js} +29 -2
- package/dist/tr-GDTLECMM-kngksm3r.js +200 -0
- package/dist/{tr-JMIP7ZSL-c39b6pe4.js → tr-M3F5A6AU-bb0tg39m.js} +235 -28
- package/dist/utils/flow-io.d.ts +2 -1
- package/dist/validation.js +39 -33
- package/dist/{variable-service-xgyaf3xy.js → variable-service-9xfk31pm.js} +16 -12
- package/dist/{wait-for-flow-job-d8m6mqb4.js → wait-for-flow-job-b0vj8828.js} +15 -12
- package/dist/{zh-CN-IFFXSEJS-9wm9gmrv.js → zh-CN-C5G4PC7C-ds9gkptg.js} +235 -28
- package/dist/zh-CN-I5D7WHBD-ge92tbx9.js +200 -0
- package/dist/{zh-CN-R2KU4U5L-tc1hat59.js → zh-CN-I5D7WHBD-sr5h0a98.js} +29 -2
- package/dist/{zh-TW-GNKMELBF-j674515r.js → zh-TW-2AVLM723-288pkc1z.js} +29 -2
- package/dist/zh-TW-2AVLM723-xsmap3gk.js +200 -0
- package/dist/{zh-TW-IYBNYAMG-8727c7v2.js → zh-TW-62HZIG6O-787kdwex.js} +234 -27
- package/package.json +2 -2
- package/dist/debug-conversation-trigger-8fgas95p.js +0 -44
- package/dist/flow-eval-run-api-byx3cacw.js +0 -13
- package/dist/flow-validate-service-ss9nt15j.js +0 -64
- package/dist/input-reader-vhar4g0k.js +0 -11
- package/dist/node-sync-service-42dpmp60.js +0 -40
- package/dist/packager-tool-a5xfcqqr.js +0 -15
- package/dist/packager-tool-epkg5s7f.js +0 -454
- package/dist/packager-tool-pz5nqg0s.js +0 -64
- package/dist/packager-tool-t3ysatjd.js +0 -521
- package/dist/packager-tool-vd6jt4n8.js +0 -208
- package/dist/packager-tool-wv3qf487.js +0 -265
- package/dist/services/flow-debug-service.d.ts +0 -320
- package/dist/services/flow-eval-schema/deterministic-evaluators.d.ts +0 -110
- package/dist/services/flow-eval-schema/evaluator-fields.d.ts +0 -66
- package/dist/services/flow-eval-schema/helpers.d.ts +0 -9
- package/dist/services/flow-eval-schema/index.d.ts +0 -4
- package/dist/services/flow-eval-schema/llm-judge-evaluators.d.ts +0 -174
- package/dist/services/flow-eval-schema/prompts.d.ts +0 -2
- package/dist/services/flow-eval-schema/registry.d.ts +0 -375
- package/dist/services/flow-eval-schema/tool-call-evaluators.d.ts +0 -93
- package/dist/services/flow-eval-schema/types.d.ts +0 -95
- package/dist/services/flow-eval-types.d.ts +0 -6
- package/dist/utils/write-resolved-flow.d.ts +0 -7
- /package/dist/{headless-45dypanh.js → headless-fw8pwyzm.js} +0 -0
- /package/dist/{localization-xecwjpe2.js → localization-d6gjmrsw.js} +0 -0
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FlowValidateService
|
|
3
|
-
} from "./packager-tool-zzc2yp2h.js";
|
|
4
|
-
import"./packager-tool-jaa5gcbv.js";
|
|
5
|
-
import"./packager-tool-s4etvs59.js";
|
|
6
|
-
import"./packager-tool-1frs4sr4.js";
|
|
7
|
-
import"./packager-tool-zgsvggdr.js";
|
|
8
|
-
import"./packager-tool-e5hj89zm.js";
|
|
9
|
-
import"./packager-tool-epkg5s7f.js";
|
|
10
|
-
import"./packager-tool-y8egb0fa.js";
|
|
11
|
-
import"./packager-tool-wv3qf487.js";
|
|
12
|
-
import"./packager-tool-pz5nqg0s.js";
|
|
13
|
-
import"./packager-tool-n89vrpex.js";
|
|
14
|
-
import"./packager-tool-ayc9nhpa.js";
|
|
15
|
-
import"./packager-tool-t605qewm.js";
|
|
16
|
-
import"./packager-tool-awkq26v0.js";
|
|
17
|
-
import"./packager-tool-cn7e7cx2.js";
|
|
18
|
-
import"./packager-tool-py93409h.js";
|
|
19
|
-
import"./packager-tool-peawy22c.js";
|
|
20
|
-
import"./packager-tool-t3ysatjd.js";
|
|
21
|
-
import"./packager-tool-w5a1hhyj.js";
|
|
22
|
-
import"./packager-tool-3dc9gz35.js";
|
|
23
|
-
import"./packager-tool-8qp60s20.js";
|
|
24
|
-
import"./packager-tool-6h69pd2a.js";
|
|
25
|
-
import"./packager-tool-qa9gftnj.js";
|
|
26
|
-
import"./packager-tool-0gctz400.js";
|
|
27
|
-
import"./packager-tool-yc4kw997.js";
|
|
28
|
-
import"./packager-tool-dynm8fz9.js";
|
|
29
|
-
import"./packager-tool-m8xtf5ej.js";
|
|
30
|
-
import"./packager-tool-5nqhxb9e.js";
|
|
31
|
-
import"./packager-tool-paq9c70w.js";
|
|
32
|
-
import"./packager-tool-vzbttaje.js";
|
|
33
|
-
import"./packager-tool-pw6j69m5.js";
|
|
34
|
-
import"./packager-tool-h9tzz0qd.js";
|
|
35
|
-
import"./packager-tool-hhy1gr2k.js";
|
|
36
|
-
import"./packager-tool-stq8800d.js";
|
|
37
|
-
import"./packager-tool-nkrmjr3a.js";
|
|
38
|
-
import"./packager-tool-tyg399d6.js";
|
|
39
|
-
import"./packager-tool-rs6jm14d.js";
|
|
40
|
-
import"./packager-tool-hk1gxnth.js";
|
|
41
|
-
import"./packager-tool-7q6z6npd.js";
|
|
42
|
-
import"./packager-tool-sc961w0q.js";
|
|
43
|
-
import"./packager-tool-eq46jxm5.js";
|
|
44
|
-
import"./packager-tool-868re2t3.js";
|
|
45
|
-
import"./packager-tool-gbgfwx8f.js";
|
|
46
|
-
import"./packager-tool-d88rqwk8.js";
|
|
47
|
-
import"./packager-tool-jysvpt8p.js";
|
|
48
|
-
import"./packager-tool-bhqx9kez.js";
|
|
49
|
-
import"./packager-tool-p79yh9ww.js";
|
|
50
|
-
import"./packager-tool-pxqras8k.js";
|
|
51
|
-
import"./packager-tool-z83pga0z.js";
|
|
52
|
-
import"./packager-tool-6ejqwbw9.js";
|
|
53
|
-
import"./packager-tool-mcaf4ewf.js";
|
|
54
|
-
import"./packager-tool-eypvc2kv.js";
|
|
55
|
-
import"./packager-tool-02f63a08.js";
|
|
56
|
-
import"./packager-tool-3h2ktz6q.js";
|
|
57
|
-
import"./packager-tool-4mna26cc.js";
|
|
58
|
-
import"./packager-tool-c23zrhj8.js";
|
|
59
|
-
import"./packager-tool-1yh8g550.js";
|
|
60
|
-
export {
|
|
61
|
-
FlowValidateService
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
//# debugId=502DBBFB657A9F2464756E2164756E21
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getNode,
|
|
3
|
-
getNodeEnriched,
|
|
4
|
-
listNodes,
|
|
5
|
-
pullNodes,
|
|
6
|
-
pullRemoteNodes,
|
|
7
|
-
searchNodeSummariesWithAvailability,
|
|
8
|
-
searchNodes,
|
|
9
|
-
searchNodesWithFilters
|
|
10
|
-
} from "./packager-tool-ayc9nhpa.js";
|
|
11
|
-
import"./packager-tool-t605qewm.js";
|
|
12
|
-
import"./packager-tool-awkq26v0.js";
|
|
13
|
-
import"./packager-tool-8qp60s20.js";
|
|
14
|
-
import"./packager-tool-6h69pd2a.js";
|
|
15
|
-
import"./packager-tool-qa9gftnj.js";
|
|
16
|
-
import"./packager-tool-0gctz400.js";
|
|
17
|
-
import"./packager-tool-yc4kw997.js";
|
|
18
|
-
import"./packager-tool-5nqhxb9e.js";
|
|
19
|
-
import"./packager-tool-paq9c70w.js";
|
|
20
|
-
import"./packager-tool-tyg399d6.js";
|
|
21
|
-
import"./packager-tool-7q6z6npd.js";
|
|
22
|
-
import"./packager-tool-sc961w0q.js";
|
|
23
|
-
import"./packager-tool-d88rqwk8.js";
|
|
24
|
-
import"./packager-tool-jysvpt8p.js";
|
|
25
|
-
import"./packager-tool-pxqras8k.js";
|
|
26
|
-
import"./packager-tool-02f63a08.js";
|
|
27
|
-
import"./packager-tool-3h2ktz6q.js";
|
|
28
|
-
import"./packager-tool-1yh8g550.js";
|
|
29
|
-
export {
|
|
30
|
-
getNode,
|
|
31
|
-
getNodeEnriched,
|
|
32
|
-
listNodes,
|
|
33
|
-
pullNodes,
|
|
34
|
-
pullRemoteNodes,
|
|
35
|
-
searchNodeSummariesWithAvailability,
|
|
36
|
-
searchNodes,
|
|
37
|
-
searchNodesWithFilters
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
//# debugId=96676D6B2BABEAA764756E2164756E21
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FlowToolFactory
|
|
3
|
-
} from "./packager-tool-pw6j69m5.js";
|
|
4
|
-
import {
|
|
5
|
-
toolsFactoryRepository
|
|
6
|
-
} from "./packager-tool-stq8800d.js";
|
|
7
|
-
|
|
8
|
-
// src/packager-tool.ts
|
|
9
|
-
function registerPackagerFactories() {
|
|
10
|
-
toolsFactoryRepository.registerProjectToolFactory(new FlowToolFactory);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { registerPackagerFactories };
|
|
14
|
-
|
|
15
|
-
//# debugId=094DABA57E9A36F764756E2164756E21
|
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
InlineActivityError,
|
|
3
|
-
definitionConfigurationOf,
|
|
4
|
-
prepareInlineActivity
|
|
5
|
-
} from "./packager-tool-y8egb0fa.js";
|
|
6
|
-
import {
|
|
7
|
-
regenerateBindingsFile
|
|
8
|
-
} from "./packager-tool-wv3qf487.js";
|
|
9
|
-
import {
|
|
10
|
-
getConnectorInfo,
|
|
11
|
-
getNode,
|
|
12
|
-
isConnectorNode
|
|
13
|
-
} from "./packager-tool-ayc9nhpa.js";
|
|
14
|
-
import {
|
|
15
|
-
isKnownSdkNodeType
|
|
16
|
-
} from "./packager-tool-awkq26v0.js";
|
|
17
|
-
import {
|
|
18
|
-
findMatchingDefinition
|
|
19
|
-
} from "./packager-tool-t3ysatjd.js";
|
|
20
|
-
import {
|
|
21
|
-
readFlowWorkflow,
|
|
22
|
-
writeFlowWorkflow
|
|
23
|
-
} from "./packager-tool-vzbttaje.js";
|
|
24
|
-
import {
|
|
25
|
-
createProcessBindings,
|
|
26
|
-
extractProcessGuid
|
|
27
|
-
} from "./packager-tool-pw6j69m5.js";
|
|
28
|
-
import {
|
|
29
|
-
addBinding,
|
|
30
|
-
addNode,
|
|
31
|
-
generateNodeIdAndName
|
|
32
|
-
} from "./packager-tool-h9tzz0qd.js";
|
|
33
|
-
import {
|
|
34
|
-
catchError,
|
|
35
|
-
logger
|
|
36
|
-
} from "./packager-tool-02f63a08.js";
|
|
37
|
-
import {
|
|
38
|
-
getFileSystem
|
|
39
|
-
} from "./packager-tool-3h2ktz6q.js";
|
|
40
|
-
// src/services/node-service.ts
|
|
41
|
-
class NodeTypeNotFoundError extends Error {
|
|
42
|
-
code = "NodeTypeNotFound";
|
|
43
|
-
instructions;
|
|
44
|
-
constructor(message, instructions) {
|
|
45
|
-
super(message);
|
|
46
|
-
this.name = "NodeTypeNotFoundError";
|
|
47
|
-
this.instructions = instructions;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
class NodeTypeNotEnabledError extends Error {
|
|
52
|
-
code = "NodeTypeNotEnabled";
|
|
53
|
-
instructions;
|
|
54
|
-
constructor(message, instructions) {
|
|
55
|
-
super(message);
|
|
56
|
-
this.name = "NodeTypeNotEnabledError";
|
|
57
|
-
this.instructions = instructions;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
class SourceRequiredError extends Error {
|
|
62
|
-
code = "SourceRequired";
|
|
63
|
-
instructions;
|
|
64
|
-
constructor(message, instructions) {
|
|
65
|
-
super(message);
|
|
66
|
-
this.name = "SourceRequiredError";
|
|
67
|
-
this.instructions = instructions;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
var listNodesInFlow = async (filePath) => {
|
|
71
|
-
const { workflow } = await readFlowWorkflow(filePath);
|
|
72
|
-
const nodes = workflow.nodes.map((n) => ({
|
|
73
|
-
id: n.id,
|
|
74
|
-
type: n.type,
|
|
75
|
-
label: n.display.label ?? "",
|
|
76
|
-
position: n.ui.position
|
|
77
|
-
}));
|
|
78
|
-
return { nodes, count: nodes.length };
|
|
79
|
-
};
|
|
80
|
-
var PROCESS_NODE_PREFIXES = [
|
|
81
|
-
"uipath.core.rpa-workflow.",
|
|
82
|
-
"uipath.agent.resource.tool.process.",
|
|
83
|
-
"uipath.core.agent.",
|
|
84
|
-
"uipath.core.api-workflow."
|
|
85
|
-
];
|
|
86
|
-
function isProcessNode(manifest) {
|
|
87
|
-
return PROCESS_NODE_PREFIXES.some((prefix) => manifest.nodeType?.startsWith(prefix));
|
|
88
|
-
}
|
|
89
|
-
function resolveProcessTarget(node, definitions) {
|
|
90
|
-
if (!isProcessNode({ nodeType: node.type }))
|
|
91
|
-
return;
|
|
92
|
-
let subType = "Process";
|
|
93
|
-
if (definitions) {
|
|
94
|
-
const def = findMatchingDefinition(node.type, node.typeVersion, definitions);
|
|
95
|
-
const model = def?.model;
|
|
96
|
-
const defBindings = model?.bindings;
|
|
97
|
-
if (defBindings?.resourceSubType)
|
|
98
|
-
subType = defBindings.resourceSubType;
|
|
99
|
-
if (defBindings?.resourceKey) {
|
|
100
|
-
return { key: defBindings.resourceKey, subType };
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return { key: extractProcessGuid(node.type), subType };
|
|
104
|
-
}
|
|
105
|
-
function resolveProcessTargetKey(node, definitions) {
|
|
106
|
-
return resolveProcessTarget(node, definitions)?.key;
|
|
107
|
-
}
|
|
108
|
-
function resolveProcessBindingsInContext(node, nameBinding, folderBinding) {
|
|
109
|
-
const model = node.model;
|
|
110
|
-
if (!model?.context)
|
|
111
|
-
return;
|
|
112
|
-
for (const entry of model.context) {
|
|
113
|
-
if (entry.name === "name" && typeof entry.value === "string") {
|
|
114
|
-
entry.default = nameBinding.default;
|
|
115
|
-
entry.value = `=bindings.${nameBinding.id}`;
|
|
116
|
-
} else if (entry.name === "folderPath" && typeof entry.value === "string") {
|
|
117
|
-
entry.default = folderBinding.default;
|
|
118
|
-
entry.value = `=bindings.${folderBinding.id}`;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
var UNRESOLVED_BINDING_PATTERN = /^<bindings\.\w+>$/;
|
|
123
|
-
function ensureProcessBindings(workflow) {
|
|
124
|
-
const nodes = workflow.nodes;
|
|
125
|
-
const definitions = workflow.definitions ?? [];
|
|
126
|
-
let bindingsCreated = 0;
|
|
127
|
-
for (const node of nodes) {
|
|
128
|
-
if (!isProcessNode({ nodeType: node.type }))
|
|
129
|
-
continue;
|
|
130
|
-
const nodeModel = node.model;
|
|
131
|
-
const defModel = definitions.find((d) => d.nodeType === node.type)?.model;
|
|
132
|
-
const hasUnresolved = [nodeModel, defModel].some((m) => m?.context?.some((entry) => typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)));
|
|
133
|
-
if (!hasUnresolved)
|
|
134
|
-
continue;
|
|
135
|
-
const definition = definitions.find((d) => d.nodeType === node.type);
|
|
136
|
-
if (!definition)
|
|
137
|
-
continue;
|
|
138
|
-
const [err, bindings] = catchError(() => createProcessBindings(definition));
|
|
139
|
-
if (err) {
|
|
140
|
-
logger.warn(`Skipping binding resolution for node "${node.id}": ${err.message}`);
|
|
141
|
-
continue;
|
|
142
|
-
}
|
|
143
|
-
const { nameBinding, folderBinding } = bindings;
|
|
144
|
-
const beforeCount = workflow.bindings?.length ?? 0;
|
|
145
|
-
addBinding(workflow, nameBinding);
|
|
146
|
-
addBinding(workflow, folderBinding);
|
|
147
|
-
const storedBindings = workflow.bindings;
|
|
148
|
-
const storedName = storedBindings.find((b) => b.resourceKey === nameBinding.resourceKey && b.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
|
|
149
|
-
const storedFolder = storedBindings.find((b) => b.resourceKey === folderBinding.resourceKey && b.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
|
|
150
|
-
resolveProcessBindingsInContext(node, storedName, storedFolder);
|
|
151
|
-
if (defModel?.context) {
|
|
152
|
-
for (const entry of defModel.context) {
|
|
153
|
-
if (entry.name === "name" && typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
|
|
154
|
-
entry.default = storedName.default;
|
|
155
|
-
entry.value = `=bindings.${storedName.id}`;
|
|
156
|
-
} else if (entry.name === "folderPath" && typeof entry.value === "string" && UNRESOLVED_BINDING_PATTERN.test(entry.value)) {
|
|
157
|
-
entry.default = storedFolder.default;
|
|
158
|
-
entry.value = `=bindings.${storedFolder.id}`;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
const added = (workflow.bindings?.length ?? 0) - beforeCount;
|
|
163
|
-
bindingsCreated += added;
|
|
164
|
-
logger.info(`Resolved process bindings for node "${node.id}" (${node.type})`);
|
|
165
|
-
}
|
|
166
|
-
if (bindingsCreated > 0) {
|
|
167
|
-
logger.info(`ensureProcessBindings: created ${bindingsCreated} binding(s) for directly-authored nodes`);
|
|
168
|
-
}
|
|
169
|
-
return bindingsCreated;
|
|
170
|
-
}
|
|
171
|
-
var BINDING_REF_PATTERN = /^=bindings\.(.+)$/;
|
|
172
|
-
function collectNodeBindingRefs(node) {
|
|
173
|
-
const refs = new Set;
|
|
174
|
-
if (node.inputs) {
|
|
175
|
-
for (const value of Object.values(node.inputs)) {
|
|
176
|
-
if (typeof value === "string") {
|
|
177
|
-
const match = value.match(BINDING_REF_PATTERN);
|
|
178
|
-
if (match)
|
|
179
|
-
refs.add(match[1]);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return refs;
|
|
184
|
-
}
|
|
185
|
-
function collectNodeBindingResourceKeys(node, bindings, definitions) {
|
|
186
|
-
const keys = new Set;
|
|
187
|
-
const processKey = resolveProcessTargetKey(node, definitions);
|
|
188
|
-
if (processKey) {
|
|
189
|
-
keys.add(processKey);
|
|
190
|
-
}
|
|
191
|
-
const inputs = node.inputs;
|
|
192
|
-
if (typeof inputs?.detail?.connectionResourceId === "string") {
|
|
193
|
-
keys.add(inputs.detail.connectionResourceId);
|
|
194
|
-
}
|
|
195
|
-
const refs = collectNodeBindingRefs(node);
|
|
196
|
-
for (const binding of bindings) {
|
|
197
|
-
if (refs.has(binding.id)) {
|
|
198
|
-
keys.add(binding.resourceKey);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return keys;
|
|
202
|
-
}
|
|
203
|
-
var addNodeToFlow = async (filePath, nodeType, options = {}) => {
|
|
204
|
-
let inline;
|
|
205
|
-
if (options.inlineActivity) {
|
|
206
|
-
inline = await prepareInlineActivity(nodeType, options.inlineActivity);
|
|
207
|
-
} else if (nodeType.startsWith("uipath.connector.custom.")) {
|
|
208
|
-
throw new InlineActivityError(`Node type "${nodeType}" is a non-catalog activity, which the registry does not carry.`, "Pass --metadata <Name>.json and --scripts <dir> (the files `uip is activities metadata generate` and `script update` produced) so the definition is built locally.");
|
|
209
|
-
}
|
|
210
|
-
let manifest = inline?.manifest ?? null;
|
|
211
|
-
let registryErr;
|
|
212
|
-
if (!manifest) {
|
|
213
|
-
const [err, registryManifest] = await catchError(getNode(nodeType));
|
|
214
|
-
manifest = registryManifest ?? null;
|
|
215
|
-
registryErr = err;
|
|
216
|
-
if (err) {
|
|
217
|
-
logger.debug(`Registry node lookup failed for ${nodeType}: ${err.message}`);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
let localErr = null;
|
|
221
|
-
if (!manifest) {
|
|
222
|
-
const [err, localManifest] = await catchError(getNode(nodeType, { local: true }));
|
|
223
|
-
manifest = localManifest ?? null;
|
|
224
|
-
if (err) {
|
|
225
|
-
localErr = err;
|
|
226
|
-
logger.warn(`In-solution node lookup failed for ${nodeType}: ${err.message}`);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
if (!manifest) {
|
|
230
|
-
if (isKnownSdkNodeType(nodeType)) {
|
|
231
|
-
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.");
|
|
232
|
-
}
|
|
233
|
-
const details = [
|
|
234
|
-
registryErr && `Registry lookup failed: ${registryErr.message}`,
|
|
235
|
-
localErr && `In-solution lookup failed: ${localErr.message}`
|
|
236
|
-
].filter(Boolean).join(". ");
|
|
237
|
-
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).";
|
|
238
|
-
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).");
|
|
239
|
-
}
|
|
240
|
-
if (manifest.model?.source === true) {
|
|
241
|
-
const fromFlag = typeof options.source === "string" && options.source.length > 0;
|
|
242
|
-
const inputsSourceCandidate = options.inputs?.source;
|
|
243
|
-
const fromInputs = typeof inputsSourceCandidate === "string" && inputsSourceCandidate.length > 0;
|
|
244
|
-
if (!fromFlag && !fromInputs) {
|
|
245
|
-
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.');
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
const { workflow, refMap } = await readFlowWorkflow(filePath);
|
|
249
|
-
if (inline) {
|
|
250
|
-
const existing = workflow.definitions.find((d) => d.nodeType === manifest.nodeType && d.version === manifest.version);
|
|
251
|
-
if (existing && definitionConfigurationOf(existing) !== definitionConfigurationOf(manifest)) {
|
|
252
|
-
throw new InlineActivityError(`"${nodeType}" is already defined in this flow with different activity metadata.`, "Use a different activity slug for this node type, or remove the existing nodes of this type first so the definition is rebuilt from the new metadata.");
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
const existingIds = new Set(workflow.nodes.map((n) => n.id));
|
|
256
|
-
const existingDefCount = workflow.definitions.length;
|
|
257
|
-
const { id, displayName } = generateNodeIdAndName(options.label ?? manifest.display.label, existingIds);
|
|
258
|
-
const bindingsBefore = workflow.bindings?.length ?? 0;
|
|
259
|
-
const node = addNode(workflow, manifest, id, options.position ?? { x: 0, y: 0 }, options.label ?? displayName);
|
|
260
|
-
const schema = manifest.inputDefinition;
|
|
261
|
-
if (manifest.inputDefaults === undefined && schema?.type === "object") {
|
|
262
|
-
for (const schemaKey of Object.keys(schema)) {
|
|
263
|
-
delete node.inputs[schemaKey];
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
let bindingsCreated = 0;
|
|
267
|
-
if (isProcessNode(manifest)) {
|
|
268
|
-
const { nameBinding, folderBinding } = createProcessBindings(manifest);
|
|
269
|
-
addBinding(workflow, nameBinding);
|
|
270
|
-
addBinding(workflow, folderBinding);
|
|
271
|
-
const storedBindings = workflow.bindings;
|
|
272
|
-
const storedName = storedBindings.find((b) => b.resourceKey === nameBinding.resourceKey && b.propertyAttribute === nameBinding.propertyAttribute) ?? nameBinding;
|
|
273
|
-
const storedFolder = storedBindings.find((b) => b.resourceKey === folderBinding.resourceKey && b.propertyAttribute === folderBinding.propertyAttribute) ?? folderBinding;
|
|
274
|
-
if (folderBinding.default === "" && storedFolder.default === undefined) {
|
|
275
|
-
storedFolder.default = "";
|
|
276
|
-
}
|
|
277
|
-
resolveProcessBindingsInContext(node, storedName, storedFolder);
|
|
278
|
-
bindingsCreated = (workflow.bindings?.length ?? 0) - bindingsBefore;
|
|
279
|
-
}
|
|
280
|
-
if (options.inputs && Object.keys(options.inputs).length > 0) {
|
|
281
|
-
node.inputs = { ...node.inputs ?? {}, ...options.inputs };
|
|
282
|
-
}
|
|
283
|
-
if (inline) {
|
|
284
|
-
node.inputs = {
|
|
285
|
-
...node.inputs ?? {},
|
|
286
|
-
inlineActivityConfiguration: inline.configuration
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
const manifestModel = manifest.model;
|
|
290
|
-
if (manifestModel?.source === true) {
|
|
291
|
-
if (typeof options.source === "string" && options.source.length > 0) {
|
|
292
|
-
const inputs = node.inputs ?? {};
|
|
293
|
-
inputs.source = options.source;
|
|
294
|
-
node.inputs = inputs;
|
|
295
|
-
}
|
|
296
|
-
if (node.model) {
|
|
297
|
-
delete node.model;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
if (typeof options.parent === "string" && options.parent.length > 0) {
|
|
301
|
-
const allNodes = workflow.nodes;
|
|
302
|
-
if (!allNodes.some((n) => n.id === options.parent)) {
|
|
303
|
-
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.");
|
|
304
|
-
}
|
|
305
|
-
node.parentId = options.parent;
|
|
306
|
-
}
|
|
307
|
-
await writeFlowWorkflow(filePath, workflow, refMap);
|
|
308
|
-
if (isProcessNode(manifest)) {
|
|
309
|
-
const fs = getFileSystem();
|
|
310
|
-
const [regenErr] = await catchError(regenerateBindingsFile(fs, filePath));
|
|
311
|
-
if (regenErr) {
|
|
312
|
-
logger.warn(`Failed to regenerate bindings_v2.json after adding ${manifest.nodeType}: ${regenErr.message}`);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
const definitionAdded = workflow.definitions.length > existingDefCount;
|
|
316
|
-
const variableCount = workflow.variables?.nodes?.length ?? 0;
|
|
317
|
-
const inlineActivity = inline ? {
|
|
318
|
-
scriptRef: inline.configuration.scriptRef,
|
|
319
|
-
scripts: Object.keys(inline.configuration.scripts)
|
|
320
|
-
} : undefined;
|
|
321
|
-
if (isConnectorNode(manifest)) {
|
|
322
|
-
const connInfo = getConnectorInfo(manifest);
|
|
323
|
-
return {
|
|
324
|
-
node,
|
|
325
|
-
definitionAdded,
|
|
326
|
-
bindingsCreated,
|
|
327
|
-
variableCount,
|
|
328
|
-
connectorInfo: connInfo ?? undefined,
|
|
329
|
-
...inlineActivity && { inlineActivity }
|
|
330
|
-
};
|
|
331
|
-
} else {
|
|
332
|
-
return {
|
|
333
|
-
node,
|
|
334
|
-
definitionAdded,
|
|
335
|
-
bindingsCreated,
|
|
336
|
-
variableCount,
|
|
337
|
-
...inlineActivity && { inlineActivity }
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
function removeConnectedEdges(workflow, nodeId) {
|
|
342
|
-
const edges = workflow.edges ?? [];
|
|
343
|
-
const before = edges.length;
|
|
344
|
-
workflow.edges = edges.filter((e) => e.sourceNodeId !== nodeId && e.targetNodeId !== nodeId);
|
|
345
|
-
return before - workflow.edges.length;
|
|
346
|
-
}
|
|
347
|
-
function removeOrphanedBindings(workflow, deletedNodeKeys, remainingNodes, bindings) {
|
|
348
|
-
if (deletedNodeKeys.size === 0 || bindings.length === 0)
|
|
349
|
-
return 0;
|
|
350
|
-
const defs = workflow.definitions ?? [];
|
|
351
|
-
const remainingKeys = new Set;
|
|
352
|
-
for (const node of remainingNodes) {
|
|
353
|
-
for (const key of collectNodeBindingResourceKeys(node, bindings, defs)) {
|
|
354
|
-
remainingKeys.add(key);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
const before = bindings.length;
|
|
358
|
-
workflow.bindings = bindings.filter((b) => !deletedNodeKeys.has(b.resourceKey) || remainingKeys.has(b.resourceKey));
|
|
359
|
-
return before - workflow.bindings.length;
|
|
360
|
-
}
|
|
361
|
-
function connectorConnectionBindingName(node, definitions) {
|
|
362
|
-
if (!node.type.startsWith("uipath.connector"))
|
|
363
|
-
return "";
|
|
364
|
-
const def = definitions.find((d) => d.nodeType === node.type);
|
|
365
|
-
const context = def?.model?.context;
|
|
366
|
-
const connectorKey = context?.find((c) => c.name === "connectorKey")?.value;
|
|
367
|
-
return typeof connectorKey === "string" && connectorKey.length > 0 ? `${connectorKey} connection` : "";
|
|
368
|
-
}
|
|
369
|
-
function removeOrphanedConnectorStub(workflow, deletedNode, remainingNodes, definitions) {
|
|
370
|
-
const stubName = connectorConnectionBindingName(deletedNode, definitions);
|
|
371
|
-
if (!stubName)
|
|
372
|
-
return 0;
|
|
373
|
-
const stillOwned = remainingNodes.some((n) => connectorConnectionBindingName(n, definitions) === stubName);
|
|
374
|
-
if (stillOwned)
|
|
375
|
-
return 0;
|
|
376
|
-
const bindings = workflow.bindings ?? [];
|
|
377
|
-
if (bindings.length === 0)
|
|
378
|
-
return 0;
|
|
379
|
-
const before = bindings.length;
|
|
380
|
-
workflow.bindings = bindings.filter((b) => !(b.resource?.toLowerCase() === "connection" && b.propertyAttribute === "ConnectionId" && !b.resourceKey && !b.default && b.name === stubName));
|
|
381
|
-
return before - workflow.bindings.length;
|
|
382
|
-
}
|
|
383
|
-
function removeOrphanedDefinitions(workflow, remainingNodes) {
|
|
384
|
-
const definitions = workflow.definitions ?? [];
|
|
385
|
-
const usedKeys = new Set(remainingNodes.map((n) => `${n.type}:${n.typeVersion}`));
|
|
386
|
-
const before = definitions.length;
|
|
387
|
-
workflow.definitions = definitions.filter((d) => usedKeys.has(`${d.nodeType}:${d.version}`));
|
|
388
|
-
return before - workflow.definitions.length;
|
|
389
|
-
}
|
|
390
|
-
function removeVariableUpdates(workflow, nodeId) {
|
|
391
|
-
const variables = workflow.variables;
|
|
392
|
-
if (!variables?.variableUpdates)
|
|
393
|
-
return 0;
|
|
394
|
-
const updates = variables.variableUpdates[nodeId];
|
|
395
|
-
if (!updates)
|
|
396
|
-
return 0;
|
|
397
|
-
const count = updates.length;
|
|
398
|
-
delete variables.variableUpdates[nodeId];
|
|
399
|
-
return count;
|
|
400
|
-
}
|
|
401
|
-
function removeNodeVariables(workflow, nodeId) {
|
|
402
|
-
const variables = workflow.variables;
|
|
403
|
-
if (!variables?.nodes)
|
|
404
|
-
return 0;
|
|
405
|
-
const before = variables.nodes.length;
|
|
406
|
-
variables.nodes = variables.nodes.filter((v) => v.binding.nodeId !== nodeId);
|
|
407
|
-
return before - variables.nodes.length;
|
|
408
|
-
}
|
|
409
|
-
var deleteNodeFromFlow = async (filePath, nodeId) => {
|
|
410
|
-
const { workflow, refMap } = await readFlowWorkflow(filePath);
|
|
411
|
-
const nodes = workflow.nodes;
|
|
412
|
-
const nodeIndex = nodes.findIndex((n) => n.id === nodeId);
|
|
413
|
-
if (nodeIndex === -1) {
|
|
414
|
-
const available = nodes.map((n) => n.id).join(", ") || "(none)";
|
|
415
|
-
throw new Error(`Node not found: "${nodeId}". Available node IDs: ${available}`);
|
|
416
|
-
}
|
|
417
|
-
const targetNode = nodes[nodeIndex];
|
|
418
|
-
const deletedWasProcessNode = isProcessNode({ nodeType: targetNode.type });
|
|
419
|
-
const deletedNode = {
|
|
420
|
-
id: targetNode.id,
|
|
421
|
-
type: targetNode.type,
|
|
422
|
-
label: targetNode.display.label ?? "",
|
|
423
|
-
position: targetNode.ui.position
|
|
424
|
-
};
|
|
425
|
-
const bindings = workflow.bindings ?? [];
|
|
426
|
-
const definitions = workflow.definitions ?? [];
|
|
427
|
-
const deletedNodeResourceKeys = collectNodeBindingResourceKeys(targetNode, bindings, definitions);
|
|
428
|
-
nodes.splice(nodeIndex, 1);
|
|
429
|
-
const edgesRemoved = removeConnectedEdges(workflow, nodeId);
|
|
430
|
-
const bindingsRemoved = removeOrphanedBindings(workflow, deletedNodeResourceKeys, nodes, bindings) + removeOrphanedConnectorStub(workflow, targetNode, nodes, definitions);
|
|
431
|
-
const definitionsRemoved = removeOrphanedDefinitions(workflow, nodes);
|
|
432
|
-
const variablesRemoved = removeNodeVariables(workflow, nodeId);
|
|
433
|
-
const variableUpdatesRemoved = removeVariableUpdates(workflow, nodeId);
|
|
434
|
-
await writeFlowWorkflow(filePath, workflow, refMap);
|
|
435
|
-
if (deletedWasProcessNode || bindingsRemoved > 0) {
|
|
436
|
-
const fs = getFileSystem();
|
|
437
|
-
const [regenErr] = await catchError(regenerateBindingsFile(fs, filePath));
|
|
438
|
-
if (regenErr) {
|
|
439
|
-
logger.warn(`Failed to regenerate bindings_v2.json after deleting ${targetNode.type}: ${regenErr.message}`);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
return {
|
|
443
|
-
deletedNode,
|
|
444
|
-
edgesRemoved,
|
|
445
|
-
bindingsRemoved,
|
|
446
|
-
definitionsRemoved,
|
|
447
|
-
variablesRemoved,
|
|
448
|
-
variableUpdatesRemoved
|
|
449
|
-
};
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
export { NodeTypeNotFoundError, NodeTypeNotEnabledError, SourceRequiredError, listNodesInFlow, PROCESS_NODE_PREFIXES, isProcessNode, resolveProcessTarget, resolveProcessTargetKey, ensureProcessBindings, collectNodeBindingResourceKeys, addNodeToFlow, deleteNodeFromFlow };
|
|
453
|
-
|
|
454
|
-
//# debugId=7C1335F81DD3712164756E2164756E21
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
catchError
|
|
3
|
-
} from "./packager-tool-02f63a08.js";
|
|
4
|
-
|
|
5
|
-
// src/services/flow-eval-file-store.ts
|
|
6
|
-
async function ensureDirectory(fs, path) {
|
|
7
|
-
if (await fs.exists(path)) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
const parent = fs.path.dirname(path);
|
|
11
|
-
if (parent && parent !== path && !await fs.exists(parent)) {
|
|
12
|
-
await ensureDirectory(fs, parent);
|
|
13
|
-
}
|
|
14
|
-
const [error] = await catchError(fs.mkdir(path));
|
|
15
|
-
if (error && !await fs.exists(path)) {
|
|
16
|
-
throw error;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
class FlowEvalFileStore {
|
|
21
|
-
fs;
|
|
22
|
-
constructor(fs) {
|
|
23
|
-
this.fs = fs;
|
|
24
|
-
}
|
|
25
|
-
async readJsonFiles(dir) {
|
|
26
|
-
const [readDirError, files] = await catchError(this.fs.readdir(dir));
|
|
27
|
-
if (readDirError) {
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
const items = [];
|
|
31
|
-
for (const file of files) {
|
|
32
|
-
if (!file.endsWith(".json")) {
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
const filePath = this.fs.path.join(dir, file);
|
|
36
|
-
const [readError, raw] = await catchError(this.fs.readFile(filePath, "utf-8"));
|
|
37
|
-
if (readError) {
|
|
38
|
-
throw new Error(`Failed to read JSON file "${filePath}": ${readError.message}`);
|
|
39
|
-
}
|
|
40
|
-
if (raw === null) {
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
const [parseError, data] = catchError(() => JSON.parse(String(raw)));
|
|
44
|
-
if (parseError) {
|
|
45
|
-
throw new Error(`Invalid JSON in "${filePath}": ${parseError.message}`);
|
|
46
|
-
}
|
|
47
|
-
data.fileName = file;
|
|
48
|
-
items.push(data);
|
|
49
|
-
}
|
|
50
|
-
return items;
|
|
51
|
-
}
|
|
52
|
-
async writeJsonFile(path, value) {
|
|
53
|
-
await ensureDirectory(this.fs, this.fs.path.dirname(path));
|
|
54
|
-
await this.fs.writeFile(path, `${JSON.stringify(value, null, 2)}
|
|
55
|
-
`);
|
|
56
|
-
}
|
|
57
|
-
async remove(path) {
|
|
58
|
-
await this.fs.rm(path);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { ensureDirectory, FlowEvalFileStore };
|
|
63
|
-
|
|
64
|
-
//# debugId=2DF0307602E51A6664756E2164756E21
|