@uipath/cli 1.196.1 → 1.196.3

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.
Files changed (2) hide show
  1. package/dist/index.js +67 -12
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -46240,7 +46240,7 @@ var init_package = __esm(() => {
46240
46240
  package_default = {
46241
46241
  name: "@uipath/cli",
46242
46242
  license: "MIT",
46243
- version: "1.196.1",
46243
+ version: "1.196.3",
46244
46244
  description: "Cross platform CLI for UiPath",
46245
46245
  repository: {
46246
46246
  type: "git",
@@ -106078,6 +106078,19 @@ async function fetchMatchingSkillsPackageInfo() {
106078
106078
  if (!cliVersion) {
106079
106079
  throw new Error(`Invalid CLI version ${package_default.version}; expected semantic version major.minor.patch`);
106080
106080
  }
106081
+ const [primaryError, packageInfo] = await catchError(fetchSkillsPackageInfoFromConfiguredRegistry(cliVersion));
106082
+ if (!primaryError && packageInfo) {
106083
+ return packageInfo;
106084
+ }
106085
+ logger.info(`Could not resolve ${SKILLS_PACKAGE_NAME} from the configured npm registry (${primaryError?.message ?? "unknown error"}); falling back to ${SKILLS_REGISTRY_URL}.`);
106086
+ const [fallbackError, fallbackInfo] = await catchError(fetchMatchingSkillsPackageInfoFromRegistry(cliVersion, SKILLS_REGISTRY_URL));
106087
+ if (!fallbackError && fallbackInfo) {
106088
+ return fallbackInfo;
106089
+ }
106090
+ logger.debug(`Fallback to ${SKILLS_REGISTRY_URL} for ${SKILLS_PACKAGE_NAME} also failed: ${fallbackError?.message ?? "unknown error"}`);
106091
+ throw primaryError ?? fallbackError ?? new Error(`Could not resolve ${SKILLS_PACKAGE_NAME}.`);
106092
+ }
106093
+ async function fetchSkillsPackageInfoFromConfiguredRegistry(cliVersion) {
106081
106094
  const ghToken = getGhNpmRegistryToken();
106082
106095
  if (ghToken) {
106083
106096
  logger.debug(`GH_NPM_REGISTRY_TOKEN found; using ${SKILLS_GITHUB_REGISTRY_URL}`);
@@ -106126,11 +106139,12 @@ async function fetchMatchingSkillsPackageInfoFromRegistry(cliVersion, registryUr
106126
106139
  version: selectedVersion,
106127
106140
  tarballUrl,
106128
106141
  registryUrl,
106129
- authToken
106142
+ directDownload: true,
106143
+ ...authToken ? { authToken } : {}
106130
106144
  };
106131
106145
  }
106132
106146
  async function downloadAndExtractPackage(packageInfo, destinationPath) {
106133
- if (!packageInfo.authToken) {
106147
+ if (!packageInfo.directDownload) {
106134
106148
  await packAndExtractPackage(packageInfo, destinationPath);
106135
106149
  return;
106136
106150
  }
@@ -106355,13 +106369,31 @@ var init_contentStore = __esm(() => {
106355
106369
 
106356
106370
  // src/commands/skills/agents/claude.ts
106357
106371
  import { spawn as spawn2 } from "node:child_process";
106372
+ function claudeConfigDir() {
106373
+ const fs7 = getFileSystem();
106374
+ const override = fs7.env.getenv("CLAUDE_CONFIG_DIR");
106375
+ return override?.trim() ? override : fs7.path.join(fs7.env.homedir(), ".claude");
106376
+ }
106377
+ function withGitLongPaths(env) {
106378
+ const existing = Number.parseInt(env.GIT_CONFIG_COUNT ?? "", 10);
106379
+ const count = Number.isInteger(existing) && existing >= 0 ? existing : 0;
106380
+ return {
106381
+ ...env,
106382
+ GIT_CONFIG_COUNT: String(count + 1),
106383
+ [`GIT_CONFIG_KEY_${count}`]: "core.longpaths",
106384
+ [`GIT_CONFIG_VALUE_${count}`]: "true"
106385
+ };
106386
+ }
106358
106387
  function runClaude(args) {
106359
106388
  return new Promise((resolve2, reject) => {
106389
+ const env = withGitLongPaths(process.env);
106360
106390
  const proc = process.platform === "win32" ? spawn2(["claude", ...args].join(" "), [], {
106361
106391
  stdio: ["inherit", "pipe", "pipe"],
106362
- shell: true
106392
+ shell: true,
106393
+ env
106363
106394
  }) : spawn2("claude", [...args], {
106364
- stdio: ["inherit", "pipe", "pipe"]
106395
+ stdio: ["inherit", "pipe", "pipe"],
106396
+ env
106365
106397
  });
106366
106398
  let stderr = "";
106367
106399
  proc.stdout?.on("data", (d) => {
@@ -106411,7 +106443,7 @@ async function removeLegacySkillCopies(storePath, rootDir) {
106411
106443
  }
106412
106444
  async function enableMarketplaceAutoUpdate() {
106413
106445
  const fs7 = getFileSystem();
106414
- const settingsPath = fs7.path.join(fs7.env.homedir(), ".claude", "settings.json");
106446
+ const settingsPath = fs7.path.join(claudeConfigDir(), "settings.json");
106415
106447
  let raw = "{}";
106416
106448
  if (await fs7.exists(settingsPath)) {
106417
106449
  const [readErr, value] = await catchError(fs7.readFile(settingsPath, { encoding: "utf-8" }));
@@ -106428,13 +106460,14 @@ async function enableMarketplaceAutoUpdate() {
106428
106460
  }
106429
106461
  parsed.extraKnownMarketplaces ??= {};
106430
106462
  const mks = parsed.extraKnownMarketplaces;
106431
- mks[MARKETPLACE_NAME] ??= {
106432
- source: { source: "github", repo: MARKETPLACE_SOURCE }
106433
- };
106463
+ mks[MARKETPLACE_NAME] ??= {};
106434
106464
  const entry = mks[MARKETPLACE_NAME];
106435
- if (entry.autoUpdate === true)
106465
+ const desiredSource = { source: "git", url: MARKETPLACE_URL };
106466
+ const sourceMatches = JSON.stringify(entry.source) === JSON.stringify(desiredSource);
106467
+ if (entry.autoUpdate === true && sourceMatches)
106436
106468
  return;
106437
106469
  entry.autoUpdate = true;
106470
+ entry.source = desiredSource;
106438
106471
  const [writeErr] = await catchError(fs7.writeFile(settingsPath, `${JSON.stringify(parsed, null, 2)}
106439
106472
  `));
106440
106473
  if (writeErr) {
@@ -106443,12 +106476,32 @@ async function enableMarketplaceAutoUpdate() {
106443
106476
  }
106444
106477
  logger.info(` claude: enabled auto-update for marketplace ${MARKETPLACE_NAME}`);
106445
106478
  }
106446
- var MARKETPLACE_SOURCE = "UiPath/skills", MARKETPLACE_NAME = "uipath-marketplace", PLUGIN_NAME = "uipath", PLUGIN_REF, def2;
106479
+ async function isHttpsMarketplaceRegistered() {
106480
+ const fs7 = getFileSystem();
106481
+ const registryPath = fs7.path.join(claudeConfigDir(), "plugins", "known_marketplaces.json");
106482
+ if (!await fs7.exists(registryPath))
106483
+ return false;
106484
+ const [readErr, raw] = await catchError(fs7.readFile(registryPath, { encoding: "utf-8" }));
106485
+ if (readErr || !raw)
106486
+ return false;
106487
+ const [parseErr, parsed] = catchError(() => JSON.parse(raw));
106488
+ if (parseErr || !parsed)
106489
+ return false;
106490
+ const source = parsed[MARKETPLACE_NAME]?.source;
106491
+ return source?.source === "git" && source?.url === MARKETPLACE_URL;
106492
+ }
106493
+ async function ensureHttpsMarketplace() {
106494
+ if (await isHttpsMarketplaceRegistered())
106495
+ return;
106496
+ await runClaude(["plugin", "marketplace", "add", MARKETPLACE_URL]);
106497
+ }
106498
+ var MARKETPLACE_REPO = "UiPath/skills", MARKETPLACE_URL, MARKETPLACE_NAME = "uipath-marketplace", PLUGIN_NAME = "uipath", PLUGIN_REF, def2;
106447
106499
  var init_claude = __esm(() => {
106448
106500
  init_src2();
106449
106501
  init_src();
106450
106502
  init_contentStore();
106451
106503
  init_detect();
106504
+ MARKETPLACE_URL = `https://github.com/${MARKETPLACE_REPO}.git`;
106452
106505
  PLUGIN_REF = `${PLUGIN_NAME}@${MARKETPLACE_NAME}`;
106453
106506
  def2 = {
106454
106507
  localSubdir: [".claude", "skills"],
@@ -106457,13 +106510,14 @@ var init_claude = __esm(() => {
106457
106510
  detect: () => verifiedCommandOnPath(["claude"], /Claude Code/i),
106458
106511
  install: async ({ storePath, rootDir }) => {
106459
106512
  await removeLegacySkillCopies(storePath, rootDir);
106460
- await runClaude(["plugin", "marketplace", "add", MARKETPLACE_SOURCE]);
106513
+ await ensureHttpsMarketplace();
106461
106514
  await runClaude(["plugin", "install", PLUGIN_REF]);
106462
106515
  await enableMarketplaceAutoUpdate();
106463
106516
  logger.info(` claude: installed plugin ${PLUGIN_REF}`);
106464
106517
  },
106465
106518
  update: async ({ storePath, rootDir }) => {
106466
106519
  await removeLegacySkillCopies(storePath, rootDir);
106520
+ await ensureHttpsMarketplace();
106467
106521
  await runClaude(["plugin", "marketplace", "update", MARKETPLACE_NAME]);
106468
106522
  await runClaude(["plugin", "update", PLUGIN_REF]);
106469
106523
  await enableMarketplaceAutoUpdate();
@@ -106493,6 +106547,7 @@ var init_copilot = __esm(() => {
106493
106547
  init_detect();
106494
106548
  def4 = {
106495
106549
  localSubdir: [".github", "skills"],
106550
+ globalSubdir: [".copilot", "skills"],
106496
106551
  detect: () => verifiedCommandOnPath(["copilot"], /GitHub Copilot/i)
106497
106552
  };
106498
106553
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/cli",
3
3
  "license": "MIT",
4
- "version": "1.196.1",
4
+ "version": "1.196.3",
5
5
  "description": "Cross platform CLI for UiPath",
6
6
  "repository": {
7
7
  "type": "git",
@@ -31,5 +31,5 @@
31
31
  "mihaigirleanu",
32
32
  "vlad-uipath"
33
33
  ],
34
- "gitHead": "bed2b46f1ec33a47a7dcae2e6d4b7ab99bd06981"
34
+ "gitHead": "b85a0eec4302ac7706057dbba9a264e5c906abe5"
35
35
  }