@uipath/rules-tool 1.204.0-preview.250 → 1.204.0-preview.255

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.
@@ -5,7 +5,7 @@ compiled into its `dist/` output rather than installed alongside it.
5
5
  Their licences and copyright notices are reproduced here in full, as
6
6
  those licences require.
7
7
 
8
- 39 bundled dependencies:
8
+ 40 bundled dependencies:
9
9
 
10
10
  - @bpmn-io/dmn-migrate@0.5.0 — MIT
11
11
  - @bpmn-io/feel-analyzer@0.5.1 — MIT
@@ -26,6 +26,7 @@ those licences require.
26
26
  - dmn-moddle@10.0.0 — MIT
27
27
  - fflate@0.8.3 — MIT
28
28
  - ids@1.0.5 — MIT
29
+ - ignore@5.3.2 — MIT
29
30
  - is-docker@3.0.0 — MIT
30
31
  - is-in-ssh@1.0.0 — MIT
31
32
  - is-inside-container@1.0.0 — MIT
@@ -501,6 +502,36 @@ THE SOFTWARE.
501
502
 
502
503
  ---
503
504
 
505
+ ## ignore@5.3.2
506
+
507
+ SPDX: MIT
508
+
509
+ ```
510
+ Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
511
+ http://kael.me/
512
+
513
+ Permission is hereby granted, free of charge, to any person obtaining
514
+ a copy of this software and associated documentation files (the
515
+ "Software"), to deal in the Software without restriction, including
516
+ without limitation the rights to use, copy, modify, merge, publish,
517
+ distribute, sublicense, and/or sell copies of the Software, and to
518
+ permit persons to whom the Software is furnished to do so, subject to
519
+ the following conditions:
520
+
521
+ The above copyright notice and this permission notice shall be
522
+ included in all copies or substantial portions of the Software.
523
+
524
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
525
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
526
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
527
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
528
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
529
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
530
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
531
+ ```
532
+
533
+ ---
534
+
504
535
  ## is-docker@3.0.0
505
536
 
506
537
  SPDX: MIT
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  metadata,
4
4
  registerCommands
5
- } from "./tool-jxvk6306.js";
5
+ } from "./tool-6a672gmg.js";
6
6
  import {
7
7
  Command
8
8
  } from "./tool-tkcx6png.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildSolutionPackageFromDir,
3
3
  uploadOrOverwriteSolution
