@vltpkg/cli-js 1.3.7 → 1.4.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 (87) hide show
  1. package/{access-4W6PMOGC.js → access-422UGEWN.js} +8 -8
  2. package/{bugs-FJHQFPZF.js → bugs-RED7Y33Q.js} +17 -17
  3. package/{build-SPWU3NOH.js → build-IHMPBWRO.js} +9 -9
  4. package/{cache-SBNEPOMQ.js → cache-FJP2RZJX.js} +31 -19
  5. package/cache-unzip-src-unzip.js +21 -1
  6. package/{chunk-SPWJ3X5Y.js → chunk-2AMOC4DN.js} +4 -4
  7. package/{chunk-QYS5MGGM.js → chunk-4UCADW6S.js} +86 -10
  8. package/{chunk-GZ5MYMBT.js → chunk-5IJTPZXP.js} +1 -1
  9. package/{chunk-L3K2ZAOO.js → chunk-5RHABCYI.js} +76 -11
  10. package/{chunk-OWUICQFY.js → chunk-5TNXLRW2.js} +33 -20
  11. package/{chunk-IHXJVKAE.js → chunk-5Y4SYLJ2.js} +2 -1
  12. package/chunk-6IF3RJND.js +81 -0
  13. package/{chunk-3U6QWN62.js → chunk-7T3XAYP4.js} +1 -1
  14. package/{chunk-FKZ5I53D.js → chunk-ASLX43R3.js} +3 -3
  15. package/{chunk-5ZCDGBVU.js → chunk-C23TDXRG.js} +1 -1
  16. package/{chunk-H77JYU7F.js → chunk-DNRR3XMG.js} +12 -3
  17. package/{chunk-IBGFQR23.js → chunk-FLH4YC6W.js} +21 -0
  18. package/{chunk-XDSZO74H.js → chunk-FZUYGJZU.js} +7 -7
  19. package/{chunk-W2ZO5RZL.js → chunk-GIIAODRI.js} +4 -4
  20. package/{chunk-F5D3DVC5.js → chunk-HZXJ423P.js} +7 -3
  21. package/{chunk-CB65DPZ2.js → chunk-I7UMHYZX.js} +151 -27
  22. package/{chunk-2M2O6A4R.js → chunk-ISE4IRHF.js} +4 -4
  23. package/{chunk-TLY4VGMH.js → chunk-LHPEBLOU.js} +1 -1
  24. package/{chunk-EL4GVZK5.js → chunk-MKWPTN3C.js} +2 -2
  25. package/{chunk-QVPNKMUU.js → chunk-OAJ3PO3Z.js} +115 -19
  26. package/{chunk-7BHHCB5C.js → chunk-OVPHE4O7.js} +348 -24
  27. package/{chunk-KOFQTETH.js → chunk-PHJJPY5G.js} +3 -3
  28. package/{chunk-SV4WK3KX.js → chunk-PLG3OYCX.js} +2 -2
  29. package/{chunk-KMOOTBHM.js → chunk-QCSUWACA.js} +1 -1
  30. package/{chunk-6D54UN4T.js → chunk-SR2VOY5J.js} +1 -1
  31. package/chunk-T6FBP4OU.js +76 -0
  32. package/{chunk-A2TSRXZD.js → chunk-THSYN5EK.js} +1 -1
  33. package/{chunk-3D3IB4YN.js → chunk-TO23PR7J.js} +61 -27
  34. package/{chunk-OWMR2EDW.js → chunk-TPRK6IDA.js} +1 -1
  35. package/chunk-UGCKF5ZE.js +57 -0
  36. package/{chunk-SE2FSMBR.js → chunk-WF6KLKRN.js} +26 -10
  37. package/{chunk-I7SCSGUO.js → chunk-X4FVR4R5.js} +23 -18
  38. package/{chunk-VBDNOU76.js → chunk-ZJMJ7MCT.js} +1 -1
  39. package/{ci-76TAJGF5.js → ci-YSKNNO5M.js} +10 -10
  40. package/cli-package.json +1 -1
  41. package/{config-3UQXAYAA.js → config-CSPCDMR3.js} +9 -8
  42. package/{config-AFIHF54I.js → config-HO7GY3QT.js} +11 -10
  43. package/{create-5ADQTH6K.js → create-2TJT3AHJ.js} +19 -18
  44. package/{deprecate-RTQVLJDZ.js → deprecate-7FRJI2RL.js} +11 -11
  45. package/{dist-tag-V4DRDHWA.js → dist-tag-WCFF5OEG.js} +8 -8
  46. package/{docs-RRULRTKQ.js → docs-JMBPTU23.js} +17 -17
  47. package/{exec-NXQUCX3I.js → exec-FBOUKZZ2.js} +27 -18
  48. package/{exec-cache-KVZJHFZD.js → exec-cache-X3ZWM5S3.js} +16 -16
  49. package/{exec-local-53B5IRKG.js → exec-local-Y3KQC22N.js} +16 -15
  50. package/{help-EN4XUTMS.js → help-PUKVH5X7.js} +4 -4
  51. package/{init-4L6CQMIL.js → init-GOKAQXXZ.js} +10 -10
  52. package/{install-MHWLYW3X.js → install-XFN4UFOC.js} +116 -16
  53. package/{list-XZRF7TBW.js → list-43JFFG5D.js} +19 -19
  54. package/{login-6GRRY4H7.js → login-RSTZKNKN.js} +13 -12
  55. package/{logout-KI2AOYRT.js → logout-4576FFXZ.js} +8 -8
  56. package/{outdated-TWUPFRCD.js → outdated-ACQ5A2Y7.js} +31 -29
  57. package/{pack-2ZQLDYFD.js → pack-QQVJ3G25.js} +15 -12
  58. package/package.json +1 -1
  59. package/{ping-ZOTGLOKY.js → ping-QCDQQRO5.js} +8 -8
  60. package/{pkg-HRNOTFXB.js → pkg-CSOJV7UC.js} +17 -12
  61. package/{profile-5V3FFDMG.js → profile-VL4HPW3N.js} +8 -8
  62. package/{publish-7ZXEMWTW.js → publish-2YBO6ZXE.js} +23 -18
  63. package/{query-62UDNMGR.js → query-IHHFMJRT.js} +19 -19
  64. package/{registry-MQJJCWJY.js → registry-W7BRZZZ2.js} +5 -5
  65. package/registry-client-src-revalidate.js +132 -17
  66. package/{repo-HDUGP5PH.js → repo-L3BXAAWS.js} +17 -17
  67. package/{reporter-TGBPLNR5.js → reporter-5NYOHBO7.js} +11 -10
  68. package/{run-6NRDZD4T.js → run-AMUUVLTI.js} +16 -15
  69. package/{run-exec-I4IIXTLW.js → run-exec-5W3XWQZA.js} +16 -15
  70. package/security-archive-src-update-expired.js +46 -12
  71. package/{setup-UVXEFUUJ.js → setup-TFM4GJF7.js} +16 -15
  72. package/{src-QEJ6WZQ7.js → src-4CYCUWZL.js} +29 -24
  73. package/{src-6CJEMSVB.js → src-I3GMULFP.js} +6 -4
  74. package/{src-GP7VLT7P.js → src-LUTN2ODD.js} +58 -9
  75. package/{token-WTN27E7A.js → token-OANOBE3G.js} +8 -8
  76. package/{uninstall-ZJOKXIVQ.js → uninstall-YXTQ4AIZ.js} +12 -12
  77. package/{unpublish-LMUGR7GI.js → unpublish-SZXYMYIU.js} +8 -8
  78. package/{update-WVWMRUYY.js → update-FHLMWGIM.js} +26 -16
  79. package/{version-OJTRHNKV.js → version-ZWFCTU5V.js} +16 -11
  80. package/{view-6Q5B7ZYN.js → view-NFNJXMLV.js} +73 -25
  81. package/vlr.js +1 -1
  82. package/vlrx.js +1 -1
  83. package/vlt.js +1 -1
  84. package/vlx.js +1 -1
  85. package/vlxl.js +1 -1
  86. package/{whoami-SPF34TV6.js → whoami-O7GOSGCI.js} +8 -8
  87. package/chunk-A6FAI65V.js +0 -76
