@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.
Files changed (154) hide show
  1. package/dist/DmnFactory-VWZOSZHH-jkpbxz3n.js +42 -0
  2. package/dist/DmnModelTypes-ATR7FVKZ-jp35cecy.js +18 -0
  3. package/dist/KieDmnMarshaller-6TTUU5B4-47q50gk4.js +20 -0
  4. package/dist/THIRD-PARTY-NOTICES.md +1085 -0
  5. package/dist/business-rules-bnr581tz.js +26 -0
  6. package/dist/{constants-za5vbzp8.js → constants-9pa118cj.js} +17 -10
  7. package/dist/{embedded-file-reader-wmsg31a8.js → embedded-file-reader-rf2g1kfj.js} +4 -1
  8. package/dist/first-party-service-sd8yaf73.js +27 -0
  9. package/dist/hitPolicyResult-4WDHTX4A-gk103w84.js +33 -0
  10. package/dist/index-2hzp9b97.js +116 -0
  11. package/dist/index-34pj9f36.js +48 -0
  12. package/dist/{index-zdwhfpt1.js → index-4c4exdzw.js} +370 -406
  13. package/dist/index-dqa169gp.js +25 -0
  14. package/dist/{index-we6zjs66.js → index-fs1nd5ap.js} +40 -4
  15. package/dist/{index-nzr4mx5p.js → index-sby22td6.js} +22 -2
  16. package/dist/{index-7wc0g78k.js → index-t4mx1a5e.js} +5 -2
  17. package/dist/index.js +9 -8
  18. package/dist/{jmespath-ab6tdc42.js → jmespath-231m3hyn.js} +1 -1
  19. package/dist/{js-yaml-a2bk27p6.js → js-yaml-88tdqrtd.js} +3 -1
  20. package/dist/rule-catalog-5gzpe93c.js +46 -0
  21. package/dist/rules-command-error-20gp2dv9.js +14 -0
  22. package/dist/{rules-debug-service-h1ahd6p3.js → rules-debug-service-yvh448xp.js} +36 -35
  23. package/dist/{rules-init-service-y678kjje.js → rules-init-service-ewahc0vh.js} +16 -12
  24. package/dist/{rules-refresh-service-btn64j8j.js → rules-refresh-service-jgk2kq9d.js} +14 -13
  25. package/dist/{rules-validate-service-sppr4x13.js → rules-validate-service-mr2fk58k.js} +13 -10
  26. package/dist/{tool-97x3zjcm.js → tool-19b4ect0.js} +158 -113
  27. package/dist/{tool-epsr41wx.js → tool-1de529jm.js} +3 -12
  28. package/dist/{tool-7xmarr97.js → tool-2cky8jwp.js} +2578 -1777
  29. package/dist/{tool-x67kek1m.js → tool-2qj74g14.js} +12 -652
  30. package/dist/{tool-0bthsb3x.js → tool-4dfpdepw.js} +15 -15
  31. package/dist/tool-53w8skv5.js +262 -0
  32. package/dist/tool-7haj67tr.js +19 -0
  33. package/dist/{tool-e1mmqsjr.js → tool-8h4er38s.js} +411 -396
  34. package/dist/{tool-2trg1fpx.js → tool-8qy8pkp4.js} +8 -8
  35. package/dist/tool-av4mmsef.js +73 -0
  36. package/dist/{tool-6sqt4zrx.js → tool-cgmy94zt.js} +32 -29
  37. package/dist/{tool-8j9f6ns5.js → tool-eymjx05p.js} +11 -11
  38. package/dist/{tool-mm1x18d6.js → tool-gdtpsdn7.js} +28 -223
  39. package/dist/tool-m41px07w.js +49 -0
  40. package/dist/{tool-k2s349kn.js → tool-mkn83w88.js} +17 -14
  41. package/dist/tool-pm3ewdxc.js +1115 -0
  42. package/dist/{tool-6rp0gx98.js → tool-tkcx6png.js} +107 -127
  43. package/dist/{tool-1dycs173.js → tool-wmh645tm.js} +202 -194
  44. package/dist/tool.js +8 -7
  45. package/package.json +2 -15
  46. package/dist/DmnFactory-SG3RP3T3-cr8e7mxz.js +0 -8
  47. package/dist/DmnFactory-VWZOSZHH-azx0zqcn.js +0 -8
  48. package/dist/DmnModelTypes-ATR7FVKZ-vkv7n0jn.js +0 -8
  49. package/dist/KieDmnMarshaller-6TTUU5B4-rsxhvw7a.js +0 -8
  50. package/dist/business-rules-d51977r1.js +0 -25
  51. package/dist/business-rules-dekge24t.js +0 -23
  52. package/dist/business-rules-ew76mbwg.js +0 -25
  53. package/dist/business-rules-jmwx05k2.js +0 -25
  54. package/dist/business-rules-zpzqxyce.js +0 -26
  55. package/dist/constants-4r8pfr16.js +0 -22
  56. package/dist/embedded-file-reader-0228j82a.js +0 -111
  57. package/dist/first-party-service-1qa6cp4d.js +0 -8
  58. package/dist/first-party-service-28dkctkz.js +0 -8
  59. package/dist/first-party-service-4fsz3cnj.js +0 -8
  60. package/dist/first-party-service-ahcc6xc6.js +0 -8
  61. package/dist/first-party-service-y1ccmsvp.js +0 -8
  62. package/dist/first-party-service-zpr1q3nd.js +0 -8
  63. package/dist/hitPolicyResult-4WDHTX4A-dbtkgpqp.js +0 -12
  64. package/dist/index-2zxy6zgp.js +0 -23
  65. package/dist/index-3nx77wfh.js +0 -23
  66. package/dist/index-43zg1wqe.js +0 -19621
  67. package/dist/index-47jera73.js +0 -23
  68. package/dist/index-70jn7cz1.js +0 -19631
  69. package/dist/index-8kb5kc5y.js +0 -24
  70. package/dist/index-97yad7ms.js +0 -8
  71. package/dist/index-dfn83hxf.js +0 -14
  72. package/dist/index-e301h23h.js +0 -24
  73. package/dist/index-frd259yv.js +0 -24
  74. package/dist/index-gc7cw2jh.js +0 -23
  75. package/dist/index-gya2v502.js +0 -8
  76. package/dist/index-hb3gk1wf.js +0 -24
  77. package/dist/index-nsnfdqd5.js +0 -24
  78. package/dist/index-vffktc0w.js +0 -166
  79. package/dist/index-xymrydfw.js +0 -3095
  80. package/dist/index-z2qk2qn6.js +0 -24
  81. package/dist/index-zecwgvg7.js +0 -23
  82. package/dist/rule-catalog-a5w86qns.js +0 -43
  83. package/dist/rule-catalog-etpf962f.js +0 -69
  84. package/dist/rule-catalog-q5cr17hf.js +0 -58
  85. package/dist/rule-catalog-vc98yg4n.js +0 -43
  86. package/dist/rule-catalog-z3h66kh5.js +0 -56
  87. package/dist/rules-command-error-10qmb5w7.js +0 -13
  88. package/dist/rules-command-error-5bdv4bcx.js +0 -13
  89. package/dist/rules-command-error-cmssf0w4.js +0 -13
  90. package/dist/rules-command-error-fsm3b1mv.js +0 -13
  91. package/dist/rules-debug-service-5rcdh3pj.js +0 -192
  92. package/dist/rules-debug-service-8q7mkd0r.js +0 -199
  93. package/dist/rules-debug-service-b9j29ejz.js +0 -192
  94. package/dist/rules-debug-service-v3jr3r1n.js +0 -192
  95. package/dist/rules-init-service-3c2yfa7p.js +0 -687
  96. package/dist/rules-init-service-3wgd9cqp.js +0 -100
  97. package/dist/rules-init-service-8fqytxq0.js +0 -685
  98. package/dist/rules-init-service-pspt7sje.js +0 -100
  99. package/dist/rules-init-service-sbtzw93j.js +0 -102
  100. package/dist/rules-init-service-x7paqa63.js +0 -687
  101. package/dist/rules-init-service-y7qzmxx0.js +0 -102
  102. package/dist/rules-refresh-service-4xxj6ex6.js +0 -65
  103. package/dist/rules-refresh-service-ba5jk1y9.js +0 -65
  104. package/dist/rules-refresh-service-qkmphj53.js +0 -65
  105. package/dist/rules-validate-service-dmgnfne7.js +0 -60
  106. package/dist/rules-validate-service-hk2d006t.js +0 -60
  107. package/dist/rules-validate-service-xp05n2d9.js +0 -60
  108. package/dist/tool-1pkqxwwd.js +0 -17472
  109. package/dist/tool-24mr6g8c.js +0 -1556
  110. package/dist/tool-39fmkx2d.js +0 -611
  111. package/dist/tool-3e2q1x2y.js +0 -6578
  112. package/dist/tool-3j0747gg.js +0 -17077
  113. package/dist/tool-4z7zcq4z.js +0 -6058
  114. package/dist/tool-56smnjrh.js +0 -73
  115. package/dist/tool-5qygptrc.js +0 -6171
  116. package/dist/tool-5xx6x8pe.js +0 -6596
  117. package/dist/tool-7fkrd618.js +0 -1556
  118. package/dist/tool-89xzeteg.js +0 -361
  119. package/dist/tool-911s9czz.js +0 -570
  120. package/dist/tool-9bz2x04j.js +0 -40
  121. package/dist/tool-akh7nnqs.js +0 -704
  122. package/dist/tool-axfzew45.js +0 -1555
  123. package/dist/tool-b71jq9pt.js +0 -389
  124. package/dist/tool-bfj846v8.js +0 -141
  125. package/dist/tool-bvmc017m.js +0 -96
  126. package/dist/tool-bykz5ryf.js +0 -454
  127. package/dist/tool-c76qb8ap.js +0 -17052
  128. package/dist/tool-ca15515v.js +0 -570
  129. package/dist/tool-f9qs255w.js +0 -70
  130. package/dist/tool-ga79rety.js +0 -389
  131. package/dist/tool-gb547mcn.js +0 -141
  132. package/dist/tool-gta9rr4h.js +0 -68
  133. package/dist/tool-h2dfnxdq.js +0 -6486
  134. package/dist/tool-hg6vr5y9.js +0 -3769
  135. package/dist/tool-hgvnm4vh.js +0 -1843
  136. package/dist/tool-hjbf9aay.js +0 -571
  137. package/dist/tool-k5jm64n3.js +0 -5650
  138. package/dist/tool-ketztpgf.js +0 -73
  139. package/dist/tool-n1d88ryb.js +0 -6396
  140. package/dist/tool-nmqpwh9m.js +0 -6166
  141. package/dist/tool-pb80pswx.js +0 -73
  142. package/dist/tool-pcsgwpfw.js +0 -40
  143. package/dist/tool-q3c1bjyb.js +0 -454
  144. package/dist/tool-rwp1skmf.js +0 -40
  145. package/dist/tool-s3fbt22r.js +0 -454
  146. package/dist/tool-tmbst1r8.js +0 -68
  147. package/dist/tool-v6w109p0.js +0 -455
  148. package/dist/tool-w2js05qv.js +0 -389
  149. package/dist/tool-x89947ah.js +0 -17052
  150. package/dist/tool-xhksjdka.js +0 -4005
  151. package/dist/tool-yv3t4gg5.js +0 -108
  152. package/dist/tool-zbyb1ttx.js +0 -5650
  153. /package/dist/{tool-fbqnqf9k.js → tool-jd313s2x.js} +0 -0
  154. /package/dist/{tool-vyx8fpft.js → tool-qgqscsjc.js} +0 -0