4
- } from "./tool-x0z7hxqr.js";
4
+ } from "./tool-qsgp0kzq.js";
5
5
  import {
6
6
  findSolutionFile,
7
7
  updateSolutionFile
@@ -1,4 +1,4 @@
1
- import"./tool-x0z7hxqr.js";
1
+ import"./tool-qsgp0kzq.js";
2
2
  import {
3
3
  prepareProjectLocation,
4
4
  tryRegisterProjectInParentSolution
@@ -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.204.0-preview.250",
22
+ version: "1.204.0-preview.255",
23
23
  description: "Create and manage UiPath Business Rules (DMN) projects.",
24
24
  private: false,
25
25
  repository: {
@@ -104,7 +104,7 @@ var RULES_DEBUG_EXAMPLES = [
104
104
  var registerDebugCommand = (program) => {
105
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 with --explain 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("--explain", "Publish a trace of the run and return its id (read it with 'uip traces spans get')").option("--folder-path <path>", "Folder to evaluate in and publish the --explain trace into (default: your personal workspace)").option("--folder-key <key>", "Key (GUID) of the folder to evaluate in and publish the --explain trace into").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) => {
106
106
  const { reportRulesFailure } = await import("./rules-command-error-20gp2dv9.js");
107
- const { debugRuleProjectAsync } = await import("./rules-debug-service-cmgmbhyh.js");
107
+ const { debugRuleProjectAsync } = await import("./rules-debug-service-var52vfc.js");
108
108
  const [error, result] = await catchError(debugRuleProjectAsync(projectPath, options));
109
109
  if (error) {
110
110
  await reportRulesFailure("Failed to debug business rules project", error);
@@ -295,7 +295,7 @@ Packing or uploading the solution will sync solution resources automatically.`
295
295
  ];
296
296
  var registerInitCommand = (program) => {
297
297
  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-b74thek5.js");
298
+ const { rulesInitAsync } = await import("./rules-init-service-0jgj6m9d.js");
299
299
  const [error, result] = await catchError(rulesInitAsync(name, {
300
300
  force: options.force,
301
301
  skipRegistration: options.skipSolutionRegistration === true
@@ -571,4 +571,4 @@ var registerCommands = async (program) => {
571
571
 
572
572
  export { metadata, registerCommands };
573
573
 
574
- //# debugId=1990E97448D43EE964756E2164756E21
574
+ //# debugId=69FB33F78301658D64756E2164756E21
@@ -8,11 +8,276 @@ import {
8
8
  installSdkUserAgentHeader,
9
9
  logger
10
10
  } from "./tool-tkcx6png.js";
11
+ import {
12
+ __commonJS,
13
+ __toESM
14
+ } from "./tool-1de529jm.js";
15
+
16
+ // ../../node_modules/ignore/index.js
17
+ var require_ignore = __commonJS(function(exports, module) {
18
+ function makeArray(subject) {
19
+ return Array.isArray(subject) ? subject : [subject];
20
+ }
21
+ var EMPTY = "";
22
+ var SPACE = " ";
23
+ var ESCAPE = "\\";
24
+ var REGEX_TEST_BLANK_LINE = /^\s+$/;
25
+ var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
26
+ var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
27
+ var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
28
+ var REGEX_SPLITALL_CRLF = /\r?\n/g;
29
+ var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/;
30
+ var SLASH = "/";
31
+ var TMP_KEY_IGNORE = "node-ignore";
32
+ if (typeof Symbol !== "undefined") {
33
+ TMP_KEY_IGNORE = Symbol.for("node-ignore");
34
+ }
35
+ var KEY_IGNORE = TMP_KEY_IGNORE;
36
+ var define = (object, key, value) => Object.defineProperty(object, key, { value });
37
+ var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
38
+ var RETURN_FALSE = () => false;
39
+ var sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY);
40
+ var cleanRangeBackSlash = (slashes) => {
41
+ const { length } = slashes;
42
+ return slashes.slice(0, length - length % 2);
43
+ };
44
+ var REPLACERS = [
45
+ [
46
+ /^\uFEFF/,
47
+ () => EMPTY
48
+ ],
49
+ [
50
+ /((?:\\\\)*?)(\\?\s+)$/,
51
+ (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
52
+ ],
53
+ [
54
+ /(\\+?)\s/g,
55
+ (_, m1) => {
56
+ const { length } = m1;
57
+ return m1.slice(0, length - length % 2) + SPACE;
58
+ }
59
+ ],
60
+ [
61
+ /[\\$.|*+(){^]/g,
62
+ (match) => `\\${match}`
63
+ ],
64
+ [
65
+ /(?!\\)\?/g,
66
+ () => "[^/]"
67
+ ],
68
+ [
69
+ /^\//,
70
+ () => "^"
71
+ ],
72
+ [
73
+ /\//g,
74
+ () => "\\/"
75
+ ],
76
+ [
77
+ /^\^*\\\*\\\*\\\//,
78
+ () => "^(?:.*\\/)?"
79
+ ],
80
+ [
81
+ /^(?=[^^])/,
82
+ function startingReplacer() {
83
+ return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
84
+ }
85
+ ],
86
+ [
87
+ /\\\/\\\*\\\*(?=\\\/|$)/g,
88
+ (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"
89
+ ],
90
+ [
91
+ /(^|[^\\]+)(\\\*)+(?=.+)/g,
92
+ (_, p1, p2) => {
93
+ const unescaped = p2.replace(/\\\*/g, "[^\\/]*");
94
+ return p1 + unescaped;
95
+ }
96
+ ],
97
+ [
98
+ /\\\\\\(?=[$.|*+(){^])/g,
99
+ () => ESCAPE
100
+ ],
101
+ [
102
+ /\\\\/g,
103
+ () => ESCAPE
104
+ ],
105
+ [
106
+ /(\\)?\[([^\]/]*?)(\\*)($|\])/g,
107
+ (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"
108
+ ],
109
+ [
110
+ /(?:[^*])$/,
111
+ (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`
112
+ ],
113
+ [
114
+ /(\^|\\\/)?\\\*$/,
115
+ (_, p1) => {
116
+ const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
117
+ return `${prefix}(?=$|\\/$)`;
118
+ }
119
+ ]
120
+ ];
121
+ var regexCache = Object.create(null);
122
+ var makeRegex = (pattern, ignoreCase) => {
123
+ let source = regexCache[pattern];
124
+ if (!source) {
125
+ source = REPLACERS.reduce((prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), pattern);
126
+ regexCache[pattern] = source;
127
+ }
128
+ return ignoreCase ? new RegExp(source, "i") : new RegExp(source);
129
+ };
130
+ var isString = (subject) => typeof subject === "string";
131
+ var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
132
+ var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF);
133
+
134
+ class IgnoreRule {
135
+ constructor(origin, pattern, negative, regex) {
136
+ this.origin = origin;
137
+ this.pattern = pattern;
138
+ this.negative = negative;
139
+ this.regex = regex;
140
+ }
141
+ }
142
+ var createRule = (pattern, ignoreCase) => {
143
+ const origin = pattern;
144
+ let negative = false;
145
+ if (pattern.indexOf("!") === 0) {
146
+ negative = true;
147
+ pattern = pattern.substr(1);
148
+ }
149
+ pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
150
+ const regex = makeRegex(pattern, ignoreCase);
151
+ return new IgnoreRule(origin, pattern, negative, regex);
152
+ };
153
+ var throwError = (message, Ctor) => {
154
+ throw new Ctor(message);
155
+ };
156
+ var checkPath = (path, originalPath, doThrow) => {
157
+ if (!isString(path)) {
158
+ return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
159
+ }
160
+ if (!path) {
161
+ return doThrow(`path must not be empty`, TypeError);
162
+ }
163
+ if (checkPath.isNotRelative(path)) {
164
+ const r = "`path.relative()`d";
165
+ return doThrow(`path should be a ${r} string, but got "${originalPath}"`, RangeError);
166
+ }
167
+ return true;
168
+ };
169
+ var isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path);
170
+ checkPath.isNotRelative = isNotRelative;
171
+ checkPath.convert = (p) => p;
172
+
173
+ class Ignore {
174
+ constructor({
175
+ ignorecase = true,
176
+ ignoreCase = ignorecase,
177
+ allowRelativePaths = false
178
+ } = {}) {
179
+ define(this, KEY_IGNORE, true);
180
+ this._rules = [];
181
+ this._ignoreCase = ignoreCase;
182
+ this._allowRelativePaths = allowRelativePaths;
183
+ this._initCache();
184
+ }
185
+ _initCache() {
186
+ this._ignoreCache = Object.create(null);
187
+ this._testCache = Object.create(null);
188
+ }
189
+ _addPattern(pattern) {
190
+ if (pattern && pattern[KEY_IGNORE]) {
191
+ this._rules = this._rules.concat(pattern._rules);
192
+ this._added = true;
193
+ return;
194
+ }
195
+ if (checkPattern(pattern)) {
196
+ const rule = createRule(pattern, this._ignoreCase);
197
+ this._added = true;
198
+ this._rules.push(rule);
199
+ }
200
+ }
201
+ add(pattern) {
202
+ this._added = false;
203
+ makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this);
204
+ if (this._added) {
205
+ this._initCache();
206
+ }
207
+ return this;
208
+ }
209
+ addPattern(pattern) {
210
+ return this.add(pattern);
211
+ }
212
+ _testOne(path, checkUnignored) {
213
+ let ignored = false;
214
+ let unignored = false;
215
+ this._rules.forEach((rule) => {
216
+ const { negative } = rule;
217
+ if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
218
+ return;
219
+ }
220
+ const matched = rule.regex.test(path);
221
+ if (matched) {
222
+ ignored = !negative;
223
+ unignored = negative;
224
+ }
225
+ });
226
+ return {
227
+ ignored,
228
+ unignored
229
+ };
230
+ }
231
+ _test(originalPath, cache, checkUnignored, slices) {
232
+ const path = originalPath && checkPath.convert(originalPath);
233
+ checkPath(path, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
234
+ return this._t(path, cache, checkUnignored, slices);
235
+ }
236
+ _t(path, cache, checkUnignored, slices) {
237
+ if (path in cache) {
238
+ return cache[path];
239
+ }
240
+ if (!slices) {
241
+ slices = path.split(SLASH);
242
+ }
243
+ slices.pop();
244
+ if (!slices.length) {
245
+ return cache[path] = this._testOne(path, checkUnignored);
246
+ }
247
+ const parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices);
248
+ return cache[path] = parent.ignored ? parent : this._testOne(path, checkUnignored);
249
+ }
250
+ ignores(path) {
251
+ return this._test(path, this._ignoreCache, false).ignored;
252
+ }
253
+ createFilter() {
254
+ return (path) => !this.ignores(path);
255
+ }
256
+ filter(paths) {
257
+ return makeArray(paths).filter(this.createFilter());
258
+ }
259
+ test(path) {
260
+ return this._test(path, this._testCache, true);
261
+ }
262
+ }
263
+ var factory = (options) => new Ignore(options);
264
+ var isPathValid = (path) => checkPath(path && checkPath.convert(path), path, RETURN_FALSE);
265
+ factory.isPathValid = isPathValid;
266
+ factory.default = factory;
267
+ module.exports = factory;
268
+ if (typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")) {
269
+ const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
270
+ checkPath.convert = makePosix;
271
+ const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
272
+ checkPath.isNotRelative = (path) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path);
273
+ }
274
+ });
11
275
 
