@uipath/cli 1.197.0-preview.67 → 1.197.0-preview.68
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 +19 -19
- package/dist/index.js +22 -63
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -45866,7 +45866,7 @@ var init_package = __esm(() => {
|
|
|
45866
45866
|
package_default = {
|
|
45867
45867
|
name: "@uipath/cli",
|
|
45868
45868
|
license: "MIT",
|
|
45869
|
-
version: "1.197.0-preview.
|
|
45869
|
+
version: "1.197.0-preview.68",
|
|
45870
45870
|
description: "Cross platform CLI for UiPath",
|
|
45871
45871
|
repository: {
|
|
45872
45872
|
type: "git",
|
|
@@ -108164,31 +108164,28 @@ var init_contentStore = __esm(() => {
|
|
|
108164
108164
|
|
|
108165
108165
|
// src/commands/skills/agents/claude.ts
|
|
108166
108166
|
import { spawn as spawn2 } from "node:child_process";
|
|
108167
|
+
function samePath(a, b) {
|
|
108168
|
+
const norm = (p) => {
|
|
108169
|
+
const forward = p.replaceAll("\\", "/").replace(/\/+$/, "");
|
|
108170
|
+
return process.platform === "win32" ? forward.toLowerCase() : forward;
|
|
108171
|
+
};
|
|
108172
|
+
return norm(a) === norm(b);
|
|
108173
|
+
}
|
|
108167
108174
|
function claudeConfigDir() {
|
|
108168
108175
|
const fs7 = getFileSystem();
|
|
108169
108176
|
const override = fs7.env.getenv("CLAUDE_CONFIG_DIR");
|
|
108170
108177
|
return override?.trim() ? override : fs7.path.join(fs7.env.homedir(), ".claude");
|
|
108171
108178
|
}
|
|
108172
|
-
function
|
|
108173
|
-
|
|
108174
|
-
const count = Number.isInteger(existing) && existing >= 0 ? existing : 0;
|
|
108175
|
-
return {
|
|
108176
|
-
...env,
|
|
108177
|
-
GIT_CONFIG_COUNT: String(count + 1),
|
|
108178
|
-
[`GIT_CONFIG_KEY_${count}`]: "core.longpaths",
|
|
108179
|
-
[`GIT_CONFIG_VALUE_${count}`]: "true"
|
|
108180
|
-
};
|
|
108179
|
+
function quoteForWinShell(arg) {
|
|
108180
|
+
return /\s/.test(arg) ? `"${arg}"` : arg;
|
|
108181
108181
|
}
|
|
108182
108182
|
function runClaude(args) {
|
|
108183
108183
|
return new Promise((resolve2, reject) => {
|
|
108184
|
-
const
|
|
108185
|
-
const proc = process.platform === "win32" ? spawn2(["claude", ...args].join(" "), [], {
|
|
108184
|
+
const proc = process.platform === "win32" ? spawn2(["claude", ...args.map(quoteForWinShell)].join(" "), [], {
|
|
108186
108185
|
stdio: ["inherit", "pipe", "pipe"],
|
|
108187
|
-
shell: true
|
|
108188
|
-
env
|
|
108186
|
+
shell: true
|
|
108189
108187
|
}) : spawn2("claude", [...args], {
|
|
108190
|
-
stdio: ["inherit", "pipe", "pipe"]
|
|
108191
|
-
env
|
|
108188
|
+
stdio: ["inherit", "pipe", "pipe"]
|
|
108192
108189
|
});
|
|
108193
108190
|
let stderr = "";
|
|
108194
108191
|
proc.stdout?.on("data", (d) => {
|
|
@@ -108236,42 +108233,7 @@ async function removeLegacySkillCopies(storePath, rootDir) {
|
|
|
108236
108233
|
}
|
|
108237
108234
|
}
|
|
108238
108235
|
}
|
|
108239
|
-
async function
|
|
108240
|
-
const fs7 = getFileSystem();
|
|
108241
|
-
const settingsPath = fs7.path.join(claudeConfigDir(), "settings.json");
|
|
108242
|
-
let raw = "{}";
|
|
108243
|
-
if (await fs7.exists(settingsPath)) {
|
|
108244
|
-
const [readErr, value] = await catchError(fs7.readFile(settingsPath, { encoding: "utf-8" }));
|
|
108245
|
-
if (readErr) {
|
|
108246
|
-
logger.warn(` claude: could not read ${settingsPath} — skipping autoUpdate flag: ${readErr.message}`);
|
|
108247
|
-
return;
|
|
108248
|
-
}
|
|
108249
|
-
raw = value;
|
|
108250
|
-
}
|
|
108251
|
-
const [parseErr, parsed] = catchError(() => JSON.parse(raw || "{}"));
|
|
108252
|
-
if (parseErr || !parsed) {
|
|
108253
|
-
logger.warn(` claude: could not parse ${settingsPath} — skipping autoUpdate flag`);
|
|
108254
|
-
return;
|
|
108255
|
-
}
|
|
108256
|
-
parsed.extraKnownMarketplaces ??= {};
|
|
108257
|
-
const mks = parsed.extraKnownMarketplaces;
|
|
108258
|
-
mks[MARKETPLACE_NAME] ??= {};
|
|
108259
|
-
const entry = mks[MARKETPLACE_NAME];
|
|
108260
|
-
const desiredSource = { source: "git", url: MARKETPLACE_URL };
|
|
108261
|
-
const sourceMatches = JSON.stringify(entry.source) === JSON.stringify(desiredSource);
|
|
108262
|
-
if (entry.autoUpdate === true && sourceMatches)
|
|
108263
|
-
return;
|
|
108264
|
-
entry.autoUpdate = true;
|
|
108265
|
-
entry.source = desiredSource;
|
|
108266
|
-
const [writeErr] = await catchError(fs7.writeFile(settingsPath, `${JSON.stringify(parsed, null, 2)}
|
|
108267
|
-
`));
|
|
108268
|
-
if (writeErr) {
|
|
108269
|
-
logger.warn(` claude: could not write ${settingsPath} — autoUpdate flag not set: ${writeErr.message}`);
|
|
108270
|
-
return;
|
|
108271
|
-
}
|
|
108272
|
-
logger.info(` claude: enabled auto-update for marketplace ${MARKETPLACE_NAME}`);
|
|
108273
|
-
}
|
|
108274
|
-
async function isHttpsMarketplaceRegistered() {
|
|
108236
|
+
async function isDirectoryMarketplaceRegistered(storePath) {
|
|
108275
108237
|
const fs7 = getFileSystem();
|
|
108276
108238
|
const registryPath = fs7.path.join(claudeConfigDir(), "plugins", "known_marketplaces.json");
|
|
108277
108239
|
if (!await fs7.exists(registryPath))
|
|
@@ -108283,7 +108245,7 @@ async function isHttpsMarketplaceRegistered() {
|
|
|
108283
108245
|
if (parseErr || !parsed)
|
|
108284
108246
|
return false;
|
|
108285
108247
|
const source = parsed[MARKETPLACE_NAME]?.source;
|
|
108286
|
-
return source?.source === "
|
|
108248
|
+
return source?.source === "directory" && !!source.path && samePath(source.path, storePath);
|
|
108287
108249
|
}
|
|
108288
108250
|
function marketplacesCacheDir() {
|
|
108289
108251
|
const fs7 = getFileSystem();
|
|
@@ -108304,10 +108266,10 @@ async function removeStaleMarketplaceCache() {
|
|
|
108304
108266
|
}
|
|
108305
108267
|
}
|
|
108306
108268
|
}
|
|
108307
|
-
async function
|
|
108308
|
-
if (await
|
|
108269
|
+
async function ensureDirectoryMarketplace(storePath) {
|
|
108270
|
+
if (await isDirectoryMarketplaceRegistered(storePath))
|
|
108309
108271
|
return;
|
|
108310
|
-
const addArgs = ["plugin", "marketplace", "add",
|
|
108272
|
+
const addArgs = ["plugin", "marketplace", "add", storePath];
|
|
108311
108273
|
const [addErr] = await catchError(runClaude(addArgs));
|
|
108312
108274
|
if (!addErr)
|
|
108313
108275
|
return;
|
|
@@ -108322,13 +108284,12 @@ async function ensureHttpsMarketplace() {
|
|
|
108322
108284
|
instructions: `Close all running Claude Code sessions, delete ${getFileSystem().path.join(marketplacesCacheDir(), MARKETPLACE_NAME)} if it still exists, then re-run this command. ` + "If it keeps failing, an antivirus or another process is locking the directory."
|
|
108323
108285
|
});
|
|
108324
108286
|
}
|
|
108325
|
-
var
|
|
108287
|
+
var MARKETPLACE_NAME = "uipath-marketplace", PLUGIN_NAME = "uipath", PLUGIN_REF, FINALIZE_CACHE_ERROR, def2;
|
|
108326
108288
|
var init_claude = __esm(() => {
|
|
108327
108289
|
init_src2();
|
|
108328
108290
|
init_src();
|
|
108329
108291
|
init_contentStore();
|
|
108330
108292
|
init_detect();
|
|
108331
|
-
MARKETPLACE_URL = `https://github.com/${MARKETPLACE_REPO}.git`;
|
|
108332
108293
|
PLUGIN_REF = `${PLUGIN_NAME}@${MARKETPLACE_NAME}`;
|
|
108333
108294
|
FINALIZE_CACHE_ERROR = /Failed to finalize marketplace cache/i;
|
|
108334
108295
|
def2 = {
|
|
@@ -108338,17 +108299,15 @@ var init_claude = __esm(() => {
|
|
|
108338
108299
|
detect: () => verifiedCommandOnPath(["claude"], /Claude Code/i),
|
|
108339
108300
|
install: async ({ storePath, rootDir }) => {
|
|
108340
108301
|
await removeLegacySkillCopies(storePath, rootDir);
|
|
108341
|
-
await
|
|
108302
|
+
await ensureDirectoryMarketplace(storePath);
|
|
108342
108303
|
await runClaude(["plugin", "install", PLUGIN_REF]);
|
|
108343
|
-
await enableMarketplaceAutoUpdate();
|
|
108344
108304
|
logger.info(` claude: installed plugin ${PLUGIN_REF}`);
|
|
108345
108305
|
},
|
|
108346
108306
|
update: async ({ storePath, rootDir }) => {
|
|
108347
108307
|
await removeLegacySkillCopies(storePath, rootDir);
|
|
108348
|
-
await
|
|
108308
|
+
await ensureDirectoryMarketplace(storePath);
|
|
108349
108309
|
await runClaude(["plugin", "marketplace", "update", MARKETPLACE_NAME]);
|
|
108350
108310
|
await runClaude(["plugin", "update", PLUGIN_REF]);
|
|
108351
|
-
await enableMarketplaceAutoUpdate();
|
|
108352
108311
|
logger.info(` claude: updated plugin ${PLUGIN_REF}`);
|
|
108353
108312
|
},
|
|
108354
108313
|
uninstall: async ({ storePath, rootDir }) => {
|
|
@@ -115397,4 +115356,4 @@ export {
|
|
|
115397
115356
|
ready
|
|
115398
115357
|
};
|
|
115399
115358
|
|
|
115400
|
-
//# debugId=
|
|
115359
|
+
//# debugId=5C55ACDD710EB6FC64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/cli",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.197.0-preview.
|
|
4
|
+
"version": "1.197.0-preview.68",
|
|
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": "56f68b263cec4ea1f2a39d738bd99ecf52f88fea"
|
|
38
38
|
}
|