@@ -1,361 +0,0 @@
1
- import {
2
- catchError,
3
- RESULTS,
4
- Pagination,
5
- OutputFormatter,
6
- Option,
7
- previewOnly,
8
- processContext,
9
- DEFAULT_PAGE_SIZE,
10
- createHiddenDeprecatedTenantOption,
11
- parseLimit,
12
- parseOffset
13
- } from "./tool-nmqpwh9m.js";
14
- // package.json
15
- var package_default = {
16
- name: "@uipath/rules-tool",
17
- author: "UiPath",
18
- license: "SEE LICENSE IN LICENSE.txt",
19
- version: "1.204.0",
20
- description: "Create and manage UiPath Business Rules (DMN) projects.",
21
- private: false,
22
- repository: {
23
- type: "git",
24
- url: "https://github.com/UiPath/cli.git",
25
- directory: "packages/rules-tool"
26
- },
27
- publishConfig: {
28
- registry: "https://npm.pkg.github.com/@uipath"
29
- },
30
- keywords: [
31
- "cli-tool"
32
- ],
33
- type: "module",
34
- main: "./dist/tool.js",
35
- exports: {
36
- ".": "./dist/tool.js"
37
- },
38
- bin: {
39
- "rules-tool": "./dist/index.js"
40
- },
41
- files: [
42
- "dist"
43
- ],
44
- scripts: {
45
- build: "bun ../../tools/build-tool.ts",
46
- package: "bun run build && bun pm pack",
47
- lint: "biome check .",
48
- "lint:fix": "biome check --write .",
49
- test: "vitest run",
50
- "test:coverage": "vitest run --coverage"
51
- },
52
- devDependencies: {
53
- "@types/node": "^25.5.2",
54
- "@uipath/common": "workspace:*",
55
- "@uipath/filesystem": "workspace:*",
56
- "@uipath/orchestrator-sdk": "workspace:*",
57
- "@uipath/solution-sdk": "workspace:*",
58
- commander: "^14.0.3",
59
- fflate: "^0.8.2",
60
- typescript: "^7.0.2"
61
- }
62
- };
63
-
64
- // src/commands/folder-options.ts
65
- function addFolderOptions(command) {
66
- return command.option("--folder-path <path>", "Folder path (e.g., 'Shared')").option("--folder-key <key>", "Folder key (GUID)");
67
- }
68
- function addTenantOption(command) {
69
- return command.addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>"));
70
- }
71
- function addUnsupportedTenantOption(command) {
72
- return command.addOption(new Option("-t, --tenant <tenant-name>", "Not supported").hideHelp());
73
- }
74
-
75
- // src/commands/describe.ts
76
- var RULES_DESCRIBE_EXAMPLES = [
77
- {
78
- Description: "Read a deployed rule's entry points before binding it from a BPMN process, RPA workflow or case",
79
- Command: 'uip rules describe LoanEligibility --folder-path "Shared"',
80
- Output: {
81
- Code: "RulesEntryPoints",
82
- Data: [
83
- {
84
- UniqueId: "8a0f5c3e-2d1b-4f6a-9e7c-1b2a3c4d5e6f",
85
- Path: "/LoanEligibility.dmn#Decision_Eligibility",
86
- DisplayName: "Eligibility",
87
- InputArguments: '{"type":"object","properties":{"creditScore":{"type":"number"}}}',
88
- OutputArguments: '{"type":"object","properties":{"eligible":{"type":"boolean"}}}'
89
- }
90
- ]
91
- }
92
- }
93
- ];
94
- var registerDescribeCommand = (program) => {
95
- const command = program.command("describe").description("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");
96
- addUnsupportedTenantOption(addFolderOptions(command)).examples(RULES_DESCRIBE_EXAMPLES).trackedAction(processContext, async (name, options) => {
97
- const rules = await import("./business-rules-zpzqxyce.js");
98
- if (options.tenant !== undefined) {
99
- await rules.reportRulesFailure("Failed to describe business rule", new rules.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."));
100
- return;
101
- }
102
- const [error, entryPoints] = await catchError((async () => {
103
- const folder = await rules.resolveRequiredFolder(options);
104
- const { describeRuleAsync } = await import("./rule-catalog-z3h66kh5.js");
105
- return describeRuleAsync(name, folder);
106
- })());
107
- if (error) {
108
- await rules.reportRulesFailure("Failed to describe business rule", error);
109
- return;
110
- }
111
- OutputFormatter.success({
112
- Result: RESULTS.Success,
113
- Code: "RulesEntryPoints",
114
- Data: entryPoints
115
- });
116
- });
117
- };
118
-
119
- // src/commands/get.ts
120
- var RULES_GET_EXAMPLES = [
121
- {
122
- Description: "Get a business rule by name",
123
- Command: 'uip rules get LoanEligibility --folder-path "Shared"',
124
- Output: {
125
- Code: "RulesGet",
126
- Data: {
127
- Key: "3f1c2a9e-8b4d-4e2a-9c1f-6d7e8f9a0b1c",
128
- Name: "LoanEligibility",
129
- FolderPath: "Shared",
130
- FolderKey: "9b2d4f6a-1c3e-4a5b-8d7f-0e1a2b3c4d5e",
131
- Description: "Decides loan eligibility",
132
- CurrentVersion: "1.0.2",
133
- Tags: [],
134
- CreationTime: "2026-09-01T10:00:00.000Z",
135
- LastModificationTime: "2026-09-20T08:30:00.000Z"
136
- }
137
- }
138
- }
139
- ];
140
- var registerGetCommand = (program) => {
141
- const command = program.command("get").description("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");
142
- addTenantOption(addFolderOptions(command)).examples(RULES_GET_EXAMPLES).trackedAction(processContext, async (name, options) => {
143
- const rules = await import("./business-rules-zpzqxyce.js");
144
- const [error, found] = await catchError((async () => {
145
- const folder = await rules.resolveRequiredFolder(options);
146
- const api = await rules.createRulesApi(options.tenant, folder);
147
- const rule = await rules.findRuleByName(api, name, folder);
148
- return { rule, folder };
149
- })());
150
- if (error) {
151
- await rules.reportRulesFailure("Failed to get business rule", error);
152
- return;
153
- }
154
- OutputFormatter.success({
155
- Result: RESULTS.Success,
156
- Code: "RulesGet",
157
- Data: rules.formatRuleDetail(found.rule, found.folder)
158
- });
159
- });
160
- };
161
-
162
- // src/commands/init.ts
163
- var RULES_INIT_EXAMPLES = [
164
- {
165
- 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.",
166
- Command: "uip rules init my-rules-project",
167
- Output: {
168
- Code: "RulesInit",
169
- Data: {
170
- Status: "Created successfully",
171
- Path: "/workspace/my-rules-projectSolution/my-rules-project",
172
- RuleStatus: "Created",
173
- SolutionRegistration: {
174
- Status: "Registered",
175
- Message: "Project registered in parent solution.",
176
- Solution: "/workspace/my-rules-projectSolution/my-rules-projectSolution.uipx",
177
- Project: "my-rules-project/project.uiproj",
178
- ProjectId: "00000000-0000-0000-0000-000000000000",
179
- Instructions: `The project is listed in the parent solution manifest.
180
- Packing or uploading the solution will sync solution resources automatically.`
181
- },
182
- AutoCreatedSolution: {
183
- Name: "my-rules-projectSolution",
184
- Path: "/workspace/my-rules-projectSolution",
185
- SolutionFile: "/workspace/my-rules-projectSolution/my-rules-projectSolution.uipx"
186
- },
187
- ProjectArtifacts: { Created: true },
188
- NextSteps: `The project is listed in the parent solution manifest.
189
- Packing or uploading the solution will sync solution resources automatically.`
190
- }
191
- }
192
- }
193
- ];
194
- var registerInitCommand = (program) => {
195
- 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) => {
196
- const { rulesInitAsync } = await import("./rules-init-service-8fqytxq0.js");
197
- const [error, result] = await catchError(rulesInitAsync(name, {
198
- force: options.force,
199
- skipRegistration: options.skipSolutionRegistration === true
200
- }));
201
- if (error) {
202
- OutputFormatter.error({
203
- Result: RESULTS.Failure,
204
- Message: "Failed to create business rules project",
205
- Instructions: error.message
206
- });
207
- processContext.exit(1);
208
- return;
209
- }
210
- const data = {
211
- Status: "Created successfully",
212
- Path: result.projectDir,
213
- RuleStatus: result.ruleStatus,
214
- SolutionRegistration: result.registration
215
- };
216
- if (result.autoCreatedSolution) {
217
- data.AutoCreatedSolution = result.autoCreatedSolution;
218
- }
219
- if (result.projectArtifacts) {
220
- data.ProjectArtifacts = result.projectArtifacts;
221
- }
222
- if (result.registration.Instructions) {
223
- data.NextSteps = result.registration.Instructions;
224
- }
225
- OutputFormatter.success({
226
- Result: RESULTS.Success,
227
- Code: "RulesInit",
228
- Data: data
229
- });
230
- });
231
- };
232
-
233
- // src/commands/list.ts
234
- var RULES_LIST_EXAMPLES = [
235
- {
236
- Description: "List the business rules in one folder, with their current version",
237
- Command: 'uip rules list --folder-path "Shared" --limit 1',
238
- Output: {
239
- Code: "RulesList",
240
- Data: [
241
- {
242
- Key: "3f1c2a9e-8b4d-4e2a-9c1f-6d7e8f9a0b1c",
243
- Name: "LoanEligibility",
244
- FolderPath: "Shared",
245
- FolderKey: "9b2d4f6a-1c3e-4a5b-8d7f-0e1a2b3c4d5e",
246
- Description: "Decides loan eligibility",
247
- CurrentVersion: "1.0.2"
248
- }
249
- ]
250
- }
251
- }
252
- ];
253
- var registerListCommand = (program) => {
254
- const command = program.command("list").description("List business rules deployed to Orchestrator in a folder. Returns key, name, folder, description and current version.");
255
- 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) => {
256
- const rules = await import("./business-rules-zpzqxyce.js");
257
- const [error, rows] = await catchError(listRules(options));
258
- if (error) {
259
- await rules.reportRulesFailure("Failed to list business rules", error);
260
- return;
261
- }
262
- OutputFormatter.success({
263
- Result: RESULTS.Success,
264
- Code: "RulesList",
265
- Pagination: new Pagination({
266
- returned: rows.length,
267
- limit: options.limit,
268
- offset: options.offset
269
- }),
270
- Data: rows
271
- });
272
- });
273
- };
274
- async function listRules(options) {
275
- const rules = await import("./business-rules-zpzqxyce.js");
276
- const folder = await rules.resolveRequiredFolder(options);
277
- const api = await rules.createRulesApi(options.tenant, folder);
278
- const page = await api.businessRulesGet({
279
- $top: options.limit,
280
- $skip: options.offset
281
- });
282
- return (page.value ?? []).map((rule) => rules.formatRule(rule, folder));
283
- }
284
-
285
- // src/commands/versions.ts
286
- var RULES_VERSIONS_EXAMPLES = [
287
- {
288
- Description: "List the versions of a business rule",
289
- Command: 'uip rules versions LoanEligibility --folder-path "Shared"',
290
- Output: {
291
- Code: "RulesVersionList",
292
- Data: [
293
- {
294
- Version: "1.0.2",
295
- IsActive: true,
296
- CreationTime: "2026-09-20T08:30:00.000Z"
297
- },
298
- {
299
- Version: "1.0.1",
300
- IsActive: false,
301
- CreationTime: "2026-09-10T14:05:00.000Z"
302
- }
303
- ]
304
- }
305
- }
306
- ];
307
- var registerVersionsCommand = (program) => {
308
- const command = program.command("versions").description("List the versions of a deployed business rule. The active version is the one consumers evaluate.").argument("<rule-name>", "Business rule name");
309
- 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) => {
310
- const rules = await import("./business-rules-zpzqxyce.js");
311
- const [error, page] = await catchError((async () => {
312
- const folder = await rules.resolveRequiredFolder(options);
313
- const api = await rules.createRulesApi(options.tenant, folder);
314
- const rule = await rules.findRuleByName(api, name, folder);
315
- if (!rule.id) {
316
- throw rules.ruleNotFound(name, folder);
317
- }
318
- return api.businessRulesGetVersionListById({
319
- id: rule.id,
320
- $top: options.limit,
321
- $skip: options.offset
322
- });
323
- })());
324
- if (error) {
325
- await rules.reportRulesFailure("Failed to list business rule versions", error);
326
- return;
327
- }
328
- const items = page.value ?? [];
329
- OutputFormatter.success({
330
- Result: RESULTS.Success,
331
- Code: "RulesVersionList",
332
- Pagination: new Pagination({
333
- returned: items.length,
334
- limit: options.limit,
335
- offset: options.offset
336
- }),
337
- Data: items.map(rules.formatVersion)
338
- });
339
- });
340
- };
341
-
342
- // src/tool.ts
343
- var metadata2 = {
344
- name: "rules-tool",
345
- version: package_default.version,
346
- description: "Create and manage UiPath Business Rules (DMN) projects.",
347
- commandPrefix: "rules"
348
- };
349
- var registerCommands2 = async (program) => {
350
- previewOnly(() => {
351
- registerInitCommand(program);
352
- registerListCommand(program);
353
- registerGetCommand(program);
354
- registerVersionsCommand(program);
355
- registerDescribeCommand(program);
356
- });
357
- };
358
-
359
- export { metadata2, registerCommands2 };
360
-
361
- //# debugId=00822256ADFF74C164756E2164756E21