@@ -11,25 +11,25 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  resolveRegistry
14
- } from "./chunk-A2TSRXZD.js";
14
+ } from "./chunk-THSYN5EK.js";
15
15
  import {
16
16
  commandUsage
17
- } from "./chunk-TLY4VGMH.js";
18
- import "./chunk-GZ5MYMBT.js";
19
- import "./chunk-SE2FSMBR.js";
17
+ } from "./chunk-LHPEBLOU.js";
18
+ import "./chunk-5IJTPZXP.js";
19
+ import "./chunk-WF6KLKRN.js";
20
20
  import {
21
21
  RegistryClient
22
- } from "./chunk-QVPNKMUU.js";
22
+ } from "./chunk-OAJ3PO3Z.js";
23
23
  import "./chunk-APMYKJI2.js";
24
24
  import {
25
25
  assertOk
26
- } from "./chunk-6D54UN4T.js";
27
- import "./chunk-VBDNOU76.js";
26
+ } from "./chunk-SR2VOY5J.js";
27
+ import "./chunk-ZJMJ7MCT.js";
28
28
  import "./chunk-U7TEQCBN.js";
29
29
  import "./chunk-XNLSTHDK.js";
30
30
  import "./chunk-PDWPFR5T.js";
31
31
  import "./chunk-Y5PA7DVK.js";
