@vltpkg/cli-js 1.4.0 → 1.6.0

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 (105) hide show
  1. package/{access-422UGEWN.js → access-AJ654YKY.js} +13 -12
  2. package/{bugs-RED7Y33Q.js → bugs-N73DVYHD.js} +32 -25
  3. package/{build-IHMPBWRO.js → build-VZ3EZKMM.js} +65 -21
  4. package/{cache-FJP2RZJX.js → cache-VROEWG2C.js} +20 -17
  5. package/cache-unzip-src-unzip.js +58 -15
  6. package/{chunk-TPRK6IDA.js → chunk-22LZBDEC.js} +2 -2
  7. package/chunk-36UIE654.js +6248 -0
  8. package/{chunk-UGCKF5ZE.js → chunk-3JIN46K5.js} +1 -1
  9. package/{chunk-OAJ3PO3Z.js → chunk-44AWMA4F.js} +25 -13
  10. package/chunk-4E65BBTM.js +77 -0
  11. package/{chunk-SR2VOY5J.js → chunk-4GMNWW4C.js} +1 -1
  12. package/{chunk-5IJTPZXP.js → chunk-6D3QAFNZ.js} +1 -1
  13. package/{chunk-X4FVR4R5.js → chunk-75HGJVNG.js} +12 -10
  14. package/{chunk-THSYN5EK.js → chunk-7M2VTFLP.js} +12 -1
  15. package/{chunk-2AMOC4DN.js → chunk-ANW36H4T.js} +4 -4
  16. package/chunk-B6RIGNEO.js +626 -0
  17. package/{chunk-FLH4YC6W.js → chunk-BF5DRGRZ.js} +60 -15
  18. package/chunk-BH5CVXNY.js +115 -0
  19. package/{chunk-PLG3OYCX.js → chunk-CAV7FKWQ.js} +3 -2
  20. package/{chunk-C23TDXRG.js → chunk-CYK6I4M6.js} +1 -1
  21. package/chunk-DXED4ARV.js +436 -0
  22. package/chunk-E74WGW5C.js +49 -0
  23. package/{chunk-WF6KLKRN.js → chunk-EFHOWRKU.js} +103 -1
  24. package/chunk-EMTGRCSE.js +1111 -0
  25. package/{chunk-5Y4SYLJ2.js → chunk-EYGOEAJM.js} +1 -1
  26. package/{chunk-OVPHE4O7.js → chunk-F5LZMLAQ.js} +5335 -10902
  27. package/{chunk-HZXJ423P.js → chunk-FXD3IV2S.js} +4 -2
  28. package/chunk-GCTREKA4.js +115 -0
  29. package/{chunk-ZJMJ7MCT.js → chunk-GEQFMH5M.js} +1 -1
  30. package/{chunk-ISE4IRHF.js → chunk-GZVI75KX.js} +7 -14
  31. package/chunk-HOF7LEIC.js +24 -0
  32. package/{chunk-LHPEBLOU.js → chunk-HT6FS4VB.js} +1 -1
  33. package/{chunk-PHJJPY5G.js → chunk-IXAMCWIT.js} +5 -5
  34. package/{chunk-ASLX43R3.js → chunk-JCNI6ZHH.js} +7 -5
  35. package/chunk-JV5XR5JQ.js +349 -0
  36. package/{chunk-7T3XAYP4.js → chunk-KD5ZK72K.js} +1 -1
  37. package/{chunk-FZUYGJZU.js → chunk-KVWGMSPW.js} +137 -19
  38. package/{chunk-TO23PR7J.js → chunk-LCLRP64K.js} +14 -12
  39. package/{chunk-QCSUWACA.js → chunk-LGQVZTYR.js} +8 -36
  40. package/{chunk-5RHABCYI.js → chunk-LP3ORD3D.js} +143 -17
  41. package/chunk-MCDLJZXT.js +82 -0
  42. package/{chunk-DNRR3XMG.js → chunk-N6HV7JWC.js} +1 -1
  43. package/chunk-O6MQ7NN6.js +1155 -0
  44. package/{chunk-GIIAODRI.js → chunk-PC2HOBAQ.js} +7 -5
  45. package/{chunk-APMYKJI2.js → chunk-QNHBAGXQ.js} +1 -1
  46. package/chunk-RBQO54TG.js +59 -0
  47. package/chunk-SUU2WETN.js +268 -0
  48. package/{chunk-I7UMHYZX.js → chunk-TQQO2F56.js} +113 -1187
  49. package/{chunk-4UCADW6S.js → chunk-TWDSXQPN.js} +9 -7
  50. package/{chunk-MKWPTN3C.js → chunk-VLVMLSIF.js} +2 -2
  51. package/chunk-W4T5CGCO.js +52 -0
  52. package/{chunk-5TNXLRW2.js → chunk-YTDABXPD.js} +50 -12
  53. package/{ci-YSKNNO5M.js → ci-3BVMVQIT.js} +35 -13
  54. package/cli-package.json +3 -1
  55. package/{config-HO7GY3QT.js → config-2KQV7N5A.js} +16 -13
  56. package/{config-CSPCDMR3.js → config-EKHBW6I5.js} +12 -9
  57. package/{create-2TJT3AHJ.js → create-QVHNOIV3.js} +35 -29
  58. package/{deprecate-7FRJI2RL.js → deprecate-E254QBH6.js} +17 -15
  59. package/{dist-tag-WCFF5OEG.js → dist-tag-SITRFD7O.js} +13 -12
  60. package/{docs-JMBPTU23.js → docs-IDL2P7CA.js} +32 -25
  61. package/{exec-FBOUKZZ2.js → exec-7BK2W2WL.js} +35 -29
  62. package/{exec-cache-X3ZWM5S3.js → exec-cache-VY46L7DR.js} +27 -21
  63. package/{exec-local-Y3KQC22N.js → exec-local-D7R5T3DF.js} +26 -20
  64. package/{help-PUKVH5X7.js → help-RMRIEJQL.js} +6 -5
  65. package/{init-GOKAQXXZ.js → init-BGW4HJ6V.js} +15 -11
  66. package/{install-XFN4UFOC.js → install-U5GATZ2N.js} +144 -49
  67. package/{list-43JFFG5D.js → list-3VG4M2XL.js} +41 -28
  68. package/{login-RSTZKNKN.js → login-PHQWI6S6.js} +19 -16
  69. package/{logout-4576FFXZ.js → logout-DJCOGRFF.js} +13 -12
  70. package/{outdated-ACQ5A2Y7.js → outdated-JH3O6R3Y.js} +27 -22
  71. package/{pack-QQVJ3G25.js → pack-U5W5YWHK.js} +23 -18
  72. package/package.json +1 -1
  73. package/{ping-QCDQQRO5.js → ping-EKX43AOW.js} +13 -12
  74. package/{pkg-CSOJV7UC.js → pkg-SW5GMERT.js} +19 -14
  75. package/{profile-VL4HPW3N.js → profile-UGDRDMQ6.js} +13 -12
  76. package/{publish-2YBO6ZXE.js → publish-HTWKK3NN.js} +60 -45
  77. package/{query-IHHFMJRT.js → query-YE3FUVGG.js} +43 -30
  78. package/{registry-W7BRZZZ2.js → registry-ZGGWVLBM.js} +7 -7
  79. package/registry-client-src-revalidate.js +76 -22
  80. package/{repo-L3BXAAWS.js → repo-WDOCU6SE.js} +32 -25
  81. package/{reporter-5NYOHBO7.js → reporter-N5PAXB26.js} +121 -17
  82. package/{run-AMUUVLTI.js → run-IPARVIIQ.js} +26 -20
  83. package/{run-exec-5W3XWQZA.js → run-exec-C4RTREEW.js} +26 -20
  84. package/security-archive-src-update-expired.js +66 -21
  85. package/{setup-TFM4GJF7.js → setup-SYYUEHZL.js} +212 -32
  86. package/skills-KA2VR5Q5.js +480 -0
  87. package/skills-UBBMSBDQ.js +416 -0
  88. package/{src-4CYCUWZL.js → src-FUSTSM4J.js} +33 -22
  89. package/{src-I3GMULFP.js → src-QO5G2S4O.js} +11 -8
  90. package/{src-LUTN2ODD.js → src-W2VQULRG.js} +2 -2
  91. package/{token-OANOBE3G.js → token-UQNABECH.js} +15 -13
  92. package/{uninstall-YXTQ4AIZ.js → uninstall-FHBJ3OUV.js} +59 -18
  93. package/{unpublish-SZXYMYIU.js → unpublish-APJTEUBA.js} +31 -16
  94. package/{update-FHLMWGIM.js → update-NWZTL4S7.js} +52 -25
  95. package/{version-ZWFCTU5V.js → version-EMKKTL77.js} +20 -14
  96. package/{view-NFNJXMLV.js → view-BUUI33RV.js} +17 -15
  97. package/vlr.js +1 -1
  98. package/vlrx.js +1 -1
  99. package/vlt.js +1 -1
  100. package/vlx.js +1 -1
  101. package/vlxl.js +1 -1
  102. package/{whoami-O7GOSGCI.js → whoami-F6BSXGQ2.js} +13 -12
  103. package/chunk-G2YT2GWF.js +0 -120
  104. package/chunk-T6FBP4OU.js +0 -76
  105. package/chunk-U7TEQCBN.js +0 -880