12
276
  // ../solution-sdk/src/studio-web-compat.ts
13
277
  var API_PROJECT_TYPES = new Set(["api", "apiautomation"]);
14
278
 
15
279
  // ../solution-sdk/src/zip-utils.ts
280
+ var import_ignore = __toESM(require_ignore(), 1);
16
281
  var DEFAULT_EXCLUDED_DIR_NAMES = new Set([
17
282
  ".venv",
18
283
  "node_modules",
@@ -32,6 +297,22 @@ function isDefaultExcludedFileName(name) {
32
297
  }
33
298
  return false;
34
299
  }
300
+ var UNMATCHABLE_RELATIVE_PATH = /^\.+$|^\.*\//;
301
+ function isIgnoredByRules(fs, rules, fullPath, isDirectory) {
302
+ if (!rules) {
303
+ return false;
304
+ }
305
+ for (const rule of rules) {
306
+ const rel = fs.path.relative(rule.baseDir, fullPath).replace(/\\/g, "/");
307
+ if (!rel || UNMATCHABLE_RELATIVE_PATH.test(rel) || fs.path.isAbsolute(rel)) {
308
+ continue;
309
+ }
310
+ if (rule.ignores(isDirectory ? `${rel}/` : rel)) {
311
+ return true;
312
+ }
313
+ }
314
+ return false;
315
+ }
35
316
  async function collectTree(fs, dir, options = {}) {
36
317
  const files = [];
37
318
  const emptyDirs = [];
@@ -53,12 +334,12 @@ async function collectTree(fs, dir, options = {}) {
53
334
  const fullPath = fs.path.join(current, entryName);
54
335
  const entryStat = await fs.stat(fullPath);
55
336
  if (entryStat?.isDirectory()) {
56
- if (excluded.has(entryName)) {
337
+ if (excluded.has(entryName) || isIgnoredByRules(fs, options.ignoreRules, fullPath, true)) {
57
338
  continue;
58
339
  }
59
340
  await walk(fullPath, false);
60
341
  } else if (entryStat?.isFile()) {
61
- if (isDefaultExcludedFileName(entryName)) {
342
+ if (isDefaultExcludedFileName(entryName) || isIgnoredByRules(fs, options.ignoreRules, fullPath, false)) {
62
343
  continue;
63
344
  }
64
345
  files.push(fullPath);
@@ -157,9 +438,9 @@ function countCentralDirectoryEntries(view, cdOffset, cdSize) {
157
438
  return count;
158
439
  }
159
440
  // ../solution-sdk/src/bundle-service.ts
160
- async function mirrorTree(fs, srcDir, relativeBase, destBaseDir, additionalExcludeDirs) {
441
+ async function mirrorTree(fs, srcDir, relativeBase, destBaseDir, ignoreRules) {
161
442
  const { files, emptyDirs } = await collectTree(fs, srcDir, {
162
- additionalExcludeDirs
443
+ ignoreRules
163
444
  });
164
445
  if (files.length === 0 && emptyDirs.length === 0) {
165
446
  const rootRel = fs.path.relative(relativeBase, srcDir);
@@ -669,7 +950,7 @@ var package_default = {
669
950
  name: "@uipath/solution-sdk",
670
951
  author: "UiPath",
671
952
  license: "SEE LICENSE IN LICENSE.txt",
672
- version: "1.204.0-preview.250",
953
+ version: "1.204.0-preview.255",
673
954
  repository: {
674
955
  type: "git",
675
956
  url: "https://github.com/UiPath/cli.git",
@@ -725,6 +1006,7 @@ var package_default = {
725
1006
  "@uipath/studioweb-sdk": "workspace:*",
726
1007
  "@types/node": "^25.5.2",
727
1008
  fflate: "^0.8.2",
1009
+ ignore: "^5.3.2",
728
1010
  typescript: "^7.0.2"
729
1011
  }
730
1012
  };
@@ -913,4 +1195,4 @@ var SUCCEEDED = "creationsucceeded";
913
1195
  var TERMINAL = new Set([SUCCEEDED, "creationfailed", "validationfailed"]);
914
1196
  export { buildSolutionPackageFromDir, uploadOrOverwriteSolution };
915
1197
 
916
- //# debugId=FC4BCF8EC5544B3364756E2164756E21
1198
+ //# debugId=A6AD5FC16DEA7A7B64756E2164756E21
package/dist/tool.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  metadata,
3
3
  registerCommands
4
- } from "./tool-jxvk6306.js";
4
+ } from "./tool-6a672gmg.js";
5
5
  import"./tool-tkcx6png.js";
6
6
  import"./tool-1de529jm.js";
7
7
  export {
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.204.0-preview.250",
5
+ "version": "1.204.0-preview.255",
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": "80ffb08b3e58d7ca233b16fae8521163b1dcd635"
30
+ "gitHead": "699c58dabb59414557755a8933bcbe40aa420df3"
31
31
  }