32
- import "./chunk-IBGFQR23.js";
32
+ import "./chunk-FLH4YC6W.js";
33
33
  import {
34
34
  error
35
35
  } from "./chunk-WZWDS3W4.js";
@@ -14,46 +14,46 @@ import {
14
14
  } from "./chunk-CLVRCGOZ.js";
15
15
  import {
16
16
  openUrl
17
- } from "./chunk-OWMR2EDW.js";
17
+ } from "./chunk-TPRK6IDA.js";
18
18
  import {
19
19
  createHostContextsMap
20
- } from "./chunk-FKZ5I53D.js";
21
- import "./chunk-XDSZO74H.js";
22
- import "./chunk-KMOOTBHM.js";
20
+ } from "./chunk-ASLX43R3.js";
21
+ import "./chunk-FZUYGJZU.js";
22
+ import "./chunk-QCSUWACA.js";
23
23
  import "./chunk-G2YT2GWF.js";
24
- import "./chunk-IHXJVKAE.js";
24
+ import "./chunk-5Y4SYLJ2.js";
25
25
  import {
26
26
  PackageInfoClient
27
- } from "./chunk-3D3IB4YN.js";
27
+ } from "./chunk-TO23PR7J.js";
28
28
  import "./chunk-SRWDPPLX.js";
29
29
  import "./chunk-WGDTG44V.js";
30
- import "./chunk-A2TSRXZD.js";
30
+ import "./chunk-THSYN5EK.js";
31
31
  import {
32
32
  Query,
33
33
  actual
34
- } from "./chunk-7BHHCB5C.js";
34
+ } from "./chunk-OVPHE4O7.js";
35
35
  import {
36
36
  SecurityArchive
37
- } from "./chunk-OWUICQFY.js";
37
+ } from "./chunk-5TNXLRW2.js";
38
38
  import {
39
39
  commandUsage
40
- } from "./chunk-TLY4VGMH.js";
41
- import "./chunk-CB65DPZ2.js";
40
+ } from "./chunk-LHPEBLOU.js";
41
+ import "./chunk-I7UMHYZX.js";
42
42
  import "./chunk-4KCU2KZL.js";
43
- import "./chunk-SV4WK3KX.js";
43
+ import "./chunk-PLG3OYCX.js";
44
44
  import {
45
45
  Spec
46
- } from "./chunk-GZ5MYMBT.js";
47
- import "./chunk-SE2FSMBR.js";
46
+ } from "./chunk-5IJTPZXP.js";
47
+ import "./chunk-WF6KLKRN.js";
48
48
  import "./chunk-HTOTG4TS.js";
49
49
  import "./chunk-APMYKJI2.js";
50
- import "./chunk-6D54UN4T.js";
51
- import "./chunk-VBDNOU76.js";
50
+ import "./chunk-SR2VOY5J.js";
51
+ import "./chunk-ZJMJ7MCT.js";
52
52
  import "./chunk-U7TEQCBN.js";
53
53
  import "./chunk-XNLSTHDK.js";
54
54
  import "./chunk-PDWPFR5T.js";
55
55
  import "./chunk-Y5PA7DVK.js";
56
- import "./chunk-IBGFQR23.js";
56
+ import "./chunk-FLH4YC6W.js";
57
57
  import {
58
58
  error
59
59
  } from "./chunk-WZWDS3W4.js";
@@ -11,24 +11,24 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  build
14
- } from "./chunk-7BHHCB5C.js";
15
- import "./chunk-OWUICQFY.js";
14
+ } from "./chunk-OVPHE4O7.js";
15
+ import "./chunk-5TNXLRW2.js";
16
16
  import {
17
17
  commandUsage
18
- } from "./chunk-TLY4VGMH.js";
19
- import "./chunk-CB65DPZ2.js";
20
- import "./chunk-SV4WK3KX.js";
21
- import "./chunk-GZ5MYMBT.js";
22
- import "./chunk-SE2FSMBR.js";
18
+ } from "./chunk-LHPEBLOU.js";
19
+ import "./chunk-I7UMHYZX.js";
20
+ import "./chunk-PLG3OYCX.js";
21
+ import "./chunk-5IJTPZXP.js";
22
+ import "./chunk-WF6KLKRN.js";
23
23
  import "./chunk-HTOTG4TS.js";