@@ -11,7 +11,7 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  graphRunSync
14
- } from "./chunk-PLG3OYCX.js";
14
+ } from "./chunk-CAV7FKWQ.js";
15
15
 
16
16
  // ../../src/cli-sdk/src/sort-scope-locations.ts
17
17
  import { resolve } from "node:path";
@@ -11,21 +11,21 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  urlOpen
14
- } from "./chunk-APMYKJI2.js";
14
+ } from "./chunk-QNHBAGXQ.js";
15
+ import {
16
+ userAgent
17
+ } from "./chunk-GEQFMH5M.js";
15
18
  import {
16
19
  assertOk,
17
20
  registryErrorMessage,
18
21
  statusText,
19
22
  storeRoot,
20
23
  tokenRefusal
21
- } from "./chunk-SR2VOY5J.js";
22
- import {
23
- userAgent
24
- } from "./chunk-ZJMJ7MCT.js";
24
+ } from "./chunk-4GMNWW4C.js";
25
25
  import {
26
26
  I,
27
27
  logRequest
28
- } from "./chunk-U7TEQCBN.js";
28
+ } from "./chunk-B6RIGNEO.js";
29
29
  import {
30
30
  XDG
31
31
  } from "./chunk-XNLSTHDK.js";
@@ -36,7 +36,7 @@ import {
36
36
  asError,
37
37
  integrityHex,
38
38
  integrityRE
39
- } from "./chunk-FLH4YC6W.js";
39
+ } from "./chunk-BF5DRGRZ.js";
40
40
  import {
41
41
  error
42
42
  } from "./chunk-WZWDS3W4.js";
