@uipath/cli 1.206.0-preview.306 → 1.207.0-preview.307

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 (69) hide show
  1. package/README.md +48 -0
  2. package/dist/{browser-strategy-p5fhwxqj.js → browser-strategy-5rfwnk5q.js} +1 -1
  3. package/dist/cli-1jpx8z2w.js +28 -0
  4. package/dist/cliInstaller-3dxg6fbd.js +23 -0
  5. package/dist/{contentStore-34hat2cd.js → contentStore-5p86z7qq.js} +7 -6
  6. package/dist/{environmentInfo-tr3pt6x1.js → environmentInfo-wp5jthdh.js} +6 -6
  7. package/dist/{feedbackPrompts-bx209g5v.js → feedbackPrompts-fc66gq0p.js} +3 -3
  8. package/dist/forcedUpdate-fm57455c.js +21 -0
  9. package/dist/{handlers-jjwt24f2.js → handlers-rg3d62gb.js} +13 -9
  10. package/dist/index-2f6vv7yr.js +81 -0
  11. package/dist/index-319vtrwd.js +264 -0
  12. package/dist/index-33wtbzyw.js +248 -0
  13. package/dist/index-5dbc9t09.js +41 -0
  14. package/dist/index-5ygg5mrs.js +1272 -0
  15. package/dist/{index-99emfvtm.js → index-65pyx6c9.js} +4 -2
  16. package/dist/{index-rr5hdtcy.js → index-81197qe5.js} +15 -17
  17. package/dist/{index-2mm750yx.js → index-8n0z4r6f.js} +69 -13
  18. package/dist/{index-8zhmg5tz.js → index-8pk6n4t9.js} +2 -2
  19. package/dist/{index-nsrrst23.js → index-ack311y7.js} +12 -2
  20. package/dist/index-afhekp0a.js +331 -0
  21. package/dist/{index-szbq3m4j.js → index-bf2mdvne.js} +8 -12
  22. package/dist/{index-2n2vr5w5.js → index-dt6mjnkf.js} +39 -57
  23. package/dist/{index-85fgzk87.js → index-dtgfa304.js} +1 -1
  24. package/dist/{index-y7d0cth0.js → index-e82sznr2.js} +7 -7
  25. package/dist/index-ej6eeger.js +23 -0
  26. package/dist/{index-bxc30q35.js → index-gk5pc8xr.js} +2 -2
  27. package/dist/{index-7q9kcs3w.js → index-h2ctqv68.js} +14 -5
  28. package/dist/{index-m780gg7f.js → index-hfvbp7ay.js} +30 -14
  29. package/dist/index-jk7em40j.js +37 -0
  30. package/dist/{index-691s5342.js → index-jn06044v.js} +2130 -834
  31. package/dist/{index-vhn8f5d2.js → index-kdr4xvby.js} +5 -5
  32. package/dist/{index-ckp8r4dh.js → index-mb62swmp.js} +2 -2
  33. package/dist/index-nzfpbep9.js +14 -0
  34. package/dist/{index-z070caqq.js → index-p64w2wrt.js} +30 -8
  35. package/dist/{index-8x2rp038.js → index-petywj9n.js} +81 -58
  36. package/dist/{index-nn8qzaxe.js → index-phkawd97.js} +2 -2
  37. package/dist/{index-ede5v6yy.js → index-q3f93ttm.js} +26 -17
  38. package/dist/{index-3s642t05.js → index-spnvnhbf.js} +7 -10
  39. package/dist/index-v7yphxb8.js +118 -0
  40. package/dist/index-vrfbee4d.js +340 -0
  41. package/dist/{index-69mcde3n.js → index-xw81b1gn.js} +196 -81
  42. package/dist/{index-wg3cne7n.js → index-xxms6rt8.js} +24 -5
  43. package/dist/{index-21kns9qg.js → index-y7v9rkq9.js} +1 -1
  44. package/dist/{index-fdztq951.js → index-zhp702kh.js} +393 -82
  45. package/dist/index.js +23 -18
  46. package/dist/{install-kgcwdbqs.js → install-h76qyy1e.js} +6 -7
  47. package/dist/{node-strategy-p1n8wr5s.js → node-strategy-9t0ttffv.js} +2 -2
  48. package/dist/{project-context-caht70an.js → project-context-rc4ghykm.js} +13 -5
  49. package/dist/{prompt-9ze9zy34.js → prompt-5vbvcsds.js} +5 -5
  50. package/dist/{server-qg4rm5e3.js → server-8c4jwqjh.js} +5 -5
  51. package/dist/{skillCatalog-fvrcgryd.js → skillCatalog-bqya1aer.js} +8 -7
  52. package/dist/skillsService-8yjvmz8c.js +35 -0
  53. package/dist/{telemetry-drain-rt346cfz.js → telemetry-drain-8qr5tzmf.js} +2 -2
  54. package/dist/tree-fk9gwh4v.js +16 -0
  55. package/dist/updateService-9qew50s3.js +377 -0
  56. package/dist/updateService.cli-xtqp78g7.js +15 -0
  57. package/dist/updateService.skills-e2pbe2w6.js +27 -0
  58. package/dist/updateService.tools-m58m2fbt.js +19 -0
  59. package/package.json +2 -2
  60. package/dist/cli-7rv7qys0.js +0 -23
  61. package/dist/index-3qp7d08f.js +0 -240
  62. package/dist/index-3zf0ywpb.js +0 -95
  63. package/dist/index-753mncpq.js +0 -271
  64. package/dist/index-w3my9pw8.js +0 -45
  65. package/dist/skillsService-0387c5f0.js +0 -29
  66. package/dist/tree-4dhk82fh.js +0 -17
  67. package/dist/updateService-a3ypvwz8.js +0 -522
  68. package/dist/updateService.skills-nkdzyrwv.js +0 -22
  69. package/dist/updateService.tools-3zfct9yk.js +0 -16
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  getFileSystem2,
3
3
  getFileSystemAsync2
