@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.
Files changed (211) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +68 -7
  2. package/dist/applicationinsights-web-8m26566f.js +17209 -0
  3. package/dist/{authoring-kqh34zzm.js → authoring-vg90pqrn.js} +488 -213
  4. package/dist/bindings-v2-1da35xsc.js +27 -0
  5. package/dist/{browser-strategy-6atc7v8s.js → browser-strategy-627rrg7z.js} +6 -7
  6. package/dist/{business-rule-export-ey588rv7.js → business-rule-export-jv60r9jf.js} +3 -7
  7. package/dist/carry-forward-sfdnta6q.js +52 -0
  8. package/dist/{case-api-sme7esce.js → case-api-by95rf40.js} +38 -37
  9. package/dist/{case-bindings-service-cht20gqt.js → case-bindings-service-pp3c9g1e.js} +93 -45
  10. package/dist/{case-debug-solution-projects-qqd3h10v.js → case-debug-solution-projects-je7h4hmq.js} +3 -7
  11. package/dist/{case-debug-studio-web-service-nqzmwbr5.js → case-debug-studio-web-service-d83h3atd.js} +48 -45
  12. package/dist/{case-described-io-service-dx1f4nxe.js → case-described-io-service-tsm8r189.js} +33 -15
  13. package/dist/case-event-trigger-bindings-qbs8ywf5.js +17 -0
  14. package/dist/{case-format-service-6aew6tqc.js → case-format-service-3sab2297.js} +9 -10
  15. package/dist/{case-pack-service-pqq8wnfd.js → case-pack-service-txnv711n.js} +47 -42
  16. package/dist/case-schema-version-cw0h2nrv.js +18 -0
  17. package/dist/case-shape-reader-xaxmrd40.js +14 -0
  18. package/dist/{case-splice-service-s5gccctq.js → case-splice-service-6y35w83e.js} +139 -51
  19. package/dist/{case-validate-service-vq38va33.js → case-validate-service-hz0j90we.js} +234 -170
  20. package/dist/connector-enrichment-service-sjjmb9dy.js +56 -0
  21. package/dist/connector-library-1yw5r47w.js +99 -0
  22. package/dist/connector-lookup-service-yerhg9cd.js +20 -0
  23. package/dist/connector-task-shape-bgywpbqc.js +13 -0
  24. package/dist/{de-WLW6KWOJ-2qnsqdtw.js → de-2BEKRUMY-x4dx0nn9.js} +190 -10
  25. package/dist/{de-UZI7FJDO-mwvc4cxe.js → de-AI7ML6JM-km47f8k4.js} +20 -5
  26. package/dist/debug-service-h4jxbn1r.js +56 -0
  27. package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-0228j82a.js} +1 -4
  28. package/dist/en-LAVDF7IQ-yzy20n6d.js +254 -0
  29. package/dist/en-X6T4SP2Y-xm47mf18.js +2752 -0
  30. package/dist/{enrichment-service-hv7ff88p.js → enrichment-service-wpprec7k.js} +36 -37
  31. package/dist/{es-5THCNRFN-tqwyrdgy.js → es-7ZTQTGKN-11sj0yjx.js} +190 -10
  32. package/dist/{es-MX-5RELIXKI-9jhqtddc.js → es-MX-7KJZPEQN-1fq0a9jr.js} +20 -5
  33. package/dist/{es-MX-TWZBRAXK-gqd9swzw.js → es-MX-IHGRIEWH-g63p0gb4.js} +191 -11
  34. package/dist/{es-4UBUTCQA-m1ytpyx2.js → es-SPNKTD5Y-vw5cbgv5.js} +20 -5
  35. package/dist/filter-engine-dh9s90gb.js +10 -0
  36. package/dist/first-party-service-ahcc6xc6.js +8 -0
  37. package/dist/{fr-CERONSRC-edpxhbmb.js → fr-7ZDL4MVO-pd27vwh6.js} +191 -11
  38. package/dist/{fr-VBM5WRC2-63z7w4mh.js → fr-AXJGUT53-hdg3pmd4.js} +20 -5
  39. package/dist/index-21kns9qg.js +10 -0
  40. package/dist/{index-fyc0k5dd.js → index-5pzp2qeb.js} +5350 -3271
  41. package/dist/{connector-task-spec-pzfzmfr5.js → index-9f8naxbk.js} +320 -144
  42. package/dist/{index-5dxh9z60.js → index-a7y7etmy.js} +6 -5
  43. package/dist/{index-ekwtgx7y.js → index-ec115v05.js} +309 -287
  44. package/dist/index-j9t2k52h.js +35 -0
  45. package/dist/index-myf7b4a5.js +26 -0
  46. package/dist/index-nj3axvya.js +159 -0
  47. package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
  48. package/dist/index-pg9wmyrf.js +36 -0
  49. package/dist/index-z2qk2qn6.js +24 -0
  50. package/dist/index.js +19 -25
  51. package/dist/index.umd.min-ttg1qc0x.js +7814 -0
  52. package/dist/{init-entry-points-hhpv3e3f.js → init-entry-points-pc128f7z.js} +22 -35
  53. package/dist/input-reader-9ym8mkbc.js +10 -0
  54. package/dist/{ja-43QL7CGO-c3q8gre9.js → ja-C7GZV6YP-hvtbngr5.js} +20 -5
  55. package/dist/{ja-U2MCNHGT-gz0ap1jk.js → ja-LGAM5HKR-sgrtjqjh.js} +190 -10
  56. package/dist/{jmespath-e4a59c8w.js → jmespath-wwym30dp.js} +1 -1
  57. package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
  58. package/dist/known-types-gak9by1w.js +11 -0
  59. package/dist/{ko-XAUYQWDR-zp81gjp4.js → ko-7B4SUZB7-c8wr20sc.js} +190 -10
  60. package/dist/{ko-TLL6Z6CD-wrt3n8a9.js → ko-Q24HSSL4-5vn55pte.js} +20 -5
  61. package/dist/localSolutionDiscovery-48d1bnkj.js +15 -0
  62. package/dist/{migration-diagnosis-ns5cw4e3.js → migration-diagnosis-myqqgwj0.js} +1 -4
  63. package/dist/{node-strategy-v442hwgd.js → node-strategy-2mqzg36t.js} +15 -18
  64. package/dist/node-sync-service-y8b5w1rd.js +56 -0
  65. package/dist/{out-target-wjgmna0r.js → out-target-eqsttq1k.js} +18 -22
  66. package/dist/{packager-tool-f8vwy92w.js → packager-tool-0te1tyhf.js} +186 -16
  67. package/dist/{packager-tool-ydyvtknp.js → packager-tool-0w4fsdzv.js} +44 -20
  68. package/dist/{packager-tool-8ftat1vn.js → packager-tool-17b466mr.js} +59158 -59666
  69. package/dist/packager-tool-1nfdj0zm.js +425 -0
  70. package/dist/packager-tool-1wgav5ma.js +139 -0
  71. package/dist/{packager-tool-b1nw50ev.js → packager-tool-265h946t.js} +256 -486
  72. package/dist/{packager-tool-nj4seavy.js → packager-tool-35c9npcy.js} +26 -7
  73. package/dist/{packager-tool-r0x3qh59.js → packager-tool-388vyja1.js} +185 -29
  74. package/dist/packager-tool-3m8482sw.js +78 -0
  75. package/dist/packager-tool-3r23qsca.js +4832 -0
  76. package/dist/packager-tool-3xehbdyd.js +1302 -0
  77. package/dist/packager-tool-4avchhz8.js +539 -0
  78. package/dist/{packager-tool-9kvkzc05.js → packager-tool-5w0gjcck.js} +4 -4
  79. package/dist/packager-tool-68648y3j.js +6 -0
  80. package/dist/{packager-tool-1yh8g550.js → packager-tool-6an893wm.js} +12 -3
  81. package/dist/{packager-tool-aagnvyba.js → packager-tool-76zhn5pa.js} +131 -432
  82. package/dist/packager-tool-7x1tmb8a.js +46 -0
  83. package/dist/{packager-tool-kyrm4e5m.js → packager-tool-9ar5829n.js} +781 -741
  84. package/dist/{packager-tool-4p11fvf4.js → packager-tool-b2q8m9pq.js} +10 -13
  85. package/dist/packager-tool-bg3tdpva.js +27 -0
  86. package/dist/{packager-tool-wr12ndwk.js → packager-tool-ccejfs0r.js} +252 -468
  87. package/dist/{packager-tool-yn33pw57.js → packager-tool-dn9d4ywm.js} +246 -225
  88. package/dist/{packager-tool-kdhey8gz.js → packager-tool-e02jkmrq.js} +41 -29
  89. package/dist/{packager-tool-sq931c23.js → packager-tool-e1tx5mqg.js} +1 -1
  90. package/dist/{packager-tool-qn3zkrrc.js → packager-tool-ehjw672b.js} +32 -15
  91. package/dist/packager-tool-gy4yjqhf.js +178 -0
  92. package/dist/packager-tool-h2ar8xf8.js +222 -0
  93. package/dist/{packager-tool-v2kcgjbf.js → packager-tool-j6nfje7t.js} +5 -4
  94. package/dist/packager-tool-k0ar6cn7.js +295 -0
  95. package/dist/packager-tool-kz7zz79p.js +71 -0
  96. package/dist/{packager-tool-1gwbq864.js → packager-tool-m5384a1s.js} +66 -82
  97. package/dist/{packager-tool-9e59z4d6.js → packager-tool-me8gd22q.js} +82 -83
  98. package/dist/packager-tool-mk9fmzdy.js +20 -0
  99. package/dist/{packager-tool-yfmby4dd.js → packager-tool-mkt1njk2.js} +630 -689
  100. package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
  101. package/dist/{packager-tool-mqy97y5f.js → packager-tool-p5gs9xqy.js} +14 -14
  102. package/dist/{packager-tool-83v804p7.js → packager-tool-psmb758n.js} +3108 -2627
  103. package/dist/packager-tool-q26hncjr.js +13 -0
  104. package/dist/packager-tool-q9fnx278.js +77 -0
  105. package/dist/{packager-tool-ezds6t5e.js → packager-tool-s12s1dp6.js} +11 -11
  106. package/dist/packager-tool-scy94jyb.js +5424 -0
  107. package/dist/{packager-tool-yn7r7zq2.js → packager-tool-snesn0bt.js} +177 -96
  108. package/dist/{packager-tool-d8e2mrkq.js → packager-tool-tgehy324.js} +56 -56
  109. package/dist/{packager-tool-tqn0j6f9.js → packager-tool-v11fx4dk.js} +7 -7
  110. package/dist/{packager-tool-67vy1fz3.js → packager-tool-v6rkp2ay.js} +24 -92
  111. package/dist/{packager-tool-9sd483vs.js → packager-tool-vs7gqa4r.js} +15 -15
  112. package/dist/packager-tool-vyavrbym.js +488 -0
  113. package/dist/{packager-tool-b098y4a2.js → packager-tool-wbksf242.js} +97 -97
  114. package/dist/{packager-tool-2sn7d8fd.js → packager-tool-x74mmjkw.js} +9 -13
  115. package/dist/{packager-tool-7hw344bt.js → packager-tool-xb16e3tz.js} +5 -5
  116. package/dist/{packager-tool-a17g0pj1.js → packager-tool-xd1wbvay.js} +10 -8
  117. package/dist/{packager-tool-1yfw674x.js → packager-tool-xehhk3c3.js} +10 -5
  118. package/dist/packager-tool-yh8mmj3p.js +123 -0
  119. package/dist/{packager-tool-hdxtgckw.js → packager-tool-z070caqq.js} +56 -12
  120. package/dist/{packager-tool-b250k6w4.js → packager-tool-z1fw9a8v.js} +41 -9
  121. package/dist/{packager-tool-0gctz400.js → packager-tool-z9fmqtm6.js} +4 -4
  122. package/dist/{packager-tool-mzf4gmph.js → packager-tool-zbx189j3.js} +11 -8
  123. package/dist/{packager-tool-zf8f9pmm.js → packager-tool-zrbnms9b.js} +3 -4
  124. package/dist/packager-tool.js +10 -11
  125. package/dist/prepare-uip-ad7mfs8t.js +92 -0
  126. package/dist/{project-artifacts-bgyyb0dm.js → project-artifacts-q0c0zghw.js} +2 -6
  127. package/dist/{pt-BR-USP2T7GD-pedn77m1.js → pt-BR-BIUJXIPU-2sqzhr8y.js} +20 -5
  128. package/dist/{pt-BR-GNQNAAZ2-xadharv4.js → pt-BR-PHLFHMXZ-n6de4s7z.js} +191 -11
  129. package/dist/{pt-RMIAKZB4-67enhx3m.js → pt-MHX6JGAX-xfgvdqwg.js} +20 -5
  130. package/dist/{pt-TO2DARY2-ftcce1bv.js → pt-N7ZTJT4W-d6c67xcn.js} +190 -10
  131. package/dist/{resolved-check-aqw7568y.js → resolved-check-dz8eqrf6.js} +2 -3
  132. package/dist/{resourcesSyncService-8ac6ncq2.js → resourcesSyncService-yrhhh62m.js} +81 -141
  133. package/dist/{ro-GHOBYW2S-mhnqsgaa.js → ro-3RKJNGJZ-xqj14e3d.js} +20 -5
  134. package/dist/{ro-WUYJV6OW-a8d9qy1n.js → ro-FLNXVYJI-ytrwabg2.js} +190 -10
  135. package/dist/ru-GSCT4ARZ-c2cfq4h1.js +7 -0
  136. package/dist/ru-WBLQ5B2U-bf20yr5y.js +7 -0
  137. package/dist/{rule-group-members-zje7n3kf.js → rule-group-members-p0nv1rmj.js} +1 -3
  138. package/dist/rule-type-declaration-s2nxpcfy.js +77 -0
  139. package/dist/{sdd-convert-service-8jpew7vz.js → sdd-convert-service-ffbx00k6.js} +481 -504
  140. package/dist/{sdd-lookup-fe900sdb.js → sdd-lookup-sah7wj5j.js} +8 -9
  141. package/dist/{sdd-resolve-service-qdtmxw9b.js → sdd-resolve-service-6nt10vhq.js} +28 -20
  142. package/dist/{sdd-resolve-siblings-8gf9zjwf.js → sdd-resolve-siblings-ap8j1c8h.js} +11 -14
  143. package/dist/solution-auth-a1p22hq1.js +11 -0
  144. package/dist/solution-discovery-r1y550sz.js +33 -0
  145. package/dist/{strict-case-rules-4tjcaznr.js → strict-case-rules-045kbjvv.js} +16 -28
  146. package/dist/{strict-entry-points-g2pd4mf4.js → strict-entry-points-40ha9afz.js} +15 -14
  147. package/dist/strict-sdd-audit-bp7fq2tg.js +26 -0
  148. package/dist/{task-selector-8bjn35dv.js → task-selector-jt60hdbt.js} +1 -3
  149. package/dist/{task-type-declaration-7a8fqdvs.js → task-type-declaration-yhczvj05.js} +9 -9
  150. package/dist/tool.js +18 -24
  151. package/dist/{tr-M3F5A6AU-bb0tg39m.js → tr-7AIZZWZ6-pdzp9n0p.js} +190 -10
  152. package/dist/{tr-GDTLECMM-k5fhmq13.js → tr-PQLUUHPC-qsb7btxn.js} +20 -5
  153. package/dist/{trigger-enrichment-service-agvnhdf7.js → trigger-enrichment-service-z8kxy6qr.js} +53 -57
  154. package/dist/trigger-entry-point-id-751v48qd.js +14 -0
  155. package/dist/{zh-CN-C5G4PC7C-ds9gkptg.js → zh-CN-CN2ARPFS-e0p2qrxf.js} +190 -10
  156. package/dist/{zh-CN-I5D7WHBD-sr5h0a98.js → zh-CN-OHNTHZRI-b0hjkfqn.js} +20 -5
  157. package/dist/{zh-TW-62HZIG6O-787kdwex.js → zh-TW-7RUFEVFK-qd7myw31.js} +190 -10
  158. package/dist/{zh-TW-2AVLM723-288pkc1z.js → zh-TW-E4D3Y6ZR-tn3bmzz5.js} +20 -5
  159. package/package.json +2 -2
  160. package/dist/canvas-notes-86fxx1t8.js +0 -19
  161. package/dist/case-event-trigger-bindings-g9ftnm4x.js +0 -16
  162. package/dist/case-schema-version-h820ne16.js +0 -20
  163. package/dist/case-shape-reader-dsbraetf.js +0 -13
  164. package/dist/connector-enrichment-service-6kskfevq.js +0 -65
  165. package/dist/connector-lookup-service-yyn8kkw7.js +0 -22
  166. package/dist/connector-task-shape-mpazkf7s.js +0 -14
  167. package/dist/debug-service-7q98j726.js +0 -59
  168. package/dist/en-EJCBA3LK-dtpdghgj.js +0 -146
  169. package/dist/en-M7GQYBV2-5nfmpnfz.js +0 -2018
  170. package/dist/filter-engine-7ep90g7f.js +0 -11
  171. package/dist/first-party-service-srxaftkn.js +0 -27
  172. package/dist/index-0d7qc2gs.js +0 -282
  173. package/dist/index-jmv5by9z.js +0 -666
  174. package/dist/index-kmp9fmhb.js +0 -25
  175. package/dist/index-n9qvnx4x.js +0 -29
  176. package/dist/index-ngs0a2he.js +0 -15
  177. package/dist/index-xq6ajhgq.js +0 -157
  178. package/dist/index.umd.min-fqefd9kn.js +0 -7814
  179. package/dist/input-reader-c7wz8ra2.js +0 -11
  180. package/dist/known-types-5b6yrsqn.js +0 -16
  181. package/dist/localSolutionDiscovery-yyx234ak.js +0 -13
  182. package/dist/node-sync-service-2ezr3akv.js +0 -57
  183. package/dist/packager-tool-53w8skv5.js +0 -262
  184. package/dist/packager-tool-6z1hsm2h.js +0 -143
  185. package/dist/packager-tool-93mdeqay.js +0 -18
  186. package/dist/packager-tool-9kf3fqtr.js +0 -23
  187. package/dist/packager-tool-bfgdz1zh.js +0 -73
  188. package/dist/packager-tool-e15kqpyh.js +0 -266
  189. package/dist/packager-tool-gmykn1ef.js +0 -5365
  190. package/dist/packager-tool-jysvpt8p.js +0 -11
  191. package/dist/packager-tool-pcvhcn2k.js +0 -2019
  192. package/dist/packager-tool-rk25wp3c.js +0 -28
  193. package/dist/packager-tool-sc961w0q.js +0 -16
  194. package/dist/packager-tool-wekqkmgn.js +0 -265
  195. package/dist/packager-tool-yc4kw997.js +0 -13
  196. package/dist/packager-tool-zgpsnxkd.js +0 -13189
  197. package/dist/ru-GSCT4ARZ-1sa9wbr8.js +0 -10
  198. package/dist/ru-WBLQ5B2U-s4em88p0.js +0 -10
  199. package/dist/solution-auth-30yycqtv.js +0 -14
  200. package/dist/solution-discovery-e9mamp6w.js +0 -38
  201. package/dist/strict-sdd-audit-q7tb9yj7.js +0 -25
  202. package/dist/trigger-entry-point-id-yhqwnkx9.js +0 -15
  203. /package/dist/{packager-tool-5qp9xza1.js → packager-tool-1c30ttpm.js} +0 -0
  204. /package/dist/{packager-tool-mknccck5.js → packager-tool-1h7abxw6.js} +0 -0
  205. /package/dist/{packager-tool-9y1w2wds.js → packager-tool-fcektt1g.js} +0 -0
  206. /package/dist/{packager-tool-k6jbedyc.js → packager-tool-hcdnc420.js} +0 -0
  207. /package/dist/{packager-tool-7nxppa3d.js → packager-tool-jv5byaww.js} +0 -0
  208. /package/dist/{packager-tool-qa9gftnj.js → packager-tool-mxgybnmt.js} +0 -0
  209. /package/dist/{packager-tool-87y6xw3a.js → packager-tool-nfhtwa72.js} +0 -0
  210. /package/dist/{packager-tool-cv05dwac.js → packager-tool-p0rdmmvk.js} +0 -0
  211. /package/dist/{packager-tool-21qfsbxn.js → packager-tool-yaertxsw.js} +0 -0