@@ -26338,13 +26338,14 @@ var setToken = async (registry, token, identity) => {
26338
26338
  kc.set(normalizeRegistryKey(registry), token);
26339
26339
  await kc.save();
26340
26340
  };
26341
- var getToken = async (registry, identity) => {
26341
+ var getToken = async (registry, identity, defaultKey) => {
26342
26342
  const kc = getKC(identity);
26343
26343
  const key = normalizeRegistryKey(registry);
26344
26344
  const rt = runtimeTokens.get(key);
26345
26345
  if (rt) return rt;
26346
26346
  const envReg = process.env.VLT_REGISTRY;
26347
- if (envReg && key === normalizeRegistryKey(envReg)) {
26347
+ const tokKey = envReg ? normalizeRegistryKey(envReg) : defaultKey;
26348
+ if (key === tokKey) {
26348
26349
  const envTok = process.env.VLT_TOKEN;
26349
26350
  if (envTok) return `Bearer ${envTok}`;
26350
26351
  }
@@ -26352,6 +26353,10 @@ var getToken = async (registry, identity) => {
26352
26353
  if (tok) return `Bearer ${tok}`;
26353
26354
  return kc.get(key);
26354
26355
  };
26356
+ var defaultRegistryKey = (o) => {
26357
+ const u = o.registries?.[o["default-registry-alias"] ?? "npm"];
26358
+ return u && URL.canParse(u) ? normalizeRegistryKey(u) : void 0;
26359
+ };
26355
26360
  var registryKeys = (o) => [
26356
26361
  ...new Set(
26357
26362
  [
@@ -26362,20 +26367,21 @@ var registryKeys = (o) => [
26362
26367
  ].filter((u) => !!u && URL.canParse(u)).map(normalizeRegistryKey)
26363
26368
  )
26364
26369
  ];
26365
- var getTokenByURL = async (requestUrl, identity, keys = []) => {
26370
+ var getTokenByURL = async (requestUrl, identity, keys = [], defaultKey) => {
26366
26371
  const normalized = normalizeRegistryKey(requestUrl);
26367
26372
  const candidates = [...runtimeTokens.keys(), ...keys];
26368
26373
  const envReg = process.env.VLT_REGISTRY;
26369
26374
  if (envReg) {
26370
26375
  candidates.push(normalizeRegistryKey(envReg));
26371
26376
  }
26377
+ if (defaultKey) candidates.push(defaultKey);
26372
26378
  const kc = getKC(identity);
26373
26379
  for (const k of await kc.keys()) {
26374
26380
  candidates.push(k);
26375
26381
  }
26376
26382
  const matches = candidates.filter((c) => normalized === c || normalized.startsWith(c + "/")).sort((a, b) => b.length - a.length);
26377
26383
  for (const key of matches) {
26378
- const tok = await getToken(key, identity);
26384
+ const tok = await getToken(key, identity, defaultKey);
26379
26385
  if (tok) return tok;
26380
26386
  }
26381
26387
  };
@@ -27625,6 +27631,8 @@ var RegistryClient = class {
27625
27631
  identity;
27626
27632
  /** configured registry keys; `VLT_TOKEN_<key>` applies under each */
27627
27633
  registryKeys;
27634
+ /** default registry key: gets `VLT_TOKEN` if no `VLT_REGISTRY` */
27635
+ defaultRegistryKey;
27628
27636
  staleWhileRevalidateFactor;
27629
27637
  #session = randomUUID();
27630
27638
  #decoded = /* @__PURE__ */ new WeakMap();
@@ -27651,6 +27659,7 @@ var RegistryClient = class {
27651
27659
  } = options;
27652
27660
  this.identity = identity;
27653
27661
  this.registryKeys = registryKeys(options);
27662
+ this.defaultRegistryKey = defaultRegistryKey(options);
27654
27663
  this.staleWhileRevalidateFactor = staleWhileRevalidateFactor;
27655
27664
  const path = resolve4(cache, "registry-client");
27656
27665
  const store = options.storeRoot ?? storeRoot(cache);
@@ -28039,7 +28048,8 @@ var RegistryClient = class {
28039
28048
  await getTokenByURL(
28040
28049
  String(u),
28041
28050
  this.identity,
28042
- this.registryKeys
28051
+ this.registryKeys,
28052
+ this.defaultRegistryKey
28043
28053
  )
28044
28054
  );
28045
28055
  logRequest(url, "start", { method: o.method });
@@ -28164,7 +28174,8 @@ var RegistryClient = class {
28164
28174
  await getTokenByURL(
28165
28175
  String(u),
28166
28176
  this.identity,
28167
- this.registryKeys
28177
+ this.registryKeys,
28178
+ this.defaultRegistryKey
28168
28179
  )
28169
28180
  );
28170
28181
  }
@@ -28283,6 +28294,7 @@ export {
28283
28294
  deleteToken,
28284
28295
  setToken,
28285
28296
  getToken,
28297
+ defaultRegistryKey,
28286
28298
  registryKeys,
28287
28299
  getTokenByURL,
28288
28300
  CacheEntry,
@@ -0,0 +1,77 @@
1
+ var global = globalThis;
2
+ import {Buffer} from "node:buffer";
3
+ import {setTimeout as _vlt_setTimeout,clearTimeout as _vlt_clearTimeout,setImmediate as _vlt_setImmediate,clearImmediate as _vlt_clearImmediate,setInterval as _vlt_setInterval,clearInterval as _vlt_clearInterval} from "node:timers";
4
+ globalThis.setTimeout = _vlt_setTimeout;
5
+ globalThis.clearTimeout = _vlt_clearTimeout;
6
+ globalThis.setImmediate = _vlt_setImmediate;
7
+ globalThis.clearImmediate = _vlt_clearImmediate;
8
+ globalThis.setInterval = _vlt_setInterval;
9
+ globalThis.clearInterval = _vlt_clearInterval;
10
+ import {createRequire as _vlt_createRequire} from "node:module";
11
+ var require = _vlt_createRequire(import.meta.filename);
12
+ import {
13
+ error
14
+ } from "./chunk-WZWDS3W4.js";
15
+ import {
16
+ __glob
17
+ } from "./chunk-PZLD7RTK.js";
18
+
19
+ // import("./commands/**/*.ts") in ../../src/cli-sdk/src/load-command.ts
20
+ var globImport_commands_ts = __glob({
21
+ "./commands/access.ts": () => import("./access-AJ654YKY.js"),
22
+ "./commands/bugs.ts": () => import("./bugs-N73DVYHD.js"),
23
+ "./commands/build.ts": () => import("./build-VZ3EZKMM.js"),
24
+ "./commands/cache.ts": () => import("./cache-VROEWG2C.js"),
25
+ "./commands/ci.ts": () => import("./ci-3BVMVQIT.js"),
26
+ "./commands/config.ts": () => import("./config-2KQV7N5A.js"),
27
+ "./commands/create.ts": () => import("./create-QVHNOIV3.js"),
28
+ "./commands/deprecate.ts": () => import("./deprecate-E254QBH6.js"),
29
+ "./commands/dist-tag.ts": () => import("./dist-tag-SITRFD7O.js"),
30
+ "./commands/docs.ts": () => import("./docs-IDL2P7CA.js"),
31
+ "./commands/exec-cache.ts": () => import("./exec-cache-VY46L7DR.js"),
32
+ "./commands/exec-local.ts": () => import("./exec-local-D7R5T3DF.js"),
33
+ "./commands/exec.ts": () => import("./exec-7BK2W2WL.js"),
34
+ "./commands/help.ts": () => import("./help-RMRIEJQL.js"),
35
+ "./commands/init.ts": () => import("./init-BGW4HJ6V.js"),
36
+ "./commands/install.ts": () => import("./install-U5GATZ2N.js"),
37
+ "./commands/install/reporter.ts": () => import("./reporter-N5PAXB26.js"),
38
+ "./commands/list.ts": () => import("./list-3VG4M2XL.js"),
39
+ "./commands/login.ts": () => import("./login-PHQWI6S6.js"),
40
+ "./commands/logout.ts": () => import("./logout-DJCOGRFF.js"),
41
+ "./commands/outdated.ts": () => import("./outdated-JH3O6R3Y.js"),
42
+ "./commands/pack.ts": () => import("./pack-U5W5YWHK.js"),
43
+ "./commands/ping.ts": () => import("./ping-EKX43AOW.js"),
44
+ "./commands/pkg.ts": () => import("./pkg-SW5GMERT.js"),
45
+ "./commands/profile.ts": () => import("./profile-UGDRDMQ6.js"),
46
+ "./commands/publish.ts": () => import("./publish-HTWKK3NN.js"),
47
+ "./commands/query.ts": () => import("./query-YE3FUVGG.js"),
48
+ "./commands/registry.ts": () => import("./registry-ZGGWVLBM.js"),
49
+ "./commands/repo.ts": () => import("./repo-WDOCU6SE.js"),
50
+ "./commands/run-exec.ts": () => import("./run-exec-C4RTREEW.js"),
51
+ "./commands/run.ts": () => import("./run-IPARVIIQ.js"),
52
+ "./commands/setup.ts": () => import("./setup-SYYUEHZL.js"),
53
+ "./commands/skills.ts": () => import("./skills-UBBMSBDQ.js"),
54
+ "./commands/token.ts": () => import("./token-UQNABECH.js"),
55
+ "./commands/uninstall.ts": () => import("./uninstall-FHBJ3OUV.js"),
56
+ "./commands/unpublish.ts": () => import("./unpublish-APJTEUBA.js"),
57
+ "./commands/update.ts": () => import("./update-NWZTL4S7.js"),
58
+ "./commands/version.ts": () => import("./version-EMKKTL77.js"),
59
+ "./commands/view.ts": () => import("./view-BUUI33RV.js"),
60
+ "./commands/whoami.ts": () => import("./whoami-F6BSXGQ2.js")
61
+ });
62
+
63
+ // ../../src/cli-sdk/src/load-command.ts
64
+ var loadCommand = async (command) => {
65
+ try {
66
+ return await globImport_commands_ts(`./commands/${command}.ts`);
67
+ } catch (e) {
68
+ throw error("Could not load command", {
69
+ found: command,
70
+ cause: e
71
+ });
72
+ }
73
+ };
74
+
75
+ export {
76
+ loadCommand
77
+ };
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  asError,
14
14
  isObject
15
- } from "./chunk-FLH4YC6W.js";
15
+ } from "./chunk-BF5DRGRZ.js";
16
16
  import {
17
17
  error
18
18
  } from "./chunk-WZWDS3W4.js";
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  Spec,
14
14
  kCustomInspect
15
- } from "./chunk-FLH4YC6W.js";
15
+ } from "./chunk-BF5DRGRZ.js";
16
16
 
17
17
  // ../../src/spec/src/index.ts
18
18
  import { homedir } from "node:os";
@@ -11,32 +11,34 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  sortScopeLocations
14
- } from "./chunk-UGCKF5ZE.js";
14
+ } from "./chunk-3JIN46K5.js";
15
15
  import {
16
16
  createDiffFilesProvider
17
17
  } from "./chunk-RIYFGX27.js";