24
- import "./chunk-VBDNOU76.js";
24
+ import "./chunk-ZJMJ7MCT.js";
25
25
  import "./chunk-U7TEQCBN.js";
26
26
  import "./chunk-XNLSTHDK.js";
27
27
  import "./chunk-PDWPFR5T.js";
28
28
  import "./chunk-Y5PA7DVK.js";
29
29
  import {
30
30
  isErrorWithCause
31
- } from "./chunk-IBGFQR23.js";
31
+ } from "./chunk-FLH4YC6W.js";
32
32
  import {
33
33
  error
34
34
  } from "./chunk-WZWDS3W4.js";
@@ -15,47 +15,48 @@ import {
15
15
  import {
16
16
  stderr,
17
17
  stdout
18
- } from "./chunk-XDSZO74H.js";
19
- import "./chunk-KMOOTBHM.js";
18
+ } from "./chunk-FZUYGJZU.js";
19
+ import "./chunk-QCSUWACA.js";
20
20
  import "./chunk-G2YT2GWF.js";
21
- import "./chunk-IHXJVKAE.js";
21
+ import "./chunk-5Y4SYLJ2.js";
22
22
  import "./chunk-WGDTG44V.js";
23
- import "./chunk-A2TSRXZD.js";
23
+ import "./chunk-THSYN5EK.js";
24
24
  import {
25
25
  commandUsage
26
- } from "./chunk-TLY4VGMH.js";
26
+ } from "./chunk-LHPEBLOU.js";
27
27
  import {
28
28
  ViewClass
29
29
  } from "./chunk-4KCU2KZL.js";
30
- import "./chunk-SV4WK3KX.js";
30
+ import "./chunk-PLG3OYCX.js";
31
31
  import {
32
32
  Spec
33
- } from "./chunk-GZ5MYMBT.js";
34
- import "./chunk-SE2FSMBR.js";
33
+ } from "./chunk-5IJTPZXP.js";
34
+ import "./chunk-WF6KLKRN.js";
35
35
  import {
36
36
  CacheEntry
37
- } from "./chunk-QVPNKMUU.js";
37
+ } from "./chunk-OAJ3PO3Z.js";
38
38
  import "./chunk-APMYKJI2.js";
39
39
  import {
40
40
  assertOk
41
- } from "./chunk-6D54UN4T.js";
42
- import "./chunk-VBDNOU76.js";
41
+ } from "./chunk-SR2VOY5J.js";
42
+ import "./chunk-ZJMJ7MCT.js";
43
43
  import "./chunk-U7TEQCBN.js";
44
44
  import "./chunk-XNLSTHDK.js";
45
45
  import {
46
46
  readStoreIndex,
47
47
  removeStoreEntry,
48
48
  storeEntryCopied,
49
+ storeEntryLastCopied,
49
50
  storeEntryLinked,
50
51
  storeEntryNames,
51
52
  storeEntryTime,
52
53
  verifyStoreEntry
53
- } from "./chunk-H77JYU7F.js";
54
+ } from "./chunk-DNRR3XMG.js";
54
55
  import "./chunk-PDWPFR5T.js";
55
56
  import "./chunk-Y5PA7DVK.js";
56
57
  import {
57
58
  integrityHex
58
- } from "./chunk-IBGFQR23.js";
59
+ } from "./chunk-FLH4YC6W.js";
59
60
  import {
60
61
  error
61
62
  } from "./chunk-WZWDS3W4.js";
