@uipath/case-tool 1.205.0-preview.276 → 1.206.0-preview.279
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD-PARTY-NOTICES.md +68 -7
- package/dist/applicationinsights-web-8m26566f.js +17209 -0
- package/dist/{authoring-kqh34zzm.js → authoring-vg90pqrn.js} +488 -213
- package/dist/bindings-v2-1da35xsc.js +27 -0
- package/dist/{browser-strategy-6atc7v8s.js → browser-strategy-627rrg7z.js} +6 -7
- package/dist/{business-rule-export-ey588rv7.js → business-rule-export-jv60r9jf.js} +3 -7
- package/dist/carry-forward-sfdnta6q.js +52 -0
- package/dist/{case-api-sme7esce.js → case-api-by95rf40.js} +38 -37
- package/dist/{case-bindings-service-cht20gqt.js → case-bindings-service-pp3c9g1e.js} +93 -45
- package/dist/{case-debug-solution-projects-g871p7tg.js → case-debug-solution-projects-zhnn53e5.js} +3 -7
- package/dist/{case-debug-studio-web-service-0b1kwswy.js → case-debug-studio-web-service-fvj41xrq.js} +48 -45
- package/dist/{case-described-io-service-dx1f4nxe.js → case-described-io-service-tsm8r189.js} +33 -15
- package/dist/case-event-trigger-bindings-qbs8ywf5.js +17 -0
- package/dist/{case-format-service-6aew6tqc.js → case-format-service-3sab2297.js} +9 -10
- package/dist/{case-pack-service-pqq8wnfd.js → case-pack-service-txnv711n.js} +47 -42
- package/dist/case-schema-version-cw0h2nrv.js +18 -0
- package/dist/case-shape-reader-xaxmrd40.js +14 -0
- package/dist/{case-splice-service-s5gccctq.js → case-splice-service-6y35w83e.js} +139 -51
- package/dist/{case-validate-service-311sf3ee.js → case-validate-service-4zdx7d2w.js} +234 -170
- package/dist/connector-enrichment-service-mws6z0hw.js +56 -0
- package/dist/connector-library-1yw5r47w.js +99 -0
- package/dist/connector-lookup-service-0t7ydz3t.js +20 -0
- package/dist/connector-task-shape-bgywpbqc.js +13 -0
- package/dist/{de-WLW6KWOJ-2qnsqdtw.js → de-2BEKRUMY-x4dx0nn9.js} +190 -10
- package/dist/{de-UZI7FJDO-mwvc4cxe.js → de-AI7ML6JM-km47f8k4.js} +20 -5
- package/dist/debug-service-h4jxbn1r.js +56 -0
- package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/en-LAVDF7IQ-yzy20n6d.js +254 -0
- package/dist/en-X6T4SP2Y-xm47mf18.js +2752 -0
- package/dist/{enrichment-service-hv7ff88p.js → enrichment-service-wpprec7k.js} +36 -37
- package/dist/{es-5THCNRFN-tqwyrdgy.js → es-7ZTQTGKN-11sj0yjx.js} +190 -10
- package/dist/{es-MX-5RELIXKI-9jhqtddc.js → es-MX-7KJZPEQN-1fq0a9jr.js} +20 -5
- package/dist/{es-MX-TWZBRAXK-gqd9swzw.js → es-MX-IHGRIEWH-g63p0gb4.js} +191 -11
- package/dist/{es-4UBUTCQA-m1ytpyx2.js → es-SPNKTD5Y-vw5cbgv5.js} +20 -5
- package/dist/filter-engine-dh9s90gb.js +10 -0
- package/dist/first-party-service-ahcc6xc6.js +8 -0
- package/dist/{fr-CERONSRC-edpxhbmb.js → fr-7ZDL4MVO-pd27vwh6.js} +191 -11
- package/dist/{fr-VBM5WRC2-63z7w4mh.js → fr-AXJGUT53-hdg3pmd4.js} +20 -5
- package/dist/index-21kns9qg.js +10 -0
- package/dist/{index-fyc0k5dd.js → index-5pzp2qeb.js} +5350 -3271
- package/dist/{index-5dxh9z60.js → index-a7y7etmy.js} +6 -5
- package/dist/{index-ekwtgx7y.js → index-ec115v05.js} +309 -287
- package/dist/{connector-task-spec-gjsfdysf.js → index-n4g6qvab.js} +320 -144
- package/dist/index-nj3axvya.js +159 -0
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-pg9wmyrf.js +36 -0
- package/dist/index-sgpbvm8j.js +26 -0
- package/dist/index-t0sz0svn.js +35 -0
- package/dist/index-z2qk2qn6.js +24 -0
- package/dist/index.js +19 -25
- package/dist/index.umd.min-ttg1qc0x.js +7814 -0
- package/dist/{init-entry-points-hhpv3e3f.js → init-entry-points-pc128f7z.js} +22 -35
- package/dist/input-reader-9ym8mkbc.js +10 -0
- package/dist/{ja-43QL7CGO-c3q8gre9.js → ja-C7GZV6YP-hvtbngr5.js} +20 -5
- package/dist/{ja-U2MCNHGT-gz0ap1jk.js → ja-LGAM5HKR-sgrtjqjh.js} +190 -10
- package/dist/{jmespath-e4a59c8w.js → jmespath-wwym30dp.js} +1 -1
- package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/known-types-gak9by1w.js +11 -0
- package/dist/{ko-XAUYQWDR-zp81gjp4.js → ko-7B4SUZB7-c8wr20sc.js} +190 -10
- package/dist/{ko-TLL6Z6CD-wrt3n8a9.js → ko-Q24HSSL4-5vn55pte.js} +20 -5
- package/dist/localSolutionDiscovery-48d1bnkj.js +15 -0
- package/dist/{migration-diagnosis-ns5cw4e3.js → migration-diagnosis-myqqgwj0.js} +1 -4
- package/dist/{node-strategy-v442hwgd.js → node-strategy-2mqzg36t.js} +15 -18
- package/dist/node-sync-service-tr5m22nb.js +56 -0
- package/dist/{out-target-wjgmna0r.js → out-target-eqsttq1k.js} +18 -22
- package/dist/{packager-tool-f8vwy92w.js → packager-tool-0te1tyhf.js} +186 -16
- package/dist/{packager-tool-ydyvtknp.js → packager-tool-0w4fsdzv.js} +44 -20
- package/dist/{packager-tool-8ftat1vn.js → packager-tool-17b466mr.js} +59158 -59666
- package/dist/packager-tool-1nfdj0zm.js +425 -0
- package/dist/packager-tool-1wgav5ma.js +139 -0
- package/dist/{packager-tool-0wwc2phf.js → packager-tool-32792w66.js} +66 -82
- package/dist/{packager-tool-nj4seavy.js → packager-tool-35c9npcy.js} +26 -7
- package/dist/{packager-tool-r0x3qh59.js → packager-tool-388vyja1.js} +185 -29
- package/dist/packager-tool-3m8482sw.js +78 -0
- package/dist/packager-tool-3r23qsca.js +4832 -0
- package/dist/packager-tool-4avchhz8.js +539 -0
- package/dist/{packager-tool-2ns09tvh.js → packager-tool-4wn3b7qp.js} +252 -468
- package/dist/{packager-tool-8wkterdq.js → packager-tool-5jt5rc2g.js} +630 -689
- package/dist/{packager-tool-9kvkzc05.js → packager-tool-5w0gjcck.js} +4 -4
- package/dist/packager-tool-68648y3j.js +6 -0
- package/dist/{packager-tool-1yh8g550.js → packager-tool-6an893wm.js} +12 -3
- package/dist/{packager-tool-aagnvyba.js → packager-tool-76zhn5pa.js} +131 -432
- package/dist/packager-tool-7x1tmb8a.js +46 -0
- package/dist/{packager-tool-kyrm4e5m.js → packager-tool-9ar5829n.js} +781 -741
- package/dist/{packager-tool-4p11fvf4.js → packager-tool-b2q8m9pq.js} +10 -13
- package/dist/packager-tool-bg3tdpva.js +27 -0
- package/dist/packager-tool-bpkkg4z2.js +295 -0
- package/dist/{packager-tool-yn33pw57.js → packager-tool-dn9d4ywm.js} +246 -225
- package/dist/{packager-tool-kdhey8gz.js → packager-tool-e02jkmrq.js} +41 -29
- package/dist/{packager-tool-sq931c23.js → packager-tool-e1tx5mqg.js} +1 -1
- package/dist/packager-tool-gt3bsmfp.js +1302 -0
- package/dist/packager-tool-gy4yjqhf.js +178 -0
- package/dist/packager-tool-h2ar8xf8.js +222 -0
- package/dist/{packager-tool-v2kcgjbf.js → packager-tool-j6nfje7t.js} +5 -4
- package/dist/packager-tool-kz7zz79p.js +71 -0
- package/dist/{packager-tool-9e59z4d6.js → packager-tool-me8gd22q.js} +82 -83
- package/dist/packager-tool-mk9fmzdy.js +20 -0
- package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
- package/dist/{packager-tool-1a5v21za.js → packager-tool-nd312sma.js} +32 -15
- package/dist/{packager-tool-mqy97y5f.js → packager-tool-p5gs9xqy.js} +14 -14
- package/dist/{packager-tool-83v804p7.js → packager-tool-psmb758n.js} +3108 -2627
- package/dist/packager-tool-q26hncjr.js +13 -0
- package/dist/packager-tool-q9fnx278.js +77 -0
- package/dist/{packager-tool-ezds6t5e.js → packager-tool-s12s1dp6.js} +11 -11
- package/dist/packager-tool-scy94jyb.js +5424 -0
- package/dist/{packager-tool-yn7r7zq2.js → packager-tool-snesn0bt.js} +177 -96
- package/dist/{packager-tool-d8e2mrkq.js → packager-tool-tgehy324.js} +56 -56
- package/dist/{packager-tool-tqn0j6f9.js → packager-tool-v11fx4dk.js} +7 -7
- package/dist/{packager-tool-67vy1fz3.js → packager-tool-v6rkp2ay.js} +24 -92
- package/dist/{packager-tool-9sd483vs.js → packager-tool-vs7gqa4r.js} +15 -15
- package/dist/packager-tool-vyavrbym.js +488 -0
- package/dist/{packager-tool-b098y4a2.js → packager-tool-wbksf242.js} +97 -97
- package/dist/{packager-tool-b5rxh1hk.js → packager-tool-x1f8ypvs.js} +256 -486
- package/dist/{packager-tool-2sn7d8fd.js → packager-tool-x74mmjkw.js} +9 -13
- package/dist/{packager-tool-7hw344bt.js → packager-tool-xb16e3tz.js} +5 -5
- package/dist/{packager-tool-a17g0pj1.js → packager-tool-xd1wbvay.js} +10 -8
- package/dist/{packager-tool-1yfw674x.js → packager-tool-xehhk3c3.js} +10 -5
- package/dist/packager-tool-yh8mmj3p.js +123 -0
- package/dist/{packager-tool-hdxtgckw.js → packager-tool-z070caqq.js} +56 -12
- package/dist/{packager-tool-b250k6w4.js → packager-tool-z1fw9a8v.js} +41 -9
- package/dist/{packager-tool-0gctz400.js → packager-tool-z9fmqtm6.js} +4 -4
- package/dist/{packager-tool-mzf4gmph.js → packager-tool-zbx189j3.js} +11 -8
- package/dist/{packager-tool-zf8f9pmm.js → packager-tool-zrbnms9b.js} +3 -4
- package/dist/packager-tool.js +10 -11
- package/dist/prepare-uip-ad7mfs8t.js +92 -0
- package/dist/{project-artifacts-bgyyb0dm.js → project-artifacts-q0c0zghw.js} +2 -6
- package/dist/{pt-BR-USP2T7GD-pedn77m1.js → pt-BR-BIUJXIPU-2sqzhr8y.js} +20 -5
- package/dist/{pt-BR-GNQNAAZ2-xadharv4.js → pt-BR-PHLFHMXZ-n6de4s7z.js} +191 -11
- package/dist/{pt-RMIAKZB4-67enhx3m.js → pt-MHX6JGAX-xfgvdqwg.js} +20 -5
- package/dist/{pt-TO2DARY2-ftcce1bv.js → pt-N7ZTJT4W-d6c67xcn.js} +190 -10
- package/dist/{resolved-check-aqw7568y.js → resolved-check-dz8eqrf6.js} +2 -3
- package/dist/{resourcesSyncService-0hm54p73.js → resourcesSyncService-sgnkcvpt.js} +81 -141
- package/dist/{ro-GHOBYW2S-mhnqsgaa.js → ro-3RKJNGJZ-xqj14e3d.js} +20 -5
- package/dist/{ro-WUYJV6OW-a8d9qy1n.js → ro-FLNXVYJI-ytrwabg2.js} +190 -10
- package/dist/ru-GSCT4ARZ-c2cfq4h1.js +7 -0
- package/dist/ru-WBLQ5B2U-bf20yr5y.js +7 -0
- package/dist/{rule-group-members-zje7n3kf.js → rule-group-members-p0nv1rmj.js} +1 -3
- package/dist/rule-type-declaration-s2nxpcfy.js +77 -0
- package/dist/{sdd-convert-service-8jpew7vz.js → sdd-convert-service-ffbx00k6.js} +481 -504
- package/dist/{sdd-lookup-fe900sdb.js → sdd-lookup-sah7wj5j.js} +8 -9
- package/dist/{sdd-resolve-service-qdtmxw9b.js → sdd-resolve-service-6nt10vhq.js} +28 -20
- package/dist/{sdd-resolve-siblings-bxxdy3x7.js → sdd-resolve-siblings-5q28qcw8.js} +11 -14
- package/dist/solution-auth-a1p22hq1.js +11 -0
- package/dist/solution-discovery-r1y550sz.js +33 -0
- package/dist/{strict-case-rules-4tjcaznr.js → strict-case-rules-045kbjvv.js} +16 -28
- package/dist/{strict-entry-points-g2pd4mf4.js → strict-entry-points-40ha9afz.js} +15 -14
- package/dist/strict-sdd-audit-bp7fq2tg.js +26 -0
- package/dist/{task-selector-8bjn35dv.js → task-selector-jt60hdbt.js} +1 -3
- package/dist/{task-type-declaration-7a8fqdvs.js → task-type-declaration-yhczvj05.js} +9 -9
- package/dist/tool.js +18 -24
- package/dist/{tr-M3F5A6AU-bb0tg39m.js → tr-7AIZZWZ6-pdzp9n0p.js} +190 -10
- package/dist/{tr-GDTLECMM-k5fhmq13.js → tr-PQLUUHPC-qsb7btxn.js} +20 -5
- package/dist/{trigger-enrichment-service-4c6g6may.js → trigger-enrichment-service-r4gmxvka.js} +53 -57
- package/dist/trigger-entry-point-id-751v48qd.js +14 -0
- package/dist/{zh-CN-C5G4PC7C-ds9gkptg.js → zh-CN-CN2ARPFS-e0p2qrxf.js} +190 -10
- package/dist/{zh-CN-I5D7WHBD-sr5h0a98.js → zh-CN-OHNTHZRI-b0hjkfqn.js} +20 -5
- package/dist/{zh-TW-62HZIG6O-787kdwex.js → zh-TW-7RUFEVFK-qd7myw31.js} +190 -10
- package/dist/{zh-TW-2AVLM723-288pkc1z.js → zh-TW-E4D3Y6ZR-tn3bmzz5.js} +20 -5
- package/package.json +2 -2
- package/dist/canvas-notes-86fxx1t8.js +0 -19
- package/dist/case-event-trigger-bindings-g9ftnm4x.js +0 -16
- package/dist/case-schema-version-h820ne16.js +0 -20
- package/dist/case-shape-reader-dsbraetf.js +0 -13
- package/dist/connector-enrichment-service-08tea3m1.js +0 -65
- package/dist/connector-lookup-service-x50n59dg.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-8ybf5kqc.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-qvxg2haf.js +0 -282
- 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-6jsqx7eg.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-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-vhx08y8p.js +0 -5365
- package/dist/packager-tool-wekqkmgn.js +0 -265
- package/dist/packager-tool-xz2px32y.js +0 -13189
- package/dist/packager-tool-yc4kw997.js +0 -13
- package/dist/ru-GSCT4ARZ-1sa9wbr8.js +0 -10
- package/dist/ru-WBLQ5B2U-s4em88p0.js +0 -10
- package/dist/solution-auth-30yycqtv.js +0 -14
- package/dist/solution-discovery-e9mamp6w.js +0 -38
- package/dist/strict-sdd-audit-q7tb9yj7.js +0 -25
- package/dist/trigger-entry-point-id-yhqwnkx9.js +0 -15
- /package/dist/{packager-tool-5qp9xza1.js → packager-tool-1c30ttpm.js} +0 -0
- /package/dist/{packager-tool-mknccck5.js → packager-tool-1h7abxw6.js} +0 -0
- /package/dist/{packager-tool-9y1w2wds.js → packager-tool-fcektt1g.js} +0 -0
- /package/dist/{packager-tool-k6jbedyc.js → packager-tool-hcdnc420.js} +0 -0
- /package/dist/{packager-tool-7nxppa3d.js → packager-tool-jv5byaww.js} +0 -0
- /package/dist/{packager-tool-qa9gftnj.js → packager-tool-mxgybnmt.js} +0 -0
- /package/dist/{packager-tool-87y6xw3a.js → packager-tool-nfhtwa72.js} +0 -0
- /package/dist/{packager-tool-cv05dwac.js → packager-tool-p0rdmmvk.js} +0 -0
- /package/dist/{packager-tool-21qfsbxn.js → packager-tool-yaertxsw.js} +0 -0
|
@@ -1,73 +1,81 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./packager-tool-
|
|
2
|
+
getFileSystem2
|
|
3
|
+
} from "./packager-tool-z070caqq.js";
|
|
4
|
+
import {
|
|
5
|
+
catchError2,
|
|
6
|
+
extractErrorDetails,
|
|
7
|
+
instructionsFor,
|
|
8
|
+
RESULTS,
|
|
9
|
+
authContextFailure,
|
|
10
|
+
Option,
|
|
11
|
+
logger,
|
|
12
|
+
OutputFormatter,
|
|
13
|
+
processContext,
|
|
14
|
+
createHiddenDeprecatedTenantOption,
|
|
15
|
+
parseLimit,
|
|
16
|
+
parseOffset,
|
|
17
|
+
registerPackageMetadataOptions,
|
|
18
|
+
mapPackageMetadataOptions,
|
|
19
|
+
ScreenLogger
|
|
20
|
+
} from "./packager-tool-psmb758n.js";
|
|
21
|
+
import {
|
|
22
|
+
resolveCaseSchemaWriteVersion2
|
|
23
|
+
} from "./packager-tool-p5gs9xqy.js";
|
|
24
|
+
import {
|
|
25
|
+
registerSharedIncidentCommands,
|
|
26
|
+
registerSharedInstanceCommands,
|
|
27
|
+
registerSharedProcessCommands,
|
|
28
|
+
registerSharedProcessesCommands
|
|
29
|
+
} from "./packager-tool-76zhn5pa.js";
|
|
30
|
+
import {
|
|
31
|
+
RESOURCE_TYPES,
|
|
32
|
+
TYPECACHE_INDEX_TYPES,
|
|
33
|
+
GET_SEARCHABLE_TYPES
|
|
34
|
+
} from "./packager-tool-jv5byaww.js";
|
|
35
|
+
import {
|
|
36
|
+
stripJsonStringGuard
|
|
37
|
+
} from "./packager-tool-h2ar8xf8.js";
|
|
4
38
|
import {
|
|
5
39
|
buildMinimalCaseDocument
|
|
6
|
-
} from "./packager-tool-
|
|
40
|
+
} from "./packager-tool-j6nfje7t.js";
|
|
7
41
|
import {
|
|
8
42
|
createTaskBindings
|
|
9
|
-
} from "./packager-tool-
|
|
43
|
+
} from "./packager-tool-e1tx5mqg.js";
|
|
10
44
|
import {
|
|
11
45
|
prefixedId
|
|
12
|
-
} from "./packager-tool-
|
|
13
|
-
import {
|
|
14
|
-
GET_SEARCHABLE_TYPES,
|
|
15
|
-
RESOURCE_TYPES,
|
|
16
|
-
TYPECACHE_INDEX_TYPES
|
|
17
|
-
} from "./packager-tool-7nxppa3d.js";
|
|
46
|
+
} from "./packager-tool-1h7abxw6.js";
|
|
18
47
|
import {
|
|
19
|
-
|
|
20
|
-
VALID_CASE_COMPLETION_RULE_TYPES,
|
|
21
|
-
VALID_CASE_EXIT_RULE_TYPES,
|
|
22
|
-
VALID_STAGE_COMPLETION_RULE_TYPES,
|
|
48
|
+
VALID_TASK_ENTRY_RULE_TYPES,
|
|
23
49
|
VALID_STAGE_ENTRY_RULE_TYPES,
|
|
50
|
+
VALID_STAGE_COMPLETION_RULE_TYPES,
|
|
24
51
|
VALID_STAGE_EXIT_RULE_TYPES,
|
|
25
|
-
|
|
52
|
+
VALID_CASE_COMPLETION_RULE_TYPES,
|
|
53
|
+
VALID_CASE_EXIT_RULE_TYPES,
|
|
26
54
|
buildRule,
|
|
27
|
-
ensureRootBindings,
|
|
28
|
-
findOrPushBinding,
|
|
29
|
-
findTriggerNodes,
|
|
30
|
-
isAnyTriggerNode,
|
|
31
55
|
isStageNode,
|
|
32
|
-
remapBindingRefs,
|
|
33
56
|
requireStageNode,
|
|
34
|
-
requireTask
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} from "./packager-tool-
|
|
57
|
+
requireTask,
|
|
58
|
+
DEFAULT_TRIGGER_ID,
|
|
59
|
+
isAnyTriggerNode,
|
|
60
|
+
findTriggerNodes,
|
|
61
|
+
ensureRootBindings,
|
|
62
|
+
findOrPushBinding,
|
|
63
|
+
remapBindingRefs
|
|
64
|
+
} from "./packager-tool-35c9npcy.js";
|
|
42
65
|
import {
|
|
43
66
|
VALID_PROJECT_NAME_REGEX,
|
|
44
|
-
formatTraceLine
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
catchError,
|
|
51
|
-
createHiddenDeprecatedTenantOption,
|
|
52
|
-
extractErrorDetails,
|
|
53
|
-
instructionsFor,
|
|
54
|
-
logger,
|
|
55
|
-
mapPackageMetadataOptions,
|
|
56
|
-
processContext,
|
|
57
|
-
registerPackageMetadataOptions
|
|
58
|
-
} from "./packager-tool-83v804p7.js";
|
|
59
|
-
import {
|
|
60
|
-
getFileSystem
|
|
61
|
-
} from "./packager-tool-hdxtgckw.js";
|
|
62
|
-
import {
|
|
63
|
-
__require
|
|
64
|
-
} from "./packager-tool-1yh8g550.js";
|
|
67
|
+
formatTraceLine,
|
|
68
|
+
tracesFailure,
|
|
69
|
+
backendFailure,
|
|
70
|
+
jobLookupFailure,
|
|
71
|
+
addJobTracesOptions
|
|
72
|
+
} from "./packager-tool-q9fnx278.js";
|
|
65
73
|
// package.json
|
|
66
74
|
var package_default = {
|
|
67
75
|
name: "@uipath/case-tool",
|
|
68
76
|
author: "UiPath",
|
|
69
77
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
70
|
-
version: "1.
|
|
78
|
+
version: "1.206.0-preview.279",
|
|
71
79
|
description: "Manage Case Management instances, processes, and incidents.",
|
|
72
80
|
private: false,
|
|
73
81
|
repository: {
|
|
@@ -97,12 +105,14 @@ var package_default = {
|
|
|
97
105
|
build: "bun ../../tools/build-tool.ts",
|
|
98
106
|
package: "bun run build && bun pm pack",
|
|
99
107
|
lint: "biome check .",
|
|
108
|
+
typecheck: "tsc --noEmit",
|
|
100
109
|
"lint:fix": "biome check --write .",
|
|
101
110
|
test: "vitest run && vitest run -c vitest.isolated.config.ts",
|
|
102
111
|
"test:isolated": "vitest run -c vitest.isolated.config.ts",
|
|
103
112
|
"test:coverage": "vitest run --coverage && vitest run --coverage -c vitest.isolated.config.ts && cat coverage-isolated/lcov.info >> coverage/lcov.info && rm -rf coverage-isolated"
|
|
104
113
|
},
|
|
105
114
|
devDependencies: {
|
|
115
|
+
"@types/node": "^25.5.2",
|
|
106
116
|
"@uipath/auth": "workspace:*",
|
|
107
117
|
"@uipath/builder-sdk": "workspace:*",
|
|
108
118
|
"@uipath/case-schema": "0.1199.0",
|
|
@@ -112,10 +122,10 @@ var package_default = {
|
|
|
112
122
|
"@uipath/integrationservice-sdk": "workspace:*",
|
|
113
123
|
"@uipath/maestro-sdk": "workspace:*",
|
|
114
124
|
"@uipath/orchestrator-sdk": "workspace:*",
|
|
125
|
+
"@uipath/packager-tool-case": "workspace:*",
|
|
115
126
|
"@uipath/solution-sdk": "workspace:*",
|
|
116
127
|
"@uipath/solutionpackager-tool-core": "workspace:*",
|
|
117
|
-
|
|
118
|
-
"@types/node": "^25.5.2",
|
|
128
|
+
acorn: "^8.17.0",
|
|
119
129
|
commander: "^14.0.3",
|
|
120
130
|
fflate: "^0.8.2",
|
|
121
131
|
typescript: "^7.0.2"
|
|
@@ -155,8 +165,8 @@ invisible to 'uip solution resources refresh'.
|
|
|
155
165
|
Subcommands:
|
|
156
166
|
sync Write 'bindings_v2.json' next to a case plan.`);
|
|
157
167
|
bindings.command("sync").description("Derive bindings_v2.json from a case plan and write it into the same directory.").argument("<file>", "Path to the case plan JSON file. The output 'bindings_v2.json' is written next to it, overwriting any existing file.").examples(CASE_BINDINGS_SYNC_EXAMPLES).trackedAction(processContext, async (file) => {
|
|
158
|
-
const { syncCaseBindings } = await import("./case-bindings-service-
|
|
159
|
-
const [error, result] = await
|
|
168
|
+
const { syncCaseBindings } = await import("./case-bindings-service-pp3c9g1e.js");
|
|
169
|
+
const [error, result] = await catchError2(syncCaseBindings(file));
|
|
160
170
|
if (error) {
|
|
161
171
|
OutputFormatter.error({
|
|
162
172
|
Result: RESULTS.Failure,
|
|
@@ -192,7 +202,7 @@ Subcommands:
|
|
|
192
202
|
|
|
193
203
|
// src/utils/schemaFile.ts
|
|
194
204
|
async function readSchema(filePath) {
|
|
195
|
-
const fs =
|
|
205
|
+
const fs = getFileSystem2();
|
|
196
206
|
const content = await fs.readFile(filePath, "utf-8");
|
|
197
207
|
if (content === null) {
|
|
198
208
|
throw new Error(`File not found: ${filePath}`);
|
|
@@ -200,7 +210,7 @@ async function readSchema(filePath) {
|
|
|
200
210
|
return JSON.parse(content);
|
|
201
211
|
}
|
|
202
212
|
async function writeSchema(filePath, schema) {
|
|
203
|
-
const fs =
|
|
213
|
+
const fs = getFileSystem2();
|
|
204
214
|
await fs.writeFile(filePath, JSON.stringify(schema, null, 4));
|
|
205
215
|
}
|
|
206
216
|
|
|
@@ -208,7 +218,7 @@ async function writeSchema(filePath, schema) {
|
|
|
208
218
|
var CASE_EXIT_CONDITIONS_ADD_EXAMPLES = [
|
|
209
219
|
{
|
|
210
220
|
Description: "Add a case completion condition with an initial rule",
|
|
211
|
-
Command: 'uip maestro case case-exit-conditions add case.json --display-name "Completed" --marks-case-complete true --rule-type
|
|
221
|
+
Command: 'uip maestro case case-exit-conditions add case.json --display-name "Completed" --marks-case-complete true --rule-type required-stages-completed',
|
|
212
222
|
Output: {
|
|
213
223
|
Code: "CaseExitConditionAdded",
|
|
214
224
|
Data: {
|
|
@@ -220,7 +230,7 @@ var CASE_EXIT_CONDITIONS_ADD_EXAMPLES = [
|
|
|
220
230
|
[
|
|
221
231
|
{
|
|
222
232
|
id: "Rule_e5f6a7b8",
|
|
223
|
-
|
|
233
|
+
rule: "required-stages-completed"
|
|
224
234
|
}
|
|
225
235
|
]
|
|
226
236
|
]
|
|
@@ -243,7 +253,7 @@ var CASE_EXIT_CONDITIONS_EDIT_EXAMPLES = [
|
|
|
243
253
|
[
|
|
244
254
|
{
|
|
245
255
|
id: "Rule_e5f6a7b8",
|
|
246
|
-
|
|
256
|
+
rule: "required-stages-completed"
|
|
247
257
|
}
|
|
248
258
|
]
|
|
249
259
|
]
|
|
@@ -266,7 +276,7 @@ var CASE_EXIT_CONDITIONS_GET_EXAMPLES = [
|
|
|
266
276
|
[
|
|
267
277
|
{
|
|
268
278
|
id: "Rule_e5f6a7b8",
|
|
269
|
-
|
|
279
|
+
rule: "required-stages-completed"
|
|
270
280
|
}
|
|
271
281
|
]
|
|
272
282
|
]
|
|
@@ -316,7 +326,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
316
326
|
processContext.exit(1);
|
|
317
327
|
return;
|
|
318
328
|
}
|
|
319
|
-
const [readError, schema] = await
|
|
329
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
320
330
|
if (readError) {
|
|
321
331
|
OutputFormatter.error({
|
|
322
332
|
Result: RESULTS.Failure,
|
|
@@ -347,7 +357,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
347
357
|
schema.metadata ??= {};
|
|
348
358
|
schema.metadata.caseExitRules ??= [];
|
|
349
359
|
schema.metadata.caseExitRules.push(condition);
|
|
350
|
-
const [writeError] = await
|
|
360
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
351
361
|
if (writeError) {
|
|
352
362
|
OutputFormatter.error({
|
|
353
363
|
Result: RESULTS.Failure,
|
|
@@ -397,7 +407,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
397
407
|
processContext.exit(1);
|
|
398
408
|
return;
|
|
399
409
|
}
|
|
400
|
-
const [readError, schema] = await
|
|
410
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
401
411
|
if (readError) {
|
|
402
412
|
OutputFormatter.error({
|
|
403
413
|
Result: RESULTS.Failure,
|
|
@@ -407,7 +417,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
407
417
|
processContext.exit(1);
|
|
408
418
|
return;
|
|
409
419
|
}
|
|
410
|
-
const [findError, condition] =
|
|
420
|
+
const [findError, condition] = catchError2(() => requireCaseExitCondition(schema.metadata, conditionId));
|
|
411
421
|
if (findError) {
|
|
412
422
|
OutputFormatter.error({
|
|
413
423
|
Result: RESULTS.Failure,
|
|
@@ -444,7 +454,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
444
454
|
}
|
|
445
455
|
condition.rules.push([rule]);
|
|
446
456
|
}
|
|
447
|
-
const [writeError] = await
|
|
457
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
448
458
|
if (writeError) {
|
|
449
459
|
OutputFormatter.error({
|
|
450
460
|
Result: RESULTS.Failure,
|
|
@@ -467,7 +477,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
467
477
|
});
|
|
468
478
|
});
|
|
469
479
|
caseExitConditions.command("get").description("Print an exit condition from a case").argument("<file>", "Path to the case management JSON file").argument("<condition-id>", "ID of the case exit condition to retrieve").examples(CASE_EXIT_CONDITIONS_GET_EXAMPLES).trackedAction(processContext, async (file, conditionId) => {
|
|
470
|
-
const [readError, schema] = await
|
|
480
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
471
481
|
if (readError) {
|
|
472
482
|
OutputFormatter.error({
|
|
473
483
|
Result: RESULTS.Failure,
|
|
@@ -477,7 +487,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
477
487
|
processContext.exit(1);
|
|
478
488
|
return;
|
|
479
489
|
}
|
|
480
|
-
const [findError, condition] =
|
|
490
|
+
const [findError, condition] = catchError2(() => requireCaseExitCondition(schema.metadata, conditionId));
|
|
481
491
|
if (findError) {
|
|
482
492
|
OutputFormatter.error({
|
|
483
493
|
Result: RESULTS.Failure,
|
|
@@ -494,7 +504,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
494
504
|
});
|
|
495
505
|
});
|
|
496
506
|
caseExitConditions.command("remove", { hidden: true }).description("Remove an exit condition from a case").argument("<file>", "Path to the case management JSON file").argument("<condition-id>", "ID of the case exit condition to remove").examples(CASE_EXIT_CONDITIONS_REMOVE_EXAMPLES).trackedAction(processContext, async (file, conditionId) => {
|
|
497
|
-
const [readError, schema] = await
|
|
507
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
498
508
|
if (readError) {
|
|
499
509
|
OutputFormatter.error({
|
|
500
510
|
Result: RESULTS.Failure,
|
|
@@ -504,7 +514,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
504
514
|
processContext.exit(1);
|
|
505
515
|
return;
|
|
506
516
|
}
|
|
507
|
-
const [findError] =
|
|
517
|
+
const [findError] = catchError2(() => requireCaseExitCondition(schema.metadata, conditionId));
|
|
508
518
|
if (findError) {
|
|
509
519
|
OutputFormatter.error({
|
|
510
520
|
Result: RESULTS.Failure,
|
|
@@ -516,7 +526,7 @@ var registerCaseExitConditionsCommand = (program) => {
|
|
|
516
526
|
}
|
|
517
527
|
schema.metadata ??= {};
|
|
518
528
|
schema.metadata.caseExitRules = (schema.metadata.caseExitRules ?? []).filter((c) => c.id !== conditionId);
|
|
519
|
-
const [writeError] = await
|
|
529
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
520
530
|
if (writeError) {
|
|
521
531
|
OutputFormatter.error({
|
|
522
532
|
Result: RESULTS.Failure,
|
|
@@ -615,7 +625,7 @@ function getWriteFailureInstructions(file, error) {
|
|
|
615
625
|
var registerCasesCommand = (program) => {
|
|
616
626
|
const cases = program.command("cases").description("Manage local case management definition JSON files");
|
|
617
627
|
cases.command("add", { hidden: true }).description("Create a new case management definition JSON file").requiredOption("-n, --name <name>", "Name of the case management definition").requiredOption("-f, --file <path>", "Output path for the new case JSON file").option("--case-identifier <caseIdentifier>", "Case identifier (defaults to name)").option("--identifier-type <type>", "Case identifier type: constant or external (default: constant)").option("--case-app-enabled", "Enable the case app for this definition").option("-d, --description <description>", "Description of the case management definition").examples(CASES_ADD_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
618
|
-
const fs =
|
|
628
|
+
const fs = getFileSystem2();
|
|
619
629
|
if (await fs.exists(options.file)) {
|
|
620
630
|
OutputFormatter.error({
|
|
621
631
|
Result: RESULTS.Failure,
|
|
@@ -627,10 +637,10 @@ var registerCasesCommand = (program) => {
|
|
|
627
637
|
}
|
|
628
638
|
const schema = buildMinimalCaseDocument({
|
|
629
639
|
...options,
|
|
630
|
-
schemaVersion: await
|
|
640
|
+
schemaVersion: await resolveCaseSchemaWriteVersion2()
|
|
631
641
|
});
|
|
632
642
|
const triggerId = schema.nodes.find(isAnyTriggerNode)?.id;
|
|
633
|
-
const [writeError] = await
|
|
643
|
+
const [writeError] = await catchError2(writeSchema(options.file, schema));
|
|
634
644
|
if (writeError) {
|
|
635
645
|
OutputFormatter.error({
|
|
636
646
|
Result: RESULTS.Failure,
|
|
@@ -657,7 +667,7 @@ var registerCasesCommand = (program) => {
|
|
|
657
667
|
});
|
|
658
668
|
});
|
|
659
669
|
cases.command("get").description("Show root metadata from a case management JSON file").argument("<file>", "Path to the case management JSON file to read").examples(CASES_GET_EXAMPLES).trackedAction(processContext, async (file) => {
|
|
660
|
-
const [readError, schema] = await
|
|
670
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
661
671
|
if (readError) {
|
|
662
672
|
OutputFormatter.error({
|
|
663
673
|
Result: RESULTS.Failure,
|
|
@@ -683,7 +693,7 @@ var registerCasesCommand = (program) => {
|
|
|
683
693
|
processContext.exit(1);
|
|
684
694
|
return;
|
|
685
695
|
}
|
|
686
|
-
const [readError, schema] = await
|
|
696
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
687
697
|
if (readError) {
|
|
688
698
|
OutputFormatter.error({
|
|
689
699
|
Result: RESULTS.Failure,
|
|
@@ -709,7 +719,7 @@ var registerCasesCommand = (program) => {
|
|
|
709
719
|
if (options.description !== undefined) {
|
|
710
720
|
schema.description = options.description;
|
|
711
721
|
}
|
|
712
|
-
const [writeError] = await
|
|
722
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
713
723
|
if (writeError) {
|
|
714
724
|
OutputFormatter.error({
|
|
715
725
|
Result: RESULTS.Failure,
|
|
@@ -759,70 +769,16 @@ var CASE_DEBUG_EXAMPLES = [
|
|
|
759
769
|
];
|
|
760
770
|
function registerDebugCommand(program) {
|
|
761
771
|
program.command("debug").description("Debug a case project by uploading to Studio Web and running a debug session").argument("<project-path>", "Path to the case project directory (must contain project.uiproj)").option("--folder-id <id>", "Orchestrator folder ID (OrganizationUnitId). Auto-detected if not provided.").option("--poll-interval <ms>", "Polling interval in milliseconds", "2000").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(CASE_DEBUG_EXAMPLES).trackedAction(processContext, async (projectPath, options) => {
|
|
762
|
-
const {
|
|
763
|
-
const [
|
|
764
|
-
ensureTokenValidityMinutes: options.loginValidity
|
|
772
|
+
const { getAuthContext } = await import("./index-nj3axvya.js");
|
|
773
|
+
const [authError, auth] = await catchError2(getAuthContext({
|
|
774
|
+
ensureTokenValidityMinutes: options.loginValidity,
|
|
775
|
+
requireOrganizationId: true,
|
|
776
|
+
requireOrganizationName: true,
|
|
777
|
+
requireTenantId: true,
|
|
778
|
+
requireTenantName: true
|
|
765
779
|
}));
|
|
766
|
-
if (
|
|
767
|
-
OutputFormatter.error(
|
|
768
|
-
Result: RESULTS.Failure,
|
|
769
|
-
Message: loginError.message,
|
|
770
|
-
Instructions: "Check authentication and case file"
|
|
771
|
-
});
|
|
772
|
-
processContext.exit(1);
|
|
773
|
-
return;
|
|
774
|
-
}
|
|
775
|
-
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
|
|
776
|
-
OutputFormatter.error({
|
|
777
|
-
Result: RESULTS.Failure,
|
|
778
|
-
Message: "Not logged in. Run 'uip login' first.",
|
|
779
|
-
Instructions: "Check authentication and case file"
|
|
780
|
-
});
|
|
781
|
-
processContext.exit(1);
|
|
782
|
-
return;
|
|
783
|
-
}
|
|
784
|
-
if (!loginStatus.organizationId) {
|
|
785
|
-
OutputFormatter.error({
|
|
786
|
-
Result: RESULTS.Failure,
|
|
787
|
-
Message: "Organization ID not available from login.",
|
|
788
|
-
Instructions: "Check authentication and case file"
|
|
789
|
-
});
|
|
790
|
-
processContext.exit(1);
|
|
791
|
-
return;
|
|
792
|
-
}
|
|
793
|
-
if (!loginStatus.tenantId) {
|
|
794
|
-
OutputFormatter.error({
|
|
795
|
-
Result: RESULTS.Failure,
|
|
796
|
-
Message: "Tenant ID not available from login.",
|
|
797
|
-
Instructions: "Check authentication and case file"
|
|
798
|
-
});
|
|
799
|
-
processContext.exit(1);
|
|
800
|
-
return;
|
|
801
|
-
}
|
|
802
|
-
if (!loginStatus.tenantName) {
|
|
803
|
-
OutputFormatter.error({
|
|
804
|
-
Result: RESULTS.Failure,
|
|
805
|
-
Message: "Tenant name not available from login.",
|
|
806
|
-
Instructions: "Check authentication and case file"
|
|
807
|
-
});
|
|
808
|
-
processContext.exit(1);
|
|
809
|
-
return;
|
|
810
|
-
}
|
|
811
|
-
if (!loginStatus.accessToken) {
|
|
812
|
-
OutputFormatter.error({
|
|
813
|
-
Result: RESULTS.Failure,
|
|
814
|
-
Message: "Access token not available from login.",
|
|
815
|
-
Instructions: "Check authentication and case file"
|
|
816
|
-
});
|
|
817
|
-
processContext.exit(1);
|
|
818
|
-
return;
|
|
819
|
-
}
|
|
820
|
-
if (!loginStatus.organizationName) {
|
|
821
|
-
OutputFormatter.error({
|
|
822
|
-
Result: RESULTS.Failure,
|
|
823
|
-
Message: "Organization name not available from login. Required for Studio Web debug.",
|
|
824
|
-
Instructions: "Check authentication and case file"
|
|
825
|
-
});
|
|
780
|
+
if (authError) {
|
|
781
|
+
OutputFormatter.error(await authContextFailure(authError, "Check authentication and case file"));
|
|
826
782
|
processContext.exit(1);
|
|
827
783
|
return;
|
|
828
784
|
}
|
|
@@ -833,7 +789,7 @@ function registerDebugCommand(program) {
|
|
|
833
789
|
tenantName,
|
|
834
790
|
accessToken,
|
|
835
791
|
organizationName
|
|
836
|
-
} =
|
|
792
|
+
} = auth;
|
|
837
793
|
let organizationUnitId;
|
|
838
794
|
if (options.folderId) {
|
|
839
795
|
const parsed = parseInt(options.folderId, 10);
|
|
@@ -862,11 +818,11 @@ function registerDebugCommand(program) {
|
|
|
862
818
|
logger.info(` Tenant: ${tenantName} (${tenantId})`);
|
|
863
819
|
logger.info(` Base URL: ${baseUrl}`);
|
|
864
820
|
const pollInterval = parseInt(options.pollInterval || "2000", 10);
|
|
865
|
-
const { CaseDebugStudioWebService } = await import("./case-debug-studio-web-service-
|
|
866
|
-
const { DebugPollTimeoutError, buildPollTimeoutFailureOutput } = await import("./debug-service-
|
|
821
|
+
const { CaseDebugStudioWebService } = await import("./case-debug-studio-web-service-fvj41xrq.js");
|
|
822
|
+
const { DebugPollTimeoutError, buildPollTimeoutFailureOutput } = await import("./debug-service-h4jxbn1r.js");
|
|
867
823
|
const service = new CaseDebugStudioWebService;
|
|
868
824
|
logger.info(`Starting Studio Web debug session for: ${projectPath}`);
|
|
869
|
-
const [executeError, result] = await
|
|
825
|
+
const [executeError, result] = await catchError2(service.executeProjectViaStudioWeb(projectPath, studioWebConfig, {
|
|
870
826
|
onStatusChange: (st, executions) => {
|
|
871
827
|
const completed = executions.filter((e) => e.status === "Completed").length;
|
|
872
828
|
const total = executions.length;
|
|
@@ -889,7 +845,7 @@ function registerDebugCommand(program) {
|
|
|
889
845
|
const {
|
|
890
846
|
buildSolutionUploadFailureOutput,
|
|
891
847
|
isSolutionUploadHttpError
|
|
892
|
-
} = await import("./index-
|
|
848
|
+
} = await import("./index-sgpbvm8j.js");
|
|
893
849
|
if (isSolutionUploadHttpError(executeError)) {
|
|
894
850
|
OutputFormatter.error(buildSolutionUploadFailureOutput(executeError, {
|
|
895
851
|
subject: "case",
|
|
@@ -1009,7 +965,7 @@ function isTriggerSource(schema, sourceId) {
|
|
|
1009
965
|
var registerEdgesCommand = (program) => {
|
|
1010
966
|
const edges = program.command("edges").description("Manage edges within a case management definition JSON file");
|
|
1011
967
|
edges.command("add", { hidden: true }).description("Add a new edge between two stages. Type is inferred from the source node: Trigger→TriggerEdge, Stage→Edge.").argument("<file>", "Path to the case management JSON file").requiredOption("-s, --source <stageOrTriggerId>", "ID of the source stage or trigger").requiredOption("-t, --target <stageId>", "ID of the target stage").option("-l, --label <label>", "Display label for the edge").option("--source-handle <direction>", "Source direction: right, left, top, bottom (default: right)").option("--target-handle <direction>", "Target direction: right, left, top, bottom (default: left)").option("--z-index <number>", "Z-index layer for rendering order").examples(EDGES_ADD_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
1012
|
-
const [readError, schema] = await
|
|
968
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
1013
969
|
if (readError) {
|
|
1014
970
|
OutputFormatter.error({
|
|
1015
971
|
Result: RESULTS.Failure,
|
|
@@ -1067,7 +1023,7 @@ var registerEdgesCommand = (program) => {
|
|
|
1067
1023
|
};
|
|
1068
1024
|
}
|
|
1069
1025
|
schema.edges.push(edge);
|
|
1070
|
-
const [writeError] = await
|
|
1026
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
1071
1027
|
if (writeError) {
|
|
1072
1028
|
OutputFormatter.error({
|
|
1073
1029
|
Result: RESULTS.Failure,
|
|
@@ -1100,7 +1056,7 @@ var registerEdgesCommand = (program) => {
|
|
|
1100
1056
|
processContext.exit(1);
|
|
1101
1057
|
return;
|
|
1102
1058
|
}
|
|
1103
|
-
const [readError, schema] = await
|
|
1059
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
1104
1060
|
if (readError) {
|
|
1105
1061
|
OutputFormatter.error({
|
|
1106
1062
|
Result: RESULTS.Failure,
|
|
@@ -1110,7 +1066,7 @@ var registerEdgesCommand = (program) => {
|
|
|
1110
1066
|
processContext.exit(1);
|
|
1111
1067
|
return;
|
|
1112
1068
|
}
|
|
1113
|
-
const [findError, edge] =
|
|
1069
|
+
const [findError, edge] = catchError2(() => requireEdge(schema, edgeId));
|
|
1114
1070
|
if (findError) {
|
|
1115
1071
|
OutputFormatter.error({
|
|
1116
1072
|
Result: RESULTS.Failure,
|
|
@@ -1132,7 +1088,7 @@ var registerEdgesCommand = (program) => {
|
|
|
1132
1088
|
if (options.zIndex !== undefined) {
|
|
1133
1089
|
edge.zIndex = Number(options.zIndex);
|
|
1134
1090
|
}
|
|
1135
|
-
const [writeError] = await
|
|
1091
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
1136
1092
|
if (writeError) {
|
|
1137
1093
|
OutputFormatter.error({
|
|
1138
1094
|
Result: RESULTS.Failure,
|
|
@@ -1156,7 +1112,7 @@ var registerEdgesCommand = (program) => {
|
|
|
1156
1112
|
});
|
|
1157
1113
|
});
|
|
1158
1114
|
edges.command("get").description("Print an edge from a case management definition").argument("<file>", "Path to the case management JSON file").argument("<edge-id>", "ID of the edge to retrieve").examples(EDGES_GET_EXAMPLES).trackedAction(processContext, async (file, edgeId) => {
|
|
1159
|
-
const [readError, schema] = await
|
|
1115
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
1160
1116
|
if (readError) {
|
|
1161
1117
|
OutputFormatter.error({
|
|
1162
1118
|
Result: RESULTS.Failure,
|
|
@@ -1166,7 +1122,7 @@ var registerEdgesCommand = (program) => {
|
|
|
1166
1122
|
processContext.exit(1);
|
|
1167
1123
|
return;
|
|
1168
1124
|
}
|
|
1169
|
-
const [findError, edge] =
|
|
1125
|
+
const [findError, edge] = catchError2(() => requireEdge(schema, edgeId));
|
|
1170
1126
|
if (findError) {
|
|
1171
1127
|
OutputFormatter.error({
|
|
1172
1128
|
Result: RESULTS.Failure,
|
|
@@ -1183,7 +1139,7 @@ var registerEdgesCommand = (program) => {
|
|
|
1183
1139
|
});
|
|
1184
1140
|
});
|
|
1185
1141
|
edges.command("remove", { hidden: true }).description("Remove an edge from a case management definition").argument("<file>", "Path to the case management JSON file").argument("<edge-id>", "ID of the edge to remove").examples(EDGES_REMOVE_EXAMPLES).trackedAction(processContext, async (file, edgeId) => {
|
|
1186
|
-
const [readError, schema] = await
|
|
1142
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
1187
1143
|
if (readError) {
|
|
1188
1144
|
OutputFormatter.error({
|
|
1189
1145
|
Result: RESULTS.Failure,
|
|
@@ -1193,7 +1149,7 @@ var registerEdgesCommand = (program) => {
|
|
|
1193
1149
|
processContext.exit(1);
|
|
1194
1150
|
return;
|
|
1195
1151
|
}
|
|
1196
|
-
const [findError] =
|
|
1152
|
+
const [findError] = catchError2(() => requireEdge(schema, edgeId));
|
|
1197
1153
|
if (findError) {
|
|
1198
1154
|
OutputFormatter.error({
|
|
1199
1155
|
Result: RESULTS.Failure,
|
|
@@ -1204,7 +1160,7 @@ var registerEdgesCommand = (program) => {
|
|
|
1204
1160
|
return;
|
|
1205
1161
|
}
|
|
1206
1162
|
schema.edges = schema.edges.filter((e) => e.id !== edgeId);
|
|
1207
|
-
const [writeError] = await
|
|
1163
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
1208
1164
|
if (writeError) {
|
|
1209
1165
|
OutputFormatter.error({
|
|
1210
1166
|
Result: RESULTS.Failure,
|
|
@@ -1235,8 +1191,8 @@ var CASE_FORMAT_EXAMPLES = [
|
|
|
1235
1191
|
];
|
|
1236
1192
|
var registerFormatCommand = (program) => {
|
|
1237
1193
|
program.command("format").description("Rewrite a case plan JSON file pretty-printed (2-space indent, one key per line) so it can be patched with a file-edit tool.").argument("<file>", "Path to the case plan JSON file, rewritten in place").examples(CASE_FORMAT_EXAMPLES).trackedAction(processContext, async (file) => {
|
|
1238
|
-
const { formatCasePlan } = await import("./case-format-service-
|
|
1239
|
-
const [error, result] = await
|
|
1194
|
+
const { formatCasePlan } = await import("./case-format-service-3sab2297.js");
|
|
1195
|
+
const [error, result] = await catchError2(formatCasePlan(file));
|
|
1240
1196
|
if (error) {
|
|
1241
1197
|
OutputFormatter.error({
|
|
1242
1198
|
Result: RESULTS.Failure,
|
|
@@ -1297,10 +1253,10 @@ var initCaseProject = async (name, options) => {
|
|
|
1297
1253
|
if (!VALID_PROJECT_NAME_REGEX.test(name)) {
|
|
1298
1254
|
throw new Error(`Invalid project name "${name}". Name can only contain letters, numbers, underscores (_), and hyphens (-).`);
|
|
1299
1255
|
}
|
|
1300
|
-
const fs =
|
|
1301
|
-
const { prepareProjectLocation, tryRegisterProjectInParentSolution } = await import("./index-
|
|
1256
|
+
const fs = getFileSystem2();
|
|
1257
|
+
const { prepareProjectLocation, tryRegisterProjectInParentSolution } = await import("./index-sgpbvm8j.js");
|
|
1302
1258
|
const { projectDir, autoCreatedSolution } = await prepareProjectLocation(fs, fs.path.resolve(name), name, { skipRegistration: options.skipSolutionRegistration === true });
|
|
1303
|
-
const projectDirExists = await fs.stat(projectDir).then(() =>
|
|
1259
|
+
const projectDirExists = await fs.stat(projectDir).then((stat) => stat !== null).catch((err) => {
|
|
1304
1260
|
const code = err instanceof Error ? err.code : undefined;
|
|
1305
1261
|
if (code === "ENOENT" || code === "PathNotFound") {
|
|
1306
1262
|
return false;
|
|
@@ -1314,7 +1270,7 @@ var initCaseProject = async (name, options) => {
|
|
|
1314
1270
|
}
|
|
1315
1271
|
}
|
|
1316
1272
|
const safeMkdir = async (dir) => {
|
|
1317
|
-
const [mkdirError] = await
|
|
1273
|
+
const [mkdirError] = await catchError2(fs.mkdir(dir));
|
|
1318
1274
|
if (mkdirError) {
|
|
1319
1275
|
const code = mkdirError.code;
|
|
1320
1276
|
if (code !== "EEXIST") {
|
|
@@ -1323,8 +1279,8 @@ var initCaseProject = async (name, options) => {
|
|
|
1323
1279
|
}
|
|
1324
1280
|
};
|
|
1325
1281
|
await safeMkdir(projectDir);
|
|
1326
|
-
const { CasePlanFileNames, casePlanSidecarName, findCasePlanFileName } = await import("./index-
|
|
1327
|
-
const [readError, entries] = await
|
|
1282
|
+
const { CasePlanFileNames, casePlanSidecarName, findCasePlanFileName } = await import("./index-pg9wmyrf.js");
|
|
1283
|
+
const [readError, entries] = await catchError2(fs.readdir(projectDir));
|
|
1328
1284
|
if (readError || entries === undefined) {
|
|
1329
1285
|
throw new Error(`Could not read "${projectDir}" to find an existing case plan (${readError?.message ?? "no entries returned"}), so no plan was written: a new one could shadow a plan already there.`);
|
|
1330
1286
|
}
|
|
@@ -1347,13 +1303,13 @@ var initCaseProject = async (name, options) => {
|
|
|
1347
1303
|
const readIfThere = async (path) => {
|
|
1348
1304
|
if (!await fs.exists(path))
|
|
1349
1305
|
return;
|
|
1350
|
-
const [error, text] = await
|
|
1306
|
+
const [error, text] = await catchError2(fs.readFile(path, "utf-8"));
|
|
1351
1307
|
if (error || text === null) {
|
|
1352
1308
|
throw new Error(`Could not read "${path}" (${error?.message ?? "no content returned"}), so the project's entry points were not rewritten: they have to follow what that file says.`);
|
|
1353
1309
|
}
|
|
1354
1310
|
return String(text);
|
|
1355
1311
|
};
|
|
1356
|
-
const { initEntryPoints } = await import("./init-entry-points-
|
|
1312
|
+
const { initEntryPoints } = await import("./init-entry-points-pc128f7z.js");
|
|
1357
1313
|
const entryPoints = initEntryPoints({
|
|
1358
1314
|
sidecarFileName,
|
|
1359
1315
|
...casePlanExists && {
|
|
@@ -1400,12 +1356,12 @@ var initCaseProject = async (name, options) => {
|
|
|
1400
1356
|
const newCasePlan = async () => {
|
|
1401
1357
|
const document = buildMinimalCaseDocument({
|
|
1402
1358
|
name,
|
|
1403
|
-
schemaVersion: await
|
|
1359
|
+
schemaVersion: await resolveCaseSchemaWriteVersion2()
|
|
1404
1360
|
});
|
|
1405
1361
|
if ("write" in entryPoints) {
|
|
1406
1362
|
const [{ entryPointIdsByNode }, { stampEntryPointIds }] = await Promise.all([
|
|
1407
|
-
import("./case-event-trigger-bindings-
|
|
1408
|
-
import("./trigger-entry-point-id-
|
|
1363
|
+
import("./case-event-trigger-bindings-qbs8ywf5.js"),
|
|
1364
|
+
import("./trigger-entry-point-id-751v48qd.js")
|
|
1409
1365
|
]);
|
|
1410
1366
|
stampEntryPointIds(document, entryPointIdsByNode({ entryPoints: entryPoints.write }));
|
|
1411
1367
|
}
|
|
@@ -1418,13 +1374,17 @@ var initCaseProject = async (name, options) => {
|
|
|
1418
1374
|
const solutionRegistration = await tryRegisterProjectInParentSolution(fs, projectDir, { skipRegistration: options.skipSolutionRegistration === true });
|
|
1419
1375
|
let projectArtifacts;
|
|
1420
1376
|
if ((solutionRegistration.Status === "Registered" || solutionRegistration.Status === "AlreadyRegistered") && solutionRegistration.Solution && solutionRegistration.ProjectId) {
|
|
1421
|
-
const { ensureProjectArtifacts } = await import("./project-artifacts-
|
|
1422
|
-
|
|
1377
|
+
const { ensureProjectArtifacts } = await import("./project-artifacts-q0c0zghw.js");
|
|
1378
|
+
const written = await ensureProjectArtifacts({
|
|
1423
1379
|
solutionDir: fs.path.dirname(solutionRegistration.Solution),
|
|
1424
1380
|
projectId: solutionRegistration.ProjectId,
|
|
1425
1381
|
projectName: name,
|
|
1426
1382
|
projectType: "CaseManagement"
|
|
1427
1383
|
});
|
|
1384
|
+
projectArtifacts = written ?? {
|
|
1385
|
+
Created: false,
|
|
1386
|
+
Error: `This host cannot generate the project's artifact resources (resources/solution_folder/process/casemanagement/), so solution pack would omit them. Run 'uip maestro case init ${name} --force' inside the solution with a local uip to write them.`
|
|
1387
|
+
};
|
|
1428
1388
|
}
|
|
1429
1389
|
const data = {
|
|
1430
1390
|
Status: "Created successfully",
|
|
@@ -1450,7 +1410,7 @@ var initCaseProject = async (name, options) => {
|
|
|
1450
1410
|
};
|
|
1451
1411
|
var registerInitCommand = (program) => {
|
|
1452
1412
|
program.command("init").description("Create a new Case project with boilerplate files. If run outside an existing solution, a parent '<name>Solution' is scaffolded automatically and the case project is nested inside it. If run inside an existing solution, the project is added to that solution.").argument("<name>", "Case project name").option("--force", "Force initialization even if target directory is not empty (writes files without clearing existing contents)").option("--skip-solution-registration", "Do not auto-register this project in the surrounding solution").examples(CASE_INIT_EXAMPLES).trackedAction(processContext, async (name, options) => {
|
|
1453
|
-
const [error] = await
|
|
1413
|
+
const [error] = await catchError2(initCaseProject(name, options));
|
|
1454
1414
|
if (error) {
|
|
1455
1415
|
OutputFormatter.error({
|
|
1456
1416
|
Result: RESULTS.Failure,
|
|
@@ -1473,8 +1433,8 @@ var registerInstancesCommand = (program) => {
|
|
|
1473
1433
|
};
|
|
1474
1434
|
|
|
1475
1435
|
// src/commands/job.ts
|
|
1476
|
-
var loadAuth = () => import("./index-
|
|
1477
|
-
var loadCaseApi = () => import("./case-api-
|
|
1436
|
+
var loadAuth = () => import("./index-nj3axvya.js");
|
|
1437
|
+
var loadCaseApi = () => import("./case-api-by95rf40.js");
|
|
1478
1438
|
var CASE_JOB_STATUS_EXAMPLES = [
|
|
1479
1439
|
{
|
|
1480
1440
|
Description: "Get detailed status of a case job",
|
|
@@ -1494,36 +1454,17 @@ var CASE_JOB_STATUS_EXAMPLES = [
|
|
|
1494
1454
|
];
|
|
1495
1455
|
function registerJobCommand(program) {
|
|
1496
1456
|
const jobCmd = program.command("job").description("Manage Case jobs");
|
|
1497
|
-
jobCmd.command("traces").description("Stream traces for a running job").argument("<job-key>", "Job key (GUID from run command)")
|
|
1498
|
-
|
|
1499
|
-
const
|
|
1500
|
-
|
|
1457
|
+
const tracesCmd = jobCmd.command("traces").description("Stream traces for a running job").argument("<job-key>", "Job key (GUID from run command)");
|
|
1458
|
+
addJobTracesOptions(tracesCmd, "Folder key (GUID) of the job's folder; without it the job is read unscoped").trackedAction(processContext, async (jobKey, options) => {
|
|
1459
|
+
const { getAuthContext } = await loadAuth();
|
|
1460
|
+
const [authError, auth] = await catchError2(getAuthContext({
|
|
1461
|
+
ensureTokenValidityMinutes: options.loginValidity,
|
|
1462
|
+
tenant: options.tenant,
|
|
1463
|
+
requireOrganizationId: true,
|
|
1464
|
+
requireTenantName: true
|
|
1501
1465
|
}));
|
|
1502
|
-
if (
|
|
1503
|
-
OutputFormatter.error(
|
|
1504
|
-
Result: RESULTS.Failure,
|
|
1505
|
-
Message: loginError.message,
|
|
1506
|
-
Instructions: instructionsFor("auth")
|
|
1507
|
-
});
|
|
1508
|
-
processContext.exit(1);
|
|
1509
|
-
return;
|
|
1510
|
-
}
|
|
1511
|
-
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
|
|
1512
|
-
OutputFormatter.error({
|
|
1513
|
-
Result: RESULTS.Failure,
|
|
1514
|
-
Message: "Not logged in. Run 'uip login' first.",
|
|
1515
|
-
Instructions: instructionsFor("auth")
|
|
1516
|
-
});
|
|
1517
|
-
processContext.exit(1);
|
|
1518
|
-
return;
|
|
1519
|
-
}
|
|
1520
|
-
const tenantName = options.tenant || loginStatus.tenantName;
|
|
1521
|
-
if (!tenantName || !loginStatus.organizationId) {
|
|
1522
|
-
OutputFormatter.error({
|
|
1523
|
-
Result: RESULTS.Failure,
|
|
1524
|
-
Message: "Missing tenant or organization info.",
|
|
1525
|
-
Instructions: instructionsFor("identity")
|
|
1526
|
-
});
|
|
1466
|
+
if (authError) {
|
|
1467
|
+
OutputFormatter.error(await authContextFailure(authError));
|
|
1527
1468
|
processContext.exit(1);
|
|
1528
1469
|
return;
|
|
1529
1470
|
}
|
|
@@ -1539,13 +1480,13 @@ function registerJobCommand(program) {
|
|
|
1539
1480
|
}
|
|
1540
1481
|
const config = {
|
|
1541
1482
|
processKey: "",
|
|
1542
|
-
folderKey: "",
|
|
1483
|
+
folderKey: options.folderKey ?? "",
|
|
1543
1484
|
inputs: {},
|
|
1544
|
-
authToken:
|
|
1545
|
-
organizationId:
|
|
1546
|
-
tenantName,
|
|
1547
|
-
tenantId:
|
|
1548
|
-
baseUrl:
|
|
1485
|
+
authToken: auth.accessToken,
|
|
1486
|
+
organizationId: auth.organizationId,
|
|
1487
|
+
tenantName: auth.tenantName,
|
|
1488
|
+
tenantId: auth.tenantId,
|
|
1489
|
+
baseUrl: auth.baseUrl,
|
|
1549
1490
|
tracesServiceName: options.tracesService
|
|
1550
1491
|
};
|
|
1551
1492
|
const pollSeconds = pollIntervalMs / 1000;
|
|
@@ -1553,18 +1494,21 @@ function registerJobCommand(program) {
|
|
|
1553
1494
|
Message: `\uD83D\uDD0D Streaming traces for job: ${jobKey}
|
|
1554
1495
|
Polling every ${pollSeconds}s...`
|
|
1555
1496
|
});
|
|
1556
|
-
const { streamJobTraces } = await loadCaseApi();
|
|
1557
|
-
const [
|
|
1497
|
+
const { getJobStatusDetailed, streamJobTraces } = await loadCaseApi();
|
|
1498
|
+
const [jobError, job] = await catchError2(getJobStatusDetailed(config, jobKey));
|
|
1499
|
+
if (jobError) {
|
|
1500
|
+
OutputFormatter.error(await jobLookupFailure(jobError, options.folderKey, instructionsFor("backend", jobError)));
|
|
1501
|
+
processContext.exit(1);
|
|
1502
|
+
return;
|
|
1503
|
+
}
|
|
1504
|
+
const [tracesError, result] = await catchError2(streamJobTraces(config, jobKey, {
|
|
1505
|
+
traceId: job.traceId || undefined,
|
|
1558
1506
|
onTrace: (trace) => {
|
|
1559
|
-
|
|
1560
|
-
logger.info(formatTraceLine(trace));
|
|
1561
|
-
} else {
|
|
1562
|
-
logger.info(JSON.stringify(trace));
|
|
1563
|
-
}
|
|
1507
|
+
ScreenLogger.progress(options.pretty ? formatTraceLine(trace) : JSON.stringify(trace));
|
|
1564
1508
|
},
|
|
1565
1509
|
onComplete: (r) => {
|
|
1566
1510
|
OutputFormatter.log({
|
|
1567
|
-
Message:
|
|
1511
|
+
Message: `Job ${jobKey} ended ${r.finalState} (${r.duration}ms)`
|
|
1568
1512
|
});
|
|
1569
1513
|
},
|
|
1570
1514
|
onError: (error) => {
|
|
@@ -1584,39 +1528,23 @@ function registerJobCommand(program) {
|
|
|
1584
1528
|
return;
|
|
1585
1529
|
}
|
|
1586
1530
|
if (!result.success) {
|
|
1531
|
+
OutputFormatter.error(tracesFailure(jobKey, result, {
|
|
1532
|
+
code: "CaseJobNotCompleted",
|
|
1533
|
+
statusCommand: `uip maestro case job status ${jobKey}${options.folderKey ? ` --folder-key ${options.folderKey}` : ""}`
|
|
1534
|
+
}));
|
|
1587
1535
|
processContext.exit(1);
|
|
1588
1536
|
}
|
|
1589
1537
|
});
|
|
1590
1538
|
jobCmd.command("status").description("Get detailed status of a Case job").argument("<job-key>", "Job key (GUID from run command)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--folder-key <key>", "Folder key (GUID from list command, defaults to authenticated folder)").option("--detailed", "Show full response with all fields").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(CASE_JOB_STATUS_EXAMPLES).trackedAction(processContext, async (jobKey, options) => {
|
|
1591
|
-
const {
|
|
1592
|
-
const [
|
|
1593
|
-
ensureTokenValidityMinutes: options.loginValidity
|
|
1539
|
+
const { getAuthContext } = await loadAuth();
|
|
1540
|
+
const [authError, auth] = await catchError2(getAuthContext({
|
|
1541
|
+
ensureTokenValidityMinutes: options.loginValidity,
|
|
1542
|
+
tenant: options.tenant,
|
|
1543
|
+
requireOrganizationId: true,
|
|
1544
|
+
requireTenantName: true
|
|
1594
1545
|
}));
|
|
1595
|
-
if (
|
|
1596
|
-
OutputFormatter.error(
|
|
1597
|
-
Result: RESULTS.Failure,
|
|
1598
|
-
Message: loginError.message,
|
|
1599
|
-
Instructions: instructionsFor("auth")
|
|
1600
|
-
});
|
|
1601
|
-
processContext.exit(1);
|
|
1602
|
-
return;
|
|
1603
|
-
}
|
|
1604
|
-
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
|
|
1605
|
-
OutputFormatter.error({
|
|
1606
|
-
Result: RESULTS.Failure,
|
|
1607
|
-
Message: "Not logged in. Run 'uip login' first.",
|
|
1608
|
-
Instructions: instructionsFor("auth")
|
|
1609
|
-
});
|
|
1610
|
-
processContext.exit(1);
|
|
1611
|
-
return;
|
|
1612
|
-
}
|
|
1613
|
-
const tenantName = options.tenant || loginStatus.tenantName;
|
|
1614
|
-
if (!tenantName || !loginStatus.organizationId) {
|
|
1615
|
-
OutputFormatter.error({
|
|
1616
|
-
Result: RESULTS.Failure,
|
|
1617
|
-
Message: "Missing tenant or organization info.",
|
|
1618
|
-
Instructions: instructionsFor("identity")
|
|
1619
|
-
});
|
|
1546
|
+
if (authError) {
|
|
1547
|
+
OutputFormatter.error(await authContextFailure(authError));
|
|
1620
1548
|
processContext.exit(1);
|
|
1621
1549
|
return;
|
|
1622
1550
|
}
|
|
@@ -1624,14 +1552,14 @@ function registerJobCommand(program) {
|
|
|
1624
1552
|
processKey: "",
|
|
1625
1553
|
folderKey: options.folderKey ?? "",
|
|
1626
1554
|
inputs: {},
|
|
1627
|
-
authToken:
|
|
1628
|
-
organizationId:
|
|
1629
|
-
tenantName,
|
|
1630
|
-
tenantId:
|
|
1631
|
-
baseUrl:
|
|
1555
|
+
authToken: auth.accessToken,
|
|
1556
|
+
organizationId: auth.organizationId,
|
|
1557
|
+
tenantName: auth.tenantName,
|
|
1558
|
+
tenantId: auth.tenantId,
|
|
1559
|
+
baseUrl: auth.baseUrl
|
|
1632
1560
|
};
|
|
1633
1561
|
const { getJobStatusDetailed } = await loadCaseApi();
|
|
1634
|
-
const [statusError, status] = await
|
|
1562
|
+
const [statusError, status] = await catchError2(getJobStatusDetailed(config, jobKey));
|
|
1635
1563
|
if (statusError) {
|
|
1636
1564
|
OutputFormatter.error({
|
|
1637
1565
|
Result: RESULTS.Failure,
|
|
@@ -1720,9 +1648,9 @@ var CASE_PACK_EXAMPLES = [
|
|
|
1720
1648
|
var registerPackCommand = (program) => {
|
|
1721
1649
|
const command = program.command("pack").description("Pack a Case project into a .nupkg file").argument("<project-path>", "Path to the Case project directory").argument("<output-path>", "Output directory where the .nupkg will be saved").option("-n, --name <name>", "Package name (default: project folder name)").option("-v, --version <version>", "Package version (default: 1.0.0)", "1.0.0");
|
|
1722
1650
|
registerPackageMetadataOptions(command).examples(CASE_PACK_EXAMPLES).trackedAction(processContext, async (projectPath, outputPath, options) => {
|
|
1723
|
-
const { CasePackService } = await import("./case-pack-service-
|
|
1651
|
+
const { CasePackService } = await import("./case-pack-service-txnv711n.js");
|
|
1724
1652
|
const service = new CasePackService;
|
|
1725
|
-
const [error, result] = await
|
|
1653
|
+
const [error, result] = await catchError2(service.execute(projectPath, {
|
|
1726
1654
|
output: outputPath,
|
|
1727
1655
|
name: options.name,
|
|
1728
1656
|
version: options.version,
|
|
@@ -1748,6 +1676,10 @@ var registerPackCommand = (program) => {
|
|
|
1748
1676
|
});
|
|
1749
1677
|
};
|
|
1750
1678
|
|
|
1679
|
+
// src/utils/list-window.ts
|
|
1680
|
+
var addListWindowOptions = (command) => command.option("-l, --limit <number>", "Return at most this many rows (default: all)", parseLimit).option("--offset <number>", "Skip this many rows before the first one returned (default: 0)", parseOffset);
|
|
1681
|
+
var listWindow = (rows, { limit, offset = 0 }) => rows.slice(offset, limit === undefined ? undefined : offset + limit);
|
|
1682
|
+
|
|
1751
1683
|
// src/commands/process.ts
|
|
1752
1684
|
var CASE_PROCESS_LIST_EXAMPLES = [
|
|
1753
1685
|
{
|
|
@@ -1802,50 +1734,21 @@ var CASE_PROCESS_RUN_EXAMPLES = [
|
|
|
1802
1734
|
}
|
|
1803
1735
|
}
|
|
1804
1736
|
];
|
|
1805
|
-
var loadAuth2 = () => import("./index-
|
|
1806
|
-
var loadCaseApi2 = () => import("./case-api-
|
|
1737
|
+
var loadAuth2 = () => import("./index-nj3axvya.js");
|
|
1738
|
+
var loadCaseApi2 = () => import("./case-api-by95rf40.js");
|
|
1807
1739
|
function registerProcessCommand(program) {
|
|
1808
1740
|
const processCmd = program.command("process").description("Manage Case processes");
|
|
1809
1741
|
registerSharedProcessCommands(processCmd, { toolLabel: "Case" });
|
|
1810
|
-
processCmd.command("list").description("List available Case processes").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--filter <odata>", "Additional OData filter").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(CASE_PROCESS_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
1811
|
-
const {
|
|
1812
|
-
const [
|
|
1813
|
-
ensureTokenValidityMinutes: options.loginValidity
|
|
1742
|
+
addListWindowOptions(processCmd.command("list").description("List available Case processes")).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--filter <odata>", "Additional OData filter").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(CASE_PROCESS_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
1743
|
+
const { getAuthContext } = await loadAuth2();
|
|
1744
|
+
const [authError, auth] = await catchError2(getAuthContext({
|
|
1745
|
+
ensureTokenValidityMinutes: options.loginValidity,
|
|
1746
|
+
tenant: options.tenant,
|
|
1747
|
+
requireOrganizationId: true,
|
|
1748
|
+
requireTenantName: true
|
|
1814
1749
|
}));
|
|
1815
|
-
if (
|
|
1816
|
-
OutputFormatter.error(
|
|
1817
|
-
Result: RESULTS.Failure,
|
|
1818
|
-
Message: loginError.message,
|
|
1819
|
-
Instructions: instructionsFor("auth")
|
|
1820
|
-
});
|
|
1821
|
-
processContext.exit(1);
|
|
1822
|
-
return;
|
|
1823
|
-
}
|
|
1824
|
-
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
|
|
1825
|
-
OutputFormatter.error({
|
|
1826
|
-
Result: RESULTS.Failure,
|
|
1827
|
-
Message: "Not logged in. Run 'uip login' first.",
|
|
1828
|
-
Instructions: instructionsFor("auth")
|
|
1829
|
-
});
|
|
1830
|
-
processContext.exit(1);
|
|
1831
|
-
return;
|
|
1832
|
-
}
|
|
1833
|
-
const tenantName = options.tenant || loginStatus.tenantName;
|
|
1834
|
-
if (!tenantName) {
|
|
1835
|
-
OutputFormatter.error({
|
|
1836
|
-
Result: RESULTS.Failure,
|
|
1837
|
-
Message: "Tenant not provided and not available from login. Run 'uip login' or 'uip login tenant set <tenant>'.",
|
|
1838
|
-
Instructions: instructionsFor("identity")
|
|
1839
|
-
});
|
|
1840
|
-
processContext.exit(1);
|
|
1841
|
-
return;
|
|
1842
|
-
}
|
|
1843
|
-
if (!loginStatus.organizationId) {
|
|
1844
|
-
OutputFormatter.error({
|
|
1845
|
-
Result: RESULTS.Failure,
|
|
1846
|
-
Message: "Organization ID not available from login.",
|
|
1847
|
-
Instructions: instructionsFor("identity")
|
|
1848
|
-
});
|
|
1750
|
+
if (authError) {
|
|
1751
|
+
OutputFormatter.error(await authContextFailure(authError));
|
|
1849
1752
|
processContext.exit(1);
|
|
1850
1753
|
return;
|
|
1851
1754
|
}
|
|
@@ -1853,13 +1756,13 @@ function registerProcessCommand(program) {
|
|
|
1853
1756
|
processKey: "",
|
|
1854
1757
|
folderKey: options.folderKey,
|
|
1855
1758
|
inputs: {},
|
|
1856
|
-
authToken:
|
|
1857
|
-
organizationId:
|
|
1858
|
-
tenantName,
|
|
1859
|
-
baseUrl:
|
|
1759
|
+
authToken: auth.accessToken,
|
|
1760
|
+
organizationId: auth.organizationId,
|
|
1761
|
+
tenantName: auth.tenantName,
|
|
1762
|
+
baseUrl: auth.baseUrl
|
|
1860
1763
|
};
|
|
1861
1764
|
const { listCaseProcesses } = await loadCaseApi2();
|
|
1862
|
-
const [listError, processes] = await
|
|
1765
|
+
const [listError, processes] = await catchError2(listCaseProcesses(config, options.filter));
|
|
1863
1766
|
if (listError) {
|
|
1864
1767
|
OutputFormatter.error({
|
|
1865
1768
|
Result: RESULTS.Failure,
|
|
@@ -1869,7 +1772,7 @@ function registerProcessCommand(program) {
|
|
|
1869
1772
|
processContext.exit(1);
|
|
1870
1773
|
return;
|
|
1871
1774
|
}
|
|
1872
|
-
const formattedData = processes.map((p) => ({
|
|
1775
|
+
const formattedData = listWindow(processes, options).map((p) => ({
|
|
1873
1776
|
name: p.name,
|
|
1874
1777
|
processKey: `${p.processKey}:${p.processVersion}`,
|
|
1875
1778
|
releaseKey: p.key,
|
|
@@ -1884,44 +1787,15 @@ function registerProcessCommand(program) {
|
|
|
1884
1787
|
});
|
|
1885
1788
|
});
|
|
1886
1789
|
processCmd.command("get").description("Get Case process schema and details").argument("<process-key>", "Process key").argument("<feed-id>", "Feed ID (from 'case process list')").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(CASE_PROCESS_GET_EXAMPLES).trackedAction(processContext, async (processKey, feedId, options) => {
|
|
1887
|
-
const {
|
|
1888
|
-
const [
|
|
1889
|
-
ensureTokenValidityMinutes: options.loginValidity
|
|
1790
|
+
const { getAuthContext } = await loadAuth2();
|
|
1791
|
+
const [authError, auth] = await catchError2(getAuthContext({
|
|
1792
|
+
ensureTokenValidityMinutes: options.loginValidity,
|
|
1793
|
+
tenant: options.tenant,
|
|
1794
|
+
requireOrganizationId: true,
|
|
1795
|
+
requireTenantName: true
|
|
1890
1796
|
}));
|
|
1891
|
-
if (
|
|
1892
|
-
OutputFormatter.error(
|
|
1893
|
-
Result: RESULTS.Failure,
|
|
1894
|
-
Message: loginError.message,
|
|
1895
|
-
Instructions: instructionsFor("auth")
|
|
1896
|
-
});
|
|
1897
|
-
processContext.exit(1);
|
|
1898
|
-
return;
|
|
1899
|
-
}
|
|
1900
|
-
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
|
|
1901
|
-
OutputFormatter.error({
|
|
1902
|
-
Result: RESULTS.Failure,
|
|
1903
|
-
Message: "Not logged in. Run 'uip login' first.",
|
|
1904
|
-
Instructions: instructionsFor("auth")
|
|
1905
|
-
});
|
|
1906
|
-
processContext.exit(1);
|
|
1907
|
-
return;
|
|
1908
|
-
}
|
|
1909
|
-
const tenantName = options.tenant || loginStatus.tenantName;
|
|
1910
|
-
if (!tenantName) {
|
|
1911
|
-
OutputFormatter.error({
|
|
1912
|
-
Result: RESULTS.Failure,
|
|
1913
|
-
Message: "Tenant not provided and not available from login. Run 'uip login' or 'uip login tenant set <tenant>'.",
|
|
1914
|
-
Instructions: instructionsFor("identity")
|
|
1915
|
-
});
|
|
1916
|
-
processContext.exit(1);
|
|
1917
|
-
return;
|
|
1918
|
-
}
|
|
1919
|
-
if (!loginStatus.organizationId) {
|
|
1920
|
-
OutputFormatter.error({
|
|
1921
|
-
Result: RESULTS.Failure,
|
|
1922
|
-
Message: "Organization ID not available from login.",
|
|
1923
|
-
Instructions: instructionsFor("identity")
|
|
1924
|
-
});
|
|
1797
|
+
if (authError) {
|
|
1798
|
+
OutputFormatter.error(await authContextFailure(authError));
|
|
1925
1799
|
processContext.exit(1);
|
|
1926
1800
|
return;
|
|
1927
1801
|
}
|
|
@@ -1929,14 +1803,14 @@ function registerProcessCommand(program) {
|
|
|
1929
1803
|
processKey,
|
|
1930
1804
|
folderKey: options.folderKey,
|
|
1931
1805
|
inputs: {},
|
|
1932
|
-
authToken:
|
|
1933
|
-
organizationId:
|
|
1934
|
-
tenantName,
|
|
1935
|
-
baseUrl:
|
|
1806
|
+
authToken: auth.accessToken,
|
|
1807
|
+
organizationId: auth.organizationId,
|
|
1808
|
+
tenantName: auth.tenantName,
|
|
1809
|
+
baseUrl: auth.baseUrl,
|
|
1936
1810
|
feedId
|
|
1937
1811
|
};
|
|
1938
1812
|
const { getCaseEntryPoints } = await loadCaseApi2();
|
|
1939
|
-
const [epError, entryPoints] = await
|
|
1813
|
+
const [epError, entryPoints] = await catchError2(getCaseEntryPoints(config));
|
|
1940
1814
|
if (epError) {
|
|
1941
1815
|
OutputFormatter.error({
|
|
1942
1816
|
Result: RESULTS.Failure,
|
|
@@ -1958,10 +1832,10 @@ function registerProcessCommand(program) {
|
|
|
1958
1832
|
const formattedData = entryPoints.map((ep) => {
|
|
1959
1833
|
let inputSchema = {};
|
|
1960
1834
|
let outputSchema = {};
|
|
1961
|
-
const [, parsedInput] =
|
|
1835
|
+
const [, parsedInput] = catchError2(() => JSON.parse(ep.InputArguments));
|
|
1962
1836
|
if (parsedInput)
|
|
1963
1837
|
inputSchema = parsedInput;
|
|
1964
|
-
const [, parsedOutput] =
|
|
1838
|
+
const [, parsedOutput] = catchError2(() => JSON.parse(ep.OutputArguments));
|
|
1965
1839
|
if (parsedOutput)
|
|
1966
1840
|
outputSchema = parsedOutput;
|
|
1967
1841
|
return {
|
|
@@ -1980,56 +1854,27 @@ function registerProcessCommand(program) {
|
|
|
1980
1854
|
});
|
|
1981
1855
|
});
|
|
1982
1856
|
processCmd.command("run").description("Run a Case process with inputs").argument("<process-key>", "Process key").argument("<folder-key>", "Folder key (GUID)").option("-i, --inputs <json>", "Input parameters as JSON string or @file.json").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--release-key <key>", "Release key (GUID, from list command)").option("--feed-id <id>", "Feed ID for package lookup (optional)").option("--robot-ids <ids>", "Comma-separated robot IDs (optional)").option("--validate", "Validate inputs against process schema (basic: required fields + primitive types)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(CASE_PROCESS_RUN_EXAMPLES).trackedAction(processContext, async (processKey, folderKey, options) => {
|
|
1983
|
-
const {
|
|
1857
|
+
const { getAuthContext } = await loadAuth2();
|
|
1984
1858
|
const {
|
|
1985
1859
|
parseCaseInputs,
|
|
1986
1860
|
resolveOrganizationUnitId,
|
|
1987
1861
|
startCaseProjectJob,
|
|
1988
1862
|
validateCaseInputs
|
|
1989
1863
|
} = await loadCaseApi2();
|
|
1990
|
-
const [
|
|
1991
|
-
ensureTokenValidityMinutes: options.loginValidity
|
|
1864
|
+
const [authError, auth] = await catchError2(getAuthContext({
|
|
1865
|
+
ensureTokenValidityMinutes: options.loginValidity,
|
|
1866
|
+
tenant: options.tenant,
|
|
1867
|
+
requireOrganizationId: true,
|
|
1868
|
+
requireTenantName: true
|
|
1992
1869
|
}));
|
|
1993
|
-
if (
|
|
1994
|
-
OutputFormatter.error(
|
|
1995
|
-
Result: RESULTS.Failure,
|
|
1996
|
-
Message: loginError.message,
|
|
1997
|
-
Instructions: instructionsFor("auth")
|
|
1998
|
-
});
|
|
1999
|
-
processContext.exit(1);
|
|
2000
|
-
return;
|
|
2001
|
-
}
|
|
2002
|
-
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
|
|
2003
|
-
OutputFormatter.error({
|
|
2004
|
-
Result: RESULTS.Failure,
|
|
2005
|
-
Message: "Not logged in. Run 'uip login' first.",
|
|
2006
|
-
Instructions: instructionsFor("auth")
|
|
2007
|
-
});
|
|
2008
|
-
processContext.exit(1);
|
|
2009
|
-
return;
|
|
2010
|
-
}
|
|
2011
|
-
const tenantName = options.tenant || loginStatus.tenantName;
|
|
2012
|
-
if (!tenantName) {
|
|
2013
|
-
OutputFormatter.error({
|
|
2014
|
-
Result: RESULTS.Failure,
|
|
2015
|
-
Message: "Tenant not provided and not available from login. Run 'uip login' or 'uip login tenant set <tenant>'.",
|
|
2016
|
-
Instructions: instructionsFor("identity")
|
|
2017
|
-
});
|
|
2018
|
-
processContext.exit(1);
|
|
2019
|
-
return;
|
|
2020
|
-
}
|
|
2021
|
-
if (!loginStatus.organizationId) {
|
|
2022
|
-
OutputFormatter.error({
|
|
2023
|
-
Result: RESULTS.Failure,
|
|
2024
|
-
Message: "Organization ID not available from login.",
|
|
2025
|
-
Instructions: instructionsFor("identity")
|
|
2026
|
-
});
|
|
1870
|
+
if (authError) {
|
|
1871
|
+
OutputFormatter.error(await authContextFailure(authError));
|
|
2027
1872
|
processContext.exit(1);
|
|
2028
1873
|
return;
|
|
2029
1874
|
}
|
|
2030
1875
|
let inputs = {};
|
|
2031
1876
|
if (options.inputs) {
|
|
2032
|
-
const [parseError, parsed] = await
|
|
1877
|
+
const [parseError, parsed] = await catchError2(parseCaseInputs(options.inputs));
|
|
2033
1878
|
if (parseError) {
|
|
2034
1879
|
OutputFormatter.error({
|
|
2035
1880
|
Result: RESULTS.Failure,
|
|
@@ -2041,10 +1886,10 @@ function registerProcessCommand(program) {
|
|
|
2041
1886
|
}
|
|
2042
1887
|
inputs = parsed;
|
|
2043
1888
|
} else {
|
|
2044
|
-
const { readStdin } = await import("./input-reader-
|
|
2045
|
-
const [stdinError, stdinData] = await
|
|
1889
|
+
const { readStdin } = await import("./input-reader-9ym8mkbc.js");
|
|
1890
|
+
const [stdinError, stdinData] = await catchError2(readStdin());
|
|
2046
1891
|
if (!stdinError && stdinData) {
|
|
2047
|
-
const [parseError, parsed] = await
|
|
1892
|
+
const [parseError, parsed] = await catchError2(parseCaseInputs(stdinData));
|
|
2048
1893
|
if (parseError) {
|
|
2049
1894
|
OutputFormatter.error({
|
|
2050
1895
|
Result: RESULTS.Failure,
|
|
@@ -2061,11 +1906,11 @@ function registerProcessCommand(program) {
|
|
|
2061
1906
|
processKey,
|
|
2062
1907
|
folderKey,
|
|
2063
1908
|
inputs,
|
|
2064
|
-
authToken:
|
|
2065
|
-
organizationId:
|
|
2066
|
-
tenantName,
|
|
2067
|
-
tenantId:
|
|
2068
|
-
baseUrl:
|
|
1909
|
+
authToken: auth.accessToken,
|
|
1910
|
+
organizationId: auth.organizationId,
|
|
1911
|
+
tenantName: auth.tenantName,
|
|
1912
|
+
tenantId: auth.tenantId,
|
|
1913
|
+
baseUrl: auth.baseUrl,
|
|
2069
1914
|
releaseKey: options.releaseKey,
|
|
2070
1915
|
feedId: options.feedId
|
|
2071
1916
|
};
|
|
@@ -2082,7 +1927,7 @@ function registerProcessCommand(program) {
|
|
|
2082
1927
|
}
|
|
2083
1928
|
config.robotIds = robotIds;
|
|
2084
1929
|
}
|
|
2085
|
-
const [folderError, organizationUnitId] = await
|
|
1930
|
+
const [folderError, organizationUnitId] = await catchError2(resolveOrganizationUnitId(config));
|
|
2086
1931
|
if (folderError) {
|
|
2087
1932
|
OutputFormatter.error({
|
|
2088
1933
|
Result: RESULTS.Failure,
|
|
@@ -2097,22 +1942,21 @@ function registerProcessCommand(program) {
|
|
|
2097
1942
|
organizationUnitId
|
|
2098
1943
|
};
|
|
2099
1944
|
if (options.validate) {
|
|
2100
|
-
const [valError, validation] = await
|
|
1945
|
+
const [valError, validation] = await catchError2(validateCaseInputs(runConfig, inputs));
|
|
2101
1946
|
if (valError) {
|
|
2102
|
-
OutputFormatter.error(
|
|
2103
|
-
Result: RESULTS.Failure,
|
|
2104
|
-
Message: valError.message,
|
|
2105
|
-
Instructions: instructionsFor("backend", valError)
|
|
2106
|
-
});
|
|
1947
|
+
OutputFormatter.error(await backendFailure(valError, instructionsFor("backend", valError)));
|
|
2107
1948
|
processContext.exit(1);
|
|
2108
1949
|
return;
|
|
2109
1950
|
}
|
|
2110
1951
|
if (!validation.valid) {
|
|
2111
|
-
const
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
${
|
|
1952
|
+
const errors = validation.errors ?? [];
|
|
1953
|
+
OutputFormatter.error({
|
|
1954
|
+
Result: RESULTS.Failure,
|
|
1955
|
+
ErrorCode: "invalid_argument",
|
|
1956
|
+
Message: `Input validation failed: ${errors.join("; ")}`,
|
|
1957
|
+
Instructions: `Run 'uip maestro case process get ${processKey} ${options.feedId ?? "<feed-id>"} --folder-key ${folderKey}' for the entry point's input schema, then fix --inputs.`,
|
|
1958
|
+
Retry: "RetryWillNotFix",
|
|
1959
|
+
Data: { Errors: errors }
|
|
2116
1960
|
});
|
|
2117
1961
|
processContext.exit(1);
|
|
2118
1962
|
return;
|
|
@@ -2121,7 +1965,7 @@ ${errorList}`
|
|
|
2121
1965
|
Message: "✅ Input validation passed"
|
|
2122
1966
|
});
|
|
2123
1967
|
}
|
|
2124
|
-
const [jobError, job] = await
|
|
1968
|
+
const [jobError, job] = await catchError2(startCaseProjectJob(runConfig));
|
|
2125
1969
|
if (jobError) {
|
|
2126
1970
|
OutputFormatter.error({
|
|
2127
1971
|
Result: RESULTS.Failure,
|
|
@@ -2139,7 +1983,7 @@ ${errorList}`
|
|
|
2139
1983
|
state: job.state,
|
|
2140
1984
|
traceId: job.traceId
|
|
2141
1985
|
},
|
|
2142
|
-
Instructions: `Watch traces: uip maestro case job traces ${job.key}`
|
|
1986
|
+
Instructions: `Watch traces: uip maestro case job traces ${job.key} --folder-key ${folderKey}`
|
|
2143
1987
|
});
|
|
2144
1988
|
});
|
|
2145
1989
|
}
|
|
@@ -2369,8 +2213,8 @@ Subcommands:
|
|
|
2369
2213
|
search Find resources by keyword and/or field filters
|
|
2370
2214
|
get Get full schema for a single resource`);
|
|
2371
2215
|
registry.command("pull").description("Pull and sync data from Case registry").option("-f, --force", "Force refresh, ignore cache").option("-s, --solution-id <solutionId>", "Include the registry of the solution").examples(REGISTRY_PULL_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
2372
|
-
const { pullResources } = await import("./resourcesSyncService-
|
|
2373
|
-
const [mapError, promises] =
|
|
2216
|
+
const { pullResources } = await import("./resourcesSyncService-sgnkcvpt.js");
|
|
2217
|
+
const [mapError, promises] = catchError2(() => RESOURCE_TYPES.map((type) => pullResources({
|
|
2374
2218
|
force: options.force,
|
|
2375
2219
|
solutionId: options.solutionId
|
|
2376
2220
|
}, type).then((result) => ({ type, ...result }))));
|
|
@@ -2394,8 +2238,11 @@ Subcommands:
|
|
|
2394
2238
|
const totalCount = succeeded.reduce((sum, r) => sum + r.syncedCount, 0);
|
|
2395
2239
|
const allFromCache = succeeded.every((r) => r.fromCache);
|
|
2396
2240
|
OutputFormatter.success({
|
|
2397
|
-
Result:
|
|
2241
|
+
Result: RESULTS.Success,
|
|
2398
2242
|
Code: "PullResourcesSuccess",
|
|
2243
|
+
...failed.length > 0 && {
|
|
2244
|
+
Warning: `${failed.length} of ${settled.length} resource types failed to pull. See Data.Errors.`
|
|
2245
|
+
},
|
|
2399
2246
|
Data: {
|
|
2400
2247
|
TotalNodesCount: totalCount,
|
|
2401
2248
|
FromCache: allFromCache,
|
|
@@ -2421,10 +2268,10 @@ Subcommands:
|
|
|
2421
2268
|
processContext.exit(1);
|
|
2422
2269
|
return;
|
|
2423
2270
|
}
|
|
2424
|
-
const { searchResources, searchResourcesWithFilters } = await import("./resourcesSyncService-
|
|
2271
|
+
const { searchResources, searchResourcesWithFilters } = await import("./resourcesSyncService-sgnkcvpt.js");
|
|
2425
2272
|
let searchResult;
|
|
2426
2273
|
if (options.filter) {
|
|
2427
|
-
const [parseError, filters] =
|
|
2274
|
+
const [parseError, filters] = catchError2(() => parseFilterString(options.filter));
|
|
2428
2275
|
if (parseError) {
|
|
2429
2276
|
OutputFormatter.error({
|
|
2430
2277
|
Result: RESULTS.Failure,
|
|
@@ -2434,7 +2281,7 @@ Subcommands:
|
|
|
2434
2281
|
processContext.exit(1);
|
|
2435
2282
|
return;
|
|
2436
2283
|
}
|
|
2437
|
-
const [searchError, searchResults] = await
|
|
2284
|
+
const [searchError, searchResults] = await catchError2(searchResourcesWithFilters(keyword, filters, options.type, {
|
|
2438
2285
|
local: options.local
|
|
2439
2286
|
}));
|
|
2440
2287
|
if (searchError) {
|
|
@@ -2443,7 +2290,7 @@ Subcommands:
|
|
|
2443
2290
|
}
|
|
2444
2291
|
searchResult = searchResults;
|
|
2445
2292
|
} else {
|
|
2446
|
-
const [searchError, searchResults] = await
|
|
2293
|
+
const [searchError, searchResults] = await catchError2(searchResources(keyword, options.type, {
|
|
2447
2294
|
local: options.local
|
|
2448
2295
|
}));
|
|
2449
2296
|
if (searchError) {
|
|
@@ -2468,11 +2315,11 @@ Subcommands:
|
|
|
2468
2315
|
}
|
|
2469
2316
|
});
|
|
2470
2317
|
});
|
|
2471
|
-
registry.command("list").description("List all resources (use pull to update list)").option("--local", "List only in-solution sibling project resources (requires a .uipx in the current directory, its parent, or grandparent). Skips the tenant cache.").examples(REGISTRY_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
2472
|
-
const { listLocalResources, listResources } = await import("./resourcesSyncService-
|
|
2318
|
+
addListWindowOptions(registry.command("list").description("List all resources (use pull to update list)")).option("--local", "List only in-solution sibling project resources (requires a .uipx in the current directory, its parent, or grandparent). Skips the tenant cache.").examples(REGISTRY_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
2319
|
+
const { listLocalResources, listResources } = await import("./resourcesSyncService-sgnkcvpt.js");
|
|
2473
2320
|
let grouped;
|
|
2474
2321
|
if (options.local) {
|
|
2475
|
-
const [localError, localGrouped] = await
|
|
2322
|
+
const [localError, localGrouped] = await catchError2(listLocalResources());
|
|
2476
2323
|
if (localError) {
|
|
2477
2324
|
OutputFormatter.error({
|
|
2478
2325
|
Result: RESULTS.Failure,
|
|
@@ -2484,7 +2331,7 @@ Subcommands:
|
|
|
2484
2331
|
}
|
|
2485
2332
|
grouped = localGrouped;
|
|
2486
2333
|
} else {
|
|
2487
|
-
const [mapError, promises] =
|
|
2334
|
+
const [mapError, promises] = catchError2(() => RESOURCE_TYPES.map((type) => listResources(type).then((resources) => ({
|
|
2488
2335
|
type,
|
|
2489
2336
|
resources
|
|
2490
2337
|
}))));
|
|
@@ -2511,13 +2358,13 @@ Subcommands:
|
|
|
2511
2358
|
Type: r.type,
|
|
2512
2359
|
Count: r.resources.length
|
|
2513
2360
|
})),
|
|
2514
|
-
resources: allResources
|
|
2361
|
+
resources: listWindow(allResources, options)
|
|
2515
2362
|
}
|
|
2516
2363
|
});
|
|
2517
2364
|
});
|
|
2518
2365
|
registry.command("get").description("Get resource(s) by identifier (entityKey or id)").argument("<identifier>", "The entityKey (process-types) or id (action-apps) of the resource").addOption(new Option("-t, --type <type>", `Limit search to a specific resource type (${GET_SEARCHABLE_TYPES.map((t) => t.type).join(", ")})`).choices(GET_SEARCHABLE_TYPES.map((t) => t.type))).option("--connection-id <id>", "Connection ID for connector-specific IS field metadata (custom fields). Only applies to typecache-* activity / trigger results.").option("--local", "Resolve the identifier against in-solution sibling project resources (requires a .uipx in the current directory, its parent, or grandparent). Skips the tenant cache. The identifier is the sibling's resource key or .uipx project Id.").examples(REGISTRY_GET_EXAMPLES).trackedAction(processContext, async (identifier, options) => {
|
|
2519
|
-
const { getResources } = await import("./resourcesSyncService-
|
|
2520
|
-
const [error, matches] = await
|
|
2366
|
+
const { getResources } = await import("./resourcesSyncService-sgnkcvpt.js");
|
|
2367
|
+
const [error, matches] = await catchError2(getResources(identifier, options.type, {
|
|
2521
2368
|
local: options.local
|
|
2522
2369
|
}));
|
|
2523
2370
|
if (error) {
|
|
@@ -2553,12 +2400,12 @@ Subcommands:
|
|
|
2553
2400
|
const id = m.resource.uiPathActivityTypeId;
|
|
2554
2401
|
if (typeof id !== "string")
|
|
2555
2402
|
return m;
|
|
2556
|
-
const { lookupTypeCacheEntry } = await import("./connector-lookup-service-
|
|
2557
|
-
const [lookupError, lookupResult] = await
|
|
2403
|
+
const { lookupTypeCacheEntry } = await import("./connector-lookup-service-0t7ydz3t.js");
|
|
2404
|
+
const [lookupError, lookupResult] = await catchError2(lookupTypeCacheEntry(id, m.resourceType));
|
|
2558
2405
|
if (lookupError)
|
|
2559
2406
|
return m;
|
|
2560
|
-
const { enrichConnectorRegistryEntry } = await import("./connector-enrichment-service-
|
|
2561
|
-
const [enrichError, definitions] = await
|
|
2407
|
+
const { enrichConnectorRegistryEntry } = await import("./connector-enrichment-service-mws6z0hw.js");
|
|
2408
|
+
const [enrichError, definitions] = await catchError2(enrichConnectorRegistryEntry(lookupResult.config, options.connectionId));
|
|
2562
2409
|
if (enrichError || definitions === null)
|
|
2563
2410
|
return m;
|
|
2564
2411
|
return {
|
|
@@ -2583,8 +2430,8 @@ Subcommands:
|
|
|
2583
2430
|
});
|
|
2584
2431
|
});
|
|
2585
2432
|
registry.command("get-connector").description(`Look up a connector activity/trigger from the local TypeCache index. ${OUTPUT_CASING_HINT}`).addOption(new Option("-t, --type <type>", "Resource type").choices([...TYPECACHE_INDEX_TYPES]).makeOptionMandatory()).requiredOption("--activity-type-id <id>", "The uiPathActivityTypeId to look up").examples(REGISTRY_GET_CONNECTOR_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
2586
|
-
const { lookupTypeCacheEntry } = await import("./connector-lookup-service-
|
|
2587
|
-
const [error, result] = await
|
|
2433
|
+
const { lookupTypeCacheEntry } = await import("./connector-lookup-service-0t7ydz3t.js");
|
|
2434
|
+
const [error, result] = await catchError2(lookupTypeCacheEntry(options.activityTypeId, options.type));
|
|
2588
2435
|
if (error) {
|
|
2589
2436
|
OutputFormatter.error({
|
|
2590
2437
|
Result: RESULTS.Failure,
|
|
@@ -2604,8 +2451,8 @@ Subcommands:
|
|
|
2604
2451
|
}, { preserveDataKeys: VERBATIM_REGISTRY_FIELDS });
|
|
2605
2452
|
});
|
|
2606
2453
|
registry.command("get-connection").description(`Look up a connector and fetch available connections from Integration Service. ${OUTPUT_CASING_HINT}`).addOption(new Option("-t, --type <type>", "Resource type").choices([...TYPECACHE_INDEX_TYPES]).makeOptionMandatory()).requiredOption("--activity-type-id <id>", "The uiPathActivityTypeId to look up").examples(REGISTRY_GET_CONNECTION_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
2607
|
-
const { fetchConnectorConnections, lookupTypeCacheEntry } = await import("./connector-lookup-service-
|
|
2608
|
-
const [lookupError, lookupResult] = await
|
|
2454
|
+
const { fetchConnectorConnections, lookupTypeCacheEntry } = await import("./connector-lookup-service-0t7ydz3t.js");
|
|
2455
|
+
const [lookupError, lookupResult] = await catchError2(lookupTypeCacheEntry(options.activityTypeId, options.type));
|
|
2609
2456
|
if (lookupError) {
|
|
2610
2457
|
OutputFormatter.error({
|
|
2611
2458
|
Result: RESULTS.Failure,
|
|
@@ -2615,7 +2462,7 @@ Subcommands:
|
|
|
2615
2462
|
processContext.exit(1);
|
|
2616
2463
|
return;
|
|
2617
2464
|
}
|
|
2618
|
-
const [fetchError, connections] = await
|
|
2465
|
+
const [fetchError, connections] = await catchError2(fetchConnectorConnections(lookupResult.config.connectorKey));
|
|
2619
2466
|
if (fetchError) {
|
|
2620
2467
|
OutputFormatter.error({
|
|
2621
2468
|
Result: RESULTS.Failure,
|
|
@@ -2637,6 +2484,58 @@ Subcommands:
|
|
|
2637
2484
|
});
|
|
2638
2485
|
};
|
|
2639
2486
|
|
|
2487
|
+
// src/commands/rule-types.ts
|
|
2488
|
+
var RULE_TYPES_LIST_EXAMPLES = [
|
|
2489
|
+
{
|
|
2490
|
+
Description: "List the rule types each case condition slot takes, and the ones the schema accepts that no slot lists",
|
|
2491
|
+
Command: "uip maestro case rule-types list --output json",
|
|
2492
|
+
Output: {
|
|
2493
|
+
Code: "RuleTypeList",
|
|
2494
|
+
Data: {
|
|
2495
|
+
Scopes: [
|
|
2496
|
+
{
|
|
2497
|
+
Scope: "task-entry",
|
|
2498
|
+
Validated: true,
|
|
2499
|
+
RuleTypes: [{ Type: "current-stage-entered" }]
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
Scope: "stage-completion",
|
|
2503
|
+
Validated: false,
|
|
2504
|
+
MarksComplete: true,
|
|
2505
|
+
RuleTypes: [{ Type: "required-tasks-completed" }]
|
|
2506
|
+
}
|
|
2507
|
+
],
|
|
2508
|
+
Unscoped: []
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
];
|
|
2513
|
+
var registerRuleTypesCommand = (program) => {
|
|
2514
|
+
const ruleTypes = program.command("rule-types").description("The case condition rule types: which rule each condition slot takes.");
|
|
2515
|
+
ruleTypes.command("list").description("List the rule types each case condition slot takes (`Scopes`; an exit slot appears twice, once per `MarksComplete` value, since only a completion condition takes the `required-*` rules), and the rule types the case schema accepts that no slot lists (`Unscoped`). `Validated` says whether `case validate` reports a rule outside the list: stage entry on the default, --strict and --skeleton-v2 profiles, task entry on the default and --strict ones, and no exit slot on any. Reads nothing from the tenant.").examples(RULE_TYPES_LIST_EXAMPLES).trackedAction(processContext, async () => {
|
|
2516
|
+
const [error, declaration] = await catchError2((async () => {
|
|
2517
|
+
const { ruleTypeDeclaration } = await import("./rule-type-declaration-s2nxpcfy.js");
|
|
2518
|
+
return ruleTypeDeclaration();
|
|
2519
|
+
})());
|
|
2520
|
+
if (error) {
|
|
2521
|
+
OutputFormatter.error({
|
|
2522
|
+
Result: RESULTS.Failure,
|
|
2523
|
+
ErrorCode: "unknown_error",
|
|
2524
|
+
Retry: "RetryWillNotFix",
|
|
2525
|
+
Message: `Could not read the rule type declaration: ${error.message}`,
|
|
2526
|
+
Instructions: "The installed case tool is incomplete. Run `uip tools update maestro`, then re-run."
|
|
2527
|
+
});
|
|
2528
|
+
processContext.exit(1);
|
|
2529
|
+
return;
|
|
2530
|
+
}
|
|
2531
|
+
OutputFormatter.success({
|
|
2532
|
+
Result: RESULTS.Success,
|
|
2533
|
+
Code: "RuleTypeList",
|
|
2534
|
+
Data: declaration
|
|
2535
|
+
});
|
|
2536
|
+
});
|
|
2537
|
+
};
|
|
2538
|
+
|
|
2640
2539
|
// src/commands/sdd.ts
|
|
2641
2540
|
var reportReadFailure = (file, error) => {
|
|
2642
2541
|
OutputFormatter.error({
|
|
@@ -2733,7 +2632,7 @@ var SDD_CONVERT_EXAMPLES = [
|
|
|
2733
2632
|
var registerSddCommand = (program) => {
|
|
2734
2633
|
const sdd = program.command("sdd").description("Read and inspect a Solution Design Document (sdd.md) — the document `validate --sdd` audits a case plan against.");
|
|
2735
2634
|
sdd.command("parse").description("Print the structured model parsed out of an sdd.md, as JSON. Reads the document only: it audits nothing and needs no case plan. Fields under `intake` describe the read (row counts, whether a section was seen, parser notes) rather than the document.").argument("<file>", "Path to the sdd.md to read").examples(SDD_PARSE_EXAMPLES).trackedAction(processContext, async (file) => {
|
|
2736
|
-
const { getFileSystemAsync } = await import("./index-
|
|
2635
|
+
const { getFileSystemAsync } = await import("./index-21kns9qg.js");
|
|
2737
2636
|
const fs = await getFileSystemAsync();
|
|
2738
2637
|
if (!await fs.exists(file)) {
|
|
2739
2638
|
OutputFormatter.error({
|
|
@@ -2746,13 +2645,13 @@ var registerSddCommand = (program) => {
|
|
|
2746
2645
|
processContext.exit(1);
|
|
2747
2646
|
return;
|
|
2748
2647
|
}
|
|
2749
|
-
const [readError, text] = await
|
|
2648
|
+
const [readError, text] = await catchError2(fs.readFile(file, "utf-8"));
|
|
2750
2649
|
if (readError || text === null) {
|
|
2751
2650
|
reportReadFailure(file, readError);
|
|
2752
2651
|
return;
|
|
2753
2652
|
}
|
|
2754
|
-
const { parseSddToJson } = await import("./strict-sdd-audit-
|
|
2755
|
-
const [parseError, model] =
|
|
2653
|
+
const { parseSddToJson } = await import("./strict-sdd-audit-bp7fq2tg.js");
|
|
2654
|
+
const [parseError, model] = catchError2(() => parseSddToJson(text));
|
|
2756
2655
|
if (parseError) {
|
|
2757
2656
|
reportParseFailure(file, parseError);
|
|
2758
2657
|
return;
|
|
@@ -2764,7 +2663,7 @@ var registerSddCommand = (program) => {
|
|
|
2764
2663
|
}, { preserveDataKeys: ["model"] });
|
|
2765
2664
|
});
|
|
2766
2665
|
sdd.command("resolve").description("Resolve an sdd.md's task resources against the caches `registry pull` wrote. Does the part of the registry gate that has one right answer — which index a task type uses, the exact-name search, the folder narrowing — and reports the part that does not: a name matching several resources is left for a person to choose between, and a name matching none is grouped for one batched question. Reads caches only: no tenant, no network.").argument("<file>", "Path to the sdd.md to resolve").option("--out <file>", "Write the resolved file to this path instead of printing it").examples(SDD_RESOLVE_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
2767
|
-
const { getFileSystemAsync } = await import("./index-
|
|
2666
|
+
const { getFileSystemAsync } = await import("./index-21kns9qg.js");
|
|
2768
2667
|
const fs = await getFileSystemAsync();
|
|
2769
2668
|
if (!await fs.exists(file)) {
|
|
2770
2669
|
OutputFormatter.error({
|
|
@@ -2777,20 +2676,20 @@ var registerSddCommand = (program) => {
|
|
|
2777
2676
|
processContext.exit(1);
|
|
2778
2677
|
return;
|
|
2779
2678
|
}
|
|
2780
|
-
const [readError, text] = await
|
|
2679
|
+
const [readError, text] = await catchError2(fs.readFile(file, "utf-8"));
|
|
2781
2680
|
if (readError || text === null) {
|
|
2782
2681
|
reportReadFailure(file, readError);
|
|
2783
2682
|
return;
|
|
2784
2683
|
}
|
|
2785
|
-
const { parseSddToJson } = await import("./strict-sdd-audit-
|
|
2786
|
-
const { resolveCacheFiles, resolveSddResources } = await import("./sdd-resolve-service-
|
|
2787
|
-
const { loadSiblings } = await import("./sdd-resolve-siblings-
|
|
2788
|
-
const [parseError, model] =
|
|
2684
|
+
const { parseSddToJson } = await import("./strict-sdd-audit-bp7fq2tg.js");
|
|
2685
|
+
const { resolveCacheFiles, resolveSddResources } = await import("./sdd-resolve-service-6nt10vhq.js");
|
|
2686
|
+
const { loadSiblings } = await import("./sdd-resolve-siblings-5q28qcw8.js");
|
|
2687
|
+
const [parseError, model] = catchError2(() => parseSddToJson(text));
|
|
2789
2688
|
if (parseError) {
|
|
2790
2689
|
reportParseFailure(file, parseError);
|
|
2791
2690
|
return;
|
|
2792
2691
|
}
|
|
2793
|
-
const [siblingError, siblings] = await
|
|
2692
|
+
const [siblingError, siblings] = await catchError2(loadSiblings(resolveCacheFiles()));
|
|
2794
2693
|
if (siblingError) {
|
|
2795
2694
|
OutputFormatter.error({
|
|
2796
2695
|
Result: RESULTS.Failure,
|
|
@@ -2814,7 +2713,7 @@ var registerSddCommand = (program) => {
|
|
|
2814
2713
|
unresolved: result.unresolved,
|
|
2815
2714
|
scope: result.scope
|
|
2816
2715
|
};
|
|
2817
|
-
const [writeError] = await
|
|
2716
|
+
const [writeError] = await catchError2(fs.writeFile(options.out, `${JSON.stringify(payload, null, 2)}
|
|
2818
2717
|
`));
|
|
2819
2718
|
if (writeError) {
|
|
2820
2719
|
OutputFormatter.error({
|
|
@@ -2827,7 +2726,7 @@ var registerSddCommand = (program) => {
|
|
|
2827
2726
|
return;
|
|
2828
2727
|
}
|
|
2829
2728
|
}
|
|
2830
|
-
const { staleCacheWarning } = await import("./sdd-resolve-service-
|
|
2729
|
+
const { staleCacheWarning } = await import("./sdd-resolve-service-6nt10vhq.js");
|
|
2831
2730
|
const warnings = [
|
|
2832
2731
|
...result.scope.missingIndexes.map((missing) => `The \`${missing}\` index is not pulled, so tasks needing it were not searched. Run \`uip maestro case registry pull\`.`),
|
|
2833
2732
|
staleCacheWarning(result.scope.cache)
|
|
@@ -2864,7 +2763,7 @@ var registerSddCommand = (program) => {
|
|
|
2864
2763
|
});
|
|
2865
2764
|
});
|
|
2866
2765
|
sdd.command("convert").description("Emit a case plan from an sdd.md. Writes only what the document determines and reports what it does not — a resource that has to be resolved against a tenant, a cross-task reference, a connector's connection. The result is checked with `case validate`, not here.").argument("<file>", "Path to the sdd.md to convert").option("--out <file>", "Write the case plan to this path instead of printing it").option("--resolved <file>", "Read a `sdd resolve` file and use it to fill a resource name or folder the document left out").examples(SDD_CONVERT_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
2867
|
-
const { getFileSystemAsync } = await import("./index-
|
|
2766
|
+
const { getFileSystemAsync } = await import("./index-21kns9qg.js");
|
|
2868
2767
|
const fs = await getFileSystemAsync();
|
|
2869
2768
|
if (!await fs.exists(file)) {
|
|
2870
2769
|
OutputFormatter.error({
|
|
@@ -2877,17 +2776,17 @@ var registerSddCommand = (program) => {
|
|
|
2877
2776
|
processContext.exit(1);
|
|
2878
2777
|
return;
|
|
2879
2778
|
}
|
|
2880
|
-
const [readError, text] = await
|
|
2779
|
+
const [readError, text] = await catchError2(fs.readFile(file, "utf-8"));
|
|
2881
2780
|
if (readError || text === null) {
|
|
2882
2781
|
reportReadFailure(file, readError);
|
|
2883
2782
|
return;
|
|
2884
2783
|
}
|
|
2885
|
-
const { parseSddToJson } = await import("./strict-sdd-audit-
|
|
2886
|
-
const { convertSddToCasePlan } = await import("./sdd-convert-service-
|
|
2784
|
+
const { parseSddToJson } = await import("./strict-sdd-audit-bp7fq2tg.js");
|
|
2785
|
+
const { convertSddToCasePlan } = await import("./sdd-convert-service-ffbx00k6.js");
|
|
2887
2786
|
let resolved;
|
|
2888
2787
|
let resolvedEntries = [];
|
|
2889
2788
|
if (options.resolved !== undefined) {
|
|
2890
|
-
const [resolvedError, resolvedText] = await
|
|
2789
|
+
const [resolvedError, resolvedText] = await catchError2(fs.readFile(options.resolved, "utf-8"));
|
|
2891
2790
|
if (resolvedError || resolvedText === null) {
|
|
2892
2791
|
OutputFormatter.error({
|
|
2893
2792
|
Result: RESULTS.Failure,
|
|
@@ -2899,13 +2798,13 @@ var registerSddCommand = (program) => {
|
|
|
2899
2798
|
processContext.exit(1);
|
|
2900
2799
|
return;
|
|
2901
2800
|
}
|
|
2902
|
-
const [
|
|
2903
|
-
if (
|
|
2801
|
+
const [parseError, parsed] = catchError2(() => JSON.parse(resolvedText));
|
|
2802
|
+
if (parseError || parsed === null) {
|
|
2904
2803
|
OutputFormatter.error({
|
|
2905
2804
|
Result: RESULTS.Failure,
|
|
2906
2805
|
ErrorCode: "invalid_argument",
|
|
2907
2806
|
Retry: "RetryWillNotFix",
|
|
2908
|
-
Message: `${options.resolved} is not valid JSON: ${
|
|
2807
|
+
Message: `${options.resolved} is not valid JSON: ${parseError?.message ?? "empty"}`,
|
|
2909
2808
|
Instructions: `Write it with \`uip maestro case sdd resolve ${file} --out ${options.resolved}\`.`
|
|
2910
2809
|
});
|
|
2911
2810
|
processContext.exit(1);
|
|
@@ -2947,7 +2846,7 @@ var registerSddCommand = (program) => {
|
|
|
2947
2846
|
processContext.exit(1);
|
|
2948
2847
|
return;
|
|
2949
2848
|
}
|
|
2950
|
-
const { isDeferredEntry } = await import("./resolved-check-
|
|
2849
|
+
const { isDeferredEntry } = await import("./resolved-check-dz8eqrf6.js");
|
|
2951
2850
|
const deferred = new Set;
|
|
2952
2851
|
for (const entry of entries ?? []) {
|
|
2953
2852
|
if (isDeferredEntry(entry)) {
|
|
@@ -2968,12 +2867,12 @@ var registerSddCommand = (program) => {
|
|
|
2968
2867
|
resolved = { byTask, deferred };
|
|
2969
2868
|
resolvedEntries = entries ?? [];
|
|
2970
2869
|
}
|
|
2971
|
-
const [parseError, model] =
|
|
2870
|
+
const [parseError, model] = catchError2(() => parseSddToJson(text));
|
|
2972
2871
|
if (parseError) {
|
|
2973
2872
|
reportParseFailure(file, parseError);
|
|
2974
2873
|
return;
|
|
2975
2874
|
}
|
|
2976
|
-
const { staleResolvedEntry } = await import("./resolved-check-
|
|
2875
|
+
const { staleResolvedEntry } = await import("./resolved-check-dz8eqrf6.js");
|
|
2977
2876
|
const stale = staleResolvedEntry(model, resolvedEntries);
|
|
2978
2877
|
if (stale !== undefined) {
|
|
2979
2878
|
OutputFormatter.error({
|
|
@@ -2990,7 +2889,7 @@ var registerSddCommand = (program) => {
|
|
|
2990
2889
|
const fallback = fromFile === "" ? "case" : fromFile;
|
|
2991
2890
|
const result = convertSddToCasePlan(model, {
|
|
2992
2891
|
name: model.caseName ?? fallback,
|
|
2993
|
-
schemaVersion: await
|
|
2892
|
+
schemaVersion: await resolveCaseSchemaWriteVersion2(),
|
|
2994
2893
|
...model.caseDescription !== undefined && {
|
|
2995
2894
|
description: model.caseDescription
|
|
2996
2895
|
},
|
|
@@ -3001,7 +2900,7 @@ var registerSddCommand = (program) => {
|
|
|
3001
2900
|
correctedConvert,
|
|
3002
2901
|
otherPlanInProject,
|
|
3003
2902
|
projectsBelowOut
|
|
3004
|
-
} = await import("./out-target-
|
|
2903
|
+
} = await import("./out-target-eqsttq1k.js");
|
|
3005
2904
|
const meant = await projectsBelowOut(fs, options.out);
|
|
3006
2905
|
if (meant.length > 0) {
|
|
3007
2906
|
const corrected = meant.length === 1 ? correctedConvert(file, meant[0], options.resolved) : undefined;
|
|
@@ -3015,7 +2914,7 @@ var registerSddCommand = (program) => {
|
|
|
3015
2914
|
processContext.exit(1);
|
|
3016
2915
|
return;
|
|
3017
2916
|
}
|
|
3018
|
-
const [listError, plan] = await
|
|
2917
|
+
const [listError, plan] = await catchError2(otherPlanInProject(fs, options.out));
|
|
3019
2918
|
if (listError) {
|
|
3020
2919
|
OutputFormatter.error({
|
|
3021
2920
|
Result: RESULTS.Failure,
|
|
@@ -3039,7 +2938,7 @@ var registerSddCommand = (program) => {
|
|
|
3039
2938
|
processContext.exit(1);
|
|
3040
2939
|
return;
|
|
3041
2940
|
}
|
|
3042
|
-
const { stampFromEntryPointsBeside } = await import("./trigger-entry-point-id-
|
|
2941
|
+
const { stampFromEntryPointsBeside } = await import("./trigger-entry-point-id-751v48qd.js");
|
|
3043
2942
|
const stamped = await stampFromEntryPointsBeside(result.document, options.out);
|
|
3044
2943
|
if ("error" in stamped) {
|
|
3045
2944
|
OutputFormatter.error({
|
|
@@ -3052,20 +2951,20 @@ var registerSddCommand = (program) => {
|
|
|
3052
2951
|
processContext.exit(1);
|
|
3053
2952
|
return;
|
|
3054
2953
|
}
|
|
3055
|
-
const {
|
|
3056
|
-
const carried = await
|
|
3057
|
-
if (
|
|
2954
|
+
const { carryFromPlanAt } = await import("./carry-forward-sfdnta6q.js");
|
|
2955
|
+
const carried = await carryFromPlanAt(result.document, options.out, result.unresolved, model.personas.map((persona) => persona.name));
|
|
2956
|
+
if ("error" in carried) {
|
|
3058
2957
|
OutputFormatter.error({
|
|
3059
2958
|
Result: RESULTS.Failure,
|
|
3060
2959
|
ErrorCode: "unknown_error",
|
|
3061
2960
|
Retry: "RetryWillNotFix",
|
|
3062
2961
|
Message: carried.error,
|
|
3063
|
-
Instructions: `Fix ${options.out}, or move it aside to convert from scratch, then re-run. ${options.out} was not written: its sticky notes may hold edits made in the Case Designer.`
|
|
2962
|
+
Instructions: `Fix ${options.out}, or move it aside to convert from scratch, then re-run. ${options.out} was not written: its sticky notes and case roles may hold edits made in the Case Designer.`
|
|
3064
2963
|
});
|
|
3065
2964
|
processContext.exit(1);
|
|
3066
2965
|
return;
|
|
3067
2966
|
}
|
|
3068
|
-
const [writeError] = await
|
|
2967
|
+
const [writeError] = await catchError2(fs.writeFile(options.out, `${JSON.stringify(result.document, null, 2)}
|
|
3069
2968
|
`));
|
|
3070
2969
|
if (writeError) {
|
|
3071
2970
|
OutputFormatter.error({
|
|
@@ -3298,7 +3197,7 @@ function getTargetData(schema, stageId) {
|
|
|
3298
3197
|
var registerSlaCommand = (program) => {
|
|
3299
3198
|
const sla = program.command("sla").description("Manage SLA settings and escalation rules for case definitions");
|
|
3300
3199
|
sla.command("set", { hidden: true }).description("Set or update the SLA value on a case (root level) or a specific stage").argument("<file>", "Path to the case management JSON file").option("--stage-id <stageId>", "Stage ID to set the SLA on (omit for root-level SLA)").requiredOption("--count <count>", "SLA duration count (positive integer)").requiredOption("--unit <unit>", "SLA duration unit: min (minutes), h (hours), d (days), w (weeks), m (months)").examples(SLA_SET_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
3301
|
-
const [parseError, parsed] =
|
|
3200
|
+
const [parseError, parsed] = catchError2(() => ({
|
|
3302
3201
|
count: validateCount(options.count),
|
|
3303
3202
|
unit: validateUnit(options.unit)
|
|
3304
3203
|
}));
|
|
@@ -3311,7 +3210,7 @@ var registerSlaCommand = (program) => {
|
|
|
3311
3210
|
processContext.exit(1);
|
|
3312
3211
|
return;
|
|
3313
3212
|
}
|
|
3314
|
-
const [readError, schema] = await
|
|
3213
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
3315
3214
|
if (readError) {
|
|
3316
3215
|
OutputFormatter.error({
|
|
3317
3216
|
Result: RESULTS.Failure,
|
|
@@ -3321,7 +3220,7 @@ var registerSlaCommand = (program) => {
|
|
|
3321
3220
|
processContext.exit(1);
|
|
3322
3221
|
return;
|
|
3323
3222
|
}
|
|
3324
|
-
const [findError, targetData] =
|
|
3223
|
+
const [findError, targetData] = catchError2(() => getTargetData(schema, options.stageId));
|
|
3325
3224
|
if (findError) {
|
|
3326
3225
|
OutputFormatter.error({
|
|
3327
3226
|
Result: RESULTS.Failure,
|
|
@@ -3331,11 +3230,11 @@ var registerSlaCommand = (program) => {
|
|
|
3331
3230
|
processContext.exit(1);
|
|
3332
3231
|
return;
|
|
3333
3232
|
}
|
|
3334
|
-
const
|
|
3335
|
-
const defaultRule = getOrCreateDefaultRule(
|
|
3233
|
+
const slaRules = ensureSlaRules(targetData);
|
|
3234
|
+
const defaultRule = getOrCreateDefaultRule(slaRules);
|
|
3336
3235
|
defaultRule.count = parsed.count;
|
|
3337
3236
|
defaultRule.unit = parsed.unit;
|
|
3338
|
-
const [writeError] = await
|
|
3237
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
3339
3238
|
if (writeError) {
|
|
3340
3239
|
OutputFormatter.error({
|
|
3341
3240
|
Result: RESULTS.Failure,
|
|
@@ -3357,7 +3256,7 @@ var registerSlaCommand = (program) => {
|
|
|
3357
3256
|
});
|
|
3358
3257
|
});
|
|
3359
3258
|
sla.command("get").description("Get the current SLA settings for a case (root level) or a specific stage").argument("<file>", "Path to the case management JSON file").option("--stage-id <stageId>", "Stage ID to get the SLA from (omit for root-level SLA)").examples(SLA_GET_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
3360
|
-
const [readError, schema] = await
|
|
3259
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
3361
3260
|
if (readError) {
|
|
3362
3261
|
OutputFormatter.error({
|
|
3363
3262
|
Result: RESULTS.Failure,
|
|
@@ -3367,7 +3266,7 @@ var registerSlaCommand = (program) => {
|
|
|
3367
3266
|
processContext.exit(1);
|
|
3368
3267
|
return;
|
|
3369
3268
|
}
|
|
3370
|
-
const [findError, targetData] =
|
|
3269
|
+
const [findError, targetData] = catchError2(() => getTargetData(schema, options.stageId));
|
|
3371
3270
|
if (findError) {
|
|
3372
3271
|
OutputFormatter.error({
|
|
3373
3272
|
Result: RESULTS.Failure,
|
|
@@ -3377,12 +3276,12 @@ var registerSlaCommand = (program) => {
|
|
|
3377
3276
|
processContext.exit(1);
|
|
3378
3277
|
return;
|
|
3379
3278
|
}
|
|
3380
|
-
let
|
|
3381
|
-
if (
|
|
3279
|
+
let slaRules = targetData.slaRules ?? [];
|
|
3280
|
+
if (slaRules.length === 0) {
|
|
3382
3281
|
const rawData = options.stageId ? requireStageForSla(schema, options.stageId).data : schema.metadata;
|
|
3383
3282
|
const legacySla = rawData?.sla;
|
|
3384
3283
|
if (legacySla) {
|
|
3385
|
-
|
|
3284
|
+
slaRules = [
|
|
3386
3285
|
{
|
|
3387
3286
|
expression: DEFAULT_SLA_EXPRESSION,
|
|
3388
3287
|
count: legacySla.count,
|
|
@@ -3397,12 +3296,12 @@ var registerSlaCommand = (program) => {
|
|
|
3397
3296
|
Code: "SlaFound",
|
|
3398
3297
|
Data: {
|
|
3399
3298
|
Target: options.stageId ?? "root",
|
|
3400
|
-
SlaRules:
|
|
3299
|
+
SlaRules: slaRules
|
|
3401
3300
|
}
|
|
3402
3301
|
});
|
|
3403
3302
|
});
|
|
3404
3303
|
sla.command("remove", { hidden: true }).description("Remove the SLA value from a case (root level) or a specific stage").argument("<file>", "Path to the case management JSON file").option("--stage-id <stageId>", "Stage ID to remove the SLA from (omit for root-level SLA)").examples(SLA_REMOVE_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
3405
|
-
const [readError, schema] = await
|
|
3304
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
3406
3305
|
if (readError) {
|
|
3407
3306
|
OutputFormatter.error({
|
|
3408
3307
|
Result: RESULTS.Failure,
|
|
@@ -3412,7 +3311,7 @@ var registerSlaCommand = (program) => {
|
|
|
3412
3311
|
processContext.exit(1);
|
|
3413
3312
|
return;
|
|
3414
3313
|
}
|
|
3415
|
-
const [findError, targetData] =
|
|
3314
|
+
const [findError, targetData] = catchError2(() => getTargetData(schema, options.stageId));
|
|
3416
3315
|
if (findError) {
|
|
3417
3316
|
OutputFormatter.error({
|
|
3418
3317
|
Result: RESULTS.Failure,
|
|
@@ -3423,7 +3322,7 @@ var registerSlaCommand = (program) => {
|
|
|
3423
3322
|
return;
|
|
3424
3323
|
}
|
|
3425
3324
|
targetData.slaRules = undefined;
|
|
3426
|
-
const [writeError] = await
|
|
3325
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
3427
3326
|
if (writeError) {
|
|
3428
3327
|
OutputFormatter.error({
|
|
3429
3328
|
Result: RESULTS.Failure,
|
|
@@ -3471,7 +3370,7 @@ var registerSlaCommand = (program) => {
|
|
|
3471
3370
|
processContext.exit(1);
|
|
3472
3371
|
return;
|
|
3473
3372
|
}
|
|
3474
|
-
const [readError, schema] = await
|
|
3373
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
3475
3374
|
if (readError) {
|
|
3476
3375
|
OutputFormatter.error({
|
|
3477
3376
|
Result: RESULTS.Failure,
|
|
@@ -3500,7 +3399,7 @@ var registerSlaCommand = (program) => {
|
|
|
3500
3399
|
} : {}
|
|
3501
3400
|
}
|
|
3502
3401
|
};
|
|
3503
|
-
const [findError, targetData] =
|
|
3402
|
+
const [findError, targetData] = catchError2(() => getTargetData(schema, options.stageId));
|
|
3504
3403
|
if (findError) {
|
|
3505
3404
|
OutputFormatter.error({
|
|
3506
3405
|
Result: RESULTS.Failure,
|
|
@@ -3510,13 +3409,13 @@ var registerSlaCommand = (program) => {
|
|
|
3510
3409
|
processContext.exit(1);
|
|
3511
3410
|
return;
|
|
3512
3411
|
}
|
|
3513
|
-
const
|
|
3514
|
-
const defaultRule = getOrCreateDefaultRule(
|
|
3412
|
+
const slaRules = ensureSlaRules(targetData);
|
|
3413
|
+
const defaultRule = getOrCreateDefaultRule(slaRules);
|
|
3515
3414
|
if (!defaultRule.escalationRule) {
|
|
3516
3415
|
defaultRule.escalationRule = [];
|
|
3517
3416
|
}
|
|
3518
3417
|
defaultRule.escalationRule.push(escalationRule);
|
|
3519
|
-
const [writeError] = await
|
|
3418
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
3520
3419
|
if (writeError) {
|
|
3521
3420
|
OutputFormatter.error({
|
|
3522
3421
|
Result: RESULTS.Failure,
|
|
@@ -3538,8 +3437,8 @@ var registerSlaCommand = (program) => {
|
|
|
3538
3437
|
}
|
|
3539
3438
|
});
|
|
3540
3439
|
});
|
|
3541
|
-
escalation.command("list").description("List all escalation rules on an SLA").argument("<file>", "Path to the case management JSON file").option("--stage-id <stageId>", "Stage ID to list escalations from (omit for root-level SLA)").examples(SLA_ESCALATION_LIST_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
3542
|
-
const [readError, schema] = await
|
|
3440
|
+
addListWindowOptions(escalation.command("list").description("List all escalation rules on an SLA").argument("<file>", "Path to the case management JSON file")).option("--stage-id <stageId>", "Stage ID to list escalations from (omit for root-level SLA)").examples(SLA_ESCALATION_LIST_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
3441
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
3543
3442
|
if (readError) {
|
|
3544
3443
|
OutputFormatter.error({
|
|
3545
3444
|
Result: RESULTS.Failure,
|
|
@@ -3549,7 +3448,7 @@ var registerSlaCommand = (program) => {
|
|
|
3549
3448
|
processContext.exit(1);
|
|
3550
3449
|
return;
|
|
3551
3450
|
}
|
|
3552
|
-
const [findError, targetData] =
|
|
3451
|
+
const [findError, targetData] = catchError2(() => getTargetData(schema, options.stageId));
|
|
3553
3452
|
if (findError) {
|
|
3554
3453
|
OutputFormatter.error({
|
|
3555
3454
|
Result: RESULTS.Failure,
|
|
@@ -3565,12 +3464,12 @@ var registerSlaCommand = (program) => {
|
|
|
3565
3464
|
Code: "EscalationRulesList",
|
|
3566
3465
|
Data: {
|
|
3567
3466
|
Target: options.stageId ?? "root",
|
|
3568
|
-
EscalationRules: defaultRule?.escalationRule ?? []
|
|
3467
|
+
EscalationRules: listWindow(defaultRule?.escalationRule ?? [], options)
|
|
3569
3468
|
}
|
|
3570
3469
|
});
|
|
3571
3470
|
});
|
|
3572
3471
|
escalation.command("remove", { hidden: true }).description("Remove an escalation rule from an SLA by its ID").argument("<file>", "Path to the case management JSON file").argument("<escalation-id>", "ID of the escalation rule to remove").option("--stage-id <stageId>", "Stage ID to remove escalation from (omit for root-level SLA)").examples(SLA_ESCALATION_REMOVE_EXAMPLES).trackedAction(processContext, async (file, escalationId, options) => {
|
|
3573
|
-
const [readError, schema] = await
|
|
3472
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
3574
3473
|
if (readError) {
|
|
3575
3474
|
OutputFormatter.error({
|
|
3576
3475
|
Result: RESULTS.Failure,
|
|
@@ -3580,7 +3479,7 @@ var registerSlaCommand = (program) => {
|
|
|
3580
3479
|
processContext.exit(1);
|
|
3581
3480
|
return;
|
|
3582
3481
|
}
|
|
3583
|
-
const [findError, targetData] =
|
|
3482
|
+
const [findError, targetData] = catchError2(() => getTargetData(schema, options.stageId));
|
|
3584
3483
|
if (findError) {
|
|
3585
3484
|
OutputFormatter.error({
|
|
3586
3485
|
Result: RESULTS.Failure,
|
|
@@ -3612,7 +3511,7 @@ var registerSlaCommand = (program) => {
|
|
|
3612
3511
|
return;
|
|
3613
3512
|
}
|
|
3614
3513
|
escalationRules.splice(ruleIndex, 1);
|
|
3615
|
-
const [writeError] = await
|
|
3514
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
3616
3515
|
if (writeError) {
|
|
3617
3516
|
OutputFormatter.error({
|
|
3618
3517
|
Result: RESULTS.Failure,
|
|
@@ -3634,7 +3533,7 @@ var registerSlaCommand = (program) => {
|
|
|
3634
3533
|
});
|
|
3635
3534
|
const slaRules = sla.command("rules").description("Manage conditional SLA rules (expression-based) at the case root level");
|
|
3636
3535
|
slaRules.command("add", { hidden: true }).description("Add a conditional SLA rule to the case root").argument("<file>", "Path to the case management JSON file").requiredOption("--expression <expression>", "Condition expression for the SLA rule").requiredOption("--count <count>", "SLA duration count (positive integer)").requiredOption("--unit <unit>", "SLA duration unit: min (minutes), h (hours), d (days), w (weeks), m (months)").examples(SLA_RULES_ADD_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
3637
|
-
const [parseError, parsed] =
|
|
3536
|
+
const [parseError, parsed] = catchError2(() => ({
|
|
3638
3537
|
count: validateCount(options.count),
|
|
3639
3538
|
unit: validateUnit(options.unit)
|
|
3640
3539
|
}));
|
|
@@ -3647,7 +3546,7 @@ var registerSlaCommand = (program) => {
|
|
|
3647
3546
|
processContext.exit(1);
|
|
3648
3547
|
return;
|
|
3649
3548
|
}
|
|
3650
|
-
const [readError, schema] = await
|
|
3549
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
3651
3550
|
if (readError) {
|
|
3652
3551
|
OutputFormatter.error({
|
|
3653
3552
|
Result: RESULTS.Failure,
|
|
@@ -3658,19 +3557,19 @@ var registerSlaCommand = (program) => {
|
|
|
3658
3557
|
return;
|
|
3659
3558
|
}
|
|
3660
3559
|
const data = ensureRootData(schema);
|
|
3661
|
-
const
|
|
3560
|
+
const slaRules = ensureSlaRules(data);
|
|
3662
3561
|
const rule = {
|
|
3663
3562
|
expression: options.expression,
|
|
3664
3563
|
count: parsed.count,
|
|
3665
3564
|
unit: parsed.unit
|
|
3666
3565
|
};
|
|
3667
|
-
const defaultIdx =
|
|
3566
|
+
const defaultIdx = slaRules.findIndex((r) => r.expression === DEFAULT_SLA_EXPRESSION);
|
|
3668
3567
|
if (defaultIdx >= 0) {
|
|
3669
|
-
|
|
3568
|
+
slaRules.splice(defaultIdx, 0, rule);
|
|
3670
3569
|
} else {
|
|
3671
|
-
|
|
3570
|
+
slaRules.unshift(rule);
|
|
3672
3571
|
}
|
|
3673
|
-
const [writeError] = await
|
|
3572
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
3674
3573
|
if (writeError) {
|
|
3675
3574
|
OutputFormatter.error({
|
|
3676
3575
|
Result: RESULTS.Failure,
|
|
@@ -3691,8 +3590,8 @@ var registerSlaCommand = (program) => {
|
|
|
3691
3590
|
}
|
|
3692
3591
|
});
|
|
3693
3592
|
});
|
|
3694
|
-
slaRules.command("list").description("List all conditional SLA rules at the case root level").argument("<file>", "Path to the case management JSON file").examples(SLA_RULES_LIST_EXAMPLES).trackedAction(processContext, async (file) => {
|
|
3695
|
-
const [readError, schema] = await
|
|
3593
|
+
addListWindowOptions(slaRules.command("list").description("List all conditional SLA rules at the case root level").argument("<file>", "Path to the case management JSON file")).examples(SLA_RULES_LIST_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
3594
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
3696
3595
|
if (readError) {
|
|
3697
3596
|
OutputFormatter.error({
|
|
3698
3597
|
Result: RESULTS.Failure,
|
|
@@ -3706,7 +3605,7 @@ var registerSlaCommand = (program) => {
|
|
|
3706
3605
|
Result: RESULTS.Success,
|
|
3707
3606
|
Code: "SlaRulesList",
|
|
3708
3607
|
Data: {
|
|
3709
|
-
SlaRules: schema.metadata?.slaRules ?? []
|
|
3608
|
+
SlaRules: listWindow(schema.metadata?.slaRules ?? [], options)
|
|
3710
3609
|
}
|
|
3711
3610
|
});
|
|
3712
3611
|
});
|
|
@@ -3721,7 +3620,7 @@ var registerSlaCommand = (program) => {
|
|
|
3721
3620
|
processContext.exit(1);
|
|
3722
3621
|
return;
|
|
3723
3622
|
}
|
|
3724
|
-
const [readError, schema] = await
|
|
3623
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
3725
3624
|
if (readError) {
|
|
3726
3625
|
OutputFormatter.error({
|
|
3727
3626
|
Result: RESULTS.Failure,
|
|
@@ -3752,7 +3651,7 @@ var registerSlaCommand = (program) => {
|
|
|
3752
3651
|
return;
|
|
3753
3652
|
}
|
|
3754
3653
|
const removed = rules.splice(index, 1)[0];
|
|
3755
|
-
const [writeError] = await
|
|
3654
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
3756
3655
|
if (writeError) {
|
|
3757
3656
|
OutputFormatter.error({
|
|
3758
3657
|
Result: RESULTS.Failure,
|
|
@@ -3837,11 +3736,11 @@ var SPEC_EXAMPLES = [
|
|
|
3837
3736
|
}
|
|
3838
3737
|
];
|
|
3839
3738
|
var registerSpecCommand = (program) => {
|
|
3840
|
-
program.command("spec").description(`Generate a normalized ConnectorTaskSpec — a one-stop description of everything a consumer needs to construct a runnable Integration Service activity or trigger task. Looks up the typeId in the local TypeCache, lists IS connections for the connector, and fetches IS metadata. ${OUTPUT_CASING_HINT}`).addOption(new Option("--type <type>", "TypeCache to look up").choices(["activity", "trigger"]).makeOptionMandatory()).requiredOption("--activity-type-id <uuid>", "Studio Web uiPathActivityTypeId — found via 'uip maestro case registry pull' + reading typecache-{activities,triggers}-index.json or 'uip maestro case registry get-connector'").requiredOption("--connection-id <id>", "Connection UUID. List candidates with `uip maestro case registry get-connection --type typecache-{activities,triggers} --activity-type-id <uuid>` and pick one before invoking spec.").option("--object-name <name>", "Override the typecache objectName. Required for entity-typed Curated triggers whose typecache stores a placeholder (e.g. Data Service `{tenantEntityName|folderEntityName}` — pick a real entity name).").addOption(new Option("--trigger-kind <kind>", "With --type trigger: 'start' for a case start trigger (Intsvc.EventTrigger on a trigger node, runtime type CuratedTrigger) or 'wait-for' for a wait-for-connector task or condition rule (runtime type CuratedWaitFor). Ignored for --type activity.").choices(["start", "wait-for"]).default("wait-for")).option("--skip-case-shape", "Omit `caseShape` (`inputs[]`, `outputs[]`, `context[]`) from the response. Use during the planning phase when the caller only needs the connector contract (`inputs.*[?required]`, `references[*].discoverCommand`, `outputs.responseFields`). Re-run without the flag during implementation to get the full caseShape scaffold. Mutually exclusive with --input-details.").option("--input-details <json>", "JSON values to fold into the generated `caseShape`. Activity accepts {bodyParameters, queryParameters, pathParameters, filter}; trigger accepts {eventParameters, queryParameters, pathParameters, filter}. See `packages/
|
|
3739
|
+
program.command("spec").description(`Generate a normalized ConnectorTaskSpec — a one-stop description of everything a consumer needs to construct a runnable Integration Service activity or trigger task. Looks up the typeId in the local TypeCache, lists IS connections for the connector, and fetches IS metadata. ${OUTPUT_CASING_HINT}`).addOption(new Option("--type <type>", "TypeCache to look up").choices(["activity", "trigger"]).makeOptionMandatory()).requiredOption("--activity-type-id <uuid>", "Studio Web uiPathActivityTypeId — found via 'uip maestro case registry pull' + reading typecache-{activities,triggers}-index.json or 'uip maestro case registry get-connector'").requiredOption("--connection-id <id>", "Connection UUID. List candidates with `uip maestro case registry get-connection --type typecache-{activities,triggers} --activity-type-id <uuid>` and pick one before invoking spec.").option("--object-name <name>", "Override the typecache objectName. Required for entity-typed Curated triggers whose typecache stores a placeholder (e.g. Data Service `{tenantEntityName|folderEntityName}` — pick a real entity name).").addOption(new Option("--trigger-kind <kind>", "With --type trigger: 'start' for a case start trigger (Intsvc.EventTrigger on a trigger node, runtime type CuratedTrigger) or 'wait-for' for a wait-for-connector task or condition rule (runtime type CuratedWaitFor). Ignored for --type activity.").choices(["start", "wait-for"]).default("wait-for")).option("--skip-case-shape", "Omit `caseShape` (`inputs[]`, `outputs[]`, `context[]`) from the response. Use during the planning phase when the caller only needs the connector contract (`inputs.*[?required]`, `references[*].discoverCommand`, `outputs.responseFields`). Re-run without the flag during implementation to get the full caseShape scaffold. Mutually exclusive with --input-details.").option("--input-details <json>", "JSON values to fold into the generated `caseShape`. Activity accepts {bodyParameters, queryParameters, pathParameters, filter}; trigger accepts {eventParameters, queryParameters, pathParameters, filter}. See `packages/maestro-sdk/docs/connector-input-details.md` for the full reference. Mutually exclusive with --skip-case-shape.").option("--solution-folder <path>", "Solution root that resource-picker values (such as a Data Fabric entity) in --input-details are referenced into. Defaults to the solution containing the current folder.").examples(SPEC_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
3841
3740
|
logger.info(`Fetching ${options.type} spec for typeId ${options.activityTypeId} (connection: ${options.connectionId})`);
|
|
3842
3741
|
let parsedInputDetails;
|
|
3843
3742
|
if (options.inputDetails !== undefined) {
|
|
3844
|
-
const [parseError, parsed] =
|
|
3743
|
+
const [parseError, parsed] = catchError2(() => JSON.parse(options.inputDetails));
|
|
3845
3744
|
if (parseError) {
|
|
3846
3745
|
OutputFormatter.error({
|
|
3847
3746
|
Result: RESULTS.Failure,
|
|
@@ -3862,20 +3761,44 @@ var registerSpecCommand = (program) => {
|
|
|
3862
3761
|
}
|
|
3863
3762
|
parsedInputDetails = parsed;
|
|
3864
3763
|
}
|
|
3764
|
+
const [
|
|
3765
|
+
{
|
|
3766
|
+
ConnectionConnectorMismatchError,
|
|
3767
|
+
fetchConnectorTaskSpec,
|
|
3768
|
+
InvalidInputDetailsError,
|
|
3769
|
+
ResourceFieldResolutionError
|
|
3770
|
+
},
|
|
3771
|
+
{ caseTypeCacheSource }
|
|
3772
|
+
] = await Promise.all([
|
|
3773
|
+
import("./index-n4g6qvab.js"),
|
|
3774
|
+
import("./connector-lookup-service-0t7ydz3t.js")
|
|
3775
|
+
]);
|
|
3865
3776
|
const fetchOpts = {
|
|
3777
|
+
typeCache: caseTypeCacheSource,
|
|
3866
3778
|
objectNameOverride: options.objectName,
|
|
3867
3779
|
skipCaseShape: options.skipCaseShape === true,
|
|
3868
3780
|
triggerKind: options.triggerKind,
|
|
3869
3781
|
solutionFolder: options.solutionFolder,
|
|
3870
|
-
inputDetails: parsedInputDetails
|
|
3782
|
+
inputDetails: parsedInputDetails,
|
|
3783
|
+
optionLabels: {
|
|
3784
|
+
inputDetails: "--input-details",
|
|
3785
|
+
skipCaseShape: "--skip-case-shape",
|
|
3786
|
+
objectNameOverride: "--object-name",
|
|
3787
|
+
solutionFolder: "--solution-folder"
|
|
3788
|
+
}
|
|
3871
3789
|
};
|
|
3872
|
-
const
|
|
3873
|
-
const [error, spec] = await catchError(fetchConnectorTaskSpec(options.type, options.activityTypeId, options.connectionId, fetchOpts));
|
|
3790
|
+
const [error, spec] = await catchError2(fetchConnectorTaskSpec(options.type, options.activityTypeId, options.connectionId, fetchOpts));
|
|
3874
3791
|
if (error) {
|
|
3792
|
+
const instructions = error instanceof ConnectionConnectorMismatchError || error instanceof InvalidInputDetailsError ? error.instructions : undefined;
|
|
3793
|
+
const callerError = error instanceof ConnectionConnectorMismatchError || error instanceof InvalidInputDetailsError || error instanceof ResourceFieldResolutionError && error.fromInput;
|
|
3875
3794
|
OutputFormatter.error({
|
|
3876
3795
|
Result: RESULTS.Failure,
|
|
3877
|
-
Message: `Error fetching connector task spec for typeId ${options.activityTypeId}`,
|
|
3878
|
-
Instructions: error.message
|
|
3796
|
+
Message: callerError ? error.message : `Error fetching connector task spec for typeId ${options.activityTypeId}`,
|
|
3797
|
+
Instructions: callerError ? instructions ?? "Fix --input-details and run the command again." : error.message,
|
|
3798
|
+
...callerError && {
|
|
3799
|
+
ErrorCode: "invalid_argument",
|
|
3800
|
+
Retry: "RetryWillNotFix"
|
|
3801
|
+
}
|
|
3879
3802
|
});
|
|
3880
3803
|
processContext.exit(1);
|
|
3881
3804
|
return;
|
|
@@ -3914,7 +3837,7 @@ var SPLICE_EXAMPLES = [
|
|
|
3914
3837
|
];
|
|
3915
3838
|
var registerSpliceCommand = (program) => {
|
|
3916
3839
|
program.command("splice").description("Write a connector task's `caseShape` from a `case spec` result into the task that runs it: `data.context` with the binding references resolved, `data.inputs`/`data.outputs` with their ids minted, the matching `serviceType`, and the connection's root bindings. Does the transport by hand-carrying nothing — the shape comes from the spec, the bindings from the binding builder, the service type from the task's own type. Offline: it reads the spec you hand it and never fetches one.").argument("<file>", "Path to the case plan to splice into").option("--task-id <task-id>", "Id of the connector task to write into, from `nodes[].data.tasks[][].id`. Pass this or --task-name.").option("--task-name <task-name>", "Display name of the task to write into, exactly as the plan spells it — same case and spacing, the way the SDD audit compares it. Pass this or --task-id.").option("--described <file>", "A `uip maestro case tasks describe` result saved as JSON. Writes a resource task's inputs and outputs from the resource's own contract — types, schemas and options — keeping the ids the plan already carries. Use instead of --spec for a process, rpa, business-rule, api-workflow, agent, action, function or child-case task.").option("--spec <file>", "A `uip maestro case spec` result saved as JSON — the envelope as written, `Data.CaseShape` and all. A bare shape or an older PascalCased save is read too. Must carry the shape: run spec without `--skip-case-shape`.").option("--connection-id <id>", "Connection UUID the task runs against. Optional: it defaults to the connection the spec was fetched for, which the spec's own `caseShape.context.resourceKey` states. Pass it to override, and a value that disagrees with the spec is refused. The root bindings are keyed on it, so splicing twice for the same connection reuses them rather than appending a second pair.").option("--folder-key <key>", "Folder key for the connection. Optional: it defaults to the folder the spec's own `Data.Connection.FolderKey` states, and a value that disagrees with the spec is refused. When the connection has no folder, `case spec` returns a shape with no `folderKey` entry, and this drops any folder binding left over for that connection rather than leaving one with no `default`. If the shape asks for a folder binding and neither this nor the spec gives one, that is refused rather than written.").option("--out <file>", "Write the spliced plan here instead of in place").examples(SPLICE_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
3917
|
-
const { getFileSystemAsync } = await import("./index-
|
|
3840
|
+
const { getFileSystemAsync } = await import("./index-21kns9qg.js");
|
|
3918
3841
|
const fs = await getFileSystemAsync();
|
|
3919
3842
|
const mode = options.described !== undefined ? "described" : "spec";
|
|
3920
3843
|
if (options.described === undefined === (options.spec === undefined)) {
|
|
@@ -3945,7 +3868,7 @@ var registerSpliceCommand = (program) => {
|
|
|
3945
3868
|
}
|
|
3946
3869
|
const read = async (path) => {
|
|
3947
3870
|
const text = await fs.readFile(path, "utf-8") ?? "";
|
|
3948
|
-
const [error, parsed] =
|
|
3871
|
+
const [error, parsed] = catchError2(() => JSON.parse(text));
|
|
3949
3872
|
if (error)
|
|
3950
3873
|
return;
|
|
3951
3874
|
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : undefined;
|
|
@@ -3963,7 +3886,7 @@ var registerSpliceCommand = (program) => {
|
|
|
3963
3886
|
processContext.exit(1);
|
|
3964
3887
|
return;
|
|
3965
3888
|
}
|
|
3966
|
-
const { isTaskSelectorFailure, resolveTaskSelector } = await import("./task-selector-
|
|
3889
|
+
const { isTaskSelectorFailure, resolveTaskSelector } = await import("./task-selector-jt60hdbt.js");
|
|
3967
3890
|
const selected = resolveTaskSelector(plan, {
|
|
3968
3891
|
taskId: options.taskId,
|
|
3969
3892
|
taskName: options.taskName
|
|
@@ -3981,7 +3904,7 @@ var registerSpliceCommand = (program) => {
|
|
|
3981
3904
|
}
|
|
3982
3905
|
const taskId = selected.id;
|
|
3983
3906
|
if (mode === "described") {
|
|
3984
|
-
const { applyDescribedIo, isDescribedIoFailure } = await import("./case-described-io-service-
|
|
3907
|
+
const { applyDescribedIo, isDescribedIoFailure } = await import("./case-described-io-service-tsm8r189.js");
|
|
3985
3908
|
const applied = applyDescribedIo(plan, specDocument, {
|
|
3986
3909
|
taskId
|
|
3987
3910
|
});
|
|
@@ -3996,15 +3919,15 @@ var registerSpliceCommand = (program) => {
|
|
|
3996
3919
|
processContext.exit(1);
|
|
3997
3920
|
return;
|
|
3998
3921
|
}
|
|
3999
|
-
const
|
|
4000
|
-
await fs.writeFile(
|
|
3922
|
+
const target = options.out ?? file;
|
|
3923
|
+
await fs.writeFile(target, `${JSON.stringify(applied.document, null, 4)}
|
|
4001
3924
|
`);
|
|
4002
|
-
logger.info(`Wrote described I/O for ${taskId} into ${
|
|
3925
|
+
logger.info(`Wrote described I/O for ${taskId} into ${target}`);
|
|
4003
3926
|
OutputFormatter.success({
|
|
4004
3927
|
Result: RESULTS.Success,
|
|
4005
3928
|
Code: "DescribedIoApplied",
|
|
4006
3929
|
Data: {
|
|
4007
|
-
Path:
|
|
3930
|
+
Path: target,
|
|
4008
3931
|
Summary: {
|
|
4009
3932
|
TaskId: applied.summary.taskId,
|
|
4010
3933
|
InputsUpdated: applied.summary.inputsUpdated,
|
|
@@ -4017,7 +3940,11 @@ var registerSpliceCommand = (program) => {
|
|
|
4017
3940
|
});
|
|
4018
3941
|
return;
|
|
4019
3942
|
}
|
|
4020
|
-
const {
|
|
3943
|
+
const {
|
|
3944
|
+
readCaseShape,
|
|
3945
|
+
readResourceBindings,
|
|
3946
|
+
readSpecFolderKey
|
|
3947
|
+
} = await import("./case-shape-reader-xaxmrd40.js");
|
|
4021
3948
|
const caseShape = readCaseShape(specDocument);
|
|
4022
3949
|
if (caseShape === undefined) {
|
|
4023
3950
|
OutputFormatter.error({
|
|
@@ -4030,12 +3957,13 @@ var registerSpliceCommand = (program) => {
|
|
|
4030
3957
|
processContext.exit(1);
|
|
4031
3958
|
return;
|
|
4032
3959
|
}
|
|
4033
|
-
const { spliceConnectorShape, isSpliceFailure } = await import("./case-splice-service-
|
|
3960
|
+
const { spliceConnectorShape, isSpliceFailure } = await import("./case-splice-service-6y35w83e.js");
|
|
4034
3961
|
const result = spliceConnectorShape(plan, caseShape, {
|
|
4035
3962
|
taskId,
|
|
4036
3963
|
connectionId: options.connectionId,
|
|
4037
3964
|
folderKey: options.folderKey,
|
|
4038
|
-
specFolderKey: readSpecFolderKey(specDocument)
|
|
3965
|
+
specFolderKey: readSpecFolderKey(specDocument),
|
|
3966
|
+
resourceBindings: readResourceBindings(specDocument)
|
|
4039
3967
|
});
|
|
4040
3968
|
if (isSpliceFailure(result)) {
|
|
4041
3969
|
OutputFormatter.error({
|
|
@@ -4048,36 +3976,42 @@ var registerSpliceCommand = (program) => {
|
|
|
4048
3976
|
processContext.exit(1);
|
|
4049
3977
|
return;
|
|
4050
3978
|
}
|
|
4051
|
-
const { designerShapeConnectorTasks } = await import("./connector-task-shape-
|
|
3979
|
+
const { designerShapeConnectorTasks } = await import("./connector-task-shape-bgywpbqc.js");
|
|
4052
3980
|
designerShapeConnectorTasks(result.document, (task) => task.id === taskId);
|
|
4053
3981
|
const target = options.out ?? file;
|
|
4054
3982
|
await fs.writeFile(target, `${JSON.stringify(result.document, null, 4)}
|
|
4055
3983
|
`);
|
|
4056
3984
|
logger.info(`Spliced ${taskId} into ${target}`);
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
BindingsDropped: summary.bindingsDropped
|
|
3985
|
+
outputSpliced(target, result.summary);
|
|
3986
|
+
});
|
|
3987
|
+
};
|
|
3988
|
+
var outputSpliced = (target, summary) => {
|
|
3989
|
+
OutputFormatter.success({
|
|
3990
|
+
Result: RESULTS.Success,
|
|
3991
|
+
Code: "ConnectorShapeSpliced",
|
|
3992
|
+
Data: {
|
|
3993
|
+
Path: target,
|
|
3994
|
+
Summary: {
|
|
3995
|
+
TaskId: summary.taskId,
|
|
3996
|
+
TaskType: summary.taskType,
|
|
3997
|
+
ServiceType: summary.serviceType,
|
|
3998
|
+
ContextEntries: summary.contextEntries,
|
|
3999
|
+
Inputs: summary.inputs,
|
|
4000
|
+
Outputs: summary.outputs,
|
|
4001
|
+
ConnectionBindingId: summary.connectionBindingId,
|
|
4002
|
+
...summary.folderBindingId !== undefined && {
|
|
4003
|
+
FolderBindingId: summary.folderBindingId
|
|
4077
4004
|
},
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4005
|
+
BindingsReused: summary.bindingsReused,
|
|
4006
|
+
BindingsCompleted: summary.bindingsCompleted,
|
|
4007
|
+
BindingsDropped: summary.bindingsDropped,
|
|
4008
|
+
ResourceBindingIds: summary.resourceBindingIds
|
|
4009
|
+
},
|
|
4010
|
+
NextSteps: "Run `uip maestro case validate <file> --strict` to check the spliced task, then `uip maestro case bindings sync <file>` to bring bindings_v2.json in line."
|
|
4011
|
+
},
|
|
4012
|
+
...summary.warning !== undefined && {
|
|
4013
|
+
Warning: summary.warning
|
|
4014
|
+
}
|
|
4081
4015
|
});
|
|
4082
4016
|
};
|
|
4083
4017
|
|
|
@@ -4085,7 +4019,7 @@ var registerSpliceCommand = (program) => {
|
|
|
4085
4019
|
var STAGE_ENTRY_CONDITIONS_ADD_EXAMPLES = [
|
|
4086
4020
|
{
|
|
4087
4021
|
Description: "Add an entry condition to a stage with an initial rule",
|
|
4088
|
-
Command: 'uip maestro case stage-entry-conditions add case.json Stage_1 --display-name "Start" --rule-type
|
|
4022
|
+
Command: 'uip maestro case stage-entry-conditions add case.json Stage_1 --display-name "Start" --rule-type case-entered',
|
|
4089
4023
|
Output: {
|
|
4090
4024
|
Code: "StageEntryConditionAdded",
|
|
4091
4025
|
Data: {
|
|
@@ -4097,7 +4031,7 @@ var STAGE_ENTRY_CONDITIONS_ADD_EXAMPLES = [
|
|
|
4097
4031
|
[
|
|
4098
4032
|
{
|
|
4099
4033
|
id: "Rule_e5f6a7b8",
|
|
4100
|
-
|
|
4034
|
+
rule: "case-entered"
|
|
4101
4035
|
}
|
|
4102
4036
|
]
|
|
4103
4037
|
]
|
|
@@ -4120,7 +4054,7 @@ var STAGE_ENTRY_CONDITIONS_EDIT_EXAMPLES = [
|
|
|
4120
4054
|
[
|
|
4121
4055
|
{
|
|
4122
4056
|
id: "Rule_e5f6a7b8",
|
|
4123
|
-
|
|
4057
|
+
rule: "case-entered"
|
|
4124
4058
|
}
|
|
4125
4059
|
]
|
|
4126
4060
|
]
|
|
@@ -4142,7 +4076,7 @@ var STAGE_ENTRY_CONDITIONS_GET_EXAMPLES = [
|
|
|
4142
4076
|
[
|
|
4143
4077
|
{
|
|
4144
4078
|
id: "Rule_e5f6a7b8",
|
|
4145
|
-
|
|
4079
|
+
rule: "case-entered"
|
|
4146
4080
|
}
|
|
4147
4081
|
]
|
|
4148
4082
|
]
|
|
@@ -4184,7 +4118,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4184
4118
|
processContext.exit(1);
|
|
4185
4119
|
return;
|
|
4186
4120
|
}
|
|
4187
|
-
const [readError, schema] = await
|
|
4121
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
4188
4122
|
if (readError) {
|
|
4189
4123
|
OutputFormatter.error({
|
|
4190
4124
|
Result: RESULTS.Failure,
|
|
@@ -4194,7 +4128,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4194
4128
|
processContext.exit(1);
|
|
4195
4129
|
return;
|
|
4196
4130
|
}
|
|
4197
|
-
const [findError, node] =
|
|
4131
|
+
const [findError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
4198
4132
|
if (findError) {
|
|
4199
4133
|
OutputFormatter.error({
|
|
4200
4134
|
Result: RESULTS.Failure,
|
|
@@ -4226,7 +4160,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4226
4160
|
node.data.entryConditions = [];
|
|
4227
4161
|
}
|
|
4228
4162
|
node.data.entryConditions.push(condition);
|
|
4229
|
-
const [writeError] = await
|
|
4163
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
4230
4164
|
if (writeError) {
|
|
4231
4165
|
OutputFormatter.error({
|
|
4232
4166
|
Result: RESULTS.Failure,
|
|
@@ -4268,7 +4202,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4268
4202
|
processContext.exit(1);
|
|
4269
4203
|
return;
|
|
4270
4204
|
}
|
|
4271
|
-
const [readError, schema] = await
|
|
4205
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
4272
4206
|
if (readError) {
|
|
4273
4207
|
OutputFormatter.error({
|
|
4274
4208
|
Result: RESULTS.Failure,
|
|
@@ -4278,7 +4212,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4278
4212
|
processContext.exit(1);
|
|
4279
4213
|
return;
|
|
4280
4214
|
}
|
|
4281
|
-
const [findStageError, node] =
|
|
4215
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
4282
4216
|
if (findStageError) {
|
|
4283
4217
|
OutputFormatter.error({
|
|
4284
4218
|
Result: RESULTS.Failure,
|
|
@@ -4288,7 +4222,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4288
4222
|
processContext.exit(1);
|
|
4289
4223
|
return;
|
|
4290
4224
|
}
|
|
4291
|
-
const [findConditionError, condition] =
|
|
4225
|
+
const [findConditionError, condition] = catchError2(() => requireEntryCondition(node, conditionId));
|
|
4292
4226
|
if (findConditionError) {
|
|
4293
4227
|
OutputFormatter.error({
|
|
4294
4228
|
Result: RESULTS.Failure,
|
|
@@ -4325,7 +4259,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4325
4259
|
}
|
|
4326
4260
|
condition.rules.push([rule]);
|
|
4327
4261
|
}
|
|
4328
|
-
const [writeError] = await
|
|
4262
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
4329
4263
|
if (writeError) {
|
|
4330
4264
|
OutputFormatter.error({
|
|
4331
4265
|
Result: RESULTS.Failure,
|
|
@@ -4349,7 +4283,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4349
4283
|
});
|
|
4350
4284
|
});
|
|
4351
4285
|
entryConditions.command("get").description("Print an entry condition from a stage").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage node").argument("<condition-id>", "ID of the entry condition to retrieve").examples(STAGE_ENTRY_CONDITIONS_GET_EXAMPLES).trackedAction(processContext, async (file, stageId, conditionId) => {
|
|
4352
|
-
const [readError, schema] = await
|
|
4286
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
4353
4287
|
if (readError) {
|
|
4354
4288
|
OutputFormatter.error({
|
|
4355
4289
|
Result: RESULTS.Failure,
|
|
@@ -4359,7 +4293,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4359
4293
|
processContext.exit(1);
|
|
4360
4294
|
return;
|
|
4361
4295
|
}
|
|
4362
|
-
const [findStageError, node] =
|
|
4296
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
4363
4297
|
if (findStageError) {
|
|
4364
4298
|
OutputFormatter.error({
|
|
4365
4299
|
Result: RESULTS.Failure,
|
|
@@ -4369,7 +4303,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4369
4303
|
processContext.exit(1);
|
|
4370
4304
|
return;
|
|
4371
4305
|
}
|
|
4372
|
-
const [findConditionError, condition] =
|
|
4306
|
+
const [findConditionError, condition] = catchError2(() => requireEntryCondition(node, conditionId));
|
|
4373
4307
|
if (findConditionError) {
|
|
4374
4308
|
OutputFormatter.error({
|
|
4375
4309
|
Result: RESULTS.Failure,
|
|
@@ -4386,7 +4320,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4386
4320
|
});
|
|
4387
4321
|
});
|
|
4388
4322
|
entryConditions.command("remove", { hidden: true }).description("Remove an entry condition from a stage").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage node").argument("<condition-id>", "ID of the entry condition to remove").examples(STAGE_ENTRY_CONDITIONS_REMOVE_EXAMPLES).trackedAction(processContext, async (file, stageId, conditionId) => {
|
|
4389
|
-
const [readError, schema] = await
|
|
4323
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
4390
4324
|
if (readError) {
|
|
4391
4325
|
OutputFormatter.error({
|
|
4392
4326
|
Result: RESULTS.Failure,
|
|
@@ -4396,7 +4330,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4396
4330
|
processContext.exit(1);
|
|
4397
4331
|
return;
|
|
4398
4332
|
}
|
|
4399
|
-
const [findStageError, node] =
|
|
4333
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
4400
4334
|
if (findStageError) {
|
|
4401
4335
|
OutputFormatter.error({
|
|
4402
4336
|
Result: RESULTS.Failure,
|
|
@@ -4406,7 +4340,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4406
4340
|
processContext.exit(1);
|
|
4407
4341
|
return;
|
|
4408
4342
|
}
|
|
4409
|
-
const [findConditionError] =
|
|
4343
|
+
const [findConditionError] = catchError2(() => requireEntryCondition(node, conditionId));
|
|
4410
4344
|
if (findConditionError) {
|
|
4411
4345
|
OutputFormatter.error({
|
|
4412
4346
|
Result: RESULTS.Failure,
|
|
@@ -4417,7 +4351,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4417
4351
|
return;
|
|
4418
4352
|
}
|
|
4419
4353
|
node.data.entryConditions = (node.data.entryConditions ?? []).filter((c) => c.id !== conditionId);
|
|
4420
|
-
const [writeError] = await
|
|
4354
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
4421
4355
|
if (writeError) {
|
|
4422
4356
|
OutputFormatter.error({
|
|
4423
4357
|
Result: RESULTS.Failure,
|
|
@@ -4443,7 +4377,7 @@ var registerStageEntryConditionsCommand = (program) => {
|
|
|
4443
4377
|
var STAGE_EXIT_CONDITIONS_ADD_EXAMPLES = [
|
|
4444
4378
|
{
|
|
4445
4379
|
Description: "Add an exit condition that marks the stage complete",
|
|
4446
|
-
Command: 'uip maestro case stage-exit-conditions add case.json Stage_1 --display-name "Done" --marks-stage-complete true --rule-type
|
|
4380
|
+
Command: 'uip maestro case stage-exit-conditions add case.json Stage_1 --display-name "Done" --marks-stage-complete true --rule-type required-tasks-completed',
|
|
4447
4381
|
Output: {
|
|
4448
4382
|
Code: "ExitConditionAdded",
|
|
4449
4383
|
Data: {
|
|
@@ -4456,7 +4390,7 @@ var STAGE_EXIT_CONDITIONS_ADD_EXAMPLES = [
|
|
|
4456
4390
|
[
|
|
4457
4391
|
{
|
|
4458
4392
|
id: "Rule_e5f6a7b8",
|
|
4459
|
-
|
|
4393
|
+
rule: "required-tasks-completed"
|
|
4460
4394
|
}
|
|
4461
4395
|
]
|
|
4462
4396
|
]
|
|
@@ -4480,7 +4414,7 @@ var STAGE_EXIT_CONDITIONS_EDIT_EXAMPLES = [
|
|
|
4480
4414
|
[
|
|
4481
4415
|
{
|
|
4482
4416
|
id: "Rule_e5f6a7b8",
|
|
4483
|
-
|
|
4417
|
+
rule: "required-tasks-completed"
|
|
4484
4418
|
}
|
|
4485
4419
|
]
|
|
4486
4420
|
]
|
|
@@ -4503,7 +4437,7 @@ var STAGE_EXIT_CONDITIONS_GET_EXAMPLES = [
|
|
|
4503
4437
|
[
|
|
4504
4438
|
{
|
|
4505
4439
|
id: "Rule_e5f6a7b8",
|
|
4506
|
-
|
|
4440
|
+
rule: "required-tasks-completed"
|
|
4507
4441
|
}
|
|
4508
4442
|
]
|
|
4509
4443
|
]
|
|
@@ -4559,7 +4493,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4559
4493
|
processContext.exit(1);
|
|
4560
4494
|
return;
|
|
4561
4495
|
}
|
|
4562
|
-
const [readError, schema] = await
|
|
4496
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
4563
4497
|
if (readError) {
|
|
4564
4498
|
OutputFormatter.error({
|
|
4565
4499
|
Result: RESULTS.Failure,
|
|
@@ -4569,7 +4503,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4569
4503
|
processContext.exit(1);
|
|
4570
4504
|
return;
|
|
4571
4505
|
}
|
|
4572
|
-
const [findError, node] =
|
|
4506
|
+
const [findError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
4573
4507
|
if (findError) {
|
|
4574
4508
|
OutputFormatter.error({
|
|
4575
4509
|
Result: RESULTS.Failure,
|
|
@@ -4612,7 +4546,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4612
4546
|
node.data.exitConditions = [];
|
|
4613
4547
|
}
|
|
4614
4548
|
node.data.exitConditions.push(condition);
|
|
4615
|
-
const [writeError] = await
|
|
4549
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
4616
4550
|
if (writeError) {
|
|
4617
4551
|
OutputFormatter.error({
|
|
4618
4552
|
Result: RESULTS.Failure,
|
|
@@ -4674,7 +4608,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4674
4608
|
processContext.exit(1);
|
|
4675
4609
|
return;
|
|
4676
4610
|
}
|
|
4677
|
-
const [readError, schema] = await
|
|
4611
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
4678
4612
|
if (readError) {
|
|
4679
4613
|
OutputFormatter.error({
|
|
4680
4614
|
Result: RESULTS.Failure,
|
|
@@ -4684,7 +4618,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4684
4618
|
processContext.exit(1);
|
|
4685
4619
|
return;
|
|
4686
4620
|
}
|
|
4687
|
-
const [findStageError, node] =
|
|
4621
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
4688
4622
|
if (findStageError) {
|
|
4689
4623
|
OutputFormatter.error({
|
|
4690
4624
|
Result: RESULTS.Failure,
|
|
@@ -4694,7 +4628,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4694
4628
|
processContext.exit(1);
|
|
4695
4629
|
return;
|
|
4696
4630
|
}
|
|
4697
|
-
const [findConditionError, condition] =
|
|
4631
|
+
const [findConditionError, condition] = catchError2(() => requireExitCondition(node, conditionId));
|
|
4698
4632
|
if (findConditionError) {
|
|
4699
4633
|
OutputFormatter.error({
|
|
4700
4634
|
Result: RESULTS.Failure,
|
|
@@ -4737,7 +4671,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4737
4671
|
}
|
|
4738
4672
|
condition.rules.push([rule]);
|
|
4739
4673
|
}
|
|
4740
|
-
const [writeError] = await
|
|
4674
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
4741
4675
|
if (writeError) {
|
|
4742
4676
|
OutputFormatter.error({
|
|
4743
4677
|
Result: RESULTS.Failure,
|
|
@@ -4763,7 +4697,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4763
4697
|
});
|
|
4764
4698
|
});
|
|
4765
4699
|
exitConditions.command("get").description("Print an exit condition from a stage").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage node").argument("<condition-id>", "ID of the exit condition to retrieve").examples(STAGE_EXIT_CONDITIONS_GET_EXAMPLES).trackedAction(processContext, async (file, stageId, conditionId) => {
|
|
4766
|
-
const [readError, schema] = await
|
|
4700
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
4767
4701
|
if (readError) {
|
|
4768
4702
|
OutputFormatter.error({
|
|
4769
4703
|
Result: RESULTS.Failure,
|
|
@@ -4773,7 +4707,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4773
4707
|
processContext.exit(1);
|
|
4774
4708
|
return;
|
|
4775
4709
|
}
|
|
4776
|
-
const [findStageError, node] =
|
|
4710
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
4777
4711
|
if (findStageError) {
|
|
4778
4712
|
OutputFormatter.error({
|
|
4779
4713
|
Result: RESULTS.Failure,
|
|
@@ -4783,7 +4717,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4783
4717
|
processContext.exit(1);
|
|
4784
4718
|
return;
|
|
4785
4719
|
}
|
|
4786
|
-
const [findConditionError, condition] =
|
|
4720
|
+
const [findConditionError, condition] = catchError2(() => requireExitCondition(node, conditionId));
|
|
4787
4721
|
if (findConditionError) {
|
|
4788
4722
|
OutputFormatter.error({
|
|
4789
4723
|
Result: RESULTS.Failure,
|
|
@@ -4800,7 +4734,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4800
4734
|
});
|
|
4801
4735
|
});
|
|
4802
4736
|
exitConditions.command("remove", { hidden: true }).description("Remove an exit condition from a stage").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage node").argument("<condition-id>", "ID of the exit condition to remove").examples(STAGE_EXIT_CONDITIONS_REMOVE_EXAMPLES).trackedAction(processContext, async (file, stageId, conditionId) => {
|
|
4803
|
-
const [readError, schema] = await
|
|
4737
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
4804
4738
|
if (readError) {
|
|
4805
4739
|
OutputFormatter.error({
|
|
4806
4740
|
Result: RESULTS.Failure,
|
|
@@ -4810,7 +4744,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4810
4744
|
processContext.exit(1);
|
|
4811
4745
|
return;
|
|
4812
4746
|
}
|
|
4813
|
-
const [findStageError, node] =
|
|
4747
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
4814
4748
|
if (findStageError) {
|
|
4815
4749
|
OutputFormatter.error({
|
|
4816
4750
|
Result: RESULTS.Failure,
|
|
@@ -4820,7 +4754,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4820
4754
|
processContext.exit(1);
|
|
4821
4755
|
return;
|
|
4822
4756
|
}
|
|
4823
|
-
const [findConditionError] =
|
|
4757
|
+
const [findConditionError] = catchError2(() => requireExitCondition(node, conditionId));
|
|
4824
4758
|
if (findConditionError) {
|
|
4825
4759
|
OutputFormatter.error({
|
|
4826
4760
|
Result: RESULTS.Failure,
|
|
@@ -4831,7 +4765,7 @@ var registerStageExitConditionsCommand = (program) => {
|
|
|
4831
4765
|
return;
|
|
4832
4766
|
}
|
|
4833
4767
|
node.data.exitConditions = (node.data.exitConditions ?? []).filter((c) => c.id !== conditionId);
|
|
4834
|
-
const [writeError] = await
|
|
4768
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
4835
4769
|
if (writeError) {
|
|
4836
4770
|
OutputFormatter.error({
|
|
4837
4771
|
Result: RESULTS.Failure,
|
|
@@ -4939,7 +4873,7 @@ function autoPosition(existingStageCount) {
|
|
|
4939
4873
|
var registerStagesCommand = (program) => {
|
|
4940
4874
|
const stages = program.command("stages").description("Manage stages within a case management definition JSON file");
|
|
4941
4875
|
stages.command("add", { hidden: true }).description("Add a new stage to a case management definition").argument("<file>", "Path to the case management JSON file").option("-l, --label <label>", "Display label for the stage").option("-t, --type <type>", "Stage type: stage, exception, or trigger (default: stage)", "stage").option("--description <description>", "Description of the stage").option("--is-required", "Whether the stage is required").examples(STAGES_ADD_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
4942
|
-
const [readError, schema] = await
|
|
4876
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
4943
4877
|
if (readError) {
|
|
4944
4878
|
OutputFormatter.error({
|
|
4945
4879
|
Result: RESULTS.Failure,
|
|
@@ -5024,7 +4958,7 @@ var registerStagesCommand = (program) => {
|
|
|
5024
4958
|
}
|
|
5025
4959
|
}
|
|
5026
4960
|
schema.nodes.unshift(node);
|
|
5027
|
-
const [writeError] = await
|
|
4961
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
5028
4962
|
if (writeError) {
|
|
5029
4963
|
OutputFormatter.error({
|
|
5030
4964
|
Result: RESULTS.Failure,
|
|
@@ -5057,7 +4991,7 @@ var registerStagesCommand = (program) => {
|
|
|
5057
4991
|
processContext.exit(1);
|
|
5058
4992
|
return;
|
|
5059
4993
|
}
|
|
5060
|
-
const [readError, schema] = await
|
|
4994
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5061
4995
|
if (readError) {
|
|
5062
4996
|
OutputFormatter.error({
|
|
5063
4997
|
Result: RESULTS.Failure,
|
|
@@ -5067,7 +5001,7 @@ var registerStagesCommand = (program) => {
|
|
|
5067
5001
|
processContext.exit(1);
|
|
5068
5002
|
return;
|
|
5069
5003
|
}
|
|
5070
|
-
const [findError, node] =
|
|
5004
|
+
const [findError, node] = catchError2(() => requireStageNode2(schema, stageId));
|
|
5071
5005
|
if (findError) {
|
|
5072
5006
|
OutputFormatter.error({
|
|
5073
5007
|
Result: RESULTS.Failure,
|
|
@@ -5086,7 +5020,7 @@ var registerStagesCommand = (program) => {
|
|
|
5086
5020
|
if (options.isRequired !== undefined && node.type !== "case-management:Trigger") {
|
|
5087
5021
|
node.data.isRequired = options.isRequired;
|
|
5088
5022
|
}
|
|
5089
|
-
const [writeError] = await
|
|
5023
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
5090
5024
|
if (writeError) {
|
|
5091
5025
|
OutputFormatter.error({
|
|
5092
5026
|
Result: RESULTS.Failure,
|
|
@@ -5108,7 +5042,7 @@ var registerStagesCommand = (program) => {
|
|
|
5108
5042
|
});
|
|
5109
5043
|
});
|
|
5110
5044
|
stages.command("get").description("Print a stage from a case management definition").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage to retrieve").examples(STAGES_GET_EXAMPLES).trackedAction(processContext, async (file, stageId) => {
|
|
5111
|
-
const [readError, schema] = await
|
|
5045
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5112
5046
|
if (readError) {
|
|
5113
5047
|
OutputFormatter.error({
|
|
5114
5048
|
Result: RESULTS.Failure,
|
|
@@ -5118,7 +5052,7 @@ var registerStagesCommand = (program) => {
|
|
|
5118
5052
|
processContext.exit(1);
|
|
5119
5053
|
return;
|
|
5120
5054
|
}
|
|
5121
|
-
const [findError, node] =
|
|
5055
|
+
const [findError, node] = catchError2(() => requireStageOrTriggerNode(schema, stageId));
|
|
5122
5056
|
if (findError) {
|
|
5123
5057
|
OutputFormatter.error({
|
|
5124
5058
|
Result: RESULTS.Failure,
|
|
@@ -5139,7 +5073,7 @@ var registerStagesCommand = (program) => {
|
|
|
5139
5073
|
});
|
|
5140
5074
|
});
|
|
5141
5075
|
stages.command("remove", { hidden: true }).description("Remove a stage and its connected edges from a case management definition").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage to remove").examples(STAGES_REMOVE_EXAMPLES).trackedAction(processContext, async (file, stageId) => {
|
|
5142
|
-
const [readError, schema] = await
|
|
5076
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5143
5077
|
if (readError) {
|
|
5144
5078
|
OutputFormatter.error({
|
|
5145
5079
|
Result: RESULTS.Failure,
|
|
@@ -5149,7 +5083,7 @@ var registerStagesCommand = (program) => {
|
|
|
5149
5083
|
processContext.exit(1);
|
|
5150
5084
|
return;
|
|
5151
5085
|
}
|
|
5152
|
-
const [findError] =
|
|
5086
|
+
const [findError] = catchError2(() => requireStageNode2(schema, stageId));
|
|
5153
5087
|
if (findError) {
|
|
5154
5088
|
OutputFormatter.error({
|
|
5155
5089
|
Result: RESULTS.Failure,
|
|
@@ -5162,7 +5096,7 @@ var registerStagesCommand = (program) => {
|
|
|
5162
5096
|
const removedEdges = schema.edges.filter((e) => e.source === stageId || e.target === stageId).length;
|
|
5163
5097
|
schema.nodes = schema.nodes.filter((n) => n.id !== stageId);
|
|
5164
5098
|
schema.edges = schema.edges.filter((e) => e.source !== stageId && e.target !== stageId);
|
|
5165
|
-
const [writeError] = await
|
|
5099
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
5166
5100
|
if (writeError) {
|
|
5167
5101
|
OutputFormatter.error({
|
|
5168
5102
|
Result: RESULTS.Failure,
|
|
@@ -5234,7 +5168,7 @@ function parsePosition(value) {
|
|
|
5234
5168
|
var registerStickyNotesCommand = (program) => {
|
|
5235
5169
|
const stickyNotes = program.command("sticky-notes").description("Manage sticky notes within a case management definition JSON file");
|
|
5236
5170
|
stickyNotes.command("add", { hidden: true }).description("Add a new sticky note to a case management definition").argument("<file>", "Path to the case management JSON file").option("-l, --label <label>", "Display label for the sticky note").option("--content <content>", "Text content of the sticky note").option("--color <color>", "Color of the sticky note").option("--position <x,y>", "Position as x,y coordinates (default: 0,0)").trackedAction(processContext, async (file, options) => {
|
|
5237
|
-
const [readError, schema] = await
|
|
5171
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5238
5172
|
if (readError) {
|
|
5239
5173
|
OutputFormatter.error({
|
|
5240
5174
|
Result: RESULTS.Failure,
|
|
@@ -5246,7 +5180,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5246
5180
|
}
|
|
5247
5181
|
let position = { x: 0, y: 0 };
|
|
5248
5182
|
if (options.position) {
|
|
5249
|
-
const [posError, parsed] =
|
|
5183
|
+
const [posError, parsed] = catchError2(() => parsePosition(options.position));
|
|
5250
5184
|
if (posError) {
|
|
5251
5185
|
OutputFormatter.error({
|
|
5252
5186
|
Result: RESULTS.Failure,
|
|
@@ -5278,7 +5212,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5278
5212
|
}
|
|
5279
5213
|
};
|
|
5280
5214
|
schema.nodes.push(node);
|
|
5281
|
-
const [writeError] = await
|
|
5215
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
5282
5216
|
if (writeError) {
|
|
5283
5217
|
OutputFormatter.error({
|
|
5284
5218
|
Result: RESULTS.Failure,
|
|
@@ -5311,7 +5245,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5311
5245
|
processContext.exit(1);
|
|
5312
5246
|
return;
|
|
5313
5247
|
}
|
|
5314
|
-
const [readError, schema] = await
|
|
5248
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5315
5249
|
if (readError) {
|
|
5316
5250
|
OutputFormatter.error({
|
|
5317
5251
|
Result: RESULTS.Failure,
|
|
@@ -5321,7 +5255,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5321
5255
|
processContext.exit(1);
|
|
5322
5256
|
return;
|
|
5323
5257
|
}
|
|
5324
|
-
const [findError, node] =
|
|
5258
|
+
const [findError, node] = catchError2(() => requireStickyNoteNode(schema, noteId));
|
|
5325
5259
|
if (findError) {
|
|
5326
5260
|
OutputFormatter.error({
|
|
5327
5261
|
Result: RESULTS.Failure,
|
|
@@ -5340,7 +5274,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5340
5274
|
if (options.color !== undefined) {
|
|
5341
5275
|
node.data.color = options.color;
|
|
5342
5276
|
}
|
|
5343
|
-
const [writeError] = await
|
|
5277
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
5344
5278
|
if (writeError) {
|
|
5345
5279
|
OutputFormatter.error({
|
|
5346
5280
|
Result: RESULTS.Failure,
|
|
@@ -5363,7 +5297,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5363
5297
|
});
|
|
5364
5298
|
});
|
|
5365
5299
|
stickyNotes.command("get").description("Print a sticky note from a case management definition").argument("<file>", "Path to the case management JSON file").argument("<note-id>", "ID of the sticky note to retrieve").examples(STICKY_NOTES_GET_EXAMPLES).trackedAction(processContext, async (file, noteId) => {
|
|
5366
|
-
const [readError, schema] = await
|
|
5300
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5367
5301
|
if (readError) {
|
|
5368
5302
|
OutputFormatter.error({
|
|
5369
5303
|
Result: RESULTS.Failure,
|
|
@@ -5373,7 +5307,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5373
5307
|
processContext.exit(1);
|
|
5374
5308
|
return;
|
|
5375
5309
|
}
|
|
5376
|
-
const [findError, node] =
|
|
5310
|
+
const [findError, node] = catchError2(() => requireStickyNoteNode(schema, noteId));
|
|
5377
5311
|
if (findError) {
|
|
5378
5312
|
OutputFormatter.error({
|
|
5379
5313
|
Result: RESULTS.Failure,
|
|
@@ -5392,7 +5326,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5392
5326
|
});
|
|
5393
5327
|
});
|
|
5394
5328
|
stickyNotes.command("remove", { hidden: true }).description("Remove a sticky note from a case management definition").argument("<file>", "Path to the case management JSON file").argument("<note-id>", "ID of the sticky note to remove").trackedAction(processContext, async (file, noteId) => {
|
|
5395
|
-
const [readError, schema] = await
|
|
5329
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5396
5330
|
if (readError) {
|
|
5397
5331
|
OutputFormatter.error({
|
|
5398
5332
|
Result: RESULTS.Failure,
|
|
@@ -5402,7 +5336,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5402
5336
|
processContext.exit(1);
|
|
5403
5337
|
return;
|
|
5404
5338
|
}
|
|
5405
|
-
const [findError] =
|
|
5339
|
+
const [findError] = catchError2(() => requireStickyNoteNode(schema, noteId));
|
|
5406
5340
|
if (findError) {
|
|
5407
5341
|
OutputFormatter.error({
|
|
5408
5342
|
Result: RESULTS.Failure,
|
|
@@ -5413,7 +5347,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5413
5347
|
return;
|
|
5414
5348
|
}
|
|
5415
5349
|
schema.nodes = schema.nodes.filter((n) => n.id !== noteId);
|
|
5416
|
-
const [writeError] = await
|
|
5350
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
5417
5351
|
if (writeError) {
|
|
5418
5352
|
OutputFormatter.error({
|
|
5419
5353
|
Result: RESULTS.Failure,
|
|
@@ -5438,7 +5372,7 @@ var registerStickyNotesCommand = (program) => {
|
|
|
5438
5372
|
var TASK_ENTRY_CONDITIONS_ADD_EXAMPLES = [
|
|
5439
5373
|
{
|
|
5440
5374
|
Description: "Add an entry condition to a task",
|
|
5441
|
-
Command: 'uip maestro case task-entry-conditions add case.json Stage_1 Task_1 --display-name "Start" --rule-type
|
|
5375
|
+
Command: 'uip maestro case task-entry-conditions add case.json Stage_1 Task_1 --display-name "Start" --rule-type current-stage-entered',
|
|
5442
5376
|
Output: {
|
|
5443
5377
|
Code: "TaskEntryConditionAdded",
|
|
5444
5378
|
Data: {
|
|
@@ -5451,7 +5385,7 @@ var TASK_ENTRY_CONDITIONS_ADD_EXAMPLES = [
|
|
|
5451
5385
|
[
|
|
5452
5386
|
{
|
|
5453
5387
|
id: "Rule_e5f6a7b8",
|
|
5454
|
-
|
|
5388
|
+
rule: "current-stage-entered"
|
|
5455
5389
|
}
|
|
5456
5390
|
]
|
|
5457
5391
|
]
|
|
@@ -5526,7 +5460,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5526
5460
|
processContext.exit(1);
|
|
5527
5461
|
return;
|
|
5528
5462
|
}
|
|
5529
|
-
const [readError, schema] = await
|
|
5463
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5530
5464
|
if (readError) {
|
|
5531
5465
|
OutputFormatter.error({
|
|
5532
5466
|
Result: RESULTS.Failure,
|
|
@@ -5536,7 +5470,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5536
5470
|
processContext.exit(1);
|
|
5537
5471
|
return;
|
|
5538
5472
|
}
|
|
5539
|
-
const [findStageError, node] =
|
|
5473
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
5540
5474
|
if (findStageError) {
|
|
5541
5475
|
OutputFormatter.error({
|
|
5542
5476
|
Result: RESULTS.Failure,
|
|
@@ -5546,7 +5480,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5546
5480
|
processContext.exit(1);
|
|
5547
5481
|
return;
|
|
5548
5482
|
}
|
|
5549
|
-
const [findTaskError, found] =
|
|
5483
|
+
const [findTaskError, found] = catchError2(() => requireTask(node.data.tasks ?? [], taskId, stageId));
|
|
5550
5484
|
if (findTaskError) {
|
|
5551
5485
|
OutputFormatter.error({
|
|
5552
5486
|
Result: RESULTS.Failure,
|
|
@@ -5585,7 +5519,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5585
5519
|
found.task.entryConditions = [];
|
|
5586
5520
|
}
|
|
5587
5521
|
found.task.entryConditions.push(condition);
|
|
5588
|
-
const [writeError] = await
|
|
5522
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
5589
5523
|
if (writeError) {
|
|
5590
5524
|
OutputFormatter.error({
|
|
5591
5525
|
Result: RESULTS.Failure,
|
|
@@ -5627,7 +5561,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5627
5561
|
processContext.exit(1);
|
|
5628
5562
|
return;
|
|
5629
5563
|
}
|
|
5630
|
-
const [readError, schema] = await
|
|
5564
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5631
5565
|
if (readError) {
|
|
5632
5566
|
OutputFormatter.error({
|
|
5633
5567
|
Result: RESULTS.Failure,
|
|
@@ -5637,7 +5571,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5637
5571
|
processContext.exit(1);
|
|
5638
5572
|
return;
|
|
5639
5573
|
}
|
|
5640
|
-
const [findStageError, node] =
|
|
5574
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
5641
5575
|
if (findStageError) {
|
|
5642
5576
|
OutputFormatter.error({
|
|
5643
5577
|
Result: RESULTS.Failure,
|
|
@@ -5647,7 +5581,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5647
5581
|
processContext.exit(1);
|
|
5648
5582
|
return;
|
|
5649
5583
|
}
|
|
5650
|
-
const [findTaskError, found] =
|
|
5584
|
+
const [findTaskError, found] = catchError2(() => requireTask(node.data.tasks ?? [], taskId, stageId));
|
|
5651
5585
|
if (findTaskError) {
|
|
5652
5586
|
OutputFormatter.error({
|
|
5653
5587
|
Result: RESULTS.Failure,
|
|
@@ -5657,7 +5591,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5657
5591
|
processContext.exit(1);
|
|
5658
5592
|
return;
|
|
5659
5593
|
}
|
|
5660
|
-
const [findConditionError, condition] =
|
|
5594
|
+
const [findConditionError, condition] = catchError2(() => requireTaskEntryCondition(found.task, conditionId, taskId));
|
|
5661
5595
|
if (findConditionError) {
|
|
5662
5596
|
OutputFormatter.error({
|
|
5663
5597
|
Result: RESULTS.Failure,
|
|
@@ -5701,7 +5635,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5701
5635
|
}
|
|
5702
5636
|
condition.rules.push([rule]);
|
|
5703
5637
|
}
|
|
5704
|
-
const [writeError] = await
|
|
5638
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
5705
5639
|
if (writeError) {
|
|
5706
5640
|
OutputFormatter.error({
|
|
5707
5641
|
Result: RESULTS.Failure,
|
|
@@ -5725,7 +5659,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5725
5659
|
});
|
|
5726
5660
|
});
|
|
5727
5661
|
taskEntryConditions.command("get").description("Print an entry condition from a task").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage node").argument("<task-id>", "ID of the task").argument("<condition-id>", "ID of the entry condition to retrieve").examples(TASK_ENTRY_CONDITIONS_GET_EXAMPLES).trackedAction(processContext, async (file, stageId, taskId, conditionId) => {
|
|
5728
|
-
const [readError, schema] = await
|
|
5662
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5729
5663
|
if (readError) {
|
|
5730
5664
|
OutputFormatter.error({
|
|
5731
5665
|
Result: RESULTS.Failure,
|
|
@@ -5735,7 +5669,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5735
5669
|
processContext.exit(1);
|
|
5736
5670
|
return;
|
|
5737
5671
|
}
|
|
5738
|
-
const [findStageError, node] =
|
|
5672
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
5739
5673
|
if (findStageError) {
|
|
5740
5674
|
OutputFormatter.error({
|
|
5741
5675
|
Result: RESULTS.Failure,
|
|
@@ -5745,7 +5679,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5745
5679
|
processContext.exit(1);
|
|
5746
5680
|
return;
|
|
5747
5681
|
}
|
|
5748
|
-
const [findTaskError, found] =
|
|
5682
|
+
const [findTaskError, found] = catchError2(() => requireTask(node.data.tasks ?? [], taskId, stageId));
|
|
5749
5683
|
if (findTaskError) {
|
|
5750
5684
|
OutputFormatter.error({
|
|
5751
5685
|
Result: RESULTS.Failure,
|
|
@@ -5755,7 +5689,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5755
5689
|
processContext.exit(1);
|
|
5756
5690
|
return;
|
|
5757
5691
|
}
|
|
5758
|
-
const [findConditionError, condition] =
|
|
5692
|
+
const [findConditionError, condition] = catchError2(() => requireTaskEntryCondition(found.task, conditionId, taskId));
|
|
5759
5693
|
if (findConditionError) {
|
|
5760
5694
|
OutputFormatter.error({
|
|
5761
5695
|
Result: RESULTS.Failure,
|
|
@@ -5772,7 +5706,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5772
5706
|
});
|
|
5773
5707
|
});
|
|
5774
5708
|
taskEntryConditions.command("remove", { hidden: true }).description("Remove an entry condition from a task").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage node").argument("<task-id>", "ID of the task").argument("<condition-id>", "ID of the entry condition to remove").examples(TASK_ENTRY_CONDITIONS_REMOVE_EXAMPLES).trackedAction(processContext, async (file, stageId, taskId, conditionId) => {
|
|
5775
|
-
const [readError, schema] = await
|
|
5709
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
5776
5710
|
if (readError) {
|
|
5777
5711
|
OutputFormatter.error({
|
|
5778
5712
|
Result: RESULTS.Failure,
|
|
@@ -5782,7 +5716,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5782
5716
|
processContext.exit(1);
|
|
5783
5717
|
return;
|
|
5784
5718
|
}
|
|
5785
|
-
const [findStageError, node] =
|
|
5719
|
+
const [findStageError, node] = catchError2(() => requireStageNode(schema, stageId));
|
|
5786
5720
|
if (findStageError) {
|
|
5787
5721
|
OutputFormatter.error({
|
|
5788
5722
|
Result: RESULTS.Failure,
|
|
@@ -5792,7 +5726,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5792
5726
|
processContext.exit(1);
|
|
5793
5727
|
return;
|
|
5794
5728
|
}
|
|
5795
|
-
const [findTaskError, found] =
|
|
5729
|
+
const [findTaskError, found] = catchError2(() => requireTask(node.data.tasks ?? [], taskId, stageId));
|
|
5796
5730
|
if (findTaskError) {
|
|
5797
5731
|
OutputFormatter.error({
|
|
5798
5732
|
Result: RESULTS.Failure,
|
|
@@ -5802,7 +5736,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5802
5736
|
processContext.exit(1);
|
|
5803
5737
|
return;
|
|
5804
5738
|
}
|
|
5805
|
-
const [findConditionError] =
|
|
5739
|
+
const [findConditionError] = catchError2(() => requireTaskEntryCondition(found.task, conditionId, taskId));
|
|
5806
5740
|
if (findConditionError) {
|
|
5807
5741
|
OutputFormatter.error({
|
|
5808
5742
|
Result: RESULTS.Failure,
|
|
@@ -5813,7 +5747,7 @@ var registerTaskEntryConditionsCommand = (program) => {
|
|
|
5813
5747
|
return;
|
|
5814
5748
|
}
|
|
5815
5749
|
found.task.entryConditions = (found.task.entryConditions ?? []).filter((c) => c.id !== conditionId);
|
|
5816
|
-
const [writeError] = await
|
|
5750
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
5817
5751
|
if (writeError) {
|
|
5818
5752
|
OutputFormatter.error({
|
|
5819
5753
|
Result: RESULTS.Failure,
|
|
@@ -5860,9 +5794,9 @@ var TASK_TYPES_LIST_EXAMPLES = [
|
|
|
5860
5794
|
}
|
|
5861
5795
|
];
|
|
5862
5796
|
var caseSchemaVersions = async () => {
|
|
5863
|
-
const { resolveCaseSchemaVersion, resolveCaseSchemaWriteVersion
|
|
5797
|
+
const { resolveCaseSchemaVersion, resolveCaseSchemaWriteVersion } = await import("./case-schema-version-cw0h2nrv.js");
|
|
5864
5798
|
const [writeSchemaVersion, readSchemaVersion] = await Promise.all([
|
|
5865
|
-
|
|
5799
|
+
resolveCaseSchemaWriteVersion(),
|
|
5866
5800
|
resolveCaseSchemaVersion()
|
|
5867
5801
|
]);
|
|
5868
5802
|
return { writeSchemaVersion, readSchemaVersion };
|
|
@@ -5870,8 +5804,8 @@ var caseSchemaVersions = async () => {
|
|
|
5870
5804
|
var registerTaskTypesCommand = (program, sources = { load: caseSchemaVersions }) => {
|
|
5871
5805
|
const taskTypes = program.command("task-types").description("The case task types: which an SDD may declare, which only Studio Web authors, and which spellings are not task types.");
|
|
5872
5806
|
taskTypes.command("list").description("List the case task types an SDD may declare (`Authorable`), the real types only Studio Web authors (`StudioWebOnly`), and spellings that name the right concept in another layer but are not task types (`NotTaskTypes`, each with the plan type to write). `WriteSchemaVersion` is what `sdd convert` stamps; `ReadSchemaVersion` is the newest a plan may declare and still validate. Reads nothing from the tenant.").examples(TASK_TYPES_LIST_EXAMPLES).trackedAction(processContext, async () => {
|
|
5873
|
-
const [error, declaration] = await
|
|
5874
|
-
const { taskTypeDeclaration } = await import("./task-type-declaration-
|
|
5807
|
+
const [error, declaration] = await catchError2((async () => {
|
|
5808
|
+
const { taskTypeDeclaration } = await import("./task-type-declaration-yhczvj05.js");
|
|
5875
5809
|
return taskTypeDeclaration(await sources.load());
|
|
5876
5810
|
})());
|
|
5877
5811
|
if (error) {
|
|
@@ -6009,9 +5943,9 @@ var TASKS_DESCRIBE_EXAMPLES = [
|
|
|
6009
5943
|
}
|
|
6010
5944
|
}
|
|
6011
5945
|
];
|
|
6012
|
-
var loadConnectorEnrichment = () => import("./connector-enrichment-service-
|
|
6013
|
-
var loadTriggerEnrichment = () => import("./trigger-enrichment-service-
|
|
6014
|
-
var loadEnrichment = () => import("./enrichment-service-
|
|
5946
|
+
var loadConnectorEnrichment = () => import("./connector-enrichment-service-mws6z0hw.js");
|
|
5947
|
+
var loadTriggerEnrichment = () => import("./trigger-enrichment-service-r4gmxvka.js");
|
|
5948
|
+
var loadEnrichment = () => import("./enrichment-service-wpprec7k.js");
|
|
6015
5949
|
var TASK_TYPES = [
|
|
6016
5950
|
"process",
|
|
6017
5951
|
"action",
|
|
@@ -6105,19 +6039,18 @@ function resolveLane(tasks, lane) {
|
|
|
6105
6039
|
return laneIndex;
|
|
6106
6040
|
}
|
|
6107
6041
|
async function loadConnectorStage(file, stageId, lane) {
|
|
6108
|
-
const [readError, schema] = await
|
|
6042
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
6109
6043
|
if (readError)
|
|
6110
6044
|
throw readError;
|
|
6111
|
-
const [findError, stageNode] =
|
|
6045
|
+
const [findError, stageNode] = catchError2(() => requireStageNode(schema, stageId));
|
|
6112
6046
|
if (findError)
|
|
6113
6047
|
throw findError;
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
const laneIndex = resolveLane(stageNode.data.tasks, lane);
|
|
6048
|
+
stageNode.data.tasks ??= [];
|
|
6049
|
+
const lanes = stageNode.data.tasks;
|
|
6050
|
+
const laneIndex = resolveLane(lanes, lane);
|
|
6118
6051
|
if (laneIndex < 0)
|
|
6119
6052
|
throw new Error(`Invalid lane index: ${lane}`);
|
|
6120
|
-
return { schema,
|
|
6053
|
+
return { schema, lanes, laneIndex };
|
|
6121
6054
|
}
|
|
6122
6055
|
function buildConnectorTask(params) {
|
|
6123
6056
|
const taskId = prefixedId("t", 8);
|
|
@@ -6166,10 +6099,10 @@ async function saveConnectorTask(params) {
|
|
|
6166
6099
|
}
|
|
6167
6100
|
const taskData = params.task.data;
|
|
6168
6101
|
taskData.bindings = usedBindings;
|
|
6169
|
-
params.
|
|
6170
|
-
const { designerConnectorShape } = await import("./connector-task-shape-
|
|
6102
|
+
params.lanes[params.laneIndex].push(params.task);
|
|
6103
|
+
const { designerConnectorShape } = await import("./connector-task-shape-bgywpbqc.js");
|
|
6171
6104
|
designerConnectorShape(params.task);
|
|
6172
|
-
const [writeError] = await
|
|
6105
|
+
const [writeError] = await catchError2(writeSchema(params.file, params.schema));
|
|
6173
6106
|
if (writeError)
|
|
6174
6107
|
throw writeError;
|
|
6175
6108
|
}
|
|
@@ -6186,7 +6119,7 @@ function deepMerge(target, source, unsafeKeys) {
|
|
|
6186
6119
|
return target;
|
|
6187
6120
|
}
|
|
6188
6121
|
async function applyInputValues(inputs, inputValues) {
|
|
6189
|
-
const { nestDottedKeys, UNSAFE_KEYS } = await
|
|
6122
|
+
const { nestDottedKeys, UNSAFE_KEYS } = await import("./index-n4g6qvab.js");
|
|
6190
6123
|
for (const input of inputs) {
|
|
6191
6124
|
const values = inputValues[input.name];
|
|
6192
6125
|
if (values && input.body) {
|
|
@@ -6198,7 +6131,7 @@ async function applyInputValues(inputs, inputValues) {
|
|
|
6198
6131
|
async function describeConnectorActivity(id, connectionId, indexType = "typecache-activities") {
|
|
6199
6132
|
const { enrichConnectorActivity, extractFieldDefinitions } = await loadConnectorEnrichment();
|
|
6200
6133
|
const result = await enrichConnectorActivity(id, connectionId, indexType);
|
|
6201
|
-
const [, fieldDefs] = await
|
|
6134
|
+
const [, fieldDefs] = await catchError2(extractFieldDefinitions(result.config.connectorKey, result.config.objectName, result.config.httpMethod, {
|
|
6202
6135
|
metadata: result._metadata,
|
|
6203
6136
|
methodConfig: result._methodConfig
|
|
6204
6137
|
}));
|
|
@@ -6230,7 +6163,7 @@ async function describeConnectorActivity(id, connectionId, indexType = "typecach
|
|
|
6230
6163
|
async function describeConnectorTrigger(id, connectionId) {
|
|
6231
6164
|
const { enrichConnectorTrigger, fetchTriggerFieldInfo } = await loadTriggerEnrichment();
|
|
6232
6165
|
const result = await enrichConnectorTrigger("wait-for", id, connectionId);
|
|
6233
|
-
const [, fieldInfo] = await
|
|
6166
|
+
const [, fieldInfo] = await catchError2(fetchTriggerFieldInfo(result.config.connectorKey, result.config.objectName, result.config.eventOperation));
|
|
6234
6167
|
const inputs = fieldInfo ? result.inputs.map((input) => {
|
|
6235
6168
|
const all = fieldInfo.allFields[input.name];
|
|
6236
6169
|
const defs = fieldInfo.fieldDefinitions[input.name];
|
|
@@ -6252,8 +6185,8 @@ async function describeConnectorTrigger(id, connectionId) {
|
|
|
6252
6185
|
const configStr = actPropConfig?.configuration;
|
|
6253
6186
|
let connectorVersion;
|
|
6254
6187
|
if (configStr) {
|
|
6255
|
-
const jsonStr = configStr
|
|
6256
|
-
const [parseErr, parsed] =
|
|
6188
|
+
const jsonStr = stripJsonStringGuard(configStr);
|
|
6189
|
+
const [parseErr, parsed] = catchError2(() => JSON.parse(jsonStr));
|
|
6257
6190
|
if (!parseErr) {
|
|
6258
6191
|
connectorVersion = parsed.essentialConfiguration?.connectorVersion ?? undefined;
|
|
6259
6192
|
}
|
|
@@ -6310,7 +6243,7 @@ var registerTasksCommand = (program) => {
|
|
|
6310
6243
|
processContext.exit(1);
|
|
6311
6244
|
return;
|
|
6312
6245
|
}
|
|
6313
|
-
const [readError, schema] = await
|
|
6246
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
6314
6247
|
if (readError) {
|
|
6315
6248
|
OutputFormatter.error({
|
|
6316
6249
|
Result: RESULTS.Failure,
|
|
@@ -6320,7 +6253,7 @@ var registerTasksCommand = (program) => {
|
|
|
6320
6253
|
processContext.exit(1);
|
|
6321
6254
|
return;
|
|
6322
6255
|
}
|
|
6323
|
-
const [findError, stageNode] =
|
|
6256
|
+
const [findError, stageNode] = catchError2(() => requireStageNode(schema, stageId));
|
|
6324
6257
|
if (findError) {
|
|
6325
6258
|
OutputFormatter.error({
|
|
6326
6259
|
Result: RESULTS.Failure,
|
|
@@ -6357,7 +6290,7 @@ var registerTasksCommand = (program) => {
|
|
|
6357
6290
|
const elementId = buildElementId(stageId, task.id);
|
|
6358
6291
|
const taskTypeId = options.taskTypeId;
|
|
6359
6292
|
const { enrichTask } = await loadEnrichment();
|
|
6360
|
-
const [enrichError, enrichment] = await
|
|
6293
|
+
const [enrichError, enrichment] = await catchError2(enrichTask(options.type, taskTypeId, { elementId }));
|
|
6361
6294
|
if (enrichError) {
|
|
6362
6295
|
OutputFormatter.error({
|
|
6363
6296
|
Result: RESULTS.Failure,
|
|
@@ -6380,7 +6313,7 @@ var registerTasksCommand = (program) => {
|
|
|
6380
6313
|
data.outputs = enrichment.outputs;
|
|
6381
6314
|
}
|
|
6382
6315
|
stageNode.data.tasks[laneIndex].push(task);
|
|
6383
|
-
const [writeError] = await
|
|
6316
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
6384
6317
|
if (writeError) {
|
|
6385
6318
|
OutputFormatter.error({
|
|
6386
6319
|
Result: RESULTS.Failure,
|
|
@@ -6431,7 +6364,7 @@ var registerTasksCommand = (program) => {
|
|
|
6431
6364
|
return;
|
|
6432
6365
|
}
|
|
6433
6366
|
if (options.inputValues) {
|
|
6434
|
-
const [parseErr] =
|
|
6367
|
+
const [parseErr] = catchError2(() => JSON.parse(options.inputValues));
|
|
6435
6368
|
if (parseErr) {
|
|
6436
6369
|
OutputFormatter.error({
|
|
6437
6370
|
Result: RESULTS.Failure,
|
|
@@ -6444,7 +6377,7 @@ var registerTasksCommand = (program) => {
|
|
|
6444
6377
|
}
|
|
6445
6378
|
const parsedInputValues = options.inputValues ? JSON.parse(options.inputValues) : undefined;
|
|
6446
6379
|
const isActivity = connectorType === "activity";
|
|
6447
|
-
const [error, result] = await
|
|
6380
|
+
const [error, result] = await catchError2((async () => {
|
|
6448
6381
|
const ctx = await loadConnectorStage(file, stageId, options.lane);
|
|
6449
6382
|
let enrichment;
|
|
6450
6383
|
let taskType;
|
|
@@ -6513,7 +6446,7 @@ var registerTasksCommand = (program) => {
|
|
|
6513
6446
|
processContext.exit(1);
|
|
6514
6447
|
return;
|
|
6515
6448
|
}
|
|
6516
|
-
const [readError, schema] = await
|
|
6449
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
6517
6450
|
if (readError) {
|
|
6518
6451
|
OutputFormatter.error({
|
|
6519
6452
|
Result: RESULTS.Failure,
|
|
@@ -6523,7 +6456,7 @@ var registerTasksCommand = (program) => {
|
|
|
6523
6456
|
processContext.exit(1);
|
|
6524
6457
|
return;
|
|
6525
6458
|
}
|
|
6526
|
-
const [findStageError, stageNode] =
|
|
6459
|
+
const [findStageError, stageNode] = catchError2(() => requireStageNode(schema, stageId));
|
|
6527
6460
|
if (findStageError) {
|
|
6528
6461
|
OutputFormatter.error({
|
|
6529
6462
|
Result: RESULTS.Failure,
|
|
@@ -6533,7 +6466,7 @@ var registerTasksCommand = (program) => {
|
|
|
6533
6466
|
processContext.exit(1);
|
|
6534
6467
|
return;
|
|
6535
6468
|
}
|
|
6536
|
-
const [findTaskError, found] =
|
|
6469
|
+
const [findTaskError, found] = catchError2(() => requireTask(stageNode.data.tasks ?? [], taskId, stageId));
|
|
6537
6470
|
if (findTaskError) {
|
|
6538
6471
|
OutputFormatter.error({
|
|
6539
6472
|
Result: RESULTS.Failure,
|
|
@@ -6575,7 +6508,7 @@ var registerTasksCommand = (program) => {
|
|
|
6575
6508
|
}
|
|
6576
6509
|
}
|
|
6577
6510
|
}
|
|
6578
|
-
const [writeError] = await
|
|
6511
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
6579
6512
|
if (writeError) {
|
|
6580
6513
|
OutputFormatter.error({
|
|
6581
6514
|
Result: RESULTS.Failure,
|
|
@@ -6599,7 +6532,7 @@ var registerTasksCommand = (program) => {
|
|
|
6599
6532
|
});
|
|
6600
6533
|
});
|
|
6601
6534
|
tasks.command("get").description("Print a single task from a stage").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage containing the task").argument("<task-id>", "ID of the task to retrieve").examples(TASKS_GET_EXAMPLES).trackedAction(processContext, async (file, stageId, taskId) => {
|
|
6602
|
-
const [readError, schema] = await
|
|
6535
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
6603
6536
|
if (readError) {
|
|
6604
6537
|
OutputFormatter.error({
|
|
6605
6538
|
Result: RESULTS.Failure,
|
|
@@ -6609,7 +6542,7 @@ var registerTasksCommand = (program) => {
|
|
|
6609
6542
|
processContext.exit(1);
|
|
6610
6543
|
return;
|
|
6611
6544
|
}
|
|
6612
|
-
const [findStageError, stageNode] =
|
|
6545
|
+
const [findStageError, stageNode] = catchError2(() => requireStageNode(schema, stageId));
|
|
6613
6546
|
if (findStageError) {
|
|
6614
6547
|
OutputFormatter.error({
|
|
6615
6548
|
Result: RESULTS.Failure,
|
|
@@ -6619,7 +6552,7 @@ var registerTasksCommand = (program) => {
|
|
|
6619
6552
|
processContext.exit(1);
|
|
6620
6553
|
return;
|
|
6621
6554
|
}
|
|
6622
|
-
const [findTaskError, found] =
|
|
6555
|
+
const [findTaskError, found] = catchError2(() => requireTask(stageNode.data.tasks ?? [], taskId, stageId));
|
|
6623
6556
|
if (findTaskError) {
|
|
6624
6557
|
OutputFormatter.error({
|
|
6625
6558
|
Result: RESULTS.Failure,
|
|
@@ -6642,7 +6575,7 @@ var registerTasksCommand = (program) => {
|
|
|
6642
6575
|
});
|
|
6643
6576
|
});
|
|
6644
6577
|
tasks.command("remove", { hidden: true }).description("Remove a task from a stage").argument("<file>", "Path to the case management JSON file").argument("<stage-id>", "ID of the stage containing the task").argument("<task-id>", "ID of the task to remove").examples(TASKS_REMOVE_EXAMPLES).trackedAction(processContext, async (file, stageId, taskId) => {
|
|
6645
|
-
const [readError, schema] = await
|
|
6578
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
6646
6579
|
if (readError) {
|
|
6647
6580
|
OutputFormatter.error({
|
|
6648
6581
|
Result: RESULTS.Failure,
|
|
@@ -6652,7 +6585,7 @@ var registerTasksCommand = (program) => {
|
|
|
6652
6585
|
processContext.exit(1);
|
|
6653
6586
|
return;
|
|
6654
6587
|
}
|
|
6655
|
-
const [findStageError, stageNode] =
|
|
6588
|
+
const [findStageError, stageNode] = catchError2(() => requireStageNode(schema, stageId));
|
|
6656
6589
|
if (findStageError) {
|
|
6657
6590
|
OutputFormatter.error({
|
|
6658
6591
|
Result: RESULTS.Failure,
|
|
@@ -6666,7 +6599,7 @@ var registerTasksCommand = (program) => {
|
|
|
6666
6599
|
stageNode.data.tasks = [];
|
|
6667
6600
|
}
|
|
6668
6601
|
const tasksList = stageNode.data.tasks;
|
|
6669
|
-
const [findTaskError, found] =
|
|
6602
|
+
const [findTaskError, found] = catchError2(() => requireTask(tasksList, taskId, stageId));
|
|
6670
6603
|
if (findTaskError) {
|
|
6671
6604
|
OutputFormatter.error({
|
|
6672
6605
|
Result: RESULTS.Failure,
|
|
@@ -6681,7 +6614,7 @@ var registerTasksCommand = (program) => {
|
|
|
6681
6614
|
while (tasksList.length > 0 && tasksList[tasksList.length - 1].length === 0) {
|
|
6682
6615
|
tasksList.pop();
|
|
6683
6616
|
}
|
|
6684
|
-
const [writeError] = await
|
|
6617
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
6685
6618
|
if (writeError) {
|
|
6686
6619
|
OutputFormatter.error({
|
|
6687
6620
|
Result: RESULTS.Failure,
|
|
@@ -6714,7 +6647,7 @@ var registerTasksCommand = (program) => {
|
|
|
6714
6647
|
return;
|
|
6715
6648
|
}
|
|
6716
6649
|
const { enrichTask } = await loadEnrichment();
|
|
6717
|
-
const [error, result] = await
|
|
6650
|
+
const [error, result] = await catchError2(enrichTask(normalizedType, options.id, {
|
|
6718
6651
|
elementId: options.elementId
|
|
6719
6652
|
}));
|
|
6720
6653
|
if (error) {
|
|
@@ -6733,7 +6666,7 @@ var registerTasksCommand = (program) => {
|
|
|
6733
6666
|
}, { preserveDataKeys: VERBATIM_TASK_IO_FIELDS });
|
|
6734
6667
|
});
|
|
6735
6668
|
tasks.command("describe").description(`Describe a task type's input/output metadata for binding discovery. ${OUTPUT_CASING_HINT}`).requiredOption("--type <type>", `Task type: ${DESCRIBABLE_TYPES.join(", ")}`).requiredOption("--id <id>", "Unique ID of the task (entityKey or action-app id)").option("--connection-id <connectionId>", "Connection UUID (required for connector-activity type)").examples(TASKS_DESCRIBE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
6736
|
-
const [error, result] = await
|
|
6669
|
+
const [error, result] = await catchError2(runDescribeTask(options));
|
|
6737
6670
|
if (error) {
|
|
6738
6671
|
OutputFormatter.error({
|
|
6739
6672
|
Result: RESULTS.Failure,
|
|
@@ -6847,11 +6780,11 @@ function buildTimeCycle(options) {
|
|
|
6847
6780
|
return `${repetition}/${duration}`;
|
|
6848
6781
|
}
|
|
6849
6782
|
function computeTriggerPosition(existingTriggers) {
|
|
6850
|
-
|
|
6783
|
+
const ys = existingTriggers.flatMap((t) => t.position ? [t.position.y] : []);
|
|
6784
|
+
if (ys.length === 0) {
|
|
6851
6785
|
return { x: TRIGGER_X, y: TRIGGER_START_Y };
|
|
6852
6786
|
}
|
|
6853
|
-
|
|
6854
|
-
return { x: TRIGGER_X, y: maxY + TRIGGER_Y_STEP };
|
|
6787
|
+
return { x: TRIGGER_X, y: Math.max(...ys) + TRIGGER_Y_STEP };
|
|
6855
6788
|
}
|
|
6856
6789
|
function parsePosition2(value) {
|
|
6857
6790
|
const parts = value.split(",");
|
|
@@ -6885,7 +6818,7 @@ function buildBaseTriggerNode(schema, displayName, explicitPosition, description
|
|
|
6885
6818
|
return { node, triggerId, resolvedName };
|
|
6886
6819
|
}
|
|
6887
6820
|
async function readAndBuildTrigger(file, displayName, position, description) {
|
|
6888
|
-
const [readError, schema] = await
|
|
6821
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
6889
6822
|
if (readError) {
|
|
6890
6823
|
OutputFormatter.error({
|
|
6891
6824
|
Result: RESULTS.Failure,
|
|
@@ -6895,7 +6828,7 @@ async function readAndBuildTrigger(file, displayName, position, description) {
|
|
|
6895
6828
|
processContext.exit(1);
|
|
6896
6829
|
return { error: true };
|
|
6897
6830
|
}
|
|
6898
|
-
const [posError, buildResult] =
|
|
6831
|
+
const [posError, buildResult] = catchError2(() => buildBaseTriggerNode(schema, displayName, position, description));
|
|
6899
6832
|
if (posError) {
|
|
6900
6833
|
OutputFormatter.error({
|
|
6901
6834
|
Result: RESULTS.Failure,
|
|
@@ -6909,7 +6842,7 @@ async function readAndBuildTrigger(file, displayName, position, description) {
|
|
|
6909
6842
|
return { error: false, schema, node, triggerId, resolvedName };
|
|
6910
6843
|
}
|
|
6911
6844
|
async function appendEntryPoint(file, triggerId, displayName) {
|
|
6912
|
-
const fs =
|
|
6845
|
+
const fs = getFileSystem2();
|
|
6913
6846
|
const dir = fs.path.dirname(fs.path.resolve(file));
|
|
6914
6847
|
const entryPointsPath = fs.path.join(dir, "entry-points.json");
|
|
6915
6848
|
const content = await fs.readFile(entryPointsPath, "utf-8");
|
|
@@ -6929,7 +6862,7 @@ async function appendEntryPoint(file, triggerId, displayName) {
|
|
|
6929
6862
|
await fs.writeFile(entryPointsPath, JSON.stringify(entryPointsJson, null, 4));
|
|
6930
6863
|
}
|
|
6931
6864
|
async function saveTrigger(file, schema, node) {
|
|
6932
|
-
const fs =
|
|
6865
|
+
const fs = getFileSystem2();
|
|
6933
6866
|
const dir = fs.path.dirname(fs.path.resolve(file));
|
|
6934
6867
|
const entryPointsPath = fs.path.join(dir, "entry-points.json");
|
|
6935
6868
|
if (!await fs.exists(entryPointsPath)) {
|
|
@@ -6942,7 +6875,7 @@ async function saveTrigger(file, schema, node) {
|
|
|
6942
6875
|
return false;
|
|
6943
6876
|
}
|
|
6944
6877
|
schema.nodes.push(node);
|
|
6945
|
-
const [writeError] = await
|
|
6878
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
6946
6879
|
if (writeError) {
|
|
6947
6880
|
OutputFormatter.error({
|
|
6948
6881
|
Result: RESULTS.Failure,
|
|
@@ -6952,7 +6885,7 @@ async function saveTrigger(file, schema, node) {
|
|
|
6952
6885
|
processContext.exit(1);
|
|
6953
6886
|
return false;
|
|
6954
6887
|
}
|
|
6955
|
-
const [entryPointError] = await
|
|
6888
|
+
const [entryPointError] = await catchError2(appendEntryPoint(file, node.id, node.data.label ?? node.id));
|
|
6956
6889
|
if (entryPointError) {
|
|
6957
6890
|
OutputFormatter.error({
|
|
6958
6891
|
Result: RESULTS.Failure,
|
|
@@ -6998,7 +6931,7 @@ var registerTriggersCommand = (program) => {
|
|
|
6998
6931
|
if (options.timeCycle) {
|
|
6999
6932
|
timeCycle = options.timeCycle;
|
|
7000
6933
|
} else {
|
|
7001
|
-
const [parseError, parsed] =
|
|
6934
|
+
const [parseError, parsed] = catchError2(() => buildTimeCycle({
|
|
7002
6935
|
every: options.every,
|
|
7003
6936
|
at: options.at,
|
|
7004
6937
|
repeat: options.repeat
|
|
@@ -7040,7 +6973,7 @@ var registerTriggersCommand = (program) => {
|
|
|
7040
6973
|
triggers.command("add-event", { hidden: true }).description("Add a connector event trigger to a case management definition").argument("<file>", "Path to the case management JSON file").requiredOption("--type-id <id>", "uiPathActivityTypeId from TypeCache triggers").requiredOption("--connection-id <id>", "Connection UUID to bind to the trigger").option("--event-params <json>", "JSON object of event parameter key/value pairs. A filters.expression is auto-generated from them.").option("-d, --display-name <name>", "Display name for the trigger (auto: Trigger N)").option("--position <x,y>", "Explicit position (default: auto-stacked left of stages)").option("--description <description>", "Description of the trigger").examples(TRIGGERS_ADD_EVENT_EXAMPLES).trackedAction(processContext, async (file, options) => {
|
|
7041
6974
|
let parsedEventParams;
|
|
7042
6975
|
if (options.eventParams) {
|
|
7043
|
-
const [parseErr, parsed] =
|
|
6976
|
+
const [parseErr, parsed] = catchError2(() => JSON.parse(options.eventParams));
|
|
7044
6977
|
if (parseErr) {
|
|
7045
6978
|
OutputFormatter.error({
|
|
7046
6979
|
Result: RESULTS.Failure,
|
|
@@ -7055,8 +6988,8 @@ var registerTriggersCommand = (program) => {
|
|
|
7055
6988
|
const result = await readAndBuildTrigger(file, options.displayName, options.position, options.description);
|
|
7056
6989
|
if (result.error)
|
|
7057
6990
|
return;
|
|
7058
|
-
const { enrichConnectorTrigger } = await import("./trigger-enrichment-service-
|
|
7059
|
-
const [enrichError, enrichment] = await
|
|
6991
|
+
const { enrichConnectorTrigger } = await import("./trigger-enrichment-service-r4gmxvka.js");
|
|
6992
|
+
const [enrichError, enrichment] = await catchError2(enrichConnectorTrigger("start", options.typeId, options.connectionId, parsedEventParams));
|
|
7060
6993
|
if (enrichError) {
|
|
7061
6994
|
OutputFormatter.error({
|
|
7062
6995
|
Result: RESULTS.Failure,
|
|
@@ -7188,12 +7121,12 @@ var toIssueData = (issues) => issues.map((issue) => ({
|
|
|
7188
7121
|
Severity: issue.severity
|
|
7189
7122
|
}));
|
|
7190
7123
|
var suppressedAudit = async (file, shown) => {
|
|
7191
|
-
const { findAdjacentSdd } = await import("./sdd-lookup-
|
|
7192
|
-
const [lookupError, sdd] = await
|
|
7124
|
+
const { findAdjacentSdd } = await import("./sdd-lookup-sah7wj5j.js");
|
|
7125
|
+
const [lookupError, sdd] = await catchError2(Promise.resolve(findAdjacentSdd(file)));
|
|
7193
7126
|
if (lookupError || sdd === undefined)
|
|
7194
7127
|
return;
|
|
7195
|
-
const { CaseValidateService } = await import("./case-validate-service-
|
|
7196
|
-
const [auditError, audited] = await
|
|
7128
|
+
const { CaseValidateService } = await import("./case-validate-service-4zdx7d2w.js");
|
|
7129
|
+
const [auditError, audited] = await catchError2(new CaseValidateService().validateFileUsingSDK(file, {
|
|
7197
7130
|
profile: "strict",
|
|
7198
7131
|
sddPath: sdd
|
|
7199
7132
|
}));
|
|
@@ -7208,9 +7141,9 @@ var suppressedAudit = async (file, shown) => {
|
|
|
7208
7141
|
};
|
|
7209
7142
|
};
|
|
7210
7143
|
var executeCaseValidate = async (file, options = {}) => {
|
|
7211
|
-
const { CaseValidateService } = await import("./case-validate-service-
|
|
7144
|
+
const { CaseValidateService } = await import("./case-validate-service-4zdx7d2w.js");
|
|
7212
7145
|
const service = new CaseValidateService;
|
|
7213
|
-
const [error, result] = await
|
|
7146
|
+
const [error, result] = await catchError2(service.validateFileUsingSDK(file, {
|
|
7214
7147
|
profile: resolveProfile(options),
|
|
7215
7148
|
sddPath: options.sdd
|
|
7216
7149
|
}));
|
|
@@ -7334,6 +7267,11 @@ function setNestedField(obj, path, value) {
|
|
|
7334
7267
|
}
|
|
7335
7268
|
node[path[path.length - 1]] = value;
|
|
7336
7269
|
}
|
|
7270
|
+
function taskVariables(task, key) {
|
|
7271
|
+
if (task.type === "wait-for-timer")
|
|
7272
|
+
return;
|
|
7273
|
+
return task.data?.[key];
|
|
7274
|
+
}
|
|
7337
7275
|
function failBind(instructions) {
|
|
7338
7276
|
OutputFormatter.error({
|
|
7339
7277
|
Result: RESULTS.Failure,
|
|
@@ -7371,7 +7309,7 @@ function resolveBindValue(schema, options) {
|
|
|
7371
7309
|
const sourceOutputName = options.sourceOutput;
|
|
7372
7310
|
const srcStageNode = requireStageNode(schema, sourceStageId);
|
|
7373
7311
|
const srcFound = requireTask(srcStageNode.data.tasks ?? [], sourceTaskId, sourceStageId);
|
|
7374
|
-
const srcOutputs = srcFound.task
|
|
7312
|
+
const srcOutputs = taskVariables(srcFound.task, "outputs") ?? [];
|
|
7375
7313
|
const srcOutput = srcOutputs.find((io) => io.name === sourceOutputName);
|
|
7376
7314
|
if (!srcOutput) {
|
|
7377
7315
|
throw new Error(`Output not found with name: ${sourceOutputName} in task: ${sourceTaskId}`);
|
|
@@ -7444,29 +7382,29 @@ var registerVarCommand = (program) => {
|
|
|
7444
7382
|
failBind(validationError);
|
|
7445
7383
|
return;
|
|
7446
7384
|
}
|
|
7447
|
-
const [readError, schema] = await
|
|
7385
|
+
const [readError, schema] = await catchError2(readSchema(file));
|
|
7448
7386
|
if (readError) {
|
|
7449
7387
|
failBind(readError.message);
|
|
7450
7388
|
return;
|
|
7451
7389
|
}
|
|
7452
|
-
const [findStageError, stageNode] =
|
|
7390
|
+
const [findStageError, stageNode] = catchError2(() => requireStageNode(schema, stageId));
|
|
7453
7391
|
if (findStageError) {
|
|
7454
7392
|
failBind(findStageError.message);
|
|
7455
7393
|
return;
|
|
7456
7394
|
}
|
|
7457
|
-
const [findTaskError, found] =
|
|
7395
|
+
const [findTaskError, found] = catchError2(() => requireTask(stageNode.data.tasks ?? [], taskId, stageId));
|
|
7458
7396
|
if (findTaskError) {
|
|
7459
7397
|
failBind(findTaskError.message);
|
|
7460
7398
|
return;
|
|
7461
7399
|
}
|
|
7462
7400
|
const { task } = found;
|
|
7463
|
-
const inputs = task
|
|
7401
|
+
const inputs = taskVariables(task, "inputs");
|
|
7464
7402
|
const input = inputs?.find((io) => io.name === inputName);
|
|
7465
7403
|
if (!input) {
|
|
7466
7404
|
failBind(`Input "${inputName}" not found in task "${taskId}". Available: ${inputs?.map((io) => io.name).join(", ") ?? "none"}`);
|
|
7467
7405
|
return;
|
|
7468
7406
|
}
|
|
7469
|
-
const [resolveError, resolved] =
|
|
7407
|
+
const [resolveError, resolved] = catchError2(() => resolveBindValue(schema, options));
|
|
7470
7408
|
if (resolveError) {
|
|
7471
7409
|
failBind(resolveError.message);
|
|
7472
7410
|
return;
|
|
@@ -7475,13 +7413,13 @@ var registerVarCommand = (program) => {
|
|
|
7475
7413
|
if (fieldKeys.length === 0) {
|
|
7476
7414
|
input.value = resolvedValue;
|
|
7477
7415
|
} else {
|
|
7478
|
-
const [nestedError] =
|
|
7416
|
+
const [nestedError] = catchError2(() => setNestedField(input, fieldKeys, resolvedValue));
|
|
7479
7417
|
if (nestedError) {
|
|
7480
7418
|
failBind(nestedError.message);
|
|
7481
7419
|
return;
|
|
7482
7420
|
}
|
|
7483
7421
|
}
|
|
7484
|
-
const [writeError] = await
|
|
7422
|
+
const [writeError] = await catchError2(writeSchema(file, schema));
|
|
7485
7423
|
if (writeError) {
|
|
7486
7424
|
failBind(writeError.message);
|
|
7487
7425
|
return;
|
|
@@ -7566,7 +7504,9 @@ function deprecateCaseAuthoringMutators(program) {
|
|
|
7566
7504
|
if (!command) {
|
|
7567
7505
|
throw new Error(`Cannot deprecate missing case command: ${commandName}`);
|
|
7568
7506
|
}
|
|
7569
|
-
command.registeredArguments
|
|
7507
|
+
for (const argument of command.registeredArguments) {
|
|
7508
|
+
argument.required = false;
|
|
7509
|
+
}
|
|
7570
7510
|
for (const option of command.options) {
|
|
7571
7511
|
option.mandatory = false;
|
|
7572
7512
|
}
|
|
@@ -7592,14 +7532,14 @@ function deprecateCaseAuthoringMutators(program) {
|
|
|
7592
7532
|
}
|
|
7593
7533
|
|
|
7594
7534
|
// src/tool.ts
|
|
7595
|
-
var
|
|
7535
|
+
var metadata2 = {
|
|
7596
7536
|
name: "case-tool",
|
|
7597
7537
|
version: package_default.version,
|
|
7598
7538
|
description: "UiPath Case Tool for managing Case processes, jobs and instances",
|
|
7599
7539
|
commandPrefix: "case"
|
|
7600
7540
|
};
|
|
7601
|
-
var
|
|
7602
|
-
const { registerCaseAuthoringCommands } = await import("./authoring-
|
|
7541
|
+
var registerCommands2 = async (program) => {
|
|
7542
|
+
const { registerCaseAuthoringCommands } = await import("./authoring-vg90pqrn.js");
|
|
7603
7543
|
registerCaseAuthoringCommands(program);
|
|
7604
7544
|
registerInitCommand(program);
|
|
7605
7545
|
registerSddCommand(program);
|
|
@@ -7617,6 +7557,7 @@ var registerCommands = async (program) => {
|
|
|
7617
7557
|
registerStagesCommand(program);
|
|
7618
7558
|
registerTasksCommand(program);
|
|
7619
7559
|
registerTaskTypesCommand(program);
|
|
7560
|
+
registerRuleTypesCommand(program);
|
|
7620
7561
|
registerSlaCommand(program);
|
|
7621
7562
|
registerSpecCommand(program);
|
|
7622
7563
|
registerSpliceCommand(program);
|
|
@@ -7632,6 +7573,6 @@ var registerCommands = async (program) => {
|
|
|
7632
7573
|
deprecateCaseAuthoringMutators(program);
|
|
7633
7574
|
};
|
|
7634
7575
|
|
|
7635
|
-
export {
|
|
7576
|
+
export { metadata2, registerCommands2 };
|
|
7636
7577
|
|
|
7637
|
-
//# debugId=
|
|
7578
|
+
//# debugId=AABBEA40EC2D73BA64756E2164756E21
|