@uipath/case-tool 1.204.0 → 1.205.0-preview.258
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 +24 -11
- package/dist/{authoring-6ckkzfc9.js → authoring-kqh34zzm.js} +49 -30
- package/dist/{business-rule-export-kg5bk8aw.js → business-rule-export-ey588rv7.js} +2 -2
- package/dist/canvas-notes-86fxx1t8.js +19 -0
- package/dist/{case-api-rvamfn02.js → case-api-sme7esce.js} +6 -6
- package/dist/case-bindings-service-cht20gqt.js +430 -0
- package/dist/case-debug-solution-projects-h3w2nx0a.js +34 -0
- package/dist/{case-debug-studio-web-service-xxfesw4v.js → case-debug-studio-web-service-3mkrtaet.js} +16 -10
- package/dist/{case-described-io-service-14hdnqcc.js → case-described-io-service-dx1f4nxe.js} +37 -11
- package/dist/case-event-trigger-bindings-g9ftnm4x.js +16 -0
- package/dist/{case-format-service-yb48785t.js → case-format-service-6aew6tqc.js} +2 -2
- package/dist/{case-pack-service-9185h6ez.js → case-pack-service-pqq8wnfd.js} +6 -6
- package/dist/case-schema-version-h820ne16.js +20 -0
- package/dist/{case-shape-reader-mw58avr0.js → case-shape-reader-dsbraetf.js} +1 -1
- package/dist/{case-splice-service-tkmb7xjp.js → case-splice-service-s5gccctq.js} +53 -8
- package/dist/{case-validate-service-c84e2bhv.js → case-validate-service-rey6btew.js} +128 -42
- package/dist/{connector-enrichment-service-hfv0kwht.js → connector-enrichment-service-crqs2216.js} +23 -20
- package/dist/{connector-lookup-service-whgjceyj.js → connector-lookup-service-dwv8q5eh.js} +6 -6
- package/dist/connector-task-shape-mpazkf7s.js +14 -0
- package/dist/{connector-task-spec-k0cwavrm.js → connector-task-spec-trs4tcb3.js} +196 -40
- package/dist/{de-MUJPA4EB-dpg7t2rw.js → de-UZI7FJDO-mwvc4cxe.js} +29 -2
- package/dist/{de-FGHEJRCI-rv513mfh.js → de-WLW6KWOJ-2qnsqdtw.js} +238 -31
- package/dist/{debug-service-ch3v6jmm.js → debug-service-7q98j726.js} +3 -3
- package/dist/{embedded-file-reader-v8c2yj2a.js → embedded-file-reader-r66242ey.js} +2 -2
- package/dist/{en-FBPVNKFN-dqt573xn.js → en-EJCBA3LK-dtpdghgj.js} +12 -4
- package/dist/{en-BWGKA5OE-1qkvb9rn.js → en-M7GQYBV2-5nfmpnfz.js} +88 -6
- package/dist/{enrichment-service-3f1kygjs.js → enrichment-service-hv7ff88p.js} +56 -12
- package/dist/{es-7SE7HX2X-8yh1aj2y.js → es-4UBUTCQA-m1ytpyx2.js} +29 -2
- package/dist/{es-KR3ZSNMP-84zphx0x.js → es-5THCNRFN-tqwyrdgy.js} +235 -28
- package/dist/{es-MX-2MYFZU7X-3rek4r73.js → es-MX-5RELIXKI-9jhqtddc.js} +29 -2
- package/dist/{es-MX-XXZJGC4R-2mr8jtgm.js → es-MX-TWZBRAXK-gqd9swzw.js} +237 -30
- package/dist/filter-engine-7ep90g7f.js +11 -0
- package/dist/{fr-Y6NPVODW-8vr1ja4b.js → fr-CERONSRC-edpxhbmb.js} +237 -30
- package/dist/{fr-MDFKNZ4C-h4a122k9.js → fr-VBM5WRC2-63z7w4mh.js} +29 -2
- package/dist/index-332n0kxj.js +282 -0
- package/dist/{index-wmffgzmr.js → index-5dxh9z60.js} +21751 -11098
- package/dist/{index-aw2gqqat.js → index-a2fvrrth.js} +4 -4
- package/dist/{index-4yanx3rn.js → index-ekwtgx7y.js} +1089 -218
- package/dist/{index-ng2f77my.js → index-fyc0k5dd.js} +985 -617
- package/dist/index-n9qvnx4x.js +29 -0
- package/dist/{index-hhsf00x8.js → index-ngs0a2he.js} +1 -1
- package/dist/{index-j2r3jb6c.js → index-xq6ajhgq.js} +2 -2
- package/dist/index.js +12 -12
- package/dist/init-entry-points-hhpv3e3f.js +98 -0
- package/dist/{input-reader-1tcqt27f.js → input-reader-c7wz8ra2.js} +3 -3
- package/dist/{ja-UTQEAP34-8e0q6swp.js → ja-43QL7CGO-c3q8gre9.js} +29 -2
- package/dist/{ja-Q5PXKJ2V-p4msxzjd.js → ja-U2MCNHGT-gz0ap1jk.js} +235 -28
- package/dist/{known-types-0h9kqwyy.js → known-types-jvkdgmzz.js} +5 -4
- package/dist/{ko-AXCHW2OK-askct7f6.js → ko-TLL6Z6CD-wrt3n8a9.js} +29 -2
- package/dist/{ko-AYBDSRZG-41mdmsg1.js → ko-XAUYQWDR-zp81gjp4.js} +237 -30
- package/dist/localSolutionDiscovery-yyx234ak.js +13 -0
- package/dist/migration-diagnosis-ns5cw4e3.js +99 -0
- package/dist/{node-strategy-5pz40tee.js → node-strategy-v442hwgd.js} +1 -1
- package/dist/node-sync-service-1wkcyn1n.js +57 -0
- package/dist/out-target-wjgmna0r.js +111 -0
- package/dist/{packager-tool-85q4f3pq.js → packager-tool-1pcmxqny.js} +3 -3
- package/dist/{packager-tool-8a9yqfq7.js → packager-tool-1yfw674x.js} +4 -2
- package/dist/{packager-tool-pdhhzfr5.js → packager-tool-29x6vran.js} +296 -417
- package/dist/packager-tool-2sn7d8fd.js +41 -0
- package/dist/packager-tool-4p11fvf4.js +92 -0
- package/dist/{packager-tool-25hng8h4.js → packager-tool-4rtktkhv.js} +16211 -13084
- package/dist/{packager-tool-yfm83bzd.js → packager-tool-67vy1fz3.js} +4 -3
- package/dist/{packager-tool-d88rqwk8.js → packager-tool-6z1hsm2h.js} +13 -5
- package/dist/packager-tool-7hw344bt.js +107 -0
- package/dist/{packager-tool-3q3d1hk8.js → packager-tool-83v804p7.js} +56 -6
- package/dist/{packager-tool-00y70spr.js → packager-tool-87y6xw3a.js} +2 -1
- package/dist/packager-tool-93mdeqay.js +18 -0
- package/dist/{packager-tool-64rg5ekd.js → packager-tool-9e59z4d6.js} +75 -7
- package/dist/{packager-tool-vepqrsse.js → packager-tool-9kf3fqtr.js} +2 -2
- package/dist/packager-tool-9kvkzc05.js +74 -0
- package/dist/{packager-tool-s6619wtx.js → packager-tool-9sd483vs.js} +2 -2
- package/dist/{packager-tool-f78ntj5g.js → packager-tool-9y1w2wds.js} +51 -6
- package/dist/packager-tool-a17g0pj1.js +62 -0
- package/dist/{packager-tool-167qap9m.js → packager-tool-aagnvyba.js} +845 -38
- package/dist/{packager-tool-0p6dbsp0.js → packager-tool-c5q10254.js} +5 -5
- package/dist/{packager-tool-wj9d9mqe.js → packager-tool-e15kqpyh.js} +12 -13
- package/dist/{packager-tool-c31qx8kc.js → packager-tool-ezds6t5e.js} +2 -2
- package/dist/{packager-tool-d3zvghjd.js → packager-tool-f2z2dscy.js} +308 -120
- package/dist/{packager-tool-hvzjm2nk.js → packager-tool-f8vwy92w.js} +2093 -5805
- package/dist/{packager-tool-rgpdaxbx.js → packager-tool-gx2cer6a.js} +5385 -1098
- package/dist/{packager-tool-xdxr3ync.js → packager-tool-hdxtgckw.js} +11 -1
- package/dist/{packager-tool-mr149jsw.js → packager-tool-k5cpxdm4.js} +17 -7
- package/dist/packager-tool-k6jbedyc.js +69 -0
- package/dist/packager-tool-kdhey8gz.js +153 -0
- package/dist/{packager-tool-cenvh23g.js → packager-tool-kyrm4e5m.js} +718 -87
- package/dist/packager-tool-mqy97y5f.js +52 -0
- package/dist/{packager-tool-jfysbxdt.js → packager-tool-mzf4gmph.js} +4 -4
- package/dist/packager-tool-n7w9wx62.js +25 -0
- package/dist/{packager-tool-7q6z6npd.js → packager-tool-pcvhcn2k.js} +93 -11
- package/dist/packager-tool-r0x3qh59.js +307 -0
- package/dist/{packager-tool-w1b5pyj6.js → packager-tool-r6b5ktzb.js} +730 -14
- package/dist/{packager-tool-zbrda9sn.js → packager-tool-rk25wp3c.js} +1 -1
- package/dist/{packager-tool-xcd87qyx.js → packager-tool-v2kcgjbf.js} +2 -3
- package/dist/{case-bindings-service-d9vezn69.js → packager-tool-wekqkmgn.js} +20 -231
- package/dist/packager-tool-yct6zp4m.js +335 -0
- package/dist/{packager-tool-kpqr938m.js → packager-tool-ydyvtknp.js} +26 -3
- package/dist/{packager-tool-v99ygh9f.js → packager-tool-yn33pw57.js} +124 -58
- package/dist/{packager-tool-4rqd21wc.js → packager-tool-yn7r7zq2.js} +19 -5
- package/dist/{packager-tool-cmwets3m.js → packager-tool-zf8f9pmm.js} +1 -1
- package/dist/packager-tool.js +3 -3
- package/dist/{project-artifacts-rng5m6r2.js → project-artifacts-bgyyb0dm.js} +1 -1
- package/dist/{pt-BR-TKHNHMET-sn91xyq0.js → pt-BR-GNQNAAZ2-xadharv4.js} +237 -30
- package/dist/{pt-BR-Y6K6XHXK-mp3hwhw1.js → pt-BR-USP2T7GD-pedn77m1.js} +29 -2
- package/dist/{pt-3DIO5QWG-59b3f4bc.js → pt-RMIAKZB4-67enhx3m.js} +29 -2
- package/dist/{pt-ROXU257Y-2f6bxev4.js → pt-TO2DARY2-ftcce1bv.js} +237 -30
- package/dist/{resolved-check-p99hysaw.js → resolved-check-aqw7568y.js} +1 -1
- package/dist/{resourcesSyncService-zwjyp1qx.js → resourcesSyncService-d302jnap.js} +32 -170
- package/dist/{ro-BWR3ONRR-vzx3hy8a.js → ro-GHOBYW2S-mhnqsgaa.js} +29 -2
- package/dist/{ro-AVAWPKOO-b89pw79r.js → ro-WUYJV6OW-a8d9qy1n.js} +235 -28
- package/dist/{sdd-convert-service-vf0ps358.js → sdd-convert-service-8jpew7vz.js} +686 -445
- package/dist/{sdd-lookup-dwzpvvwn.js → sdd-lookup-fe900sdb.js} +2 -2
- package/dist/{sdd-resolve-service-mjqad2nn.js → sdd-resolve-service-qdtmxw9b.js} +38 -13
- package/dist/sdd-resolve-siblings-6kfxc2t6.js +53 -0
- package/dist/{solution-auth-kddmbm0p.js → solution-auth-30yycqtv.js} +3 -3
- package/dist/solution-discovery-g6ksnrg1.js +38 -0
- package/dist/{strict-case-rules-tz37bspw.js → strict-case-rules-4tjcaznr.js} +3 -2
- package/dist/{strict-entry-points-v14d7y50.js → strict-entry-points-g2pd4mf4.js} +29 -1
- package/dist/{strict-sdd-audit-4aqdeh59.js → strict-sdd-audit-q7tb9yj7.js} +7 -5
- package/dist/task-type-declaration-7a8fqdvs.js +46 -0
- package/dist/tool.js +12 -12
- package/dist/{tr-5IIHSFW5-hw4cewew.js → tr-GDTLECMM-k5fhmq13.js} +29 -2
- package/dist/{tr-JMIP7ZSL-c39b6pe4.js → tr-M3F5A6AU-bb0tg39m.js} +235 -28
- package/dist/{trigger-enrichment-service-g3vt051f.js → trigger-enrichment-service-sj0p2d1j.js} +23 -20
- package/dist/trigger-entry-point-id-yhqwnkx9.js +15 -0
- package/dist/{zh-CN-IFFXSEJS-9wm9gmrv.js → zh-CN-C5G4PC7C-ds9gkptg.js} +235 -28
- package/dist/{zh-CN-R2KU4U5L-tc1hat59.js → zh-CN-I5D7WHBD-sr5h0a98.js} +29 -2
- package/dist/{zh-TW-GNKMELBF-j674515r.js → zh-TW-2AVLM723-288pkc1z.js} +29 -2
- package/dist/{zh-TW-IYBNYAMG-8727c7v2.js → zh-TW-62HZIG6O-787kdwex.js} +234 -27
- package/package.json +2 -2
- package/dist/migration-diagnosis-ag2sgd1e.js +0 -71
- package/dist/node-sync-service-2tfrgbjs.js +0 -36
- package/dist/out-target-jakehnd3.js +0 -70
- package/dist/packager-tool-57pzrd0g.js +0 -32
- package/dist/packager-tool-dthjwajc.js +0 -13
- package/dist/packager-tool-xy04yy0v.js +0 -32
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import"./packager-tool-1yh8g550.js";
|
|
2
|
+
|
|
3
|
+
// src/services/migration-diagnosis.ts
|
|
4
|
+
var LEGACY_NODE_TYPES = [
|
|
5
|
+
"case-management:Trigger",
|
|
6
|
+
"case-management:Stage",
|
|
7
|
+
"case-management:ExceptionStage",
|
|
8
|
+
"case-management:StickyNote"
|
|
9
|
+
];
|
|
10
|
+
var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : undefined;
|
|
11
|
+
var discriminatorNodeTypes = (migrationError, parsed) => {
|
|
12
|
+
if (!migrationError.includes("discriminator"))
|
|
13
|
+
return [];
|
|
14
|
+
const nodes = Array.isArray(parsed.nodes) ? parsed.nodes : [];
|
|
15
|
+
const offending = new Set;
|
|
16
|
+
for (const raw of nodes) {
|
|
17
|
+
const type = asRecord(raw)?.type;
|
|
18
|
+
if (typeof type !== "string" || type === "")
|
|
19
|
+
continue;
|
|
20
|
+
if (LEGACY_NODE_TYPES.includes(type))
|
|
21
|
+
continue;
|
|
22
|
+
offending.add(type);
|
|
23
|
+
}
|
|
24
|
+
return [...offending];
|
|
25
|
+
};
|
|
26
|
+
var legacySpellingFor = (type) => {
|
|
27
|
+
const lower = type.toLowerCase();
|
|
28
|
+
if (lower.includes("exception"))
|
|
29
|
+
return "case-management:ExceptionStage";
|
|
30
|
+
if (lower.includes("stickynote") || lower.includes("sticky"))
|
|
31
|
+
return "case-management:StickyNote";
|
|
32
|
+
if (lower.includes("trigger"))
|
|
33
|
+
return "case-management:Trigger";
|
|
34
|
+
if (lower.includes("stage"))
|
|
35
|
+
return "case-management:Stage";
|
|
36
|
+
return;
|
|
37
|
+
};
|
|
38
|
+
var diagnoseMigrationFailure = (parsed, migrationError, validate) => {
|
|
39
|
+
const offending = discriminatorNodeTypes(migrationError, parsed);
|
|
40
|
+
if (offending.length === 0)
|
|
41
|
+
return;
|
|
42
|
+
const probe = JSON.parse(JSON.stringify(parsed));
|
|
43
|
+
const nodes = Array.isArray(probe.nodes) ? probe.nodes : [];
|
|
44
|
+
let rewrote = false;
|
|
45
|
+
for (const raw of nodes) {
|
|
46
|
+
const node = asRecord(raw);
|
|
47
|
+
const type = node?.type;
|
|
48
|
+
if (node === undefined || typeof type !== "string")
|
|
49
|
+
continue;
|
|
50
|
+
if (!offending.includes(type))
|
|
51
|
+
continue;
|
|
52
|
+
const legacy = legacySpellingFor(type);
|
|
53
|
+
if (legacy === undefined)
|
|
54
|
+
continue;
|
|
55
|
+
node.type = legacy;
|
|
56
|
+
rewrote = true;
|
|
57
|
+
}
|
|
58
|
+
if (!rewrote)
|
|
59
|
+
return { offending, typeIsTheBlocker: false };
|
|
60
|
+
const result = validate(JSON.stringify(probe));
|
|
61
|
+
if (result.valid)
|
|
62
|
+
return { offending, typeIsTheBlocker: true };
|
|
63
|
+
const remaining = result.migrationError ?? result.issues.map((issue) => `${issue.path}: ${issue.message}`)[0];
|
|
64
|
+
return { offending, typeIsTheBlocker: false, remainingError: remaining };
|
|
65
|
+
};
|
|
66
|
+
var CURRENT_NAMES_MAJOR = 21;
|
|
67
|
+
var CURRENT_NODE_TYPES = new Set([
|
|
68
|
+
"uipath.case.trigger"
|
|
69
|
+
]);
|
|
70
|
+
var named = (types) => types.map((type) => `\`${type}\``).join(", ");
|
|
71
|
+
var migrationHeadline = (migrationError) => {
|
|
72
|
+
const dump = migrationError.indexOf(": [");
|
|
73
|
+
return dump === -1 ? migrationError : migrationError.slice(0, dump);
|
|
74
|
+
};
|
|
75
|
+
var migrationFailureMessage = (migrationError, diagnosis, declaredMajor, legacyFields) => {
|
|
76
|
+
if (diagnosis === undefined)
|
|
77
|
+
return migrationError;
|
|
78
|
+
if (!diagnosis.typeIsTheBlocker) {
|
|
79
|
+
return diagnosis.remainingError === undefined ? `${migrationError} The node type is not the only blocker: ${named(diagnosis.offending)} could not be mapped to a legacy name to test.` : `${migrationError} The node type is a symptom, not the cause: with ${named(diagnosis.offending)} written as its legacy name the document still fails, on ${diagnosis.remainingError}. Fix that first.`;
|
|
80
|
+
}
|
|
81
|
+
if (declaredMajor === undefined || declaredMajor < CURRENT_NAMES_MAJOR) {
|
|
82
|
+
return `${migrationError} This document is valid with ${named(diagnosis.offending)} written as the legacy \`case-management:*\` name, so the node type is what this schema version rejects — the migration step that rejected it accepts only those four names, and it ran because the document matched an older version.`;
|
|
83
|
+
}
|
|
84
|
+
const current = diagnosis.offending.filter((type) => CURRENT_NODE_TYPES.has(type));
|
|
85
|
+
const unknown = diagnosis.offending.filter((type) => !CURRENT_NODE_TYPES.has(type));
|
|
86
|
+
if (unknown.length > 0) {
|
|
87
|
+
const keep = current.length > 0 ? ` ${named(current)} is the right node type at schema ${declaredMajor}, so do not rename it.` : "";
|
|
88
|
+
return `${migrationHeadline(migrationError)}. ${named(unknown)} is not a node type schema ${declaredMajor} has: write it as its legacy \`case-management:*\` name, which is what the document is valid with.${keep}`;
|
|
89
|
+
}
|
|
90
|
+
const cause = legacyFields > 0 ? ` The ${legacyFields} legacy field(s) reported above are written in an older version's form, which is what makes a document match one: fix those first.` : " Find the field written in an older version's form; the node type is not it.";
|
|
91
|
+
return `${migrationHeadline(migrationError)}. The document declares schema ${declaredMajor}, where ${named(diagnosis.offending)} is the right node type, so do not rename it. The schema package reads a document's version from its shape, not its \`version\` field: a field in this document does not match schema ${declaredMajor}, so it was read as an older version and migrated from there, and that step accepts only the legacy names.${cause}`;
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
diagnoseMigrationFailure,
|
|
95
|
+
discriminatorNodeTypes,
|
|
96
|
+
migrationFailureMessage
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
//# debugId=E877AA09EE327A5764756E2164756E21
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MANIFEST_VALIDATION_NEXT_STEP,
|
|
3
|
+
TenantManifestInvalidError,
|
|
4
|
+
filterNodesByKeyword,
|
|
5
|
+
findNodeByType,
|
|
6
|
+
getLocalNodeEnriched,
|
|
7
|
+
getLocalSolutionSnapshot,
|
|
8
|
+
getNode,
|
|
9
|
+
getNodeEnriched,
|
|
10
|
+
isTenantManifestInvalidError,
|
|
11
|
+
listNodes,
|
|
12
|
+
loadCurrentTenantNodes,
|
|
13
|
+
localContractWarning,
|
|
14
|
+
pullNodes,
|
|
15
|
+
pullRemoteNodes,
|
|
16
|
+
searchNodeSummariesWithAvailability,
|
|
17
|
+
searchNodes,
|
|
18
|
+
searchNodesWithFilters
|
|
19
|
+
} from "./packager-tool-29x6vran.js";
|
|
20
|
+
import"./packager-tool-ezds6t5e.js";
|
|
21
|
+
import"./packager-tool-r6b5ktzb.js";
|
|
22
|
+
import"./packager-tool-7hw344bt.js";
|
|
23
|
+
import"./packager-tool-n7w9wx62.js";
|
|
24
|
+
import"./packager-tool-yct6zp4m.js";
|
|
25
|
+
import"./packager-tool-4rtktkhv.js";
|
|
26
|
+
import"./packager-tool-pcvhcn2k.js";
|
|
27
|
+
import"./packager-tool-sc961w0q.js";
|
|
28
|
+
import"./packager-tool-6z1hsm2h.js";
|
|
29
|
+
import"./packager-tool-jysvpt8p.js";
|
|
30
|
+
import"./packager-tool-yn33pw57.js";
|
|
31
|
+
import"./packager-tool-0gctz400.js";
|
|
32
|
+
import"./packager-tool-qa9gftnj.js";
|
|
33
|
+
import"./packager-tool-yc4kw997.js";
|
|
34
|
+
import"./packager-tool-83v804p7.js";
|
|
35
|
+
import"./packager-tool-hdxtgckw.js";
|
|
36
|
+
import"./packager-tool-1yh8g550.js";
|
|
37
|
+
export {
|
|
38
|
+
MANIFEST_VALIDATION_NEXT_STEP,
|
|
39
|
+
TenantManifestInvalidError,
|
|
40
|
+
filterNodesByKeyword,
|
|
41
|
+
findNodeByType,
|
|
42
|
+
getLocalNodeEnriched,
|
|
43
|
+
getLocalSolutionSnapshot,
|
|
44
|
+
getNode,
|
|
45
|
+
getNodeEnriched,
|
|
46
|
+
isTenantManifestInvalidError,
|
|
47
|
+
listNodes,
|
|
48
|
+
loadCurrentTenantNodes,
|
|
49
|
+
localContractWarning,
|
|
50
|
+
pullNodes,
|
|
51
|
+
pullRemoteNodes,
|
|
52
|
+
searchNodeSummariesWithAvailability,
|
|
53
|
+
searchNodes,
|
|
54
|
+
searchNodesWithFilters
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
//# debugId=02B8A88C1949C2BC64756E2164756E21
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
byCodeUnit
|
|
3
|
+
} from "./packager-tool-5qp9xza1.js";
|
|
4
|
+
import {
|
|
5
|
+
catchError
|
|
6
|
+
} from "./packager-tool-83v804p7.js";
|
|
7
|
+
import"./packager-tool-hdxtgckw.js";
|
|
8
|
+
import {
|
|
9
|
+
__require
|
|
10
|
+
} from "./packager-tool-1yh8g550.js";
|
|
11
|
+
|
|
12
|
+
// src/services/sdd-convert/out-target.ts
|
|
13
|
+
var isCaseProject = async (fs, dir) => {
|
|
14
|
+
const [error, text] = await catchError(fs.readFile(fs.path.join(dir, "project.uiproj"), "utf-8"));
|
|
15
|
+
if (error || typeof text !== "string")
|
|
16
|
+
return false;
|
|
17
|
+
const [parseError, parsed] = await catchError(Promise.resolve().then(() => JSON.parse(text)));
|
|
18
|
+
if (parseError || typeof parsed !== "object" || parsed === null) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return parsed.ProjectType === "CaseManagement";
|
|
22
|
+
};
|
|
23
|
+
var planInProject = async (fs, dir) => {
|
|
24
|
+
const [error, entries] = await catchError(fs.readdir(dir));
|
|
25
|
+
if (error || entries === undefined) {
|
|
26
|
+
throw new Error(`Could not list "${dir}" (${error?.message ?? "no entries returned"}) to find the case plan it holds.`);
|
|
27
|
+
}
|
|
28
|
+
const { findCasePlanFileName } = await import("./index-n9qvnx4x.js");
|
|
29
|
+
return findCasePlanFileName(entries);
|
|
30
|
+
};
|
|
31
|
+
var otherPlanInProject = async (fs, out) => {
|
|
32
|
+
const { CasePlanFileNames } = await import("./index-n9qvnx4x.js");
|
|
33
|
+
const name = fs.path.basename(out);
|
|
34
|
+
if (!CasePlanFileNames.includes(name)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const dir = fs.path.dirname(out);
|
|
38
|
+
const marker = fs.path.join(dir, "project.uiproj");
|
|
39
|
+
if (await fs.exists(marker)) {
|
|
40
|
+
const [error, text] = await catchError(fs.readFile(marker, "utf-8"));
|
|
41
|
+
if (error || typeof text !== "string") {
|
|
42
|
+
throw new Error(`Could not read "${marker}" (${error?.message ?? "no content returned"}) to tell whether ${dir} is a case project.`);
|
|
43
|
+
}
|
|
44
|
+
const [parseError, parsed] = catchError(() => JSON.parse(text));
|
|
45
|
+
if (parseError || typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
46
|
+
throw new Error(`"${marker}" is not a JSON object${parseError ? ` (${parseError.message})` : ""}, so convert cannot tell whether ${dir} is a case project.`);
|
|
47
|
+
}
|
|
48
|
+
const type = parsed.ProjectType;
|
|
49
|
+
if (typeof type !== "string" || type === "") {
|
|
50
|
+
throw new Error(`"${marker}" carries no ProjectType, so convert cannot tell whether ${dir} is a case project.`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (!await isCaseProject(fs, dir))
|
|
54
|
+
return;
|
|
55
|
+
const plan = await planInProject(fs, dir);
|
|
56
|
+
return plan === undefined || plan === name ? undefined : fs.path.join(dir, plan);
|
|
57
|
+
};
|
|
58
|
+
var projectsBelowOut = async (fs, out) => {
|
|
59
|
+
const { CasePlanFileNames } = await import("./index-n9qvnx4x.js");
|
|
60
|
+
if (!CasePlanFileNames.includes(fs.path.basename(out))) {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
const dir = fs.path.dirname(out);
|
|
64
|
+
if (await isCaseProject(fs, dir))
|
|
65
|
+
return [];
|
|
66
|
+
const [error, entries] = await catchError(fs.readdir(dir));
|
|
67
|
+
if (error || entries === undefined)
|
|
68
|
+
return [];
|
|
69
|
+
const found = [];
|
|
70
|
+
for (const entry of [...entries].sort(byCodeUnit)) {
|
|
71
|
+
const candidate = fs.path.join(dir, entry);
|
|
72
|
+
const [statError, stat] = await catchError(fs.stat(candidate));
|
|
73
|
+
if (statError || stat?.isDirectory() !== true)
|
|
74
|
+
continue;
|
|
75
|
+
if (await isCaseProject(fs, candidate)) {
|
|
76
|
+
const [, plan] = await catchError(planInProject(fs, candidate));
|
|
77
|
+
found.push(fs.path.join(candidate, plan ?? fs.path.basename(out)));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return found;
|
|
81
|
+
};
|
|
82
|
+
var shellArg = (value) => {
|
|
83
|
+
if (value.startsWith("-") || /["$`%]/.test(value))
|
|
84
|
+
return;
|
|
85
|
+
return /^[\w@+=:,./-]+$/.test(value) ? value : `"${value}"`;
|
|
86
|
+
};
|
|
87
|
+
var correctedConvert = (file, out, resolved) => {
|
|
88
|
+
const quotedFile = shellArg(file);
|
|
89
|
+
const quotedOut = shellArg(out);
|
|
90
|
+
const quotedResolved = resolved === undefined ? undefined : shellArg(resolved);
|
|
91
|
+
if (quotedFile === undefined || quotedOut === undefined)
|
|
92
|
+
return;
|
|
93
|
+
if (resolved !== undefined && quotedResolved === undefined) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
return [
|
|
97
|
+
"uip maestro case sdd convert",
|
|
98
|
+
quotedFile,
|
|
99
|
+
...quotedResolved === undefined ? [] : ["--resolved", quotedResolved],
|
|
100
|
+
"--out",
|
|
101
|
+
quotedOut
|
|
102
|
+
].join(" ");
|
|
103
|
+
};
|
|
104
|
+
export {
|
|
105
|
+
correctedConvert,
|
|
106
|
+
otherPlanInProject,
|
|
107
|
+
projectsBelowOut,
|
|
108
|
+
shellArg
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
//# debugId=7BAD6A36CA16DDEC64756E2164756E21
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadResourceIndex
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-9sd483vs.js";
|
|
4
4
|
import {
|
|
5
5
|
ConnectorsApi,
|
|
6
6
|
createApiClient
|
|
7
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-r6b5ktzb.js";
|
|
8
8
|
import {
|
|
9
9
|
TYPECACHE_PACKAGE_INDEX_TYPES
|
|
10
10
|
} from "./packager-tool-7nxppa3d.js";
|
|
11
11
|
import {
|
|
12
12
|
catchError
|
|
13
|
-
} from "./packager-tool-
|
|
13
|
+
} from "./packager-tool-83v804p7.js";
|
|
14
14
|
|
|
15
15
|
// src/services/connector-lookup-service.ts
|
|
16
16
|
async function lookupTypeCacheEntry(uiPathActivityTypeId, type) {
|
|
@@ -65,12 +65,14 @@ var readIoRows = (document) => {
|
|
|
65
65
|
const outputs = pick(data, "outputs", "Outputs");
|
|
66
66
|
if (!Array.isArray(inputs) && !Array.isArray(outputs))
|
|
67
67
|
return;
|
|
68
|
+
const version = pick(data, "version", "Version");
|
|
68
69
|
return {
|
|
69
70
|
inputs: canonicalList(inputs),
|
|
70
|
-
outputs: canonicalList(outputs)
|
|
71
|
+
outputs: canonicalList(outputs),
|
|
72
|
+
...typeof version === "string" && { version }
|
|
71
73
|
};
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
export { readCaseShape, readSpecFolderKey, readIoRows };
|
|
75
77
|
|
|
76
|
-
//# debugId=
|
|
78
|
+
//# debugId=F25BE2C9DB54B39864756E2164756E21
|