@uipath/cli 1.206.0-preview.303 → 1.207.0-preview.305
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 +48 -0
- package/dist/{browser-strategy-p5fhwxqj.js → browser-strategy-5rfwnk5q.js} +1 -1
- package/dist/cli-10857d67.js +28 -0
- package/dist/cliInstaller-3dxg6fbd.js +23 -0
- package/dist/{contentStore-w35jnkxk.js → contentStore-z3t1yt3n.js} +7 -6
- package/dist/{environmentInfo-nz3126q4.js → environmentInfo-dyhpheza.js} +6 -6
- package/dist/{feedbackPrompts-bx209g5v.js → feedbackPrompts-fc66gq0p.js} +3 -3
- package/dist/forcedUpdate-5hd8cp9x.js +21 -0
- package/dist/{handlers-jjwt24f2.js → handlers-rg3d62gb.js} +13 -9
- package/dist/index-2f6vv7yr.js +81 -0
- package/dist/{index-v3vx48v0.js → index-2g332j2f.js} +8 -12
- package/dist/index-319vtrwd.js +264 -0
- package/dist/{index-jqt7p70w.js → index-3vkb4j13.js} +26 -17
- package/dist/index-5j78gm9c.js +41 -0
- package/dist/index-5ygg5mrs.js +1272 -0
- package/dist/{index-99emfvtm.js → index-65pyx6c9.js} +4 -2
- package/dist/{index-rr5hdtcy.js → index-81197qe5.js} +15 -17
- package/dist/{index-2mm750yx.js → index-8n0z4r6f.js} +69 -13
- package/dist/{index-8zhmg5tz.js → index-8pk6n4t9.js} +2 -2
- package/dist/{index-cef72dzy.js → index-9v7334md.js} +1 -1
- package/dist/{index-nsrrst23.js → index-ack311y7.js} +12 -2
- package/dist/{index-2n2vr5w5.js → index-dt6mjnkf.js} +39 -57
- package/dist/{index-y7d0cth0.js → index-e82sznr2.js} +7 -7
- package/dist/index-ej6eeger.js +23 -0
- package/dist/index-evcsjfyy.js +248 -0
- package/dist/{index-bxc30q35.js → index-gk5pc8xr.js} +2 -2
- package/dist/{index-7q9kcs3w.js → index-h2ctqv68.js} +14 -5
- package/dist/index-jk7em40j.js +37 -0
- package/dist/{index-vhn8f5d2.js → index-kdr4xvby.js} +5 -5
- package/dist/{index-y7j0ant5.js → index-kmacaa53.js} +2130 -834
- package/dist/{index-ckp8r4dh.js → index-mb62swmp.js} +2 -2
- package/dist/{index-dxfqvgqg.js → index-md27nny8.js} +7 -10
- package/dist/{index-85fa5z1t.js → index-nex3q8cg.js} +2 -2
- package/dist/index-nyx7fh45.js +331 -0
- package/dist/index-nzfpbep9.js +14 -0
- package/dist/{index-z070caqq.js → index-p64w2wrt.js} +30 -8
- package/dist/{index-0pan2k7w.js → index-t6hrzpm7.js} +30 -14
- package/dist/index-v7yphxb8.js +118 -0
- package/dist/index-vrfbee4d.js +340 -0
- package/dist/{index-69mcde3n.js → index-xw81b1gn.js} +196 -81
- package/dist/{index-wg3cne7n.js → index-xxms6rt8.js} +24 -5
- package/dist/{index-21kns9qg.js → index-y7v9rkq9.js} +1 -1
- package/dist/{index-6wzpac34.js → index-z3q16ts7.js} +81 -58
- package/dist/{index-fdztq951.js → index-zhp702kh.js} +393 -82
- package/dist/index.js +23 -18
- package/dist/{install-kgcwdbqs.js → install-h76qyy1e.js} +6 -7
- package/dist/{node-strategy-p1n8wr5s.js → node-strategy-9t0ttffv.js} +2 -2
- package/dist/{project-context-caht70an.js → project-context-rc4ghykm.js} +13 -5
- package/dist/{prompt-tvxwpvxh.js → prompt-66bnttv7.js} +5 -5
- package/dist/{server-pge2gheb.js → server-pxfn9w9m.js} +5 -5
- package/dist/{skillCatalog-b3z68z4n.js → skillCatalog-7gh14b4s.js} +8 -7
- package/dist/skillsService-wz3c21qb.js +35 -0
- package/dist/{telemetry-drain-rt346cfz.js → telemetry-drain-8qr5tzmf.js} +2 -2
- package/dist/tree-fk9gwh4v.js +16 -0
- package/dist/updateService-ybs9274t.js +377 -0
- package/dist/updateService.cli-xtqp78g7.js +15 -0
- package/dist/updateService.skills-pgst1fyj.js +27 -0
- package/dist/updateService.tools-m58m2fbt.js +19 -0
- package/package.json +2 -2
- package/dist/cli-0p8c9t5r.js +0 -23
- package/dist/index-1n5v3afn.js +0 -45
- package/dist/index-3qp7d08f.js +0 -240
- package/dist/index-3zf0ywpb.js +0 -95
- package/dist/index-753mncpq.js +0 -271
- package/dist/skillsService-qzzqacmg.js +0 -29
- package/dist/tree-4dhk82fh.js +0 -17
- package/dist/updateService-b579ys6m.js +0 -522
- package/dist/updateService.skills-teejc562.js +0 -22
- package/dist/updateService.tools-3zfct9yk.js +0 -16
package/dist/index-753mncpq.js
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
catchError,
|
|
3
|
-
logger,
|
|
4
|
-
OUTPUT_FORMATS,
|
|
5
|
-
UIPATH_HOME_DIR,
|
|
6
|
-
CONFIG_FILENAME
|
|
7
|
-
} from "./index-fdztq951.js";
|
|
8
|
-
import {
|
|
9
|
-
string,
|
|
10
|
-
array,
|
|
11
|
-
object,
|
|
12
|
-
_enum
|
|
13
|
-
} from "./index-bf0e4evz.js";
|
|
14
|
-
|
|
15
|
-
// src/services/channels.ts
|
|
16
|
-
var CHANNELS = ["stable", "preview", "dev"];
|
|
17
|
-
var VALID_CHANNELS = new Set(CHANNELS);
|
|
18
|
-
var HIDDEN_CHANNELS = ["dev"];
|
|
19
|
-
var PUBLIC_CHANNELS = CHANNELS.filter((channel) => !HIDDEN_CHANNELS.includes(channel));
|
|
20
|
-
var CHANNEL_PLACEHOLDER = `<${PUBLIC_CHANNELS.join("|")}>`;
|
|
21
|
-
|
|
22
|
-
// src/config/configLock.ts
|
|
23
|
-
import { randomUUID } from "node:crypto";
|
|
24
|
-
async function withConfigLock(targetPath, fn) {
|
|
25
|
-
const { getFileSystemAsync } = await import("./index-21kns9qg.js");
|
|
26
|
-
const fs = await getFileSystemAsync();
|
|
27
|
-
const dir = fs.path.dirname(targetPath);
|
|
28
|
-
const [mkdirErr] = await catchError(fs.mkdir(dir));
|
|
29
|
-
if (mkdirErr) {
|
|
30
|
-
throw new Error(`Could not create config directory ${dir}: ${mkdirErr.message}`);
|
|
31
|
-
}
|
|
32
|
-
const release = await fs.acquireLock(targetPath);
|
|
33
|
-
try {
|
|
34
|
-
return await fn();
|
|
35
|
-
} finally {
|
|
36
|
-
await catchError(release());
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
async function readConfigFileAt(path) {
|
|
40
|
-
const { getFileSystem } = await import("./index-21kns9qg.js");
|
|
41
|
-
const fs = getFileSystem();
|
|
42
|
-
if (!await fs.exists(path)) {
|
|
43
|
-
return {};
|
|
44
|
-
}
|
|
45
|
-
const content = await fs.readFile(path, "utf-8");
|
|
46
|
-
if (content === null) {
|
|
47
|
-
return {};
|
|
48
|
-
}
|
|
49
|
-
const parsed = JSON.parse(content);
|
|
50
|
-
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
51
|
-
return {};
|
|
52
|
-
}
|
|
53
|
-
return parsed;
|
|
54
|
-
}
|
|
55
|
-
async function writeConfigFileAt(path, config) {
|
|
56
|
-
const { getFileSystem } = await import("./index-21kns9qg.js");
|
|
57
|
-
const fs = getFileSystem();
|
|
58
|
-
const dir = fs.path.dirname(path);
|
|
59
|
-
await fs.mkdir(dir);
|
|
60
|
-
const tempPath = `${path}.${randomUUID()}.tmp`;
|
|
61
|
-
await fs.writeFile(tempPath, JSON.stringify(config, null, 4));
|
|
62
|
-
const [renameErr] = await catchError(fs.rename(tempPath, path));
|
|
63
|
-
if (renameErr) {
|
|
64
|
-
await catchError(fs.rm(tempPath));
|
|
65
|
-
throw renameErr;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// src/config/loadConfig.ts
|
|
70
|
-
var VERSION_PIN_RE = /^(\d+)\.(\d+)(?:\.(\d+))?$/;
|
|
71
|
-
var ConfigSchema = object({
|
|
72
|
-
core: object({
|
|
73
|
-
output: _enum(OUTPUT_FORMATS).optional(),
|
|
74
|
-
logLevel: _enum(["error", "warn", "info", "debug"]).optional(),
|
|
75
|
-
interactive: _enum(["never", "auto", "always"]).optional(),
|
|
76
|
-
updateChannel: _enum(CHANNELS).optional(),
|
|
77
|
-
version: string().regex(VERSION_PIN_RE, "must be major.minor or major.minor.patch (e.g. 1.2 or 1.2.3)").optional()
|
|
78
|
-
}).optional(),
|
|
79
|
-
auth: object({
|
|
80
|
-
scopes: array(string().min(1)).optional(),
|
|
81
|
-
authority: string().url().optional()
|
|
82
|
-
}).optional()
|
|
83
|
-
});
|
|
84
|
-
var formatZodError = (error) => {
|
|
85
|
-
const issues = error.issues.map((issue) => {
|
|
86
|
-
const path = issue.path.join(".") || "config";
|
|
87
|
-
let message = issue.message;
|
|
88
|
-
if (message.includes("Required")) {
|
|
89
|
-
message = "is required";
|
|
90
|
-
} else if (message.includes("Expected string")) {
|
|
91
|
-
message = "must be a string";
|
|
92
|
-
} else if (message.includes("Invalid url")) {
|
|
93
|
-
message = "must be a valid URL";
|
|
94
|
-
} else if (message.includes("String must contain at least 1 character")) {
|
|
95
|
-
message = "cannot be empty";
|
|
96
|
-
}
|
|
97
|
-
return ` • ${path}: ${message}`;
|
|
98
|
-
});
|
|
99
|
-
return `Configuration validation failed:
|
|
100
|
-
` + issues.join(`
|
|
101
|
-
`) + `
|
|
102
|
-
|
|
103
|
-
Please check your config file and fix the errors above.`;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
class ConfigValidationError extends Error {
|
|
107
|
-
constructor(message) {
|
|
108
|
-
super(message);
|
|
109
|
-
this.name = "ConfigValidationError";
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
var validateConfig = (parsed) => {
|
|
113
|
-
const result = ConfigSchema.safeParse(parsed);
|
|
114
|
-
if (!result.success) {
|
|
115
|
-
throw new ConfigValidationError(formatZodError(result.error));
|
|
116
|
-
}
|
|
117
|
-
return result.data;
|
|
118
|
-
};
|
|
119
|
-
var CREDENTIAL_AUTH_KEYS = ["clientId", "clientSecret"];
|
|
120
|
-
var LEGACY_TOOLS_KEYS = ["registryUrl", "localToolPaths"];
|
|
121
|
-
var CLEANUP_BLOCKS = [
|
|
122
|
-
["auth", CREDENTIAL_AUTH_KEYS],
|
|
123
|
-
["tools", LEGACY_TOOLS_KEYS]
|
|
124
|
-
];
|
|
125
|
-
var hasKeysIn = (parsed, block, keys) => {
|
|
126
|
-
const blockConfig = parsed?.[block];
|
|
127
|
-
return typeof blockConfig === "object" && blockConfig !== null && keys.some((key) => (key in blockConfig));
|
|
128
|
-
};
|
|
129
|
-
var cachedConfig = null;
|
|
130
|
-
var deleteKeysFrom = async (absolutePath, blocks) => {
|
|
131
|
-
await withConfigLock(absolutePath, async () => {
|
|
132
|
-
const fileConfig = await readConfigFileAt(absolutePath);
|
|
133
|
-
const blocksWithKeys = blocks.filter(([block, keys]) => hasKeysIn(fileConfig, block, keys));
|
|
134
|
-
if (blocksWithKeys.length === 0)
|
|
135
|
-
return;
|
|
136
|
-
for (const [block, keys] of blocksWithKeys) {
|
|
137
|
-
const blockConfig = fileConfig[block];
|
|
138
|
-
for (const key of keys)
|
|
139
|
-
delete blockConfig[key];
|
|
140
|
-
if (Object.keys(blockConfig).length === 0)
|
|
141
|
-
delete fileConfig[block];
|
|
142
|
-
}
|
|
143
|
-
await writeConfigFileAt(absolutePath, fileConfig);
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
var cleanUpConfigKeys = async (parsed, absolutePath) => {
|
|
147
|
-
const blocksWithKeys = CLEANUP_BLOCKS.filter(([block, keys]) => hasKeysIn(parsed, block, keys));
|
|
148
|
-
if (blocksWithKeys.length === 0)
|
|
149
|
-
return;
|
|
150
|
-
const [removeErr] = await catchError(deleteKeysFrom(absolutePath, blocksWithKeys));
|
|
151
|
-
if (removeErr) {
|
|
152
|
-
const paths = blocksWithKeys.flatMap(([block, keys]) => keys.map((key) => `${block}.${key}`));
|
|
153
|
-
logger.debug(`Could not remove ${paths.join(" / ")}: ${removeErr.message}`);
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
var getCachedConfig = () => cachedConfig ?? {};
|
|
157
|
-
var getFs = async () => {
|
|
158
|
-
const { getFileSystemAsync } = await import("./index-21kns9qg.js");
|
|
159
|
-
return getFileSystemAsync();
|
|
160
|
-
};
|
|
161
|
-
var LOCAL_CONFIG_REL = `${UIPATH_HOME_DIR}/${CONFIG_FILENAME}`;
|
|
162
|
-
var resolveConfigFilePathAsync = async (explicitPath) => {
|
|
163
|
-
const fs = await getFs();
|
|
164
|
-
if (explicitPath !== undefined) {
|
|
165
|
-
const absolutePath = fs.path.resolve(fs.env.cwd(), explicitPath);
|
|
166
|
-
const fileExists = await fs.exists(absolutePath);
|
|
167
|
-
return {
|
|
168
|
-
absolutePath,
|
|
169
|
-
exists: fileExists,
|
|
170
|
-
source: "explicit",
|
|
171
|
-
errorMessage: fileExists ? undefined : `Config file not found: ${absolutePath}`
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
const homeDir = fs.env.homedir();
|
|
175
|
-
let searchDir = fs.env.cwd();
|
|
176
|
-
while (searchDir !== homeDir) {
|
|
177
|
-
const candidate = fs.path.join(searchDir, LOCAL_CONFIG_REL);
|
|
178
|
-
if (await fs.exists(candidate)) {
|
|
179
|
-
return { absolutePath: candidate, exists: true, source: "local" };
|
|
180
|
-
}
|
|
181
|
-
const parent = fs.path.dirname(searchDir);
|
|
182
|
-
if (parent === searchDir) {
|
|
183
|
-
break;
|
|
184
|
-
}
|
|
185
|
-
searchDir = parent;
|
|
186
|
-
}
|
|
187
|
-
const globalPath = fs.path.join(homeDir, UIPATH_HOME_DIR, CONFIG_FILENAME);
|
|
188
|
-
if (await fs.exists(globalPath)) {
|
|
189
|
-
return { absolutePath: globalPath, exists: true, source: "global" };
|
|
190
|
-
}
|
|
191
|
-
return { absolutePath: undefined, exists: false, source: "none" };
|
|
192
|
-
};
|
|
193
|
-
var loadConfigAsync = async () => {
|
|
194
|
-
if (cachedConfig) {
|
|
195
|
-
return cachedConfig;
|
|
196
|
-
}
|
|
197
|
-
const fs = await getFs();
|
|
198
|
-
const { absolutePath, exists: fileExists } = await resolveConfigFilePathAsync();
|
|
199
|
-
if (!absolutePath || !fileExists) {
|
|
200
|
-
cachedConfig = {};
|
|
201
|
-
return cachedConfig;
|
|
202
|
-
}
|
|
203
|
-
const [readErr, content] = await catchError(fs.readFile(absolutePath, "utf-8"));
|
|
204
|
-
if (readErr) {
|
|
205
|
-
logger.warn(`Failed to load config from ${absolutePath}:`, readErr.message);
|
|
206
|
-
cachedConfig = {};
|
|
207
|
-
return cachedConfig;
|
|
208
|
-
}
|
|
209
|
-
if (content === null) {
|
|
210
|
-
cachedConfig = {};
|
|
211
|
-
return cachedConfig;
|
|
212
|
-
}
|
|
213
|
-
const [parseErr, parsed] = await catchError(Promise.resolve().then(() => JSON.parse(content)));
|
|
214
|
-
if (parseErr) {
|
|
215
|
-
if (parseErr instanceof SyntaxError) {
|
|
216
|
-
throw new Error(`Invalid JSON in config file: ${absolutePath}
|
|
217
|
-
Error: ${parseErr.message}
|
|
218
|
-
|
|
219
|
-
Please ensure your config file contains valid JSON.`);
|
|
220
|
-
}
|
|
221
|
-
throw parseErr;
|
|
222
|
-
}
|
|
223
|
-
await cleanUpConfigKeys(parsed, absolutePath);
|
|
224
|
-
cachedConfig = validateConfig(parsed);
|
|
225
|
-
return cachedConfig;
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
// src/services/versionPin.ts
|
|
229
|
-
function isValidVersionPin(raw) {
|
|
230
|
-
return VERSION_PIN_RE.test(raw.trim());
|
|
231
|
-
}
|
|
232
|
-
function parseVersionPin(raw) {
|
|
233
|
-
if (raw === undefined)
|
|
234
|
-
return null;
|
|
235
|
-
const match = VERSION_PIN_RE.exec(raw.trim());
|
|
236
|
-
if (!match)
|
|
237
|
-
return null;
|
|
238
|
-
const pin = {
|
|
239
|
-
major: Number(match[1]),
|
|
240
|
-
minor: Number(match[2])
|
|
241
|
-
};
|
|
242
|
-
if (match[3] !== undefined)
|
|
243
|
-
pin.patch = Number(match[3]);
|
|
244
|
-
return pin;
|
|
245
|
-
}
|
|
246
|
-
function majorOf(version) {
|
|
247
|
-
const [rawMajor] = version.trim().split(/[.\-+]/);
|
|
248
|
-
if (rawMajor === undefined || !/^\d+$/.test(rawMajor))
|
|
249
|
-
return null;
|
|
250
|
-
return Number(rawMajor);
|
|
251
|
-
}
|
|
252
|
-
function resolvePinnedVersion() {
|
|
253
|
-
return parseVersionPin(getCachedConfig().core?.version);
|
|
254
|
-
}
|
|
255
|
-
function isExactPin(pin) {
|
|
256
|
-
return pin.patch !== undefined;
|
|
257
|
-
}
|
|
258
|
-
function pinnedPrefix(pin) {
|
|
259
|
-
return `${pin.major}.${pin.minor}.`;
|
|
260
|
-
}
|
|
261
|
-
function versionLinePrefix(version) {
|
|
262
|
-
const [major, minor] = version.split(".");
|
|
263
|
-
return `${major}.${minor}.`;
|
|
264
|
-
}
|
|
265
|
-
function formatVersionPin(pin) {
|
|
266
|
-
return isExactPin(pin) ? `${pin.major}.${pin.minor}.${pin.patch}` : `${pin.major}.${pin.minor}`;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export { VALID_CHANNELS, HIDDEN_CHANNELS, PUBLIC_CHANNELS, CHANNEL_PLACEHOLDER, withConfigLock, readConfigFileAt, writeConfigFileAt, getCachedConfig, resolveConfigFilePathAsync, loadConfigAsync, isValidVersionPin, majorOf, resolvePinnedVersion, isExactPin, pinnedPrefix, versionLinePrefix, formatVersionPin };
|
|
270
|
-
|
|
271
|
-
//# debugId=80E9FBD5B9D5F2D564756E2164756E21
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SkillsError2,
|
|
3
|
-
resolveSkillsTargetVersion2,
|
|
4
|
-
resolveRootDir2,
|
|
5
|
-
resolveSkillsContext2,
|
|
6
|
-
runAgentInstalls2,
|
|
7
|
-
cleanupStaleSkills2
|
|
8
|
-
} from "./index-jqt7p70w.js";
|
|
9
|
-
import"./index-cef72dzy.js";
|
|
10
|
-
import"./index-dxfqvgqg.js";
|
|
11
|
-
import"./index-6wzpac34.js";
|
|
12
|
-
import"./index-5j0bfd3e.js";
|
|
13
|
-
import"./index-v3vx48v0.js";
|
|
14
|
-
import"./index-753mncpq.js";
|
|
15
|
-
import"./index-ckp8r4dh.js";
|
|
16
|
-
import"./index-3zf0ywpb.js";
|
|
17
|
-
import"./index-fdztq951.js";
|
|
18
|
-
import"./index-5gce5wfd.js";
|
|
19
|
-
import"./index-z070caqq.js";
|
|
20
|
-
export {
|
|
21
|
-
SkillsError2 as SkillsError,
|
|
22
|
-
cleanupStaleSkills2 as cleanupStaleSkills,
|
|
23
|
-
resolveRootDir2 as resolveRootDir,
|
|
24
|
-
resolveSkillsContext2 as resolveSkillsContext,
|
|
25
|
-
resolveSkillsTargetVersion2 as resolveSkillsTargetVersion,
|
|
26
|
-
runAgentInstalls2 as runAgentInstalls
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
//# debugId=FA2B101A9519EB6A64756E2164756E21
|
package/dist/tree-4dhk82fh.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildFullTree2,
|
|
3
|
-
detectShell2,
|
|
4
|
-
posixSq2
|
|
5
|
-
} from "./index-bxc30q35.js";
|
|
6
|
-
import"./index-vhn8f5d2.js";
|
|
7
|
-
import"./index-69mcde3n.js";
|
|
8
|
-
import"./index-3zf0ywpb.js";
|
|
9
|
-
import"./index-fdztq951.js";
|
|
10
|
-
import"./index-z070caqq.js";
|
|
11
|
-
export {
|
|
12
|
-
buildFullTree2 as buildFullTree,
|
|
13
|
-
detectShell2 as detectShell,
|
|
14
|
-
posixSq2 as posixSq
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//# debugId=49197A71494E482D64756E2164756E21
|