@uipath/maestro-tool 1.202.2 → 1.203.0-preview.180
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/README.md +8 -0
- package/dist/THIRD-PARTY-NOTICES.md +83 -290
- package/dist/{authoring-818595dq.js → authoring-at68vr5g.js} +7 -5
- package/dist/{authoring-6r3wx3fa.js → authoring-sh284a0x.js} +3 -3
- package/dist/{authoring-61hqf5em.js → authoring-szfy0rh1.js} +5 -5
- package/dist/{binding-service-643e69bb.js → binding-service-8a05gy4k.js} +37 -29
- package/dist/{bpmn-action-type-validator-kx36sqhe.js → bpmn-action-type-validator-8kvyvvcf.js} +2 -2
- package/dist/bpmn-binding-resolver-5scq28mc.js +145 -0
- package/dist/{bpmn-branch-y1m9f10n.js → bpmn-branch-t12a7jvf.js} +50 -44
- package/dist/bpmn-format-service-ay6jd9he.js +69 -0
- package/dist/{bpmn-refresh-service-ew545y06.js → bpmn-refresh-service-ak1ctkwg.js} +4 -4
- package/dist/{bpmn-update-metadata-service-jhahhjab.js → bpmn-update-metadata-service-hqe4edze.js} +6 -5
- package/dist/{bpmn-validate-service-6z2dj8ac.js → bpmn-validate-service-48sfy3a2.js} +3 -3
- package/dist/{case-api-4mstfkzf.js → case-api-e3fmq685.js} +6 -6
- package/dist/case-bindings-service-nswc6v0v.js +240 -0
- package/dist/case-debug-studio-web-service-58gtqznh.js +135 -0
- package/dist/case-format-service-6s5e1ckk.js +84 -0
- package/dist/{case-pack-service-v7wtb0qt.js → case-pack-service-sg435he1.js} +62 -11
- package/dist/{case-validate-service-bnpaf0zt.js → case-validate-service-7s69shsa.js} +1424 -42
- package/dist/{connector-enrichment-service-scrqnke3.js → connector-enrichment-service-9rqr3esj.js} +27 -26
- package/dist/{connector-lookup-service-hnk08t3m.js → connector-lookup-service-pencasp9.js} +5 -5
- package/dist/{connector-service-581bhxaj.js → connector-service-k4cgcv2b.js} +224 -56
- package/dist/{connector-task-spec-y2tcthz5.js → connector-task-spec-13ex0x0m.js} +27 -26
- package/dist/{conversion-FQTRFHRX-03xh3xbp.js → conversion-FQTRFHRX-0y9br7gw.js} +6 -5
- package/dist/de-FGHEJRCI-gn4cf5gh.js +2697 -0
- package/dist/de-MUJPA4EB-dpg7t2rw.js +173 -0
- package/dist/{debug-conversation-trigger-nj04k7s2.js → debug-conversation-trigger-wgzjaasj.js} +17 -14
- package/dist/{debug-http-client-c4teyma3.js → debug-http-client-7dvbwp96.js} +2 -2
- package/dist/{debug-service-m5jdyz3q.js → debug-service-8cwxhgww.js} +3 -3
- package/dist/{edge-service-vv2yfsn4.js → edge-service-szpsaezp.js} +17 -14
- package/dist/{index-yqfqxh2r.js → embedded-file-reader-0sjt4nkj.js} +96 -16641
- package/dist/{en-TBNO2WUV-rfe87pgh.js → en-BWGKA5OE-1qkvb9rn.js} +2 -2
- package/dist/en-FBPVNKFN-dqt573xn.js +138 -0
- package/dist/en-TBNO2WUV-9nan43e5.js +1936 -0
- package/dist/{enrichment-service-a65qt7y1.js → enrichment-service-7n1tf75p.js} +4 -4
- package/dist/es-7SE7HX2X-8yh1aj2y.js +173 -0
- package/dist/es-KR3ZSNMP-0cszm2n3.js +2697 -0
- package/dist/es-MX-2MYFZU7X-3rek4r73.js +173 -0
- package/dist/es-MX-XXZJGC4R-b4fbwe9d.js +2697 -0
- package/dist/first-party-service-srxaftkn.js +27 -0
- package/dist/{flow-api-vqvvs0q2.js → flow-api-4vkpbmt3.js} +7 -7
- package/dist/{flow-debug-service-vd7bdyhg.js → flow-debug-service-9tad5ckh.js} +66 -41
- package/dist/{flow-eval-node-target-mve3v55h.js → flow-eval-node-target-g222rh2e.js} +22 -15
- package/dist/flow-eval-run-api-hashjgq1.js +13 -0
- package/dist/{flow-eval-run-service-rt9kg4wx.js → flow-eval-run-service-btghb02r.js} +109 -224
- package/dist/{flow-eval-service-ededh59n.js → flow-eval-service-ma5psrsd.js} +346 -302
- package/dist/{flow-init-service-4ve9tr0t.js → flow-init-service-662zhfd3.js} +22 -18
- package/dist/{flow-io-2dd3sx38.js → flow-io-3cqz0svg.js} +16 -13
- package/dist/{flow-migrate-service-nbe6et60.js → flow-migrate-service-ehx7nmsr.js} +18 -14
- package/dist/{flow-pack-service-b2n877d8.js → flow-pack-service-a3w3489r.js} +43 -35
- package/dist/flow-validate-service-02e21w4d.js +3555 -0
- package/dist/fr-MDFKNZ4C-h4a122k9.js +173 -0
- package/dist/fr-Y6NPVODW-q5ef3htr.js +2697 -0
- package/dist/{governance-fetcher-at165287.js → governance-fetcher-7vxmap1e.js} +5 -4
- package/dist/{headless-85f2cys0.js → headless-627q5my5.js} +42909 -1756
- package/dist/{hitl-service-xn1bt80z.js → hitl-service-fn94tk6z.js} +16 -13
- package/dist/{index-hfsfzg4k.js → index-3arytfxn.js} +6 -4
- package/dist/{index-d1yqqk6q.js → index-55cym5j7.js} +6 -4
- package/dist/{index-0j6xww0f.js → index-9f94yk28.js} +3 -3
- package/dist/{index-1kgxzh8x.js → index-fz4ttsde.js} +14 -2
- package/dist/index-gvwc29bb.js +16742 -0
- package/dist/{index-mkgrn150.js → index-j1azsfr5.js} +36 -33
- package/dist/index-kmp9fmhb.js +25 -0
- package/dist/{index-938ee96p.js → index-rtg24r4x.js} +1 -1
- package/dist/index-tzccx5ym.js +2961 -0
- package/dist/{index-acd6bpqc.js → index-ymsd3pyx.js} +12 -15
- package/dist/index.js +3 -3
- package/dist/{input-reader-1wda1a2v.js → input-reader-7pzkcw6t.js} +1 -1
- package/dist/{input-reader-svafwk7x.js → input-reader-j8rvde4z.js} +1 -1
- package/dist/ja-Q5PXKJ2V-tzf2rvz2.js +2697 -0
- package/dist/ja-UTQEAP34-8e0q6swp.js +173 -0
- package/dist/known-types-8dhhqk35.js +19 -0
- package/dist/ko-AXCHW2OK-askct7f6.js +173 -0
- package/dist/ko-AYBDSRZG-am0h0m2r.js +2697 -0
- package/dist/{maestro-automate-entry-gwntzkvj.js → maestro-automate-entry-jehpbg37.js} +2 -2
- package/dist/{maestro-debug-service-dvh7qbx8.js → maestro-debug-service-xhtszkrc.js} +10 -10
- package/dist/{maestro-pack-service-fam5zdm3.js → maestro-pack-service-fkkc5g3v.js} +12 -6
- package/dist/{node-ks3095fb.js → node-p4bde6qy.js} +2344 -376
- package/dist/node-service-frvz67y3.js +83 -0
- package/dist/{node-sync-service-zwvm30qg.js → node-sync-service-wa2t7c65.js} +14 -14
- package/dist/{packager-tool-me5q0naa.js → packager-tool-095jzn8v.js} +16 -6
- package/dist/{packager-tool-y5f2qhfe.js → packager-tool-19030vpg.js} +32 -2
- package/dist/{packager-tool-gtqkcj4x.js → packager-tool-2c1rbj85.js} +310 -13
- package/dist/packager-tool-2q1mffef.js +261 -0
- package/dist/{flow-validate-service-0hxf5080.js → packager-tool-2xrng5ff.js} +1956 -3065
- package/dist/{packager-tool-8dgxmjzx.js → packager-tool-30ky51ca.js} +6 -3
- package/dist/{packager-tool-d5mjdpbf.js → packager-tool-4r35ye9r.js} +5 -4
- package/dist/packager-tool-53w8skv5.js +262 -0
- package/dist/{packager-tool-db4jm1rz.js → packager-tool-56gcg9de.js} +1 -1
- package/dist/{packager-tool-29eg86w6.js → packager-tool-6rsegsby.js} +6 -7
- package/dist/packager-tool-7msx23gd.js +13 -0
- package/dist/packager-tool-7q6z6npd.js +1937 -0
- package/dist/packager-tool-8qp60s20.js +12 -0
- package/dist/{packager-tool-s1r7krkp.js → packager-tool-9pccpz3r.js} +1 -1
- package/dist/{packager-tool-m351tkkr.js → packager-tool-c95fhhys.js} +30 -8
- package/dist/{packager-tool-kg5sxneg.js → packager-tool-cmzzh4f8.js} +72 -73
- package/dist/{packager-tool-ffvmys2r.js → packager-tool-cr0z8cbj.js} +5 -5
- package/dist/{packager-tool-8fkt71n4.js → packager-tool-cs1ec1da.js} +4 -3
- package/dist/{packager-tool-xatnrtwp.js → packager-tool-d2813z49.js} +9 -9
- package/dist/packager-tool-d88rqwk8.js +135 -0
- package/dist/{packager-tool-pm3qh1hy.js → packager-tool-dh5nppv4.js} +1 -1
- package/dist/packager-tool-dqxz5v18.js +486 -0
- package/dist/{packager-tool-r87gxwqa.js → packager-tool-e87tzg4y.js} +2 -2
- package/dist/{packager-tool-w9fd7vzs.js → packager-tool-f33sg3vr.js} +9 -9
- package/dist/{packager-tool-cj2ka9jr.js → packager-tool-fer9mdsq.js} +2 -2
- package/dist/{packager-tool-70eh7rpg.js → packager-tool-fm67whdy.js} +23 -5
- package/dist/packager-tool-fq7wtkd3.js +21012 -0
- package/dist/packager-tool-fvm2dddf.js +6297 -0
- package/dist/packager-tool-gdtpsdn7.js +342 -0
- package/dist/{packager-tool-ejyeka5x.js → packager-tool-gpwec9sp.js} +2 -2
- package/dist/{packager-tool-pap09zfh.js → packager-tool-h8x54cvx.js} +1 -1
- package/dist/{packager-tool-9vh3df76.js → packager-tool-hdmhxdch.js} +7 -7
- package/dist/packager-tool-hnyecbk6.js +88 -0
- package/dist/{packager-tool-mtbak8t4.js → packager-tool-j00gcgbs.js} +2 -2
- package/dist/packager-tool-j78fwwhq.js +16 -0
- package/dist/packager-tool-jysvpt8p.js +11 -0
- package/dist/{packager-tool-jfv7t0c8.js → packager-tool-kb554twx.js} +94 -94
- package/dist/{packager-tool-k4x5yn3p.js → packager-tool-khm7zsm8.js} +4 -1
- package/dist/packager-tool-kj0qc4f4.js +269 -0
- package/dist/{packager-tool-12636p2y.js → packager-tool-mcjjj1hk.js} +4 -4
- package/dist/{packager-tool-bftjhmqz.js → packager-tool-mfrdmqmt.js} +124 -2
- package/dist/{packager-tool-qgh5yaeh.js → packager-tool-mj89jhvb.js} +1 -1
- package/dist/{packager-tool-ve35117x.js → packager-tool-mjz4hma1.js} +5791 -176
- package/dist/packager-tool-paq9c70w.js +1332 -0
- package/dist/{packager-tool-d8v984ah.js → packager-tool-q2gwvnf5.js} +15 -56
- package/dist/{packager-tool-nmznynbj.js → packager-tool-qff6ang6.js} +1 -1
- package/dist/{packager-tool-j79gbsee.js → packager-tool-rg5pkkf0.js} +6 -6
- package/dist/{packager-tool-7309ymg1.js → packager-tool-s1466723.js} +10 -13
- package/dist/{packager-tool-54b4v7wp.js → packager-tool-te6rrpsz.js} +205 -195
- package/dist/packager-tool-vcjq9xkc.js +1895 -0
- package/dist/{packager-tool-w20r6n9v.js → packager-tool-vck7ct1e.js} +2877 -2221
- package/dist/{packager-tool-e8td7b01.js → packager-tool-vdc8r21p.js} +10328 -16610
- package/dist/{packager-tool-nxw5yzs7.js → packager-tool-vqcnvaae.js} +1 -1
- package/dist/{packager-tool-7rz102fw.js → packager-tool-wd01egnx.js} +1 -1
- package/dist/{packager-tool-gxqd24n0.js → packager-tool-wger1vt9.js} +7 -7
- package/dist/{packager-tool-a6yfnjgx.js → packager-tool-wynrdnqj.js} +1 -1
- package/dist/packager-tool-x0eamrk4.js +104577 -0
- package/dist/packager-tool-x92czn5x.js +208 -0
- package/dist/{packager-tool-am67sn1c.js → packager-tool-xtkgeccn.js} +1 -1
- package/dist/packager-tool-y59jhapb.js +10369 -0
- package/dist/{packager-tool-317z6dc1.js → packager-tool-ydg78w9z.js} +23 -23
- package/dist/{packager-tool-rr8hveb9.js → packager-tool-ygrrb1zh.js} +1 -1
- package/dist/{packager-tool-f0kd5kq4.js → packager-tool-yrsrzz1a.js} +127 -12
- package/dist/{packager-tool-d9dpx9wn.js → packager-tool-z185rq2a.js} +1 -1
- package/dist/{packager-tool-79gws1zn.js → packager-tool-z6nkdv48.js} +270 -24
- package/dist/{packager-tool-802qm7jy.js → packager-tool-zzxt99e4.js} +3 -3
- package/dist/packager-tool.js +75 -218
- package/dist/{project-artifacts-9z7atbk7.js → project-artifacts-h5cydk2n.js} +1 -1
- package/dist/{project-validator-0rkrfmj0.js → project-validator-ek97s27p.js} +1 -1
- package/dist/pt-3DIO5QWG-59b3f4bc.js +173 -0
- package/dist/pt-BR-TKHNHMET-dn6zxk1d.js +2697 -0
- package/dist/pt-BR-Y6K6XHXK-mp3hwhw1.js +173 -0
- package/dist/pt-ROXU257Y-yd80gx6s.js +2697 -0
- package/dist/{resourcesSyncService-3pajvveg.js → resourcesSyncService-7s92g1hm.js} +28 -27
- package/dist/ro-AVAWPKOO-42m6am1w.js +2697 -0
- package/dist/ro-BWR3ONRR-vzx3hy8a.js +173 -0
- package/dist/ru-GSCT4ARZ-jrxwev63.js +10 -0
- package/dist/ru-WBLQ5B2U-s4em88p0.js +10 -0
- package/dist/sdd-lookup-7h7j2h6v.js +48 -0
- package/dist/{serialization-BXU6AKAN-dk0sqx89.js → serialization-BXU6AKAN-0ghhrsja.js} +6 -5
- package/dist/{shared-utils-twgpb9ax.js → shared-utils-6z7gnnc8.js} +1 -1
- package/dist/{strict-case-rules-zxnq80zm.js → strict-case-rules-byym8cvc.js} +141 -109
- package/dist/strict-sdd-audit-v156c9e3.js +2520 -0
- package/dist/tidy-service-zyy7wxc0.js +39 -0
- package/dist/{tool-pxfafj3m.js → tool-dejjyv8m.js} +213 -51
- package/dist/{tool-td30zmyt.js → tool-v0r5qzcc.js} +106 -146
- package/dist/tool.js +3 -3
- package/dist/tr-5IIHSFW5-hw4cewew.js +173 -0
- package/dist/tr-JMIP7ZSL-fb67ft9w.js +2696 -0
- package/dist/{trigger-enrichment-service-t3wcd12r.js → trigger-enrichment-service-ak1nrz5t.js} +30 -29
- package/dist/{variable-service-2q705dsx.js → variable-service-t9gsp8xs.js} +16 -13
- package/dist/{wait-for-flow-job-sx0ht8sb.js → wait-for-flow-job-1s8ka07s.js} +7 -7
- package/dist/{xml-949787yf.js → xml-3rzcgm9z.js} +1359 -659
- package/dist/zh-CN-IFFXSEJS-tke4mzty.js +2697 -0
- package/dist/zh-CN-R2KU4U5L-tc1hat59.js +173 -0
- package/dist/zh-TW-GNKMELBF-j674515r.js +173 -0
- package/dist/zh-TW-IYBNYAMG-wcan0qpb.js +2697 -0
- package/package.json +3 -2
- package/dist/bpmn-format-service-r67afbny.js +0 -477
- package/dist/case-debug-studio-web-service-kj1797m8.js +0 -336
- package/dist/known-types-eq32py2n.js +0 -20
- package/dist/node-service-teagjd9n.js +0 -75
- package/dist/packager-tool-15bstxb6.js +0 -4192
- package/dist/packager-tool-1zpm7wts.js +0 -7217
- package/dist/packager-tool-7tjxtpfp.js +0 -106
- package/dist/packager-tool-ckhyvcn5.js +0 -58
- package/dist/packager-tool-dz506qqq.js +0 -2120
- package/dist/packager-tool-hpc2j0zw.js +0 -27
- package/dist/packager-tool-jjpc0yka.js +0 -304
- package/dist/packager-tool-xtv236p7.js +0 -73
- package/dist/strict-sdd-audit-zc0n5vj6.js +0 -1024
- package/dist/tidy-service-hc9gex0v.js +0 -36
- /package/dist/{localization-xecwjpe2.js → localization-y790z9vm.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BpmnValidateService
|
|
3
|
-
} from "./packager-tool-
|
|
4
|
-
import"./packager-tool-
|
|
3
|
+
} from "./packager-tool-cmzzh4f8.js";
|
|
4
|
+
import"./packager-tool-kb554twx.js";
|
|
5
5
|
import {
|
|
6
6
|
extractErrorMessageSync,
|
|
7
7
|
isGuid
|
|
8
|
-
} from "./packager-tool-
|
|
8
|
+
} from "./packager-tool-z6nkdv48.js";
|
|
9
9
|
import {
|
|
10
10
|
getFileSystem
|
|
11
11
|
} from "./packager-tool-0v3s8r01.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
parseBpmnProcesses,
|
|
20
20
|
parseJson,
|
|
21
21
|
parseOptionalJson
|
|
22
|
-
} from "./packager-tool-
|
|
22
|
+
} from "./packager-tool-mjz4hma1.js";
|
|
23
23
|
import"./packager-tool-1yh8g550.js";
|
|
24
24
|
|
|
25
25
|
// src/services/bpmn-refresh-service.ts
|
package/dist/{bpmn-update-metadata-service-jhahhjab.js → bpmn-update-metadata-service-hqe4edze.js}
RENAMED
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
entryPointFilePath,
|
|
3
3
|
extractEntryPointId,
|
|
4
4
|
parseBpmnFile
|
|
5
|
-
} from "./packager-tool-
|
|
5
|
+
} from "./packager-tool-x0eamrk4.js";
|
|
6
6
|
import {
|
|
7
7
|
OutputFormatter,
|
|
8
8
|
RESULTS,
|
|
9
9
|
catchError
|
|
10
|
-
} from "./packager-tool-
|
|
10
|
+
} from "./packager-tool-z6nkdv48.js";
|
|
11
11
|
import {
|
|
12
12
|
getFileSystem
|
|
13
13
|
} from "./packager-tool-0v3s8r01.js";
|
|
@@ -57,11 +57,12 @@ function extractUipathVariables(processes) {
|
|
|
57
57
|
}
|
|
58
58
|
function deriveExpected(processes, bpmnFileName) {
|
|
59
59
|
const allStartEvents = processes.flatMap((p) => (p.flowElements ?? []).filter((e) => e.$type === "bpmn:StartEvent"));
|
|
60
|
+
const rootEndEventIds = new Set(processes.flatMap((p) => p.flowElements ?? []).filter((e) => e.$type === "bpmn:EndEvent").map((e) => e.id).filter((id) => Boolean(id)));
|
|
60
61
|
const allVars = extractUipathVariables(processes);
|
|
61
62
|
const projectName = bpmnFileName.replace(/\.bpmn$/i, "");
|
|
62
63
|
const outputProps = {};
|
|
63
64
|
for (const v of allVars) {
|
|
64
|
-
if (
|
|
65
|
+
if (v.tag === "output" && v.elementId && rootEndEventIds.has(v.elementId)) {
|
|
65
66
|
outputProps[v.name] = v.schema;
|
|
66
67
|
}
|
|
67
68
|
}
|
|
@@ -76,7 +77,7 @@ function deriveExpected(processes, bpmnFileName) {
|
|
|
76
77
|
firstFilePath = fp;
|
|
77
78
|
const inputProps = {};
|
|
78
79
|
for (const v of allVars) {
|
|
79
|
-
if (v.elementId === start.id) {
|
|
80
|
+
if (v.tag === "input" && v.elementId === start.id) {
|
|
80
81
|
inputProps[v.name] = v.schema;
|
|
81
82
|
}
|
|
82
83
|
}
|
|
@@ -385,4 +386,4 @@ export {
|
|
|
385
386
|
UPDATE_METADATA_DEPRECATION
|
|
386
387
|
};
|
|
387
388
|
|
|
388
|
-
//# debugId=
|
|
389
|
+
//# debugId=06F1D70C7A98D0EA64756E2164756E21
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BpmnValidateService
|
|
3
|
-
} from "./packager-tool-
|
|
4
|
-
import"./packager-tool-
|
|
5
|
-
import"./packager-tool-
|
|
3
|
+
} from "./packager-tool-cmzzh4f8.js";
|
|
4
|
+
import"./packager-tool-kb554twx.js";
|
|
5
|
+
import"./packager-tool-z6nkdv48.js";
|
|
6
6
|
import"./packager-tool-0v3s8r01.js";
|
|
7
7
|
import"./packager-tool-1yh8g550.js";
|
|
8
8
|
export {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseJsonInputOrFile
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-9pccpz3r.js";
|
|
4
4
|
import"./packager-tool-eypvc2kv.js";
|
|
5
5
|
import {
|
|
6
6
|
JobsApi,
|
|
7
7
|
ReleasesApi,
|
|
8
8
|
createOrchestratorConfig,
|
|
9
9
|
resolveFolder
|
|
10
|
-
} from "./packager-tool-
|
|
11
|
-
import"./packager-tool-
|
|
10
|
+
} from "./packager-tool-4r35ye9r.js";
|
|
11
|
+
import"./packager-tool-yrsrzz1a.js";
|
|
12
12
|
import"./packager-tool-0gctz400.js";
|
|
13
13
|
import"./packager-tool-qa9gftnj.js";
|
|
14
14
|
import"./packager-tool-yc4kw997.js";
|
|
15
15
|
import {
|
|
16
16
|
OutputFormatter,
|
|
17
17
|
catchError
|
|
18
|
-
} from "./packager-tool-
|
|
18
|
+
} from "./packager-tool-z6nkdv48.js";
|
|
19
19
|
import"./packager-tool-0v3s8r01.js";
|
|
20
20
|
import"./packager-tool-1yh8g550.js";
|
|
21
21
|
|
|
@@ -289,7 +289,7 @@ async function getJobStatusDetailed(config, jobKey) {
|
|
|
289
289
|
throw new Error(`Invalid job key format: "${jobKey}"`);
|
|
290
290
|
}
|
|
291
291
|
const response = await jobsApi.jobsGet({
|
|
292
|
-
$filter: `Key eq
|
|
292
|
+
$filter: `Key eq ${jobKey}`,
|
|
293
293
|
$expand: "Robot,Release,Machine",
|
|
294
294
|
$top: 1
|
|
295
295
|
});
|
|
@@ -378,4 +378,4 @@ export {
|
|
|
378
378
|
validateCaseInputs
|
|
379
379
|
};
|
|
380
380
|
|
|
381
|
-
//# debugId=
|
|
381
|
+
//# debugId=51B8C5ED98C19BFC64756E2164756E21
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import {
|
|
2
|
+
catchError
|
|
3
|
+
} from "./packager-tool-z6nkdv48.js";
|
|
4
|
+
import {
|
|
5
|
+
getFileSystem
|
|
6
|
+
} from "./packager-tool-0v3s8r01.js";
|
|
7
|
+
import"./packager-tool-1yh8g550.js";
|
|
8
|
+
|
|
9
|
+
// ../case-tool/src/services/bindings-v2.ts
|
|
10
|
+
var BINDINGS_V2_FILE_NAME = "bindings_v2.json";
|
|
11
|
+
var BINDINGS_V2_VERSION = "2.0";
|
|
12
|
+
var CONNECTION_ID_PROPERTY = "ConnectionId";
|
|
13
|
+
var FOLDER_KEY_PROPERTY = "folderKey";
|
|
14
|
+
var byCodeUnit = (left, right) => {
|
|
15
|
+
if (left < right)
|
|
16
|
+
return -1;
|
|
17
|
+
return left > right ? 1 : 0;
|
|
18
|
+
};
|
|
19
|
+
var sortBindingsV2Resources = (resources) => [...resources].sort((a, b) => byCodeUnit(a.resource, b.resource) || byCodeUnit(a.key, b.key));
|
|
20
|
+
var serializeBindingsV2File = (resources) => {
|
|
21
|
+
const file = {
|
|
22
|
+
version: BINDINGS_V2_VERSION,
|
|
23
|
+
resources: sortBindingsV2Resources(resources)
|
|
24
|
+
};
|
|
25
|
+
return `${JSON.stringify(file, null, 2)}
|
|
26
|
+
`;
|
|
27
|
+
};
|
|
28
|
+
var readBindingsV2Resources = (raw) => {
|
|
29
|
+
const [error, parsed] = catchError(() => JSON.parse(raw));
|
|
30
|
+
if (error)
|
|
31
|
+
return;
|
|
32
|
+
if (parsed === null || typeof parsed !== "object")
|
|
33
|
+
return;
|
|
34
|
+
const resources = parsed.resources;
|
|
35
|
+
if (!Array.isArray(resources))
|
|
36
|
+
return;
|
|
37
|
+
return resources.filter((entry) => entry !== null && typeof entry === "object" && typeof entry.key === "string");
|
|
38
|
+
};
|
|
39
|
+
var identity = (entry) => `${entry.resource}:${entry.key}`;
|
|
40
|
+
var diffBindingsV2 = (expected, actual) => {
|
|
41
|
+
const expectedByKey = new Map(expected.map((e) => [identity(e), e]));
|
|
42
|
+
const actualByKey = new Map(actual.map((e) => [identity(e), e]));
|
|
43
|
+
const missing = [];
|
|
44
|
+
const changed = [];
|
|
45
|
+
for (const [key, entry] of expectedByKey) {
|
|
46
|
+
const found = actualByKey.get(key);
|
|
47
|
+
if (found === undefined) {
|
|
48
|
+
missing.push(entry.key);
|
|
49
|
+
} else if (JSON.stringify(found) !== JSON.stringify(entry)) {
|
|
50
|
+
changed.push(entry.key);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const extra = [...actualByKey.values()].filter((entry) => !expectedByKey.has(identity(entry))).map((entry) => entry.key);
|
|
54
|
+
const alphabetically = (left, right) => left.localeCompare(right);
|
|
55
|
+
return {
|
|
56
|
+
missing: missing.sort(alphabetically),
|
|
57
|
+
extra: extra.sort(alphabetically),
|
|
58
|
+
changed: changed.sort(alphabetically)
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
var hasBindingsV2Difference = (difference) => difference.missing.length > 0 || difference.extra.length > 0 || difference.changed.length > 0;
|
|
62
|
+
|
|
63
|
+
// ../case-tool/src/services/case-bindings-service.ts
|
|
64
|
+
var asBinding = (value) => {
|
|
65
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const record = value;
|
|
69
|
+
return typeof record.id === "string" && typeof record.resource === "string" && typeof record.resourceKey === "string" && record.resourceKey !== "" && typeof record.propertyAttribute === "string" && (record.default === undefined || typeof record.default === "string") ? value : undefined;
|
|
70
|
+
};
|
|
71
|
+
var CONNECTION_RESOURCE = "Connection";
|
|
72
|
+
var NAME_ATTRIBUTE = "name";
|
|
73
|
+
var FOLDER_PATH_ATTRIBUTE = "folderPath";
|
|
74
|
+
var SOLUTION_FOLDER_PREFIX = "solution_folder.";
|
|
75
|
+
var SOLUTION_FOLDER_SENTINEL = "solution_folder";
|
|
76
|
+
var BINDING_REFERENCE_PREFIX = "=bindings.";
|
|
77
|
+
var CONNECTOR_KEY_ENTRY = "connectorKey";
|
|
78
|
+
var CONNECTION_ENTRY = "connection";
|
|
79
|
+
var readConnectorContext = (value) => {
|
|
80
|
+
if (!Array.isArray(value))
|
|
81
|
+
return;
|
|
82
|
+
const byName = new Map;
|
|
83
|
+
for (const entry of value) {
|
|
84
|
+
if (entry === null || typeof entry !== "object" || Array.isArray(entry))
|
|
85
|
+
return;
|
|
86
|
+
const { name, value: entryValue } = entry;
|
|
87
|
+
if (typeof name !== "string")
|
|
88
|
+
return;
|
|
89
|
+
if (typeof entryValue === "string")
|
|
90
|
+
byName.set(name, entryValue);
|
|
91
|
+
}
|
|
92
|
+
return byName.has(CONNECTOR_KEY_ENTRY) ? byName : undefined;
|
|
93
|
+
};
|
|
94
|
+
var collectConnectorKeys = (document) => {
|
|
95
|
+
const byBindingId = new Map;
|
|
96
|
+
const visit = (node) => {
|
|
97
|
+
if (Array.isArray(node)) {
|
|
98
|
+
const context = readConnectorContext(node);
|
|
99
|
+
const connection = context?.get(CONNECTION_ENTRY);
|
|
100
|
+
const connectorKey = context?.get(CONNECTOR_KEY_ENTRY);
|
|
101
|
+
if (connectorKey !== undefined && connection?.startsWith(BINDING_REFERENCE_PREFIX) === true) {
|
|
102
|
+
byBindingId.set(connection.slice(BINDING_REFERENCE_PREFIX.length), connectorKey);
|
|
103
|
+
}
|
|
104
|
+
for (const item of node)
|
|
105
|
+
visit(item);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (node === null || typeof node !== "object")
|
|
109
|
+
return;
|
|
110
|
+
for (const value of Object.values(node))
|
|
111
|
+
visit(value);
|
|
112
|
+
};
|
|
113
|
+
visit(document);
|
|
114
|
+
return byBindingId;
|
|
115
|
+
};
|
|
116
|
+
var attributeDefault = (group, attribute) => group.find((binding) => binding.propertyAttribute === attribute)?.default;
|
|
117
|
+
var connectionEntry = (group, connectorKeys) => {
|
|
118
|
+
const key = group[0].resourceKey;
|
|
119
|
+
const value = {
|
|
120
|
+
[CONNECTION_ID_PROPERTY]: {
|
|
121
|
+
defaultValue: attributeDefault(group, CONNECTION_ID_PROPERTY) ?? key
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const folderKey = attributeDefault(group, FOLDER_KEY_PROPERTY);
|
|
125
|
+
if (folderKey !== undefined) {
|
|
126
|
+
value[FOLDER_KEY_PROPERTY] = { defaultValue: folderKey };
|
|
127
|
+
}
|
|
128
|
+
const connector = group.map((binding) => connectorKeys.get(binding.id)).find((found) => found !== undefined);
|
|
129
|
+
return {
|
|
130
|
+
resource: CONNECTION_RESOURCE,
|
|
131
|
+
key,
|
|
132
|
+
value,
|
|
133
|
+
...connector !== undefined && { metadata: { connector } }
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
var resourceEntry = (group) => {
|
|
137
|
+
const key = group[0].resourceKey;
|
|
138
|
+
const value = {};
|
|
139
|
+
const name = attributeDefault(group, NAME_ATTRIBUTE);
|
|
140
|
+
if (name !== undefined)
|
|
141
|
+
value.name = { defaultValue: name };
|
|
142
|
+
const folderPath = key.startsWith(SOLUTION_FOLDER_PREFIX) ? SOLUTION_FOLDER_SENTINEL : attributeDefault(group, FOLDER_PATH_ATTRIBUTE);
|
|
143
|
+
if (folderPath !== undefined) {
|
|
144
|
+
value.folderPath = { defaultValue: folderPath };
|
|
145
|
+
}
|
|
146
|
+
const subType = group.find((binding) => binding.resourceSubType !== undefined)?.resourceSubType;
|
|
147
|
+
return {
|
|
148
|
+
resource: group[0].resource,
|
|
149
|
+
key,
|
|
150
|
+
value,
|
|
151
|
+
...subType !== undefined && { metadata: { subType } }
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
var deriveCaseBindingsV2 = (document) => {
|
|
155
|
+
const connectorKeys = collectConnectorKeys(document);
|
|
156
|
+
const groups = new Map;
|
|
157
|
+
for (const entry of Array.isArray(document.bindings) ? document.bindings : []) {
|
|
158
|
+
const binding = asBinding(entry);
|
|
159
|
+
if (binding === undefined)
|
|
160
|
+
continue;
|
|
161
|
+
const groupKey = `${binding.resource}:${binding.resourceKey}`;
|
|
162
|
+
const group = groups.get(groupKey);
|
|
163
|
+
if (group === undefined)
|
|
164
|
+
groups.set(groupKey, [binding]);
|
|
165
|
+
else
|
|
166
|
+
group.push(binding);
|
|
167
|
+
}
|
|
168
|
+
return [...groups.values()].map((group) => group[0].resource === CONNECTION_RESOURCE ? connectionEntry(group, connectorKeys) : resourceEntry(group));
|
|
169
|
+
};
|
|
170
|
+
var bindingsV2PathFor = (casePlanPath) => {
|
|
171
|
+
const fs = getFileSystem();
|
|
172
|
+
return fs.path.join(fs.path.dirname(fs.path.resolve(casePlanPath)), BINDINGS_V2_FILE_NAME);
|
|
173
|
+
};
|
|
174
|
+
var compareCaseBindingsV2 = async (casePlanPath, document) => {
|
|
175
|
+
const fs = getFileSystem();
|
|
176
|
+
const path = bindingsV2PathFor(casePlanPath);
|
|
177
|
+
const expected = deriveCaseBindingsV2(document);
|
|
178
|
+
const expectedCount = expected.length;
|
|
179
|
+
if (!await fs.exists(path))
|
|
180
|
+
return { status: "absent", path, expectedCount };
|
|
181
|
+
const [readError, raw] = await catchError(fs.readFile(path, "utf-8"));
|
|
182
|
+
if (readError || raw == null)
|
|
183
|
+
return { status: "unreadable", path, expectedCount };
|
|
184
|
+
const actual = readBindingsV2Resources(raw);
|
|
185
|
+
if (actual === undefined)
|
|
186
|
+
return { status: "unreadable", path, expectedCount };
|
|
187
|
+
const difference = diffBindingsV2(expected, actual);
|
|
188
|
+
return hasBindingsV2Difference(difference) ? { status: "differs", path, expectedCount, difference } : { status: "match", path, expectedCount };
|
|
189
|
+
};
|
|
190
|
+
var syncCaseBindings = async (casePlanPath) => {
|
|
191
|
+
const fs = getFileSystem();
|
|
192
|
+
const resolved = fs.path.resolve(casePlanPath);
|
|
193
|
+
if (!await fs.exists(resolved)) {
|
|
194
|
+
return {
|
|
195
|
+
ok: false,
|
|
196
|
+
message: `Case plan file not found: ${resolved}`,
|
|
197
|
+
instructions: "Pass the path to an existing caseplan JSON file, for example 'uip maestro case bindings sync case.json'."
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
const [readError, raw] = await catchError(fs.readFile(resolved, "utf-8"));
|
|
201
|
+
if (readError || raw == null) {
|
|
202
|
+
return {
|
|
203
|
+
ok: false,
|
|
204
|
+
message: `Failed to read case plan: ${readError?.message ?? "empty content"}`,
|
|
205
|
+
instructions: `Verify read permissions on ${resolved}.`
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const [parseError, document] = catchError(() => JSON.parse(raw));
|
|
209
|
+
if (parseError || document == null || typeof document !== "object" || Array.isArray(document)) {
|
|
210
|
+
return {
|
|
211
|
+
ok: false,
|
|
212
|
+
message: `Case plan is not valid JSON: ${parseError?.message ?? "not a JSON object"}`,
|
|
213
|
+
instructions: `Verify the contents of ${resolved}.`
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
const resources = deriveCaseBindingsV2(document);
|
|
217
|
+
const path = bindingsV2PathFor(resolved);
|
|
218
|
+
const [writeError] = await catchError(fs.writeFile(path, serializeBindingsV2File(resources)));
|
|
219
|
+
if (writeError) {
|
|
220
|
+
return {
|
|
221
|
+
ok: false,
|
|
222
|
+
message: `Failed to write bindings file: ${writeError.message}`,
|
|
223
|
+
instructions: `Verify write permissions on ${fs.path.dirname(path)}.`
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
return {
|
|
227
|
+
ok: true,
|
|
228
|
+
path,
|
|
229
|
+
resourceCount: resources.length,
|
|
230
|
+
connectionCount: resources.filter((entry) => entry.resource === CONNECTION_RESOURCE).length
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
export {
|
|
234
|
+
bindingsV2PathFor,
|
|
235
|
+
compareCaseBindingsV2,
|
|
236
|
+
deriveCaseBindingsV2,
|
|
237
|
+
syncCaseBindings
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
//# debugId=B9EB75D4E4B999D964756E2164756E21
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loadCaseSchemaAsync
|
|
3
|
+
} from "./packager-tool-gvgnfejf.js";
|
|
4
|
+
import {
|
|
5
|
+
uploadAndDebugSolution
|
|
6
|
+
} from "./packager-tool-095jzn8v.js";
|
|
7
|
+
import"./packager-tool-mj89jhvb.js";
|
|
8
|
+
import {
|
|
9
|
+
buildSolutionPackageFromDir,
|
|
10
|
+
uploadOrOverwriteSolution
|
|
11
|
+
} from "./packager-tool-s1466723.js";
|
|
12
|
+
import {
|
|
13
|
+
findSolutionFile,
|
|
14
|
+
updateSolutionFile
|
|
15
|
+
} from "./packager-tool-wynrdnqj.js";
|
|
16
|
+
import {
|
|
17
|
+
CasePlanFileNames,
|
|
18
|
+
buildCasePackageDescriptor,
|
|
19
|
+
casePlanSidecarName,
|
|
20
|
+
entryPointBpmnNames,
|
|
21
|
+
findCasePlanFileName,
|
|
22
|
+
misnamedEntryPointBpmn,
|
|
23
|
+
normalizeEntryPointPath,
|
|
24
|
+
resolveDeclaredFileName
|
|
25
|
+
} from "./packager-tool-kj0qc4f4.js";
|
|
26
|
+
import"./packager-tool-khm7zsm8.js";
|
|
27
|
+
import"./packager-tool-nkrmjr3a.js";
|
|
28
|
+
import {
|
|
29
|
+
logger
|
|
30
|
+
} from "./packager-tool-z6nkdv48.js";
|
|
31
|
+
import {
|
|
32
|
+
getFileSystem
|
|
33
|
+
} from "./packager-tool-0v3s8r01.js";
|
|
34
|
+
import"./packager-tool-1yh8g550.js";
|
|
35
|
+
|
|
36
|
+
// ../case-tool/src/services/case-debug-studio-web-service.ts
|
|
37
|
+
class CaseDebugStudioWebService {
|
|
38
|
+
fs;
|
|
39
|
+
constructor() {
|
|
40
|
+
this.fs = getFileSystem();
|
|
41
|
+
}
|
|
42
|
+
async executeProjectViaStudioWeb(projectPath, config, callbacks, pollInterval) {
|
|
43
|
+
const absoluteProjectPath = this.fs.path.resolve(projectPath);
|
|
44
|
+
const projectUiprojPath = this.fs.path.join(absoluteProjectPath, "project.uiproj");
|
|
45
|
+
if (!await this.fs.exists(projectUiprojPath)) {
|
|
46
|
+
throw new Error(`Not a valid case project directory: missing project.uiproj in ${absoluteProjectPath}`);
|
|
47
|
+
}
|
|
48
|
+
const projectUiprojContent = await this.fs.readFile(projectUiprojPath, "utf-8");
|
|
49
|
+
if (projectUiprojContent === null) {
|
|
50
|
+
throw new Error(`Could not read project.uiproj in ${absoluteProjectPath}`);
|
|
51
|
+
}
|
|
52
|
+
const projectUiproj = JSON.parse(projectUiprojContent);
|
|
53
|
+
const projectName = projectUiproj.Name;
|
|
54
|
+
const entryPointsPath = this.fs.path.join(absoluteProjectPath, "entry-points.json");
|
|
55
|
+
if (!await this.fs.exists(entryPointsPath)) {
|
|
56
|
+
throw new Error(`Not a valid case project directory: missing entry-points.json in ${absoluteProjectPath}`);
|
|
57
|
+
}
|
|
58
|
+
const entryPointsContent = await this.fs.readFile(entryPointsPath, "utf-8");
|
|
59
|
+
if (entryPointsContent === null) {
|
|
60
|
+
throw new Error(`Could not read entry-points.json in ${absoluteProjectPath}`);
|
|
61
|
+
}
|
|
62
|
+
const declared = entryPointBpmnNames(entryPointsContent);
|
|
63
|
+
if (declared === null) {
|
|
64
|
+
throw new Error(`entry-points.json in ${absoluteProjectPath} could not be read as JSON, so debug cannot check that the BPMN it declares is in the project.`);
|
|
65
|
+
}
|
|
66
|
+
const entryPointsJson = JSON.parse(entryPointsContent);
|
|
67
|
+
const rawEntryPoint = entryPointsJson.entryPoints?.[0]?.filePath ?? "";
|
|
68
|
+
const entryPoint = normalizeEntryPointPath(rawEntryPoint);
|
|
69
|
+
logger.info("Looking for .uipx solution file...");
|
|
70
|
+
const solutionInfo = await findSolutionFile(this.fs, absoluteProjectPath);
|
|
71
|
+
const existingSolutionId = solutionInfo?.solutionId;
|
|
72
|
+
logger.info("Reading case plan file...");
|
|
73
|
+
const casePlanFileName = findCasePlanFileName(await this.fs.readdir(absoluteProjectPath));
|
|
74
|
+
if (!casePlanFileName) {
|
|
75
|
+
throw new Error(`Not a valid case project directory: no case plan in ${absoluteProjectPath}. Expected one of ${CasePlanFileNames.join(", ")}.`);
|
|
76
|
+
}
|
|
77
|
+
const caseJsonPath = this.fs.path.join(absoluteProjectPath, casePlanFileName);
|
|
78
|
+
const caseFileContent = await this.fs.readFile(caseJsonPath, "utf-8");
|
|
79
|
+
if (caseFileContent === null) {
|
|
80
|
+
throw new Error(`Could not read file: ${caseJsonPath}`);
|
|
81
|
+
}
|
|
82
|
+
const sidecarFileName = casePlanSidecarName(casePlanFileName);
|
|
83
|
+
logger.info("Converting case plan to BPMN and case plan JSON...");
|
|
84
|
+
const { serializeCaseDiskJsonToBpmnAndRulesJson } = await loadCaseSchemaAsync();
|
|
85
|
+
const { bpmnXml, rulesJson: casePlanJson } = await serializeCaseDiskJsonToBpmnAndRulesJson(caseFileContent);
|
|
86
|
+
await this.fs.writeFile(this.fs.path.join(absoluteProjectPath, sidecarFileName), bpmnXml);
|
|
87
|
+
await this.fs.writeFile(this.fs.path.join(absoluteProjectPath, "case-plan.json"), `${JSON.stringify(casePlanJson, null, 2)}
|
|
88
|
+
`);
|
|
89
|
+
const projectFiles = new Set([
|
|
90
|
+
...await this.fs.readdir(absoluteProjectPath),
|
|
91
|
+
sidecarFileName
|
|
92
|
+
]);
|
|
93
|
+
const missing = declared.filter((file) => !projectFiles.has(file));
|
|
94
|
+
if (missing.length > 0) {
|
|
95
|
+
throw new Error(`entry-points.json points at ${missing.join(", ")}, which ${absoluteProjectPath} does not hold, so the debug run would fault. Point the entry point at '${sidecarFileName}', or add the missing file.`);
|
|
96
|
+
}
|
|
97
|
+
const misnamed = misnamedEntryPointBpmn(declared, casePlanFileName);
|
|
98
|
+
if (misnamed) {
|
|
99
|
+
throw new Error(`entry-points.json points at '${misnamed}', the sidecar of a case plan this project does not carry. '${casePlanFileName}' compiles to '${sidecarFileName}', so the debug run would resolve a BPMN nothing here produced. Point the entry point at '${sidecarFileName}'.`);
|
|
100
|
+
}
|
|
101
|
+
const entryPointFileName = resolveDeclaredFileName(rawEntryPoint);
|
|
102
|
+
if (!declared.includes(entryPointFileName)) {
|
|
103
|
+
throw new Error(`entry-points.json's first entry point resolves to '${entryPointFileName || entryPoint}', which is not a declared .bpmn file this project ships, so the debug run would fault. Point the entry point at '${sidecarFileName}'.`);
|
|
104
|
+
}
|
|
105
|
+
await this.fs.writeFile(this.fs.path.join(absoluteProjectPath, "package-descriptor.json"), `${JSON.stringify(buildCasePackageDescriptor([...projectFiles]), null, 2)}
|
|
106
|
+
`);
|
|
107
|
+
logger.info("Building solution package from project...");
|
|
108
|
+
const solutionDir = this.fs.path.resolve(absoluteProjectPath, "..");
|
|
109
|
+
const uisPath = await buildSolutionPackageFromDir(this.fs, solutionDir);
|
|
110
|
+
const apiConfig = {
|
|
111
|
+
baseUrl: config.baseUrl,
|
|
112
|
+
organizationId: config.organizationId,
|
|
113
|
+
tenantName: config.tenantName,
|
|
114
|
+
tenantId: config.tenantId,
|
|
115
|
+
authToken: config.authToken,
|
|
116
|
+
organizationUnitId: config.organizationUnitId
|
|
117
|
+
};
|
|
118
|
+
return uploadAndDebugSolution({
|
|
119
|
+
upload: () => uploadOrOverwriteSolution(apiConfig, config.organizationName, uisPath, existingSolutionId, this.fs),
|
|
120
|
+
onSolutionId: (id) => updateSolutionFile(this.fs, absoluteProjectPath, id),
|
|
121
|
+
projectName,
|
|
122
|
+
entryPoint,
|
|
123
|
+
projectType: "CaseManagement",
|
|
124
|
+
apiConfig,
|
|
125
|
+
organizationName: config.organizationName,
|
|
126
|
+
callbacks,
|
|
127
|
+
pollInterval
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
export {
|
|
132
|
+
CaseDebugStudioWebService
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
//# debugId=1A2B4E9D87C979D064756E2164756E21
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
catchError
|
|
3
|
+
} from "./packager-tool-z6nkdv48.js";
|
|
4
|
+
import {
|
|
5
|
+
getFileSystem
|
|
6
|
+
} from "./packager-tool-0v3s8r01.js";
|
|
7
|
+
import"./packager-tool-1yh8g550.js";
|
|
8
|
+
|
|
9
|
+
// ../case-tool/src/services/case-format-service.ts
|
|
10
|
+
var INDENT = 2;
|
|
11
|
+
var longestLineOf = (text) => {
|
|
12
|
+
let longest = 0;
|
|
13
|
+
let current = 0;
|
|
14
|
+
for (const ch of text) {
|
|
15
|
+
if (ch === `
|
|
16
|
+
`) {
|
|
17
|
+
longest = Math.max(longest, current);
|
|
18
|
+
current = 0;
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
current += 1;
|
|
22
|
+
}
|
|
23
|
+
return Math.max(longest, current);
|
|
24
|
+
};
|
|
25
|
+
var formatCasePlan = async (filePath) => {
|
|
26
|
+
const fs = getFileSystem();
|
|
27
|
+
const resolved = fs.path.resolve(filePath);
|
|
28
|
+
if (!await fs.exists(resolved)) {
|
|
29
|
+
return {
|
|
30
|
+
ok: false,
|
|
31
|
+
message: `Case plan file not found: ${resolved}`,
|
|
32
|
+
instructions: "Pass the path to an existing case plan JSON file, for example 'uip maestro case format case.json'."
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const [readError, raw] = await catchError(fs.readFile(resolved, "utf-8"));
|
|
36
|
+
if (readError || raw == null) {
|
|
37
|
+
return {
|
|
38
|
+
ok: false,
|
|
39
|
+
message: `Failed to read case plan: ${readError?.message ?? "empty content"}`,
|
|
40
|
+
instructions: `Verify read permissions on ${resolved}.`
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
const [parseError, document] = catchError(() => JSON.parse(raw));
|
|
44
|
+
if (parseError) {
|
|
45
|
+
return {
|
|
46
|
+
ok: false,
|
|
47
|
+
message: `Case plan is not valid JSON: ${parseError.message}`,
|
|
48
|
+
instructions: `Fix the JSON in ${resolved} before formatting it — formatting cannot repair a file it cannot parse.`
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const formatted = `${JSON.stringify(document, null, INDENT)}
|
|
52
|
+
`;
|
|
53
|
+
if (formatted === raw) {
|
|
54
|
+
return {
|
|
55
|
+
ok: true,
|
|
56
|
+
path: resolved,
|
|
57
|
+
changed: false,
|
|
58
|
+
lines: formatted.split(`
|
|
59
|
+
`).length - 1,
|
|
60
|
+
longestLine: longestLineOf(formatted)
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const [writeError] = await catchError(fs.writeFile(resolved, formatted));
|
|
64
|
+
if (writeError) {
|
|
65
|
+
return {
|
|
66
|
+
ok: false,
|
|
67
|
+
message: `Failed to write case plan: ${writeError.message}`,
|
|
68
|
+
instructions: `Verify write permissions on ${resolved}.`
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
ok: true,
|
|
73
|
+
path: resolved,
|
|
74
|
+
changed: true,
|
|
75
|
+
lines: formatted.split(`
|
|
76
|
+
`).length - 1,
|
|
77
|
+
longestLine: longestLineOf(formatted)
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
formatCasePlan
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
//# debugId=D1F974DB89BD88FD64756E2164756E21
|