@uipath/cli 1.198.0-preview.87 → 1.198.0-preview.90
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/index.browser.js +1994 -1994
- package/dist/index.js +255 -31
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -68775,6 +68775,22 @@ async function readStdin() {
|
|
|
68775
68775
|
process.stdin.on("error", reject);
|
|
68776
68776
|
});
|
|
68777
68777
|
}
|
|
68778
|
+
async function readStdinWithTimeout(timeoutMs) {
|
|
68779
|
+
let timer;
|
|
68780
|
+
const timeout = new Promise((resolve2) => {
|
|
68781
|
+
timer = setTimeout(() => {
|
|
68782
|
+
process.stdin.unref?.();
|
|
68783
|
+
resolve2(null);
|
|
68784
|
+
}, timeoutMs);
|
|
68785
|
+
});
|
|
68786
|
+
try {
|
|
68787
|
+
return await Promise.race([readStdin(), timeout]);
|
|
68788
|
+
} finally {
|
|
68789
|
+
if (timer) {
|
|
68790
|
+
clearTimeout(timer);
|
|
68791
|
+
}
|
|
68792
|
+
}
|
|
68793
|
+
}
|
|
68778
68794
|
// ../common/src/telemetry/ship-succeeded.ts
|
|
68779
68795
|
var shippedKeysSlot;
|
|
68780
68796
|
var init_ship_succeeded = __esm(() => {
|
|
@@ -68838,7 +68854,7 @@ var init_package = __esm(() => {
|
|
|
68838
68854
|
package_default = {
|
|
68839
68855
|
name: "@uipath/cli",
|
|
68840
68856
|
license: "MIT",
|
|
68841
|
-
version: "1.198.0-preview.
|
|
68857
|
+
version: "1.198.0-preview.90",
|
|
68842
68858
|
description: "Cross platform CLI for UiPath",
|
|
68843
68859
|
repository: {
|
|
68844
68860
|
type: "git",
|
|
@@ -125166,6 +125182,7 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
125166
125182
|
return uriTokens.join("");
|
|
125167
125183
|
}
|
|
125168
125184
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
125185
|
+
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
125169
125186
|
function getParseError(parsed, matches) {
|
|
125170
125187
|
if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
|
|
125171
125188
|
return 'URI path must start with "/" when authority is present.';
|
|
@@ -125195,6 +125212,11 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
125195
125212
|
uri = "//" + uri;
|
|
125196
125213
|
}
|
|
125197
125214
|
}
|
|
125215
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
125216
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
125217
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
125218
|
+
malformedAuthorityOrPort = true;
|
|
125219
|
+
}
|
|
125198
125220
|
const matches = uri.match(URI_PARSE);
|
|
125199
125221
|
if (matches) {
|
|
125200
125222
|
parsed.scheme = matches[1];
|
|
@@ -125238,7 +125260,7 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
125238
125260
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
125239
125261
|
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
125240
125262
|
try {
|
|
125241
|
-
parsed.host = URL
|
|
125263
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
125242
125264
|
} catch (e) {
|
|
125243
125265
|
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
125244
125266
|
}
|
|
@@ -130326,15 +130348,87 @@ async function reviewFeedback(draft, email3, attachmentCount, context) {
|
|
|
130326
130348
|
const result = await confirmFeedback({ ...draft, slackThreadUrl }, { email: email3, attachmentCount }, (message) => context.output.writeErr(message));
|
|
130327
130349
|
return result.action === "send" ? result.draft : undefined;
|
|
130328
130350
|
}
|
|
130351
|
+
function validationError(message, instructions) {
|
|
130352
|
+
return {
|
|
130353
|
+
Result: RESULTS.ValidationError,
|
|
130354
|
+
Message: message,
|
|
130355
|
+
Instructions: instructions
|
|
130356
|
+
};
|
|
130357
|
+
}
|
|
130358
|
+
async function readRawDescription(options) {
|
|
130359
|
+
if (options.description !== undefined && options.descriptionFile !== undefined) {
|
|
130360
|
+
return {
|
|
130361
|
+
error: validationError("Both --description and --description-file were provided.", "Pass the description through exactly one of --description, --description-file, or stdin.")
|
|
130362
|
+
};
|
|
130363
|
+
}
|
|
130364
|
+
if (options.description !== undefined) {
|
|
130365
|
+
return { text: options.description, source: "--description" };
|
|
130366
|
+
}
|
|
130367
|
+
if (options.descriptionFile !== undefined) {
|
|
130368
|
+
return readDescriptionFile(options.descriptionFile);
|
|
130369
|
+
}
|
|
130370
|
+
const [readError, piped] = await catchError(readStdinWithTimeout(STDIN_READ_TIMEOUT_MS));
|
|
130371
|
+
if (readError) {
|
|
130372
|
+
return {
|
|
130373
|
+
error: validationError("Could not read description from stdin.", readError.message)
|
|
130374
|
+
};
|
|
130375
|
+
}
|
|
130376
|
+
if (piped !== null) {
|
|
130377
|
+
return { text: piped, source: "stdin" };
|
|
130378
|
+
}
|
|
130379
|
+
return {
|
|
130380
|
+
error: validationError("A description is required.", "Provide --description <text>, --description-file <path>, or pipe the body via stdin.")
|
|
130381
|
+
};
|
|
130382
|
+
}
|
|
130383
|
+
async function readDescriptionFile(filePath) {
|
|
130384
|
+
const fs7 = getFileSystem();
|
|
130385
|
+
if (!await fs7.exists(filePath)) {
|
|
130386
|
+
return {
|
|
130387
|
+
error: validationError(`Description file not found: "${filePath}"`, "Check the file path and try again.")
|
|
130388
|
+
};
|
|
130389
|
+
}
|
|
130390
|
+
const [readError, content] = await catchError(fs7.readFile(filePath, "utf-8"));
|
|
130391
|
+
if (readError || content === null) {
|
|
130392
|
+
return {
|
|
130393
|
+
error: validationError(`Could not read description file: "${filePath}"`, readError?.message ?? "Check that the file is readable and try again.")
|
|
130394
|
+
};
|
|
130395
|
+
}
|
|
130396
|
+
return { text: content, source: `--description-file "${filePath}"` };
|
|
130397
|
+
}
|
|
130398
|
+
async function resolveDescription(options) {
|
|
130399
|
+
const raw = await readRawDescription(options);
|
|
130400
|
+
if ("error" in raw) {
|
|
130401
|
+
return raw;
|
|
130402
|
+
}
|
|
130403
|
+
const description = raw.text.trim();
|
|
130404
|
+
if (description.length === 0) {
|
|
130405
|
+
return {
|
|
130406
|
+
error: validationError(`The description from ${raw.source} is empty.`, "Provide a non-empty description body.")
|
|
130407
|
+
};
|
|
130408
|
+
}
|
|
130409
|
+
const byteLength = Buffer.byteLength(description, "utf8");
|
|
130410
|
+
if (byteLength > MAX_DESCRIPTION_BYTES) {
|
|
130411
|
+
return {
|
|
130412
|
+
error: validationError(`The description from ${raw.source} is too large (${byteLength} bytes; max ${MAX_DESCRIPTION_BYTES}).`, "Shorten the description body and try again.")
|
|
130413
|
+
};
|
|
130414
|
+
}
|
|
130415
|
+
return { description };
|
|
130416
|
+
}
|
|
130329
130417
|
function registerFeedbackCommand(program2, context) {
|
|
130330
130418
|
const feedback = program2.command("feedback").description("Send bug reports and improvement suggestions");
|
|
130331
|
-
feedback.command("send").description("Send feedback (bug report or improvement suggestion) to the UiPath team").requiredOption("--type <type>", "Feedback type: bug or improvement").requiredOption("--title <title>", "Issue title / summary").
|
|
130419
|
+
feedback.command("send").description("Send feedback (bug report or improvement suggestion) to the UiPath team. Provide the description body via exactly one of --description, --description-file, or stdin.").requiredOption("--type <type>", "Feedback type: bug or improvement").requiredOption("--title <title>", "Issue title / summary").option("--description <text>", "Detailed description or steps to reproduce (single-line safe; for large multi-line bodies use --description-file or stdin)").option("--description-file <path>", "Read the description body from a file. Shell-safe for large multi-line markdown — required on Windows PowerShell, where inlining --description mangles the value").option("--priority <priority>", "Priority: critical, normal, or minor (default: normal)", "normal").option("--email <email>", "Contact email address").option("--attachment <paths...>", "File(s) to attach (max 10, max 10MB each)").option("--slack-thread <url>", "Link to a related Slack discussion to include in the ticket").examples(FEEDBACK_SEND_EXAMPLES).trackedAction(context, async (options) => {
|
|
130332
130420
|
const attachments = options.attachment ?? [];
|
|
130333
|
-
const
|
|
130334
|
-
if (
|
|
130335
|
-
OutputFormatter.error(
|
|
130421
|
+
const validationError2 = await validateSendInputs(options, attachments);
|
|
130422
|
+
if (validationError2) {
|
|
130423
|
+
OutputFormatter.error(validationError2);
|
|
130336
130424
|
return;
|
|
130337
130425
|
}
|
|
130426
|
+
const resolvedDescription = await resolveDescription(options);
|
|
130427
|
+
if ("error" in resolvedDescription) {
|
|
130428
|
+
OutputFormatter.error(resolvedDescription.error);
|
|
130429
|
+
return;
|
|
130430
|
+
}
|
|
130431
|
+
const description = resolvedDescription.description;
|
|
130338
130432
|
const [deviceIdError, deviceId] = await catchError(getOrCreateDeviceId());
|
|
130339
130433
|
if (deviceIdError) {
|
|
130340
130434
|
OutputFormatter.error({
|
|
@@ -130350,7 +130444,7 @@ function registerFeedbackCommand(program2, context) {
|
|
|
130350
130444
|
type: options.type,
|
|
130351
130445
|
priority: options.priority,
|
|
130352
130446
|
title: options.title,
|
|
130353
|
-
description
|
|
130447
|
+
description,
|
|
130354
130448
|
slackThreadUrl: options.slackThread === undefined ? undefined : normalizeUrl(options.slackThread)
|
|
130355
130449
|
};
|
|
130356
130450
|
if (canPrompt()) {
|
|
@@ -130413,7 +130507,7 @@ function registerFeedbackCommand(program2, context) {
|
|
|
130413
130507
|
attachmentCount: options.attachment?.length ?? 0
|
|
130414
130508
|
}));
|
|
130415
130509
|
}
|
|
130416
|
-
var MAX_ATTACHMENTS = 10, FEEDBACK_SEND_EXAMPLES;
|
|
130510
|
+
var MAX_ATTACHMENTS = 10, FEEDBACK_SEND_EXAMPLES, STDIN_READ_TIMEOUT_MS = 1e4, MAX_DESCRIPTION_BYTES;
|
|
130417
130511
|
var init_send_feedback = __esm(() => {
|
|
130418
130512
|
init_src2();
|
|
130419
130513
|
init_src();
|
|
@@ -130434,8 +130528,22 @@ var init_send_feedback = __esm(() => {
|
|
|
130434
130528
|
Title: "Crash on login"
|
|
130435
130529
|
}
|
|
130436
130530
|
}
|
|
130531
|
+
},
|
|
130532
|
+
{
|
|
130533
|
+
Description: "Send a report with a large multi-line description read from a file (shell-safe on Windows PowerShell)",
|
|
130534
|
+
Command: 'uip feedback send --type bug --title "[RPA] Crash on run" --description-file ./feedback-body.md',
|
|
130535
|
+
Output: {
|
|
130536
|
+
Code: "FeedbackSent",
|
|
130537
|
+
Data: {
|
|
130538
|
+
IssueKey: "UIP-12346",
|
|
130539
|
+
IssueUrl: "https://uipath.atlassian.net/browse/UIP-12346",
|
|
130540
|
+
Type: "bug",
|
|
130541
|
+
Title: "[RPA] Crash on run"
|
|
130542
|
+
}
|
|
130543
|
+
}
|
|
130437
130544
|
}
|
|
130438
130545
|
];
|
|
130546
|
+
MAX_DESCRIPTION_BYTES = 32 * 1024;
|
|
130439
130547
|
});
|
|
130440
130548
|
|
|
130441
130549
|
// src/commands/skills/agents/detect.ts
|
|
@@ -130541,6 +130649,7 @@ var init_autopilot = __esm(() => {
|
|
|
130541
130649
|
init_detect();
|
|
130542
130650
|
def2 = {
|
|
130543
130651
|
localSubdir: [".autopilot", "skills"],
|
|
130652
|
+
extraFolders: ["agents", "hooks"],
|
|
130544
130653
|
detect: () => homeAppDirInstalled(".autopilot")
|
|
130545
130654
|
};
|
|
130546
130655
|
});
|
|
@@ -131044,6 +131153,28 @@ async function removeFromManifest(storePath, skillNames, agents) {
|
|
|
131044
131153
|
delete manifest.skills[name];
|
|
131045
131154
|
}
|
|
131046
131155
|
}
|
|
131156
|
+
if (manifest.extraFiles) {
|
|
131157
|
+
for (const agent of agents)
|
|
131158
|
+
delete manifest.extraFiles[agent];
|
|
131159
|
+
if (Object.keys(manifest.extraFiles).length === 0) {
|
|
131160
|
+
manifest.extraFiles = undefined;
|
|
131161
|
+
}
|
|
131162
|
+
}
|
|
131163
|
+
await writeManifest(storePath, manifest);
|
|
131164
|
+
}
|
|
131165
|
+
async function readExtraFiles(storePath, agent) {
|
|
131166
|
+
const manifest = await readManifest(storePath);
|
|
131167
|
+
return manifest.extraFiles?.[agent] ?? [];
|
|
131168
|
+
}
|
|
131169
|
+
async function recordExtraFiles(storePath, agent, files) {
|
|
131170
|
+
const manifest = await readManifest(storePath);
|
|
131171
|
+
const extraFiles = manifest.extraFiles ?? {};
|
|
131172
|
+
if (files.length > 0) {
|
|
131173
|
+
extraFiles[agent] = files;
|
|
131174
|
+
} else {
|
|
131175
|
+
delete extraFiles[agent];
|
|
131176
|
+
}
|
|
131177
|
+
manifest.extraFiles = Object.keys(extraFiles).length > 0 ? extraFiles : undefined;
|
|
131047
131178
|
await writeManifest(storePath, manifest);
|
|
131048
131179
|
}
|
|
131049
131180
|
function asRecord(value) {
|
|
@@ -131952,6 +132083,92 @@ async function installSkill(agent, skill, skillsDir, owner) {
|
|
|
131952
132083
|
logger.info(` ${agent}: installed ${skill.name}`);
|
|
131953
132084
|
return { installed: true };
|
|
131954
132085
|
}
|
|
132086
|
+
async function listFilesRelative(fs7, dir) {
|
|
132087
|
+
const out = [];
|
|
132088
|
+
const walk = async (rel) => {
|
|
132089
|
+
const abs = rel ? fs7.path.join(dir, ...rel.split("/")) : dir;
|
|
132090
|
+
const [, entries] = await catchError(fs7.readdir(abs));
|
|
132091
|
+
for (const name of entries ?? []) {
|
|
132092
|
+
const childRel = rel ? `${rel}/${name}` : name;
|
|
132093
|
+
const stats = await fs7.stat(fs7.path.join(dir, ...childRel.split("/")));
|
|
132094
|
+
if (stats?.isDirectory()) {
|
|
132095
|
+
await walk(childRel);
|
|
132096
|
+
} else if (stats?.isFile()) {
|
|
132097
|
+
out.push(childRel);
|
|
132098
|
+
}
|
|
132099
|
+
}
|
|
132100
|
+
};
|
|
132101
|
+
await walk("");
|
|
132102
|
+
return out;
|
|
132103
|
+
}
|
|
132104
|
+
async function removeEmptyDirs(fs7, dir) {
|
|
132105
|
+
const stats = await fs7.stat(dir);
|
|
132106
|
+
if (!stats?.isDirectory())
|
|
132107
|
+
return;
|
|
132108
|
+
for (const name of await fs7.readdir(dir)) {
|
|
132109
|
+
const child = fs7.path.join(dir, name);
|
|
132110
|
+
const childStats = await fs7.stat(child);
|
|
132111
|
+
if (childStats?.isDirectory())
|
|
132112
|
+
await removeEmptyDirs(fs7, child);
|
|
132113
|
+
}
|
|
132114
|
+
if ((await fs7.readdir(dir)).length === 0)
|
|
132115
|
+
await fs7.rm(dir);
|
|
132116
|
+
}
|
|
132117
|
+
async function installExtraFolders(agent, storePath, skillsDir, owned = []) {
|
|
132118
|
+
const extraFolders = AGENT_DEFS[agent].extraFolders ?? [];
|
|
132119
|
+
if (extraFolders.length === 0)
|
|
132120
|
+
return [];
|
|
132121
|
+
const fs7 = getFileSystem();
|
|
132122
|
+
const agentRoot = fs7.path.dirname(skillsDir);
|
|
132123
|
+
const ownedSet = new Set(owned);
|
|
132124
|
+
const copied = [];
|
|
132125
|
+
for (const folder of extraFolders) {
|
|
132126
|
+
const source = fs7.path.join(storePath, folder);
|
|
132127
|
+
if (!await fs7.exists(source))
|
|
132128
|
+
continue;
|
|
132129
|
+
for (const rel of await listFilesRelative(fs7, source)) {
|
|
132130
|
+
const relFromRoot = `${folder}/${rel}`;
|
|
132131
|
+
const target = fs7.path.join(agentRoot, folder, ...rel.split("/"));
|
|
132132
|
+
if (await fs7.exists(target) && !ownedSet.has(relFromRoot)) {
|
|
132133
|
+
logger.info(` ${agent}: kept existing ${relFromRoot} (not overwritten)`);
|
|
132134
|
+
continue;
|
|
132135
|
+
}
|
|
132136
|
+
const data = await fs7.readFile(fs7.path.join(source, ...rel.split("/")));
|
|
132137
|
+
if (data === null)
|
|
132138
|
+
continue;
|
|
132139
|
+
await fs7.writeFile(target, data);
|
|
132140
|
+
copied.push(relFromRoot);
|
|
132141
|
+
}
|
|
132142
|
+
logger.info(` ${agent}: installed ${folder}/`);
|
|
132143
|
+
}
|
|
132144
|
+
const copiedSet = new Set(copied);
|
|
132145
|
+
for (const stale of ownedSet) {
|
|
132146
|
+
if (copiedSet.has(stale))
|
|
132147
|
+
continue;
|
|
132148
|
+
const target = fs7.path.join(agentRoot, ...stale.split("/"));
|
|
132149
|
+
if (await fs7.exists(target))
|
|
132150
|
+
await fs7.rm(target);
|
|
132151
|
+
}
|
|
132152
|
+
for (const folder of extraFolders) {
|
|
132153
|
+
await removeEmptyDirs(fs7, fs7.path.join(agentRoot, folder));
|
|
132154
|
+
}
|
|
132155
|
+
return copied;
|
|
132156
|
+
}
|
|
132157
|
+
async function uninstallExtraFolders(skillsDir, owned) {
|
|
132158
|
+
if (owned.length === 0)
|
|
132159
|
+
return;
|
|
132160
|
+
const fs7 = getFileSystem();
|
|
132161
|
+
const agentRoot = fs7.path.dirname(skillsDir);
|
|
132162
|
+
for (const rel of owned) {
|
|
132163
|
+
const target = fs7.path.join(agentRoot, ...rel.split("/"));
|
|
132164
|
+
if (await fs7.exists(target))
|
|
132165
|
+
await fs7.rm(target);
|
|
132166
|
+
}
|
|
132167
|
+
const topFolders = new Set(owned.map((rel) => rel.split("/")[0]));
|
|
132168
|
+
for (const folder of topFolders) {
|
|
132169
|
+
await removeEmptyDirs(fs7, fs7.path.join(agentRoot, folder));
|
|
132170
|
+
}
|
|
132171
|
+
}
|
|
131955
132172
|
async function uninstallSkill(skillName, skillsDir, owner) {
|
|
131956
132173
|
const fs7 = getFileSystem();
|
|
131957
132174
|
const target = fs7.path.join(skillsDir, skillName);
|
|
@@ -132653,7 +132870,8 @@ async function runOneAgent(agent, operation, resolved) {
|
|
|
132653
132870
|
return {
|
|
132654
132871
|
installedIds: selectedSkills.map((s) => `${agent}:${s.name}`),
|
|
132655
132872
|
installedNames: selectedSkills.map((s) => s.name),
|
|
132656
|
-
conflicts: []
|
|
132873
|
+
conflicts: [],
|
|
132874
|
+
extraFiles: []
|
|
132657
132875
|
};
|
|
132658
132876
|
}
|
|
132659
132877
|
const owner = skillOwnerOf(source);
|
|
@@ -132677,6 +132895,11 @@ async function runOneAgent(agent, operation, resolved) {
|
|
|
132677
132895
|
installedIds.push(`${agent}:${skill.name}`);
|
|
132678
132896
|
installedNames.push(skill.name);
|
|
132679
132897
|
}
|
|
132898
|
+
const [, priorOwned] = await catchError(readExtraFiles(storePath, agent));
|
|
132899
|
+
const [extraFoldersError, extraFiles] = await catchError(installExtraFolders(agent, storePath, skillsDir, priorOwned ?? []));
|
|
132900
|
+
if (extraFoldersError) {
|
|
132901
|
+
return new Error(`Failed to install extra folders for ${agent}: ${extraFoldersError.message}`);
|
|
132902
|
+
}
|
|
132680
132903
|
if (isDefaultSource) {
|
|
132681
132904
|
const installedSet = new Set(installedNames);
|
|
132682
132905
|
const [catalogError] = await catchError(writeSkillCatalog(skillsDir, selectedSkills.filter((s) => installedSet.has(s.name)), {
|
|
@@ -132688,7 +132911,7 @@ async function runOneAgent(agent, operation, resolved) {
|
|
|
132688
132911
|
return new Error(`Failed to write skill catalog for ${agent}: ${catalogError.message}`);
|
|
132689
132912
|
}
|
|
132690
132913
|
}
|
|
132691
|
-
return { installedIds, installedNames, conflicts };
|
|
132914
|
+
return { installedIds, installedNames, conflicts, extraFiles };
|
|
132692
132915
|
}
|
|
132693
132916
|
async function runAgentInstalls(resolved, operation = "install") {
|
|
132694
132917
|
const { rootDir, storePath, agents, isLocal } = resolved;
|
|
@@ -132696,6 +132919,7 @@ async function runAgentInstalls(resolved, operation = "install") {
|
|
|
132696
132919
|
const conflicts = [];
|
|
132697
132920
|
const succeededAgents = [];
|
|
132698
132921
|
const installedByAgent = new Map;
|
|
132922
|
+
const extraFilesByAgent = new Map;
|
|
132699
132923
|
const failures = [];
|
|
132700
132924
|
for (const agent of agents) {
|
|
132701
132925
|
const result = await runOneAgent(agent, operation, resolved);
|
|
@@ -132706,16 +132930,21 @@ async function runAgentInstalls(resolved, operation = "install") {
|
|
|
132706
132930
|
installed.push(...result.installedIds);
|
|
132707
132931
|
conflicts.push(...result.conflicts);
|
|
132708
132932
|
installedByAgent.set(agent, result.installedNames);
|
|
132933
|
+
extraFilesByAgent.set(agent, result.extraFiles);
|
|
132709
132934
|
succeededAgents.push(agent);
|
|
132710
132935
|
}
|
|
132711
132936
|
if (succeededAgents.length > 0) {
|
|
132712
132937
|
for (const agent of succeededAgents) {
|
|
132713
132938
|
const names = installedByAgent.get(agent) ?? [];
|
|
132714
|
-
if (names.length
|
|
132715
|
-
|
|
132716
|
-
|
|
132717
|
-
|
|
132718
|
-
|
|
132939
|
+
if (names.length > 0) {
|
|
132940
|
+
const [manifestError] = await catchError(updateManifestAfterInstall(storePath, names, [agent]));
|
|
132941
|
+
if (manifestError) {
|
|
132942
|
+
throw new SkillsError(`Failed to update manifest: ${manifestError.message}`, "Check that the content store is intact and you have write permissions.");
|
|
132943
|
+
}
|
|
132944
|
+
}
|
|
132945
|
+
const [extraError] = await catchError(recordExtraFiles(storePath, agent, extraFilesByAgent.get(agent) ?? []));
|
|
132946
|
+
if (extraError) {
|
|
132947
|
+
throw new SkillsError(`Failed to record installed folders: ${extraError.message}`, "Check that the content store is intact and you have write permissions.");
|
|
132719
132948
|
}
|
|
132720
132949
|
}
|
|
132721
132950
|
if (isLocal) {
|
|
@@ -133008,6 +133237,16 @@ async function uninstallForAgent(targetAgent, ctx, uninstalled) {
|
|
|
133008
133237
|
}
|
|
133009
133238
|
uninstalled.push(`${targetAgent}:${name}`);
|
|
133010
133239
|
}
|
|
133240
|
+
const [, ownedExtra] = await catchError(readExtraFiles(storePath, targetAgent));
|
|
133241
|
+
const [extraError] = await catchError(uninstallExtraFolders(skillsDir, ownedExtra ?? []));
|
|
133242
|
+
if (extraError) {
|
|
133243
|
+
OutputFormatter.error({
|
|
133244
|
+
Result: RESULTS.Failure,
|
|
133245
|
+
Message: `Failed to remove installed folders for ${targetAgent}: ${extraError.message}`,
|
|
133246
|
+
Instructions: "Check that the destination is writable and try again."
|
|
133247
|
+
});
|
|
133248
|
+
return HANDLED;
|
|
133249
|
+
}
|
|
133011
133250
|
if (isDefaultSource) {
|
|
133012
133251
|
const [catalogError] = await catchError(removeSkillCatalog(skillsDir));
|
|
133013
133252
|
if (catalogError) {
|
|
@@ -137517,21 +137756,6 @@ function isParsableJson(raw) {
|
|
|
137517
137756
|
return false;
|
|
137518
137757
|
}
|
|
137519
137758
|
}
|
|
137520
|
-
async function readStdinWithTimeout(timeoutMs) {
|
|
137521
|
-
let timer;
|
|
137522
|
-
const timeout = new Promise((resolve2) => {
|
|
137523
|
-
timer = setTimeout(() => {
|
|
137524
|
-
process.stdin.unref?.();
|
|
137525
|
-
resolve2(null);
|
|
137526
|
-
}, timeoutMs);
|
|
137527
|
-
});
|
|
137528
|
-
try {
|
|
137529
|
-
return await Promise.race([readStdin(), timeout]);
|
|
137530
|
-
} finally {
|
|
137531
|
-
if (timer)
|
|
137532
|
-
clearTimeout(timer);
|
|
137533
|
-
}
|
|
137534
|
-
}
|
|
137535
137759
|
function resolveSkillsEventName(raw) {
|
|
137536
137760
|
let token;
|
|
137537
137761
|
try {
|
|
@@ -139285,4 +139509,4 @@ export {
|
|
|
139285
139509
|
ready
|
|
139286
139510
|
};
|
|
139287
139511
|
|
|
139288
|
-
//# debugId=
|
|
139512
|
+
//# debugId=819F43BAC9F476F864756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/cli",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.198.0-preview.
|
|
4
|
+
"version": "1.198.0-preview.90",
|
|
5
5
|
"description": "Cross platform CLI for UiPath",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"mihaigirleanu",
|
|
35
35
|
"vlad-uipath"
|
|
36
36
|
],
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "7fa615fb10f91f98f796a038ea70569336611f42"
|
|
38
38
|
}
|