@uipath/case-tool 1.205.0-preview.281 → 1.206.0-preview.282
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-qqd3h10v.js → case-debug-solution-projects-je7h4hmq.js} +3 -7
- package/dist/{case-debug-studio-web-service-nqzmwbr5.js → case-debug-studio-web-service-d83h3atd.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-vq38va33.js → case-validate-service-hz0j90we.js} +234 -170
- package/dist/connector-enrichment-service-sjjmb9dy.js +56 -0
- package/dist/connector-library-1yw5r47w.js +99 -0
- package/dist/connector-lookup-service-yerhg9cd.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/{connector-task-spec-pzfzmfr5.js → index-9f8naxbk.js} +320 -144
- package/dist/{index-5dxh9z60.js → index-a7y7etmy.js} +6 -5
- package/dist/{index-ekwtgx7y.js → index-ec115v05.js} +309 -287
- package/dist/index-j9t2k52h.js +35 -0
- package/dist/index-myf7b4a5.js +26 -0
- 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-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-y8b5w1rd.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-b1nw50ev.js → packager-tool-265h946t.js} +256 -486
- 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-3xehbdyd.js +1302 -0
- package/dist/packager-tool-4avchhz8.js +539 -0
- 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-wr12ndwk.js → packager-tool-ccejfs0r.js} +252 -468
- 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-qn3zkrrc.js → packager-tool-ehjw672b.js} +32 -15
- 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-k0ar6cn7.js +295 -0
- package/dist/packager-tool-kz7zz79p.js +71 -0
- package/dist/{packager-tool-1gwbq864.js → packager-tool-m5384a1s.js} +66 -82
- package/dist/{packager-tool-9e59z4d6.js → packager-tool-me8gd22q.js} +82 -83
- package/dist/packager-tool-mk9fmzdy.js +20 -0
- package/dist/{packager-tool-yfmby4dd.js → packager-tool-mkt1njk2.js} +630 -689
- package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
- 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-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-8ac6ncq2.js → resourcesSyncService-yrhhh62m.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-8gf9zjwf.js → sdd-resolve-siblings-ap8j1c8h.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-agvnhdf7.js → trigger-enrichment-service-z8kxy6qr.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-6kskfevq.js +0 -65
- package/dist/connector-lookup-service-yyn8kkw7.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-0d7qc2gs.js +0 -282
- package/dist/index-jmv5by9z.js +0 -666
- package/dist/index-kmp9fmhb.js +0 -25
- 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-2ezr3akv.js +0 -57
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-6z1hsm2h.js +0 -143
- 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-gmykn1ef.js +0 -5365
- 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/packager-tool-zgpsnxkd.js +0 -13189
- 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,6 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
zipSync
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-wbksf242.js";
|
|
4
|
+
|
|
5
|
+
// ../packager/packager-core/src/services/json-object.ts
|
|
6
|
+
function parseJsonObject(text) {
|
|
7
|
+
if (!text)
|
|
8
|
+
return;
|
|
9
|
+
try {
|
|
10
|
+
const value = JSON.parse(text);
|
|
11
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : undefined;
|
|
12
|
+
} catch {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
async function readJsonObjectFile(fs, filePath) {
|
|
17
|
+
let content;
|
|
18
|
+
try {
|
|
19
|
+
content = await fs.readFile(filePath);
|
|
20
|
+
} catch {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (!content)
|
|
24
|
+
return;
|
|
25
|
+
const text = typeof content === "string" ? content : new TextDecoder().decode(content);
|
|
26
|
+
const value = parseJsonObject(text);
|
|
27
|
+
return value ? { text, value } : undefined;
|
|
28
|
+
}
|
|
4
29
|
|
|
5
30
|
// ../packager/packager-core/src/filesystem/path.ts
|
|
6
31
|
class Path {
|
|
@@ -64,26 +89,6 @@ var PROJECT_FILE = "project.json";
|
|
|
64
89
|
function isNonEmptyString(value) {
|
|
65
90
|
return typeof value === "string" && value.length > 0;
|
|
66
91
|
}
|
|
67
|
-
async function readJsonObject(fs, filePath) {
|
|
68
|
-
let content;
|
|
69
|
-
try {
|
|
70
|
-
content = await fs.readFile(filePath, "utf-8");
|
|
71
|
-
} catch {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (content === null) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
try {
|
|
78
|
-
const parsed = JSON.parse(content);
|
|
79
|
-
if (parsed === null || typeof parsed !== "object") {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
return parsed;
|
|
83
|
-
} catch {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
92
|
async function writeJsonObject(fs, filePath, data) {
|
|
88
93
|
await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}
|
|
89
94
|
`);
|
|
@@ -92,7 +97,7 @@ async function ensureProjectId(projectPath, fs) {
|
|
|
92
97
|
const operatePath = Path.join(projectPath, OPERATE_FILE);
|
|
93
98
|
const operateExists = await fs.exists(operatePath);
|
|
94
99
|
if (operateExists) {
|
|
95
|
-
const operate = await
|
|
100
|
+
const operate = (await readJsonObjectFile(fs, operatePath))?.value;
|
|
96
101
|
if (operate && isNonEmptyString(operate.projectId)) {
|
|
97
102
|
return operate.projectId;
|
|
98
103
|
}
|
|
@@ -109,7 +114,7 @@ async function ensureProjectId(projectPath, fs) {
|
|
|
109
114
|
const projectFilePath = Path.join(projectPath, PROJECT_FILE);
|
|
110
115
|
const projectFileExists = await fs.exists(projectFilePath);
|
|
111
116
|
if (projectFileExists) {
|
|
112
|
-
const projectFile = await
|
|
117
|
+
const projectFile = (await readJsonObjectFile(fs, projectFilePath))?.value;
|
|
113
118
|
if (projectFile && isNonEmptyString(projectFile.projectId)) {
|
|
114
119
|
return projectFile.projectId;
|
|
115
120
|
}
|
|
@@ -129,7 +134,7 @@ async function ensureProjectIdInOperateFile(operateFilePath, fallbackProjectId,
|
|
|
129
134
|
if (!await fs.exists(operateFilePath)) {
|
|
130
135
|
return;
|
|
131
136
|
}
|
|
132
|
-
const parsed = await
|
|
137
|
+
const parsed = (await readJsonObjectFile(fs, operateFilePath))?.value;
|
|
133
138
|
if (!parsed) {
|
|
134
139
|
return;
|
|
135
140
|
}
|
|
@@ -149,6 +154,152 @@ async function writeOrBackfillOperateProjectId(operateFilePath, projectId, fs, c
|
|
|
149
154
|
await createIfMissing();
|
|
150
155
|
}
|
|
151
156
|
|
|
157
|
+
// ../packager/packager-core/src/models/nuget-constants.ts
|
|
158
|
+
var NugetConstants = {
|
|
159
|
+
OutputFolderName: "bundle",
|
|
160
|
+
ContentFolderName: "content",
|
|
161
|
+
OperateFileName: "operate.json",
|
|
162
|
+
EntryPointsFileName: "entry-points.json",
|
|
163
|
+
PackageDescriptorFileName: "package-descriptor.json",
|
|
164
|
+
BindingsV2FileName: "bindings_v2.json",
|
|
165
|
+
BindingsFileId: "bindings.json"
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// ../packager/packager-core/src/services/content-operate-file.ts
|
|
169
|
+
var OPERATE_SCHEMA = "https://cloud.uipath.com/draft/2024-12/operate";
|
|
170
|
+
function withoutContentPrefix(filePath) {
|
|
171
|
+
return filePath.replace(/^\/?content\//, "");
|
|
172
|
+
}
|
|
173
|
+
function entryPointFile(filePath) {
|
|
174
|
+
const path = withoutContentPrefix(filePath);
|
|
175
|
+
const file = path.split("#")[0] ?? "";
|
|
176
|
+
return file.endsWith(".bpmn") ? file : path;
|
|
177
|
+
}
|
|
178
|
+
function hasFilePath(entry) {
|
|
179
|
+
return typeof entry === "object" && entry !== null && typeof entry.filePath === "string";
|
|
180
|
+
}
|
|
181
|
+
function isDefaultFlag(value) {
|
|
182
|
+
return value === true || value === "true";
|
|
183
|
+
}
|
|
184
|
+
function isDefaultEntryPoint(entry) {
|
|
185
|
+
return hasFilePath(entry) && isDefaultFlag(entry.isDefault);
|
|
186
|
+
}
|
|
187
|
+
function resolveOperateMainEntry(entryPoints, mainFile) {
|
|
188
|
+
const wanted = mainFile ? entryPointFile(mainFile) : undefined;
|
|
189
|
+
const inMainFile = wanted ? entryPoints.filter((entry) => hasFilePath(entry) && entryPointFile(entry.filePath) === wanted) : [];
|
|
190
|
+
return inMainFile.find(isDefaultEntryPoint) ?? inMainFile[0] ?? entryPoints.find(isDefaultEntryPoint) ?? entryPoints[0];
|
|
191
|
+
}
|
|
192
|
+
function resolvePackagedMainEntry(entryPoints, operateMain, mainFile) {
|
|
193
|
+
const named = typeof operateMain === "string" && operateMain !== "" && !entryPoints.some(isDefaultEntryPoint) ? entryPoints.find((entry) => hasFilePath(entry) && withoutContentPrefix(entry.filePath) === withoutContentPrefix(operateMain)) : undefined;
|
|
194
|
+
return named ?? resolveOperateMainEntry(entryPoints, mainFile);
|
|
195
|
+
}
|
|
196
|
+
function resolvePackagedMain(entryPoints, operateMain, mainFile) {
|
|
197
|
+
const main = resolvePackagedMainEntry(entryPoints, operateMain, mainFile);
|
|
198
|
+
return main && hasFilePath(main) ? main.filePath : "";
|
|
199
|
+
}
|
|
200
|
+
function resolveOperateMain(entryPoints, mainFile) {
|
|
201
|
+
const main = resolveOperateMainEntry(entryPoints, mainFile);
|
|
202
|
+
return main && hasFilePath(main) ? main.filePath : "";
|
|
203
|
+
}
|
|
204
|
+
function orderDefaultEntryPointFirst(entryPoints, mainFile) {
|
|
205
|
+
if (!entryPoints.some(isDefaultEntryPoint))
|
|
206
|
+
return entryPoints;
|
|
207
|
+
const main = resolveOperateMainEntry(entryPoints, mainFile);
|
|
208
|
+
return main === undefined ? entryPoints : [main, ...entryPoints.filter((entry) => entry !== main)];
|
|
209
|
+
}
|
|
210
|
+
async function resolveEntryPointMain(fs, sourceFolder, mainFile) {
|
|
211
|
+
const entryPointsFilePath = Path.join(sourceFolder, NugetConstants.EntryPointsFileName);
|
|
212
|
+
if (!await fs.exists(entryPointsFilePath)) {
|
|
213
|
+
return "";
|
|
214
|
+
}
|
|
215
|
+
const content = await fs.readFile(entryPointsFilePath);
|
|
216
|
+
if (!content) {
|
|
217
|
+
return "";
|
|
218
|
+
}
|
|
219
|
+
try {
|
|
220
|
+
const parsed = JSON.parse(new TextDecoder().decode(content));
|
|
221
|
+
return resolveOperateMain(parsed.entryPoints ?? [], mainFile);
|
|
222
|
+
} catch {
|
|
223
|
+
return "";
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
async function readProjectMainFile(fs, projectDir) {
|
|
227
|
+
const mainFile = (await readJsonObjectFile(fs, Path.join(projectDir, "project.uiproj")))?.value.MainFile;
|
|
228
|
+
return typeof mainFile === "string" && mainFile !== "" ? mainFile : undefined;
|
|
229
|
+
}
|
|
230
|
+
async function readOperateMain(fs, folder) {
|
|
231
|
+
return (await readJsonObjectFile(fs, Path.join(folder, NugetConstants.OperateFileName)))?.value.main;
|
|
232
|
+
}
|
|
233
|
+
function formatLike(original, value) {
|
|
234
|
+
const eol = original.includes(`\r
|
|
235
|
+
`) ? `\r
|
|
236
|
+
` : `
|
|
237
|
+
`;
|
|
238
|
+
const minified = !original.trimEnd().includes(`
|
|
239
|
+
`);
|
|
240
|
+
const indent = /\n([ \t]+)"/.exec(original)?.[1] ?? 2;
|
|
241
|
+
const text = (minified ? JSON.stringify(value) : JSON.stringify(value, null, indent)).replace(/\n/g, eol);
|
|
242
|
+
return original.endsWith(`
|
|
243
|
+
`) ? `${text}${eol}` : text;
|
|
244
|
+
}
|
|
245
|
+
async function applyDefaultEntryPoint(fs, params) {
|
|
246
|
+
const entryPointsPath = Path.join(params.contentFolder, NugetConstants.EntryPointsFileName);
|
|
247
|
+
const entryPointsFile = await readJsonObjectFile(fs, entryPointsPath);
|
|
248
|
+
const entryPoints = entryPointsFile?.value.entryPoints;
|
|
249
|
+
if (!entryPointsFile || !Array.isArray(entryPoints))
|
|
250
|
+
return;
|
|
251
|
+
const written = entryPoints.filter((entry) => typeof entry === "object" && entry !== null);
|
|
252
|
+
if (written.length !== entryPoints.length)
|
|
253
|
+
return;
|
|
254
|
+
const entries = params.withDefaults?.(written) ?? written;
|
|
255
|
+
const ordered = orderDefaultEntryPointFirst(entries, params.mainFile);
|
|
256
|
+
if (ordered === entries)
|
|
257
|
+
return;
|
|
258
|
+
const packaged = ordered.map((entry, index) => {
|
|
259
|
+
const { isDefault: _isDefault, ...rest } = entry;
|
|
260
|
+
return index === 0 ? { ...rest, isDefault: true } : rest;
|
|
261
|
+
});
|
|
262
|
+
if (JSON.stringify(packaged) !== JSON.stringify(written)) {
|
|
263
|
+
await fs.writeFile(entryPointsPath, formatLike(entryPointsFile.text, {
|
|
264
|
+
...entryPointsFile.value,
|
|
265
|
+
entryPoints: packaged
|
|
266
|
+
}));
|
|
267
|
+
}
|
|
268
|
+
const main = resolveOperateMain(entries, params.mainFile);
|
|
269
|
+
const operatePath = Path.join(params.contentFolder, NugetConstants.OperateFileName);
|
|
270
|
+
const operate = await readJsonObjectFile(fs, operatePath);
|
|
271
|
+
if (operate && operate.value.main !== main) {
|
|
272
|
+
await fs.writeFile(operatePath, formatLike(operate.text, { ...operate.value, main }));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
async function writeContentOperateFile(fs, params) {
|
|
276
|
+
const operateFilePath = Path.join(params.contentFolder, NugetConstants.OperateFileName);
|
|
277
|
+
await writeOrBackfillOperateProjectId(operateFilePath, params.projectId, fs, async () => {
|
|
278
|
+
const main = await resolveEntryPointMain(fs, params.contentFolder, params.mainFile);
|
|
279
|
+
const operateFileModel = {
|
|
280
|
+
$schema: OPERATE_SCHEMA,
|
|
281
|
+
contentType: params.contentType,
|
|
282
|
+
projectId: params.projectId,
|
|
283
|
+
main,
|
|
284
|
+
targetFramework: "Portable",
|
|
285
|
+
runtimeOptions: {
|
|
286
|
+
isAttended: false,
|
|
287
|
+
requiresUserInteraction: false
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
await fs.writeFile(operateFilePath, JSON.stringify(operateFileModel, null, 2));
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
async function ensureContentOperateFile(fs, params) {
|
|
294
|
+
const projectId = params.projectStorageId ?? await ensureProjectId(params.projectPath, fs);
|
|
295
|
+
await writeContentOperateFile(fs, {
|
|
296
|
+
contentFolder: params.contentFolder,
|
|
297
|
+
projectId,
|
|
298
|
+
contentType: params.contentType,
|
|
299
|
+
mainFile: params.mainFile
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
|
|
152
303
|
// ../packager/packager-core/src/services/nuget-packager.ts
|
|
153
304
|
function escapeXml(str) {
|
|
154
305
|
if (str === null || str === undefined) {
|
|
@@ -315,76 +466,6 @@ if (!_global[REGISTRY_KEY]) {
|
|
|
315
466
|
_global[REGISTRY_KEY] = new ToolsFactoryRepository;
|
|
316
467
|
}
|
|
317
468
|
var toolsFactoryRepository = _global[REGISTRY_KEY];
|
|
318
|
-
|
|
319
|
-
// ../packager/packager-core/src/models/nuget-constants.ts
|
|
320
|
-
var NugetConstants = {
|
|
321
|
-
OutputFolderName: "bundle",
|
|
322
|
-
ContentFolderName: "content",
|
|
323
|
-
OperateFileName: "operate.json",
|
|
324
|
-
EntryPointsFileName: "entry-points.json",
|
|
325
|
-
PackageDescriptorFileName: "package-descriptor.json",
|
|
326
|
-
BindingsV2FileName: "bindings_v2.json",
|
|
327
|
-
BindingsFileId: "bindings.json"
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
// ../packager/packager-core/src/services/content-operate-file.ts
|
|
331
|
-
var OPERATE_SCHEMA = "https://cloud.uipath.com/draft/2024-12/operate";
|
|
332
|
-
function withoutContentPrefix(filePath) {
|
|
333
|
-
return filePath.replace(/^\/?content\//, "");
|
|
334
|
-
}
|
|
335
|
-
function pickMain(entryPoints, mainFile) {
|
|
336
|
-
if (mainFile) {
|
|
337
|
-
const wanted = withoutContentPrefix(mainFile);
|
|
338
|
-
const declared = entryPoints.find(({ filePath }) => filePath !== undefined && withoutContentPrefix(filePath) === wanted)?.filePath;
|
|
339
|
-
if (declared) {
|
|
340
|
-
return declared;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
return entryPoints[0]?.filePath ?? "";
|
|
344
|
-
}
|
|
345
|
-
async function resolveEntryPointMain(fs, sourceFolder, mainFile) {
|
|
346
|
-
const entryPointsFilePath = Path.join(sourceFolder, NugetConstants.EntryPointsFileName);
|
|
347
|
-
if (!await fs.exists(entryPointsFilePath)) {
|
|
348
|
-
return "";
|
|
349
|
-
}
|
|
350
|
-
const content = await fs.readFile(entryPointsFilePath);
|
|
351
|
-
if (!content) {
|
|
352
|
-
return "";
|
|
353
|
-
}
|
|
354
|
-
try {
|
|
355
|
-
const parsed = JSON.parse(new TextDecoder().decode(content));
|
|
356
|
-
return pickMain(parsed.entryPoints ?? [], mainFile);
|
|
357
|
-
} catch {
|
|
358
|
-
return "";
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
async function writeContentOperateFile(fs, params) {
|
|
362
|
-
const operateFilePath = Path.join(params.contentFolder, NugetConstants.OperateFileName);
|
|
363
|
-
await writeOrBackfillOperateProjectId(operateFilePath, params.projectId, fs, async () => {
|
|
364
|
-
const main = await resolveEntryPointMain(fs, params.contentFolder, params.mainFile);
|
|
365
|
-
const operateFileModel = {
|
|
366
|
-
$schema: OPERATE_SCHEMA,
|
|
367
|
-
contentType: params.contentType,
|
|
368
|
-
projectId: params.projectId,
|
|
369
|
-
main,
|
|
370
|
-
targetFramework: "Portable",
|
|
371
|
-
runtimeOptions: {
|
|
372
|
-
isAttended: false,
|
|
373
|
-
requiresUserInteraction: false
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
await fs.writeFile(operateFilePath, JSON.stringify(operateFileModel, null, 2));
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
async function ensureContentOperateFile(fs, params) {
|
|
380
|
-
const projectId = params.projectStorageId ?? await ensureProjectId(params.projectPath, fs);
|
|
381
|
-
await writeContentOperateFile(fs, {
|
|
382
|
-
contentFolder: params.contentFolder,
|
|
383
|
-
projectId,
|
|
384
|
-
contentType: params.contentType,
|
|
385
|
-
mainFile: params.mainFile
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
469
|
// ../packager/packager-core/src/models/tool-result.ts
|
|
389
470
|
class ToolResult {
|
|
390
471
|
errorCode;
|
|
@@ -1321,6 +1402,6 @@ I18nManager.registerTranslations("zh-cn", zh_CN);
|
|
|
1321
1402
|
I18nManager.registerTranslations("zh-tw", zh_TW);
|
|
1322
1403
|
I18nManager.registerTranslations("zu", zu);
|
|
1323
1404
|
I18nManager.setLocale("en");
|
|
1324
|
-
export { Path, TemporaryStorageService, NugetConstants, ToolResult, ensureProjectId, ensureContentOperateFile, NugetPackager, ProjectTool, toolsFactoryRepository };
|
|
1405
|
+
export { Path, TemporaryStorageService, NugetConstants, ToolResult, parseJsonObject, readJsonObjectFile, ensureProjectId, isDefaultFlag, resolvePackagedMainEntry, resolvePackagedMain, orderDefaultEntryPointFirst, readProjectMainFile, readOperateMain, applyDefaultEntryPoint, ensureContentOperateFile, NugetPackager, ProjectTool, toolsFactoryRepository };
|
|
1325
1406
|
|
|
1326
|
-
//# debugId=
|
|
1407
|
+
//# debugId=385A56DC6E62528864756E2164756E21
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
taskDefinitionsToNodeManifests,
|
|
5
|
-
withErrorHandles
|
|
6
|
-
} from "./packager-tool-8ftat1vn.js";
|
|
2
|
+
getFileSystem2
|
|
3
|
+
} from "./packager-tool-z070caqq.js";
|
|
7
4
|
import {
|
|
8
|
-
|
|
5
|
+
catchError2,
|
|
9
6
|
logger,
|
|
10
7
|
quoteForShell
|
|
11
|
-
} from "./packager-tool-
|
|
8
|
+
} from "./packager-tool-psmb758n.js";
|
|
12
9
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
getServiceType,
|
|
11
|
+
extractIOFromEntryPoints,
|
|
12
|
+
taskDefinitionsToNodeManifests,
|
|
13
|
+
withErrorHandles
|
|
14
|
+
} from "./packager-tool-17b466mr.js";
|
|
15
15
|
|
|
16
16
|
// ../maestro-sdk/src/registry/agent-metadata-reader.ts
|
|
17
17
|
var agentProjectMetadataReader;
|
|
18
|
-
function
|
|
18
|
+
function setAgentProjectMetadataReader2(reader) {
|
|
19
19
|
agentProjectMetadataReader = reader;
|
|
20
20
|
}
|
|
21
21
|
function getAgentProjectMetadataReader() {
|
|
@@ -31,7 +31,7 @@ var EMPTY_IO = {
|
|
|
31
31
|
outputs: {}
|
|
32
32
|
};
|
|
33
33
|
function findEnclosingProjectId(solutionDir, projects, cwd) {
|
|
34
|
-
const fs =
|
|
34
|
+
const fs = getFileSystem2();
|
|
35
35
|
for (const p of projects) {
|
|
36
36
|
const projDir = fs.path.resolve(solutionDir, fs.path.dirname(p.ProjectRelativePath));
|
|
37
37
|
if (cwd === projDir)
|
|
@@ -43,24 +43,24 @@ function findEnclosingProjectId(solutionDir, projects, cwd) {
|
|
|
43
43
|
}
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const fs =
|
|
46
|
+
function solutionSearchDirs2() {
|
|
47
|
+
const fs = getFileSystem2();
|
|
48
48
|
const cwd = fs.env.cwd();
|
|
49
49
|
return [cwd, fs.path.resolve(cwd, ".."), fs.path.resolve(cwd, "../..")];
|
|
50
50
|
}
|
|
51
|
-
async function
|
|
52
|
-
const fs =
|
|
53
|
-
const [readErr, entries] = await
|
|
51
|
+
async function readSolutionAt2(dir) {
|
|
52
|
+
const fs = getFileSystem2();
|
|
53
|
+
const [readErr, entries] = await catchError2(fs.readdir(dir));
|
|
54
54
|
if (readErr)
|
|
55
55
|
return null;
|
|
56
56
|
const uipxName = entries.find((e) => e.endsWith(".uipx"));
|
|
57
57
|
if (!uipxName)
|
|
58
58
|
return null;
|
|
59
59
|
const uipxPath = fs.path.join(dir, uipxName);
|
|
60
|
-
const [fileErr, content] = await
|
|
60
|
+
const [fileErr, content] = await catchError2(fs.readFile(uipxPath, "utf-8"));
|
|
61
61
|
if (fileErr || !content)
|
|
62
62
|
return null;
|
|
63
|
-
const [parseErr, parsed] =
|
|
63
|
+
const [parseErr, parsed] = catchError2(() => JSON.parse(content));
|
|
64
64
|
if (parseErr || !parsed.SolutionId)
|
|
65
65
|
return null;
|
|
66
66
|
return {
|
|
@@ -69,10 +69,10 @@ async function readSolutionAt(dir) {
|
|
|
69
69
|
projects: parsed.Projects ?? []
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
async function
|
|
73
|
-
const cwd =
|
|
74
|
-
for (const dir of
|
|
75
|
-
const solution = await
|
|
72
|
+
async function findSolutionFromCwd2() {
|
|
73
|
+
const cwd = getFileSystem2().env.cwd();
|
|
74
|
+
for (const dir of solutionSearchDirs2()) {
|
|
75
|
+
const solution = await readSolutionAt2(dir);
|
|
76
76
|
if (solution === null)
|
|
77
77
|
continue;
|
|
78
78
|
return {
|
|
@@ -82,8 +82,8 @@ async function findSolutionFromCwd() {
|
|
|
82
82
|
}
|
|
83
83
|
return null;
|
|
84
84
|
}
|
|
85
|
-
async function
|
|
86
|
-
const fs =
|
|
85
|
+
async function resolveProjectEntryPointIO2(projectDir) {
|
|
86
|
+
const fs = getFileSystem2();
|
|
87
87
|
const fromSource = await readEntryPointsFile(fs.path.join(projectDir, "entry-points.json"), fs.path.join(projectDir, "content", "entry-points.json"));
|
|
88
88
|
if (fromSource.io)
|
|
89
89
|
return { io: fromSource.io, contract: "known" };
|
|
@@ -98,13 +98,13 @@ async function resolveProjectEntryPointIO(projectDir) {
|
|
|
98
98
|
return { io: EMPTY_IO, contract };
|
|
99
99
|
}
|
|
100
100
|
async function readEntryPointsFile(...candidates) {
|
|
101
|
-
const fs =
|
|
101
|
+
const fs = getFileSystem2();
|
|
102
102
|
let state = "absent";
|
|
103
103
|
for (const filePath of candidates) {
|
|
104
|
-
const [err, content] = await
|
|
104
|
+
const [err, content] = await catchError2(fs.readFile(filePath, "utf-8"));
|
|
105
105
|
if (err || content === null)
|
|
106
106
|
continue;
|
|
107
|
-
const [parseErr, parsed] =
|
|
107
|
+
const [parseErr, parsed] = catchError2(() => JSON.parse(content));
|
|
108
108
|
const entryPoints = parsed?.entryPoints;
|
|
109
109
|
if (parseErr || !Array.isArray(entryPoints) || entryPoints.length > 0 && !isRecord(entryPoints[0])) {
|
|
110
110
|
if (state === "absent")
|
|
@@ -119,18 +119,18 @@ async function readEntryPointsFile(...candidates) {
|
|
|
119
119
|
return { state };
|
|
120
120
|
}
|
|
121
121
|
async function readProjectIOFromFlowVariables(projectDir) {
|
|
122
|
-
const fs =
|
|
123
|
-
const [readErr, entries] = await
|
|
122
|
+
const fs = getFileSystem2();
|
|
123
|
+
const [readErr, entries] = await catchError2(fs.readdir(projectDir));
|
|
124
124
|
if (readErr || !Array.isArray(entries))
|
|
125
125
|
return { state: "absent" };
|
|
126
126
|
const flowFileName = entries.find((entry) => entry.endsWith(".flow"));
|
|
127
127
|
if (!flowFileName)
|
|
128
128
|
return { state: "absent" };
|
|
129
129
|
const flowPath = fs.path.join(projectDir, flowFileName);
|
|
130
|
-
const [readFileErr, content] = await
|
|
130
|
+
const [readFileErr, content] = await catchError2(fs.readFile(flowPath, "utf-8"));
|
|
131
131
|
if (readFileErr || !content)
|
|
132
132
|
return { state: "invalid" };
|
|
133
|
-
const [parseErr, parsed] =
|
|
133
|
+
const [parseErr, parsed] = catchError2(() => JSON.parse(content));
|
|
134
134
|
if (parseErr || !isRecord(parsed))
|
|
135
135
|
return { state: "invalid" };
|
|
136
136
|
const variables = parsed.variables;
|
|
@@ -175,37 +175,37 @@ async function readProjectIOFromFlowVariables(projectDir) {
|
|
|
175
175
|
return { io: extractIOFromEntryPoints(synthetic), state: "valid" };
|
|
176
176
|
}
|
|
177
177
|
async function readProjectName(projectDir) {
|
|
178
|
-
const fs =
|
|
178
|
+
const fs = getFileSystem2();
|
|
179
179
|
const uiprojPath = fs.path.join(projectDir, "project.uiproj");
|
|
180
|
-
const [err, content] = await
|
|
180
|
+
const [err, content] = await catchError2(fs.readFile(uiprojPath, "utf-8"));
|
|
181
181
|
if (!err && content) {
|
|
182
|
-
const [parseErr, parsed] =
|
|
182
|
+
const [parseErr, parsed] = catchError2(() => JSON.parse(content));
|
|
183
183
|
if (!parseErr && isRecord(parsed) && typeof parsed.Name === "string" && parsed.Name.length > 0) {
|
|
184
184
|
return parsed.Name;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
return fs.path.basename(projectDir);
|
|
188
188
|
}
|
|
189
|
-
async function
|
|
190
|
-
const fs =
|
|
189
|
+
async function loadResourceKeyMap2(solutionDir) {
|
|
190
|
+
const fs = getFileSystem2();
|
|
191
191
|
const map = new Map;
|
|
192
192
|
const processDir = fs.path.join(solutionDir, "resources", "solution_folder", "process");
|
|
193
|
-
const [dirErr, typeDirs] = await
|
|
193
|
+
const [dirErr, typeDirs] = await catchError2(fs.readdir(processDir));
|
|
194
194
|
if (dirErr)
|
|
195
195
|
return map;
|
|
196
196
|
for (const typeDir of typeDirs) {
|
|
197
197
|
const typePath = fs.path.join(processDir, typeDir);
|
|
198
|
-
const [filesErr, files] = await
|
|
198
|
+
const [filesErr, files] = await catchError2(fs.readdir(typePath));
|
|
199
199
|
if (filesErr)
|
|
200
200
|
continue;
|
|
201
201
|
for (const file of files) {
|
|
202
202
|
if (!file.endsWith(".json"))
|
|
203
203
|
continue;
|
|
204
204
|
const filePath = fs.path.join(typePath, file);
|
|
205
|
-
const [readErr, content] = await
|
|
205
|
+
const [readErr, content] = await catchError2(fs.readFile(filePath, "utf-8"));
|
|
206
206
|
if (readErr || !content)
|
|
207
207
|
continue;
|
|
208
|
-
const [parseErr, parsed] =
|
|
208
|
+
const [parseErr, parsed] = catchError2(() => JSON.parse(content));
|
|
209
209
|
if (parseErr || !isRecord(parsed))
|
|
210
210
|
continue;
|
|
211
211
|
const resource = parsed.resource;
|
|
@@ -221,7 +221,7 @@ async function loadResourceKeyMap(solutionDir) {
|
|
|
221
221
|
return map;
|
|
222
222
|
}
|
|
223
223
|
function invokableSiblings(ctx) {
|
|
224
|
-
const fs =
|
|
224
|
+
const fs = getFileSystem2();
|
|
225
225
|
const currentId = ctx.currentProjectId?.toLowerCase();
|
|
226
226
|
return ctx.projects.flatMap((project) => {
|
|
227
227
|
const serviceType = getServiceType(project.Type);
|
|
@@ -235,10 +235,10 @@ function invokableSiblings(ctx) {
|
|
|
235
235
|
return [{ project, serviceType, projectDir }];
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
async function
|
|
238
|
+
async function buildInSolutionNodes2(ctx) {
|
|
239
239
|
const manifests = [];
|
|
240
240
|
const unknownContracts = [];
|
|
241
|
-
const resourceKeyMap = await
|
|
241
|
+
const resourceKeyMap = await loadResourceKeyMap2(ctx.solutionDir);
|
|
242
242
|
for (const { project, serviceType, projectDir } of invokableSiblings(ctx)) {
|
|
243
243
|
const resourceKey = resourceKeyMap.get(project.Id.toLowerCase());
|
|
244
244
|
if (!resourceKey)
|
|
@@ -246,7 +246,7 @@ async function buildInSolutionNodes(ctx) {
|
|
|
246
246
|
const reader = getAgentProjectMetadataReader();
|
|
247
247
|
const [name, { io, contract }, projectMetadata] = await Promise.all([
|
|
248
248
|
readProjectName(projectDir),
|
|
249
|
-
|
|
249
|
+
resolveProjectEntryPointIO2(projectDir),
|
|
250
250
|
reader ? reader(projectDir, project.Type).catch((err) => {
|
|
251
251
|
logger.debug(`Agent metadata reader failed for ${projectDir}: ${String(err)}`);
|
|
252
252
|
return {};
|
|
@@ -283,7 +283,7 @@ async function buildInSolutionNodes(ctx) {
|
|
|
283
283
|
}
|
|
284
284
|
return { manifests: withErrorHandles(manifests), unknownContracts };
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function unknownContractWarning2(projects) {
|
|
287
287
|
if (projects.length === 0)
|
|
288
288
|
return;
|
|
289
289
|
const describe = (p) => `'${p.name}' (${p.type}, ${p.projectDir}): ${p.contract === "missing" ? "no entry-points.json yet" : "its entry-points.json or .flow file could not be read"}`;
|
|
@@ -296,40 +296,40 @@ function unknownContractWarning(projects) {
|
|
|
296
296
|
const next = steps.join(", and ");
|
|
297
297
|
return `No usable argument contract for ${projects.map(describe).join("; ")}. ` + `${one ? "Its node shows" : "Their nodes show"} no inputs or outputs; the arguments are unknown, not empty. ` + `${next[0].toUpperCase()}${next.slice(1)}, then run this command again.`;
|
|
298
298
|
}
|
|
299
|
-
async function
|
|
300
|
-
const resourceKeyMap = await
|
|
299
|
+
async function findProjectsWithoutProcessResource2(ctx) {
|
|
300
|
+
const resourceKeyMap = await loadResourceKeyMap2(ctx.solutionDir);
|
|
301
301
|
return Promise.all(invokableSiblings(ctx).filter(({ project }) => !resourceKeyMap.has(project.Id.toLowerCase())).map(async ({ project, projectDir }) => ({
|
|
302
302
|
id: project.Id,
|
|
303
303
|
name: await readProjectName(projectDir),
|
|
304
304
|
type: project.Type
|
|
305
305
|
})));
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function describeProjectsWithoutProcessResource2(projects, solutionDir) {
|
|
308
308
|
if (projects.length === 0)
|
|
309
309
|
return {};
|
|
310
310
|
const names = projects.map((p) => `${p.name} (${p.type})`).join(", ");
|
|
311
311
|
return {
|
|
312
312
|
Warning: projects.length === 1 ? `Left out 1 project that has no process resource yet: ${names}.` : `Left out ${projects.length} projects that have no process resource yet: ${names}.`,
|
|
313
|
-
Instructions: `Create the missing process resources, then list the in-solution nodes again to get their node types. Run: ${
|
|
313
|
+
Instructions: `Create the missing process resources, then list the in-solution nodes again to get their node types. Run: ${resourcesRefreshCommand2(solutionDir)}`
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
|
-
async function
|
|
317
|
-
const ctx = await
|
|
316
|
+
async function explainNodeTypeWithoutProcessResource2(nodeType) {
|
|
317
|
+
const ctx = await findSolutionFromCwd2();
|
|
318
318
|
if (!ctx)
|
|
319
319
|
return;
|
|
320
320
|
const lowerNodeType = nodeType.toLowerCase();
|
|
321
|
-
const project = (await
|
|
321
|
+
const project = (await findProjectsWithoutProcessResource2(ctx)).find((p) => lowerNodeType.endsWith(`.${p.id.toLowerCase()}`));
|
|
322
322
|
if (!project)
|
|
323
323
|
return;
|
|
324
324
|
return {
|
|
325
325
|
message: `Project '${project.name}' has no process resource yet, so it has no node type.`,
|
|
326
|
-
instructions: `Create its process resource, then list the in-solution nodes to get its node type. Run: ${
|
|
326
|
+
instructions: `Create its process resource, then list the in-solution nodes to get its node type. Run: ${resourcesRefreshCommand2(ctx.solutionDir)}`
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function resourcesRefreshCommand2(solutionDir) {
|
|
330
330
|
return `uip solution resources refresh --solution-folder ${quoteForShell(solutionDir)}`;
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
export {
|
|
333
|
+
export { setAgentProjectMetadataReader2, solutionSearchDirs2, readSolutionAt2, findSolutionFromCwd2, resolveProjectEntryPointIO2, loadResourceKeyMap2, buildInSolutionNodes2, unknownContractWarning2, findProjectsWithoutProcessResource2, describeProjectsWithoutProcessResource2, explainNodeTypeWithoutProcessResource2, resourcesRefreshCommand2 };
|
|
334
334
|
|
|
335
|
-
//# debugId=
|
|
335
|
+
//# debugId=582087DEF1EBB83764756E2164756E21
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
ootbNodes,
|
|
3
3
|
inlineAgentNodes,
|
|
4
|
-
|
|
5
|
-
} from "./packager-tool-
|
|
4
|
+
buildExtractDocumentBuilderNode
|
|
5
|
+
} from "./packager-tool-17b466mr.js";
|
|
6
6
|
|
|
7
7
|
// ../maestro-sdk/src/registry/known-types.ts
|
|
8
8
|
var KNOWN_SDK_NODES = [
|
|
@@ -11,15 +11,15 @@ var KNOWN_SDK_NODES = [
|
|
|
11
11
|
buildExtractDocumentBuilderNode()
|
|
12
12
|
];
|
|
13
13
|
var KNOWN_SDK_NODE_TYPES = new Set(KNOWN_SDK_NODES.map((n) => n.nodeType.toLowerCase()).filter((t) => typeof t === "string" && t.length > 0));
|
|
14
|
-
function
|
|
14
|
+
function isKnownSdkNodeType2(nodeType) {
|
|
15
15
|
if (typeof nodeType !== "string" || nodeType.length === 0)
|
|
16
16
|
return false;
|
|
17
17
|
return KNOWN_SDK_NODE_TYPES.has(nodeType.toLowerCase());
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function listKnownSdkNodes2() {
|
|
20
20
|
return KNOWN_SDK_NODES.slice();
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { isKnownSdkNodeType2, listKnownSdkNodes2 };
|
|
24
24
|
|
|
25
|
-
//# debugId=
|
|
25
|
+
//# debugId=AA44820AC8C7293D64756E2164756E21
|