@uipath/rules-tool 1.204.0-preview.249 → 1.204.0-preview.254
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 +1085 -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-yvh448xp.js} +36 -35
- package/dist/{rules-init-service-y678kjje.js → rules-init-service-ewahc0vh.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-x67kek1m.js → tool-2qj74g14.js} +12 -652
- 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-6sqt4zrx.js → tool-cgmy94zt.js} +32 -29
- package/dist/{tool-8j9f6ns5.js → tool-eymjx05p.js} +11 -11
- package/dist/{tool-mm1x18d6.js → tool-gdtpsdn7.js} +28 -223
- 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.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-24mr6g8c.js +0 -1556
- 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-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-ga79rety.js
DELETED
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
catchError,
|
|
3
|
-
logger,
|
|
4
|
-
unsupportedSolutionProjectType
|
|
5
|
-
} from "./tool-zbyb1ttx.js";
|
|
6
|
-
|
|
7
|
-
// ../solution-sdk/src/solution-file.ts
|
|
8
|
-
var STUDIO_WEB_PROJECT_TYPE_OVERRIDES = {
|
|
9
|
-
ProcessOrchestration: "processOrchestration"
|
|
10
|
-
};
|
|
11
|
-
function normalizeProjectType(projectType) {
|
|
12
|
-
return STUDIO_WEB_PROJECT_TYPE_OVERRIDES[projectType] ?? projectType;
|
|
13
|
-
}
|
|
14
|
-
function toPortableRelativePath(relativePath) {
|
|
15
|
-
return relativePath.replace(/\\/g, "/");
|
|
16
|
-
}
|
|
17
|
-
function isRecord(value) {
|
|
18
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19
|
-
}
|
|
20
|
-
async function createSolutionManifest(fs, solutionDir, solutionName, options = {}) {
|
|
21
|
-
const resolvedDir = fs.path.resolve(solutionDir);
|
|
22
|
-
if (!(options.allowExistingDir && await fs.exists(resolvedDir))) {
|
|
23
|
-
await fs.mkdir(resolvedDir);
|
|
24
|
-
}
|
|
25
|
-
const solutionId = crypto.randomUUID();
|
|
26
|
-
const manifest = {
|
|
27
|
-
DocVersion: "1.0.0",
|
|
28
|
-
StudioMinVersion: "2025.10.0",
|
|
29
|
-
SolutionId: solutionId,
|
|
30
|
-
Projects: []
|
|
31
|
-
};
|
|
32
|
-
const solutionFile = fs.path.join(resolvedDir, `${solutionName}.uipx`);
|
|
33
|
-
await fs.writeFile(solutionFile, `${JSON.stringify(manifest, null, 2)}
|
|
34
|
-
`);
|
|
35
|
-
return {
|
|
36
|
-
solutionDir: resolvedDir,
|
|
37
|
-
solutionFile,
|
|
38
|
-
solutionId
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
var AUTO_SOLUTION_SUFFIX = "Solution";
|
|
42
|
-
async function autoScaffoldSolution(fs, baseDir, projectName) {
|
|
43
|
-
const solutionName = `${projectName}${AUTO_SOLUTION_SUFFIX}`;
|
|
44
|
-
const solutionDir = fs.path.resolve(baseDir, solutionName);
|
|
45
|
-
const expectedSolutionFile = fs.path.join(solutionDir, `${solutionName}.uipx`);
|
|
46
|
-
if (await fs.exists(expectedSolutionFile)) {
|
|
47
|
-
return {
|
|
48
|
-
Name: solutionName,
|
|
49
|
-
Path: solutionDir,
|
|
50
|
-
SolutionFile: expectedSolutionFile
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
const { solutionFile } = await createSolutionManifest(fs, solutionDir, solutionName, { allowExistingDir: true });
|
|
54
|
-
return {
|
|
55
|
-
Name: solutionName,
|
|
56
|
-
Path: solutionDir,
|
|
57
|
-
SolutionFile: solutionFile
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
async function prepareProjectLocation(fs, candidateProjectDir, projectName, options = {}) {
|
|
61
|
-
const resolved = fs.path.resolve(candidateProjectDir);
|
|
62
|
-
if (options.skipRegistration) {
|
|
63
|
-
return { projectDir: resolved };
|
|
64
|
-
}
|
|
65
|
-
const discovery = await findNearestParentUipxFile(fs, resolved);
|
|
66
|
-
if (discovery.status !== "notFound") {
|
|
67
|
-
return { projectDir: resolved };
|
|
68
|
-
}
|
|
69
|
-
const baseDir = fs.path.dirname(resolved);
|
|
70
|
-
const autoCreatedSolution = await autoScaffoldSolution(fs, baseDir, projectName);
|
|
71
|
-
const projectDir = fs.path.join(autoCreatedSolution.Path, projectName);
|
|
72
|
-
await warnIfCandidateDirShadowed(fs, resolved, projectDir);
|
|
73
|
-
return { projectDir, autoCreatedSolution };
|
|
74
|
-
}
|
|
75
|
-
async function warnIfCandidateDirShadowed(fs, candidateDir, projectDir) {
|
|
76
|
-
const [, exists] = await catchError(fs.exists(candidateDir));
|
|
77
|
-
if (!exists) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
const [, entries] = await catchError(fs.readdir(candidateDir));
|
|
81
|
-
if (!entries || entries.length === 0) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
logger.warn(`An existing directory "${candidateDir}" was left untouched. ` + `The project was created inside the auto-created solution at "${projectDir}". ` + "Run init from inside an existing solution, or pass --skip-solution-registration, if you meant to use the existing directory.");
|
|
85
|
-
}
|
|
86
|
-
async function tryRegisterProjectInParentSolution(fs, projectDir, options) {
|
|
87
|
-
if (options?.skipRegistration) {
|
|
88
|
-
return {
|
|
89
|
-
Status: "OptedOut",
|
|
90
|
-
Message: "Solution auto-registration skipped (--skip-solution-registration).",
|
|
91
|
-
Instructions: buildOptedOutInstructions(fs.path.resolve(projectDir))
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
const [registrationError, registration] = await catchError(registerProjectInParentSolution(fs, projectDir));
|
|
95
|
-
if (registrationError) {
|
|
96
|
-
return {
|
|
97
|
-
Status: "Failed",
|
|
98
|
-
Message: "Project registration failed.",
|
|
99
|
-
Instructions: buildRegistrationFailureInstructions(projectDir, registrationError.message)
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
return registration;
|
|
103
|
-
}
|
|
104
|
-
async function registerProjectInParentSolution(fs, projectDir) {
|
|
105
|
-
const resolvedProjectDir = fs.path.resolve(projectDir);
|
|
106
|
-
const discovery = await findNearestParentUipxFile(fs, resolvedProjectDir);
|
|
107
|
-
if (discovery.status === "notFound") {
|
|
108
|
-
return {
|
|
109
|
-
Status: "NotInSolution",
|
|
110
|
-
Message: "Project created in standalone mode; no parent .uipx solution found.",
|
|
111
|
-
Instructions: buildStandaloneInstructions(resolvedProjectDir)
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
if (discovery.status === "skipped") {
|
|
115
|
-
return discovery.registration;
|
|
116
|
-
}
|
|
117
|
-
const solutionFile = discovery.solutionFile;
|
|
118
|
-
const solutionDir = fs.path.dirname(solutionFile);
|
|
119
|
-
const relativeProjectDir = fs.path.relative(solutionDir, resolvedProjectDir);
|
|
120
|
-
if (relativeProjectDir === "" || relativeProjectDir.startsWith("..") || fs.path.isAbsolute(relativeProjectDir)) {
|
|
121
|
-
return {
|
|
122
|
-
Status: "Skipped",
|
|
123
|
-
Message: "Project registration skipped.",
|
|
124
|
-
Solution: solutionFile,
|
|
125
|
-
Instructions: `Project must reside within the solution folder.
|
|
126
|
-
Solution: ${solutionDir}
|
|
127
|
-
Project: ${resolvedProjectDir}`
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
const [projectFileError, projectFile] = await findProjectFile(fs, resolvedProjectDir);
|
|
131
|
-
if (projectFileError) {
|
|
132
|
-
return {
|
|
133
|
-
Status: "Failed",
|
|
134
|
-
Message: "Project registration failed.",
|
|
135
|
-
Solution: solutionFile,
|
|
136
|
-
Instructions: buildRegistrationFailureInstructions(resolvedProjectDir, projectFileError.message)
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
const [projectManifestError, projectManifest] = await readProjectManifest(fs, projectFile.filePath, projectFile.useProjectJson);
|
|
140
|
-
if (projectManifestError) {
|
|
141
|
-
return {
|
|
142
|
-
Status: "Failed",
|
|
143
|
-
Message: "Project registration failed.",
|
|
144
|
-
Solution: solutionFile,
|
|
145
|
-
Instructions: buildRegistrationFailureInstructions(resolvedProjectDir, projectManifestError.message)
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
const unsupportedReason = unsupportedSolutionProjectType(projectManifest.projectType);
|
|
149
|
-
if (unsupportedReason) {
|
|
150
|
-
return {
|
|
151
|
-
Status: "Skipped",
|
|
152
|
-
Message: "Project registration skipped.",
|
|
153
|
-
Solution: solutionFile,
|
|
154
|
-
Instructions: unsupportedReason
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
const projectRelativePath = toPortableRelativePath(fs.path.join(relativeProjectDir, projectFile.fileName));
|
|
158
|
-
const [solutionError, solution] = await readSolutionManifest(fs, solutionFile);
|
|
159
|
-
if (solutionError) {
|
|
160
|
-
return {
|
|
161
|
-
Status: "Failed",
|
|
162
|
-
Message: "Project registration failed.",
|
|
163
|
-
Solution: solutionFile,
|
|
164
|
-
Project: projectRelativePath,
|
|
165
|
-
Instructions: buildRegistrationFailureInstructions(resolvedProjectDir, solutionError.message)
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
const existingProject = solution.projects.find((project) => toPortableRelativePath(project.ProjectRelativePath) === projectRelativePath);
|
|
169
|
-
if (existingProject) {
|
|
170
|
-
return {
|
|
171
|
-
Status: "AlreadyRegistered",
|
|
172
|
-
Message: "Project already registered in solution.",
|
|
173
|
-
Solution: solutionFile,
|
|
174
|
-
Project: projectRelativePath,
|
|
175
|
-
ProjectId: typeof existingProject.Id === "string" ? existingProject.Id : undefined,
|
|
176
|
-
Instructions: buildRegistrationSuccessInstructions(solutionDir)
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
const projectId = crypto.randomUUID();
|
|
180
|
-
solution.projects.push({
|
|
181
|
-
Type: normalizeProjectType(projectManifest.projectType),
|
|
182
|
-
ProjectRelativePath: projectRelativePath,
|
|
183
|
-
Id: projectId
|
|
184
|
-
});
|
|
185
|
-
solution.content.Projects = solution.projects;
|
|
186
|
-
const [writeError] = await catchError(fs.writeFile(solutionFile, `${JSON.stringify(solution.content, null, 2)}
|
|
187
|
-
`));
|
|
188
|
-
if (writeError) {
|
|
189
|
-
return {
|
|
190
|
-
Status: "Failed",
|
|
191
|
-
Message: "Project registration failed.",
|
|
192
|
-
Solution: solutionFile,
|
|
193
|
-
Project: projectRelativePath,
|
|
194
|
-
Instructions: buildRegistrationFailureInstructions(resolvedProjectDir, writeError.message)
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
return {
|
|
198
|
-
Status: "Registered",
|
|
199
|
-
Message: "Project registered in parent solution.",
|
|
200
|
-
Solution: solutionFile,
|
|
201
|
-
Project: projectRelativePath,
|
|
202
|
-
ProjectId: projectId,
|
|
203
|
-
Instructions: buildRegistrationSuccessInstructions(solutionDir)
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
async function findNearestParentUipxFile(fs, projectDir) {
|
|
207
|
-
let currentDir = fs.path.dirname(fs.path.resolve(projectDir));
|
|
208
|
-
while (true) {
|
|
209
|
-
const [readDirError, entries] = await catchError(fs.readdir(currentDir));
|
|
210
|
-
if (readDirError) {
|
|
211
|
-
return {
|
|
212
|
-
status: "skipped",
|
|
213
|
-
registration: {
|
|
214
|
-
Status: "Failed",
|
|
215
|
-
Message: "Project registration failed.",
|
|
216
|
-
Instructions: buildRegistrationFailureInstructions(projectDir, `Could not inspect parent directory for a solution: ${currentDir}
|
|
217
|
-
${readDirError.message}`)
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
const solutionFiles = entries.filter((entry) => entry.endsWith(".uipx"));
|
|
222
|
-
if (solutionFiles.length > 1) {
|
|
223
|
-
return {
|
|
224
|
-
status: "skipped",
|
|
225
|
-
registration: {
|
|
226
|
-
Status: "Skipped",
|
|
227
|
-
Message: "Project registration skipped.",
|
|
228
|
-
Instructions: `Found multiple .uipx files in ${currentDir}: ${solutionFiles.join(", ")}. Run 'uip solution projects add "${projectDir}" <solution.uipx>' to choose one.`
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
if (solutionFiles.length === 1) {
|
|
233
|
-
return {
|
|
234
|
-
status: "found",
|
|
235
|
-
solutionFile: fs.path.join(currentDir, solutionFiles[0])
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
const parentDir = fs.path.dirname(currentDir);
|
|
239
|
-
if (parentDir === currentDir) {
|
|
240
|
-
return { status: "notFound" };
|
|
241
|
-
}
|
|
242
|
-
currentDir = parentDir;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
async function findProjectFile(fs, projectDir) {
|
|
246
|
-
const uiprojPath = fs.path.join(projectDir, "project.uiproj");
|
|
247
|
-
if (await fs.exists(uiprojPath)) {
|
|
248
|
-
return [
|
|
249
|
-
null,
|
|
250
|
-
{
|
|
251
|
-
filePath: uiprojPath,
|
|
252
|
-
fileName: "project.uiproj",
|
|
253
|
-
useProjectJson: false
|
|
254
|
-
}
|
|
255
|
-
];
|
|
256
|
-
}
|
|
257
|
-
const jsonProjectPath = fs.path.join(projectDir, "project.json");
|
|
258
|
-
if (await fs.exists(jsonProjectPath)) {
|
|
259
|
-
return [
|
|
260
|
-
null,
|
|
261
|
-
{
|
|
262
|
-
filePath: jsonProjectPath,
|
|
263
|
-
fileName: "project.json",
|
|
264
|
-
useProjectJson: true
|
|
265
|
-
}
|
|
266
|
-
];
|
|
267
|
-
}
|
|
268
|
-
return [
|
|
269
|
-
new Error(`No project file found in ${projectDir}. Expected project.uiproj or project.json.`),
|
|
270
|
-
null
|
|
271
|
-
];
|
|
272
|
-
}
|
|
273
|
-
async function readProjectManifest(fs, filePath, useProjectJson) {
|
|
274
|
-
const [readError, rawContent] = await catchError(fs.readFile(filePath, "utf-8"));
|
|
275
|
-
if (readError || !rawContent) {
|
|
276
|
-
return [readError ?? new Error(`Unable to read ${filePath}.`), null];
|
|
277
|
-
}
|
|
278
|
-
const [parseError, parsed] = catchError(() => JSON.parse(rawContent));
|
|
279
|
-
if (parseError) {
|
|
280
|
-
return [
|
|
281
|
-
new Error(`Invalid JSON in project file: ${parseError.message}`),
|
|
282
|
-
null
|
|
283
|
-
];
|
|
284
|
-
}
|
|
285
|
-
if (!isRecord(parsed)) {
|
|
286
|
-
return [new Error(`Invalid project file: ${filePath}`), null];
|
|
287
|
-
}
|
|
288
|
-
const designOptions = parsed.designOptions;
|
|
289
|
-
const outputType = useProjectJson && isRecord(designOptions) ? readString(designOptions.outputType) : undefined;
|
|
290
|
-
const projectType = outputType ?? readString(parsed.ProjectType);
|
|
291
|
-
if (!projectType) {
|
|
292
|
-
return [new Error(`ProjectType not found in ${filePath}`), null];
|
|
293
|
-
}
|
|
294
|
-
return [
|
|
295
|
-
null,
|
|
296
|
-
{
|
|
297
|
-
projectType
|
|
298
|
-
}
|
|
299
|
-
];
|
|
300
|
-
}
|
|
301
|
-
async function readSolutionManifest(fs, solutionFile) {
|
|
302
|
-
const [readError, rawContent] = await catchError(fs.readFile(solutionFile, "utf-8"));
|
|
303
|
-
if (readError || !rawContent) {
|
|
304
|
-
return [
|
|
305
|
-
readError ?? new Error(`Unable to read solution file: ${solutionFile}`),
|
|
306
|
-
null
|
|
307
|
-
];
|
|
308
|
-
}
|
|
309
|
-
const [parseError, parsed] = catchError(() => JSON.parse(rawContent));
|
|
310
|
-
if (parseError) {
|
|
311
|
-
return [
|
|
312
|
-
new Error(`Invalid JSON in solution file: ${parseError.message}`),
|
|
313
|
-
null
|
|
314
|
-
];
|
|
315
|
-
}
|
|
316
|
-
if (!isRecord(parsed)) {
|
|
317
|
-
return [
|
|
318
|
-
new Error(`Invalid solution file: ${solutionFile} must contain a JSON object.`),
|
|
319
|
-
null
|
|
320
|
-
];
|
|
321
|
-
}
|
|
322
|
-
if (!Array.isArray(parsed.Projects)) {
|
|
323
|
-
return [
|
|
324
|
-
new Error(`Invalid solution file: ${solutionFile} must contain a Projects array.`),
|
|
325
|
-
null
|
|
326
|
-
];
|
|
327
|
-
}
|
|
328
|
-
const projects = [];
|
|
329
|
-
for (const [index, project] of parsed.Projects.entries()) {
|
|
330
|
-
if (!isRecord(project)) {
|
|
331
|
-
return [
|
|
332
|
-
new Error(`Invalid solution file: Projects[${index}] must be an object.`),
|
|
333
|
-
null
|
|
334
|
-
];
|
|
335
|
-
}
|
|
336
|
-
const projectRelativePath = readString(project.ProjectRelativePath);
|
|
337
|
-
if (!projectRelativePath) {
|
|
338
|
-
return [
|
|
339
|
-
new Error(`Invalid solution file: Projects[${index}] is missing ProjectRelativePath. Use 'uip solution projects add' to repair the manifest.`),
|
|
340
|
-
null
|
|
341
|
-
];
|
|
342
|
-
}
|
|
343
|
-
projects.push({
|
|
344
|
-
...project,
|
|
345
|
-
Type: readString(project.Type) ?? "",
|
|
346
|
-
ProjectRelativePath: projectRelativePath,
|
|
347
|
-
Id: readString(project.Id) ?? ""
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
return [null, { content: parsed, projects }];
|
|
351
|
-
}
|
|
352
|
-
function readString(value) {
|
|
353
|
-
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
354
|
-
}
|
|
355
|
-
function buildRegistrationSuccessInstructions(solutionDir) {
|
|
356
|
-
return [
|
|
357
|
-
"The project is listed in the parent solution manifest.",
|
|
358
|
-
"Packing or uploading the solution will sync solution resources automatically.",
|
|
359
|
-
`To sync resources before packaging, run 'uip solution resources refresh --solution-folder "${solutionDir}"'.`
|
|
360
|
-
].join(`
|
|
361
|
-
`);
|
|
362
|
-
}
|
|
363
|
-
function buildRegistrationFailureInstructions(projectDir, details) {
|
|
364
|
-
return [
|
|
365
|
-
"Automatic solution registration could not complete.",
|
|
366
|
-
`Run 'uip solution projects add "${projectDir}" <solution.uipx>' after checking the project and solution files.`,
|
|
367
|
-
`Details: ${details}`
|
|
368
|
-
].join(`
|
|
369
|
-
`);
|
|
370
|
-
}
|
|
371
|
-
function buildStandaloneInstructions(projectDir) {
|
|
372
|
-
return [
|
|
373
|
-
"No parent solution was found by walking ancestor directories.",
|
|
374
|
-
"Studio Web upload, `flow debug`, and packaging require an enclosing solution.",
|
|
375
|
-
`To link this project to a solution, run 'uip solution init "<SolutionName>"' then 'uip solution projects add "${projectDir}" <SolutionName>.uipx'.`
|
|
376
|
-
].join(`
|
|
377
|
-
`);
|
|
378
|
-
}
|
|
379
|
-
function buildOptedOutInstructions(projectDir) {
|
|
380
|
-
return [
|
|
381
|
-
"Automatic solution registration was skipped because --skip-solution-registration was passed.",
|
|
382
|
-
`To register this project later, run 'uip solution projects add "${projectDir}" <SolutionName>.uipx' from within the solution.`
|
|
383
|
-
].join(`
|
|
384
|
-
`);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
export { normalizeProjectType, toPortableRelativePath, prepareProjectLocation, tryRegisterProjectInParentSolution };
|
|
388
|
-
|
|
389
|
-
//# debugId=9F94850867E6D86464756E2164756E21
|
package/dist/tool-gb547mcn.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
catchError,
|
|
3
|
-
RESULTS,
|
|
4
|
-
OutputFormatter,
|
|
5
|
-
processContext
|
|
6
|
-
} from "./tool-zbyb1ttx.js";
|
|
7
|
-
// package.json
|
|
8
|
-
var package_default = {
|
|
9
|
-
name: "@uipath/rules-tool",
|
|
10
|
-
author: "UiPath",
|
|
11
|
-
license: "SEE LICENSE IN LICENSE.txt",
|
|
12
|
-
version: "1.204.0",
|
|
13
|
-
description: "Create and manage UiPath Business Rules (DMN) projects.",
|
|
14
|
-
private: false,
|
|
15
|
-
repository: {
|
|
16
|
-
type: "git",
|
|
17
|
-
url: "https://github.com/UiPath/cli.git",
|
|
18
|
-
directory: "packages/rules-tool"
|
|
19
|
-
},
|
|
20
|
-
publishConfig: {
|
|
21
|
-
registry: "https://npm.pkg.github.com/@uipath"
|
|
22
|
-
},
|
|
23
|
-
keywords: [
|
|
24
|
-
"cli-tool"
|
|
25
|
-
],
|
|
26
|
-
type: "module",
|
|
27
|
-
main: "./dist/tool.js",
|
|
28
|
-
exports: {
|
|
29
|
-
".": "./dist/tool.js"
|
|
30
|
-
},
|
|
31
|
-
bin: {
|
|
32
|
-
"rules-tool": "./dist/index.js"
|
|
33
|
-
},
|
|
34
|
-
files: [
|
|
35
|
-
"dist"
|
|
36
|
-
],
|
|
37
|
-
scripts: {
|
|
38
|
-
build: "bun ../../tools/build-tool.ts",
|
|
39
|
-
package: "bun run build && bun pm pack",
|
|
40
|
-
lint: "biome check .",
|
|
41
|
-
"lint:fix": "biome check --write .",
|
|
42
|
-
test: "vitest run",
|
|
43
|
-
"test:coverage": "vitest run --coverage"
|
|
44
|
-
},
|
|
45
|
-
devDependencies: {
|
|
46
|
-
"@types/node": "^25.5.2",
|
|
47
|
-
"@uipath/common": "workspace:*",
|
|
48
|
-
"@uipath/filesystem": "workspace:*",
|
|
49
|
-
"@uipath/maestro-sdk": "workspace:*",
|
|
50
|
-
"@uipath/solution-sdk": "workspace:*",
|
|
51
|
-
commander: "^14.0.3",
|
|
52
|
-
fflate: "^0.8.2",
|
|
53
|
-
typescript: "^7.0.2"
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
// src/commands/init.ts
|
|
58
|
-
var RULES_INIT_EXAMPLES = [
|
|
59
|
-
{
|
|
60
|
-
Description: "Create a new business rules project. If the current directory is not already inside a solution, a parent solution named '<project>Solution' is created automatically and the rules project is nested inside it.",
|
|
61
|
-
Command: "uip maestro rules init my-rules-project",
|
|
62
|
-
Output: {
|
|
63
|
-
Code: "RulesInit",
|
|
64
|
-
Data: {
|
|
65
|
-
Status: "Created successfully",
|
|
66
|
-
Path: "/workspace/my-rules-projectSolution/my-rules-project",
|
|
67
|
-
RuleStatus: "Created",
|
|
68
|
-
SolutionRegistration: {
|
|
69
|
-
Status: "Registered",
|
|
70
|
-
Message: "Project registered in parent solution.",
|
|
71
|
-
Solution: "/workspace/my-rules-projectSolution/my-rules-projectSolution.uipx",
|
|
72
|
-
Project: "my-rules-project/project.uiproj",
|
|
73
|
-
ProjectId: "00000000-0000-0000-0000-000000000000",
|
|
74
|
-
Instructions: `The project is listed in the parent solution manifest.
|
|
75
|
-
Packing or uploading the solution will sync solution resources automatically.`
|
|
76
|
-
},
|
|
77
|
-
AutoCreatedSolution: {
|
|
78
|
-
Name: "my-rules-projectSolution",
|
|
79
|
-
Path: "/workspace/my-rules-projectSolution",
|
|
80
|
-
SolutionFile: "/workspace/my-rules-projectSolution/my-rules-projectSolution.uipx"
|
|
81
|
-
},
|
|
82
|
-
ProjectArtifacts: { Created: true },
|
|
83
|
-
NextSteps: `The project is listed in the parent solution manifest.
|
|
84
|
-
Packing or uploading the solution will sync solution resources automatically.`
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
];
|
|
89
|
-
var registerInitCommand = (program) => {
|
|
90
|
-
program.command("init").description("Create a new business rules project seeded with one decision table. If run outside an existing solution, a parent '<name>Solution' is scaffolded automatically and the rules project is created inside it. If run inside an existing solution, the project is added to that solution.").argument("<name>", "Business rules project name").option("--force", "Force initialization even if target directory exists and is not empty").option("--skip-solution-registration", "Do not auto-register this project in the surrounding solution").examples(RULES_INIT_EXAMPLES).trackedAction(processContext, async (name, options) => {
|
|
91
|
-
const { rulesInitAsync } = await import("./rules-init-service-x7paqa63.js");
|
|
92
|
-
const [error, result] = await catchError(rulesInitAsync(name, {
|
|
93
|
-
force: options.force,
|
|
94
|
-
skipRegistration: options.skipSolutionRegistration === true
|
|
95
|
-
}));
|
|
96
|
-
if (error) {
|
|
97
|
-
OutputFormatter.error({
|
|
98
|
-
Result: RESULTS.Failure,
|
|
99
|
-
Message: "Failed to create business rules project",
|
|
100
|
-
Instructions: error.message
|
|
101
|
-
});
|
|
102
|
-
processContext.exit(1);
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
const data = {
|
|
106
|
-
Status: "Created successfully",
|
|
107
|
-
Path: result.projectDir,
|
|
108
|
-
RuleStatus: result.ruleStatus,
|
|
109
|
-
SolutionRegistration: result.registration
|
|
110
|
-
};
|
|
111
|
-
if (result.autoCreatedSolution) {
|
|
112
|
-
data.AutoCreatedSolution = result.autoCreatedSolution;
|
|
113
|
-
}
|
|
114
|
-
if (result.projectArtifacts) {
|
|
115
|
-
data.ProjectArtifacts = result.projectArtifacts;
|
|
116
|
-
}
|
|
117
|
-
if (result.registration.Instructions) {
|
|
118
|
-
data.NextSteps = result.registration.Instructions;
|
|
119
|
-
}
|
|
120
|
-
OutputFormatter.success({
|
|
121
|
-
Result: RESULTS.Success,
|
|
122
|
-
Code: "RulesInit",
|
|
123
|
-
Data: data
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
// src/tool.ts
|
|
129
|
-
var metadata2 = {
|
|
130
|
-
name: "rules-tool",
|
|
131
|
-
version: package_default.version,
|
|
132
|
-
description: "Create and manage UiPath Business Rules (DMN) projects.",
|
|
133
|
-
commandPrefix: "rules"
|
|
134
|
-
};
|
|
135
|
-
var registerCommands2 = async (program) => {
|
|
136
|
-
registerInitCommand(program);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
export { metadata2, registerCommands2 };
|
|
140
|
-
|
|
141
|
-
//# debugId=04D170B1D4E9D59064756E2164756E21
|
package/dist/tool-gta9rr4h.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getFileSystem,
|
|
3
|
-
catchError
|
|
4
|
-
} from "./tool-5qygptrc.js";
|
|
5
|
-
import {
|
|
6
|
-
RulesCommandError2,
|
|
7
|
-
isJsonObject2
|
|
8
|
-
} from "./tool-9bz2x04j.js";
|
|
9
|
-
|
|
10
|
-
// src/services/rule-project.ts
|
|
11
|
-
var ENTRY_POINTS_FILE = "entry-points.json";
|
|
12
|
-
var BINDINGS_FILE = "bindings_v2.json";
|
|
13
|
-
async function readRuleProjectAsync(projectPath) {
|
|
14
|
-
const fs = getFileSystem();
|
|
15
|
-
const projectDir = fs.path.resolve(projectPath);
|
|
16
|
-
await readRulesProjectNameAsync(projectDir);
|
|
17
|
-
const names = (await fs.readdir(projectDir)).filter((name) => name.toLowerCase().endsWith(".dmn")).sort((a, b) => a.localeCompare(b, "en"));
|
|
18
|
-
const dmnFiles = await Promise.all(names.map(async (name) => ({
|
|
19
|
-
name,
|
|
20
|
-
contents: await fs.readFile(fs.path.join(projectDir, name), "utf-8") ?? ""
|
|
21
|
-
})));
|
|
22
|
-
if (dmnFiles.length === 0) {
|
|
23
|
-
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.");
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
projectDir,
|
|
27
|
-
dmnFiles,
|
|
28
|
-
publishedEntryPoints: await readPublishedEntryPoints(projectDir)
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
async function buildRuleEntryPointsAsync(dmnFiles, publishedEntryPoints) {
|
|
32
|
-
const { buildBusinessRulePackagingFiles } = await import("./index-vffktc0w.js");
|
|
33
|
-
return buildBusinessRulePackagingFiles(dmnFiles, publishedEntryPoints, true);
|
|
34
|
-
}
|
|
35
|
-
async function readRulesProjectNameAsync(projectDir) {
|
|
36
|
-
const fs = getFileSystem();
|
|
37
|
-
const filePath = fs.path.join(projectDir, "project.uiproj");
|
|
38
|
-
const raw = await fs.readFile(filePath, "utf-8");
|
|
39
|
-
const project = raw === null ? undefined : parseJson(raw);
|
|
40
|
-
if (raw !== null && project === undefined) {
|
|
41
|
-
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.");
|
|
42
|
-
}
|
|
43
|
-
if (!isJsonObject2(project) || project.ProjectType !== "BusinessRules") {
|
|
44
|
-
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'.");
|
|
45
|
-
}
|
|
46
|
-
return typeof project.Name === "string" ? project.Name : "";
|
|
47
|
-
}
|
|
48
|
-
async function readPublishedEntryPoints(projectDir) {
|
|
49
|
-
const fs = getFileSystem();
|
|
50
|
-
const filePath = fs.path.join(projectDir, ENTRY_POINTS_FILE);
|
|
51
|
-
const raw = await fs.readFile(filePath, "utf-8");
|
|
52
|
-
if (raw === null) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const published = parseJson(raw);
|
|
56
|
-
if (!isJsonObject2(published) || !Array.isArray(published.entryPoints)) {
|
|
57
|
-
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.`);
|
|
58
|
-
}
|
|
59
|
-
return published;
|
|
60
|
-
}
|
|
61
|
-
function parseJson(raw) {
|
|
62
|
-
const [, parsed] = catchError(() => JSON.parse(raw));
|
|
63
|
-
return parsed;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { ENTRY_POINTS_FILE, BINDINGS_FILE, readRuleProjectAsync, buildRuleEntryPointsAsync, readRulesProjectNameAsync };
|
|
67
|
-
|
|
68
|
-
//# debugId=DF70717AFFAF5D5E64756E2164756E21
|