@uipath/case-tool 1.205.0-preview.277 → 1.206.0-preview.279
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD-PARTY-NOTICES.md +68 -7
- package/dist/applicationinsights-web-8m26566f.js +17209 -0
- package/dist/{authoring-kqh34zzm.js → authoring-vg90pqrn.js} +488 -213
- package/dist/bindings-v2-1da35xsc.js +27 -0
- package/dist/{browser-strategy-6atc7v8s.js → browser-strategy-627rrg7z.js} +6 -7
- package/dist/{business-rule-export-ey588rv7.js → business-rule-export-jv60r9jf.js} +3 -7
- package/dist/carry-forward-sfdnta6q.js +52 -0
- package/dist/{case-api-sme7esce.js → case-api-by95rf40.js} +38 -37
- package/dist/{case-bindings-service-cht20gqt.js → case-bindings-service-pp3c9g1e.js} +93 -45
- package/dist/{case-debug-solution-projects-zy1snze0.js → case-debug-solution-projects-zhnn53e5.js} +3 -7
- package/dist/{case-debug-studio-web-service-tp28gt75.js → case-debug-studio-web-service-fvj41xrq.js} +48 -45
- package/dist/{case-described-io-service-dx1f4nxe.js → case-described-io-service-tsm8r189.js} +33 -15
- package/dist/case-event-trigger-bindings-qbs8ywf5.js +17 -0
- package/dist/{case-format-service-6aew6tqc.js → case-format-service-3sab2297.js} +9 -10
- package/dist/{case-pack-service-pqq8wnfd.js → case-pack-service-txnv711n.js} +47 -42
- package/dist/case-schema-version-cw0h2nrv.js +18 -0
- package/dist/case-shape-reader-xaxmrd40.js +14 -0
- package/dist/{case-splice-service-s5gccctq.js → case-splice-service-6y35w83e.js} +139 -51
- package/dist/{case-validate-service-g5fpq7xa.js → case-validate-service-4zdx7d2w.js} +234 -170
- package/dist/connector-enrichment-service-mws6z0hw.js +56 -0
- package/dist/connector-library-1yw5r47w.js +99 -0
- package/dist/connector-lookup-service-0t7ydz3t.js +20 -0
- package/dist/connector-task-shape-bgywpbqc.js +13 -0
- package/dist/{de-WLW6KWOJ-2qnsqdtw.js → de-2BEKRUMY-x4dx0nn9.js} +190 -10
- package/dist/{de-UZI7FJDO-mwvc4cxe.js → de-AI7ML6JM-km47f8k4.js} +20 -5
- package/dist/debug-service-h4jxbn1r.js +56 -0
- package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/en-LAVDF7IQ-yzy20n6d.js +254 -0
- package/dist/en-X6T4SP2Y-xm47mf18.js +2752 -0
- package/dist/{enrichment-service-hv7ff88p.js → enrichment-service-wpprec7k.js} +36 -37
- package/dist/{es-5THCNRFN-tqwyrdgy.js → es-7ZTQTGKN-11sj0yjx.js} +190 -10
- package/dist/{es-MX-5RELIXKI-9jhqtddc.js → es-MX-7KJZPEQN-1fq0a9jr.js} +20 -5
- package/dist/{es-MX-TWZBRAXK-gqd9swzw.js → es-MX-IHGRIEWH-g63p0gb4.js} +191 -11
- package/dist/{es-4UBUTCQA-m1ytpyx2.js → es-SPNKTD5Y-vw5cbgv5.js} +20 -5
- package/dist/filter-engine-dh9s90gb.js +10 -0
- package/dist/first-party-service-ahcc6xc6.js +8 -0
- package/dist/{fr-CERONSRC-edpxhbmb.js → fr-7ZDL4MVO-pd27vwh6.js} +191 -11
- package/dist/{fr-VBM5WRC2-63z7w4mh.js → fr-AXJGUT53-hdg3pmd4.js} +20 -5
- package/dist/index-21kns9qg.js +10 -0
- package/dist/{index-fyc0k5dd.js → index-5pzp2qeb.js} +5350 -3271
- package/dist/{index-5dxh9z60.js → index-a7y7etmy.js} +6 -5
- package/dist/{index-ekwtgx7y.js → index-ec115v05.js} +309 -287
- package/dist/{connector-task-spec-jpsjxnas.js → index-n4g6qvab.js} +320 -144
- package/dist/index-nj3axvya.js +159 -0
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-pg9wmyrf.js +36 -0
- package/dist/index-sgpbvm8j.js +26 -0
- package/dist/index-t0sz0svn.js +35 -0
- package/dist/index-z2qk2qn6.js +24 -0
- package/dist/index.js +19 -25
- package/dist/index.umd.min-ttg1qc0x.js +7814 -0
- package/dist/{init-entry-points-hhpv3e3f.js → init-entry-points-pc128f7z.js} +22 -35
- package/dist/input-reader-9ym8mkbc.js +10 -0
- package/dist/{ja-43QL7CGO-c3q8gre9.js → ja-C7GZV6YP-hvtbngr5.js} +20 -5
- package/dist/{ja-U2MCNHGT-gz0ap1jk.js → ja-LGAM5HKR-sgrtjqjh.js} +190 -10
- package/dist/{jmespath-e4a59c8w.js → jmespath-wwym30dp.js} +1 -1
- package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/known-types-gak9by1w.js +11 -0
- package/dist/{ko-XAUYQWDR-zp81gjp4.js → ko-7B4SUZB7-c8wr20sc.js} +190 -10
- package/dist/{ko-TLL6Z6CD-wrt3n8a9.js → ko-Q24HSSL4-5vn55pte.js} +20 -5
- package/dist/localSolutionDiscovery-48d1bnkj.js +15 -0
- package/dist/{migration-diagnosis-ns5cw4e3.js → migration-diagnosis-myqqgwj0.js} +1 -4
- package/dist/{node-strategy-v442hwgd.js → node-strategy-2mqzg36t.js} +15 -18
- package/dist/node-sync-service-tr5m22nb.js +56 -0
- package/dist/{out-target-wjgmna0r.js → out-target-eqsttq1k.js} +18 -22
- package/dist/{packager-tool-f8vwy92w.js → packager-tool-0te1tyhf.js} +186 -16
- package/dist/{packager-tool-ydyvtknp.js → packager-tool-0w4fsdzv.js} +44 -20
- package/dist/{packager-tool-8ftat1vn.js → packager-tool-17b466mr.js} +59158 -59666
- package/dist/packager-tool-1nfdj0zm.js +425 -0
- package/dist/packager-tool-1wgav5ma.js +139 -0
- package/dist/{packager-tool-scc247gk.js → packager-tool-32792w66.js} +66 -82
- package/dist/{packager-tool-nj4seavy.js → packager-tool-35c9npcy.js} +26 -7
- package/dist/{packager-tool-r0x3qh59.js → packager-tool-388vyja1.js} +185 -29
- package/dist/packager-tool-3m8482sw.js +78 -0
- package/dist/packager-tool-3r23qsca.js +4832 -0
- package/dist/packager-tool-4avchhz8.js +539 -0
- package/dist/{packager-tool-29br2cdx.js → packager-tool-4wn3b7qp.js} +252 -468
- package/dist/{packager-tool-jr8x285x.js → packager-tool-5jt5rc2g.js} +630 -689
- package/dist/{packager-tool-9kvkzc05.js → packager-tool-5w0gjcck.js} +4 -4
- package/dist/packager-tool-68648y3j.js +6 -0
- package/dist/{packager-tool-1yh8g550.js → packager-tool-6an893wm.js} +12 -3
- package/dist/{packager-tool-aagnvyba.js → packager-tool-76zhn5pa.js} +131 -432
- package/dist/packager-tool-7x1tmb8a.js +46 -0
- package/dist/{packager-tool-kyrm4e5m.js → packager-tool-9ar5829n.js} +781 -741
- package/dist/{packager-tool-4p11fvf4.js → packager-tool-b2q8m9pq.js} +10 -13
- package/dist/packager-tool-bg3tdpva.js +27 -0
- package/dist/packager-tool-bpkkg4z2.js +295 -0
- package/dist/{packager-tool-yn33pw57.js → packager-tool-dn9d4ywm.js} +246 -225
- package/dist/{packager-tool-kdhey8gz.js → packager-tool-e02jkmrq.js} +41 -29
- package/dist/{packager-tool-sq931c23.js → packager-tool-e1tx5mqg.js} +1 -1
- package/dist/packager-tool-gt3bsmfp.js +1302 -0
- package/dist/packager-tool-gy4yjqhf.js +178 -0
- package/dist/packager-tool-h2ar8xf8.js +222 -0
- package/dist/{packager-tool-v2kcgjbf.js → packager-tool-j6nfje7t.js} +5 -4
- package/dist/packager-tool-kz7zz79p.js +71 -0
- package/dist/{packager-tool-9e59z4d6.js → packager-tool-me8gd22q.js} +82 -83
- package/dist/packager-tool-mk9fmzdy.js +20 -0
- package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
- package/dist/{packager-tool-xm3gr7d4.js → packager-tool-nd312sma.js} +32 -15
- package/dist/{packager-tool-mqy97y5f.js → packager-tool-p5gs9xqy.js} +14 -14
- package/dist/{packager-tool-83v804p7.js → packager-tool-psmb758n.js} +3108 -2627
- package/dist/packager-tool-q26hncjr.js +13 -0
- package/dist/packager-tool-q9fnx278.js +77 -0
- package/dist/{packager-tool-ezds6t5e.js → packager-tool-s12s1dp6.js} +11 -11
- package/dist/packager-tool-scy94jyb.js +5424 -0
- package/dist/{packager-tool-yn7r7zq2.js → packager-tool-snesn0bt.js} +177 -96
- package/dist/{packager-tool-d8e2mrkq.js → packager-tool-tgehy324.js} +56 -56
- package/dist/{packager-tool-tqn0j6f9.js → packager-tool-v11fx4dk.js} +7 -7
- package/dist/{packager-tool-67vy1fz3.js → packager-tool-v6rkp2ay.js} +24 -92
- package/dist/{packager-tool-9sd483vs.js → packager-tool-vs7gqa4r.js} +15 -15
- package/dist/packager-tool-vyavrbym.js +488 -0
- package/dist/{packager-tool-b098y4a2.js → packager-tool-wbksf242.js} +97 -97
- package/dist/{packager-tool-g8nkdj5b.js → packager-tool-x1f8ypvs.js} +256 -486
- package/dist/{packager-tool-2sn7d8fd.js → packager-tool-x74mmjkw.js} +9 -13
- package/dist/{packager-tool-7hw344bt.js → packager-tool-xb16e3tz.js} +5 -5
- package/dist/{packager-tool-a17g0pj1.js → packager-tool-xd1wbvay.js} +10 -8
- package/dist/{packager-tool-1yfw674x.js → packager-tool-xehhk3c3.js} +10 -5
- package/dist/packager-tool-yh8mmj3p.js +123 -0
- package/dist/{packager-tool-hdxtgckw.js → packager-tool-z070caqq.js} +56 -12
- package/dist/{packager-tool-b250k6w4.js → packager-tool-z1fw9a8v.js} +41 -9
- package/dist/{packager-tool-0gctz400.js → packager-tool-z9fmqtm6.js} +4 -4
- package/dist/{packager-tool-mzf4gmph.js → packager-tool-zbx189j3.js} +11 -8
- package/dist/{packager-tool-zf8f9pmm.js → packager-tool-zrbnms9b.js} +3 -4
- package/dist/packager-tool.js +10 -11
- package/dist/prepare-uip-ad7mfs8t.js +92 -0
- package/dist/{project-artifacts-bgyyb0dm.js → project-artifacts-q0c0zghw.js} +2 -6
- package/dist/{pt-BR-USP2T7GD-pedn77m1.js → pt-BR-BIUJXIPU-2sqzhr8y.js} +20 -5
- package/dist/{pt-BR-GNQNAAZ2-xadharv4.js → pt-BR-PHLFHMXZ-n6de4s7z.js} +191 -11
- package/dist/{pt-RMIAKZB4-67enhx3m.js → pt-MHX6JGAX-xfgvdqwg.js} +20 -5
- package/dist/{pt-TO2DARY2-ftcce1bv.js → pt-N7ZTJT4W-d6c67xcn.js} +190 -10
- package/dist/{resolved-check-aqw7568y.js → resolved-check-dz8eqrf6.js} +2 -3
- package/dist/{resourcesSyncService-k9kw8d9b.js → resourcesSyncService-sgnkcvpt.js} +81 -141
- package/dist/{ro-GHOBYW2S-mhnqsgaa.js → ro-3RKJNGJZ-xqj14e3d.js} +20 -5
- package/dist/{ro-WUYJV6OW-a8d9qy1n.js → ro-FLNXVYJI-ytrwabg2.js} +190 -10
- package/dist/ru-GSCT4ARZ-c2cfq4h1.js +7 -0
- package/dist/ru-WBLQ5B2U-bf20yr5y.js +7 -0
- package/dist/{rule-group-members-zje7n3kf.js → rule-group-members-p0nv1rmj.js} +1 -3
- package/dist/rule-type-declaration-s2nxpcfy.js +77 -0
- package/dist/{sdd-convert-service-8jpew7vz.js → sdd-convert-service-ffbx00k6.js} +481 -504
- package/dist/{sdd-lookup-fe900sdb.js → sdd-lookup-sah7wj5j.js} +8 -9
- package/dist/{sdd-resolve-service-qdtmxw9b.js → sdd-resolve-service-6nt10vhq.js} +28 -20
- package/dist/{sdd-resolve-siblings-phvwaj6j.js → sdd-resolve-siblings-5q28qcw8.js} +11 -14
- package/dist/solution-auth-a1p22hq1.js +11 -0
- package/dist/solution-discovery-r1y550sz.js +33 -0
- package/dist/{strict-case-rules-4tjcaznr.js → strict-case-rules-045kbjvv.js} +16 -28
- package/dist/{strict-entry-points-g2pd4mf4.js → strict-entry-points-40ha9afz.js} +15 -14
- package/dist/strict-sdd-audit-bp7fq2tg.js +26 -0
- package/dist/{task-selector-8bjn35dv.js → task-selector-jt60hdbt.js} +1 -3
- package/dist/{task-type-declaration-7a8fqdvs.js → task-type-declaration-yhczvj05.js} +9 -9
- package/dist/tool.js +18 -24
- package/dist/{tr-M3F5A6AU-bb0tg39m.js → tr-7AIZZWZ6-pdzp9n0p.js} +190 -10
- package/dist/{tr-GDTLECMM-k5fhmq13.js → tr-PQLUUHPC-qsb7btxn.js} +20 -5
- package/dist/{trigger-enrichment-service-82kcr49v.js → trigger-enrichment-service-r4gmxvka.js} +53 -57
- package/dist/trigger-entry-point-id-751v48qd.js +14 -0
- package/dist/{zh-CN-C5G4PC7C-ds9gkptg.js → zh-CN-CN2ARPFS-e0p2qrxf.js} +190 -10
- package/dist/{zh-CN-I5D7WHBD-sr5h0a98.js → zh-CN-OHNTHZRI-b0hjkfqn.js} +20 -5
- package/dist/{zh-TW-62HZIG6O-787kdwex.js → zh-TW-7RUFEVFK-qd7myw31.js} +190 -10
- package/dist/{zh-TW-2AVLM723-288pkc1z.js → zh-TW-E4D3Y6ZR-tn3bmzz5.js} +20 -5
- package/package.json +2 -2
- package/dist/canvas-notes-86fxx1t8.js +0 -19
- package/dist/case-event-trigger-bindings-g9ftnm4x.js +0 -16
- package/dist/case-schema-version-h820ne16.js +0 -20
- package/dist/case-shape-reader-dsbraetf.js +0 -13
- package/dist/connector-enrichment-service-95bqb0tb.js +0 -65
- package/dist/connector-lookup-service-3qx1qwrx.js +0 -22
- package/dist/connector-task-shape-mpazkf7s.js +0 -14
- package/dist/debug-service-7q98j726.js +0 -59
- package/dist/en-EJCBA3LK-dtpdghgj.js +0 -146
- package/dist/en-M7GQYBV2-5nfmpnfz.js +0 -2018
- package/dist/filter-engine-7ep90g7f.js +0 -11
- package/dist/first-party-service-srxaftkn.js +0 -27
- package/dist/index-04w3bbe8.js +0 -666
- package/dist/index-kmp9fmhb.js +0 -25
- package/dist/index-m93xazb6.js +0 -282
- package/dist/index-n9qvnx4x.js +0 -29
- package/dist/index-ngs0a2he.js +0 -15
- package/dist/index-xq6ajhgq.js +0 -157
- package/dist/index.umd.min-fqefd9kn.js +0 -7814
- package/dist/input-reader-c7wz8ra2.js +0 -11
- package/dist/known-types-5b6yrsqn.js +0 -16
- package/dist/localSolutionDiscovery-yyx234ak.js +0 -13
- package/dist/node-sync-service-ewkg1pgk.js +0 -57
- package/dist/packager-tool-0fsh78kt.js +0 -5365
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-6z1hsm2h.js +0 -143
- package/dist/packager-tool-8y4pceec.js +0 -13189
- package/dist/packager-tool-93mdeqay.js +0 -18
- package/dist/packager-tool-9kf3fqtr.js +0 -23
- package/dist/packager-tool-bfgdz1zh.js +0 -73
- package/dist/packager-tool-e15kqpyh.js +0 -266
- package/dist/packager-tool-jysvpt8p.js +0 -11
- package/dist/packager-tool-pcvhcn2k.js +0 -2019
- package/dist/packager-tool-rk25wp3c.js +0 -28
- package/dist/packager-tool-sc961w0q.js +0 -16
- package/dist/packager-tool-wekqkmgn.js +0 -265
- package/dist/packager-tool-yc4kw997.js +0 -13
- package/dist/ru-GSCT4ARZ-1sa9wbr8.js +0 -10
- package/dist/ru-WBLQ5B2U-s4em88p0.js +0 -10
- package/dist/solution-auth-30yycqtv.js +0 -14
- package/dist/solution-discovery-e9mamp6w.js +0 -38
- package/dist/strict-sdd-audit-q7tb9yj7.js +0 -25
- package/dist/trigger-entry-point-id-yhqwnkx9.js +0 -15
- /package/dist/{packager-tool-5qp9xza1.js → packager-tool-1c30ttpm.js} +0 -0
- /package/dist/{packager-tool-mknccck5.js → packager-tool-1h7abxw6.js} +0 -0
- /package/dist/{packager-tool-9y1w2wds.js → packager-tool-fcektt1g.js} +0 -0
- /package/dist/{packager-tool-k6jbedyc.js → packager-tool-hcdnc420.js} +0 -0
- /package/dist/{packager-tool-7nxppa3d.js → packager-tool-jv5byaww.js} +0 -0
- /package/dist/{packager-tool-qa9gftnj.js → packager-tool-mxgybnmt.js} +0 -0
- /package/dist/{packager-tool-87y6xw3a.js → packager-tool-nfhtwa72.js} +0 -0
- /package/dist/{packager-tool-cv05dwac.js → packager-tool-p0rdmmvk.js} +0 -0
- /package/dist/{packager-tool-21qfsbxn.js → packager-tool-yaertxsw.js} +0 -0
|
@@ -1,76 +1,51 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./packager-tool-
|
|
2
|
+
getFileSystem2
|
|
3
|
+
} from "./packager-tool-z070caqq.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
catchError2,
|
|
6
|
+
carriedErrorCode,
|
|
7
7
|
RESULTS,
|
|
8
|
-
|
|
8
|
+
Option,
|
|
9
9
|
getOutputSink,
|
|
10
10
|
pascalCaseDataKeys,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
OutputFormatter,
|
|
12
|
+
tokenizeTail,
|
|
13
|
+
processContext,
|
|
14
|
+
namedOrLegacy,
|
|
15
|
+
legacySecondArg,
|
|
16
|
+
usageError,
|
|
17
|
+
addDeprecatedOptionAlias
|
|
18
|
+
} from "./packager-tool-psmb758n.js";
|
|
13
19
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (typeof value === "string") {
|
|
21
|
-
argv.push(flag, value);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
20
|
+
NAME_BOUND_TASK_TYPES,
|
|
21
|
+
BINDING_REFERENCE_PREFIX
|
|
22
|
+
} from "./packager-tool-nfhtwa72.js";
|
|
23
|
+
import {
|
|
24
|
+
resolveMaestroRegistry
|
|
25
|
+
} from "./packager-tool-s12s1dp6.js";
|
|
24
26
|
|
|
25
|
-
// ../builder-sdk/src/
|
|
27
|
+
// ../builder-sdk/src/node-runner.ts
|
|
26
28
|
import { spawn as spawn2 } from "node:child_process";
|
|
27
29
|
import { createRequire } from "node:module";
|
|
28
30
|
import { StringDecoder } from "node:string_decoder";
|
|
29
31
|
|
|
30
|
-
// ../builder-sdk/src/
|
|
31
|
-
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
if (prefix.trim() !== "") {
|
|
37
|
-
return Promise.resolve(process.platform === "win32" ? getFileSystem().path.join(prefix, "node_modules") : getFileSystem().path.join(prefix, "lib", "node_modules"));
|
|
38
|
-
}
|
|
39
|
-
npmRootLookup ??= runNpmRootGlobal();
|
|
40
|
-
return npmRootLookup;
|
|
32
|
+
// ../builder-sdk/src/runner.ts
|
|
33
|
+
var RUNNER_KEY = Symbol.for("@uipath/builder-sdk/flow-sdk-runner");
|
|
34
|
+
var RUNNER_OPTIONS_KEY = Symbol.for("@uipath/builder-sdk/flow-sdk-runner-options");
|
|
35
|
+
var IN_PROCESS_UIP_KEY = Symbol.for("@uipath/builder-sdk/in-process-uip");
|
|
36
|
+
function inProcessUip() {
|
|
37
|
+
return globalThis[IN_PROCESS_UIP_KEY];
|
|
41
38
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const proc = process.platform === "win32" ? spawn("npm root -g", [], onWindows) : spawn("npm", ["root", "-g"], { stdio });
|
|
47
|
-
let stdout = "";
|
|
48
|
-
proc.stdout?.on("data", (d) => {
|
|
49
|
-
stdout += d.toString();
|
|
50
|
-
});
|
|
51
|
-
const timer = setTimeout(() => {
|
|
52
|
-
proc.kill("SIGTERM");
|
|
53
|
-
resolve(null);
|
|
54
|
-
}, NPM_ROOT_TIMEOUT_MS);
|
|
55
|
-
proc.on("error", () => {
|
|
56
|
-
clearTimeout(timer);
|
|
57
|
-
resolve(null);
|
|
58
|
-
});
|
|
59
|
-
proc.on("close", (code) => {
|
|
60
|
-
clearTimeout(timer);
|
|
61
|
-
const root = stdout.trim();
|
|
62
|
-
resolve(code === 0 && root && !root.includes("***") ? root : null);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
39
|
+
function registerFlowSdkRunner(runner, options = {}) {
|
|
40
|
+
const slot = globalThis;
|
|
41
|
+
slot[RUNNER_KEY] = runner;
|
|
42
|
+
slot[RUNNER_OPTIONS_KEY] = options;
|
|
65
43
|
}
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return prefix;
|
|
44
|
+
function flowSdkRunner() {
|
|
45
|
+
return globalThis[RUNNER_KEY];
|
|
46
|
+
}
|
|
47
|
+
function flowSdkRunnerOptions() {
|
|
48
|
+
return globalThis[RUNNER_OPTIONS_KEY] ?? {};
|
|
74
49
|
}
|
|
75
50
|
|
|
76
51
|
// ../builder-sdk/src/delegate.ts
|
|
@@ -80,6 +55,7 @@ var FLOW_SDK_PACKAGE = {
|
|
|
80
55
|
};
|
|
81
56
|
var BPMN_CONNECTOR_OPTIONS_VERSION = "6.15.0";
|
|
82
57
|
var FLOW_MERGE_STRICT_VERSION = "6.20.0";
|
|
58
|
+
var FLOW_DECOMPILE_SCRIPTS_VERSION = "6.57.0";
|
|
83
59
|
var CASE_CONNECTOR_OPTIONS_VERSION = "6.18.1";
|
|
84
60
|
function commandLabel(family, verb) {
|
|
85
61
|
return `uip maestro ${family} ${verb}`;
|
|
@@ -107,6 +83,10 @@ function versionMeetsFloor(version, floor) {
|
|
|
107
83
|
}
|
|
108
84
|
return !installed[3] || minimum[3];
|
|
109
85
|
}
|
|
86
|
+
function belowFloorMessage(label, version) {
|
|
87
|
+
const { name, minimumVersion } = FLOW_SDK_PACKAGE;
|
|
88
|
+
return `${label}: found ${name} ${version || "with no valid version"}; need >= ${minimumVersion}.`;
|
|
89
|
+
}
|
|
110
90
|
var FLOW_SDK_INVOKED_AS = "uip maestro";
|
|
111
91
|
function resultCode(family, verb) {
|
|
112
92
|
return [family, verb].map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
@@ -139,7 +119,250 @@ function failureReason(out, err) {
|
|
|
139
119
|
`).filter((line) => line.trim() !== "");
|
|
140
120
|
return lines.at(-1)?.trim() ?? out.trim();
|
|
141
121
|
}
|
|
142
|
-
function
|
|
122
|
+
function outcomeResult(outcome, label, found) {
|
|
123
|
+
if (outcome.kind === "spawn-error") {
|
|
124
|
+
return {
|
|
125
|
+
ok: false,
|
|
126
|
+
exitCode: 1,
|
|
127
|
+
result: RESULTS.Failure,
|
|
128
|
+
message: `${label}: ${outcome.message}`,
|
|
129
|
+
instructions: outcome.instructions ?? (found === "host" ? `This host could not start ${FLOW_SDK_PACKAGE.name}. Report it to the host; retrying will fail the same way.` : "Check that node is on PATH, then retry.")
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
const { exitCode, signal, out, err } = outcome;
|
|
133
|
+
if (exitCode === 0) {
|
|
134
|
+
return { ok: true, data: stdoutAsData(out) };
|
|
135
|
+
}
|
|
136
|
+
if (exitCode !== null) {
|
|
137
|
+
const detail = failureReason(out, err) || `SDK exited with code ${exitCode}`;
|
|
138
|
+
return {
|
|
139
|
+
ok: false,
|
|
140
|
+
exitCode,
|
|
141
|
+
result: RESULTS.Failure,
|
|
142
|
+
message: `${label}: ${detail}`,
|
|
143
|
+
instructions: err ? "Fix what the builder SDK reported (on stderr, and in Message), then retry." : "Fix what the builder SDK reported (see Message), then retry.",
|
|
144
|
+
...out.trim() ? { data: stdoutAsData(out) } : {}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
ok: false,
|
|
149
|
+
exitCode: 1,
|
|
150
|
+
result: RESULTS.Failure,
|
|
151
|
+
message: `${label}: SDK process ended with signal ${signal ?? "unknown"}.`,
|
|
152
|
+
instructions: "Retry the command."
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function upgradeInstructions(found) {
|
|
156
|
+
if (found === "host") {
|
|
157
|
+
return `This host ships its own ${FLOW_SDK_PACKAGE.name}; it has to be updated there.`;
|
|
158
|
+
}
|
|
159
|
+
return found === "workspace" ? `npm install --save-dev ${FLOW_SDK_PACKAGE.name}@latest` : `npm install -g ${FLOW_SDK_PACKAGE.name}@latest`;
|
|
160
|
+
}
|
|
161
|
+
var LIBRARY_VERBS = new Set([
|
|
162
|
+
"flow compile",
|
|
163
|
+
"flow check",
|
|
164
|
+
"registry search",
|
|
165
|
+
"registry describe",
|
|
166
|
+
"registry pull"
|
|
167
|
+
]);
|
|
168
|
+
function pullAnswer(sha256, libraryJson) {
|
|
169
|
+
const sink = getOutputSink();
|
|
170
|
+
sink.writeErr(`registry pull: connector library ${sha256.slice(0, 12)}… is ready.
|
|
171
|
+
`);
|
|
172
|
+
sink.writeErr(`registry pull: write connector steps as connector('<key>', '<action>', …); typed ./connectors/<key>.ts modules do not exist here.
|
|
173
|
+
`);
|
|
174
|
+
return { ok: true, data: { sha256, library: libraryJson } };
|
|
175
|
+
}
|
|
176
|
+
async function runFlowSdk({
|
|
177
|
+
family,
|
|
178
|
+
commandVerb,
|
|
179
|
+
sdkVerb = commandVerb,
|
|
180
|
+
argv,
|
|
181
|
+
passthrough = [],
|
|
182
|
+
cwd,
|
|
183
|
+
requiresSdkVersion
|
|
184
|
+
}) {
|
|
185
|
+
const workspace = cwd ?? getFileSystem2().env.cwd();
|
|
186
|
+
const label = commandLabel(family, commandVerb);
|
|
187
|
+
const runner = flowSdkRunner();
|
|
188
|
+
if (!runner) {
|
|
189
|
+
return {
|
|
190
|
+
ok: false,
|
|
191
|
+
exitCode: 1,
|
|
192
|
+
result: RESULTS.ConfigError,
|
|
193
|
+
message: `${label}: this host has no way to run ${FLOW_SDK_PACKAGE.name}.`,
|
|
194
|
+
instructions: "Run the command with the uip CLI on a machine with Node.js."
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
const [locateError, resolution] = await catchError2(() => runner.locate(workspace, label));
|
|
198
|
+
if (locateError) {
|
|
199
|
+
return {
|
|
200
|
+
ok: false,
|
|
201
|
+
exitCode: 1,
|
|
202
|
+
result: RESULTS.ConfigError,
|
|
203
|
+
message: `${label}: could not locate ${FLOW_SDK_PACKAGE.name}: ${locateError.message}`,
|
|
204
|
+
instructions: `Check this host's ${FLOW_SDK_PACKAGE.name}, then retry.`
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
if (!resolution.ok) {
|
|
208
|
+
return {
|
|
209
|
+
ok: false,
|
|
210
|
+
exitCode: 1,
|
|
211
|
+
result: RESULTS.ConfigError,
|
|
212
|
+
message: resolution.message,
|
|
213
|
+
instructions: resolution.instructions
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
if (!versionMeetsFloor(resolution.version, FLOW_SDK_PACKAGE.minimumVersion)) {
|
|
217
|
+
return {
|
|
218
|
+
ok: false,
|
|
219
|
+
exitCode: 1,
|
|
220
|
+
result: RESULTS.ConfigError,
|
|
221
|
+
message: belowFloorMessage(label, resolution.version),
|
|
222
|
+
instructions: upgradeInstructions(resolution.found)
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
if (requiresSdkVersion && !versionMeetsFloor(resolution.version, requiresSdkVersion.version)) {
|
|
226
|
+
return {
|
|
227
|
+
ok: false,
|
|
228
|
+
exitCode: 1,
|
|
229
|
+
result: RESULTS.ConfigError,
|
|
230
|
+
message: `${label}: ${requiresSdkVersion.because} needs ${FLOW_SDK_PACKAGE.name} >= ${requiresSdkVersion.version}; found ${resolution.version}.`,
|
|
231
|
+
instructions: upgradeInstructions(resolution.found)
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
let library;
|
|
235
|
+
const libraryJson = getFileSystem2().env.getenv("FLOW_SDK_LIBRARY_JSON");
|
|
236
|
+
const { INHERITED_AUTH_PROFILE_ENV, getActiveAuthProfile } = await import("./index-nj3axvya.js");
|
|
237
|
+
const env = {
|
|
238
|
+
FLOW_SDK_INVOKED_AS,
|
|
239
|
+
[INHERITED_AUTH_PROFILE_ENV]: getActiveAuthProfile() ?? "",
|
|
240
|
+
...libraryJson ? { FLOW_SDK_LIBRARY_JSON: libraryJson } : {}
|
|
241
|
+
};
|
|
242
|
+
if (resolution.found === "host" && !libraryJson && LIBRARY_VERBS.has(`${family} ${sdkVerb}`)) {
|
|
243
|
+
const connectorLibrary = await import("./connector-library-1yw5r47w.js");
|
|
244
|
+
const [error, loaded] = await catchError2(connectorLibrary.sessionConnectorLibrary(flowSdkRunnerOptions().libraryUrl));
|
|
245
|
+
if (error) {
|
|
246
|
+
return {
|
|
247
|
+
ok: false,
|
|
248
|
+
exitCode: 1,
|
|
249
|
+
result: RESULTS.Failure,
|
|
250
|
+
errorCode: carriedErrorCode(error) ?? "network_error",
|
|
251
|
+
message: `${label}: could not get the connector library: ${error.message}`,
|
|
252
|
+
instructions: "Check that this host can reach the connector library download, then retry."
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
if (family === "registry" && sdkVerb === "pull") {
|
|
256
|
+
return pullAnswer(loaded.sha256, connectorLibrary.LIBRARY_JSON);
|
|
257
|
+
}
|
|
258
|
+
library = connectorLibrary.libraryMount(loaded);
|
|
259
|
+
env.FLOW_SDK_LIBRARY_JSON = connectorLibrary.LIBRARY_JSON;
|
|
260
|
+
}
|
|
261
|
+
const runUipInProcess = inProcessUip();
|
|
262
|
+
const prepare = resolution.found === "host" && family === "registry" && sdkVerb === "prepare" && runUipInProcess ? (await import("./prepare-uip-ad7mfs8t.js")).prepareUip(runUipInProcess) : undefined;
|
|
263
|
+
const sdkArgv = [...argv, "--json", ...passthrough];
|
|
264
|
+
const sink = getOutputSink();
|
|
265
|
+
const [runError, outcome] = await catchError2(() => runner.run(resolution, {
|
|
266
|
+
args: [family, sdkVerb, ...sdkArgv],
|
|
267
|
+
cwd: workspace,
|
|
268
|
+
env,
|
|
269
|
+
...library ? { library } : {},
|
|
270
|
+
...prepare ? { uip: prepare.uip } : {},
|
|
271
|
+
writeErr: (text) => sink.writeErr(text)
|
|
272
|
+
}));
|
|
273
|
+
prepare?.close();
|
|
274
|
+
await prepare?.settled();
|
|
275
|
+
return outcomeResult(runError ? { kind: "spawn-error", message: runError.message } : outcome, label, resolution.found);
|
|
276
|
+
}
|
|
277
|
+
async function delegateToMaestroBuilderSdk(request) {
|
|
278
|
+
const result = await runFlowSdk(request);
|
|
279
|
+
if (result.ok) {
|
|
280
|
+
let data = result.data;
|
|
281
|
+
const afterSuccess = request.afterSuccess;
|
|
282
|
+
if (afterSuccess) {
|
|
283
|
+
const [stepError, step] = await catchError2(() => afterSuccess(result.data));
|
|
284
|
+
const outcome = stepError ? {
|
|
285
|
+
ok: false,
|
|
286
|
+
message: stepError.message,
|
|
287
|
+
instructions: "The artifact was written; re-run the command once the cause is fixed."
|
|
288
|
+
} : step;
|
|
289
|
+
if (!outcome.ok) {
|
|
290
|
+
OutputFormatter.error({
|
|
291
|
+
Result: RESULTS.Failure,
|
|
292
|
+
Message: outcome.message,
|
|
293
|
+
Instructions: outcome.instructions,
|
|
294
|
+
...result.data ? { Data: pascalCaseDataKeys(result.data) } : {}
|
|
295
|
+
});
|
|
296
|
+
return 1;
|
|
297
|
+
}
|
|
298
|
+
if (outcome.data && data && !Array.isArray(data))
|
|
299
|
+
data = { ...data, ...outcome.data };
|
|
300
|
+
}
|
|
301
|
+
OutputFormatter.success({
|
|
302
|
+
Result: RESULTS.Success,
|
|
303
|
+
Code: resultCode(request.family, request.commandVerb),
|
|
304
|
+
Data: data
|
|
305
|
+
});
|
|
306
|
+
return 0;
|
|
307
|
+
}
|
|
308
|
+
OutputFormatter.error({
|
|
309
|
+
Result: result.result,
|
|
310
|
+
...result.errorCode ? { ErrorCode: result.errorCode } : {},
|
|
311
|
+
Message: result.message,
|
|
312
|
+
Instructions: result.instructions,
|
|
313
|
+
...result.data ? { Data: pascalCaseDataKeys(result.data) } : {}
|
|
314
|
+
});
|
|
315
|
+
return result.exitCode;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// ../builder-sdk/src/npm-global-root.ts
|
|
319
|
+
import { spawn } from "node:child_process";
|
|
320
|
+
var NPM_ROOT_TIMEOUT_MS = 5000;
|
|
321
|
+
var npmRootLookup;
|
|
322
|
+
function npmGlobalRoot() {
|
|
323
|
+
const prefix = npmConfigPrefix(process.env);
|
|
324
|
+
if (prefix.trim() !== "") {
|
|
325
|
+
return Promise.resolve(process.platform === "win32" ? getFileSystem2().path.join(prefix, "node_modules") : getFileSystem2().path.join(prefix, "lib", "node_modules"));
|
|
326
|
+
}
|
|
327
|
+
npmRootLookup ??= runNpmRootGlobal();
|
|
328
|
+
return npmRootLookup;
|
|
329
|
+
}
|
|
330
|
+
function runNpmRootGlobal() {
|
|
331
|
+
return new Promise((resolve) => {
|
|
332
|
+
const stdio = ["ignore", "pipe", "ignore"];
|
|
333
|
+
const onWindows = { shell: true, stdio, windowsHide: true };
|
|
334
|
+
const proc = process.platform === "win32" ? spawn("npm root -g", [], onWindows) : spawn("npm", ["root", "-g"], { stdio });
|
|
335
|
+
let stdout = "";
|
|
336
|
+
proc.stdout?.on("data", (d) => {
|
|
337
|
+
stdout += d.toString();
|
|
338
|
+
});
|
|
339
|
+
const timer = setTimeout(() => {
|
|
340
|
+
proc.kill("SIGTERM");
|
|
341
|
+
resolve(null);
|
|
342
|
+
}, NPM_ROOT_TIMEOUT_MS);
|
|
343
|
+
proc.on("error", () => {
|
|
344
|
+
clearTimeout(timer);
|
|
345
|
+
resolve(null);
|
|
346
|
+
});
|
|
347
|
+
proc.on("close", (code) => {
|
|
348
|
+
clearTimeout(timer);
|
|
349
|
+
const root = stdout.trim();
|
|
350
|
+
resolve(code === 0 && root && !root.includes("***") ? root : null);
|
|
351
|
+
});
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
function npmConfigPrefix(env) {
|
|
355
|
+
let prefix = "";
|
|
356
|
+
for (const [key, value] of Object.entries(env)) {
|
|
357
|
+
if (key.toLowerCase() === "npm_config_prefix" && value !== undefined) {
|
|
358
|
+
prefix = value;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return prefix;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// ../builder-sdk/src/node-runner.ts
|
|
365
|
+
function spawnSdk(cliPath, { args, cwd, env, writeErr }) {
|
|
143
366
|
return new Promise((settle) => {
|
|
144
367
|
let settled = false;
|
|
145
368
|
const resolve = (outcome) => {
|
|
@@ -150,10 +373,7 @@ function spawnSdk(cliPath, args, cwd) {
|
|
|
150
373
|
};
|
|
151
374
|
const child = spawn2("node", [cliPath, ...args], {
|
|
152
375
|
cwd,
|
|
153
|
-
env: {
|
|
154
|
-
...process.env,
|
|
155
|
-
FLOW_SDK_INVOKED_AS
|
|
156
|
-
},
|
|
376
|
+
env: { ...process.env, ...env },
|
|
157
377
|
stdio: ["inherit", "pipe", "pipe"]
|
|
158
378
|
});
|
|
159
379
|
const stdout = [];
|
|
@@ -161,7 +381,7 @@ function spawnSdk(cliPath, args, cwd) {
|
|
|
161
381
|
const decoderErr = new StringDecoder("utf8");
|
|
162
382
|
const writeLive = (text) => {
|
|
163
383
|
if (text)
|
|
164
|
-
|
|
384
|
+
writeErr(text);
|
|
165
385
|
};
|
|
166
386
|
child.stdout?.on("data", (chunk) => {
|
|
167
387
|
stdout.push(chunk);
|
|
@@ -187,43 +407,6 @@ function spawnSdk(cliPath, args, cwd) {
|
|
|
187
407
|
});
|
|
188
408
|
});
|
|
189
409
|
}
|
|
190
|
-
async function runChild(cliPath, args, cwd, label) {
|
|
191
|
-
const outcome = await spawnSdk(cliPath, args, cwd);
|
|
192
|
-
if (outcome.kind === "spawn-error") {
|
|
193
|
-
return {
|
|
194
|
-
ok: false,
|
|
195
|
-
exitCode: 1,
|
|
196
|
-
result: RESULTS.Failure,
|
|
197
|
-
message: `${label}: ${outcome.message}`,
|
|
198
|
-
instructions: "Check that node is on PATH, then retry."
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
const { exitCode, signal, out, err } = outcome;
|
|
202
|
-
if (exitCode === 0) {
|
|
203
|
-
return { ok: true, data: stdoutAsData(out) };
|
|
204
|
-
}
|
|
205
|
-
if (exitCode !== null) {
|
|
206
|
-
const detail = failureReason(out, err) || `SDK exited with code ${exitCode}`;
|
|
207
|
-
return {
|
|
208
|
-
ok: false,
|
|
209
|
-
exitCode,
|
|
210
|
-
result: RESULTS.Failure,
|
|
211
|
-
message: `${label}: ${detail}`,
|
|
212
|
-
instructions: err ? "Fix what the builder SDK reported (on stderr, and in Message), then retry." : "Fix what the builder SDK reported (see Message), then retry.",
|
|
213
|
-
...out.trim() ? { data: stdoutAsData(out) } : {}
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
return {
|
|
217
|
-
ok: false,
|
|
218
|
-
exitCode: 1,
|
|
219
|
-
result: RESULTS.Failure,
|
|
220
|
-
message: `${label}: SDK process ended with signal ${signal ?? "unknown"}.`,
|
|
221
|
-
instructions: "Retry the command."
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
function upgradeInstructions(found) {
|
|
225
|
-
return found === "workspace" ? `npm install --save-dev ${FLOW_SDK_PACKAGE.name}@latest` : `npm install -g ${FLOW_SDK_PACKAGE.name}@latest`;
|
|
226
|
-
}
|
|
227
410
|
function resolveLocalPackageJson(workspace) {
|
|
228
411
|
const require2 = createRequire(import.meta.url);
|
|
229
412
|
try {
|
|
@@ -238,12 +421,12 @@ async function resolveGlobalPackageJson() {
|
|
|
238
421
|
const root = await npmGlobalRoot();
|
|
239
422
|
if (!root)
|
|
240
423
|
return null;
|
|
241
|
-
const fs =
|
|
424
|
+
const fs = getFileSystem2();
|
|
242
425
|
const candidate = fs.path.join(root, ...FLOW_SDK_PACKAGE.name.split("/"), "package.json");
|
|
243
426
|
return await fs.exists(candidate) ? candidate : null;
|
|
244
427
|
}
|
|
245
428
|
async function resolveFlowSdk(workspace, label) {
|
|
246
|
-
const fs =
|
|
429
|
+
const fs = getFileSystem2();
|
|
247
430
|
const { name, minimumVersion } = FLOW_SDK_PACKAGE;
|
|
248
431
|
const localPath = resolveLocalPackageJson(workspace);
|
|
249
432
|
const packagePath = localPath ?? await resolveGlobalPackageJson();
|
|
@@ -273,7 +456,7 @@ async function resolveFlowSdk(workspace, label) {
|
|
|
273
456
|
if (!versionMeetsFloor(version, minimumVersion)) {
|
|
274
457
|
return {
|
|
275
458
|
ok: false,
|
|
276
|
-
message:
|
|
459
|
+
message: belowFloorMessage(label, version),
|
|
277
460
|
instructions: upgradeInstructions(found)
|
|
278
461
|
};
|
|
279
462
|
}
|
|
@@ -284,57 +467,88 @@ async function resolveFlowSdk(workspace, label) {
|
|
|
284
467
|
found: found === "workspace" ? "workspace" : "global"
|
|
285
468
|
};
|
|
286
469
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const resolution = await resolveFlowSdk(workspace, label);
|
|
299
|
-
if (!resolution.ok) {
|
|
300
|
-
return {
|
|
301
|
-
ok: false,
|
|
302
|
-
exitCode: 1,
|
|
303
|
-
result: RESULTS.ConfigError,
|
|
304
|
-
message: resolution.message,
|
|
305
|
-
instructions: resolution.instructions
|
|
306
|
-
};
|
|
470
|
+
var nodeFlowSdkRunner = {
|
|
471
|
+
locate: resolveFlowSdk,
|
|
472
|
+
run: async (sdk, request) => {
|
|
473
|
+
if (sdk.packageDir === undefined) {
|
|
474
|
+
return {
|
|
475
|
+
kind: "spawn-error",
|
|
476
|
+
message: "the SDK location has no package directory"
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
const cliPath = getFileSystem2().path.join(sdk.packageDir, "dist", "cli", "index.js");
|
|
480
|
+
return await spawnSdk(cliPath, request);
|
|
307
481
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
instructions: upgradeInstructions(resolution.found)
|
|
315
|
-
};
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
// ../builder-sdk/src/argv.ts
|
|
485
|
+
function addValue(argv, flag, value) {
|
|
486
|
+
if (typeof value === "string") {
|
|
487
|
+
argv.push(flag, value);
|
|
316
488
|
}
|
|
317
|
-
const cliPath = fs.path.join(resolution.packageDir, "dist", "cli", "index.js");
|
|
318
|
-
const sdkArgv = argv.includes("--json") ? [...argv] : [...argv, "--json"];
|
|
319
|
-
return await runChild(cliPath, [family, sdkVerb, ...sdkArgv], workspace, label);
|
|
320
489
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
});
|
|
329
|
-
return 0;
|
|
490
|
+
var tails = new WeakMap;
|
|
491
|
+
function passThroughToSdk(command, {
|
|
492
|
+
extraOperands = "refuse"
|
|
493
|
+
} = {}) {
|
|
494
|
+
const positionals = command.registeredArguments;
|
|
495
|
+
if (positionals.length !== 1 || positionals[0]?.variadic) {
|
|
496
|
+
throw new Error(`passThroughToSdk needs exactly one non-variadic positional; '${command.name()}' has ${positionals.length}`);
|
|
330
497
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
498
|
+
command.parent?.enablePositionalOptions();
|
|
499
|
+
command.passThroughOptions().allowExcessArguments(true);
|
|
500
|
+
command.hook("preAction", (thisCommand) => {
|
|
501
|
+
const [positional] = thisCommand.args;
|
|
502
|
+
if (positional !== undefined && positional.length > 1 && positional.startsWith("-")) {
|
|
503
|
+
thisCommand.error(`error: '${positional}' would reach the SDK as an option. Write it as './${positional}'.`, { code: "commander.invalidArgument" });
|
|
504
|
+
}
|
|
505
|
+
liftDeclaredOptions(thisCommand);
|
|
506
|
+
const { operands } = sdkTail(thisCommand);
|
|
507
|
+
if (extraOperands === "refuse" && operands.length > 0) {
|
|
508
|
+
thisCommand.error(`error: too many arguments for '${thisCommand.name()}'. Expected 1 argument but got ${1 + operands.length}.`, { code: "commander.excessArguments" });
|
|
509
|
+
}
|
|
336
510
|
});
|
|
337
|
-
return
|
|
511
|
+
return command;
|
|
512
|
+
}
|
|
513
|
+
function liftDeclaredOptions(cmd) {
|
|
514
|
+
const [positional, ...tail] = cmd.args;
|
|
515
|
+
if (positional === undefined)
|
|
516
|
+
return;
|
|
517
|
+
const { tokens, firstUnknown, sentinel } = tokenizeTail(cmd, tail);
|
|
518
|
+
const cut = Math.min(firstUnknown === -1 ? tail.length : firstUnknown, sentinel === -1 ? tail.length : sentinel);
|
|
519
|
+
const late = tokens.find((token) => token.kind === "option" && token.index > cut);
|
|
520
|
+
if (late?.kind === "option") {
|
|
521
|
+
const flag = late.option.long ?? late.option.short;
|
|
522
|
+
cmd.error(`error: write ${flag} before any SDK flag ('${tail[firstUnknown]}'). An SDK flag whose value starts with '-' is written --flag=value.`, { code: "commander.invalidArgument" });
|
|
523
|
+
}
|
|
524
|
+
cmd.passThroughOptions(false);
|
|
525
|
+
let parsed;
|
|
526
|
+
try {
|
|
527
|
+
parsed = cmd.parseOptions(tail.slice(0, cut));
|
|
528
|
+
} finally {
|
|
529
|
+
cmd.passThroughOptions(true);
|
|
530
|
+
}
|
|
531
|
+
const lifted = {
|
|
532
|
+
operands: parsed.operands,
|
|
533
|
+
forwarded: [...parsed.unknown, ...tail.slice(cut)]
|
|
534
|
+
};
|
|
535
|
+
tails.set(cmd, lifted);
|
|
536
|
+
cmd.args = [positional, ...lifted.operands, ...lifted.forwarded];
|
|
537
|
+
}
|
|
538
|
+
function sdkTail(cmd) {
|
|
539
|
+
return tails.get(cmd) ?? { operands: [], forwarded: cmd.args.slice(1) };
|
|
540
|
+
}
|
|
541
|
+
function delegateArgv(cmd, parsed) {
|
|
542
|
+
const { operands, forwarded } = sdkTail(cmd);
|
|
543
|
+
const positional = cmd.args[0];
|
|
544
|
+
return {
|
|
545
|
+
argv: [
|
|
546
|
+
...positional === undefined ? [] : [positional],
|
|
547
|
+
...operands,
|
|
548
|
+
...parsed
|
|
549
|
+
],
|
|
550
|
+
...forwarded.length > 0 ? { passthrough: [...forwarded] } : {}
|
|
551
|
+
};
|
|
338
552
|
}
|
|
339
553
|
|
|
340
554
|
// ../builder-sdk/src/examples.ts
|
|
@@ -355,7 +569,7 @@ function sdkCliExample(family, verb, description, command, data) {
|
|
|
355
569
|
async function resolveLibraryOption(explicit) {
|
|
356
570
|
if (explicit !== undefined)
|
|
357
571
|
return explicit;
|
|
358
|
-
if (
|
|
572
|
+
if (getFileSystem2().env.getenv("FLOW_SDK_LIBRARY_JSON"))
|
|
359
573
|
return;
|
|
360
574
|
const registry = await resolveMaestroRegistry();
|
|
361
575
|
return registry?.libraryJson;
|
|
@@ -363,7 +577,7 @@ async function resolveLibraryOption(explicit) {
|
|
|
363
577
|
async function connectorLibraryInPlay(explicit) {
|
|
364
578
|
if (explicit !== undefined)
|
|
365
579
|
return true;
|
|
366
|
-
if (
|
|
580
|
+
if (getFileSystem2().env.getenv("FLOW_SDK_LIBRARY_JSON"))
|
|
367
581
|
return true;
|
|
368
582
|
return (await resolveMaestroRegistry())?.libraryJson !== undefined;
|
|
369
583
|
}
|
|
@@ -392,25 +606,28 @@ var registerCheckCommand = (program, family) => {
|
|
|
392
606
|
command.option("--graph", "Also print the resolved wiring: every element with the flows leaving it, implied edges marked ~>");
|
|
393
607
|
}
|
|
394
608
|
const example = CHECK_EXAMPLES[family];
|
|
395
|
-
command.examples(sdkCliExample(family, "check", `Check a ${family} source file before compiling it`, `uip maestro ${family} check ${example.input} --source`, CHECK_RESULT)).trackedAction(processContext, async (
|
|
396
|
-
const
|
|
609
|
+
command.examples(sdkCliExample(family, "check", `Check a ${family} source file before compiling it`, `uip maestro ${family} check ${example.input} --source`, CHECK_RESULT)).trackedAction(processContext, async (_input, options, cmd) => {
|
|
610
|
+
const parsed = [];
|
|
397
611
|
if (options.source)
|
|
398
|
-
|
|
399
|
-
addValue(
|
|
400
|
-
addValue(
|
|
612
|
+
parsed.push("--source");
|
|
613
|
+
addValue(parsed, "--library", await resolveLibraryOption(options.library));
|
|
614
|
+
addValue(parsed, "--connectors-local", options.connectorsLocal);
|
|
401
615
|
if (options.graph)
|
|
402
|
-
|
|
616
|
+
parsed.push("--graph");
|
|
617
|
+
const { argv, passthrough } = delegateArgv(cmd, parsed);
|
|
403
618
|
const gate = CONNECTOR_GATES[family];
|
|
404
619
|
const gated = gate !== undefined && (options.connectorsLocal !== undefined || await connectorLibraryInPlay(options.library));
|
|
405
|
-
const code = await
|
|
620
|
+
const code = await delegateToMaestroBuilderSdk({
|
|
406
621
|
family,
|
|
407
622
|
commandVerb: "check",
|
|
408
623
|
argv,
|
|
624
|
+
...passthrough ? { passthrough } : {},
|
|
409
625
|
...gated ? { requiresSdkVersion: gate } : {}
|
|
410
626
|
});
|
|
411
627
|
if (code !== 0)
|
|
412
628
|
processContext.exit(code);
|
|
413
629
|
});
|
|
630
|
+
passThroughToSdk(command);
|
|
414
631
|
};
|
|
415
632
|
// ../builder-sdk/src/commands/compile.ts
|
|
416
633
|
var COMPILE_EXAMPLES = {
|
|
@@ -438,25 +655,28 @@ var COMPILE_EXAMPLES = {
|
|
|
438
655
|
result: { Path: "/work/Approval.bpmn", Elements: 4 }
|
|
439
656
|
}
|
|
440
657
|
};
|
|
441
|
-
var registerCompileCommand = (program, family) => {
|
|
658
|
+
var registerCompileCommand = (program, family, hooks = {}) => {
|
|
442
659
|
const command = program.command("compile <source>").description(`Compile authored TypeScript to a ${family} artifact.`).option("-o, --output-file <file>", "Output artifact path").option("--library <dir>", "Connector library directory (defaults to the pulled registry)").option("--bindings <file>", "bindings.json path").option("--connectors-local <dir>", "Connection-resolved connector overlay (default: ./connectors-local)");
|
|
443
660
|
addDeprecatedOptionAlias(command, "--output <file>", "--output-file");
|
|
444
661
|
if (family === "flow") {
|
|
445
662
|
command.option("--no-check", "Skip the source-level check");
|
|
446
663
|
}
|
|
447
664
|
const example = COMPILE_EXAMPLES[family];
|
|
448
|
-
command.examples(sdkCliExample(family, "compile", `Compile a ${family} source file to an artifact`, `uip maestro ${family} compile ${example.source} --output-file ${example.output}`, example.result)).trackedAction(processContext, async (
|
|
449
|
-
const
|
|
450
|
-
addValue(
|
|
451
|
-
addValue(
|
|
452
|
-
addValue(
|
|
453
|
-
addValue(
|
|
665
|
+
command.examples(sdkCliExample(family, "compile", `Compile a ${family} source file to an artifact`, `uip maestro ${family} compile ${example.source} --output-file ${example.output}`, example.result)).trackedAction(processContext, async (_source, options, cmd) => {
|
|
666
|
+
const parsed = [];
|
|
667
|
+
addValue(parsed, "-o", options.outputFile);
|
|
668
|
+
addValue(parsed, "--library", await resolveLibraryOption(options.library));
|
|
669
|
+
addValue(parsed, "--bindings", options.bindings);
|
|
670
|
+
addValue(parsed, "--connectors-local", options.connectorsLocal);
|
|
454
671
|
if (options.check === false)
|
|
455
|
-
|
|
456
|
-
const
|
|
672
|
+
parsed.push("--no-check");
|
|
673
|
+
const { argv, passthrough } = delegateArgv(cmd, parsed);
|
|
674
|
+
const code = await delegateToMaestroBuilderSdk({
|
|
457
675
|
family,
|
|
458
676
|
commandVerb: "compile",
|
|
459
677
|
argv,
|
|
678
|
+
...passthrough ? { passthrough } : {},
|
|
679
|
+
...hooks.afterSuccess ? { afterSuccess: hooks.afterSuccess } : {},
|
|
460
680
|
...family === "bpmn" && options.connectorsLocal !== undefined ? {
|
|
461
681
|
requiresSdkVersion: {
|
|
462
682
|
version: BPMN_CONNECTOR_OPTIONS_VERSION,
|
|
@@ -467,6 +687,7 @@ var registerCompileCommand = (program, family) => {
|
|
|
467
687
|
if (code !== 0)
|
|
468
688
|
processContext.exit(code);
|
|
469
689
|
});
|
|
690
|
+
passThroughToSdk(command);
|
|
470
691
|
};
|
|
471
692
|
// ../builder-sdk/src/commands/decompile.ts
|
|
472
693
|
var DECOMPILE_EXAMPLES = {
|
|
@@ -504,6 +725,7 @@ var registerDecompileCommand = (program, family) => {
|
|
|
504
725
|
addDeprecatedOptionAlias(command, "--output <file>", "--output-file");
|
|
505
726
|
if (family === "flow") {
|
|
506
727
|
command.option("--strict", "Fail on unsupported constructs");
|
|
728
|
+
command.addOption(new Option("--scripts <form>", "function (the default) or string: how script steps are printed").choices(["function", "string"]));
|
|
507
729
|
} else if (family === "case") {
|
|
508
730
|
command.option("--library <dir>", "Connector library directory (defaults to the pulled registry)").option("--best-effort", "Emit a marked repair scaffold for unsupported constructs");
|
|
509
731
|
} else {
|
|
@@ -513,55 +735,39 @@ var registerDecompileCommand = (program, family) => {
|
|
|
513
735
|
command.option("--no-pipeline", "Do not emit a brownfield pipeline helper");
|
|
514
736
|
}
|
|
515
737
|
const example = DECOMPILE_EXAMPLES[family];
|
|
516
|
-
command.examples(sdkCliExample(family, "decompile", `Convert a ${family} artifact back to authored TypeScript`, `uip maestro ${family} decompile ${example.input} --output-file ${example.output}${example.extra ?? ""}`, example.result)).trackedAction(processContext, async (
|
|
517
|
-
const
|
|
518
|
-
addValue(
|
|
519
|
-
addValue(
|
|
738
|
+
command.examples(sdkCliExample(family, "decompile", `Convert a ${family} artifact back to authored TypeScript`, `uip maestro ${family} decompile ${example.input} --output-file ${example.output}${example.extra ?? ""}`, example.result)).trackedAction(processContext, async (_input, options, cmd) => {
|
|
739
|
+
const parsed = [];
|
|
740
|
+
addValue(parsed, "-o", options.outputFile);
|
|
741
|
+
addValue(parsed, "--import", options.import);
|
|
520
742
|
if (family === "case") {
|
|
521
|
-
addValue(
|
|
743
|
+
addValue(parsed, "--library", await resolveLibraryOption(options.library));
|
|
522
744
|
}
|
|
523
745
|
if (options.strict)
|
|
524
|
-
|
|
746
|
+
parsed.push("--strict");
|
|
525
747
|
if (options.bestEffort)
|
|
526
|
-
|
|
748
|
+
parsed.push("--best-effort");
|
|
527
749
|
if (options.pipeline === false)
|
|
528
|
-
|
|
529
|
-
addValue(
|
|
530
|
-
|
|
750
|
+
parsed.push("--no-pipeline");
|
|
751
|
+
addValue(parsed, "--style", options.style);
|
|
752
|
+
addValue(parsed, "--scripts", options.scripts);
|
|
753
|
+
const { argv, passthrough } = delegateArgv(cmd, parsed);
|
|
754
|
+
const code = await delegateToMaestroBuilderSdk({
|
|
531
755
|
family,
|
|
532
756
|
commandVerb: "decompile",
|
|
533
|
-
argv
|
|
757
|
+
argv,
|
|
758
|
+
...passthrough ? { passthrough } : {},
|
|
759
|
+
...options.scripts ? {
|
|
760
|
+
requiresSdkVersion: {
|
|
761
|
+
version: FLOW_DECOMPILE_SCRIPTS_VERSION,
|
|
762
|
+
because: "--scripts on flow decompile"
|
|
763
|
+
}
|
|
764
|
+
} : {}
|
|
534
765
|
});
|
|
535
766
|
if (code !== 0)
|
|
536
767
|
processContext.exit(code);
|
|
537
768
|
});
|
|
769
|
+
passThroughToSdk(command);
|
|
538
770
|
};
|
|
539
|
-
// ../builder-sdk/src/named-second.ts
|
|
540
|
-
function namedOrLegacy(spec) {
|
|
541
|
-
if (spec.named !== undefined && spec.legacy !== undefined) {
|
|
542
|
-
usageError(`pass ${spec.flag} or a second argument, not both`, spec.usage);
|
|
543
|
-
}
|
|
544
|
-
if (spec.named === "") {
|
|
545
|
-
usageError(`option '${spec.flag}' argument missing`, spec.usage);
|
|
546
|
-
}
|
|
547
|
-
if (spec.named !== undefined)
|
|
548
|
-
return spec.named;
|
|
549
|
-
if (spec.legacy === undefined) {
|
|
550
|
-
usageError(`required option '${spec.flag}' not specified`, spec.usage);
|
|
551
|
-
}
|
|
552
|
-
getOutputSink().writeErr(`[WARN] The two-argument form is deprecated. Use \`${spec.usage}\` instead.
|
|
553
|
-
`);
|
|
554
|
-
return spec.legacy;
|
|
555
|
-
}
|
|
556
|
-
function usageError(message, usage) {
|
|
557
|
-
throw Object.assign(new Error(message), {
|
|
558
|
-
result: RESULTS.ValidationError,
|
|
559
|
-
errorCode: "invalid_argument",
|
|
560
|
-
retry: "RetryWillNotFix",
|
|
561
|
-
instructions: `Usage: ${usage}`
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
|
|
565
771
|
// ../builder-sdk/src/commands/merge.ts
|
|
566
772
|
var MERGE_EXAMPLES = {
|
|
567
773
|
flow: {
|
|
@@ -597,10 +803,11 @@ var registerMergeCommand = (program, family) => {
|
|
|
597
803
|
const example = MERGE_EXAMPLES[family];
|
|
598
804
|
command.examples(sdkCliExample(family, "merge", example.description, example.command, example.result)).trackedAction(processContext, async (first, options, cmd) => {
|
|
599
805
|
const usage = `uip maestro ${family} merge <edited> --original <file>`;
|
|
600
|
-
|
|
601
|
-
|
|
806
|
+
const { operands, forwarded } = sdkTail(cmd);
|
|
807
|
+
if (options.original === undefined && operands.length === 0 && forwarded.some((token) => !token.startsWith("-"))) {
|
|
808
|
+
usageError("required option '--original' not specified. If a path follows an SDK flag, write both paths before the flag, or use --original", usage);
|
|
602
809
|
}
|
|
603
|
-
const legacyEdited =
|
|
810
|
+
const legacyEdited = legacySecondArg([first, ...operands], usage);
|
|
604
811
|
const original = namedOrLegacy({
|
|
605
812
|
named: options.original,
|
|
606
813
|
legacy: legacyEdited === undefined ? undefined : first,
|
|
@@ -613,10 +820,11 @@ var registerMergeCommand = (program, family) => {
|
|
|
613
820
|
addValue(tail, "--baseline", options.baseline);
|
|
614
821
|
if (options.strict)
|
|
615
822
|
tail.push("--strict");
|
|
616
|
-
const code = await
|
|
823
|
+
const code = await delegateToMaestroBuilderSdk({
|
|
617
824
|
family,
|
|
618
825
|
commandVerb: "merge",
|
|
619
826
|
argv: [edited, "--original", original, ...tail],
|
|
827
|
+
...forwarded.length > 0 ? { passthrough: [...forwarded] } : {},
|
|
620
828
|
...options.strict ? {
|
|
621
829
|
requiresSdkVersion: {
|
|
622
830
|
version: FLOW_MERGE_STRICT_VERSION,
|
|
@@ -627,10 +835,77 @@ var registerMergeCommand = (program, family) => {
|
|
|
627
835
|
if (code !== 0)
|
|
628
836
|
processContext.exit(code);
|
|
629
837
|
});
|
|
838
|
+
passThroughToSdk(command, { extraOperands: "allow" });
|
|
630
839
|
};
|
|
840
|
+
// ../builder-sdk/src/index.ts
|
|
841
|
+
if (!flowSdkRunner())
|
|
842
|
+
registerFlowSdkRunner(nodeFlowSdkRunner);
|
|
843
|
+
|
|
631
844
|
// src/commands/authoring.ts
|
|
845
|
+
var syncCompiledCaseBindings = async (data) => {
|
|
846
|
+
const reported = data && !Array.isArray(data) ? data.path : undefined;
|
|
847
|
+
const path = typeof reported === "string" ? reported : undefined;
|
|
848
|
+
if (path === undefined)
|
|
849
|
+
return { ok: true };
|
|
850
|
+
const { bindingIdentity, bindingsV2PathFor, syncCaseBindings } = await import("./case-bindings-service-pp3c9g1e.js");
|
|
851
|
+
const fs = getFileSystem2();
|
|
852
|
+
const sidecar = bindingsV2PathFor(path);
|
|
853
|
+
if (!await fs.exists(sidecar)) {
|
|
854
|
+
return { ok: true };
|
|
855
|
+
}
|
|
856
|
+
const { readBindingsV2Resources, serializeBindingsV2File } = await import("./bindings-v2-1da35xsc.js");
|
|
857
|
+
const read = async () => readBindingsV2Resources(await fs.readFile(sidecar, "utf-8") ?? "") ?? [];
|
|
858
|
+
const sdkWritten = await read();
|
|
859
|
+
const result = await syncCaseBindings(path);
|
|
860
|
+
if (!result.ok) {
|
|
861
|
+
return {
|
|
862
|
+
ok: false,
|
|
863
|
+
message: `compiled ${path}, but could not regenerate bindings_v2.json: ${result.message}`,
|
|
864
|
+
instructions: result.instructions
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
const literal = literalTaskKeys(await fs.readFile(path, "utf-8"));
|
|
868
|
+
const generated = await read();
|
|
869
|
+
const identity = (entry) => bindingIdentity(entry.resource, entry.key);
|
|
870
|
+
const derived = new Set(generated.map(identity));
|
|
871
|
+
const kept = sdkWritten.filter((entry) => entry.resource.toLowerCase() === "process" && literal.has(entry.key) && !derived.has(identity(entry)));
|
|
872
|
+
if (kept.length > 0) {
|
|
873
|
+
await fs.writeFile(sidecar, serializeBindingsV2File([...generated, ...kept]));
|
|
874
|
+
}
|
|
875
|
+
return {
|
|
876
|
+
ok: true,
|
|
877
|
+
data: { resources: result.resourceCount + kept.length }
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
var literalTaskKeys = (raw) => {
|
|
881
|
+
const keys = new Set;
|
|
882
|
+
let plan;
|
|
883
|
+
try {
|
|
884
|
+
plan = JSON.parse(raw ?? "");
|
|
885
|
+
} catch {
|
|
886
|
+
return keys;
|
|
887
|
+
}
|
|
888
|
+
const literal = (value) => typeof value === "string" && value !== "" && !value.startsWith(BINDING_REFERENCE_PREFIX);
|
|
889
|
+
const nodes = plan?.nodes;
|
|
890
|
+
for (const node of Array.isArray(nodes) ? nodes : []) {
|
|
891
|
+
const lanes = node?.data?.tasks;
|
|
892
|
+
for (const lane of Array.isArray(lanes) ? lanes : []) {
|
|
893
|
+
for (const task of Array.isArray(lane) ? lane : []) {
|
|
894
|
+
const { type, data } = task ?? {};
|
|
895
|
+
if (typeof type !== "string" || !NAME_BOUND_TASK_TYPES.has(type))
|
|
896
|
+
continue;
|
|
897
|
+
if (literal(data?.name) && literal(data?.folderPath)) {
|
|
898
|
+
keys.add(`${data.folderPath}.${data.name}`);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
return keys;
|
|
904
|
+
};
|
|
632
905
|
var registerCaseAuthoringCommands = (program) => {
|
|
633
|
-
registerCompileCommand(program, "case"
|
|
906
|
+
registerCompileCommand(program, "case", {
|
|
907
|
+
afterSuccess: syncCompiledCaseBindings
|
|
908
|
+
});
|
|
634
909
|
registerCheckCommand(program, "case");
|
|
635
910
|
registerDecompileCommand(program, "case");
|
|
636
911
|
registerMergeCommand(program, "case");
|
|
@@ -639,4 +914,4 @@ export {
|
|
|
639
914
|
registerCaseAuthoringCommands
|
|
640
915
|
};
|
|
641
916
|
|
|
642
|
-
//# debugId=
|
|
917
|
+
//# debugId=EFAEE6F0C56DE79164756E2164756E21
|