@uipath/cli 1.200.0-preview.120 → 1.200.0-preview.126

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.js CHANGED
@@ -92769,7 +92769,7 @@ var init_package = __esm(() => {
92769
92769
  package_default = {
92770
92770
  name: "@uipath/cli",
92771
92771
  license: "MIT",
92772
- version: "1.200.0-preview.120",
92772
+ version: "1.200.0-preview.126",
92773
92773
  description: "Cross platform CLI for UiPath",
92774
92774
  repository: {
92775
92775
  type: "git",
@@ -114060,13 +114060,15 @@ __export(exports_toolService, {
114060
114060
  parsePackageSpec: () => parsePackageSpec,
114061
114061
  isValidSemver: () => isValidSemver,
114062
114062
  isPermissionError: () => isPermissionError,
114063
+ isNpmViewMetadataError: () => isNpmViewMetadataError,
114063
114064
  isDevMode: () => isDevMode,
114064
114065
  isBunOnPath: () => isBunOnPath,
114065
114066
  getEffectiveRegistry: () => getEffectiveRegistry,
114066
114067
  compareSemver: () => compareSemver,
114067
114068
  WHITELIST_BY_SHORT_NAME: () => WHITELIST_BY_SHORT_NAME,
114068
114069
  WHITELIST_BY_COMMAND: () => WHITELIST_BY_COMMAND,
114069
- TOOLS_WHITELIST: () => TOOLS_WHITELIST
114070
+ TOOLS_WHITELIST: () => TOOLS_WHITELIST,
114071
+ NpmViewMetadataError: () => NpmViewMetadataError
114070
114072
  });
114071
114073
  function isValidSemver(v) {
114072
114074
  return SEMVER_RE.test(v);
@@ -114152,9 +114154,68 @@ function validateVersionString(version2) {
114152
114154
  throw new Error(`Invalid version string: '${version2}'. Only alphanumeric characters, dots, hyphens, underscores, and semver operators are allowed.`);
114153
114155
  }
114154
114156
  }
114157
+ function isNpmViewMetadataError(error51) {
114158
+ return error51 instanceof NpmViewMetadataError || error51.name === "NpmViewMetadataError";
114159
+ }
114155
114160
  function resolveToolPackageName(arg) {
114156
114161
  return WHITELIST_BY_COMMAND.get(arg) ?? WHITELIST_BY_SHORT_NAME.get(arg) ?? arg;
114157
114162
  }
114163
+ function asNpmViewMetadata(value) {
114164
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
114165
+ return;
114166
+ }
114167
+ return value;
114168
+ }
114169
+ function pickHighestNpmViewMetadata(values) {
114170
+ const candidates = values.map(asNpmViewMetadata).filter((candidate) => typeof candidate?.version === "string" && isValidSemver(candidate.version));
114171
+ if (candidates.length === 0)
114172
+ return;
114173
+ candidates.sort((a, b) => compareSemver(b.version ?? "", a.version ?? ""));
114174
+ const selected = candidates[0];
114175
+ const selectedVersion = selected?.version;
114176
+ if (!selected || !selectedVersion)
114177
+ return;
114178
+ const availableVersions = collectNpmViewMetadataVersions(candidates);
114179
+ return {
114180
+ ...selected,
114181
+ "dist-tags": {
114182
+ ...selected["dist-tags"],
114183
+ latest: selectedVersion
114184
+ },
114185
+ versions: availableVersions
114186
+ };
114187
+ }
114188
+ function collectNpmViewMetadataVersions(values) {
114189
+ const versions2 = new Set;
114190
+ for (const value of values) {
114191
+ const rawVersions = Array.isArray(value.versions) ? value.versions : typeof value.versions === "string" ? [value.versions] : [];
114192
+ for (const version2 of rawVersions) {
114193
+ if (isValidSemver(version2))
114194
+ versions2.add(version2);
114195
+ }
114196
+ if (value.version && isValidSemver(value.version)) {
114197
+ versions2.add(value.version);
114198
+ }
114199
+ }
114200
+ return [...versions2].sort((a, b) => compareSemver(b, a));
114201
+ }
114202
+ function normalizeNpmViewMetadata(parsed, packageName) {
114203
+ let unwrapped = parsed;
114204
+ while (Array.isArray(unwrapped) && unwrapped.length === 1) {
114205
+ unwrapped = unwrapped[0];
114206
+ }
114207
+ if (Array.isArray(unwrapped)) {
114208
+ const selected = pickHighestNpmViewMetadata(unwrapped);
114209
+ if (selected)
114210
+ return selected;
114211
+ throw new NpmViewMetadataError(`npm view ${packageName} returned no versioned package metadata`);
114212
+ }
114213
+ const metadata = asNpmViewMetadata(unwrapped);
114214
+ if (!metadata) {
114215
+ throw new NpmViewMetadataError(`npm view ${packageName} returned unsupported metadata shape`);
114216
+ }
114217
+ return metadata;
114218
+ }
114158
114219
  function parsePackageSpec(spec) {
114159
114220
  const versionSeparator = spec.startsWith("@") ? spec.indexOf("@", 1) : spec.indexOf("@");
114160
114221
  if (versionSeparator === -1) {
@@ -114461,13 +114522,9 @@ class NodeToolService {
114461
114522
  });
114462
114523
  const [parseError, parsed] = catchError(() => JSON.parse(stdout));
114463
114524
  if (parseError) {
114464
- throw new Error(`Unexpected npm view output for ${packageName}`);
114465
- }
114466
- let unwrapped = parsed;
114467
- while (Array.isArray(unwrapped) && unwrapped.length === 1) {
114468
- unwrapped = unwrapped[0];
114525
+ throw new NpmViewMetadataError(`npm view ${packageName} returned invalid JSON`);
114469
114526
  }
114470
- const data = unwrapped;
114527
+ const data = normalizeNpmViewMetadata(parsed, packageName);
114471
114528
  const latestVersion = data["dist-tags"]?.latest ?? data.version;
114472
114529
  const rawVersions = Array.isArray(data.versions) ? data.versions : data.versions ? [data.versions] : [];
114473
114530
  const availableVersions = rawVersions.filter(isValidSemver).sort((a, b) => compareSemver(b, a));
@@ -114699,7 +114756,7 @@ function truncateVersionsForDisplay(versions2) {
114699
114756
  }
114700
114757
  return result;
114701
114758
  }
114702
- var SEMVER_RE, SAFE_PACKAGE_SPEC, SAFE_VERSION, SHELL_SAFE_ARG, SHELL_SAFE_COMMAND_LINE, NPM_TIMEOUT_MS = 180000, NPM_VIEW_TIMEOUT_MS = 30000, NPM_MAX_RETRIES = 2, TRANSIENT_NPM_ERRORS, UNSUPPORTED_PROTOCOL_MARKER = "EUNSUPPORTEDPROTOCOL", cachedBunOnPath, childProcessModulePromise, NPMJS_REGISTRY = "https://registry.npmjs.org", GITHUB_REGISTRY = "https://npm.pkg.github.com", REGISTRY_PREFERENCE, effectiveNpmConfigPromise = null, PERMISSION_ERROR_MARKERS, toolService;
114759
+ var SEMVER_RE, SAFE_PACKAGE_SPEC, SAFE_VERSION, SHELL_SAFE_ARG, SHELL_SAFE_COMMAND_LINE, NPM_TIMEOUT_MS = 180000, NPM_VIEW_TIMEOUT_MS = 30000, NPM_MAX_RETRIES = 2, TRANSIENT_NPM_ERRORS, UNSUPPORTED_PROTOCOL_MARKER = "EUNSUPPORTEDPROTOCOL", cachedBunOnPath, childProcessModulePromise, NpmViewMetadataError, NPMJS_REGISTRY = "https://registry.npmjs.org", GITHUB_REGISTRY = "https://npm.pkg.github.com", REGISTRY_PREFERENCE, effectiveNpmConfigPromise = null, PERMISSION_ERROR_MARKERS, toolService;
114703
114760
  var init_toolService = __esm(() => {
114704
114761
  init_src2();
114705
114762
  init_src();
@@ -114713,6 +114770,12 @@ var init_toolService = __esm(() => {
114713
114770
  SHELL_SAFE_ARG = /^[a-zA-Z0-9@/._-]+$/;
114714
114771
  SHELL_SAFE_COMMAND_LINE = /^[a-zA-Z0-9@/._\- ]+$/;
114715
114772
  TRANSIENT_NPM_ERRORS = ["ENOTEMPTY", "EBUSY"];
114773
+ NpmViewMetadataError = class NpmViewMetadataError extends Error {
114774
+ constructor(message) {
114775
+ super(message);
114776
+ this.name = "NpmViewMetadataError";
114777
+ }
114778
+ };
114716
114779
  REGISTRY_PREFERENCE = [
114717
114780
  NPMJS_REGISTRY,
114718
114781
  GITHUB_REGISTRY
@@ -133905,6 +133968,12 @@ function loadChildProcess2() {
133905
133968
  childProcessModulePromise2 ??= import("node:child_process");
133906
133969
  return childProcessModulePromise2;
133907
133970
  }
133971
+ function isSkillsPackageMetadataError(error51) {
133972
+ return error51 instanceof SkillsPackageMetadataError || error51.name === "SkillsPackageMetadataError";
133973
+ }
133974
+ function isSkillsPackOutputError(error51) {
133975
+ return error51 instanceof SkillsPackOutputError || error51.name === "SkillsPackOutputError";
133976
+ }
133908
133977
  function parseGitHub(input) {
133909
133978
  const https = input.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/i);
133910
133979
  if (https)
@@ -134246,6 +134315,35 @@ async function getContentStore(rootDir, source = DEFAULT_SOURCE, targetVersion)
134246
134315
  await fetchSkillsTo(storePath, rootDir, source, targetVersion);
134247
134316
  return storePath;
134248
134317
  }
134318
+ async function getContentStoreForRead(rootDir, source = DEFAULT_SOURCE, targetVersion) {
134319
+ const fs7 = getFileSystem();
134320
+ const storePath = fs7.path.join(rootDir, source.storeName);
134321
+ if (source.isDefault && await storeMatchesVersionLine(fs7, storePath, targetVersion)) {
134322
+ logger.debug(`Reading skills from the existing store at ${storePath} (no fetch).`);
134323
+ return storePath;
134324
+ }
134325
+ await fetchSkillsTo(storePath, rootDir, source, targetVersion);
134326
+ return storePath;
134327
+ }
134328
+ async function storeMatchesVersionLine(fs7, storePath, targetVersion) {
134329
+ const line = parseSemver(targetVersion ?? package_default.version) ?? parseVersionLine(targetVersion ?? package_default.version);
134330
+ if (!line)
134331
+ return false;
134332
+ const skillsDir = fs7.path.join(storePath, "skills");
134333
+ const [entriesErr, entries] = await catchError(fs7.readdir(skillsDir));
134334
+ if (entriesErr || !entries?.length)
134335
+ return false;
134336
+ const [markerErr, markerText] = await catchError(fs7.readFile(fs7.path.join(storePath, SOURCE_MARKER_NAME), {
134337
+ encoding: "utf-8"
134338
+ }));
134339
+ if (markerErr || !markerText)
134340
+ return false;
134341
+ const [parseErr, marker] = catchError(() => JSON.parse(markerText));
134342
+ if (parseErr)
134343
+ return false;
134344
+ const version2 = asRecord(marker)?.version;
134345
+ return typeof version2 === "string" && matchesCliVersionLine(version2, line);
134346
+ }
134249
134347
  async function readSkillDescription(fs7, skillMdPath) {
134250
134348
  const [err, content] = await catchError(fs7.readFile(skillMdPath, { encoding: "utf-8" }));
134251
134349
  if (err || !content)
@@ -134637,7 +134735,11 @@ function mapPmError(pm, label, stderr, codeOrError) {
134637
134735
  function parsePmJson(pm, stdout, label) {
134638
134736
  const [parseError, parsed] = catchError(() => JSON.parse(stdout));
134639
134737
  if (parseError) {
134640
- throw new Error(`Unexpected ${pm} ${label} output`);
134738
+ const message = `Unexpected ${pm} ${label} output`;
134739
+ if (label.startsWith(`view ${SKILLS_PACKAGE_NAME}`)) {
134740
+ throw new SkillsPackageMetadataError(message);
134741
+ }
134742
+ throw new Error(message);
134641
134743
  }
134642
134744
  return parsed;
134643
134745
  }
@@ -134646,13 +134748,13 @@ async function pmViewJson(pm, args) {
134646
134748
  const pmArgs = pm === "bun" ? ["info", ...args, "--json"] : ["view", ...args, "--json"];
134647
134749
  return await withTempProject(async (dir) => {
134648
134750
  const stdout = await runPmCommand(pm, pmArgs, label, NPM_VIEW_TIMEOUT_MS2, dir);
134649
- return parseViewOutput(pm, stdout);
134751
+ return parseViewOutput(pm, stdout, label);
134650
134752
  });
134651
134753
  }
134652
- function parseViewOutput(pm, stdout) {
134754
+ function parseViewOutput(pm, stdout, label) {
134653
134755
  if (!stdout.trim())
134654
134756
  return;
134655
- return parsePmJson(pm, stdout, "view");
134757
+ return parsePmJson(pm, stdout, label);
134656
134758
  }
134657
134759
  async function yarnInfo(args) {
134658
134760
  const label = `info ${args.join(" ")}`;
@@ -134710,18 +134812,72 @@ function normalizeVersionList(value) {
134710
134812
  walk(value);
134711
134813
  return [...collected];
134712
134814
  }
134713
- function requireString(value, message) {
134714
- if (typeof value !== "string" || value.length === 0) {
134715
- throw new Error(message);
134815
+ function recordVersion(record3) {
134816
+ const version2 = record3.version;
134817
+ return typeof version2 === "string" && parseSemver(version2) ? version2 : undefined;
134818
+ }
134819
+ function recordDistTarball(record3) {
134820
+ const dist = asRecord(record3.dist);
134821
+ const tarball = dist?.tarball;
134822
+ return typeof tarball === "string" && tarball.length > 0 ? tarball : undefined;
134823
+ }
134824
+ function versionFromTarballText(value) {
134825
+ const [urlError, parsedUrl] = catchError(() => new URL(value));
134826
+ const pathText = urlError ? value : parsedUrl.pathname;
134827
+ const segments = pathText.split("/").map((segment) => decodeURIComponent(segment)).filter((segment) => segment.length > 0);
134828
+ for (const segment of segments) {
134829
+ if (parseSemver(segment))
134830
+ return segment;
134831
+ }
134832
+ const fileName = segments.at(-1);
134833
+ if (!fileName)
134834
+ return;
134835
+ const stem = fileName.endsWith(".tgz") ? fileName.slice(0, -".tgz".length) : fileName;
134836
+ for (let i = 0;i < stem.length - 1; i++) {
134837
+ if (stem[i] !== "-")
134838
+ continue;
134839
+ const version2 = stem.slice(i + 1);
134840
+ if (startsWithDigit(version2) && parseSemver(version2)) {
134841
+ return version2;
134842
+ }
134716
134843
  }
134717
- return value;
134844
+ return;
134845
+ }
134846
+ function startsWithDigit(value) {
134847
+ const first = value.charCodeAt(0);
134848
+ return first >= 48 && first <= 57;
134849
+ }
134850
+ function pickHighestVersionedString(values) {
134851
+ const candidates = values.filter((value) => typeof value === "string" && value.length > 0).map((value) => ({
134852
+ value,
134853
+ version: versionFromTarballText(value)
134854
+ })).filter((candidate) => candidate.version !== undefined);
134855
+ candidates.sort((a, b) => compareSemver2(b.version, a.version));
134856
+ return candidates[0]?.value;
134857
+ }
134858
+ function pickHighestVersionedRecordTarball(values) {
134859
+ const candidates = values.map(asRecord).filter((record3) => record3 !== undefined).map((record3) => ({
134860
+ version: recordVersion(record3),
134861
+ tarball: recordDistTarball(record3)
134862
+ })).filter((candidate) => candidate.version !== undefined && candidate.tarball !== undefined);
134863
+ candidates.sort((a, b) => compareSemver2(b.version, a.version));
134864
+ return candidates[0]?.tarball;
134718
134865
  }
134719
134866
  function coerceViewString(value) {
134720
134867
  let node2 = value;
134721
134868
  while (Array.isArray(node2) && node2.length === 1) {
134722
134869
  node2 = node2[0];
134723
134870
  }
134724
- return typeof node2 === "string" && node2.length > 0 ? node2 : undefined;
134871
+ if (typeof node2 === "string" && node2.length > 0)
134872
+ return node2;
134873
+ const record3 = asRecord(node2);
134874
+ const recordTarball = record3 ? recordDistTarball(record3) : undefined;
134875
+ if (recordTarball)
134876
+ return recordTarball;
134877
+ if (Array.isArray(node2)) {
134878
+ return pickHighestVersionedRecordTarball(node2) ?? pickHighestVersionedString(node2);
134879
+ }
134880
+ return;
134725
134881
  }
134726
134882
  function registryFromTarball(tarballUrl) {
134727
134883
  const [urlError, parsedUrl] = catchError(() => new URL(tarballUrl));
@@ -134734,16 +134890,21 @@ async function fetchMatchingSkillsPackageInfo(pm, targetVersion) {
134734
134890
  }
134735
134891
  const versions2 = await pmListVersions(pm, cliVersion);
134736
134892
  const selectedVersion = pickMatchingSkillsVersion(versions2, cliVersion);
134737
- const tarballUrl = pm === "npm" || pm === "pnpm" ? requireString(coerceViewString(await pmViewJson(pm, [
134893
+ const tarballUrl = pm === "npm" || pm === "pnpm" ? requireSkillsTarballUrl(selectedVersion, coerceViewString(await pmViewJson(pm, [
134738
134894
  `${SKILLS_PACKAGE_NAME}@${selectedVersion}`,
134739
134895
  "dist.tarball"
134740
- ])), `${SKILLS_PACKAGE_NAME}@${selectedVersion} does not declare dist.tarball`) : await pmResolveTarball(pm, selectedVersion);
134896
+ ]))) : await pmResolveTarball(pm, selectedVersion);
134741
134897
  return {
134742
134898
  version: selectedVersion,
134743
134899
  tarballUrl: tarballUrl ?? "",
134744
134900
  registryUrl: tarballUrl ? registryFromTarball(tarballUrl) : SKILLS_REGISTRY_URL
134745
134901
  };
134746
134902
  }
134903
+ function requireSkillsTarballUrl(selectedVersion, tarballUrl) {
134904
+ if (tarballUrl)
134905
+ return tarballUrl;
134906
+ throw new SkillsPackageMetadataError(`npm view ${SKILLS_PACKAGE_NAME}@${selectedVersion} dist.tarball returned no usable tarball URL`);
134907
+ }
134747
134908
  function parseVersionLine(version2) {
134748
134909
  const match = /^(\d+)\.(\d+)$/.exec(version2.trim());
134749
134910
  if (!match)
@@ -134816,19 +134977,23 @@ async function addAndCopyPackage(pm, packageInfo, destinationPath) {
134816
134977
  });
134817
134978
  }
134818
134979
  function readPackedFileName(packOutput) {
134819
- if (!Array.isArray(packOutput)) {
134820
- throw new TypeError(`Unexpected npm pack output for ${SKILLS_PACKAGE_NAME}`);
134821
- }
134822
- const firstEntry = asRecord(packOutput[0]);
134823
- const filename = typeof firstEntry?.filename === "string" ? firstEntry.filename : undefined;
134980
+ const entries = Array.isArray(packOutput) ? packOutput : packOutputObjectEntries(packOutput);
134981
+ const filename = entries.map((entry) => asRecord(entry)?.filename).find((value) => typeof value === "string" && value.length > 0);
134824
134982
  if (!filename) {
134825
- throw new TypeError(`Unexpected npm pack output for ${SKILLS_PACKAGE_NAME}`);
134983
+ throw new SkillsPackOutputError(`Unexpected npm pack output for ${SKILLS_PACKAGE_NAME}`);
134826
134984
  }
134827
134985
  if (filename.includes("/") || filename.includes("\\")) {
134828
134986
  throw new Error(`Unsafe npm pack filename for ${SKILLS_PACKAGE_NAME}`);
134829
134987
  }
134830
134988
  return filename;
134831
134989
  }
134990
+ function packOutputObjectEntries(packOutput) {
134991
+ const record3 = asRecord(packOutput);
134992
+ if (!record3)
134993
+ return [];
134994
+ const named = record3[SKILLS_PACKAGE_NAME];
134995
+ return named === undefined ? Object.values(record3) : [named];
134996
+ }
134832
134997
  async function writeSourceMarker(storePath, packageInfo) {
134833
134998
  const fs7 = getFileSystem();
134834
134999
  const marker = {
@@ -134993,7 +135158,7 @@ async function extractNpmTarballToDir(tarData, destinationDir) {
134993
135158
  await extractTarEntry2(fs7, destinationDir, entryName, entry);
134994
135159
  }
134995
135160
  }
134996
- var SKILLS_PACKAGE_NAME = "@uipath/skills", SKILLS_REGISTRY_URL = "https://registry.npmjs.org", REPO_URL = "https://www.npmjs.com/package/@uipath/skills", SOURCE_MARKER_NAME = ".uipath-skills-source.json", STORE_NAME, TAR_BLOCK_SIZE = 512, NPM_VIEW_TIMEOUT_MS2 = 30000, NPM_PACK_TIMEOUT_MS = 60000, SHELL_SAFE_ARG2, SHELL_SAFE_COMMAND_LINE2, PM_PREFERENCE, PM_OVERRIDE_ENV = "UIP_SKILLS_PM", childProcessModulePromise2, SkillSourceError, SkillsRegistryAuthError, DEFAULT_SOURCE, MAX_SKILL_SCAN_DEPTH = 16, MANIFEST_NAME = "manifest.json", cachedPackageManager = null, REGISTRY_AUTH_HINT = "The package manager could not authenticate to the registry. If you are installing an alpha/internal build from GitHub Packages, add to your .npmrc: '@uipath:registry=https://npm.pkg.github.com/' and '//npm.pkg.github.com/:_authToken=<token>', where <token> is a GitHub PAT with the 'read:packages' scope, authorized for the UiPath org via 'Configure SSO'. This is a different credential from your 'uip login' token.";
135161
+ var SKILLS_PACKAGE_NAME = "@uipath/skills", SKILLS_REGISTRY_URL = "https://registry.npmjs.org", REPO_URL = "https://www.npmjs.com/package/@uipath/skills", SOURCE_MARKER_NAME = ".uipath-skills-source.json", STORE_NAME, TAR_BLOCK_SIZE = 512, NPM_VIEW_TIMEOUT_MS2 = 30000, NPM_PACK_TIMEOUT_MS = 60000, SHELL_SAFE_ARG2, SHELL_SAFE_COMMAND_LINE2, PM_PREFERENCE, PM_OVERRIDE_ENV = "UIP_SKILLS_PM", childProcessModulePromise2, SkillSourceError, SkillsRegistryAuthError, SkillsPackageMetadataError, SkillsPackOutputError, DEFAULT_SOURCE, MAX_SKILL_SCAN_DEPTH = 16, MANIFEST_NAME = "manifest.json", cachedPackageManager = null, REGISTRY_AUTH_HINT = "The package manager could not authenticate to the registry. If you are installing an alpha/internal build from GitHub Packages, add to your .npmrc: '@uipath:registry=https://npm.pkg.github.com/' and '//npm.pkg.github.com/:_authToken=<token>', where <token> is a GitHub PAT with the 'read:packages' scope, authorized for the UiPath org via 'Configure SSO'. This is a different credential from your 'uip login' token.";
134997
135162
  var init_contentStore = __esm(() => {
134998
135163
  init_src2();
134999
135164
  init_src();
@@ -135019,6 +135184,18 @@ var init_contentStore = __esm(() => {
135019
135184
  this.name = "SkillsRegistryAuthError";
135020
135185
  }
135021
135186
  };
135187
+ SkillsPackageMetadataError = class SkillsPackageMetadataError extends Error {
135188
+ constructor(message) {
135189
+ super(message);
135190
+ this.name = "SkillsPackageMetadataError";
135191
+ }
135192
+ };
135193
+ SkillsPackOutputError = class SkillsPackOutputError extends Error {
135194
+ constructor(message) {
135195
+ super(message);
135196
+ this.name = "SkillsPackOutputError";
135197
+ }
135198
+ };
135022
135199
  DEFAULT_SOURCE = {
135023
135200
  repoUrl: REPO_URL,
135024
135201
  branch: null,
@@ -135562,6 +135739,36 @@ var init_agents = __esm(() => {
135562
135739
  };
135563
135740
  });
135564
135741
 
135742
+ // src/commands/skills/errorMessages.ts
135743
+ function getSkillsSourceFailureDetails(error51) {
135744
+ if (isPermissionError(error51)) {
135745
+ return {
135746
+ instructions: "Fix write access to the path in the error message (commonly the skills store under ~/.uipath/.skills, or the target project's .uipath/.skills when using --local or --path), then re-run the command.",
135747
+ retry: "RetryWillNotFix"
135748
+ };
135749
+ }
135750
+ if (isSkillsPackageMetadataError(error51)) {
135751
+ return {
135752
+ instructions: "The registry lookup succeeded, but @uipath/skills metadata could not be read or did not include a usable tarball URL for the selected version. Check the package metadata in the configured npm registry, then retry.",
135753
+ retry: "RetryWillNotFix"
135754
+ };
135755
+ }
135756
+ if (isSkillsPackOutputError(error51)) {
135757
+ return {
135758
+ instructions: "Your npm version prints a `pack --json` shape this CLI cannot read. Update the CLI (`uip update`), or set UIP_SKILLS_PM=pnpm (or bun/yarn) to fetch skills with another package manager, which skips npm pack entirely.",
135759
+ retry: "RetryWillNotFix"
135760
+ };
135761
+ }
135762
+ return {
135763
+ instructions: "Check network connectivity and try again. Ensure the @uipath/skills package is available from the configured npm registry.",
135764
+ retry: "RetryLater"
135765
+ };
135766
+ }
135767
+ var init_errorMessages = __esm(() => {
135768
+ init_toolService();
135769
+ init_contentStore();
135770
+ });
135771
+
135565
135772
  // src/commands/skills/skillCatalog.ts
135566
135773
  function asRecord2(value) {
135567
135774
  if (!value || typeof value !== "object" || Array.isArray(value)) {
@@ -135829,7 +136036,7 @@ function getRootDir(options) {
135829
136036
  async function resolveCatalog(options) {
135830
136037
  const rootDir = getRootDir(options);
135831
136038
  const source = resolveSkillSource(options.repo, options.branch);
135832
- const storePath = await getContentStore(rootDir, source);
136039
+ const storePath = await getContentStoreForRead(rootDir, source);
135833
136040
  const shadowed = [];
135834
136041
  const skills = await getAvailableSkills(storePath, shadowed);
135835
136042
  const catalog = await buildSkillCatalog(skills, {
@@ -135865,10 +136072,12 @@ async function loadCatalogOrReport(options) {
135865
136072
  if (error51) {
135866
136073
  if (error51 instanceof SkillSourceError)
135867
136074
  throw error51;
136075
+ const details = getSkillsSourceFailureDetails(error51);
135868
136076
  OutputFormatter.error({
135869
136077
  Result: RESULTS.Failure,
135870
136078
  Message: `Failed to load skills catalog: ${error51.message}`,
135871
- Instructions: "Check network connectivity and try again. Ensure the @uipath/skills package is available from the configured npm registry."
136079
+ Instructions: details.instructions,
136080
+ Retry: details.retry
135872
136081
  });
135873
136082
  processContext.exit(1);
135874
136083
  return null;
@@ -135957,6 +136166,7 @@ var init_catalogCommands = __esm(() => {
135957
136166
  init_src2();
135958
136167
  init_src();
135959
136168
  init_contentStore();
136169
+ init_errorMessages();
135960
136170
  init_skillCatalog();
135961
136171
  SKILLS_LIST_EXAMPLES = [
135962
136172
  {
@@ -136032,23 +136242,6 @@ var init_catalogCommands = __esm(() => {
136032
136242
  ];
136033
136243
  });
136034
136244
 
136035
- // src/commands/skills/errorMessages.ts
136036
- function getSkillsSourceFailureDetails(error51) {
136037
- if (isPermissionError(error51)) {
136038
- return {
136039
- instructions: "Fix write access to the path in the error message (commonly the skills store under ~/.uipath/.skills, or the target project's .uipath/.skills when using --local or --path), then re-run the command.",
136040
- retry: "RetryWillNotFix"
136041
- };
136042
- }
136043
- return {
136044
- instructions: "Check network connectivity and try again. Ensure the @uipath/skills package is available from the configured npm registry.",
136045
- retry: "RetryLater"
136046
- };
136047
- }
136048
- var init_errorMessages = __esm(() => {
136049
- init_toolService();
136050
- });
136051
-
136052
136245
  // src/commands/skills/prompt.ts
136053
136246
  async function promptAgentSelection(operation, isLocal, preselected = [], isDefaultSource = true) {
136054
136247
  const visible = ALL_AGENTS.filter((a) => !(isLocal && isDefaultSource && AGENT_DEFS[a].globalOnly));
@@ -141831,7 +142024,7 @@ async function checkCliVersion(opts) {
141831
142024
  }));
141832
142025
  if (err) {
141833
142026
  logger.debug(`CLI version probe failed: ${err.message}`);
141834
- return skipped(opts.cliPkgVersion, "network error");
142027
+ return skipped(opts.cliPkgVersion, isNpmViewMetadataError(err) ? err.message : "network error");
141835
142028
  }
141836
142029
  if (!latest) {
141837
142030
  if (pin) {
@@ -143415,4 +143608,4 @@ export {
143415
143608
  ready
143416
143609
  };
143417
143610
 
143418
- //# debugId=F0299CABFEEFB65564756E2164756E21
143611
+ //# debugId=A10E069468DA983464756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/cli",
3
3
  "license": "MIT",
4
- "version": "1.200.0-preview.120",
4
+ "version": "1.200.0-preview.126",
5
5
  "description": "Cross platform CLI for UiPath",
6
6
  "repository": {
7
7
  "type": "git",
@@ -38,5 +38,5 @@
38
38
  "mihaigirleanu",
39
39
  "vlad-uipath"
40
40
  ],
41
- "gitHead": "173ad4b4930bd3e17a493b32e9f1c3c616ea1c10"
41
+ "gitHead": "c2f816a61073d9668c4a3f4e80999de71f417818"
42
42
  }