@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
@@ -9,62 +9,72 @@ 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
+ getPublishConfig
14
+ } from "./chunk-HOF7LEIC.js";
12
15
  import {
13
16
  packTarball
14
- } from "./chunk-MKWPTN3C.js";
17
+ } from "./chunk-VLVMLSIF.js";
15
18
  import {
16
19
  sortScopeLocations
17
- } from "./chunk-UGCKF5ZE.js";
20
+ } from "./chunk-3JIN46K5.js";
18
21
  import {
19
22
  createHostContextsMap
20
- } from "./chunk-ASLX43R3.js";
23
+ } from "./chunk-JCNI6ZHH.js";
24
+ import {
25
+ actual,
26
+ run
27
+ } from "./chunk-36UIE654.js";
28
+ import {
29
+ Query
30
+ } from "./chunk-F5LZMLAQ.js";
31
+ import "./chunk-YTDABXPD.js";
21
32
  import {
22
33
  prettyBytes
23
34
  } from "./chunk-XA47WS4N.js";
24
35
  import {
25
36
  stderr
26
- } from "./chunk-FZUYGJZU.js";
27
- import "./chunk-QCSUWACA.js";
28
- import "./chunk-G2YT2GWF.js";
29
- import "./chunk-5Y4SYLJ2.js";
30
- import "./chunk-SRWDPPLX.js";
31
- import "./chunk-WGDTG44V.js";
32
- import {
33
- resolveRegistry
34
- } from "./chunk-THSYN5EK.js";
35
- import {
36
- Query,
37
- actual,
38
- run
39
- } from "./chunk-OVPHE4O7.js";
40
- import "./chunk-5TNXLRW2.js";
37
+ } from "./chunk-KVWGMSPW.js";
38
+ import "./chunk-LGQVZTYR.js";
39
+ import "./chunk-EYGOEAJM.js";
41
40
  import {
42
41
  commandUsage
43
- } from "./chunk-LHPEBLOU.js";
42
+ } from "./chunk-HT6FS4VB.js";
43
+ import "./chunk-SRWDPPLX.js";
44
+ import "./chunk-JV5XR5JQ.js";
45
+ import "./chunk-EMTGRCSE.js";
44
46
  import {
45
47
  minimatch
46
- } from "./chunk-I7UMHYZX.js";
48
+ } from "./chunk-TQQO2F56.js";
47
49
  import "./chunk-4KCU2KZL.js";
48
- import "./chunk-PLG3OYCX.js";
49
- import "./chunk-5IJTPZXP.js";
50
- import "./chunk-WF6KLKRN.js";
50
+ import "./chunk-WGDTG44V.js";
51
+ import "./chunk-E74WGW5C.js";
52
+ import "./chunk-GCTREKA4.js";
53
+ import "./chunk-MCDLJZXT.js";
54
+ import {
55
+ resolveRegistry
56
+ } from "./chunk-7M2VTFLP.js";
57
+ import "./chunk-EFHOWRKU.js";
58
+ import "./chunk-CAV7FKWQ.js";
59
+ import "./chunk-6D3QAFNZ.js";
51
60
  import "./chunk-HTOTG4TS.js";
52
61
  import {
53
62
  RegistryClient,
54
63
  oidc,
55
64
  registryBase
56
- } from "./chunk-OAJ3PO3Z.js";
57
- import "./chunk-APMYKJI2.js";
65
+ } from "./chunk-44AWMA4F.js";
66
+ import "./chunk-QNHBAGXQ.js";
67
+ import "./chunk-GEQFMH5M.js";
58
68
  import {
59
69
  assertOk,
60
70
  requestError
61
- } from "./chunk-SR2VOY5J.js";
62
- import "./chunk-ZJMJ7MCT.js";
63
- import "./chunk-U7TEQCBN.js";
71
+ } from "./chunk-4GMNWW4C.js";
72
+ import "./chunk-SUU2WETN.js";
73
+ import "./chunk-B6RIGNEO.js";
64
74
  import "./chunk-XNLSTHDK.js";
65
75
  import "./chunk-PDWPFR5T.js";
66
76
  import "./chunk-Y5PA7DVK.js";
67
- import "./chunk-FLH4YC6W.js";
77
+ import "./chunk-BF5DRGRZ.js";
68
78
  import {
69
79
  error
70
80
  } from "./chunk-WZWDS3W4.js";