4
- } from "./index-z070caqq.js";
4
+ } from "./index-p64w2wrt.js";
5
5
  import {
6
6
  catchError,
7
7
  Command,
8
8
  logger,
9
9
  REGISTER_EXPORT
10
- } from "./index-fdztq951.js";
10
+ } from "./index-zhp702kh.js";
11
11
  import {
12
12
  getGlobalNpmUipathDir,
13
13
  getEnvToolsDirsDeclaration,
14
14
  TOOLS_WHITELIST,
15
15
  WHITELIST_BY_SHORT_NAME
16
- } from "./index-69mcde3n.js";
16
+ } from "./index-xw81b1gn.js";
17
17
 
18
18
  // src/services/storage.ts
19
19
  class GeneralizedStorage {
@@ -114,7 +114,7 @@ function isRunningFromSource() {
114
114
  var _isRunningFromSource = isRunningFromSource();
115
115
  var _isBrowser = !(typeof process !== "undefined" && process.versions && process.versions.node);
116
116
  function joinPath(...parts) {
117
- return parts.filter((p) => p).join("/").replace(/\/+/g, "/");
117
+ return getFileSystem2().path.join(...parts);
118
118
  }
119
119
  async function discoverToolPaths(toolsDirs) {
120
120
  const [initError] = await catchError(storage.init());
@@ -389,4 +389,4 @@ async function dirsContainAnyPlugin(dirs) {
389
389
 
390
390
  export { storage, isInsideNodeModules, isLocalWorkspaceDir, discoverToolPaths, importTool, importPackagerTool, importToolLibraryModule, resolveToolsDirs };
391
391
 
392
- //# debugId=0DD9EAC63C4A8F6364756E2164756E21
392
+ //# debugId=18DCD4B82887544564756E2164756E21
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getFileSystem2
3
- } from "./index-z070caqq.js";
3
+ } from "./index-p64w2wrt.js";
4
4
  import {
5
5
  catchError
6
- } from "./index-fdztq951.js";
6
+ } from "./index-zhp702kh.js";
7
7
 
8
8
  // src/commands/skills/agents/detect.ts
9
9
  import { spawn } from "node:child_process";
@@ -0,0 +1,14 @@
1
+ // src/utils/samePath.ts
2
+ function samePath(a, b) {
3
+ const norm = (p) => {
4
+ let forward = p.replaceAll("\\", "/");
5
+ while (forward.endsWith("/"))
6
+ forward = forward.slice(0, -1);
7
+ return process.platform === "win32" ? forward.toLowerCase() : forward;
8
+ };
9
+ return norm(a) === norm(b);
10
+ }
11
+
12
+ export { samePath };
13
+
14
+ //# debugId=7CE141C2A3D9EA9F64756E2164756E21
@@ -47,12 +47,26 @@ class NodeFileSystem {
47
47
  throw error;
48
48
  }
49
49
  }
