@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
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Path,
|
|
3
|
+
TemporaryStorageService,
|
|
4
|
+
NugetConstants,
|
|
5
|
+
ToolResult,
|
|
6
|
+
parseJsonObject,
|
|
7
|
+
readJsonObjectFile,
|
|
8
|
+
isDefaultFlag,
|
|
9
|
+
applyDefaultEntryPoint,
|
|
10
|
+
ensureContentOperateFile,
|
|
11
|
+
NugetPackager,
|
|
12
|
+
ProjectTool,
|
|
13
|
+
toolsFactoryRepository
|
|
14
|
+
} from "./packager-tool-snesn0bt.js";
|
|
15
|
+
import {
|
|
16
|
+
roleDescriptionOf,
|
|
17
|
+
caseStageLabels,
|
|
18
|
+
publishedRoleActions,
|
|
19
|
+
roleDeploys,
|
|
20
|
+
roleResourceKey,
|
|
21
|
+
readCaseRoles
|
|
22
|
+
} from "./packager-tool-1wgav5ma.js";
|
|
23
|
+
|
|
24
|
+
// ../packager/packager-tool-case/src/case-plan-file.ts
|
|
25
|
+
var CasePlanFileNames2 = [
|
|
26
|
+
"caseplan.case",
|
|
27
|
+
"caseplan.json",
|
|
28
|
+
"case.stage.json",
|
|
29
|
+
"default.stage.json"
|
|
30
|
+
];
|
|
31
|
+
var casePlanSidecarName2 = (casePlanFileName) => `${casePlanFileName}.bpmn`;
|
|
32
|
+
var findCasePlanFileName2 = (entries) => {
|
|
33
|
+
const present = new Set(entries);
|
|
34
|
+
return CasePlanFileNames2.find((candidate) => present.has(candidate));
|
|
35
|
+
};
|
|
36
|
+
var stripDeclaredFilePathPrefix = (filePath) => {
|
|
37
|
+
const withoutLeadingSlash = filePath.startsWith("/") ? filePath.slice(1) : filePath;
|
|
38
|
+
return withoutLeadingSlash.startsWith("content/") ? withoutLeadingSlash.slice("content/".length) : withoutLeadingSlash;
|
|
39
|
+
};
|
|
40
|
+
var resolveDeclaredFileName2 = (filePath) => {
|
|
41
|
+
const stripped = stripDeclaredFilePathPrefix(filePath.split("#")[0]);
|
|
42
|
+
return stripped.includes("/") ? "" : stripped;
|
|
43
|
+
};
|
|
44
|
+
var normalizeEntryPointPath2 = (filePath) => `/${stripDeclaredFilePathPrefix(filePath)}`;
|
|
45
|
+
var entryPointBpmnNames2 = (entryPointsJson) => {
|
|
46
|
+
try {
|
|
47
|
+
const parsed = JSON.parse(entryPointsJson);
|
|
48
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
49
|
+
throw new Error("document is not an object");
|
|
50
|
+
}
|
|
51
|
+
if (parsed.entryPoints !== undefined && !Array.isArray(parsed.entryPoints)) {
|
|
52
|
+
throw new Error("entryPoints is not a list");
|
|
53
|
+
}
|
|
54
|
+
const resolvedNames = (parsed.entryPoints ?? []).map((entry) => typeof entry.filePath === "string" ? resolveDeclaredFileName2(entry.filePath) : "");
|
|
55
|
+
if (resolvedNames.includes("")) {
|
|
56
|
+
throw new Error("an entry point has no usable filePath");
|
|
57
|
+
}
|
|
58
|
+
const names = resolvedNames.filter((name) => name.endsWith(".bpmn"));
|
|
59
|
+
return [...new Set(names)];
|
|
60
|
+
} catch {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var misnamedEntryPointBpmn2 = (declared, casePlanFileName) => {
|
|
65
|
+
const own = casePlanSidecarName2(casePlanFileName);
|
|
66
|
+
const otherPlans = new Set(CasePlanFileNames2.filter((name) => name !== casePlanFileName).map(casePlanSidecarName2));
|
|
67
|
+
return declared.find((file) => file !== own && otherPlans.has(file));
|
|
68
|
+
};
|
|
69
|
+
var stagedMainEntryPoint2 = (operateJson, entryPointsJson) => {
|
|
70
|
+
const main = parseJsonObject(operateJson)?.main;
|
|
71
|
+
if (typeof main === "string" && main !== "") {
|
|
72
|
+
return { filePath: main, source: "operate.json" };
|
|
73
|
+
}
|
|
74
|
+
const entryPoints = parseJsonObject(entryPointsJson)?.entryPoints;
|
|
75
|
+
const first = Array.isArray(entryPoints) ? entryPoints[0]?.filePath : undefined;
|
|
76
|
+
return {
|
|
77
|
+
filePath: typeof first === "string" ? first : "",
|
|
78
|
+
source: "entry-points.json"
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
var stagedMainProblem2 = (staged, resolved, own) => staged.source === "operate.json" ? {
|
|
82
|
+
problem: `operate.json's main names '${staged.filePath}', which resolves to '${resolved}'`,
|
|
83
|
+
fix: own ? `Mark the entry for '${own}' as default, or point operate.json's main at it` : undefined
|
|
84
|
+
} : {
|
|
85
|
+
problem: `entry-points.json's first entry point resolves to '${resolved}'`,
|
|
86
|
+
fix: own ? `Mark the entry for '${own}' as default, or make it the first entry` : undefined
|
|
87
|
+
};
|
|
88
|
+
var buildCasePackageDescriptor2 = (contentFileNames) => ({
|
|
89
|
+
$schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
|
|
90
|
+
files: {
|
|
91
|
+
[NugetConstants.OperateFileName]: `${NugetConstants.ContentFolderName}/${NugetConstants.OperateFileName}`,
|
|
92
|
+
[NugetConstants.EntryPointsFileName]: `${NugetConstants.ContentFolderName}/${NugetConstants.EntryPointsFileName}`,
|
|
93
|
+
[NugetConstants.BindingsFileId]: `${NugetConstants.ContentFolderName}/${NugetConstants.BindingsV2FileName}`,
|
|
94
|
+
...Object.fromEntries(contentFileNames.filter((name) => name.endsWith(".bpmn") || CasePlanFileNames2.includes(name)).map((name) => [
|
|
95
|
+
name,
|
|
96
|
+
`${NugetConstants.ContentFolderName}/${name}`
|
|
97
|
+
]))
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// ../packager/packager-tool-case/src/case-role-bindings.ts
|
|
102
|
+
var ROLE_RESOURCE = "role";
|
|
103
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
104
|
+
var roleBindingName = (entry) => {
|
|
105
|
+
if (!isRecord(entry))
|
|
106
|
+
return;
|
|
107
|
+
if (String(entry.resource).toLowerCase() !== ROLE_RESOURCE) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const name = isRecord(entry.value) ? entry.value.name : undefined;
|
|
111
|
+
const defaultValue = isRecord(name) ? name.defaultValue : undefined;
|
|
112
|
+
return typeof defaultValue === "string" ? defaultValue : undefined;
|
|
113
|
+
};
|
|
114
|
+
var reconcileRoleBindings = (resources, roles) => {
|
|
115
|
+
const roleNames = new Set(roles.map((role) => role.name));
|
|
116
|
+
let changed = false;
|
|
117
|
+
const reconciled = resources.map((entry) => {
|
|
118
|
+
const bound = roleBindingName(entry);
|
|
119
|
+
if (bound === undefined || roleNames.has(bound))
|
|
120
|
+
return entry;
|
|
121
|
+
const record = entry;
|
|
122
|
+
const displayName = isRecord(record.metadata) ? record.metadata.displayName : undefined;
|
|
123
|
+
if (typeof displayName !== "string" || !roleNames.has(displayName)) {
|
|
124
|
+
return entry;
|
|
125
|
+
}
|
|
126
|
+
const value = record.value;
|
|
127
|
+
const name = value.name;
|
|
128
|
+
changed = true;
|
|
129
|
+
return {
|
|
130
|
+
...record,
|
|
131
|
+
value: { ...value, name: { ...name, defaultValue: displayName } }
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
return { resources: reconciled, changed };
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
// ../packager/packager-tool-case/src/case-role-contribution.ts
|
|
138
|
+
var BINDINGS_FILE_NAME = "bindings_v2.json";
|
|
139
|
+
var ROLE_RESOURCE_KIND = "role";
|
|
140
|
+
var CASE_ROLE_RESOURCE_TYPE = "case-role";
|
|
141
|
+
async function describeCaseRoles(projectDir, fs) {
|
|
142
|
+
const entries = await fs.readdir(projectDir);
|
|
143
|
+
const planName = findCasePlanFileName2(entries);
|
|
144
|
+
if (planName === undefined)
|
|
145
|
+
return {};
|
|
146
|
+
const plan = await readJson(fs, fs.path.join(projectDir, planName));
|
|
147
|
+
if (plan === undefined)
|
|
148
|
+
return {};
|
|
149
|
+
const stages = caseStageLabels(isRecord2(plan) ? plan.nodes : undefined);
|
|
150
|
+
const roles = readCaseRoles(plan).filter((role) => roleDeploys(role, stages));
|
|
151
|
+
if (roles.length === 0)
|
|
152
|
+
return {};
|
|
153
|
+
const collisions = nameCollisions(roles);
|
|
154
|
+
if (collisions.length > 0) {
|
|
155
|
+
return {
|
|
156
|
+
errors: [
|
|
157
|
+
{
|
|
158
|
+
code: "case_role_name_collision",
|
|
159
|
+
message: `${planName} declares case roles whose names differ only by case (${collisions.join("; ")}). The solution stores one role resource per name regardless of case, so they would deploy as one.`,
|
|
160
|
+
instructions: `Rename one role of each pair in the Case Designer, run 'uip maestro case bindings sync ${planName}' in ${projectDir}, then pack again.`
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
const sidecar = await readBindingResources(fs, projectDir);
|
|
166
|
+
const reconciled = reconcileRoleBindings(sidecar, roles);
|
|
167
|
+
const bound = roleBindingNames(reconciled.resources);
|
|
168
|
+
const unbound = roles.filter((role) => !bound.has(role.name));
|
|
169
|
+
if (unbound.length > 0) {
|
|
170
|
+
const names = unbound.map((role) => `"${role.name}"`).join(", ");
|
|
171
|
+
return {
|
|
172
|
+
errors: [
|
|
173
|
+
{
|
|
174
|
+
code: "case_role_unbound",
|
|
175
|
+
message: `${planName} declares case role(s) ${names} with no matching Role entry in ${BINDINGS_FILE_NAME}, so the solution would deploy without them.`,
|
|
176
|
+
instructions: `Run 'uip maestro case bindings sync ${planName}' in ${projectDir} to write the Role entries, then pack again.`
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
specPatch: roles.map(rolePatch),
|
|
183
|
+
...reconciled.changed && {
|
|
184
|
+
bindings: reconciled.resources
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
var nameCollisions = (roles) => {
|
|
189
|
+
const byKey = new Map;
|
|
190
|
+
for (const role of roles) {
|
|
191
|
+
const key = roleResourceKey(role.name);
|
|
192
|
+
byKey.set(key, [...byKey.get(key) ?? [], role.name]);
|
|
193
|
+
}
|
|
194
|
+
return [...byKey.values()].filter((names) => names.length > 1).map((names) => names.map((name) => `"${name}"`).join(" and "));
|
|
195
|
+
};
|
|
196
|
+
var rolePatch = (role) => ({
|
|
197
|
+
kind: ROLE_RESOURCE_KIND,
|
|
198
|
+
type: CASE_ROLE_RESOURCE_TYPE,
|
|
199
|
+
name: role.name,
|
|
200
|
+
values: {
|
|
201
|
+
description: roleDescriptionOf(role),
|
|
202
|
+
actions: publishedRoleActions(role)
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
var roleBindingNames = (resources) => {
|
|
206
|
+
const names = new Set;
|
|
207
|
+
for (const entry of resources) {
|
|
208
|
+
const name = roleBindingName(entry);
|
|
209
|
+
if (name !== undefined)
|
|
210
|
+
names.add(name);
|
|
211
|
+
}
|
|
212
|
+
return names;
|
|
213
|
+
};
|
|
214
|
+
async function readBindingResources(fs, projectDir) {
|
|
215
|
+
const file = await readJson(fs, fs.path.join(projectDir, BINDINGS_FILE_NAME));
|
|
216
|
+
return isRecord2(file) && Array.isArray(file.resources) ? file.resources : [];
|
|
217
|
+
}
|
|
218
|
+
async function readJson(fs, path) {
|
|
219
|
+
try {
|
|
220
|
+
const raw = await fs.readFile(path, "utf-8");
|
|
221
|
+
if (raw === null || raw === undefined || raw === "")
|
|
222
|
+
return;
|
|
223
|
+
return JSON.parse(raw);
|
|
224
|
+
} catch {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
229
|
+
|
|
230
|
+
// ../packager/packager-tool-case/src/case-bpmn-compiler.ts
|
|
231
|
+
var COMPILER_KEY = Symbol.for("@uipath/packager-tool-case/caseBpmnCompiler");
|
|
232
|
+
var _global = globalThis;
|
|
233
|
+
function registerCaseBpmnCompiler(caseBpmnCompiler) {
|
|
234
|
+
_global[COMPILER_KEY] = caseBpmnCompiler;
|
|
235
|
+
}
|
|
236
|
+
function getCaseBpmnCompiler() {
|
|
237
|
+
return _global[COMPILER_KEY];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// ../packager/packager-tool-case/src/case-plan-triggers.ts
|
|
241
|
+
var nonEmpty = (value) => typeof value === "string" && value !== "" ? value : undefined;
|
|
242
|
+
function readCasePlanTriggers2(plan) {
|
|
243
|
+
const nodes = plan?.nodes;
|
|
244
|
+
if (!Array.isArray(nodes))
|
|
245
|
+
return [];
|
|
246
|
+
const triggers = [];
|
|
247
|
+
for (const node of nodes) {
|
|
248
|
+
if (typeof node !== "object" || node === null)
|
|
249
|
+
continue;
|
|
250
|
+
const isCurrent = node.type === "uipath.case.trigger";
|
|
251
|
+
if (!isCurrent && node.type !== "case-management:Trigger")
|
|
252
|
+
continue;
|
|
253
|
+
if (typeof node.id !== "string")
|
|
254
|
+
continue;
|
|
255
|
+
const inputs = node.data?.inputs;
|
|
256
|
+
const uipath = isCurrent ? undefined : node.data?.uipath;
|
|
257
|
+
const label = nonEmpty(isCurrent ? node.data?.display?.label : node.data?.label);
|
|
258
|
+
const entryPointId = nonEmpty(uipath?.entryPointId) ?? nonEmpty(inputs?.entryPointId);
|
|
259
|
+
const isDefault = uipath?.isDefault ?? inputs?.isDefault;
|
|
260
|
+
triggers.push({
|
|
261
|
+
id: node.id,
|
|
262
|
+
...label !== undefined && { label },
|
|
263
|
+
...entryPointId !== undefined && { entryPointId },
|
|
264
|
+
isDefault: isDefaultFlag(isDefault)
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
return triggers;
|
|
268
|
+
}
|
|
269
|
+
function withCasePlanDefaults2(entryPoints, plan, casePlanFileName) {
|
|
270
|
+
const flagged = new Set(readCasePlanTriggers2(plan).filter((trigger) => trigger.isDefault).map((trigger) => trigger.id));
|
|
271
|
+
if (flagged.size === 0)
|
|
272
|
+
return [...entryPoints];
|
|
273
|
+
const sidecar = casePlanSidecarName2(casePlanFileName);
|
|
274
|
+
const listed = new Set(entryPoints.flatMap((entry) => typeof entry === "object" && entry !== null && typeof entry.filePath === "string" && resolveDeclaredFileName2(entry.filePath) === sidecar ? [entry.filePath.split("#")[1] ?? ""] : []));
|
|
275
|
+
const unlisted = [...flagged].filter((id) => !listed.has(id));
|
|
276
|
+
if (unlisted.length > 0) {
|
|
277
|
+
throw new CasePlanDefaultNotListedError(unlisted);
|
|
278
|
+
}
|
|
279
|
+
return entryPoints.map((entry) => {
|
|
280
|
+
if (typeof entry !== "object" || entry === null)
|
|
281
|
+
return entry;
|
|
282
|
+
const { isDefault: _isDefault, ...rest } = entry;
|
|
283
|
+
const filePath = typeof entry.filePath === "string" ? entry.filePath : "";
|
|
284
|
+
const isDefault = resolveDeclaredFileName2(filePath) === sidecar && flagged.has(filePath.split("#")[1] ?? "");
|
|
285
|
+
return isDefault ? { ...rest, isDefault: true } : rest;
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
class CasePlanDefaultNotListedError extends Error {
|
|
290
|
+
triggerIds;
|
|
291
|
+
constructor(triggerIds) {
|
|
292
|
+
const names = triggerIds.map((id) => `'${id}'`).join(", ");
|
|
293
|
+
super(`The case plan flags ${triggerIds.length === 1 ? "trigger" : "triggers"} ${names} as the default, but entry-points.json has no entry for ${triggerIds.length === 1 ? "it" : "them"}, so the package could not start from ${triggerIds.length === 1 ? "it" : "them"}. Run 'uip maestro case init --force' to add the entry, then try again.`);
|
|
294
|
+
this.triggerIds = triggerIds;
|
|
295
|
+
this.name = "CasePlanDefaultNotListedError";
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
async function casePlanDefaults2(fs, contentFolder) {
|
|
299
|
+
const casePlanFileName = findCasePlanFileName2(await fs.readdir(contentFolder));
|
|
300
|
+
if (!casePlanFileName)
|
|
301
|
+
return;
|
|
302
|
+
const plan = (await readJsonObjectFile(fs, Path.join(contentFolder, casePlanFileName)))?.value;
|
|
303
|
+
if (!plan)
|
|
304
|
+
return;
|
|
305
|
+
return (entryPoints) => withCasePlanDefaults2(entryPoints, plan, casePlanFileName);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// ../packager/packager-tool-case/src/case-tool.ts
|
|
309
|
+
var CaseConstants = {
|
|
310
|
+
EntryPointsFileName: "entry-points.json"
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
class CaseTool extends ProjectTool {
|
|
314
|
+
_temporaryStorage;
|
|
315
|
+
constructor(fileSystem, logger) {
|
|
316
|
+
super(fileSystem, logger);
|
|
317
|
+
this._temporaryStorage = new TemporaryStorageService(fileSystem);
|
|
318
|
+
}
|
|
319
|
+
async restoreAsync(_options, _cancellationToken) {
|
|
320
|
+
this.logger.info("Restore operation is not required for Case Management projects");
|
|
321
|
+
return ToolResult.success();
|
|
322
|
+
}
|
|
323
|
+
async validateAsync(_options, _cancellationToken) {
|
|
324
|
+
this.logger.info("Validate operation is not required for Case Management projects");
|
|
325
|
+
return ToolResult.success();
|
|
326
|
+
}
|
|
327
|
+
async buildAsync(options, _cancellationToken) {
|
|
328
|
+
const tempFolder = await this._temporaryStorage.getTempFolderPath();
|
|
329
|
+
const localBuildFolder = Path.join(tempFolder, NugetConstants.OutputFolderName);
|
|
330
|
+
const contentFolder = Path.join(localBuildFolder, NugetConstants.ContentFolderName);
|
|
331
|
+
try {
|
|
332
|
+
this.logger.progress("Copying files...");
|
|
333
|
+
await this.copyFiles(options.projectPath, contentFolder);
|
|
334
|
+
try {
|
|
335
|
+
await applyDefaultEntryPoint(this.fileSystem, {
|
|
336
|
+
contentFolder,
|
|
337
|
+
withDefaults: await casePlanDefaults2(this.fileSystem, contentFolder)
|
|
338
|
+
});
|
|
339
|
+
} catch (error) {
|
|
340
|
+
if (!(error instanceof CasePlanDefaultNotListedError)) {
|
|
341
|
+
throw error;
|
|
342
|
+
}
|
|
343
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, error.message);
|
|
344
|
+
}
|
|
345
|
+
await this.reconcileRoleBindingNames(contentFolder);
|
|
346
|
+
this.logger.progress("Compiling case plan to BPMN...");
|
|
347
|
+
const compileResult = await this.compileCasePlan(options.projectPath, contentFolder);
|
|
348
|
+
if (!compileResult.isSuccess) {
|
|
349
|
+
return compileResult;
|
|
350
|
+
}
|
|
351
|
+
this.logger.progress("Creating operate.json file...");
|
|
352
|
+
await this.createOperateFile(options, contentFolder);
|
|
353
|
+
this.logger.progress("Creating package-descriptor.json file...");
|
|
354
|
+
await this.createPackageDescriptor(localBuildFolder, contentFolder);
|
|
355
|
+
return new ToolResult("SUCCESS" /* Success */, "done", [
|
|
356
|
+
localBuildFolder
|
|
357
|
+
]);
|
|
358
|
+
} catch (error) {
|
|
359
|
+
const errorMessage = error instanceof Error ? error.toString() : String(error);
|
|
360
|
+
this.logger.error(errorMessage);
|
|
361
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, "An error occurred while building Case Management project files");
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
async packAsync(options, cancellationToken) {
|
|
365
|
+
const buildResult = await this.buildAsync(options, cancellationToken);
|
|
366
|
+
if (!buildResult.isSuccess) {
|
|
367
|
+
return buildResult;
|
|
368
|
+
}
|
|
369
|
+
const localBuildFolder = buildResult.packages[0];
|
|
370
|
+
try {
|
|
371
|
+
this.logger.progress("Creating NuGet package...");
|
|
372
|
+
const nupkgFileName = `${options.package.id}.${options.package.version}.nupkg`;
|
|
373
|
+
const nupkgPath = Path.join(options.outputPath, nupkgFileName);
|
|
374
|
+
const packager = new NugetPackager(this.fileSystem);
|
|
375
|
+
const result = await packager.packAsync(localBuildFolder, options.package, nupkgPath);
|
|
376
|
+
this.logger.progress("Package created successfully");
|
|
377
|
+
return new ToolResult("SUCCESS" /* Success */, "done", [
|
|
378
|
+
result.outputPath
|
|
379
|
+
]);
|
|
380
|
+
} catch (error) {
|
|
381
|
+
const errorMessage = error instanceof Error ? error.toString() : String(error);
|
|
382
|
+
this.logger.error(errorMessage);
|
|
383
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, "An error occurred while packing Case Management project");
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
async dispose() {
|
|
387
|
+
this.logger.info("Disposing Case Management Tool");
|
|
388
|
+
try {
|
|
389
|
+
await this._temporaryStorage.cleanup();
|
|
390
|
+
} catch {}
|
|
391
|
+
}
|
|
392
|
+
async reconcileRoleBindingNames(contentFolder) {
|
|
393
|
+
const planName = findCasePlanFileName2(await this.fileSystem.readdir(contentFolder));
|
|
394
|
+
if (planName === undefined)
|
|
395
|
+
return;
|
|
396
|
+
const bindingsPath = Path.join(contentFolder, "bindings_v2.json");
|
|
397
|
+
const plan = await this.readJson(Path.join(contentFolder, planName));
|
|
398
|
+
const file = await this.readJson(bindingsPath);
|
|
399
|
+
if (!isRecord3(file) || !Array.isArray(file.resources))
|
|
400
|
+
return;
|
|
401
|
+
const { resources, changed } = reconcileRoleBindings(file.resources, readCaseRoles(plan));
|
|
402
|
+
if (!changed)
|
|
403
|
+
return;
|
|
404
|
+
await this.fileSystem.writeFile(bindingsPath, `${JSON.stringify({ ...file, resources }, null, 2)}
|
|
405
|
+
`);
|
|
406
|
+
}
|
|
407
|
+
async readJson(path) {
|
|
408
|
+
try {
|
|
409
|
+
const raw = await this.fileSystem.readFile(path);
|
|
410
|
+
return raw && raw.length > 0 ? JSON.parse(new TextDecoder().decode(raw)) : undefined;
|
|
411
|
+
} catch {
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
async copyFiles(sourcePath, contentFolder) {
|
|
416
|
+
await this.fileSystem.mkdir(contentFolder);
|
|
417
|
+
const files = await this.fileSystem.readdir(sourcePath);
|
|
418
|
+
for (const file of files) {
|
|
419
|
+
const sourceFile = Path.join(sourcePath, file);
|
|
420
|
+
const stat = await this.fileSystem.stat(sourceFile);
|
|
421
|
+
if (stat?.isFile()) {
|
|
422
|
+
const content = await this.fileSystem.readFile(sourceFile);
|
|
423
|
+
if (content) {
|
|
424
|
+
const destinationFile = Path.join(contentFolder, file);
|
|
425
|
+
await this.fileSystem.writeFile(destinationFile, content);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
async compileCasePlan(projectPath, contentFolder) {
|
|
431
|
+
const compile = getCaseBpmnCompiler();
|
|
432
|
+
const casePlanFileName = findCasePlanFileName2(await this.fileSystem.readdir(projectPath));
|
|
433
|
+
if (!compile || !casePlanFileName) {
|
|
434
|
+
return this.checkEntryPointBpmnPresent(contentFolder, casePlanFileName);
|
|
435
|
+
}
|
|
436
|
+
const sidecarFileName = casePlanSidecarName2(casePlanFileName);
|
|
437
|
+
const casePlanPath = Path.join(projectPath, casePlanFileName);
|
|
438
|
+
const casePlan = await this.fileSystem.readFile(casePlanPath);
|
|
439
|
+
if (!casePlan || casePlan.length === 0) {
|
|
440
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `'${casePlanFileName}' in ${projectPath} is empty, so there is nothing to compile into '${sidecarFileName}'. Author the case plan, or re-scaffold the project with 'uip maestro case init'.`);
|
|
441
|
+
}
|
|
442
|
+
try {
|
|
443
|
+
const bpmnXml = await compile(new TextDecoder().decode(casePlan));
|
|
444
|
+
await this.fileSystem.writeFile(Path.join(contentFolder, sidecarFileName), bpmnXml);
|
|
445
|
+
return await this.checkEntryPointBpmnPresent(contentFolder, casePlanFileName);
|
|
446
|
+
} catch (error) {
|
|
447
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
448
|
+
this.logger.error(message);
|
|
449
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `Failed to compile '${casePlanFileName}' into '${sidecarFileName}': ${message}. Run 'uip maestro case validate ${projectPath}' to find the problem in the case plan, then pack again.`);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
async checkEntryPointBpmnPresent(contentFolder, casePlanFileName) {
|
|
453
|
+
const referenced = await this.readEntryPointBpmnFiles(contentFolder);
|
|
454
|
+
if (referenced === null) {
|
|
455
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `'${CaseConstants.EntryPointsFileName}' could not be read as JSON, so pack cannot check that the BPMN it declares is in the package. Fix or re-scaffold '${CaseConstants.EntryPointsFileName}', then pack again.`);
|
|
456
|
+
}
|
|
457
|
+
const own = casePlanFileName ? casePlanSidecarName2(casePlanFileName) : undefined;
|
|
458
|
+
const fix = own ?? `Author a case plan (${CasePlanFileNames2.join(", ")}) so pack can compile it (see 'uip maestro case init'), then pack again.`;
|
|
459
|
+
const staged = await this.stagedMain(contentFolder);
|
|
460
|
+
const mainEntry = resolveDeclaredFileName2(staged.filePath);
|
|
461
|
+
if (staged.filePath && !referenced.includes(mainEntry)) {
|
|
462
|
+
const wording = stagedMainProblem2(staged, mainEntry, own);
|
|
463
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `${wording.problem}, which is not a declared .bpmn file this project ships, so the package's main would name a file pack cannot produce. ${wording.fix ? `${wording.fix}, then pack again.` : fix}`);
|
|
464
|
+
}
|
|
465
|
+
if (referenced.length === 0) {
|
|
466
|
+
return ToolResult.success();
|
|
467
|
+
}
|
|
468
|
+
const contentFiles = await this.fileSystem.readdir(contentFolder);
|
|
469
|
+
const missing = referenced.filter((file) => !contentFiles.includes(file));
|
|
470
|
+
if (missing.length === 0) {
|
|
471
|
+
if (casePlanFileName) {
|
|
472
|
+
const misnamed = misnamedEntryPointBpmn2(referenced, casePlanFileName);
|
|
473
|
+
if (misnamed) {
|
|
474
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `'${CaseConstants.EntryPointsFileName}' points at 'content/${misnamed}', the sidecar of a case plan this project does not carry. '${casePlanFileName}' compiles to '${own}', so the entry point would resolve to a BPMN pack did not produce. Point it at '${own}', then pack again.`);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
return ToolResult.success();
|
|
478
|
+
}
|
|
479
|
+
const missingFix = casePlanFileName ? `Add the missing file to the project, or point '${CaseConstants.EntryPointsFileName}' at the BPMN the project does ship, then pack again.` : fix;
|
|
480
|
+
const missingList = missing.map((f) => `'content/${f}'`).join(", ");
|
|
481
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `'${CaseConstants.EntryPointsFileName}' points at ${missingList}, which the package does not contain, so it would deploy and activate and then fault every job. ${missingFix}`);
|
|
482
|
+
}
|
|
483
|
+
async readEntryPointBpmnFiles(contentFolder) {
|
|
484
|
+
const entryPointsPath = Path.join(contentFolder, CaseConstants.EntryPointsFileName);
|
|
485
|
+
if (!await this.fileSystem.exists(entryPointsPath)) {
|
|
486
|
+
return [];
|
|
487
|
+
}
|
|
488
|
+
const raw = await this.fileSystem.readFile(entryPointsPath);
|
|
489
|
+
if (!raw || raw.length === 0) {
|
|
490
|
+
return null;
|
|
491
|
+
}
|
|
492
|
+
return entryPointBpmnNames2(new TextDecoder().decode(raw));
|
|
493
|
+
}
|
|
494
|
+
async stagedMain(contentFolder) {
|
|
495
|
+
const read = async (name) => {
|
|
496
|
+
const raw = await this.fileSystem.readFile(Path.join(contentFolder, name));
|
|
497
|
+
return raw ? new TextDecoder().decode(raw) : null;
|
|
498
|
+
};
|
|
499
|
+
const entryPoints = await read(CaseConstants.EntryPointsFileName);
|
|
500
|
+
if (entryPoints === null) {
|
|
501
|
+
return { filePath: "", source: "entry-points.json" };
|
|
502
|
+
}
|
|
503
|
+
return stagedMainEntryPoint2(await read(NugetConstants.OperateFileName), entryPoints);
|
|
504
|
+
}
|
|
505
|
+
async createOperateFile(options, contentFolder) {
|
|
506
|
+
await ensureContentOperateFile(this.fileSystem, {
|
|
507
|
+
contentFolder,
|
|
508
|
+
projectPath: options.projectPath,
|
|
509
|
+
projectStorageId: options.projectStorageId,
|
|
510
|
+
contentType: "CaseManagement" /* CaseManagement */
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
async createPackageDescriptor(localBuildFolder, contentFolder) {
|
|
514
|
+
const contentFiles = await this.fileSystem.readdir(contentFolder);
|
|
515
|
+
const packageDescriptorPath = Path.join(localBuildFolder, NugetConstants.ContentFolderName, NugetConstants.PackageDescriptorFileName);
|
|
516
|
+
const packageDescriptorJson = JSON.stringify(buildCasePackageDescriptor2(contentFiles), null, 2);
|
|
517
|
+
await this.fileSystem.writeFile(packageDescriptorPath, packageDescriptorJson);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
var isRecord3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
521
|
+
|
|
522
|
+
// ../packager/packager-tool-case/src/case-tool-factory.ts
|
|
523
|
+
class CaseToolFactory2 {
|
|
524
|
+
supportedTypes = [
|
|
525
|
+
"CaseManagement" /* CaseManagement */
|
|
526
|
+
];
|
|
527
|
+
async createAsync(logger, fileSystem) {
|
|
528
|
+
return new CaseTool(fileSystem, logger);
|
|
529
|
+
}
|
|
530
|
+
async describeResourcesAsync(projectDir, fileSystem) {
|
|
531
|
+
return describeCaseRoles(projectDir, fileSystem);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// ../packager/packager-tool-case/src/index.ts
|
|
536
|
+
toolsFactoryRepository.registerProjectToolFactory(new CaseToolFactory2);
|
|
537
|
+
export { CasePlanFileNames2, casePlanSidecarName2, findCasePlanFileName2, resolveDeclaredFileName2, normalizeEntryPointPath2, entryPointBpmnNames2, misnamedEntryPointBpmn2, stagedMainEntryPoint2, stagedMainProblem2, buildCasePackageDescriptor2, registerCaseBpmnCompiler, readCasePlanTriggers2, withCasePlanDefaults2, casePlanDefaults2, CaseToolFactory2 };
|
|
538
|
+
|
|
539
|
+
//# debugId=635649467B9FF67964756E2164756E21
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
norm
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-fcektt1g.js";
|
|
4
4
|
|
|
5
5
|
// src/services/sdd-convert/ids.ts
|
|
6
6
|
var buildElementId = (stageId, taskId) => `${stageId}-${taskId}`;
|
|
@@ -54,7 +54,7 @@ var lookupOutput = (index, key, task) => {
|
|
|
54
54
|
const byTask = index.get(key);
|
|
55
55
|
if (byTask === undefined)
|
|
56
56
|
return;
|
|
57
|
-
const tasksNamed = (name,
|
|
57
|
+
const tasksNamed = (name, claim) => typeof claim === "number" ? Array.from({ length: claim }, () => name) : [name];
|
|
58
58
|
const exact = byTask.get(exactKey(task));
|
|
59
59
|
if (exact !== undefined) {
|
|
60
60
|
return typeof exact === "number" ? { names: tasksNamed(exactKey(task), exact) } : { id: exact };
|
|
@@ -64,11 +64,11 @@ var lookupOutput = (index, key, task) => {
|
|
|
64
64
|
return { id: only };
|
|
65
65
|
}
|
|
66
66
|
return {
|
|
67
|
-
names: [...byTask].flatMap(([name,
|
|
67
|
+
names: [...byTask].flatMap(([name, claim]) => tasksNamed(name, claim))
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
var scopedSlaKey = (scope, title) => `${scope}\x00${title}`;
|
|
71
71
|
|
|
72
72
|
export { buildElementId, stageSpellings, referenceSpellings, indexKey, modelKey, everySpelling, claim, dedupedId, exactKey, claimOutput, lookupOutput, scopedSlaKey };
|
|
73
73
|
|
|
74
|
-
//# debugId=
|
|
74
|
+
//# debugId=BD365DF596F4401564756E2164756E21
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// ../integrationservice-sdk/src/dap/activity-configuration-version.ts
|
|
2
|
+
var ACTIVITY_CONFIGURATION_VERSION = "activityConfigurationVersion";
|
|
3
|
+
var v2ConfigurationVersionEntry = () => ({ name: ACTIVITY_CONFIGURATION_VERSION, type: "string", value: "v2" });
|
|
4
|
+
export { v2ConfigurationVersionEntry };
|
|
5
|
+
|
|
6
|
+
//# debugId=F8F1CE42F97C860064756E2164756E21
|
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -45,8 +45,17 @@ var __export = (target, all) => {
|
|
|
45
45
|
set: __exportSetter.bind(all, name)
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
|
+
var __exportCjs = (target, getters, setters) => {
|
|
49
|
+
for (var name in getters)
|
|
50
|
+
__defProp(target, name, {
|
|
51
|
+
get: getters[name],
|
|
52
|
+
set: setters[name],
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true
|
|
55
|
+
});
|
|
56
|
+
};
|
|
48
57
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
49
58
|
|
|
50
|
-
export { __toESM, __commonJS, __export, __require };
|
|
59
|
+
export { __toESM, __commonJS, __export, __exportCjs, __require };
|
|
51
60
|
|
|
52
|
-
//# debugId=
|
|
61
|
+
//# debugId=6238031C22BFDF8D64756E2164756E21
|