@@ -74,14 +84,16 @@ import "./chunk-PZLD7RTK.js";
74
84
  import assert from "node:assert";
75
85
  import { readFileSync } from "node:fs";
76
86
  import { dirname, join, resolve } from "node:path";
77
- var needsRegistry = true;
78
87
  var usage = () => commandUsage({
79
88
  command: "publish",
80
89
  usage: "",
81
90
  description: `Create a tarball from a package and publish it to the configured registry.
82
91
 
83
92
  This command will pack the package in the current directory or specified folder,
84
- and then upload it to the configured registry.`,
93
+ and then upload it to the configured registry.
94
+
95
+ The registry is the package's \`publishConfig.registry\` if set (no other
96
+ registry config needed), else \`--registry\`, else a configured alias.`,
85
97
  options: {
86
98
  tag: {
87
99
  description: "Publish the package with the given tag",
@@ -197,24 +209,32 @@ var command = async (conf) => {
197
209
  single = options.packageJson.find(process.cwd()) ?? projectRoot;
198
210
  }
199
211
  if (single) {
200
- return commandSingle(single, conf);
212
+ const [target] = await resolveTargets([single], conf);
213
+ assert(target);
214
+ return commandSingle(target, conf);
201
215
  }
202
216
  assert(
203
217
  locations.length > 0,
204
218
  error("No workspaces or query results found")
205
219
  );
206
220
  const results = [];
207
- for (const location of locations) {
208
- results.push(await commandSingle(location, conf));
221
+ for (const target of await resolveTargets(locations, conf)) {
222
+ results.push(await commandSingle(target, conf));
209
223
  }
210
224
  return results;
211
225
  };
212
- var getPublishConfig = (manifest) => {
213
- const pc = manifest.publishConfig;
214
- if (pc && typeof pc === "object") {
215
- return pc;
226
+ var resolveTargets = async (locations, conf) => {
227
+ let fallback;
228
+ const targets = [];
229
+ for (const location of locations) {
230
+ const manifestPath = conf.options.packageJson.find(location);
231
+ assert(manifestPath, "No package.json found");
232
+ const manifestDir = dirname(manifestPath);
233
+ const manifest = conf.options.packageJson.read(manifestDir);
234
+ const registry = getPublishConfig(manifest)?.registry ?? await (fallback ??= resolveRegistry(conf));
235
+ targets.push({ manifestDir, registry });
216
236
  }
217
- return void 0;
237
+ return targets;
218
238
  };
219
239
  var README_MARKDOWN_EXTENSION = /\.(?:md|markdown|mdown|mdwn|mkd|mkdn)$/i;
220
240
  var readPublishReadme = (packDir, files) => {
@@ -228,10 +248,7 @@ var readPublishReadme = (packDir, files) => {
228
248
  readmeFilename
229
249
  };
230
250
  };
231
- var commandSingle = async (location, conf) => {
232
- const manifestPath = conf.options.packageJson.find(location);
233
- assert(manifestPath, "No package.json found");
234
- const manifestDir = dirname(manifestPath);
251
+ var commandSingle = async ({ manifestDir, registry }, conf) => {
235
252
  const manifest = conf.options.packageJson.read(manifestDir);
236
253
  assert(
237
254
  !manifest.private,
@@ -241,7 +258,6 @@ var commandSingle = async (location, conf) => {
241
258
  const publishConfig = getPublishConfig(manifest);
242
259
  const tag = publishConfig?.tag ?? conf.options.tag;
243
260
  const access = publishConfig?.access ?? conf.options.access;
244
- const registry = publishConfig?.registry ?? await resolveRegistry(conf);
245
261
  const registryUrl = new URL(registryBase(registry));
246
262
  const runOptions = {
247
263
  cwd: manifestDir,
@@ -381,7 +397,6 @@ var commandSingle = async (location, conf) => {
381
397
  };
382
398
  export {
383
399
  command,
384
- needsRegistry,
385
400
  usage,
386
401
  views
387
402
  };
@@ -11,56 +11,64 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  MermaidImageView
14
- } from "./chunk-PHJJPY5G.js";
14
+ } from "./chunk-IXAMCWIT.js";
15
15
  import {
16
16
  createGetAuthHeader
17
- } from "./chunk-HZXJ423P.js";
17
+ } from "./chunk-FXD3IV2S.js";
18
18
  import {
19
19
  createDiffFilesProvider
20
20
  } from "./chunk-RIYFGX27.js";
21
- import "./chunk-TPRK6IDA.js";
21
+ import "./chunk-22LZBDEC.js";
22
22
  import {
23
23
  assertVltInstalled,
24
24
  createHostContextsMap
25
- } from "./chunk-ASLX43R3.js";
26
- import {
27
- stdout
28
- } from "./chunk-FZUYGJZU.js";
29
- import "./chunk-QCSUWACA.js";
30
- import "./chunk-G2YT2GWF.js";
31
- import "./chunk-5Y4SYLJ2.js";
32
- import "./chunk-WGDTG44V.js";
33
- import "./chunk-THSYN5EK.js";
25
+ } from "./chunk-JCNI6ZHH.js";
34
26
  import {
35
27
  GraphModifier,
36
- Query,
37
28
  actual,
38
- asNode,
39
29
  humanReadableOutput,
40
30
  jsonOutput,
41
31
  mermaidOutput
42
- } from "./chunk-OVPHE4O7.js";
32
+ } from "./chunk-36UIE654.js";
33
+ import {
34
+ Query,
35
+ asNode,
36
+ hasSkills
37
+ } from "./chunk-F5LZMLAQ.js";
43
38
  import {
44
39
  SecurityArchive
45
- } from "./chunk-5TNXLRW2.js";
40
+ } from "./chunk-YTDABXPD.js";
41
+ import {
42
+ stdout
43
+ } from "./chunk-KVWGMSPW.js";
44
+ import "./chunk-LGQVZTYR.js";
45
+ import "./chunk-EYGOEAJM.js";
46
46
  import {
47
47
  commandUsage
48
- } from "./chunk-LHPEBLOU.js";
49
- import "./chunk-I7UMHYZX.js";
48
+ } from "./chunk-HT6FS4VB.js";
49
+ import "./chunk-JV5XR5JQ.js";
50
+ import "./chunk-EMTGRCSE.js";
51
+ import "./chunk-TQQO2F56.js";
50
52
  import "./chunk-4KCU2KZL.js";
51
- import "./chunk-PLG3OYCX.js";
52
- import "./chunk-5IJTPZXP.js";
53
- import "./chunk-WF6KLKRN.js";
53
+ import "./chunk-WGDTG44V.js";
54
+ import "./chunk-E74WGW5C.js";
55
+ import "./chunk-GCTREKA4.js";
56
+ import "./chunk-MCDLJZXT.js";
57
+ import "./chunk-7M2VTFLP.js";
58
+ import "./chunk-EFHOWRKU.js";
59
+ import "./chunk-CAV7FKWQ.js";
60
+ import "./chunk-6D3QAFNZ.js";
54
61
  import "./chunk-HTOTG4TS.js";
55
- import "./chunk-OAJ3PO3Z.js";
56
- import "./chunk-APMYKJI2.js";
57
- import "./chunk-SR2VOY5J.js";
58
- import "./chunk-ZJMJ7MCT.js";
59
- import "./chunk-U7TEQCBN.js";
62
+ import "./chunk-44AWMA4F.js";
63
+ import "./chunk-QNHBAGXQ.js";
64
+ import "./chunk-GEQFMH5M.js";
65
+ import "./chunk-4GMNWW4C.js";
66
+ import "./chunk-SUU2WETN.js";
67
+ import "./chunk-B6RIGNEO.js";
60
68
  import "./chunk-XNLSTHDK.js";
61
69
  import "./chunk-PDWPFR5T.js";
62
70
  import "./chunk-Y5PA7DVK.js";
63
- import "./chunk-FLH4YC6W.js";
71
+ import "./chunk-BF5DRGRZ.js";
64
72
  import {
65
73
  error
66
74
  } from "./chunk-WZWDS3W4.js";
@@ -137,6 +145,9 @@ var usage = () => commandUsage({
137
145
  view: {
138
146
  value: "[human | json | mermaid | svg | png | count]",
139
147
  description: "Output format. Defaults to human-readable or json if no tty. Use svg or png to render the dependency graph as an image and open it. Count outputs the number of dependency relationships in the result."
148
+ },
149
+ global: {
150
+ description: "Query the global project."
140
151
  }
141
152
  }
142
153
  });
@@ -181,7 +192,7 @@ var command = async (conf) => {
181
192
  (q2) => q2?.includes(":host(")
182
193
  );
183
194
  if (mainManifest) {
184
- if (!usesHostContext) {
195
+ if (!usesHostContext && !conf.globalRoot) {
185
196
  assertVltInstalled(conf.options.projectRoot, "query");
186
197
  }
187
198
  graph = actual.load({
@@ -212,7 +223,8 @@ var command = async (conf) => {
212
223
  securityArchive,
213
224
  hostContexts,
214
225
  diffFiles,
215
- getAuthHeader
226
+ getAuthHeader,
227
+ hasSkills
216
228
  });
217
229
  const { nodes: resultNodes } = await scopeQuery.search(
218
230
  scopeQueryString,
@@ -274,7 +286,8 @@ var command = async (conf) => {
274
286
  securityArchive,
275
287
  hostContexts,
276
288
  diffFiles,
277
- getAuthHeader
289
+ getAuthHeader,
290
+ hasSkills
278
291
  });
279
292
  const query = queryString || (graph ? defaultProjectQueryString : defaultLocalScopeQueryString);
280
293
  const {
@@ -9,18 +9,18 @@ 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
- resolveRegistry
14
- } from "./chunk-THSYN5EK.js";
15
12
  import {
16
13
  commandUsage
17
- } from "./chunk-LHPEBLOU.js";
18
- import "./chunk-5IJTPZXP.js";
14
+ } from "./chunk-HT6FS4VB.js";
15
+ import {
16
+ resolveRegistry
17
+ } from "./chunk-7M2VTFLP.js";
19
18
  import {
20
19
  getCommand
21
- } from "./chunk-WF6KLKRN.js";
20
+ } from "./chunk-EFHOWRKU.js";
21
+ import "./chunk-6D3QAFNZ.js";
22
22
  import "./chunk-XNLSTHDK.js";
23
- import "./chunk-FLH4YC6W.js";
23
+ import "./chunk-BF5DRGRZ.js";
24
24
  import {
25
25
  error
26
26
  } from "./chunk-WZWDS3W4.js";
@@ -26582,12 +26582,31 @@ var Comparator = class {
26582
26582
  );
26583
26583
  }
26584
26584
  #parseCaret(comp) {
26585
- const min = this.#xInclusiveMin(comp);
26586
- if (isAny(min)) {
26587
- this.tuples.push(min);
26585
+ const parsed = this.#parseX(comp);
26586
+ if (isXMajor(parsed)) {
26587
+ this.tuples.push(this.#getComparatorAny());
26588
+ return;
26589
+ }
26590
+ const z = this.includePrerelease ? "0" : void 0;
26591
+ if (isXMinor(parsed)) {
26592
+ const [M4] = parsed;
26593
+ this.tuples.push(
26594
+ [">=", new Version(comp, M4, 0, 0, z, void 0)],
26595
+ ["<", new Version(comp, M4 + 1, 0, 0, "0", void 0)]
26596
+ );
26597
+ return;
26598
+ }
26599
+ if (isXPatch(parsed)) {
26600
+ const [M4, m3] = parsed;
26601
+ this.tuples.push(
26602
+ [">=", new Version(comp, M4, m3, 0, z, void 0)],
26603
+ M4 !== 0 ? ["<", new Version(comp, M4 + 1, 0, 0, "0", void 0)] : ["<", new Version(comp, 0, m3 + 1, 0, "0", void 0)]
26604
+ );
26588
26605
  return;
26589
26606
  }
26590
- const minv = min[1];
26607
+ const [M3, m2, p, pr = z, build] = parsed;
26608
+ const minv = new Version(comp, M3, m2, p, pr, build);
26609
+ const min = [">=", minv];
26591
26610
  if (minv.major !== 0) {
26592
26611
  this.tuples.push(min, [
26593
26612
  "<",
@@ -26862,9 +26881,10 @@ var gitHostWebsites = {
26862
26881
  gitlab: "https://gitlab.com/"
26863
26882
  };
26864
26883
  var getOptions = (options) => ({
26865
- catalog: {},
26866
26884
  catalogs: {},
26867
26885
  ...options,
26886
+ // after spread: explicit `catalog: undefined` gets default too
26887
+ catalog: options?.catalog ?? {},
26868
26888
  // built-in aliases are user/service-overridable: user config wins
26869
26889
  "jsr-registries": {
26870
26890
  ...defaultJsrRegistries,
@@ -27041,19 +27061,25 @@ var Spec = class _Spec {
27041
27061
  }
27042
27062
  if (this.bareSpec.startsWith("catalog:")) {
27043
27063
  this.catalog = this.bareSpec.substring("catalog:".length);
27044
- const catalog = this.catalog ? this.options.catalogs?.[this.catalog] : this.options.catalog;
27064
+ const { catalog: defaultCatalog, catalogs = {} } = this.options;
27065
+ const catalog = this.catalog ? Object.hasOwn(catalogs, this.catalog) ? catalogs[this.catalog] : void 0 : Object.keys(defaultCatalog).length ? defaultCatalog : void 0;
27045
27066
  if (!catalog) {
27046
- throw this.#error("Named catalog not found", {
27047
- name: this.catalog,
27048
- validOptions: this.options.catalogs && Object.keys(this.options.catalogs)
27049
- });
27067
+ throw this.#catalogError(
27068
+ this.catalog ? `Catalog "${this.catalog}" not found for ${this.spec}` : `Default catalog not found for ${this.spec}`
27069
+ );
27050
27070
  }
27051
- const sub = catalog[this.name];
27071
+ const catalogName = this.catalog ? `catalog "${this.catalog}"` : "default catalog";
27072
+ const sub = Object.hasOwn(catalog, this.name) ? catalog[this.name] : void 0;
27052
27073
  if (!sub) {
27053
- throw this.#error("Name not found in catalog", {
27054
- name: this.name,
27055
- validOptions: Object.keys(catalog)
27056
- });
27074
+ throw this.#catalogError(
27075
+ `Package "${this.name}" not found in ${catalogName}`
27076
+ );
27077
+ }
27078
+ if (sub.startsWith("catalog:")) {
27079
+ throw this.#error(
27080
+ `Catalog entry "${this.name}" in ${catalogName} cannot be a catalog: spec`,
27081
+ { code: "ECONFIG", found: sub }
27082
+ );
27057
27083
  }
27058
27084
  this.subspec = _Spec.parse(this.name, sub, this.options);
27059
27085
  this.type = "catalog";
@@ -27369,6 +27395,23 @@ var Spec = class _Spec {
27369
27395
  ].map((p) => `${p}:`)
27370
27396
  });
27371
27397
  }
27398
+ /** ECONFIG error listing defined catalogs & ones defining this dep */
27399
+ #catalogError(message) {
27400
+ const { catalog, catalogs = {} } = this.options;
27401
+ const defined = [
27402
+ ...Object.keys(catalog).length ? [["", catalog]] : [],
27403
+ ...Object.entries(catalogs)
27404
+ ];
27405
+ const validOptions = defined.map(([n7]) => `catalog:${n7}`);
27406
+ const wanted = defined.filter(
27407
+ ([, c]) => Object.hasOwn(c, this.name) && !!c[this.name]
27408
+ ).map(([n7]) => `catalog:${n7}`);
27409
+ return this.#error(message, {
27410
+ code: "ECONFIG",
27411
+ ...validOptions.length ? { validOptions } : {},
27412
+ ...wanted.length ? { wanted } : {}
27413
+ });
27414
+ }
27372
27415
  #error(message, extra = {}) {