18
18
  import {
19
19
  createHostContextsMap
20
- } from "./chunk-ASLX43R3.js";
20
+ } from "./chunk-JCNI6ZHH.js";
21
+ import {
22
+ actual,
23
+ isRunResult
24
+ } from "./chunk-36UIE654.js";
25
+ import {
26
+ Query
27
+ } from "./chunk-F5LZMLAQ.js";
21
28
  import {
22
29
  stderr,
23
30
  stdout,
24
31
  styleTextStdout
25
- } from "./chunk-FZUYGJZU.js";
32
+ } from "./chunk-KVWGMSPW.js";
26
33
  import {
27
34
  require_emoji_regex
28
35
  } from "./chunk-VTEFO2FT.js";
29
- import {
30
- Query,
31
- actual,
32
- isRunResult
33
- } from "./chunk-OVPHE4O7.js";
34
36
  import {
35
37
  Monorepo
36
- } from "./chunk-I7UMHYZX.js";
38
+ } from "./chunk-TQQO2F56.js";
37
39
  import {
38
40
  isErrorWithCause
39
- } from "./chunk-FLH4YC6W.js";
41
+ } from "./chunk-BF5DRGRZ.js";
40
42
  import {
41
43
  error
42
44
  } from "./chunk-WZWDS3W4.js";