@@ -78,6 +79,7 @@ var CacheView = class extends ViewClass {
78
79
  var views = {
79
80
  human: CacheView
80
81
  };
82
+ var pruneDays = 30;
81
83
  var usageDef = {
82
84
  command: "cache",
83
85
  usage: "<command> [flags]",
@@ -130,11 +132,14 @@ var usageDef = {
130
132
  a file in \`node_modules\` was edited in place.`
131
133
  },
132
134
  "prune-store": {
133
- usage: "",
135
+ usage: "[<date>]",
134
136
  description: `Remove global store entries that no \`node_modules\`
135
- folder links to. Entries ever copied from (install
136
- scripts, \`store-linker=copy\`, a cache on another
137
- drive) stay: copies do not show use.`
137
+ folder links to. Copies do not show use: an entry
138
+ copied or cloned from (install scripts,
139
+ \`store-linker=copy\`, macOS, a cache on another
140
+ drive) stays if that last happened after
141
+ \`<date>\`, or in the last ${pruneDays} days
142
+ without one.`
138
143
  }
139
144
  },
140
145
  examples: {
@@ -398,14 +403,21 @@ var verify = async (conf, specs, view2) => {
398
403
  ...!all && { missing }
399
404
  };
400
405
  };
401
- var pruneStore = async (conf, _, view2) => {
406
+ var pruneStore = async (conf, args, view2) => {
407
+ const since = args.length ? new Date(args.join(" ")).getTime() : Date.now() - pruneDays * 24 * 60 * 60 * 1e3;
408
+ if (Number.isNaN(since)) {
409
+ throw error("Invalid date", {
410
+ code: "EUSAGE",
411
+ found: args.join(" ")
412
+ });
413
+ }
402
414
  const { storeRoot } = conf.options;
403
415
  const names = storeEntryNames(storeRoot);
404
416
  const removed = {};
405
417
  for (const hex of names) {
406
418
  const entry = resolve(storeRoot, hex);
407
419
  const index = readStoreIndex(entry);
408
- if (storeEntryCopied(entry, index) || storeEntryLinked(entry, index)) {
420
+ if (storeEntryCopied(entry, index) && storeEntryLastCopied(entry) >= since || storeEntryLinked(entry, index)) {
409
421
  continue;
410
422
  }
411
423
  removeStoreEntry(entry);
@@ -34,7 +34,27 @@ function syntaxError(message, cause, from) {
34
34
  }
35
35
 
36
36
  // ../../src/fast-split/src/index.ts
37
+ var splitTwo = (str, delim) => {
38
+ const a = str.indexOf(delim);
39
+ return a === -1 ? [str] : [str.substring(0, a), str.substring(a + delim.length)];
40
+ };
41
+ var splitThree = (str, delim) => {
42
+ const a = str.indexOf(delim);
43
+ if (a === -1) return [str];
44
+ const l = delim.length;
45
+ const b = str.indexOf(delim, a + l);
46
+ return b === -1 ? [str.substring(0, a), str.substring(a + l)] : [
47
+ str.substring(0, a),
48
+ str.substring(a + l, b),
49
+ str.substring(b + l)
50
+ ];
51
+ };
37
52
  function fastSplit(str, delim, limit = -1, onPart) {
53
+ if (onPart === void 0) {
54
+ if (limit === 2) return splitTwo(str, delim);
55
+ if (limit === 3)
56
+ return splitThree(str, delim);
57
+ }
38
58
  let i = 0;
39
59
  let p = 0;
40
60
  const l = delim.length;
@@ -7182,7 +7202,7 @@ import { join as join2 } from "node:path";
7182
7202
  import { performance as performance2 } from "node:perf_hooks";
7183
7203
  import { debuglog as debuglog3 } from "node:util";
7184
7204
  var debug3 = debuglog3("vlt");
7185
- var linkers = /* @__PURE__ */ new Set(["auto", "hardlink", "copy"]);
7205
+ var linkers = /* @__PURE__ */ new Set(["auto", "hardlink", "clone", "copy"]);
7186
7206
  var storeEnabled = () => linkers.has(process.env.VLT_STORE_LINKER ?? "");
7187
7207
  var STALE_MS = 60 * 60 * 1e3;
7188
7208
  var parseConcurrency = (raw) => {
@@ -15,14 +15,14 @@ import {
15
15
  pairsToRecords,
16
16
  registrySelectionFields,
17
17
  registrySelectors
18
- } from "./chunk-L3K2ZAOO.js";
18
+ } from "./chunk-5RHABCYI.js";
19
19
  import {
20
20
  normalizeRegistryURL
21
- } from "./chunk-A2TSRXZD.js";
21
+ } from "./chunk-THSYN5EK.js";
22
22
  import {
23
23
  getCommand,
24
24
  isRecordField
25
- } from "./chunk-SE2FSMBR.js";
25
+ } from "./chunk-WF6KLKRN.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-IBGFQR23.js";
36
+ } from "./chunk-FLH4YC6W.js";
37
37
  import {
38
38
  error
39
39
  } from "./chunk-WZWDS3W4.js";
@@ -11,17 +11,19 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  PackageInfoClient
14
- } from "./chunk-3D3IB4YN.js";
14
+ } from "./chunk-TO23PR7J.js";
15
15
  import {
16
+ RollbackRemove,
17
+ cmdShim,
16
18
  findCmdShimIfExists,
17
19
  install
18
- } from "./chunk-7BHHCB5C.js";
20
+ } from "./chunk-OVPHE4O7.js";
19
21
  import {
20
22
  PathScurry
21
- } from "./chunk-CB65DPZ2.js";
23
+ } from "./chunk-I7UMHYZX.js";
22
24
  import {
23
25
  Spec
24
- } from "./chunk-GZ5MYMBT.js";
26
+ } from "./chunk-5IJTPZXP.js";
25
27
  import {
26
28
  walkUp
27
29
  } from "./chunk-HTOTG4TS.js";