27373
27416
  return error(message, { spec: this.spec, ...extra }, this.#error);
27374
27417
  }
@@ -32489,7 +32532,7 @@ import { createGunzip } from "node:zlib";
32489
32532
  var package_default = {
32490
32533
  name: "@vltpkg/user-agent",
32491
32534
  description: "The User-Agent string that vlt sends with every outbound request",
32492
- version: "1.4.0",
32535
+ version: "1.6.0",
32493
32536
  repository: {
32494
32537
  type: "git",
32495
32538
  url: "git+https://github.com/vltpkg/vltpkg.git",
@@ -32731,13 +32774,14 @@ var setToken = async (registry, token, identity) => {
32731
32774
  kc.set(normalizeRegistryKey(registry), token);
32732
32775
  await kc.save();
32733
32776
  };
32734
- var getToken = async (registry, identity) => {
32777
+ var getToken = async (registry, identity, defaultKey) => {
32735
32778
  const kc = getKC(identity);
32736
32779
  const key = normalizeRegistryKey(registry);
32737
32780
  const rt2 = runtimeTokens.get(key);
32738
32781
  if (rt2) return rt2;
32739
32782
  const envReg = process.env.VLT_REGISTRY;
32740
- if (envReg && key === normalizeRegistryKey(envReg)) {
32783
+ const tokKey = envReg ? normalizeRegistryKey(envReg) : defaultKey;
32784
+ if (key === tokKey) {
32741
32785
  const envTok = process.env.VLT_TOKEN;
32742
32786
  if (envTok) return `Bearer ${envTok}`;
32743
32787
  }
@@ -32745,6 +32789,10 @@ var getToken = async (registry, identity) => {
32745
32789
  if (tok) return `Bearer ${tok}`;
32746
32790
  return kc.get(key);
32747
32791
  };
32792
+ var defaultRegistryKey = (o) => {
32793
+ const u2 = o.registries?.[o["default-registry-alias"] ?? "npm"];
32794
+ return u2 && URL.canParse(u2) ? normalizeRegistryKey(u2) : void 0;
32795
+ };
32748
32796
  var registryKeys = (o) => [
32749
32797
  ...new Set(
32750
32798
  [
@@ -32755,20 +32803,21 @@ var registryKeys = (o) => [
32755
32803
  ].filter((u2) => !!u2 && URL.canParse(u2)).map(normalizeRegistryKey)
32756
32804
  )
32757
32805
  ];
32758
- var getTokenByURL = async (requestUrl, identity, keys = []) => {
32806
+ var getTokenByURL = async (requestUrl, identity, keys = [], defaultKey) => {
32759
32807
  const normalized = normalizeRegistryKey(requestUrl);
32760
32808
  const candidates = [...runtimeTokens.keys(), ...keys];
32761
32809
  const envReg = process.env.VLT_REGISTRY;
32762
32810
  if (envReg) {
32763
32811
  candidates.push(normalizeRegistryKey(envReg));
32764
32812
  }
32813
+ if (defaultKey) candidates.push(defaultKey);
32765
32814
  const kc = getKC(identity);
32766
32815
  for (const k4 of await kc.keys()) {
32767
32816
  candidates.push(k4);
32768
32817
  }
32769
32818
  const matches = candidates.filter((c) => normalized === c || normalized.startsWith(c + "/")).sort((a2, b) => b.length - a2.length);
32770
32819
  for (const key of matches) {
32771
- const tok = await getToken(key, identity);
32820
+ const tok = await getToken(key, identity, defaultKey);
32772
32821
  if (tok) return tok;
32773
32822
  }
32774
32823
  };
@@ -33967,6 +34016,8 @@ var RegistryClient = class {
33967
34016
  identity;
33968
34017
  /** configured registry keys; `VLT_TOKEN_<key>` applies under each */
33969
34018
  registryKeys;
34019
+ /** default registry key: gets `VLT_TOKEN` if no `VLT_REGISTRY` */
34020
+ defaultRegistryKey;
33970
34021
  staleWhileRevalidateFactor;
33971
34022
  #session = randomUUID();
33972
34023
  #decoded = /* @__PURE__ */ new WeakMap();
@@ -33993,6 +34044,7 @@ var RegistryClient = class {
33993
34044
  } = options;
33994
34045
  this.identity = identity;
33995
34046
  this.registryKeys = registryKeys(options);
34047
+ this.defaultRegistryKey = defaultRegistryKey(options);
33996
34048
  this.staleWhileRevalidateFactor = staleWhileRevalidateFactor;
33997
34049
  const path2 = resolve10(cache, "registry-client");
33998
34050
  const store = options.storeRoot ?? storeRoot(cache);
@@ -34381,7 +34433,8 @@ var RegistryClient = class {
34381
34433
  await getTokenByURL(
34382
34434
  String(u2),
34383
34435
  this.identity,
34384
- this.registryKeys
34436
+ this.registryKeys,
34437
+ this.defaultRegistryKey
34385
34438
  )
34386
34439
  );
34387
34440
  logRequest(url, "start", { method: o.method });
@@ -34506,7 +34559,8 @@ var RegistryClient = class {
34506
34559
  await getTokenByURL(
34507
34560
  String(u2),
34508
34561
  this.identity,
34509
- this.registryKeys
34562
+ this.registryKeys,
34563
+ this.defaultRegistryKey
34510
34564
  )
34511
34565
  );
34512
34566
  }
@@ -14,46 +14,53 @@ import {
14
14
  } from "./chunk-CLVRCGOZ.js";
15
15
  import {
16
16
  openUrl
17
- } from "./chunk-TPRK6IDA.js";
17
+ } from "./chunk-22LZBDEC.js";
18
18
  import {
19
19
  createHostContextsMap
20
- } from "./chunk-ASLX43R3.js";
21
- import "./chunk-FZUYGJZU.js";
22
- import "./chunk-QCSUWACA.js";
23
- import "./chunk-G2YT2GWF.js";
24
- import "./chunk-5Y4SYLJ2.js";
20
+ } from "./chunk-JCNI6ZHH.js";
25
21
  import {
26
- PackageInfoClient
27
- } from "./chunk-TO23PR7J.js";
28
- import "./chunk-SRWDPPLX.js";
29
- import "./chunk-WGDTG44V.js";
30
- import "./chunk-THSYN5EK.js";
31
- import {
32
- Query,
33
22
  actual
34
- } from "./chunk-OVPHE4O7.js";
23
+ } from "./chunk-36UIE654.js";
24
+ import {
25
+ Query
26
+ } from "./chunk-F5LZMLAQ.js";
35
27
  import {
36
28
  SecurityArchive
37
- } from "./chunk-5TNXLRW2.js";
29
+ } from "./chunk-YTDABXPD.js";
30
+ import "./chunk-KVWGMSPW.js";
31
+ import "./chunk-LGQVZTYR.js";
32
+ import "./chunk-EYGOEAJM.js";
38
33
  import {
39
34
  commandUsage
40
- } from "./chunk-LHPEBLOU.js";
41
- import "./chunk-I7UMHYZX.js";
35
+ } from "./chunk-HT6FS4VB.js";
36
+ import {
37
+ PackageInfoClient
38
+ } from "./chunk-LCLRP64K.js";
39
+ import "./chunk-SRWDPPLX.js";
40
+ import "./chunk-JV5XR5JQ.js";
41
+ import "./chunk-EMTGRCSE.js";
42
+ import "./chunk-TQQO2F56.js";
42
43
  import "./chunk-4KCU2KZL.js";
43
- import "./chunk-PLG3OYCX.js";
44
+ import "./chunk-WGDTG44V.js";
45
+ import "./chunk-E74WGW5C.js";
46
+ import "./chunk-GCTREKA4.js";
47
+ import "./chunk-MCDLJZXT.js";
48
+ import "./chunk-7M2VTFLP.js";
49
+ import "./chunk-EFHOWRKU.js";
50
+ import "./chunk-CAV7FKWQ.js";
44
51
  import {
45
52
  Spec
46
- } from "./chunk-5IJTPZXP.js";
47
- import "./chunk-WF6KLKRN.js";
53
+ } from "./chunk-6D3QAFNZ.js";
48
54
  import "./chunk-HTOTG4TS.js";
49
- import "./chunk-APMYKJI2.js";
50
- import "./chunk-SR2VOY5J.js";
51
- import "./chunk-ZJMJ7MCT.js";
52
- import "./chunk-U7TEQCBN.js";
55
+ import "./chunk-QNHBAGXQ.js";
56
+ import "./chunk-GEQFMH5M.js";
57
+ import "./chunk-4GMNWW4C.js";
58
+ import "./chunk-SUU2WETN.js";
59
+ import "./chunk-B6RIGNEO.js";
53
60
  import "./chunk-XNLSTHDK.js";
54
61
  import "./chunk-PDWPFR5T.js";
55
62
  import "./chunk-Y5PA7DVK.js";
56
- import "./chunk-FLH4YC6W.js";
63
+ import "./chunk-BF5DRGRZ.js";
57
64
  import {
58
65
  error
59
66
  } from "./chunk-WZWDS3W4.js";