@@ -9,12 +9,15 @@ globalThis.setInterval = _vlt_setInterval;
9
9
  globalThis.clearInterval = _vlt_clearInterval;
10
10
  import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
+ import {
13
+ Spec
14
+ } from "./chunk-6D3QAFNZ.js";
12
15
  import {
13
16
  defaultRegistries,
14
17
  defaultRegistryName,
15
18
  isErrorWithCause,
16
19
  isObject
17
- } from "./chunk-FLH4YC6W.js";
20
+ } from "./chunk-BF5DRGRZ.js";
18
21
  import {
19
22
  error
20
23
  } from "./chunk-WZWDS3W4.js";
@@ -85,6 +88,13 @@ var asUnknownSpecPrefix = (er) => {
85
88
  const { found, spec, validOptions } = isErrorWithCause(er) && isObject(er.cause) ? er.cause : {};
86
89
  return typeof found === "string" && /^[^:]+:$/.test(found) && typeof spec === "string" && er.message.startsWith("Protocol ") ? unknownSpecPrefixError(found.slice(0, -1), spec, validOptions) : er;
87
90
  };
91
+ var parseSpecArg = (item, options) => {
92
+ try {
93
+ return Spec.parseArgs(item, options);
94
+ } catch (er) {
95
+ throw asUnknownSpecPrefix(er);
96
+ }
97
+ };
88
98
  var missingNpmRegistryError = (alias = defaultRegistryName) => error(
89
99
  [
90
100
  `Missing ${alias} registry configuration.`,
@@ -163,6 +173,7 @@ export {
163
173
  missingRegistryError,
164
174
  normalizeRegistryURL,
165
175
  asUnknownSpecPrefix,
176
+ parseSpecArg,
166
177
  missingNpmRegistryError,
167
178
  hasConfiguredRegistry,
168
179
  hasNpmRegistry,
@@ -15,14 +15,14 @@ import {
15
15
  pairsToRecords,
16
16
  registrySelectionFields,
17
17
  registrySelectors
18
- } from "./chunk-5RHABCYI.js";
18
+ } from "./chunk-LP3ORD3D.js";
19
19
  import {
20
20
  normalizeRegistryURL
21
- } from "./chunk-THSYN5EK.js";
21
+ } from "./chunk-7M2VTFLP.js";
22
22
  import {
23
23
  getCommand,
24
24
  isRecordField
25
- } from "./chunk-WF6KLKRN.js";
25
+ } from "./chunk-EFHOWRKU.js";
26
26
  import {
27
27
  find
28
28
  } from "./chunk-HTOTG4TS.js";
@@ -33,7 +33,7 @@ import {
33
33
  defaultRegistries,
34
34
  defaultRegistryName,
35
35
  isObject
36
- } from "./chunk-FLH4YC6W.js";
36
+ } from "./chunk-BF5DRGRZ.js";
37
37
  import {
38
38
  error
39
39
  } from "./chunk-WZWDS3W4.js";