@@ -30,7 +32,7 @@ import {
30
32
  } from "./chunk-XNLSTHDK.js";
31
33
  import {
32
34
  parseScope
33
- } from "./chunk-IBGFQR23.js";
35
+ } from "./chunk-FLH4YC6W.js";
34
36
  import {
35
37
  error
36
38
  } from "./chunk-WZWDS3W4.js";
@@ -221,7 +223,7 @@ var vlxInstall = async (spec, options, promptFn) => {
221
223
  };
222
224
 
223
225
  // ../../src/vlx/src/resolve.ts
224
- import { resolve as resolve6 } from "node:path";
226
+ import { resolve as resolve7 } from "node:path";
225
227
 
226
228
  // ../../src/vlx/src/add-to-path.ts
227
229
  import { delimiter } from "node:path";
@@ -279,6 +281,72 @@ var findPackage = async (name, projectRoot, packageJson) => {
279
281
  }
280
282
  };
281
283
 
284
+ // ../../src/vlx/src/local.ts
285
+ import { createHash as createHash2 } from "node:crypto";
286
+ import {
287
+ mkdir as mkdir2,
288
+ mkdtemp,
289
+ readFile,
290
+ realpath,
291
+ rename,
292
+ rm as rm2
293
+ } from "node:fs/promises";
294
+ import { basename as basename2, resolve as resolve6 } from "node:path";
295
+ import { pathToFileURL as pathToFileURL2 } from "node:url";
296
+ var localDir = async (spec) => {
297
+ const { type, file } = spec.final;
298
+ if (type !== "file" || !file) return;
299
+ const dir = resolve6(file);
300
+ return await dirExists(dir) ? dir : void 0;
301
+ };
302
+ var vlxLocal = async (dir, packageJson) => {
303
+ const manifest = packageJson.read(dir);
304
+ const bins = Object.entries(manifest.bin ?? {});
305
+ const heads = await Promise.all(
306
+ bins.map(async ([k, v]) => {
307
+ const target = resolve6(dir, v);
308
+ const data = await readFile(target, "utf8").catch(
309
+ (cause) => {
310
+ throw error(`Bin target not found: ${k} -> ${v}`, {
311
+ path: target,
312
+ cause
313
+ });
314
+ }
315
+ );
316
+ return `\0${k}\0${v}\0${data.trim().split(/\r*\n/)[0]}`;
317
+ })
318
+ );
319
+ const key = createHash2("sha512").update(dir + heads.join("")).digest("hex").substring(0, 16);
320
+ const cache = new XDG("vlt/vlx-local").cache();
321
+ await mkdir2(cache, { recursive: true });
322
+ const path = resolve6(await realpath(cache), key);
323
+ if (!await dirExists(path)) {
324
+ const tmp = await mkdtemp(`${path}-`);
325
+ const remover = new RollbackRemove();
326
+ await Promise.all(
327
+ bins.map(
328
+ ([k, v]) => cmdShim(
329
+ resolve6(dir, v),
330
+ resolve6(tmp, "node_modules/.bin", k),
331
+ remover
332
+ )
333
+ )
334
+ );
335
+ remover.confirm();
336
+ await rename(tmp, path).catch(async (er) => {
337
+ if (!await dirExists(path)) throw er;
338
+ await rm2(tmp, { recursive: true, force: true });
339
+ });
340
+ }
341
+ return {
342
+ path,
343
+ name: manifest.name ?? basename2(dir),
344
+ version: manifest.version,
345
+ resolved: String(pathToFileURL2(dir)),
346
+ arg0: inferDefaultExecutable(manifest)?.[0]
347
+ };
348
+ };
349
+
282
350
  // ../../src/vlx/src/resolve.ts
