@uipath/cli 1.201.0-preview.125 → 1.201.0-preview.127

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
@@ -68718,7 +68718,7 @@ var init_package = __esm(() => {
68718
68718
  package_default = {
68719
68719
  name: "@uipath/cli",
68720
68720
  license: "MIT",
68721
- version: "1.201.0-preview.125",
68721
+ version: "1.201.0-preview.127",
68722
68722
  description: "Cross platform CLI for UiPath",
68723
68723
  repository: {
68724
68724
  type: "git",
@@ -110074,6 +110074,9 @@ function loadChildProcess2() {
110074
110074
  function isSkillsPackageMetadataError(error51) {
110075
110075
  return error51 instanceof SkillsPackageMetadataError || error51.name === "SkillsPackageMetadataError";
110076
110076
  }
110077
+ function isSkillsPackOutputError(error51) {
110078
+ return error51 instanceof SkillsPackOutputError || error51.name === "SkillsPackOutputError";
110079
+ }
110077
110080
  function parseGitHub(input) {
110078
110081
  const https = input.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/i);
110079
110082
  if (https)
@@ -110415,6 +110418,35 @@ async function getContentStore(rootDir, source = DEFAULT_SOURCE, targetVersion)
110415
110418
  await fetchSkillsTo(storePath, rootDir, source, targetVersion);
110416
110419
  return storePath;
110417
110420
  }
110421
+ async function getContentStoreForRead(rootDir, source = DEFAULT_SOURCE, targetVersion) {
110422
+ const fs7 = getFileSystem();
110423
+ const storePath = fs7.path.join(rootDir, source.storeName);
110424
+ if (source.isDefault && await storeMatchesVersionLine(fs7, storePath, targetVersion)) {
110425
+ logger.debug(`Reading skills from the existing store at ${storePath} (no fetch).`);
110426
+ return storePath;
110427
+ }
110428
+ await fetchSkillsTo(storePath, rootDir, source, targetVersion);
110429
+ return storePath;
110430
+ }
110431
+ async function storeMatchesVersionLine(fs7, storePath, targetVersion) {
110432
+ const line = parseSemver(targetVersion ?? package_default.version) ?? parseVersionLine(targetVersion ?? package_default.version);
110433
+ if (!line)
110434
+ return false;
110435
+ const skillsDir = fs7.path.join(storePath, "skills");
110436
+ const [entriesErr, entries] = await catchError(fs7.readdir(skillsDir));
110437
+ if (entriesErr || !entries?.length)
110438
+ return false;
110439
+ const [markerErr, markerText] = await catchError(fs7.readFile(fs7.path.join(storePath, SOURCE_MARKER_NAME), {
110440
+ encoding: "utf-8"
110441
+ }));
110442
+ if (markerErr || !markerText)
110443
+ return false;
110444
+ const [parseErr, marker] = catchError(() => JSON.parse(markerText));
110445
+ if (parseErr)
110446
+ return false;
110447
+ const version2 = asRecord(marker)?.version;
110448
+ return typeof version2 === "string" && matchesCliVersionLine(version2, line);
110449
+ }
110418
110450
  async function readSkillDescription(fs7, skillMdPath) {
110419
110451
  const [err, content] = await catchError(fs7.readFile(skillMdPath, { encoding: "utf-8" }));
110420
110452
  if (err || !content)
@@ -111048,19 +111080,23 @@ async function addAndCopyPackage(pm, packageInfo, destinationPath) {
111048
111080
  });
111049
111081
  }
111050
111082
  function readPackedFileName(packOutput) {
111051
- if (!Array.isArray(packOutput)) {
111052
- throw new TypeError(`Unexpected npm pack output for ${SKILLS_PACKAGE_NAME}`);
111053
- }
111054
- const firstEntry = asRecord(packOutput[0]);
111055
- const filename = typeof firstEntry?.filename === "string" ? firstEntry.filename : undefined;
111083
+ const entries = Array.isArray(packOutput) ? packOutput : packOutputObjectEntries(packOutput);
111084
+ const filename = entries.map((entry) => asRecord(entry)?.filename).find((value) => typeof value === "string" && value.length > 0);
111056
111085
  if (!filename) {
111057
- throw new TypeError(`Unexpected npm pack output for ${SKILLS_PACKAGE_NAME}`);
111086
+ throw new SkillsPackOutputError(`Unexpected npm pack output for ${SKILLS_PACKAGE_NAME}`);
111058
111087
  }
111059
111088
  if (filename.includes("/") || filename.includes("\\")) {
111060
111089
  throw new Error(`Unsafe npm pack filename for ${SKILLS_PACKAGE_NAME}`);
111061
111090
  }
111062
111091
  return filename;
111063
111092
  }
111093
+ function packOutputObjectEntries(packOutput) {
111094
+ const record3 = asRecord(packOutput);
111095
+ if (!record3)
111096
+ return [];
111097
+ const named = record3[SKILLS_PACKAGE_NAME];
111098
+ return named === undefined ? Object.values(record3) : [named];
111099
+ }
111064
111100
  async function writeSourceMarker(storePath, packageInfo) {
111065
111101
  const fs7 = getFileSystem();
111066
111102
  const marker = {
@@ -111225,7 +111261,7 @@ async function extractNpmTarballToDir(tarData, destinationDir) {
111225
111261
  await extractTarEntry2(fs7, destinationDir, entryName, entry);
111226
111262
  }
111227
111263
  }
111228
- 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, 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.";
111264
+ 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.";
111229
111265
  var init_contentStore = __esm(() => {
111230
111266
  init_src2();
111231
111267
  init_src();
@@ -111257,6 +111293,12 @@ var init_contentStore = __esm(() => {
111257
111293
  this.name = "SkillsPackageMetadataError";
111258
111294
  }
111259
111295
  };
111296
+ SkillsPackOutputError = class SkillsPackOutputError extends Error {
111297
+ constructor(message) {
111298
+ super(message);
111299
+ this.name = "SkillsPackOutputError";
111300
+ }
111301
+ };
111260
111302
  DEFAULT_SOURCE = {
111261
111303
  repoUrl: REPO_URL,
111262
111304
  branch: null,
@@ -111814,6 +111856,12 @@ function getSkillsSourceFailureDetails(error51) {
111814
111856
  retry: "RetryWillNotFix"
111815
111857
  };
111816
111858
  }
111859
+ if (isSkillsPackOutputError(error51)) {
111860
+ return {
111861
+ 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.",
111862
+ retry: "RetryWillNotFix"
111863
+ };
111864
+ }
111817
111865
  return {
111818
111866
  instructions: "Check network connectivity and try again. Ensure the @uipath/skills package is available from the configured npm registry.",
111819
111867
  retry: "RetryLater"
@@ -112091,7 +112139,7 @@ function getRootDir(options) {
112091
112139
  async function resolveCatalog(options) {
112092
112140
  const rootDir = getRootDir(options);
112093
112141
  const source = resolveSkillSource(options.repo, options.branch);
112094
- const storePath = await getContentStore(rootDir, source);
112142
+ const storePath = await getContentStoreForRead(rootDir, source);
112095
112143
  const shadowed = [];
112096
112144
  const skills = await getAvailableSkills(storePath, shadowed);
112097
112145
  const catalog = await buildSkillCatalog(skills, {
@@ -146502,4 +146550,4 @@ export {
146502
146550
  ready
146503
146551
  };
146504
146552
 
146505
- //# debugId=A9C1057DC86744DF64756E2164756E21
146553
+ //# debugId=29C27359FF3F342564756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/cli",
3
3
  "license": "MIT",
4
- "version": "1.201.0-preview.125",
4
+ "version": "1.201.0-preview.127",
5
5
  "description": "Cross platform CLI for UiPath",
6
6
  "repository": {
7
7
  "type": "git",
@@ -42,5 +42,5 @@
42
42
  "kerberos": "7.0.0",
43
43
  "node-expose-sspi": "0.1.60"
44
44
  },
45
- "gitHead": "3429b3f8c5a137ace2fa1d6d4916a7168cc632fa"
45
+ "gitHead": "a6c7f4f0ea04813ce939f31efc41bd9990d46e20"
46
46
  }