@uipath/rules-tool 1.204.0-preview.255 → 1.205.0-preview.256
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 +7 -5
- package/dist/DmnFactory-L7MABUC6-98k17dkr.js +46 -0
- package/dist/{KieDmnMarshaller-6TTUU5B4-47q50gk4.js → KieDmnMarshaller-LGE63WDG-3vemswef.js} +2 -2
- package/dist/THIRD-PARTY-NOTICES.md +26 -9
- package/dist/{business-rules-bnr581tz.js → business-rules-pm96sefm.js} +4 -4
- package/dist/{constants-9pa118cj.js → constants-cnn0jfw6.js} +18 -17
- package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
- package/dist/hitPolicyResult-CGCR73CW-9bmc4nsr.js +36 -0
- package/dist/index-52h8rpew.js +21 -0
- package/dist/index-bhjt1h5c.js +227 -0
- package/dist/{index-2hzp9b97.js → index-cpm94vee.js} +21 -5
- package/dist/index-x9msn1dj.js +85 -0
- package/dist/{index-4c4exdzw.js → index-ybrgtfsg.js} +576 -285
- package/dist/index.js +2 -2
- package/dist/rule-catalog-10fhgevc.js +74 -0
- package/dist/{rules-command-error-20gp2dv9.js → rules-command-error-k6kxwfn7.js} +2 -2
- package/dist/{rules-debug-service-var52vfc.js → rules-debug-service-h0qma8db.js} +19 -13
- package/dist/{rules-init-service-0jgj6m9d.js → rules-init-service-yda3k6ea.js} +7 -7
- package/dist/{rules-refresh-service-jgk2kq9d.js → rules-refresh-service-jn6my893.js} +3 -3
- package/dist/{rules-validate-service-mr2fk58k.js → rules-validate-service-hfw8m3dm.js} +7 -7
- package/dist/{tool-pm3ewdxc.js → tool-1pccj6q3.js} +4 -3
- package/dist/tool-86f1xpxn.js +51 -0
- package/dist/{tool-qsgp0kzq.js → tool-cexyd4ff.js} +17 -7
- package/dist/tool-cfrcyxgm.js +26 -0
- package/dist/{tool-av4mmsef.js → tool-fbmxx07c.js} +2 -2
- package/dist/{tool-2cky8jwp.js → tool-fbxe48wd.js} +1071 -208
- package/dist/tool-fk8rznma.js +827 -0
- package/dist/{tool-mkn83w88.js → tool-gkbr01gc.js} +3 -3
- package/dist/{tool-8h4er38s.js → tool-h7gn1rar.js} +3 -3
- package/dist/{tool-8qy8pkp4.js → tool-t4k013ex.js} +8 -5
- package/dist/tool-tjcg2xje.js +4616 -0
- package/dist/{tool-eymjx05p.js → tool-txp5th7j.js} +760 -3395
- package/dist/{tool-tkcx6png.js → tool-wf2qkrye.js} +25 -5
- package/dist/{tool-wmh645tm.js → tool-yq5jph4h.js} +169 -119
- package/dist/tool-z1ay3csx.js +176 -0
- package/dist/{tool-6a672gmg.js → tool-z6x97pps.js} +103 -63
- package/dist/tool.js +2 -2
- package/package.json +2 -2
- package/dist/DmnFactory-VWZOSZHH-jkpbxz3n.js +0 -42
- package/dist/hitPolicyResult-4WDHTX4A-gk103w84.js +0 -33
- package/dist/index-34pj9f36.js +0 -48
- package/dist/index-fs1nd5ap.js +0 -200
- package/dist/index-t4mx1a5e.js +0 -17
- package/dist/rule-catalog-5gzpe93c.js +0 -46
- package/dist/tool-19b4ect0.js +0 -754
- package/dist/tool-4dfpdepw.js +0 -55
- package/dist/tool-m41px07w.js +0 -49
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
parseLimit,
|
|
11
11
|
parseOffset,
|
|
12
12
|
processContext
|
|
13
|
-
} from "./tool-
|
|
13
|
+
} from "./tool-wf2qkrye.js";
|
|
14
14
|
import {
|
|
15
15
|
__require
|
|
16
16
|
} from "./tool-1de529jm.js";
|
|
@@ -19,7 +19,7 @@ var package_default = {
|
|
|
19
19
|
name: "@uipath/rules-tool",
|
|
20
20
|
author: "UiPath",
|
|
21
21
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
22
|
-
version: "1.
|
|
22
|
+
version: "1.205.0-preview.256",
|
|
23
23
|
description: "Create and manage UiPath Business Rules (DMN) projects.",
|
|
24
24
|
private: false,
|
|
25
25
|
repository: {
|
|
@@ -56,7 +56,7 @@ var package_default = {
|
|
|
56
56
|
"@types/node": "^25.5.2",
|
|
57
57
|
"@uipath/auth": "workspace:*",
|
|
58
58
|
"@uipath/common": "workspace:*",
|
|
59
|
-
"@uipath/dmn-editor-utils": "0.
|
|
59
|
+
"@uipath/dmn-editor-utils": "0.1201.7",
|
|
60
60
|
"@uipath/filesystem": "workspace:*",
|
|
61
61
|
"@uipath/orchestrator-sdk": "workspace:*",
|
|
62
62
|
"@uipath/packager-tool-businessrules": "workspace:*",
|
|
@@ -71,7 +71,7 @@ var package_default = {
|
|
|
71
71
|
var RULES_DEBUG_EXAMPLES = [
|
|
72
72
|
{
|
|
73
73
|
Description: "Upload the rules project to Studio Web and evaluate it with one set of input values, returning the trace id of the run",
|
|
74
|
-
Command: `uip rules debug ./LoanSolution/LoanEligibility --inputs '{"creditScore": 720}'
|
|
74
|
+
Command: `uip rules debug ./LoanSolution/LoanEligibility --inputs '{"creditScore": 720}'`,
|
|
75
75
|
Output: {
|
|
76
76
|
Code: "RulesDebug",
|
|
77
77
|
Data: {
|
|
@@ -79,44 +79,39 @@ var RULES_DEBUG_EXAMPLES = [
|
|
|
79
79
|
projectId: "ee8a16e8-385c-42c1-81ee-1628ab7d7cb7",
|
|
80
80
|
studioWebUrl: "https://cloud.uipath.com/acme/studio_/designer/ee8a16e8-385c-42c1-81ee-1628ab7d7cb7?solutionId=30823424-33e3-405e-f21c-08df1c789a14",
|
|
81
81
|
fileName: "LoanEligibility.dmn",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
result: {
|
|
83
|
+
decisions: [
|
|
84
|
+
{
|
|
85
|
+
decisionName: "Eligibility",
|
|
86
|
+
outputs: { eligible: true }
|
|
87
|
+
}
|
|
88
|
+
]
|
|
87
89
|
},
|
|
88
|
-
results: [
|
|
89
|
-
{
|
|
90
|
-
id: "1",
|
|
91
|
-
decisions: [
|
|
92
|
-
{
|
|
93
|
-
decisionName: "Eligibility",
|
|
94
|
-
outputs: { eligible: true }
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
90
|
traceId: "499d9124f5da47462bd6535055483918"
|
|
100
91
|
}
|
|
101
92
|
}
|
|
102
93
|
}
|
|
103
94
|
];
|
|
104
95
|
var registerDebugCommand = (program) => {
|
|
105
|
-
program.command("debug").description("Upload the rules project's solution to Studio Web and evaluate it once through the rules engine. Returns the decision outputs and errors, and
|
|
106
|
-
const { reportRulesFailure } = await import("./rules-command-error-
|
|
107
|
-
const { debugRuleProjectAsync } = await import("./rules-debug-service-
|
|
96
|
+
program.command("debug").description("Upload the rules project's solution to Studio Web and evaluate it once through the rules engine. Returns the decision outputs and errors, and the trace id that shows which rules fired.").argument("<project-path>", "Path to the business rules project directory (must contain project.uiproj)").option("-i, --inputs <json>", "Input values as a JSON object or @file.json").option("--folder-path <path>", "Folder to evaluate in and record the run's trace under (default: your personal workspace)").option("--folder-key <key>", "Key (GUID) of the folder to evaluate in and record the run's trace under").option("--timeout <seconds>", "Maximum seconds to wait for the rules engine to evaluate (default: 120)", (value) => parseBoundedInt(value, "--timeout", { min: 1, max: 3600 })).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", (value) => Number.parseInt(value, 10), 10).examples(RULES_DEBUG_EXAMPLES).trackedAction(processContext, async (projectPath, options) => {
|
|
97
|
+
const { reportRulesFailure } = await import("./rules-command-error-k6kxwfn7.js");
|
|
98
|
+
const { debugRuleProjectAsync } = await import("./rules-debug-service-h0qma8db.js");
|
|
108
99
|
const [error, result] = await catchError(debugRuleProjectAsync(projectPath, options));
|
|
109
100
|
if (error) {
|
|
110
101
|
await reportRulesFailure("Failed to debug business rules project", error);
|
|
111
102
|
return;
|
|
112
103
|
}
|
|
113
|
-
|
|
104
|
+
const errors = evaluationErrors(result);
|
|
105
|
+
if (errors.length > 0) {
|
|
114
106
|
OutputFormatter.error({
|
|
115
107
|
Result: RESULTS.Failure,
|
|
116
108
|
Code: "RulesDebug",
|
|
117
109
|
ErrorCode: "invalid_argument",
|
|
118
|
-
Message: failedEvaluationMessage(
|
|
119
|
-
Instructions:
|
|
110
|
+
Message: failedEvaluationMessage(errors),
|
|
111
|
+
Instructions: [
|
|
112
|
+
"Check the input values against the rule's inputs; Data.result holds the engine's errors.",
|
|
113
|
+
result.response.result?.decisions?.length ? traceHint(result) : undefined
|
|
114
|
+
].filter(Boolean).join(" "),
|
|
120
115
|
Retry: "RetryWillNotFix",
|
|
121
116
|
Data: formatDebugResult(result)
|
|
122
117
|
});
|
|
@@ -127,7 +122,7 @@ var registerDebugCommand = (program) => {
|
|
|
127
122
|
Result: RESULTS.Success,
|
|
128
123
|
Code: "RulesDebug",
|
|
129
124
|
Data: formatDebugResult(result),
|
|
130
|
-
...successInstructions(result
|
|
125
|
+
...successInstructions(result)
|
|
131
126
|
}, { preserveDataKeys: true });
|
|
132
127
|
});
|
|
133
128
|
};
|
|
@@ -138,27 +133,29 @@ function formatDebugResult(result) {
|
|
|
138
133
|
projectId: result.projectId,
|
|
139
134
|
studioWebUrl: result.studioWebUrl,
|
|
140
135
|
fileName: response.fileName,
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
result: response.result,
|
|
137
|
+
...response.error ? { error: response.error } : {},
|
|
143
138
|
...response.traceId ? { traceId: response.traceId } : {}
|
|
144
139
|
};
|
|
145
140
|
}
|
|
146
|
-
function
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
...
|
|
150
|
-
|
|
141
|
+
function evaluationErrors(result) {
|
|
142
|
+
const outcome = result.response.result;
|
|
143
|
+
return [
|
|
144
|
+
...outcome?.errors ?? [],
|
|
145
|
+
...(outcome?.decisions ?? []).flatMap((decision) => decision.error ? [decision.error] : []),
|
|
146
|
+
...result.response.error ? [result.response.error] : []
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
function failedEvaluationMessage(errors) {
|
|
150
|
+
const firstError = errors.find((error) => error.message);
|
|
151
151
|
return firstError?.message ? `The rules engine failed to evaluate the input: ${firstError.message}` : "The rules engine failed to evaluate the input.";
|
|
152
152
|
}
|
|
153
|
-
function successInstructions(result
|
|
154
|
-
const hint = traceHint(result
|
|
153
|
+
function successInstructions(result) {
|
|
154
|
+
const hint = traceHint(result);
|
|
155
155
|
return hint ? { Instructions: hint } : {};
|
|
156
156
|
}
|
|
157
|
-
function traceHint(result
|
|
158
|
-
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
return result.response.traceId ? `Run 'uip traces spans get ${result.response.traceId}' to see which rules fired.` : "The rules engine recorded no trace for this run.";
|
|
157
|
+
function traceHint(result) {
|
|
158
|
+
return result.response.traceId ? `Run 'uip traces spans get ${result.response.traceId}' to see which rules fired.` : undefined;
|
|
162
159
|
}
|
|
163
160
|
|
|
164
161
|
// src/commands/folder-options.ts
|
|
@@ -194,15 +191,15 @@ var RULES_DESCRIBE_EXAMPLES = [
|
|
|
194
191
|
var registerDescribeCommand = (program) => {
|
|
195
192
|
const command = program.command("describe").description("(Preview) Get the entry points of a deployed business rule's active version, with their input and output argument schemas. Use them to map arguments when binding the rule. Same row shape as 'uip or packages entry-points'.").argument("<rule-name>", "Business rule name");
|
|
196
193
|
addUnsupportedTenantOption(addFolderOptions(command)).examples(RULES_DESCRIBE_EXAMPLES).trackedAction(processContext, async (name, options) => {
|
|
197
|
-
const rules = await import("./business-rules-
|
|
198
|
-
const { reportRulesFailure, RulesCommandError } = await import("./rules-command-error-
|
|
194
|
+
const rules = await import("./business-rules-pm96sefm.js");
|
|
195
|
+
const { reportRulesFailure, RulesCommandError } = await import("./rules-command-error-k6kxwfn7.js");
|
|
199
196
|
if (options.tenant !== undefined) {
|
|
200
197
|
await reportRulesFailure("Failed to describe business rule", new RulesCommandError("'uip rules describe' does not support --tenant: it reads the rule from the resource catalog of the tenant you are logged in to.", "invalid_argument", "Run 'uip login tenant set <tenant-name>' to switch tenants, then run the command again."));
|
|
201
198
|
return;
|
|
202
199
|
}
|
|
203
200
|
const [error, entryPoints] = await catchError((async () => {
|
|
204
201
|
const folder = await rules.resolveRequiredFolder(options);
|
|
205
|
-
const { describeRuleAsync } = await import("./rule-catalog-
|
|
202
|
+
const { describeRuleAsync } = await import("./rule-catalog-10fhgevc.js");
|
|
206
203
|
return describeRuleAsync(name, folder);
|
|
207
204
|
})());
|
|
208
205
|
if (error) {
|
|
@@ -241,8 +238,8 @@ var RULES_GET_EXAMPLES = [
|
|
|
241
238
|
var registerGetCommand = (program) => {
|
|
242
239
|
const command = program.command("get").description("(Preview) Get a deployed business rule by name. Use 'rules versions' for its version history and 'rules describe' for its argument contract.").argument("<rule-name>", "Business rule name");
|
|
243
240
|
addTenantOption(addFolderOptions(command)).examples(RULES_GET_EXAMPLES).trackedAction(processContext, async (name, options) => {
|
|
244
|
-
const rules = await import("./business-rules-
|
|
245
|
-
const { reportRulesFailure } = await import("./rules-command-error-
|
|
241
|
+
const rules = await import("./business-rules-pm96sefm.js");
|
|
242
|
+
const { reportRulesFailure } = await import("./rules-command-error-k6kxwfn7.js");
|
|
246
243
|
const [error, found] = await catchError((async () => {
|
|
247
244
|
const folder = await rules.resolveRequiredFolder(options);
|
|
248
245
|
const api = await rules.createRulesApi(options.tenant, folder);
|
|
@@ -295,7 +292,7 @@ Packing or uploading the solution will sync solution resources automatically.`
|
|
|
295
292
|
];
|
|
296
293
|
var registerInitCommand = (program) => {
|
|
297
294
|
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) => {
|
|
298
|
-
const { rulesInitAsync } = await import("./rules-init-service-
|
|
295
|
+
const { rulesInitAsync } = await import("./rules-init-service-yda3k6ea.js");
|
|
299
296
|
const [error, result] = await catchError(rulesInitAsync(name, {
|
|
300
297
|
force: options.force,
|
|
301
298
|
skipRegistration: options.skipSolutionRegistration === true
|
|
@@ -350,13 +347,29 @@ var RULES_LIST_EXAMPLES = [
|
|
|
350
347
|
}
|
|
351
348
|
]
|
|
352
349
|
}
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
Description: "List the business rules in every folder you can see, one row per folder a rule is shared to",
|
|
353
|
+
Command: "uip rules list --all-folders",
|
|
354
|
+
Output: {
|
|
355
|
+
Code: "RulesList",
|
|
356
|
+
Data: [
|
|
357
|
+
{
|
|
358
|
+
Key: "3f1c2a9e-8b4d-4e2a-9c1f-6d7e8f9a0b1c",
|
|
359
|
+
Name: "LoanEligibility",
|
|
360
|
+
FolderPath: "Shared",
|
|
361
|
+
FolderKey: "9b2d4f6a-1c3e-4a5b-8d7f-0e1a2b3c4d5e",
|
|
362
|
+
Description: "Decides loan eligibility"
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
}
|
|
353
366
|
}
|
|
354
367
|
];
|
|
355
368
|
var registerListCommand = (program) => {
|
|
356
|
-
const command = program.command("list").description("(Preview) List business rules deployed to Orchestrator in a folder. Returns key, name, folder, description and current version.");
|
|
357
|
-
addTenantOption(addFolderOptions(command)).option("-l, --limit <number>", "Number of items to return", parseLimit, DEFAULT_PAGE_SIZE).option("--offset <number>", "Number of items to skip", parseOffset, 0).examples(RULES_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
358
|
-
const { reportRulesFailure } = await import("./rules-command-error-
|
|
359
|
-
const [error,
|
|
369
|
+
const command = program.command("list").description("(Preview) List business rules deployed to Orchestrator in a folder, or across all accessible folders with --all-folders. Returns key, name, folder, description and, for one folder, current version. --all-folders returns one row per folder a rule is shared to.");
|
|
370
|
+
addTenantOption(addFolderOptions(command)).option("--all-folders", "List business rules across all accessible folders").option("-l, --limit <number>", "Number of items to return", parseLimit, DEFAULT_PAGE_SIZE).option("--offset <number>", "Number of items to skip", parseOffset, 0).examples(RULES_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
371
|
+
const { reportRulesFailure } = await import("./rules-command-error-k6kxwfn7.js");
|
|
372
|
+
const [error, result] = await catchError(listRules(options));
|
|
360
373
|
if (error) {
|
|
361
374
|
await reportRulesFailure("Failed to list business rules", error);
|
|
362
375
|
return;
|
|
@@ -365,23 +378,50 @@ var registerListCommand = (program) => {
|
|
|
365
378
|
Result: RESULTS.Success,
|
|
366
379
|
Code: "RulesList",
|
|
367
380
|
Pagination: new Pagination({
|
|
368
|
-
returned: rows.length,
|
|
381
|
+
returned: result.rows.length,
|
|
369
382
|
limit: options.limit,
|
|
370
|
-
offset: options.offset
|
|
383
|
+
offset: options.offset,
|
|
384
|
+
hasMore: result.hasMore
|
|
371
385
|
}),
|
|
372
|
-
Data: rows
|
|
386
|
+
Data: result.rows
|
|
373
387
|
});
|
|
374
388
|
});
|
|
375
389
|
};
|
|
376
390
|
async function listRules(options) {
|
|
377
|
-
const rules = await import("./business-rules-
|
|
391
|
+
const rules = await import("./business-rules-pm96sefm.js");
|
|
392
|
+
const { RulesCommandError } = await import("./rules-command-error-k6kxwfn7.js");
|
|
393
|
+
const hasFolderSelector = options.folderPath !== undefined || options.folderKey !== undefined;
|
|
394
|
+
if (options.allFolders && hasFolderSelector) {
|
|
395
|
+
throw new RulesCommandError("Option --all-folders cannot be used with --folder-path or --folder-key.", "invalid_argument", "Use --all-folders by itself, or provide a single folder selector with --folder-path or --folder-key.");
|
|
396
|
+
}
|
|
397
|
+
if (options.allFolders) {
|
|
398
|
+
return listRulesAcrossFolders(options);
|
|
399
|
+
}
|
|
400
|
+
if (!hasFolderSelector) {
|
|
401
|
+
throw new RulesCommandError("Missing required option --folder-path, --folder-key or --all-folders.", "invalid_argument", "Provide --folder-path <path> or --folder-key <key> to list one folder, or --all-folders to list every folder. Run 'uip or folders list' to find folder paths.");
|
|
402
|
+
}
|
|
378
403
|
const folder = await rules.resolveRequiredFolder(options);
|
|
379
404
|
const api = await rules.createRulesApi(options.tenant, folder);
|
|
380
405
|
const page = await api.businessRulesGet({
|
|
381
406
|
$top: options.limit,
|
|
382
407
|
$skip: options.offset
|
|
383
408
|
});
|
|
384
|
-
return
|
|
409
|
+
return {
|
|
410
|
+
rows: (page.value ?? []).map((rule) => rules.formatRule(rule, folder)),
|
|
411
|
+
hasMore: undefined
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
async function listRulesAcrossFolders(options) {
|
|
415
|
+
const { RulesCommandError } = await import("./rules-command-error-k6kxwfn7.js");
|
|
416
|
+
if (options.tenant !== undefined) {
|
|
417
|
+
throw new RulesCommandError("'uip rules list --all-folders' does not support --tenant: it lists rules from the resource catalog of the tenant you are logged in to.", "invalid_argument", "Drop --all-folders and pass --folder-path <path> or --folder-key <key> to list one folder in that tenant, or run 'uip login tenant set <tenant-name>' to switch tenants.");
|
|
418
|
+
}
|
|
419
|
+
const { listRulesAcrossFoldersAsync } = await import("./rule-catalog-10fhgevc.js");
|
|
420
|
+
const result = await listRulesAcrossFoldersAsync(options.limit, options.offset);
|
|
421
|
+
if (!result) {
|
|
422
|
+
throw new RulesCommandError("Listing business rules across folders needs the Node CLI: the browser build cannot read the resource catalog.", "configuration_error", "Drop --all-folders and pass --folder-path <path> or --folder-key <key> to list one folder.");
|
|
423
|
+
}
|
|
424
|
+
return result;
|
|
385
425
|
}
|
|
386
426
|
|
|
387
427
|
// src/commands/refresh.ts
|
|
@@ -403,8 +443,8 @@ var RULES_REFRESH_EXAMPLES = [
|
|
|
403
443
|
];
|
|
404
444
|
var registerRefreshCommand = (program) => {
|
|
405
445
|
program.command("refresh").description("Regenerate entry-points.json and bindings_v2.json from the rules project's .dmn, keeping each published entry point's uniqueId. Run it after editing a .dmn outside Studio Web, before 'uip solution pack'.").argument("<project-path>", "Path to the business rules project directory (must contain project.uiproj)").examples(RULES_REFRESH_EXAMPLES).trackedAction(processContext, async (projectPath) => {
|
|
406
|
-
const { reportRulesFailure } = await import("./rules-command-error-
|
|
407
|
-
const { refreshRuleProjectAsync } = await import("./rules-refresh-service-
|
|
446
|
+
const { reportRulesFailure } = await import("./rules-command-error-k6kxwfn7.js");
|
|
447
|
+
const { refreshRuleProjectAsync } = await import("./rules-refresh-service-jn6my893.js");
|
|
408
448
|
const [error, result] = await catchError(refreshRuleProjectAsync(projectPath));
|
|
409
449
|
if (error) {
|
|
410
450
|
await reportRulesFailure("Failed to refresh business rules package files", error);
|
|
@@ -442,8 +482,8 @@ var RULES_VALIDATE_EXAMPLES = [
|
|
|
442
482
|
];
|
|
443
483
|
var registerValidateCommand = (program) => {
|
|
444
484
|
program.command("validate").description("Check a rules project for what Studio Web blocks publish and debug on, the designer's diagnostics for each .dmn, and for an entry-points.json out of step with the .dmn. Errors exit 1; warnings are reported only.").argument("<project-path>", "Path to the business rules project directory (must contain project.uiproj)").examples(RULES_VALIDATE_EXAMPLES).trackedAction(processContext, async (projectPath) => {
|
|
445
|
-
const { reportRulesFailure } = await import("./rules-command-error-
|
|
446
|
-
const { validateRuleProjectAsync } = await import("./rules-validate-service-
|
|
485
|
+
const { reportRulesFailure } = await import("./rules-command-error-k6kxwfn7.js");
|
|
486
|
+
const { validateRuleProjectAsync } = await import("./rules-validate-service-hfw8m3dm.js");
|
|
447
487
|
const [error, result] = await catchError(validateRuleProjectAsync(projectPath));
|
|
448
488
|
if (error) {
|
|
449
489
|
await reportRulesFailure("Failed to validate business rules project", error);
|
|
@@ -518,8 +558,8 @@ var RULES_VERSIONS_EXAMPLES = [
|
|
|
518
558
|
var registerVersionsCommand = (program) => {
|
|
519
559
|
const command = program.command("versions").description("(Preview) List the versions of a deployed business rule. The active version is the one consumers evaluate.").argument("<rule-name>", "Business rule name");
|
|
520
560
|
addTenantOption(addFolderOptions(command)).option("-l, --limit <number>", "Number of versions to return", parseLimit, DEFAULT_PAGE_SIZE).option("--offset <number>", "Number of versions to skip", parseOffset, 0).examples(RULES_VERSIONS_EXAMPLES).trackedAction(processContext, async (name, options) => {
|
|
521
|
-
const rules = await import("./business-rules-
|
|
522
|
-
const { reportRulesFailure } = await import("./rules-command-error-
|
|
561
|
+
const rules = await import("./business-rules-pm96sefm.js");
|
|
562
|
+
const { reportRulesFailure } = await import("./rules-command-error-k6kxwfn7.js");
|
|
523
563
|
const [error, page] = await catchError((async () => {
|
|
524
564
|
const folder = await rules.resolveRequiredFolder(options);
|
|
525
565
|
const api = await rules.createRulesApi(options.tenant, folder);
|
|
@@ -571,4 +611,4 @@ var registerCommands = async (program) => {
|
|
|
571
611
|
|
|
572
612
|
export { metadata, registerCommands };
|
|
573
613
|
|
|
574
|
-
//# debugId=
|
|
614
|
+
//# debugId=9188D8EA260FDC1B64756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/rules-tool",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.205.0-preview.256",
|
|
6
6
|
"description": "Create and manage UiPath Business Rules (DMN) projects.",
|
|
7
7
|
"private": false,
|
|
8
8
|
"repository": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "63740c6cbb7ff282fa9118cc16a148eb030b245f"
|
|
31
31
|
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
$,
|
|
3
|
-
A,
|
|
4
|
-
B,
|
|
5
|
-
C,
|
|
6
|
-
O,
|
|
7
|
-
P,
|
|
8
|
-
S,
|
|
9
|
-
U,
|
|
10
|
-
_,
|
|
11
|
-
ae,
|
|
12
|
-
ie,
|
|
13
|
-
oe,
|
|
14
|
-
q,
|
|
15
|
-
re,
|
|
16
|
-
se,
|
|
17
|
-
w
|
|
18
|
-
} from "./tool-wmh645tm.js";
|
|
19
|
-
import"./tool-jd313s2x.js";
|
|
20
|
-
import"./tool-qgqscsjc.js";
|
|
21
|
-
import"./tool-7haj67tr.js";
|
|
22
|
-
import"./tool-1de529jm.js";
|
|
23
|
-
export {
|
|
24
|
-
C as DEFAULT_ANNOTATION_CLAUSE_NAME,
|
|
25
|
-
_ as DEFAULT_DECISION_NAME,
|
|
26
|
-
S as EMPTY_OUTPUT_TEXT,
|
|
27
|
-
oe as FEEL_NAME_CHAR,
|
|
28
|
-
A as MAESTRO_EXPORTER,
|
|
29
|
-
O as createBusinessRuleIdentity,
|
|
30
|
-
P as createNewBusinessRuleModel,
|
|
31
|
-
ie as createSeededBusinessRuleModel,
|
|
32
|
-
q as deriveInputData,
|
|
33
|
-
ae as expressionRoot,
|
|
34
|
-
$ as inputExpressionRoots,
|
|
35
|
-
re as isEmptyOutputText,
|
|
36
|
-
w as isFeelIdentifier,
|
|
37
|
-
B as outputArgumentName,
|
|
38
|
-
U as outputNameFromLabel,
|
|
39
|
-
se as resultIsKeyedByClause
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
//# debugId=F96FEBDCE4B1D64164756E2164756E21
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
A,
|
|
3
|
-
I,
|
|
4
|
-
M,
|
|
5
|
-
O,
|
|
6
|
-
P,
|
|
7
|
-
R,
|
|
8
|
-
b,
|
|
9
|
-
h,
|
|
10
|
-
m,
|
|
11
|
-
p,
|
|
12
|
-
x,
|
|
13
|
-
y
|
|
14
|
-
} from "./tool-4dfpdepw.js";
|
|
15
|
-
import"./tool-jd313s2x.js";
|
|
16
|
-
import"./tool-7haj67tr.js";
|
|
17
|
-
import"./tool-1de529jm.js";
|
|
18
|
-
export {
|
|
19
|
-
y as LIST_HIT_POLICIES,
|
|
20
|
-
R as RANKED_HIT_POLICIES,
|
|
21
|
-
A as aggregateTypeRef,
|
|
22
|
-
P as allowedValuesOf,
|
|
23
|
-
m as baseTypeRefOf,
|
|
24
|
-
O as isBuiltInTypeRef,
|
|
25
|
-
x as isCollectAggregation,
|
|
26
|
-
I as isKnownSingleValueTypeRef,
|
|
27
|
-
b as isListTypeRef,
|
|
28
|
-
M as isOutputAggregatable,
|
|
29
|
-
p as outputTypeRefOf,
|
|
30
|
-
h as resultShapeOf
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
//# debugId=AC82D6EF6A51450564756E2164756E21
|
package/dist/index-34pj9f36.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import"./tool-m41px07w.js";
|
|
2
|
-
import {
|
|
3
|
-
Wt,
|
|
4
|
-
an,
|
|
5
|
-
tt
|
|
6
|
-
} from "./tool-19b4ect0.js";
|
|
7
|
-
import {
|
|
8
|
-
Rs,
|
|
9
|
-
bs,
|
|
10
|
-
hs
|
|
11
|
-
} from "./tool-8h4er38s.js";
|
|
12
|
-
import {
|
|
13
|
-
B,
|
|
14
|
-
k
|
|
15
|
-
} from "./tool-wmh645tm.js";
|
|
16
|
-
import"./tool-4dfpdepw.js";
|
|
17
|
-
import"./tool-jd313s2x.js";
|
|
18
|
-
import"./tool-qgqscsjc.js";
|
|
19
|
-
import"./tool-7haj67tr.js";
|
|
20
|
-
import"./tool-1de529jm.js";
|
|
21
|
-
|
|
22
|
-
// ../../node_modules/@uipath/dmn-editor-utils/dist/parser/index.js
|
|
23
|
-
var f = (n, t) => {
|
|
24
|
-
let s = n.decision.decisionTable;
|
|
25
|
-
return s.inputs.some((e) => k(e.expressionText, t, "expression") || !!e.allowedValues && k(e.allowedValues.text, t, "unaryTests")) || s.outputs.some((e) => !!e.allowedValues && k(e.allowedValues.text, t, "unaryTests")) || s.rules.some((e) => e.inputEntries.some((i) => k(i.text, t, "unaryTests")) || e.outputEntries.some((i) => k(i.text, t, "expression")));
|
|
26
|
-
};
|
|
27
|
-
var T = "-";
|
|
28
|
-
var x = (n, t) => {
|
|
29
|
-
if (t.kind === "input") {
|
|
30
|
-
let e = n.inputs[t.index];
|
|
31
|
-
return e ? !!e.expressionText.trim() || !!e.allowedValues || n.rules.some((r) => ![undefined, "", T].includes(r.inputEntries[t.index]?.text.trim())) : false;
|
|
32
|
-
}
|
|
33
|
-
let s = n.outputs[t.index];
|
|
34
|
-
return s ? !!s.allowedValues || n.rules.some((e) => !!e.outputEntries[t.index]?.text.trim()) : false;
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
hs as buildDmnDocument,
|
|
38
|
-
Wt as classifyDmnSupport,
|
|
39
|
-
bs as importDmnDocument,
|
|
40
|
-
f as isArgumentReferenced,
|
|
41
|
-
x as isColumnPopulated,
|
|
42
|
-
Rs as moveExtensionTextToAttributes,
|
|
43
|
-
an as normalizeImportedIdentifiers,
|
|
44
|
-
B as outputArgumentName,
|
|
45
|
-
tt as parseDmnModel
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
//# debugId=6678325790A6AD6364756E2164756E21
|