@uipath/rules-tool 1.206.0-preview.310 → 1.206.0-preview.311
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/{first-party-service-ej32b6j2.js → first-party-service-xybnzzaz.js} +1 -1
- package/dist/{index-88sps467.js → index-7105pjnn.js} +4 -2
- package/dist/{index-s9wmt93c.js → index-c9z3zjpg.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{rule-catalog-780050xk.js → rule-catalog-drpaxvwg.js} +13 -4
- package/dist/{rules-debug-service-pfbxg459.js → rules-debug-service-jnrtxv33.js} +1 -1
- package/dist/{rules-init-service-1cea7bc6.js → rules-init-service-9qtkxx04.js} +2 -2
- package/dist/{solution-definition-helper-trxp0zbj.js → solution-definition-helper-tyqk2mb3.js} +1 -1
- package/dist/{tool-bdknjenw.js → tool-9w4tfekh.js} +6 -6
- package/dist/{tool-s5qjpxfk.js → tool-a28wbwnz.js} +2 -2
- package/dist/{tool-yfaf9b8c.js → tool-bvzdfw28.js} +27 -6
- package/dist/tool.js +1 -1
- package/package.json +2 -2
|
@@ -5,12 +5,14 @@ import {
|
|
|
5
5
|
findCatalogEntityAsync2,
|
|
6
6
|
toResourceReference2,
|
|
7
7
|
exportResourceDefinitionAsync2,
|
|
8
|
+
ResourceExportError2,
|
|
8
9
|
readSpecEntryPoints2
|
|
9
|
-
} from "./tool-
|
|
10
|
+
} from "./tool-bvzdfw28.js";
|
|
10
11
|
import"./tool-0tbve332.js";
|
|
11
12
|
import"./tool-3755q59j.js";
|
|
12
13
|
import"./tool-syavphgt.js";
|
|
13
14
|
export {
|
|
15
|
+
ResourceExportError2 as ResourceExportError,
|
|
14
16
|
addProjectArtifactsToSolutionAsync2 as addProjectArtifactsToSolutionAsync,
|
|
15
17
|
createResourceBuilderServices2 as createResourceBuilderServices,
|
|
16
18
|
exportResourceDefinitionAsync2 as exportResourceDefinitionAsync,
|
|
@@ -20,4 +22,4 @@ export {
|
|
|
20
22
|
toResourceReference2 as toResourceReference
|
|
21
23
|
};
|
|
22
24
|
|
|
23
|
-
//# debugId=
|
|
25
|
+
//# debugId=C4E74E7249593BDD64756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
catchError
|
|
3
|
+
} from "./tool-syavphgt.js";
|
|
1
4
|
import"./tool-3755q59j.js";
|
|
2
|
-
import"./tool-syavphgt.js";
|
|
3
5
|
import {
|
|
4
6
|
getSolutionAuthContext,
|
|
5
7
|
createResourceBuilderServices2,
|
|
@@ -7,8 +9,9 @@ import {
|
|
|
7
9
|
findCatalogEntityAsync2,
|
|
8
10
|
toResourceReference2,
|
|
9
11
|
exportResourceDefinitionAsync2,
|
|
12
|
+
ResourceExportError2,
|
|
10
13
|
readSpecEntryPoints2
|
|
11
|
-
} from "./tool-
|
|
14
|
+
} from "./tool-bvzdfw28.js";
|
|
12
15
|
import {
|
|
13
16
|
RulesCommandError2
|
|
14
17
|
} from "./tool-jzdt6z77.js";
|
|
@@ -28,7 +31,13 @@ async function describeRuleAsync(name, folder) {
|
|
|
28
31
|
await findRuleByName2(await createRulesApi2(undefined, folder), name, folder);
|
|
29
32
|
throw new RulesCommandError2(`Business rule '${name}' is not in the resource catalog for folder '${folder.path}' yet.`, "not_found", "The rule exists in Orchestrator but the resource catalog does not list it yet, which is normal right after a deploy. Run the command again shortly.", "RetryAfter60Seconds");
|
|
30
33
|
}
|
|
31
|
-
const definition = await exportResourceDefinitionAsync2(importer, toResourceReference2(entity));
|
|
34
|
+
const [exportError, definition] = await catchError(exportResourceDefinitionAsync2(importer, toResourceReference2(entity)));
|
|
35
|
+
if (exportError) {
|
|
36
|
+
if (exportError instanceof ResourceExportError2 && exportError.status === 404) {
|
|
37
|
+
throw new RulesCommandError2(`Business rule '${name}' is in the resource catalog for folder '${folder.path}', but Orchestrator could not export it (404).`, "not_found", "This is normal for a few minutes right after a deploy. Run the command again shortly. If it keeps failing, the rule may have been deleted and the catalog not caught up yet.", "RetryAfter60Seconds", { httpStatus: 404 });
|
|
38
|
+
}
|
|
39
|
+
throw exportError;
|
|
40
|
+
}
|
|
32
41
|
return readEntryPoints(definition?.spec, name);
|
|
33
42
|
}
|
|
34
43
|
async function listRulesAcrossFoldersAsync(limit, offset) {
|
|
@@ -68,4 +77,4 @@ export {
|
|
|
68
77
|
listRulesAcrossFoldersAsync
|
|
69
78
|
};
|
|
70
79
|
|
|
71
|
-
//# debugId=
|
|
80
|
+
//# debugId=5FEA07F48ACDA86D64756E2164756E21
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getFileSystem,
|
|
3
3
|
catchError
|
|
4
4
|
} from "./tool-syavphgt.js";
|
|
5
|
-
import"./tool-
|
|
5
|
+
import"./tool-a28wbwnz.js";
|
|
6
6
|
import"./tool-jzdt6z77.js";
|
|
7
7
|
import {
|
|
8
8
|
prepareProjectLocation,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
|
|
17
17
|
// src/services/project-artifacts.ts
|
|
18
18
|
async function ensureProjectArtifacts(args) {
|
|
19
|
-
const { addProjectArtifactsToSolutionAsync } = await import("./index-
|
|
19
|
+
const { addProjectArtifactsToSolutionAsync } = await import("./index-7105pjnn.js");
|
|
20
20
|
return addProjectArtifactsToSolutionAsync(args);
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -16,7 +16,7 @@ var package_default = {
|
|
|
16
16
|
name: "@uipath/rules-tool",
|
|
17
17
|
author: "UiPath",
|
|
18
18
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
19
|
-
version: "1.206.0-preview.
|
|
19
|
+
version: "1.206.0-preview.311",
|
|
20
20
|
description: "Create and manage UiPath Business Rules (DMN) projects.",
|
|
21
21
|
private: false,
|
|
22
22
|
repository: {
|
|
@@ -93,7 +93,7 @@ var RULES_DEBUG_EXAMPLES = [
|
|
|
93
93
|
var registerDebugCommand = (program) => {
|
|
94
94
|
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) => {
|
|
95
95
|
const { reportRulesFailure } = await import("./rules-command-error-2x1vm0wt.js");
|
|
96
|
-
const { debugRuleProjectAsync } = await import("./rules-debug-service-
|
|
96
|
+
const { debugRuleProjectAsync } = await import("./rules-debug-service-jnrtxv33.js");
|
|
97
97
|
const [error, result] = await catchError(debugRuleProjectAsync(projectPath, options));
|
|
98
98
|
if (error) {
|
|
99
99
|
await reportRulesFailure("Failed to debug business rules project", error);
|
|
@@ -197,7 +197,7 @@ var registerDescribeCommand = (program) => {
|
|
|
197
197
|
}
|
|
198
198
|
const [error, entryPoints] = await catchError((async () => {
|
|
199
199
|
const folder = await rules.resolveRequiredFolder(options);
|
|
200
|
-
const { describeRuleAsync } = await import("./rule-catalog-
|
|
200
|
+
const { describeRuleAsync } = await import("./rule-catalog-drpaxvwg.js");
|
|
201
201
|
return describeRuleAsync(name, folder);
|
|
202
202
|
})());
|
|
203
203
|
if (error) {
|
|
@@ -290,7 +290,7 @@ Packing or uploading the solution will sync solution resources automatically.`
|
|
|
290
290
|
];
|
|
291
291
|
var registerInitCommand = (program) => {
|
|
292
292
|
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) => {
|
|
293
|
-
const { rulesInitAsync } = await import("./rules-init-service-
|
|
293
|
+
const { rulesInitAsync } = await import("./rules-init-service-9qtkxx04.js");
|
|
294
294
|
const [error, result] = await catchError(rulesInitAsync(name, {
|
|
295
295
|
force: options.force,
|
|
296
296
|
skipRegistration: options.skipSolutionRegistration === true
|
|
@@ -414,7 +414,7 @@ async function listRulesAcrossFolders(options) {
|
|
|
414
414
|
if (options.tenant !== undefined) {
|
|
415
415
|
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.");
|
|
416
416
|
}
|
|
417
|
-
const { listRulesAcrossFoldersAsync } = await import("./rule-catalog-
|
|
417
|
+
const { listRulesAcrossFoldersAsync } = await import("./rule-catalog-drpaxvwg.js");
|
|
418
418
|
const result = await listRulesAcrossFoldersAsync(options.limit, options.offset);
|
|
419
419
|
if (!result) {
|
|
420
420
|
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.");
|
|
@@ -609,4 +609,4 @@ var registerCommands2 = async (program) => {
|
|
|
609
609
|
|
|
610
610
|
export { metadata2, registerCommands2 };
|
|
611
611
|
|
|
612
|
-
//# debugId=
|
|
612
|
+
//# debugId=EF4BC5DDD817596864756E2164756E21
|
|
@@ -1591,7 +1591,7 @@ var package_default = {
|
|
|
1591
1591
|
name: "@uipath/solution-sdk",
|
|
1592
1592
|
author: "UiPath",
|
|
1593
1593
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
1594
|
-
version: "1.206.0-preview.
|
|
1594
|
+
version: "1.206.0-preview.311",
|
|
1595
1595
|
repository: {
|
|
1596
1596
|
type: "git",
|
|
1597
1597
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -1850,4 +1850,4 @@ var SUCCEEDED = "creationsucceeded";
|
|
|
1850
1850
|
var TERMINAL = new Set([SUCCEEDED, "creationfailed", "validationfailed"]);
|
|
1851
1851
|
export { buildSolutionPackageFromDir, uploadOrOverwriteSolution };
|
|
1852
1852
|
|
|
1853
|
-
//# debugId=
|
|
1853
|
+
//# debugId=E91A0F7D5FF3E8CC64756E2164756E21
|
|
@@ -6198,7 +6198,7 @@ class MultiFileSolutionDefinitionProvider {
|
|
|
6198
6198
|
const metadataReader = this.metadataReaderAccessor?.();
|
|
6199
6199
|
if (!metadataReader)
|
|
6200
6200
|
return void this.logger.warn("Solution %s has resources sharing a key, and no metadata reader is available to resolve them; they are left in place and this read will not agree with one that can resolve them", solution.key);
|
|
6201
|
-
const { SolutionDefinitionHelper } = await import("./solution-definition-helper-
|
|
6201
|
+
const { SolutionDefinitionHelper } = await import("./solution-definition-helper-tyqk2mb3.js");
|
|
6202
6202
|
await new SolutionDefinitionHelper(metadataReader, this.logger).replaceDuplicateKeysAsync(solution, cancellationToken);
|
|
6203
6203
|
}
|
|
6204
6204
|
getSolutionKey(context) {
|
|
@@ -6522,7 +6522,7 @@ var service_tokens_ServiceLifetime = /* @__PURE__ */ function(ServiceLifetime) {
|
|
|
6522
6522
|
async function createDefaultEmbeddedFileReaderAsync() {
|
|
6523
6523
|
const [{ EmbeddedFileReader }, { JsonSerializerFactory }] = await Promise.all([
|
|
6524
6524
|
import("./embedded-file-reader-pxpwcq3n.js"),
|
|
6525
|
-
import("./index-
|
|
6525
|
+
import("./index-c9z3zjpg.js")
|
|
6526
6526
|
]);
|
|
6527
6527
|
return new EmbeddedFileReader(new JsonSerializerFactory);
|
|
6528
6528
|
}
|
|
@@ -14301,7 +14301,7 @@ class FirstPartyServiceClientProxy {
|
|
|
14301
14301
|
const tenantKey = await this.accessProvider.getTenantKeyAsync(cancellationToken);
|
|
14302
14302
|
if (!accountKey)
|
|
14303
14303
|
throw new BadRequestException(ErrorCodes.AuthenticationFailed, "Unable to obtain account key");
|
|
14304
|
-
const client = new (await import("./first-party-service-
|
|
14304
|
+
const client = new (await import("./first-party-service-xybnzzaz.js")).FirstPartyServiceApi({
|
|
14305
14305
|
baseUrl: fullBaseUrl,
|
|
14306
14306
|
customFetch: fetchWithTimeout(LONG_RUNNING_TIMEOUT_MS),
|
|
14307
14307
|
baseApiParams: {
|
|
@@ -19955,9 +19955,30 @@ function toCatalogReference(reference) {
|
|
|
19955
19955
|
};
|
|
19956
19956
|
}
|
|
19957
19957
|
async function exportResourceDefinitionAsync2(importer, reference) {
|
|
19958
|
-
const payload = await importer.exportResourceAsync(reference);
|
|
19958
|
+
const [error, payload] = await catchError(importer.exportResourceAsync(reference));
|
|
19959
|
+
if (error) {
|
|
19960
|
+
throw withExportStatus(error);
|
|
19961
|
+
}
|
|
19959
19962
|
return payload.resourceDefinitions.find((d) => d.key === reference.key);
|
|
19960
19963
|
}
|
|
19964
|
+
|
|
19965
|
+
class ResourceExportError2 extends Error {
|
|
19966
|
+
status;
|
|
19967
|
+
constructor(message, status, cause) {
|
|
19968
|
+
super(message, { cause });
|
|
19969
|
+
this.status = status;
|
|
19970
|
+
this.name = "ResourceExportError";
|
|
19971
|
+
}
|
|
19972
|
+
}
|
|
19973
|
+
function withExportStatus(error) {
|
|
19974
|
+
if (!(error instanceof Error) || !("exceptionData" in error)) {
|
|
19975
|
+
return error;
|
|
19976
|
+
}
|
|
19977
|
+
const data = error.exceptionData;
|
|
19978
|
+
const text = typeof data === "object" && data !== null ? data.errorMessage : undefined;
|
|
19979
|
+
const match = typeof text === "string" ? /^HTTP (\d{3})\b/.exec(text) : null;
|
|
19980
|
+
return match ? new ResourceExportError2(error.message, Number(match[1]), error) : error;
|
|
19981
|
+
}
|
|
19961
19982
|
function readSpecProperty(spec, name) {
|
|
19962
19983
|
if (!spec) {
|
|
19963
19984
|
return;
|
|
@@ -20017,6 +20038,6 @@ var TYPE_IS_IDENTITY_REPLACE_OPTIONS = new Set([
|
|
|
20017
20038
|
"SameNameAndType"
|
|
20018
20039
|
]);
|
|
20019
20040
|
var BINDINGS_JSON_FALLBACK_TYPES = new Set(["agent", "function"]);
|
|
20020
|
-
export { getSolutionAuthContext, JsonSerializerNames2, JsonSerializer2, CAMEL_CASE_ENUM_PROPERTIES2, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES2, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES2, PASCAL_CASE_ENUM_PROPERTIES2, JsonSerializerFactory2, JsonSerializerProxy2, StreamSerializer2, SolutionDefinitionHelper2, FirstPartyServiceApi2, createResourceBuilderServices2, addProjectArtifactsToSolutionAsync2, getRemoteResourceClients2, findCatalogEntityAsync2, toResourceReference2, exportResourceDefinitionAsync2, readSpecEntryPoints2 };
|
|
20041
|
+
export { getSolutionAuthContext, JsonSerializerNames2, JsonSerializer2, CAMEL_CASE_ENUM_PROPERTIES2, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES2, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES2, PASCAL_CASE_ENUM_PROPERTIES2, JsonSerializerFactory2, JsonSerializerProxy2, StreamSerializer2, SolutionDefinitionHelper2, FirstPartyServiceApi2, createResourceBuilderServices2, addProjectArtifactsToSolutionAsync2, getRemoteResourceClients2, findCatalogEntityAsync2, toResourceReference2, exportResourceDefinitionAsync2, ResourceExportError2, readSpecEntryPoints2 };
|
|
20021
20042
|
|
|
20022
|
-
//# debugId=
|
|
20043
|
+
//# debugId=267C65346CE7DB1464756E2164756E21
|
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.206.0-preview.
|
|
5
|
+
"version": "1.206.0-preview.311",
|
|
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": "562a7f94aae12bb340f2b18932e8809c3d76a3e0"
|
|
31
31
|
}
|