@@ -1,266 +0,0 @@
1
- import {
2
- NugetConstants,
3
- NugetPackager,
4
- Path,
5
- ProjectTool,
6
- TemporaryStorageService,
7
- ToolResult,
8
- ensureContentOperateFile,
9
- toolsFactoryRepository
10
- } from "./packager-tool-yn7r7zq2.js";
11
-
12
- // ../packager/packager-tool-case/src/case-bpmn-compiler.ts
13
- var COMPILER_KEY = Symbol.for("@uipath/packager-tool-case/caseBpmnCompiler");
14
- var _global = globalThis;
15
- function registerCaseBpmnCompiler(caseBpmnCompiler) {
16
- _global[COMPILER_KEY] = caseBpmnCompiler;
17
- }
18
- function getCaseBpmnCompiler() {
19
- return _global[COMPILER_KEY];
20
- }
21
-
22
- // ../packager/packager-tool-case/src/case-plan-file.ts
23
- var CasePlanFileNames = [
24
- "caseplan.case",
25
- "caseplan.json",
26
- "case.stage.json",
27
- "default.stage.json"
28
- ];
29
- var casePlanSidecarName = (casePlanFileName) => `${casePlanFileName}.bpmn`;
30
- var findCasePlanFileName = (entries) => {
31
- const present = new Set(entries);
32
- return CasePlanFileNames.find((candidate) => present.has(candidate));
33
- };
34
- var stripDeclaredFilePathPrefix = (filePath) => {
35
- const withoutLeadingSlash = filePath.startsWith("/") ? filePath.slice(1) : filePath;
36
- return withoutLeadingSlash.startsWith("content/") ? withoutLeadingSlash.slice("content/".length) : withoutLeadingSlash;
37
- };
38
- var resolveDeclaredFileName = (filePath) => {
39
- const stripped = stripDeclaredFilePathPrefix(filePath.split("#")[0]);
40
- return stripped.includes("/") ? "" : stripped;
41
- };
42
- var normalizeEntryPointPath = (filePath) => `/${stripDeclaredFilePathPrefix(filePath)}`;
43
- var entryPointBpmnNames = (entryPointsJson) => {
44
- try {
45
- const parsed = JSON.parse(entryPointsJson);
46
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
47
- throw new Error("document is not an object");
48
- }
49
- if (parsed.entryPoints !== undefined && !Array.isArray(parsed.entryPoints)) {
50
- throw new Error("entryPoints is not a list");
51
- }
52
- const resolvedNames = (parsed.entryPoints ?? []).map((entry) => typeof entry.filePath === "string" ? resolveDeclaredFileName(entry.filePath) : "");
53
- if (resolvedNames.includes("")) {
54
- throw new Error("an entry point has no usable filePath");
55
- }
56
- const names = resolvedNames.filter((name) => name.endsWith(".bpmn"));
57
- return [...new Set(names)];
58
- } catch {
59
- return null;
60
- }
61
- };
62
- var misnamedEntryPointBpmn = (declared, casePlanFileName) => {
63
- const own = casePlanSidecarName(casePlanFileName);
64
- const otherPlans = new Set(CasePlanFileNames.filter((name) => name !== casePlanFileName).map(casePlanSidecarName));
65
- return declared.find((file) => file !== own && otherPlans.has(file));
66
- };
67
- var buildCasePackageDescriptor = (contentFileNames) => ({
68
- $schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
69
- files: {
70
- [NugetConstants.OperateFileName]: `${NugetConstants.ContentFolderName}/${NugetConstants.OperateFileName}`,
71
- [NugetConstants.EntryPointsFileName]: `${NugetConstants.ContentFolderName}/${NugetConstants.EntryPointsFileName}`,
72
- [NugetConstants.BindingsFileId]: `${NugetConstants.ContentFolderName}/${NugetConstants.BindingsV2FileName}`,
73
- ...Object.fromEntries(contentFileNames.filter((name) => name.endsWith(".bpmn") || CasePlanFileNames.includes(name)).map((name) => [
74
- name,
75
- `${NugetConstants.ContentFolderName}/${name}`
76
- ]))
77
- }
78
- });
79
-
80
- // ../packager/packager-tool-case/src/case-tool.ts
81
- var CaseConstants = {
82
- EntryPointsFileName: "entry-points.json"
83
- };
84
-
85
- class CaseTool extends ProjectTool {
86
- _temporaryStorage;
87
- constructor(fileSystem, logger) {
88
- super(fileSystem, logger);
89
- this._temporaryStorage = new TemporaryStorageService(fileSystem);
90
- }
91
- async restoreAsync(_options, _cancellationToken) {
92
- this.logger.info("Restore operation is not required for Case Management projects");
93
- return ToolResult.success();
94
- }
95
- async validateAsync(_options, _cancellationToken) {
96
- this.logger.info("Validate operation is not required for Case Management projects");
97
- return ToolResult.success();
98
- }
99
- async buildAsync(options, _cancellationToken) {
100
- const tempFolder = await this._temporaryStorage.getTempFolderPath();
101
- const localBuildFolder = Path.join(tempFolder, NugetConstants.OutputFolderName);
102
- const contentFolder = Path.join(localBuildFolder, NugetConstants.ContentFolderName);
103
- try {
104
- this.logger.progress("Copying files...");
105
- await this.copyFiles(options.projectPath, contentFolder);
106
- this.logger.progress("Compiling case plan to BPMN...");
107
- const compileResult = await this.compileCasePlan(options.projectPath, contentFolder);
108
- if (!compileResult.isSuccess) {
109
- return compileResult;
110
- }
111
- this.logger.progress("Creating operate.json file...");
112
- await this.createOperateFile(options, contentFolder);
113
- this.logger.progress("Creating package-descriptor.json file...");
114
- await this.createPackageDescriptor(localBuildFolder, contentFolder);
115
- return new ToolResult("SUCCESS" /* Success */, "done", [
116
- localBuildFolder
117
- ]);
118
- } catch (error) {
119
- const errorMessage = error instanceof Error ? error.toString() : String(error);
120
- this.logger.error(errorMessage);
121
- return ToolResult.error("INTERNAL_ERROR" /* InternalError */, "An error occurred while building Case Management project files");
122
- }
123
- }
124
- async packAsync(options, cancellationToken) {
125
- const buildResult = await this.buildAsync(options, cancellationToken);
126
- if (!buildResult.isSuccess) {
127
- return buildResult;
128
- }
129
- const localBuildFolder = buildResult.packages[0];
130
- try {
131
- this.logger.progress("Creating NuGet package...");
132
- const nupkgFileName = `${options.package.id}.${options.package.version}.nupkg`;
133
- const nupkgPath = Path.join(options.outputPath, nupkgFileName);
134
- const packager = new NugetPackager(this.fileSystem);
135
- const result = await packager.packAsync(localBuildFolder, options.package, nupkgPath);
136
- this.logger.progress("Package created successfully");
137
- return new ToolResult("SUCCESS" /* Success */, "done", [
138
- result.outputPath
139
- ]);
140
- } catch (error) {
141
- const errorMessage = error instanceof Error ? error.toString() : String(error);
142
- this.logger.error(errorMessage);
143
- return ToolResult.error("INTERNAL_ERROR" /* InternalError */, "An error occurred while packing Case Management project");
144
- }
145
- }
146
- async dispose() {
147
- this.logger.info("Disposing Case Management Tool");
148
- try {
149
- await this._temporaryStorage.cleanup();
150
- } catch {}
151
- }
152
- async copyFiles(sourcePath, contentFolder) {
153
- await this.fileSystem.mkdir(contentFolder);
154
- const files = await this.fileSystem.readdir(sourcePath);
155
- for (const file of files) {
156
- const sourceFile = Path.join(sourcePath, file);
157
- const stat = await this.fileSystem.stat(sourceFile);
158
- if (stat?.isFile()) {
159
- const content = await this.fileSystem.readFile(sourceFile);
160
- if (content) {
161
- const destinationFile = Path.join(contentFolder, file);
162
- await this.fileSystem.writeFile(destinationFile, content);
163
- }
164
- }
165
- }
166
- }
167
- async compileCasePlan(projectPath, contentFolder) {
168
- const compile = getCaseBpmnCompiler();
169
- const casePlanFileName = findCasePlanFileName(await this.fileSystem.readdir(projectPath));
170
- if (!compile || !casePlanFileName) {
171
- return this.checkEntryPointBpmnPresent(contentFolder, casePlanFileName);
172
- }
173
- const sidecarFileName = casePlanSidecarName(casePlanFileName);
174
- const casePlanPath = Path.join(projectPath, casePlanFileName);
175
- const casePlan = await this.fileSystem.readFile(casePlanPath);
176
- if (!casePlan || casePlan.length === 0) {
177
- 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'.`);
178
- }
179
- try {
180
- const bpmnXml = await compile(new TextDecoder().decode(casePlan));
181
- await this.fileSystem.writeFile(Path.join(contentFolder, sidecarFileName), bpmnXml);
182
- return await this.checkEntryPointBpmnPresent(contentFolder, casePlanFileName);
183
- } catch (error) {
184
- const message = error instanceof Error ? error.message : String(error);
185
- this.logger.error(message);
186
- 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.`);
187
- }
188
- }
189
- async checkEntryPointBpmnPresent(contentFolder, casePlanFileName) {
190
- const referenced = await this.readEntryPointBpmnFiles(contentFolder);
191
- if (referenced === null) {
192
- 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.`);
193
- }
194
- const own = casePlanFileName ? casePlanSidecarName(casePlanFileName) : undefined;
195
- const fix = own ?? `Author a case plan (${CasePlanFileNames.join(", ")}) so pack can compile it (see 'uip maestro case init'), then pack again.`;
196
- const firstEntry = await this.firstEntryPointFileName(contentFolder);
197
- if (firstEntry && !referenced.includes(firstEntry)) {
198
- const firstEntryFix = own ? `Point the first entry point at '${own}', then pack again.` : fix;
199
- return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `'${CaseConstants.EntryPointsFileName}' first entry point resolves to '${firstEntry}', which is not a declared .bpmn file this project ships, so operate.json's main would name a file pack cannot produce. ${firstEntryFix}`);
200
- }
201
- if (referenced.length === 0) {
202
- return ToolResult.success();
203
- }
204
- const contentFiles = await this.fileSystem.readdir(contentFolder);
205
- const missing = referenced.filter((file) => !contentFiles.includes(file));
206
- if (missing.length === 0) {
207
- if (casePlanFileName) {
208
- const misnamed = misnamedEntryPointBpmn(referenced, casePlanFileName);
209
- if (misnamed) {
210
- 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.`);
211
- }
212
- }
213
- return ToolResult.success();
214
- }
215
- 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;
216
- const missingList = missing.map((f) => `'content/${f}'`).join(", ");
217
- 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}`);
218
- }
219
- async readEntryPointBpmnFiles(contentFolder) {
220
- const entryPointsPath = Path.join(contentFolder, CaseConstants.EntryPointsFileName);
221
- if (!await this.fileSystem.exists(entryPointsPath)) {
222
- return [];
223
- }
224
- const raw = await this.fileSystem.readFile(entryPointsPath);
225
- if (!raw || raw.length === 0) {
226
- return null;
227
- }
228
- return entryPointBpmnNames(new TextDecoder().decode(raw));
229
- }
230
- async firstEntryPointFileName(contentFolder) {
231
- const raw = await this.fileSystem.readFile(Path.join(contentFolder, CaseConstants.EntryPointsFileName));
232
- const parsed = JSON.parse(raw ? new TextDecoder().decode(raw) : "{}");
233
- const filePath = parsed.entryPoints?.[0]?.filePath ?? "";
234
- return resolveDeclaredFileName(filePath);
235
- }
236
- async createOperateFile(options, contentFolder) {
237
- await ensureContentOperateFile(this.fileSystem, {
238
- contentFolder,
239
- projectPath: options.projectPath,
240
- projectStorageId: options.projectStorageId,
241
- contentType: "CaseManagement" /* CaseManagement */
242
- });
243
- }
244
- async createPackageDescriptor(localBuildFolder, contentFolder) {
245
- const contentFiles = await this.fileSystem.readdir(contentFolder);
246
- const packageDescriptorPath = Path.join(localBuildFolder, NugetConstants.ContentFolderName, NugetConstants.PackageDescriptorFileName);
247
- const packageDescriptorJson = JSON.stringify(buildCasePackageDescriptor(contentFiles), null, 2);
248
- await this.fileSystem.writeFile(packageDescriptorPath, packageDescriptorJson);
249
- }
250
- }
251
-
252
- // ../packager/packager-tool-case/src/case-tool-factory.ts
253
- class CaseToolFactory {
254
- supportedTypes = [
255
- "CaseManagement" /* CaseManagement */
256
- ];
257
- async createAsync(logger, fileSystem) {
258
- return new CaseTool(fileSystem, logger);
259
- }
260
- }
261
-
262
- // ../packager/packager-tool-case/src/index.ts
263
- toolsFactoryRepository.registerProjectToolFactory(new CaseToolFactory);
264
- export { registerCaseBpmnCompiler, CasePlanFileNames, casePlanSidecarName, findCasePlanFileName, resolveDeclaredFileName, normalizeEntryPointPath, entryPointBpmnNames, misnamedEntryPointBpmn, buildCasePackageDescriptor, CaseToolFactory };
265
-
266
- //# debugId=008D294270E95A4364756E2164756E21