@uipath/function-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
|
-
|
|
8
|
+
21 bundled dependencies:
|
|
9
9
|
|
|
10
10
|
- @uipath/coded-functions-js-cli@0.1.86 — SEE LICENSE IN LICENSE.txt
|
|
11
11
|
- @uipath/coded-functions-js-packager@0.1.10 — see below
|
|
@@ -15,6 +15,7 @@ those licences require.
|
|
|
15
15
|
- default-browser-id@5.0.1 — MIT
|
|
16
16
|
- define-lazy-prop@3.0.0 — MIT
|
|
17
17
|
- fflate@0.8.3 — MIT
|
|
18
|
+
- ignore@5.3.2 — MIT
|
|
18
19
|
- is-docker@3.0.0 — MIT
|
|
19
20
|
- is-in-ssh@1.0.0 — MIT
|
|
20
21
|
- is-inside-container@1.0.0 — MIT
|
|
@@ -186,6 +187,36 @@ SOFTWARE.
|
|
|
186
187
|
|
|
187
188
|
---
|
|
188
189
|
|
|
190
|
+
## ignore@5.3.2
|
|
191
|
+
|
|
192
|
+
SPDX: MIT
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
|
|
196
|
+
http://kael.me/
|
|
197
|
+
|
|
198
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
199
|
+
a copy of this software and associated documentation files (the
|
|
200
|
+
"Software"), to deal in the Software without restriction, including
|
|
201
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
202
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
203
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
204
|
+
the following conditions:
|
|
205
|
+
|
|
206
|
+
The above copyright notice and this permission notice shall be
|
|
207
|
+
included in all copies or substantial portions of the Software.
|
|
208
|
+
|
|
209
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
210
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
211
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
212
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
213
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
214
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
215
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
189
220
|
## is-docker@3.0.0
|
|
190
221
|
|
|
191
222
|
SPDX: MIT
|
|
@@ -12,7 +12,270 @@ import {
|
|
|
12
12
|
unsupportedSolutionProjectType
|
|
13
13
|
} from "./packager-tool-p94n5277.js";
|
|
14
14
|
import"./packager-tool-g0hcxnae.js";
|
|
15
|
-
import
|
|
15
|
+
import {
|
|
16
|
+
__commonJS,
|
|
17
|
+
__toESM
|
|
18
|
+
} from "./packager-tool-1de529jm.js";
|
|
19
|
+
|
|
20
|
+
// ../../node_modules/ignore/index.js
|
|
21
|
+
var require_ignore = __commonJS(function(exports, module) {
|
|
22
|
+
function makeArray(subject) {
|
|
23
|
+
return Array.isArray(subject) ? subject : [subject];
|
|
24
|
+
}
|
|
25
|
+
var EMPTY = "";
|
|
26
|
+
var SPACE = " ";
|
|
27
|
+
var ESCAPE = "\\";
|
|
28
|
+
var REGEX_TEST_BLANK_LINE = /^\s+$/;
|
|
29
|
+
var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
|
|
30
|
+
var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
|
|
31
|
+
var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
|
|
32
|
+
var REGEX_SPLITALL_CRLF = /\r?\n/g;
|
|
33
|
+
var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/;
|
|
34
|
+
var SLASH = "/";
|
|
35
|
+
var TMP_KEY_IGNORE = "node-ignore";
|
|
36
|
+
if (typeof Symbol !== "undefined") {
|
|
37
|
+
TMP_KEY_IGNORE = Symbol.for("node-ignore");
|
|
38
|
+
}
|
|
39
|
+
var KEY_IGNORE = TMP_KEY_IGNORE;
|
|
40
|
+
var define = (object, key, value) => Object.defineProperty(object, key, { value });
|
|
41
|
+
var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
|
|
42
|
+
var RETURN_FALSE = () => false;
|
|
43
|
+
var sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY);
|
|
44
|
+
var cleanRangeBackSlash = (slashes) => {
|
|
45
|
+
const { length } = slashes;
|
|
46
|
+
return slashes.slice(0, length - length % 2);
|
|
47
|
+
};
|
|
48
|
+
var REPLACERS = [
|
|
49
|
+
[
|
|
50
|
+
/^\uFEFF/,
|
|
51
|
+
() => EMPTY
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
/((?:\\\\)*?)(\\?\s+)$/,
|
|
55
|
+
(_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
/(\\+?)\s/g,
|
|
59
|
+
(_, m1) => {
|
|
60
|
+
const { length } = m1;
|
|
61
|
+
return m1.slice(0, length - length % 2) + SPACE;
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
/[\\$.|*+(){^]/g,
|
|
66
|
+
(match) => `\\${match}`
|
|
67
|
+
],
|
|
68
|
+
[
|
|
69
|
+
/(?!\\)\?/g,
|
|
70
|
+
() => "[^/]"
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
/^\//,
|
|
74
|
+
() => "^"
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
/\//g,
|
|
78
|
+
() => "\\/"
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
/^\^*\\\*\\\*\\\//,
|
|
82
|
+
() => "^(?:.*\\/)?"
|
|
83
|
+
],
|
|
84
|
+
[
|
|
85
|
+
/^(?=[^^])/,
|
|
86
|
+
function startingReplacer() {
|
|
87
|
+
return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
/\\\/\\\*\\\*(?=\\\/|$)/g,
|
|
92
|
+
(_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"
|
|
93
|
+
],
|
|
94
|
+
[
|
|
95
|
+
/(^|[^\\]+)(\\\*)+(?=.+)/g,
|
|
96
|
+
(_, p1, p2) => {
|
|
97
|
+
const unescaped = p2.replace(/\\\*/g, "[^\\/]*");
|
|
98
|
+
return p1 + unescaped;
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
/\\\\\\(?=[$.|*+(){^])/g,
|
|
103
|
+
() => ESCAPE
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
/\\\\/g,
|
|
107
|
+
() => ESCAPE
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
/(\\)?\[([^\]/]*?)(\\*)($|\])/g,
|
|
111
|
+
(match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
/(?:[^*])$/,
|
|
115
|
+
(match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`
|
|
116
|
+
],
|
|
117
|
+
[
|
|
118
|
+
/(\^|\\\/)?\\\*$/,
|
|
119
|
+
(_, p1) => {
|
|
120
|
+
const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
|
|
121
|
+
return `${prefix}(?=$|\\/$)`;
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
];
|
|
125
|
+
var regexCache = Object.create(null);
|
|
126
|
+
var makeRegex = (pattern, ignoreCase) => {
|
|
127
|
+
let source = regexCache[pattern];
|
|
128
|
+
if (!source) {
|
|
129
|
+
source = REPLACERS.reduce((prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), pattern);
|
|
130
|
+
regexCache[pattern] = source;
|
|
131
|
+
}
|
|
132
|
+
return ignoreCase ? new RegExp(source, "i") : new RegExp(source);
|
|
133
|
+
};
|
|
134
|
+
var isString = (subject) => typeof subject === "string";
|
|
135
|
+
var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
|
|
136
|
+
var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF);
|
|
137
|
+
|
|
138
|
+
class IgnoreRule {
|
|
139
|
+
constructor(origin, pattern, negative, regex) {
|
|
140
|
+
this.origin = origin;
|
|
141
|
+
this.pattern = pattern;
|
|
142
|
+
this.negative = negative;
|
|
143
|
+
this.regex = regex;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
var createRule = (pattern, ignoreCase) => {
|
|
147
|
+
const origin = pattern;
|
|
148
|
+
let negative = false;
|
|
149
|
+
if (pattern.indexOf("!") === 0) {
|
|
150
|
+
negative = true;
|
|
151
|
+
pattern = pattern.substr(1);
|
|
152
|
+
}
|
|
153
|
+
pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
|
|
154
|
+
const regex = makeRegex(pattern, ignoreCase);
|
|
155
|
+
return new IgnoreRule(origin, pattern, negative, regex);
|
|
156
|
+
};
|
|
157
|
+
var throwError = (message, Ctor) => {
|
|
158
|
+
throw new Ctor(message);
|
|
159
|
+
};
|
|
160
|
+
var checkPath = (path, originalPath, doThrow) => {
|
|
161
|
+
if (!isString(path)) {
|
|
162
|
+
return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
|
|
163
|
+
}
|
|
164
|
+
if (!path) {
|
|
165
|
+
return doThrow(`path must not be empty`, TypeError);
|
|
166
|
+
}
|
|
167
|
+
if (checkPath.isNotRelative(path)) {
|
|
168
|
+
const r = "`path.relative()`d";
|
|
169
|
+
return doThrow(`path should be a ${r} string, but got "${originalPath}"`, RangeError);
|
|
170
|
+
}
|
|
171
|
+
return true;
|
|
172
|
+
};
|
|
173
|
+
var isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path);
|
|
174
|
+
checkPath.isNotRelative = isNotRelative;
|
|
175
|
+
checkPath.convert = (p) => p;
|
|
176
|
+
|
|
177
|
+
class Ignore {
|
|
178
|
+
constructor({
|
|
179
|
+
ignorecase = true,
|
|
180
|
+
ignoreCase = ignorecase,
|
|
181
|
+
allowRelativePaths = false
|
|
182
|
+
} = {}) {
|
|
183
|
+
define(this, KEY_IGNORE, true);
|
|
184
|
+
this._rules = [];
|
|
185
|
+
this._ignoreCase = ignoreCase;
|
|
186
|
+
this._allowRelativePaths = allowRelativePaths;
|
|
187
|
+
this._initCache();
|
|
188
|
+
}
|
|
189
|
+
_initCache() {
|
|
190
|
+
this._ignoreCache = Object.create(null);
|
|
191
|
+
this._testCache = Object.create(null);
|
|
192
|
+
}
|
|
193
|
+
_addPattern(pattern) {
|
|
194
|
+
if (pattern && pattern[KEY_IGNORE]) {
|
|
195
|
+
this._rules = this._rules.concat(pattern._rules);
|
|
196
|
+
this._added = true;
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (checkPattern(pattern)) {
|
|
200
|
+
const rule = createRule(pattern, this._ignoreCase);
|
|
201
|
+
this._added = true;
|
|
202
|
+
this._rules.push(rule);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
add(pattern) {
|
|
206
|
+
this._added = false;
|
|
207
|
+
makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this);
|
|
208
|
+
if (this._added) {
|
|
209
|
+
this._initCache();
|
|
210
|
+
}
|
|
211
|
+
return this;
|
|
212
|
+
}
|
|
213
|
+
addPattern(pattern) {
|
|
214
|
+
return this.add(pattern);
|
|
215
|
+
}
|
|
216
|
+
_testOne(path, checkUnignored) {
|
|
217
|
+
let ignored = false;
|
|
218
|
+
let unignored = false;
|
|
219
|
+
this._rules.forEach((rule) => {
|
|
220
|
+
const { negative } = rule;
|
|
221
|
+
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
const matched = rule.regex.test(path);
|
|
225
|
+
if (matched) {
|
|
226
|
+
ignored = !negative;
|
|
227
|
+
unignored = negative;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
return {
|
|
231
|
+
ignored,
|
|
232
|
+
unignored
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
_test(originalPath, cache, checkUnignored, slices) {
|
|
236
|
+
const path = originalPath && checkPath.convert(originalPath);
|
|
237
|
+
checkPath(path, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
|
|
238
|
+
return this._t(path, cache, checkUnignored, slices);
|
|
239
|
+
}
|
|
240
|
+
_t(path, cache, checkUnignored, slices) {
|
|
241
|
+
if (path in cache) {
|
|
242
|
+
return cache[path];
|
|
243
|
+
}
|
|
244
|
+
if (!slices) {
|
|
245
|
+
slices = path.split(SLASH);
|
|
246
|
+
}
|
|
247
|
+
slices.pop();
|
|
248
|
+
if (!slices.length) {
|
|
249
|
+
return cache[path] = this._testOne(path, checkUnignored);
|
|
250
|
+
}
|
|
251
|
+
const parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices);
|
|
252
|
+
return cache[path] = parent.ignored ? parent : this._testOne(path, checkUnignored);
|
|
253
|
+
}
|
|
254
|
+
ignores(path) {
|
|
255
|
+
return this._test(path, this._ignoreCache, false).ignored;
|
|
256
|
+
}
|
|
257
|
+
createFilter() {
|
|
258
|
+
return (path) => !this.ignores(path);
|
|
259
|
+
}
|
|
260
|
+
filter(paths) {
|
|
261
|
+
return makeArray(paths).filter(this.createFilter());
|
|
262
|
+
}
|
|
263
|
+
test(path) {
|
|
264
|
+
return this._test(path, this._testCache, true);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
var factory = (options) => new Ignore(options);
|
|
268
|
+
var isPathValid = (path) => checkPath(path && checkPath.convert(path), path, RETURN_FALSE);
|
|
269
|
+
factory.isPathValid = isPathValid;
|
|
270
|
+
factory.default = factory;
|
|
271
|
+
module.exports = factory;
|
|
272
|
+
if (typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")) {
|
|
273
|
+
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
274
|
+
checkPath.convert = makePosix;
|
|
275
|
+
const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
276
|
+
checkPath.isNotRelative = (path) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
16
279
|
|
|
17
280
|
// ../solution-sdk/generated/src/runtime.ts
|
|
18
281
|
var BASE_PATH = "https://alpha.uipath.com/uipattycyrhx/abizon_1/automationsolutions_".replace(/\/+$/, "");
|
|
@@ -314,7 +577,7 @@ var package_default = {
|
|
|
314
577
|
name: "@uipath/solution-sdk",
|
|
315
578
|
author: "UiPath",
|
|
316
579
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
317
|
-
version: "1.204.0-preview.
|
|
580
|
+
version: "1.204.0-preview.255",
|
|
318
581
|
repository: {
|
|
319
582
|
type: "git",
|
|
320
583
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -370,6 +633,7 @@ var package_default = {
|
|
|
370
633
|
"@uipath/studioweb-sdk": "workspace:*",
|
|
371
634
|
"@types/node": "^25.5.2",
|
|
372
635
|
fflate: "^0.8.2",
|
|
636
|
+
ignore: "^5.3.2",
|
|
373
637
|
typescript: "^7.0.2"
|
|
374
638
|
}
|
|
375
639
|
};
|
|
@@ -4856,6 +5120,7 @@ function assertStudioWebCompatibleProjects(projects) {
|
|
|
4856
5120
|
}
|
|
4857
5121
|
|
|
4858
5122
|
// ../solution-sdk/src/zip-utils.ts
|
|
5123
|
+
var import_ignore = __toESM(require_ignore(), 1);
|
|
4859
5124
|
var DEFAULT_EXCLUDED_DIR_NAMES = new Set([
|
|
4860
5125
|
".venv",
|
|
4861
5126
|
"node_modules",
|
|
@@ -4877,18 +5142,31 @@ function isDefaultExcludedFileName(name) {
|
|
|
4877
5142
|
}
|
|
4878
5143
|
var UIPIGNORE_FILENAME = ".uipignore";
|
|
4879
5144
|
function parseUipignore(body) {
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
5145
|
+
return body.split(/\r?\n/).filter((line) => line.trim() !== "" && !line.startsWith("#"));
|
|
5146
|
+
}
|
|
5147
|
+
function createUipignoreRules(baseDir, patterns) {
|
|
5148
|
+
const matcher = import_ignore.default().add([...patterns]);
|
|
5149
|
+
return {
|
|
5150
|
+
baseDir,
|
|
5151
|
+
patterns,
|
|
5152
|
+
ignores: (relativePath) => matcher.ignores(relativePath)
|
|
5153
|
+
};
|
|
5154
|
+
}
|
|
5155
|
+
var UNMATCHABLE_RELATIVE_PATH = /^\.+$|^\.*\//;
|
|
5156
|
+
function isIgnoredByRules(fs, rules, fullPath, isDirectory) {
|
|
5157
|
+
if (!rules) {
|
|
5158
|
+
return false;
|
|
5159
|
+
}
|
|
5160
|
+
for (const rule of rules) {
|
|
5161
|
+
const rel = fs.path.relative(rule.baseDir, fullPath).replace(/\\/g, "/");
|
|
5162
|
+
if (!rel || UNMATCHABLE_RELATIVE_PATH.test(rel) || fs.path.isAbsolute(rel)) {
|
|
4884
5163
|
continue;
|
|
4885
5164
|
}
|
|
4886
|
-
if (
|
|
4887
|
-
|
|
5165
|
+
if (rule.ignores(isDirectory ? `${rel}/` : rel)) {
|
|
5166
|
+
return true;
|
|
4888
5167
|
}
|
|
4889
|
-
names.add(line);
|
|
4890
5168
|
}
|
|
4891
|
-
return
|
|
5169
|
+
return false;
|
|
4892
5170
|
}
|
|
4893
5171
|
async function collectTree(fs, dir, options = {}) {
|
|
4894
5172
|
const files = [];
|
|
@@ -4911,12 +5189,12 @@ async function collectTree(fs, dir, options = {}) {
|
|
|
4911
5189
|
const fullPath = fs.path.join(current, entryName);
|
|
4912
5190
|
const entryStat = await fs.stat(fullPath);
|
|
4913
5191
|
if (entryStat?.isDirectory()) {
|
|
4914
|
-
if (excluded.has(entryName)) {
|
|
5192
|
+
if (excluded.has(entryName) || isIgnoredByRules(fs, options.ignoreRules, fullPath, true)) {
|
|
4915
5193
|
continue;
|
|
4916
5194
|
}
|
|
4917
5195
|
await walk(fullPath, false);
|
|
4918
5196
|
} else if (entryStat?.isFile()) {
|
|
4919
|
-
if (isDefaultExcludedFileName(entryName)) {
|
|
5197
|
+
if (isDefaultExcludedFileName(entryName) || isIgnoredByRules(fs, options.ignoreRules, fullPath, false)) {
|
|
4920
5198
|
continue;
|
|
4921
5199
|
}
|
|
4922
5200
|
files.push(fullPath);
|
|
@@ -5019,38 +5297,43 @@ function countCentralDirectoryEntries(view, cdOffset, cdSize) {
|
|
|
5019
5297
|
}
|
|
5020
5298
|
|
|
5021
5299
|
// ../solution-sdk/src/bundle-service.ts
|
|
5300
|
+
class UipignoreExcludesProjectError extends Error {
|
|
5301
|
+
projectManifestPath;
|
|
5302
|
+
constructor(projectManifestPath) {
|
|
5303
|
+
super(`${UIPIGNORE_FILENAME} excludes ${projectManifestPath}, which the solution references. A project listed in the .uipx cannot be left out of the bundle.`);
|
|
5304
|
+
this.projectManifestPath = projectManifestPath;
|
|
5305
|
+
this.name = "UipignoreExcludesProjectError";
|
|
5306
|
+
}
|
|
5307
|
+
}
|
|
5022
5308
|
async function readUipignore(fs, dir) {
|
|
5023
5309
|
const ignorePath = fs.path.join(dir, UIPIGNORE_FILENAME);
|
|
5024
5310
|
if (!await fs.exists(ignorePath)) {
|
|
5025
|
-
return
|
|
5311
|
+
return;
|
|
5026
5312
|
}
|
|
5027
5313
|
try {
|
|
5028
5314
|
const body = await fs.readFile(ignorePath, "utf-8");
|
|
5029
|
-
|
|
5030
|
-
|
|
5315
|
+
const patterns = body ? parseUipignore(body) : [];
|
|
5316
|
+
if (patterns.length === 0) {
|
|
5317
|
+
return;
|
|
5031
5318
|
}
|
|
5032
|
-
return
|
|
5319
|
+
return createUipignoreRules(dir, patterns);
|
|
5033
5320
|
} catch (err) {
|
|
5034
5321
|
logger.warn(`Could not read ${UIPIGNORE_FILENAME}; ignoring it: ${String(err)}`);
|
|
5035
|
-
return
|
|
5322
|
+
return;
|
|
5036
5323
|
}
|
|
5037
5324
|
}
|
|
5038
|
-
async function mergeProjectUipignore(fs, projectPath, projectLabel,
|
|
5039
|
-
const
|
|
5040
|
-
if (
|
|
5041
|
-
return
|
|
5325
|
+
async function mergeProjectUipignore(fs, projectPath, projectLabel, solutionRules) {
|
|
5326
|
+
const projectRules = await readUipignore(fs, projectPath);
|
|
5327
|
+
if (!projectRules) {
|
|
5328
|
+
return solutionRules;
|
|
5042
5329
|
}
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
merged.add(name);
|
|
5046
|
-
}
|
|
5047
|
-
logger.info(`[${projectLabel}] Applying ${projectExtra.size} extra exclude(s) from project ${UIPIGNORE_FILENAME}: ${[...projectExtra].join(", ")}`);
|
|
5048
|
-
return merged;
|
|
5330
|
+
logger.info(`[${projectLabel}] Applying ${projectRules.patterns.length} extra exclude(s) from project ${UIPIGNORE_FILENAME}: ${projectRules.patterns.join(", ")}`);
|
|
5331
|
+
return [...solutionRules, projectRules];
|
|
5049
5332
|
}
|
|
5050
5333
|
var toForwardSlash = (p) => p.replace(/\\/g, "/");
|
|
5051
|
-
async function mirrorTree(fs, srcDir, relativeBase, destBaseDir,
|
|
5334
|
+
async function mirrorTree(fs, srcDir, relativeBase, destBaseDir, ignoreRules) {
|
|
5052
5335
|
const { files, emptyDirs } = await collectTree(fs, srcDir, {
|
|
5053
|
-
|
|
5336
|
+
ignoreRules
|
|
5054
5337
|
});
|
|
5055
5338
|
if (files.length === 0 && emptyDirs.length === 0) {
|
|
5056
5339
|
const rootRel = fs.path.relative(relativeBase, srcDir);
|
|
@@ -5077,14 +5360,8 @@ async function mirrorTree(fs, srcDir, relativeBase, destBaseDir, additionalExclu
|
|
|
5077
5360
|
await fs.mkdir(fs.path.join(destBaseDir, relPath));
|
|
5078
5361
|
}
|
|
5079
5362
|
}
|
|
5080
|
-
async function flattenProjectDir(fs, srcProjectDir, destProjectDir,
|
|
5363
|
+
async function flattenProjectDir(fs, srcProjectDir, destProjectDir, ignoreRules) {
|
|
5081
5364
|
await fs.mkdir(destProjectDir);
|
|
5082
|
-
const topLevelExclude = new Set(DEFAULT_EXCLUDED_DIR_NAMES);
|
|
5083
|
-
if (additionalExcludeDirs) {
|
|
5084
|
-
for (const name of additionalExcludeDirs) {
|
|
5085
|
-
topLevelExclude.add(name);
|
|
5086
|
-
}
|
|
5087
|
-
}
|
|
5088
5365
|
const entries = await fs.readdir(srcProjectDir);
|
|
5089
5366
|
for (const entryName of entries) {
|
|
5090
5367
|
const srcPath = fs.path.join(srcProjectDir, entryName);
|
|
@@ -5093,7 +5370,7 @@ async function flattenProjectDir(fs, srcProjectDir, destProjectDir, additionalEx
|
|
|
5093
5370
|
continue;
|
|
5094
5371
|
}
|
|
5095
5372
|
if (entryStat.isFile()) {
|
|
5096
|
-
if (isDefaultExcludedFileName(entryName)) {
|
|
5373
|
+
if (isDefaultExcludedFileName(entryName) || isIgnoredByRules(fs, ignoreRules, srcPath, false)) {
|
|
5097
5374
|
continue;
|
|
5098
5375
|
}
|
|
5099
5376
|
const data = await fs.readFile(srcPath);
|
|
@@ -5101,13 +5378,13 @@ async function flattenProjectDir(fs, srcProjectDir, destProjectDir, additionalEx
|
|
|
5101
5378
|
await fs.writeFile(fs.path.join(destProjectDir, entryName), data);
|
|
5102
5379
|
}
|
|
5103
5380
|
} else if (entryStat.isDirectory()) {
|
|
5104
|
-
if (
|
|
5381
|
+
if (DEFAULT_EXCLUDED_DIR_NAMES.has(entryName) || isIgnoredByRules(fs, ignoreRules, srcPath, true)) {
|
|
5105
5382
|
continue;
|
|
5106
5383
|
}
|
|
5107
5384
|
if (entryName === "content" || entryName === "flow_files") {
|
|
5108
|
-
await mirrorTree(fs, srcPath, srcPath, destProjectDir,
|
|
5385
|
+
await mirrorTree(fs, srcPath, srcPath, destProjectDir, ignoreRules);
|
|
5109
5386
|
} else {
|
|
5110
|
-
await mirrorTree(fs, srcPath, srcProjectDir, destProjectDir,
|
|
5387
|
+
await mirrorTree(fs, srcPath, srcProjectDir, destProjectDir, ignoreRules);
|
|
5111
5388
|
}
|
|
5112
5389
|
}
|
|
5113
5390
|
}
|
|
@@ -5122,14 +5399,12 @@ async function bundleSolution(fs, solutionDir, outputDir, outputName) {
|
|
|
5122
5399
|
throw new Error(`Not a directory: ${resolvedPath}. Provide the solution directory containing a .uipx file.`);
|
|
5123
5400
|
}
|
|
5124
5401
|
const { uipx, uipxFileName } = await readUipxFile(fs, resolvedPath);
|
|
5125
|
-
const
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
const effectiveExclude = new Set(DEFAULT_EXCLUDED_DIR_NAMES);
|
|
5130
|
-
for (const name of additionalExcludeDirs) {
|
|
5131
|
-
effectiveExclude.add(name);
|
|
5402
|
+
const solutionUipignore = await readUipignore(fs, resolvedPath);
|
|
5403
|
+
const solutionRules = solutionUipignore ? [solutionUipignore] : [];
|
|
5404
|
+
if (solutionUipignore) {
|
|
5405
|
+
logger.info(`Applying ${solutionUipignore.patterns.length} extra exclude(s) from ${UIPIGNORE_FILENAME}: ${solutionUipignore.patterns.join(", ")}`);
|
|
5132
5406
|
}
|
|
5407
|
+
const isTopLevelTreeExcluded = (treePath, name) => DEFAULT_EXCLUDED_DIR_NAMES.has(name) || isIgnoredByRules(fs, solutionRules, treePath, true);
|
|
5133
5408
|
for (const project of uipx.Projects) {
|
|
5134
5409
|
project.ProjectRelativePath = toForwardSlash(project.ProjectRelativePath);
|
|
5135
5410
|
}
|
|
@@ -5154,16 +5429,20 @@ async function bundleSolution(fs, solutionDir, outputDir, outputName) {
|
|
|
5154
5429
|
if (!projectStat) {
|
|
5155
5430
|
throw new Error(`Project directory not found: ${srcProjectPath}`);
|
|
5156
5431
|
}
|
|
5157
|
-
const
|
|
5158
|
-
|
|
5432
|
+
const projectRules = await mergeProjectUipignore(fs, srcProjectPath, projectDir, solutionRules);
|
|
5433
|
+
const manifestPath = fs.path.join(resolvedPath, project.ProjectRelativePath);
|
|
5434
|
+
if (isIgnoredByRules(fs, projectRules, manifestPath, false)) {
|
|
5435
|
+
throw new UipignoreExcludesProjectError(project.ProjectRelativePath);
|
|
5436
|
+
}
|
|
5437
|
+
await flattenProjectDir(fs, srcProjectPath, fs.path.join(stagingDir, projectDir), projectRules);
|
|
5159
5438
|
}
|
|
5160
5439
|
const resourcesPath = fs.path.join(resolvedPath, "resources");
|
|
5161
|
-
if (!
|
|
5162
|
-
await mirrorTree(fs, resourcesPath, resolvedPath, stagingDir,
|
|
5440
|
+
if (!isTopLevelTreeExcluded(resourcesPath, "resources") && await fs.exists(resourcesPath)) {
|
|
5441
|
+
await mirrorTree(fs, resourcesPath, resolvedPath, stagingDir, solutionRules);
|
|
5163
5442
|
}
|
|
5164
5443
|
const userProfilePath = fs.path.join(resolvedPath, "userProfile");
|
|
5165
|
-
if (!
|
|
5166
|
-
await mirrorTree(fs, userProfilePath, resolvedPath, stagingDir,
|
|
5444
|
+
if (!isTopLevelTreeExcluded(userProfilePath, "userProfile") && await fs.exists(userProfilePath)) {
|
|
5445
|
+
await mirrorTree(fs, userProfilePath, resolvedPath, stagingDir, solutionRules);
|
|
5167
5446
|
}
|
|
5168
5447
|
const resolvedOutputDir = fs.path.resolve(outputDir);
|
|
5169
5448
|
if (!await fs.exists(resolvedOutputDir)) {
|
|
@@ -5835,6 +6114,7 @@ export {
|
|
|
5835
6114
|
SolutionUploadHttpError,
|
|
5836
6115
|
StudioWebIncompatibleProjectError,
|
|
5837
6116
|
TextApiResponse,
|
|
6117
|
+
UipignoreExcludesProjectError,
|
|
5838
6118
|
VoidApiResponse,
|
|
5839
6119
|
WorkflowAction,
|
|
5840
6120
|
WorkflowActionFromJSON,
|
|
@@ -5930,4 +6210,4 @@ export {
|
|
|
5930
6210
|
uploadOrOverwriteSolution
|
|
5931
6211
|
};
|
|
5932
6212
|
|
|
5933
|
-
//# debugId=
|
|
6213
|
+
//# debugId=BFCA1C03A647D02864756E2164756E21
|
package/dist/tool.js
CHANGED
|
@@ -26,7 +26,7 @@ var package_default = {
|
|
|
26
26
|
name: "@uipath/function-tool",
|
|
27
27
|
author: "UiPath",
|
|
28
28
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
29
|
-
version: "1.204.0-preview.
|
|
29
|
+
version: "1.204.0-preview.255",
|
|
30
30
|
description: "UiPath CLI tool for JS/TS and Python Functions — thin passthrough to uipath-functions / uipath",
|
|
31
31
|
keywords: [
|
|
32
32
|
"uipcli-tool",
|
|
@@ -592,7 +592,7 @@ async function dispatch(rawArgs) {
|
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
async function reportSolutionRegistration(projectDir, skipSolutionRegistration) {
|
|
595
|
-
const { tryRegisterProjectInParentSolution } = await import("./index-
|
|
595
|
+
const { tryRegisterProjectInParentSolution } = await import("./index-7z0xbffa.js");
|
|
596
596
|
const registration = await tryRegisterProjectInParentSolution(fs5, projectDir, {
|
|
597
597
|
skipRegistration: skipSolutionRegistration
|
|
598
598
|
});
|
|
@@ -775,4 +775,4 @@ export {
|
|
|
775
775
|
registerCommands
|
|
776
776
|
};
|
|
777
777
|
|
|
778
|
-
//# debugId=
|
|
778
|
+
//# debugId=87C5E110F88A867764756E2164756E21
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/function-tool",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.204.0-preview.
|
|
5
|
+
"version": "1.204.0-preview.255",
|
|
6
6
|
"description": "UiPath CLI tool for JS/TS and Python Functions — thin passthrough to uipath-functions / uipath",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uipcli-tool",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"typescript": "^5.7.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "699c58dabb59414557755a8933bcbe40aa420df3"
|
|
39
39
|
}
|