@uipath/rules-tool 1.204.0-preview.249 → 1.204.0-preview.250
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/DmnFactory-VWZOSZHH-jkpbxz3n.js +42 -0
- package/dist/DmnModelTypes-ATR7FVKZ-jp35cecy.js +18 -0
- package/dist/KieDmnMarshaller-6TTUU5B4-47q50gk4.js +20 -0
- package/dist/THIRD-PARTY-NOTICES.md +1054 -0
- package/dist/business-rules-bnr581tz.js +26 -0
- package/dist/{constants-za5vbzp8.js → constants-9pa118cj.js} +17 -10
- package/dist/{embedded-file-reader-wmsg31a8.js → embedded-file-reader-rf2g1kfj.js} +4 -1
- package/dist/first-party-service-sd8yaf73.js +27 -0
- package/dist/hitPolicyResult-4WDHTX4A-gk103w84.js +33 -0
- package/dist/index-2hzp9b97.js +116 -0
- package/dist/index-34pj9f36.js +48 -0
- package/dist/{index-zdwhfpt1.js → index-4c4exdzw.js} +370 -406
- package/dist/index-dqa169gp.js +25 -0
- package/dist/{index-we6zjs66.js → index-fs1nd5ap.js} +40 -4
- package/dist/{index-nzr4mx5p.js → index-sby22td6.js} +22 -2
- package/dist/{index-7wc0g78k.js → index-t4mx1a5e.js} +5 -2
- package/dist/index.js +9 -8
- package/dist/{jmespath-ab6tdc42.js → jmespath-231m3hyn.js} +1 -1
- package/dist/{js-yaml-a2bk27p6.js → js-yaml-88tdqrtd.js} +3 -1
- package/dist/rule-catalog-5gzpe93c.js +46 -0
- package/dist/rules-command-error-20gp2dv9.js +14 -0
- package/dist/{rules-debug-service-h1ahd6p3.js → rules-debug-service-cmgmbhyh.js} +36 -35
- package/dist/{rules-init-service-y678kjje.js → rules-init-service-b74thek5.js} +16 -12
- package/dist/{rules-refresh-service-btn64j8j.js → rules-refresh-service-jgk2kq9d.js} +14 -13
- package/dist/{rules-validate-service-sppr4x13.js → rules-validate-service-mr2fk58k.js} +13 -10
- package/dist/{tool-97x3zjcm.js → tool-19b4ect0.js} +158 -113
- package/dist/{tool-epsr41wx.js → tool-1de529jm.js} +3 -12
- package/dist/{tool-7xmarr97.js → tool-2cky8jwp.js} +2578 -1777
- package/dist/{tool-0bthsb3x.js → tool-4dfpdepw.js} +15 -15
- package/dist/tool-53w8skv5.js +262 -0
- package/dist/tool-7haj67tr.js +19 -0
- package/dist/{tool-e1mmqsjr.js → tool-8h4er38s.js} +411 -396
- package/dist/{tool-2trg1fpx.js → tool-8qy8pkp4.js} +8 -8
- package/dist/tool-av4mmsef.js +73 -0
- package/dist/{tool-8j9f6ns5.js → tool-eymjx05p.js} +11 -11
- package/dist/{tool-mm1x18d6.js → tool-gdtpsdn7.js} +28 -223
- package/dist/{tool-6sqt4zrx.js → tool-jxvk6306.js} +32 -29
- package/dist/tool-m41px07w.js +49 -0
- package/dist/{tool-k2s349kn.js → tool-mkn83w88.js} +17 -14
- package/dist/tool-pm3ewdxc.js +1115 -0
- package/dist/{tool-6rp0gx98.js → tool-tkcx6png.js} +107 -127
- package/dist/{tool-1dycs173.js → tool-wmh645tm.js} +202 -194
- package/dist/{tool-24mr6g8c.js → tool-x0z7hxqr.js} +9 -649
- package/dist/tool.js +8 -7
- package/package.json +2 -15
- package/dist/DmnFactory-SG3RP3T3-cr8e7mxz.js +0 -8
- package/dist/DmnFactory-VWZOSZHH-azx0zqcn.js +0 -8
- package/dist/DmnModelTypes-ATR7FVKZ-vkv7n0jn.js +0 -8
- package/dist/KieDmnMarshaller-6TTUU5B4-rsxhvw7a.js +0 -8
- package/dist/business-rules-d51977r1.js +0 -25
- package/dist/business-rules-dekge24t.js +0 -23
- package/dist/business-rules-ew76mbwg.js +0 -25
- package/dist/business-rules-jmwx05k2.js +0 -25
- package/dist/business-rules-zpzqxyce.js +0 -26
- package/dist/constants-4r8pfr16.js +0 -22
- package/dist/embedded-file-reader-0228j82a.js +0 -111
- package/dist/first-party-service-1qa6cp4d.js +0 -8
- package/dist/first-party-service-28dkctkz.js +0 -8
- package/dist/first-party-service-4fsz3cnj.js +0 -8
- package/dist/first-party-service-ahcc6xc6.js +0 -8
- package/dist/first-party-service-y1ccmsvp.js +0 -8
- package/dist/first-party-service-zpr1q3nd.js +0 -8
- package/dist/hitPolicyResult-4WDHTX4A-dbtkgpqp.js +0 -12
- package/dist/index-2zxy6zgp.js +0 -23
- package/dist/index-3nx77wfh.js +0 -23
- package/dist/index-43zg1wqe.js +0 -19621
- package/dist/index-47jera73.js +0 -23
- package/dist/index-70jn7cz1.js +0 -19631
- package/dist/index-8kb5kc5y.js +0 -24
- package/dist/index-97yad7ms.js +0 -8
- package/dist/index-dfn83hxf.js +0 -14
- package/dist/index-e301h23h.js +0 -24
- package/dist/index-frd259yv.js +0 -24
- package/dist/index-gc7cw2jh.js +0 -23
- package/dist/index-gya2v502.js +0 -8
- package/dist/index-hb3gk1wf.js +0 -24
- package/dist/index-nsnfdqd5.js +0 -24
- package/dist/index-vffktc0w.js +0 -166
- package/dist/index-xymrydfw.js +0 -3095
- package/dist/index-z2qk2qn6.js +0 -24
- package/dist/index-zecwgvg7.js +0 -23
- package/dist/rule-catalog-a5w86qns.js +0 -43
- package/dist/rule-catalog-etpf962f.js +0 -69
- package/dist/rule-catalog-q5cr17hf.js +0 -58
- package/dist/rule-catalog-vc98yg4n.js +0 -43
- package/dist/rule-catalog-z3h66kh5.js +0 -56
- package/dist/rules-command-error-10qmb5w7.js +0 -13
- package/dist/rules-command-error-5bdv4bcx.js +0 -13
- package/dist/rules-command-error-cmssf0w4.js +0 -13
- package/dist/rules-command-error-fsm3b1mv.js +0 -13
- package/dist/rules-debug-service-5rcdh3pj.js +0 -192
- package/dist/rules-debug-service-8q7mkd0r.js +0 -199
- package/dist/rules-debug-service-b9j29ejz.js +0 -192
- package/dist/rules-debug-service-v3jr3r1n.js +0 -192
- package/dist/rules-init-service-3c2yfa7p.js +0 -687
- package/dist/rules-init-service-3wgd9cqp.js +0 -100
- package/dist/rules-init-service-8fqytxq0.js +0 -685
- package/dist/rules-init-service-pspt7sje.js +0 -100
- package/dist/rules-init-service-sbtzw93j.js +0 -102
- package/dist/rules-init-service-x7paqa63.js +0 -687
- package/dist/rules-init-service-y7qzmxx0.js +0 -102
- package/dist/rules-refresh-service-4xxj6ex6.js +0 -65
- package/dist/rules-refresh-service-ba5jk1y9.js +0 -65
- package/dist/rules-refresh-service-qkmphj53.js +0 -65
- package/dist/rules-validate-service-dmgnfne7.js +0 -60
- package/dist/rules-validate-service-hk2d006t.js +0 -60
- package/dist/rules-validate-service-xp05n2d9.js +0 -60
- package/dist/tool-1pkqxwwd.js +0 -17472
- package/dist/tool-39fmkx2d.js +0 -611
- package/dist/tool-3e2q1x2y.js +0 -6578
- package/dist/tool-3j0747gg.js +0 -17077
- package/dist/tool-4z7zcq4z.js +0 -6058
- package/dist/tool-56smnjrh.js +0 -73
- package/dist/tool-5qygptrc.js +0 -6171
- package/dist/tool-5xx6x8pe.js +0 -6596
- package/dist/tool-7fkrd618.js +0 -1556
- package/dist/tool-89xzeteg.js +0 -361
- package/dist/tool-911s9czz.js +0 -570
- package/dist/tool-9bz2x04j.js +0 -40
- package/dist/tool-akh7nnqs.js +0 -704
- package/dist/tool-axfzew45.js +0 -1555
- package/dist/tool-b71jq9pt.js +0 -389
- package/dist/tool-bfj846v8.js +0 -141
- package/dist/tool-bvmc017m.js +0 -96
- package/dist/tool-bykz5ryf.js +0 -454
- package/dist/tool-c76qb8ap.js +0 -17052
- package/dist/tool-ca15515v.js +0 -570
- package/dist/tool-f9qs255w.js +0 -70
- package/dist/tool-ga79rety.js +0 -389
- package/dist/tool-gb547mcn.js +0 -141
- package/dist/tool-gta9rr4h.js +0 -68
- package/dist/tool-h2dfnxdq.js +0 -6486
- package/dist/tool-hg6vr5y9.js +0 -3769
- package/dist/tool-hgvnm4vh.js +0 -1843
- package/dist/tool-hjbf9aay.js +0 -571
- package/dist/tool-k5jm64n3.js +0 -5650
- package/dist/tool-ketztpgf.js +0 -73
- package/dist/tool-n1d88ryb.js +0 -6396
- package/dist/tool-nmqpwh9m.js +0 -6166
- package/dist/tool-pb80pswx.js +0 -73
- package/dist/tool-pcsgwpfw.js +0 -40
- package/dist/tool-q3c1bjyb.js +0 -454
- package/dist/tool-rwp1skmf.js +0 -40
- package/dist/tool-s3fbt22r.js +0 -454
- package/dist/tool-tmbst1r8.js +0 -68
- package/dist/tool-v6w109p0.js +0 -455
- package/dist/tool-w2js05qv.js +0 -389
- package/dist/tool-x67kek1m.js +0 -1838
- package/dist/tool-x89947ah.js +0 -17052
- package/dist/tool-xhksjdka.js +0 -4005
- package/dist/tool-yv3t4gg5.js +0 -108
- package/dist/tool-zbyb1ttx.js +0 -5650
- /package/dist/{tool-fbqnqf9k.js → tool-jd313s2x.js} +0 -0
- /package/dist/{tool-vyx8fpft.js → tool-qgqscsjc.js} +0 -0
package/dist/tool-yv3t4gg5.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getFileSystem,
|
|
3
|
-
catchError
|
|
4
|
-
} from "./tool-5xx6x8pe.js";
|
|
5
|
-
import {
|
|
6
|
-
RulesCommandError2,
|
|
7
|
-
isJsonObject2
|
|
8
|
-
} from "./tool-2trg1fpx.js";
|
|
9
|
-
|
|
10
|
-
// ../packager/packager-tool-businessrules/src/entry-point-id.ts
|
|
11
|
-
var EntryPointIdSalt = "uipath:business-rules:entry-point";
|
|
12
|
-
function ruleNameForEntryPointId(declaredName, projectFolderName) {
|
|
13
|
-
return declaredName?.trim() || projectFolderName;
|
|
14
|
-
}
|
|
15
|
-
async function deriveEntryPointId(ruleName, filePath) {
|
|
16
|
-
const digest = new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(`${EntryPointIdSalt}
|
|
17
|
-
${ruleName}
|
|
18
|
-
${filePath}`)));
|
|
19
|
-
digest[6] = digest[6] & 15 | 128;
|
|
20
|
-
digest[8] = digest[8] & 63 | 128;
|
|
21
|
-
const hex = Array.from(digest.subarray(0, 16), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
22
|
-
return [
|
|
23
|
-
hex.slice(0, 8),
|
|
24
|
-
hex.slice(8, 12),
|
|
25
|
-
hex.slice(12, 16),
|
|
26
|
-
hex.slice(16, 20),
|
|
27
|
-
hex.slice(20)
|
|
28
|
-
].join("-");
|
|
29
|
-
}
|
|
30
|
-
async function withDerivedEntryPointIds(entryPointsContent, ruleName) {
|
|
31
|
-
const derived = JSON.parse(entryPointsContent);
|
|
32
|
-
for (const entryPoint of derived.entryPoints) {
|
|
33
|
-
entryPoint.uniqueId = await deriveEntryPointId(ruleName, entryPoint.filePath);
|
|
34
|
-
}
|
|
35
|
-
return JSON.stringify(derived, null, 2);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// src/services/rule-project.ts
|
|
39
|
-
var ENTRY_POINTS_FILE = "entry-points.json";
|
|
40
|
-
var BINDINGS_FILE = "bindings_v2.json";
|
|
41
|
-
async function readRuleProjectAsync(projectPath) {
|
|
42
|
-
const fs = getFileSystem();
|
|
43
|
-
const projectDir = fs.path.resolve(projectPath);
|
|
44
|
-
const declaredName = await readRulesProjectNameAsync(projectDir);
|
|
45
|
-
const names = (await fs.readdir(projectDir)).filter((name) => name.toLowerCase().endsWith(".dmn")).sort((a, b) => a.localeCompare(b, "en"));
|
|
46
|
-
const dmnFiles = await Promise.all(names.map(async (name) => ({
|
|
47
|
-
name,
|
|
48
|
-
contents: await fs.readFile(fs.path.join(projectDir, name), "utf-8") ?? ""
|
|
49
|
-
})));
|
|
50
|
-
if (dmnFiles.length === 0) {
|
|
51
|
-
throw new RulesCommandError2(`No .dmn file found in ${projectDir}.`, "not_found", "Add the rule's .dmn file at the top level of the project, or run 'uip rules init <name>' to scaffold one.");
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
projectDir,
|
|
55
|
-
dmnFiles,
|
|
56
|
-
publishedEntryPoints: await readPublishedEntryPoints(projectDir),
|
|
57
|
-
ruleName: ruleNameForEntryPointId(declaredName, fs.path.basename(projectDir))
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
async function buildRuleEntryPointsAsync(dmnFiles, publishedEntryPoints, ruleName) {
|
|
61
|
-
const { buildBusinessRulePackagingFiles } = await import("./index-we6zjs66.js");
|
|
62
|
-
const packaging = await buildBusinessRulePackagingFiles(dmnFiles, publishedEntryPoints, true);
|
|
63
|
-
if (publishedEntryPoints != null || ruleName === undefined) {
|
|
64
|
-
return packaging;
|
|
65
|
-
}
|
|
66
|
-
return {
|
|
67
|
-
...packaging,
|
|
68
|
-
entryPoints: await Promise.all(packaging.entryPoints.map(async (entryPoint) => ({
|
|
69
|
-
...entryPoint,
|
|
70
|
-
uniqueId: await deriveEntryPointId(ruleName, entryPoint.filePath)
|
|
71
|
-
}))),
|
|
72
|
-
entryPointsContent: await withDerivedEntryPointIds(packaging.entryPointsContent, ruleName)
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
async function readRulesProjectNameAsync(projectDir) {
|
|
76
|
-
const fs = getFileSystem();
|
|
77
|
-
const filePath = fs.path.join(projectDir, "project.uiproj");
|
|
78
|
-
const raw = await fs.readFile(filePath, "utf-8");
|
|
79
|
-
const project = raw === null ? undefined : parseJson(raw);
|
|
80
|
-
if (raw !== null && project === undefined) {
|
|
81
|
-
throw new RulesCommandError2(`Could not read ${filePath}: it is not valid JSON.`, "invalid_argument", "Fix the project file, or run 'uip rules init <name> --force' to recreate it.");
|
|
82
|
-
}
|
|
83
|
-
if (!isJsonObject2(project) || project.ProjectType !== "BusinessRules") {
|
|
84
|
-
throw new RulesCommandError2(`${projectDir} is not a business rules project.`, "invalid_argument", "Pass the folder that holds the rules project's project.uiproj, created by 'uip rules init'.");
|
|
85
|
-
}
|
|
86
|
-
return typeof project.Name === "string" ? project.Name : "";
|
|
87
|
-
}
|
|
88
|
-
async function readPublishedEntryPoints(projectDir) {
|
|
89
|
-
const fs = getFileSystem();
|
|
90
|
-
const filePath = fs.path.join(projectDir, ENTRY_POINTS_FILE);
|
|
91
|
-
const raw = await fs.readFile(filePath, "utf-8");
|
|
92
|
-
if (raw === null) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
const published = parseJson(raw);
|
|
96
|
-
if (!isJsonObject2(published) || !Array.isArray(published.entryPoints)) {
|
|
97
|
-
throw new RulesCommandError2(`${filePath} is not an entry-points document: it needs an "entryPoints" array.`, "invalid_argument", `Fix or delete ${ENTRY_POINTS_FILE}; deleting it gives every entry point a new uniqueId, which breaks the consumers bound to the old ones.`);
|
|
98
|
-
}
|
|
99
|
-
return published;
|
|
100
|
-
}
|
|
101
|
-
function parseJson(raw) {
|
|
102
|
-
const [, parsed] = catchError(() => JSON.parse(raw));
|
|
103
|
-
return parsed;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { ENTRY_POINTS_FILE, BINDINGS_FILE, readRuleProjectAsync, buildRuleEntryPointsAsync, readRulesProjectNameAsync };
|
|
107
|
-
|
|
108
|
-
//# debugId=3C93FC778F7ABEA064756E2164756E21
|