50
- async writeFile(filePath, data) {
50
+ async writeFile(filePath, data, options) {
51
51
  const dir = path.dirname(filePath);
52
52
  if (dir) {
53
53
  await fs.mkdir(dir, { recursive: true });
54
54
  }
55
- await fs.writeFile(filePath, data);
55
+ if (options?.mode === undefined || process.platform === "win32") {
56
+ if (options?.exclusive) {
57
+ await fs.writeFile(filePath, data, { flag: "wx" });
58
+ } else {
59
+ await fs.writeFile(filePath, data);
60
+ }
61
+ return;
62
+ }
63
+ const handle = await fs.open(filePath, options.exclusive ? "wx" : "w", options.mode);
64
+ try {
65
+ await handle.chmod(options.mode);
66
+ await handle.writeFile(data);
67
+ } finally {
68
+ await handle.close();
69
+ }
56
70
  }
57
71
  async appendFile(filePath, data) {
58
72
  const dir = path.dirname(filePath);
@@ -87,7 +101,8 @@ class NodeFileSystem {
87
101
  isDirectory: () => stats.isDirectory(),
88
102
  size: stats.size,
89
103
  mtimeMs: stats.mtimeMs,
90
- ctimeMs: stats.ctimeMs
104
+ ctimeMs: stats.ctimeMs,
105
+ mode: stats.mode
91
106
  };
92
107
  } catch (error) {
93
108
  if (this.isEnoent(error))
@@ -98,8 +113,13 @@ class NodeFileSystem {
98
113
  async exists(filePath) {
99
114
  return existsSync(filePath);
100
115
  }
101
- async mkdir(dirPath) {
102
- await fs.mkdir(dirPath, { recursive: true });
116
+ async mkdir(dirPath, options) {
117
+ await fs.mkdir(dirPath, { recursive: true, mode: options?.mode });
118
+ }
119
+ async chmod(targetPath, mode) {
120
+ if (process.platform === "win32")
121
+ return;
122
+ await fs.chmod(targetPath, mode);
103
123
  }
104
124
  async acquireLock(lockPath) {
105
125
  const canonicalPath = await this.canonicalizeLockTarget(lockPath);
@@ -249,7 +269,7 @@ class NodeFileSystem {
249
269
  async getTempDir() {
250
270
  return await fs.mkdtemp(path.join(os.tmpdir(), "uipath-fs-"));
251
271
  }
252
- async copyDirectory(sourcePath, destPath) {
272
+ async copyDirectory(sourcePath, destPath, options) {
253
273
  const sourceStats = await this.stat(sourcePath);
254
274
  if (!sourceStats) {
255
275
  throw new Error(`Source directory does not exist: ${sourcePath}`);
@@ -266,7 +286,9 @@ class NodeFileSystem {
266
286
  if (!entryStats)
267
287
  continue;
268
288
  if (entryStats.isDirectory()) {
269
- await this.copyDirectory(srcEntry, destEntry);
289
+ if (options?.skipDirectoryNames?.includes(entry))
290
+ continue;
291
+ await this.copyDirectory(srcEntry, destEntry, options);
270
292
  } else if (entryStats.isFile()) {
271
293
  const content = await this.readFile(srcEntry);
272
294
  if (content !== null) {
@@ -290,4 +312,4 @@ var getFileSystemAsync2 = async () => fsInstance;
290
312
 
291
313
  export { getFileSystem2, getFileSystemAsync2 };
292
314
 
293
- //# debugId=69A68E101956586864756E2164756E21
315
+ //# debugId=B7362B128856D2D464756E2164756E21
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  getFileSystem2
3
- } from "./index-z070caqq.js";
3
+ } from "./index-p64w2wrt.js";
4
4
  import {
5
5
  catchError,
6
+ describeConnectivityError,
6
7
  logger,
7
8
  UIPATH_HOME_DIR
8
- } from "./index-fdztq951.js";
9
+ } from "./index-zhp702kh.js";
9
10
  import {
10
11
  yaml
11
12
  } from "./index-5gce5wfd.js";
@@ -14,20 +15,28 @@ import {
14
15
  mergeEnvCaseInsensitive,
15
16
  NPM_FETCH_RETRY_ENV,
16
17
  RegistryTlsError,
17
- npmTlsErrorCode
18
- } from "./index-3zf0ywpb.js";
18
+ npmTlsErrorCode,
19
+ npmErrorCode
20
+ } from "./index-xw81b1gn.js";
21
+ import {
22
+ asRecord,
23
+ SOURCE_MARKER_NAME,
24
+ STORE_NAME,
25
+ readStoreSkillsVersion
26
+ } from "./index-jk7em40j.js";
19
27
  import {
20
28
  SkillSourceError,
21
29
  SkillsRegistryAuthError,
22
30
  SkillsPackageMetadataError,
31
+ SkillsPinNotPublishedError,
23
32
  SkillsPackOutputError
24
- } from "./index-nsrrst23.js";
33
+ } from "./index-ack311y7.js";
25
34
  import {
26
35
  commandOnPath
27
- } from "./index-ckp8r4dh.js";
36
+ } from "./index-mb62swmp.js";
28
37
  import {
29
38
  package_default
30
- } from "./index-nn8qzaxe.js";
39
+ } from "./index-phkawd97.js";
31
40
 
32
41
  // src/commands/skills/contentStore.ts
33
42
  import { createHash, randomUUID } from "node:crypto";
@@ -37,8 +46,6 @@ import { gunzipSync } from "node:zlib";
37
46
  var SKILLS_PACKAGE_NAME = "@uipath/skills";
38
47
  var SKILLS_REGISTRY_URL = "https://registry.npmjs.org";
39
48
  var REPO_URL2 = "https://www.npmjs.com/package/@uipath/skills";
40
- var SOURCE_MARKER_NAME = ".uipath-skills-source.json";
41
- var STORE_NAME = `${UIPATH_HOME_DIR}/.skills`;
42
49
  var TAR_BLOCK_SIZE = 512;
43
50
  var NPM_VIEW_TIMEOUT_MS = 30000;
44
51
  var NPM_PACK_TIMEOUT_MS = 60000;
@@ -172,6 +179,28 @@ async function resolveLocalSkillsStore(fs) {
172
179
  const dir = dirname(pkgJsonPath);
173
180
  return await hasSkillsDir(dir) ? dir : undefined;
174
181
  }
182
+ async function localStoreIsOn(fs, storeDir, targetVersion, exactVersion) {
183
+ const storeVersion = await readStoreSkillsVersion(storeDir) ?? await readPackageVersion(fs, storeDir);
184
+ if (storeVersion === undefined)
185
+ return false;
186
+ return versionIsOnTarget(storeVersion, targetVersion, exactVersion);
187
+ }
188
+ function versionIsOnTarget(version, targetVersion, exactVersion) {
189
+ if (exactVersion)
190
+ return sameVersion(version, exactVersion);
191
+ if (!targetVersion)
192
+ return false;
193
+ const line = parseSemver(targetVersion);
194
+ return line !== null && matchesCliVersionLine(version, line);
195
+ }
196
+ async function readPackageVersion(fs, dir) {
197
+ const [readErr, text] = await catchError(fs.readFile(fs.path.join(dir, "package.json"), { encoding: "utf-8" }));
198
+ if (readErr || !text)
199
+ return;
200
+ const [parseErr, parsed] = catchError(() => JSON.parse(text));
201
+ const version = parseErr ? undefined : asRecord(parsed)?.version;
202
+ return typeof version === "string" ? version : undefined;
203
+ }
175
204
  async function removeStoreForSwap(fs, targetPath) {
176
205
  const [rmError] = await catchError(fs.rm(targetPath));
177
206
  if (!rmError)
@@ -205,7 +234,7 @@ async function copySkillsStore(fs, sourceDir, targetPath) {
205
234
  await fs.writeFile(manifestPath, savedManifest);
206
235
  }
207
236
  }
208
- async function fetchSkillsTo2(targetPath, rootDir, source = DEFAULT_SOURCE2, targetVersion) {
237
+ async function fetchSkillsTo2(targetPath, rootDir, source = DEFAULT_SOURCE2, targetVersion, exactVersion) {
209
238
  const fs = getFileSystem2();
210
239
  if (source.localDir) {
211
240
  await fetchSkillsFromLocalDir(targetPath, source.localDir);
@@ -215,10 +244,10 @@ async function fetchSkillsTo2(targetPath, rootDir, source = DEFAULT_SOURCE2, tar
215
244
  await fetchSkillsFromGit(targetPath, rootDir, source);
216
245
  return;
217
246
  }
218
- const [infoErr, resolved] = await catchError(resolveSkillsDownload(targetVersion));
247
+ const [infoErr, resolved] = await catchError(resolveSkillsDownload(targetVersion, exactVersion));
219
248
  if (infoErr || !resolved) {
220
249
  const localStore = await resolveLocalSkillsStore(fs);
221
- if (localStore) {
250
+ if (localStore && (!exactVersion && !targetVersion || await localStoreIsOn(fs, localStore, targetVersion, exactVersion))) {
222
251
  logger.info(`Could not resolve ${SKILLS_PACKAGE_NAME} from a registry (${infoErr?.message ?? "unknown error"}); using the locally-installed package at ${localStore}.`);
223
252
  await copySkillsStore(fs, localStore, targetPath);
224
253
  return;
@@ -240,9 +269,9 @@ async function fetchSkillsTo2(targetPath, rootDir, source = DEFAULT_SOURCE2, tar
240
269
  await catchError(fs.rm(tmpPath));
241
270
  }
242
271
  }
243
- async function resolveSkillsDownload(targetVersion) {
272
+ async function resolveSkillsDownload(targetVersion, exactVersion) {
244
273
  const pm = await resolvePackageManager();
245
- const packageInfo = await fetchMatchingSkillsPackageInfo(pm, targetVersion ?? package_default.version);
274
+ const packageInfo = await fetchMatchingSkillsPackageInfo(pm, targetVersion ?? package_default.version, exactVersion);
246
275
  return { pm, packageInfo };
247
276
  }
248
277
  async function fetchSkillsFromGit(targetPath, rootDir, source) {
@@ -459,40 +488,31 @@ async function flattenSingleTopLevelDir(fs, storePath) {
459
488
  }
460
489
  await fs.rm(nestedDir);
461
490
  }
462
- async function getContentStore2(rootDir, source = DEFAULT_SOURCE2, targetVersion) {
491
+ async function getContentStore2(rootDir, source = DEFAULT_SOURCE2, targetVersion, exactVersion) {
463
492
  const fs = getFileSystem2();
464
493
  const storePath = fs.path.join(rootDir, source.storeName);
465
- await fetchSkillsTo2(storePath, rootDir, source, targetVersion);
494
+ await fetchSkillsTo2(storePath, rootDir, source, targetVersion, exactVersion);
466
495
  return storePath;
467
496
  }
468
- async function getContentStoreForRead2(rootDir, source = DEFAULT_SOURCE2, targetVersion) {
497
+ async function getContentStoreForRead2(rootDir, source = DEFAULT_SOURCE2, targetVersion, exactVersion) {
469
498
  const fs = getFileSystem2();
470
499
  const storePath = fs.path.join(rootDir, source.storeName);
471
- if (source.isDefault && await storeMatchesVersionLine(fs, storePath, targetVersion)) {
500
+ if (source.isDefault && await storeMatchesTarget(fs, storePath, targetVersion, exactVersion)) {
472
501
  logger.debug(`Reading skills from the existing store at ${storePath} (no fetch).`);
473
502
  return storePath;
474
503
  }
475
- await fetchSkillsTo2(storePath, rootDir, source, targetVersion);
504
+ await fetchSkillsTo2(storePath, rootDir, source, targetVersion, exactVersion);
476
505
  return storePath;
477
506
  }
478
- async function storeMatchesVersionLine(fs, storePath, targetVersion) {
479
- const line = parseSemver(targetVersion ?? package_default.version) ?? parseVersionLine(targetVersion ?? package_default.version);
480
- if (!line)
481
- return false;
507
+ async function storeMatchesTarget(fs, storePath, targetVersion, exactVersion) {
482
508
  const skillsDir = fs.path.join(storePath, "skills");
483
509
  const [entriesErr, entries] = await catchError(fs.readdir(skillsDir));
484
510
  if (entriesErr || !entries?.length)
485
511
  return false;
486
- const [markerErr, markerText] = await catchError(fs.readFile(fs.path.join(storePath, SOURCE_MARKER_NAME), {
487
- encoding: "utf-8"
488
- }));
489
- if (markerErr || !markerText)
490
- return false;
491
- const [parseErr, marker] = catchError(() => JSON.parse(markerText));
492
- if (parseErr)
512
+ const version = await readStoreSkillsVersion(storePath);
513
+ if (version === undefined)
493
514
  return false;
494
- const version = asRecord(marker)?.version;
495
- return typeof version === "string" && matchesCliVersionLine(version, line);
515
+ return versionIsOnTarget(version, targetVersion ?? package_default.version, exactVersion);
496
516
  }
497
517
  async function readSkillFrontmatter(fs, skillMdPath) {
498
518
  const [err, content] = await catchError(fs.readFile(skillMdPath, { encoding: "utf-8" }));
@@ -673,12 +693,6 @@ async function recordExtraFiles2(storePath, agent, files) {
673
693
  manifest.extraFiles = Object.keys(extraFiles).length > 0 ? extraFiles : undefined;
674
694
  await writeManifest(storePath, manifest);
675
695
  }
676
- function asRecord(value) {
677
- if (!value || typeof value !== "object" || Array.isArray(value)) {
678
- return;
679
- }
680
- return value;
681
- }
682
696
  function isDecimalInteger(value) {
683
697
  return value.length > 0 && Array.from(value).every((char) => char >= "0" && char <= "9");
684
698
  }
@@ -785,6 +799,19 @@ function compareSemver(a, b) {
785
799
  return -1;
786
800
  return comparePrerelease(left.prerelease, right.prerelease);
787
801
  }
802
+ function sameVersion(a, b) {
803
+ return normalizeSemver(a) === normalizeSemver(b);
804
+ }
805
+ function normalizeSemver(version) {
806
+ const parsed = parseSemver(version);
807
+ if (!parsed)
808
+ return version;
809
+ const core = `${parsed.major}.${parsed.minor}.${parsed.patch}`;
810
+ if (parsed.prerelease === undefined)
811
+ return core;
812
+ const prerelease = parsed.prerelease.split(".").map((part) => isDecimalInteger(part) ? String(Number.parseInt(part, 10)) : part).join(".");
813
+ return `${core}-${prerelease}`;
814
+ }
788
815
  function matchesCliVersionLine(version, cliVersion) {
789
816
  const parsed = parseSemver(version);
790
817
  if (!parsed)
@@ -892,6 +919,10 @@ function mapPmError(pm, label, stderr, stdout, codeOrError) {
892
919
  if (/E401|E403|\b401\b|\b403\b|ENEEDAUTH|unauthor|forbidden|need(s)? auth|authentication/i.test(stderr)) {
893
920
  return new SkillsRegistryAuthError(`Authentication required for ${SKILLS_PACKAGE_NAME}. ${REGISTRY_AUTH_HINT}`);
894
921
  }
922
+ const npmCode = npmErrorCode(stderr);
923
+ if (npmCode !== undefined && describeConnectivityError({ code: npmCode })?.kind === "network") {
924
+ return Object.assign(new Error(`${pm} ${label} failed: the registry could not be reached (${npmCode})`), { code: npmCode });
925
+ }
895
926
  const detail = stderr.trim() || (codeOrError instanceof Error ? codeOrError.message : `exit ${codeOrError}`);
896
927
  return new Error(`${pm} ${label} failed: ${detail}`);
897
928
  }
@@ -946,12 +977,7 @@ async function pmListVersions(pm, cliVersion) {
946
977
  if (primary.length > 0)
947
978
  return primary;
948
979
  const lineSpec = `${SKILLS_PACKAGE_NAME}@~${cliVersion.major}.${cliVersion.minor}.0-0`;
949
- const [err, versions] = await catchError(queryVersions(pm, lineSpec));
950
- if (err) {
951
- logger.debug(`Line-scoped version lookup for ${lineSpec} failed: ${err.message}`);
952
- return [];
953
- }
954
- return versions;
980
+ return await queryVersions(pm, lineSpec);
955
981
  }
956
982
  async function pmResolveTarball(pm, version) {
957
983
  const spec = `${SKILLS_PACKAGE_NAME}@${version}`;
@@ -1046,13 +1072,13 @@ function registryFromTarball(tarballUrl) {
1046
1072
  const [urlError, parsedUrl] = catchError(() => new URL(tarballUrl));
1047
1073
  return urlError ? SKILLS_REGISTRY_URL : parsedUrl.origin;
1048
1074
  }
1049
- async function fetchMatchingSkillsPackageInfo(pm, targetVersion) {
1050
- const cliVersion = parseSemver(targetVersion) ?? parseVersionLine(targetVersion);
1075
+ async function fetchMatchingSkillsPackageInfo(pm, targetVersion, exactVersion) {
1076
+ const cliVersion = parseSemver(targetVersion);
1051
1077
  if (!cliVersion) {
1052
- throw new Error(`Invalid CLI version ${targetVersion}; expected major.minor or major.minor.patch`);
1078
+ throw new Error(`Invalid CLI version ${targetVersion}; expected major.minor.patch`);
1053
1079
  }
1054
1080
  const versions = await pmListVersions(pm, cliVersion);
1055
- const selectedVersion = pickMatchingSkillsVersion(versions, cliVersion);
1081
+ const selectedVersion = exactVersion ? pickExactSkillsVersion(versions, exactVersion) : pickMatchingSkillsVersion(versions, cliVersion);
1056
1082
  const tarballUrl = pm === "npm" || pm === "pnpm" ? requireSkillsTarballUrl(selectedVersion, coerceViewString(await pmViewJson(pm, [
1057
1083
  `${SKILLS_PACKAGE_NAME}@${selectedVersion}`,
1058
1084
  "dist.tarball"
@@ -1068,15 +1094,12 @@ function requireSkillsTarballUrl(selectedVersion, tarballUrl) {
1068
1094
  return tarballUrl;
1069
1095
  throw new SkillsPackageMetadataError(`npm view ${SKILLS_PACKAGE_NAME}@${selectedVersion} dist.tarball returned no usable tarball URL`);
1070
1096
  }
1071
- function parseVersionLine(version) {
1072
- const match = /^(\d+)\.(\d+)$/.exec(version.trim());
1073
- if (!match)
1074
- return null;
1075
- return {
1076
- major: Number.parseInt(match[1], 10),
1077
- minor: Number.parseInt(match[2], 10),
1078
- patch: 0
1079
- };
1097
+ function pickExactSkillsVersion(versions, exactVersion) {
1098
+ const selected = versions.find((v) => sameVersion(v, exactVersion));
1099
+ if (!selected) {
1100
+ throw new SkillsPinNotPublishedError(`versions.skills pins ${SKILLS_PACKAGE_NAME} ${exactVersion}, which is not published on the configured npm registry.`);
1101
+ }
1102
+ return selected;
1080
1103
  }
1081
1104
  function pickMatchingSkillsVersion(versions, cliVersion) {
1082
1105
  const matchingVersions = versions.filter((version) => matchesCliVersionLine(version, cliVersion));
@@ -1324,4 +1347,4 @@ async function extractNpmTarballToDir(tarData, destinationDir) {
1324
1347
 
1325
1348
  export { REPO_URL2, DEFAULT_SOURCE2, resolveSkillSource2, fetchSkillsTo2, getContentStore2, getContentStoreForRead2, getAvailableSkills2, parseSkillMd2, addToGitignore2, MANIFEST_NAME2, readManifest2, updateManifestAfterInstall2, removeFromManifest2, readExtraFiles2, recordExtraFiles2 };
1326
1349
 
1327
- //# debugId=A8E0E8E12341A80264756E2164756E21
1350
+ //# debugId=20801DA90CF9AE3F64756E2164756E21
@@ -3,7 +3,7 @@ var package_default = {
3
3
  name: "@uipath/cli",
4
4
  author: "UiPath",
5
5
  license: "SEE LICENSE IN LICENSE.txt",
6
- version: "1.206.0-preview.306",
6
+ version: "1.207.0-preview.307",
7
7
  description: "Cross platform CLI for UiPath",
8
8
  repository: {
9
9
  type: "git",
@@ -69,4 +69,4 @@ var package_default = {
69
69
 
70
70
  export { package_default };
71
71
 
72
- //# debugId=243D63833C73B11064756E2164756E21
72
+ //# debugId=DC94ED57F396BCEE64756E2164756E21
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getFileSystem2
3
- } from "./index-z070caqq.js";
3
+ } from "./index-p64w2wrt.js";
4
4
  import {
5
5
  catchError,
6
6
  RESULTS,
@@ -10,11 +10,14 @@ import {
10
10
  processContext,
11
11
  wasInteractiveFlagPassed,
12
12
  canPrompt
13
- } from "./index-fdztq951.js";
13
+ } from "./index-zhp702kh.js";
14
14
  import {
15
- resolvePinnedVersion,
15
+ parseVersionPin,
16
16
  formatVersionPin
17
- } from "./index-753mncpq.js";
17
+ } from "./index-v7yphxb8.js";
18
+ import {
19
+ governingPins
20
+ } from "./index-33wtbzyw.js";
18
21
  import {
19
22
  ALL_AGENTS,
20
23
  AGENT_DEFS,
@@ -26,7 +29,7 @@ import {
26
29
  installSkillCommands,
27
30
  uninstallSkill,
28
31
  rejectIfGlobalOnly
29
- } from "./index-szbq3m4j.js";
32
+ } from "./index-bf2mdvne.js";
30
33
  import {
31
34
  DEFAULT_SOURCE2,
32
35
  resolveSkillSource2,
@@ -38,14 +41,14 @@ import {
38
41
  removeFromManifest2,
39
42
  readExtraFiles2,
40
43
  recordExtraFiles2
41
- } from "./index-8x2rp038.js";
44
+ } from "./index-petywj9n.js";
42
45
  import {
43
46
  promptAgentSelection2
44
- } from "./index-85fgzk87.js";
47
+ } from "./index-dtgfa304.js";
45
48
  import {
46
49
  SKILL_CATALOG_SKILL_NAME2,
47
50
  writeSkillCatalog2
48
- } from "./index-3s642t05.js";
51
+ } from "./index-spnvnhbf.js";
49
52
 
50
53
  // src/commands/skills/skillsService.ts
51
54
  class SkillsError2 extends Error {
@@ -62,11 +65,17 @@ var NO_AGENT_DETECTED_REASON = "NoAgentDetected";
62
65
  function sourceOf(resolved) {
63
66
  return resolved.source ?? DEFAULT_SOURCE2;
64
67
  }
65
- function resolveSkillsTargetVersion2(source) {
68
+ async function resolveSkillsTarget2(source, resolveInstallPath) {
66
69
  if (!source.isDefault)
67
- return;
68
- const pin = resolvePinnedVersion();
69
- return pin ? formatVersionPin(pin) : undefined;
70
+ return {};
71
+ const pins = await governingPins(resolveInstallPath);
72
+ const skillsPin = parseVersionPin(pins.skills);
73
+ if (skillsPin) {
74
+ const version = formatVersionPin(skillsPin);
75
+ return { targetVersion: version, exactVersion: version };
76
+ }
77
+ const cliPin = parseVersionPin(pins.cli);
78
+ return { targetVersion: cliPin ? formatVersionPin(cliPin) : undefined };
70
79
  }
71
80
  async function resolveRootDir2(options) {
72
81
  const fs = getFileSystem2();
@@ -98,7 +107,7 @@ function canRenderPicker() {
98
107
  const caps = getOutputSink().capabilities;
99
108
  return canPrompt() && caps.isInteractive && caps.canReadInput;
100
109
  }
101
- async function resolveSkillsContext2(options, operation) {
110
+ async function resolveSkillsContext2(options, operation, resolveInstallPath) {
102
111
  const root = await resolveRootDir2(options);
103
112
  if (!root)
104
113
  return null;
@@ -173,8 +182,8 @@ async function resolveSkillsContext2(options, operation) {
173
182
  agents = selected;
174
183
  }
175
184
  }
176
- const targetVersion = resolveSkillsTargetVersion2(source);
177
- const storePath = await getContentStore2(rootDir, source, targetVersion);
185
+ const { targetVersion, exactVersion } = await resolveSkillsTarget2(source, resolveInstallPath);
186
+ const storePath = await getContentStore2(rootDir, source, targetVersion, exactVersion);
178
187
  const shadowedSkills = [];
179
188
  const availableSkills = await getAvailableSkills2(storePath, shadowedSkills);
180
189
  const selectedSkills = availableSkills.filter((skill) => skill.name !== SKILL_CATALOG_SKILL_NAME2);
@@ -360,6 +369,6 @@ async function cleanupStaleSkills2(resolved) {
360
369
  }
361
370
  }
362
371
 
363
- export { SkillsError2, resolveSkillsTargetVersion2, resolveRootDir2, resolveSkillsContext2, runAgentInstalls2, cleanupStaleSkills2 };
372
+ export { SkillsError2, resolveSkillsTarget2, resolveRootDir2, resolveSkillsContext2, runAgentInstalls2, cleanupStaleSkills2 };
364
373
 
365
- //# debugId=12E927CE7D024CB564756E2164756E21
374
+ //# debugId=71B8C73FC8A8D2E064756E2164756E21
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  getFileSystem2
3
- } from "./index-z070caqq.js";
3
+ } from "./index-p64w2wrt.js";
4
4
  import {
5
5
  catchError
6
- } from "./index-fdztq951.js";
6
+ } from "./index-zhp702kh.js";
7
+ import {
8
+ asRecord
9
+ } from "./index-jk7em40j.js";
7
10
  import {
8
11
  REPO_URL2,
9
12
  parseSkillMd2
10
- } from "./index-8x2rp038.js";
13
+ } from "./index-petywj9n.js";
11
14
 
12
15
  // src/commands/skills/skillCatalog.ts
13
16
  var SKILL_CATALOG_SCHEMA_VERSION = 1;
@@ -30,12 +33,6 @@ var SEARCH_STOPWORDS = new Set([
30
33
  "to",
31
34
  "with"
32
35
  ]);
33
- function asRecord(value) {
34
- if (!value || typeof value !== "object" || Array.isArray(value)) {
35
- return;
36
- }
37
- return value;
38
- }
39
36
  function markdownEscape(value) {
40
37
  return value.replace(/\\/g, "\\\\").replace(/\|/g, "\\|").replace(/\r?\n/g, " ");
41
38
  }
@@ -271,4 +268,4 @@ function searchSkillCatalog2(catalog, query) {
271
268
 
272
269
  export { SKILL_CATALOG_SKILL_NAME2, buildSkillCatalog2, writeSkillCatalog2, removeSkillCatalog2, searchSkillCatalog2 };
273
270
 
274
- //# debugId=B9335E32C99170BD64756E2164756E21
271
+ //# debugId=6590C4CE1970C31C64756E2164756E21