283
351
  var vlxResolve = async (positionals, options, promptFn) => {
284
352
  const noArgs = positionals.length === 0;
@@ -289,22 +357,30 @@ var vlxResolve = async (positionals, options, promptFn) => {
289
357
  if (!arg0) {
290
358
  return void 0;
291
359
  }
292
- const found = await findExecutable(arg0, projectRoot);
360
+ const found = arg0 === "." || arg0 === ".." || /[\\/]/.test(arg0) ? void 0 : await findExecutable(arg0, projectRoot);
293
361
  if (found) return found;
294
362
  pkgOption = arg0;
295
363
  arg0 = void 0;
296
364
  }
297
365
  let pkgTarget = void 0;
366
+ let dir;
298
367
  if (pkgOption) {
299
- const pkgSpec = Spec.parseArgs(pkgOption, options);
368
+ const pkgSpec = Spec.parseArgs(
369
+ // bare . / .. are paths, not names
370
+ pkgOption === "." || pkgOption === ".." ? `${pkgOption}/` : pkgOption,
371
+ options
372
+ );
300
373
  const { name, bareSpec } = pkgSpec.final;
301
374
  if (!bareSpec) {
302
375
  pkgTarget = await findPackage(name, projectRoot, packageJson);
376
+ } else {
377
+ dir = await localDir(pkgSpec);
378
+ if (dir) pkgTarget = await vlxLocal(dir, packageJson);
303
379
  }
304
380
  pkgTarget ??= await vlxInstall(pkgSpec, options, promptFn);
305
381
  }
306
382
  if (pkgTarget) {
307
- addToPATH(resolve6(pkgTarget.path, "node_modules/.bin"));
383
+ addToPATH(resolve7(pkgTarget.path, "node_modules/.bin"));
308
384
  if (noArgs) return void 0;
309
385
  }
310
386
  if (!arg0) {
@@ -316,7 +392,7 @@ var vlxResolve = async (positionals, options, promptFn) => {
316
392
  arg0 = pkgTarget.arg0;
317
393
  if (!arg0) {
318
394
  const { name, version, bin } = packageJson.read(
319
- resolve6(pkgTarget.path, "node_modules", pkgTarget.name)
395
+ dir ?? resolve7(pkgTarget.path, "node_modules", pkgTarget.name)
320
396
  );
321
397
  throw error("Package executable could not be inferred", {
322
398
  name,
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  Spec,
14
14
  kCustomInspect
15
- } from "./chunk-IBGFQR23.js";
15
+ } from "./chunk-FLH4YC6W.js";
16
16
 
17
17
  // ../../src/spec/src/index.ts
18
18
  import { homedir } from "node:os";
@@ -11,15 +11,15 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  PackageInfoClient
14
- } from "./chunk-3D3IB4YN.js";
14
+ } from "./chunk-TO23PR7J.js";
15
15
  import {
16
16
  Monorepo,
17
17
  PackageJson,
18
18
  PathScurry
19
- } from "./chunk-CB65DPZ2.js";
19
+ } from "./chunk-I7UMHYZX.js";
20
20
  import {
21
21
  resetCaches
22
- } from "./chunk-SV4WK3KX.js";
22
+ } from "./chunk-PLG3OYCX.js";
23
23
  import {
24
24
  commands,
25
25
  defaultValues,
@@ -28,7 +28,7 @@ import {
28
28
  isRecordField,
29
29
  recordFields,
30
30
  storeLinkers
31
- } from "./chunk-SE2FSMBR.js";
31
+ } from "./chunk-WF6KLKRN.js";
32
32
  import {
33
33
  find,
34
34
  load,
@@ -37,14 +37,21 @@ import {
37
37
  } from "./chunk-HTOTG4TS.js";
38
38
  import {
39
39
  storeRoot
40
- } from "./chunk-6D54UN4T.js";
40
+ } from "./chunk-SR2VOY5J.js";
41
+ import {
42
+ cloneAvailable
43
+ } from "./chunk-6IF3RJND.js";
41
44
  import {
42
45
  assertRecordStringString,
43
46
  assertRecordStringT,
47
+ builtinProtocols,
48
+ defaultGitHosts,
49
+ defaultJsrRegistries,
50
+ defaultRegistries,
44
51
  getOptions,
45
52
  isObject,
46
53
  isRecordStringString
47
- } from "./chunk-IBGFQR23.js";
54
+ } from "./chunk-FLH4YC6W.js";
48
55
  import {
49
56
  error
50
57
  } from "./chunk-WZWDS3W4.js";
@@ -133,6 +140,54 @@ var mergeLayers = (layers) => {
133
140
  return result;
134
141
  };
135
142
 
143
+ // ../../src/cli-sdk/src/config/spec-aliases.ts
144
+ var builtins = {
145
+ registries: defaultRegistries,
146
+ "jsr-registries": defaultJsrRegistries,
147
+ "git-hosts": defaultGitHosts
148
+ };
149
+ var fields = Object.keys(builtins);
150
+ var assertSpecAliases = (values) => {
151
+ const owners = /* @__PURE__ */ new Map();
152
+ for (const field of fields) {
153
+ for (const key of Object.keys(builtins[field])) {
154
+ if (values[field]?.[key] === void 0) {
155
+ owners.set(key, { field, builtin: true });
156
+ }
157
+ }
158
+ }
159
+ for (const field of fields) {
160
+ for (const key of Object.keys(values[field] ?? {})) {
161
+ const name = `${field}.${key}`;
162
+ if (builtinProtocols.has(key)) {
163
+ throw error(
164
+ `${name} shadows the built-in \`${key}:\` protocol`,
165
+ {
166
+ code: "ECONFIG",
167
+ name,
168
+ found: key,
169
+ wanted: "a name that is not a built-in protocol"
170
+ }
171
+ );
172
+ }
173
+ const owner = owners.get(key);
174
+ if (owner) {
175
+ const where = `${owner.field}.${key}${owner.builtin ? " (built-in)" : ""}`;
176
+ throw error(
177
+ `\`${key}:\` spec prefix defined in both ${where} and ${name}`,
178
+ {
179
+ code: "ECONFIG",
180
+ name,
181
+ found: key,
182
+ wanted: `a ${field} name not used by ${owner.field}`
183
+ }
184
+ );
185
+ }
186
+ owners.set(key, { field, builtin: false });
187
+ }
188
+ }
189
+ };
190
+
136
191
  // ../../src/cli-sdk/src/config/index.ts
137
192
  var kCustomInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
138
193
  var reducePairs = (pairs) => {
@@ -240,6 +295,7 @@ var Config = class _Config {
240
295
  const asRecords = pairsToRecords(this.parse().values);
241
296
  const extras = {
242
297
  projectRoot: this.projectRoot,
298
+ signal: this.#abort.signal,
243
299
  storeRoot: storeRoot(asRecords.cache),
244
300
  scurry,
245
301
  packageJson,
@@ -279,7 +335,7 @@ var Config = class _Config {
279
335
  [kCustomInspect]() {
280
336
  return Object.fromEntries(
281
337
  Object.entries(options).filter(
282
- ([k]) => k !== "monorepo" && k !== "scurry" && k !== "packageJson" && k !== "packageInfo"
338
+ ([k]) => k !== "monorepo" && k !== "scurry" && k !== "packageJson" && k !== "packageInfo" && k !== "signal"
283
339
  )
284
340
  );
285
341
  }
@@ -297,6 +353,11 @@ var Config = class _Config {
297
353
  }
298
354
  // memoized options() getter value
299
355
  #options;
356
+ #abort = new AbortController();
357
+ /** Abort requests still in flight */
358
+ abort() {
359
+ this.#abort.abort();
360
+ }
300
361
  /**
301
362
  * positional arguments to the vlt process
302
363
  */
@@ -355,8 +416,9 @@ var Config = class _Config {
355
416
  if (cmdSpecific) this.jack.setConfigValues(cmdPairs);
356
417
  this.jack.applyDefaults(p);
357
418
  if (p.values["store-linker"] === "auto" && process.platform !== "linux") {
358
- p.values["store-linker"] = "unpack";
359
- envValues["store-linker"] = "unpack";
419
+ const linker = cloneAvailable() ? "clone" : "unpack";
420
+ p.values["store-linker"] = linker;
421
+ envValues["store-linker"] = linker;
360
422
  }
361
423
  const values = p.values;
362
424
  const explicit = {};
@@ -382,6 +444,9 @@ var Config = class _Config {
382
444
  const base = (k in cmdPairs ? cmdPairs[k] : fileValues[k]) ?? [];
383
445
  values[k] = dedupePairs([...base, ...pairs]);
384
446
  }
447
+ if (cmdOrFallback !== "config") {
448
+ assertSpecAliases(pairsToRecords(p.values));
449
+ }
385
450
  this.jack.writeEnv(p);
386
451
  process.env[kParentEnv] = JSON.stringify({
387
452
  explicit,
@@ -585,11 +650,11 @@ var Config = class _Config {
585
650
  * Deletes the specified config fields from the named file
586
651
  * Returns `true` if anything was changed.
587
652
  */
588
- async deleteConfigKeys(which, fields) {
653
+ async deleteConfigKeys(which, fields2) {
589
654
  const data = await this.#maybeLoadConfigFile(which);
590
655
  if (!data) return false;
591
656
  let didSomething = false;
592
- for (const f of fields) {
657
+ for (const f of fields2) {
593
658
  const [key, ...sk] = f.split(".");
594
659
  const subs = sk.join(".");
595
660
  const k = key;