@vltpkg/cli-js 1.0.8 → 1.0.9

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/{access-FOYRQGJC.js → access-5DJJIIGD.js} +3 -3
  2. package/{bugs-ORVU4I5O.js → bugs-NRHU4ENC.js} +9 -9
  3. package/{build-JLVAGEEU.js → build-5VZJTEBD.js} +6 -6
  4. package/{cache-RIOSSQD3.js → cache-QZ5XII4U.js} +4 -4
  5. package/{chunk-OB73T23B.js → chunk-2HDWM6AD.js} +1 -1
  6. package/{chunk-NC3QYZPW.js → chunk-6NQBG3ZR.js} +3 -3
  7. package/{chunk-5QAFAGO5.js → chunk-6WMR7BLF.js} +6 -6
  8. package/{chunk-UYIA44HE.js → chunk-A6TBJ4AB.js} +4 -4
  9. package/{chunk-AGHW2E24.js → chunk-ATYE2HQV.js} +68 -11
  10. package/{chunk-BJBFEQRR.js → chunk-BHJT53TP.js} +1 -0
  11. package/{chunk-WY4PAM6D.js → chunk-EBXBZ2Y5.js} +2 -2
  12. package/{chunk-ZXIF4PVX.js → chunk-GKCU7R4B.js} +4 -4
  13. package/{chunk-YCVPEZRM.js → chunk-HRY5MJCA.js} +29 -7
  14. package/{chunk-ADLHAQRA.js → chunk-KCXN2GTX.js} +1 -1
  15. package/{chunk-7D7SNVBV.js → chunk-LHMEJF6J.js} +8 -8
  16. package/{chunk-3L2ERW54.js → chunk-SBEZ7RUC.js} +2 -2
  17. package/{chunk-5CNTLC2U.js → chunk-USRMYD4F.js} +1 -1
  18. package/chunk-XEPCV7DP.js +75 -0
  19. package/{chunk-MUG5K6X2.js → chunk-XFI4THXZ.js} +1 -1
  20. package/{ci-2666LKEC.js → ci-MBYD4AGJ.js} +5 -5
  21. package/cli-package.json +1 -1
  22. package/{config-WMYY5J37.js → config-DTZ7EWQF.js} +6 -5
  23. package/{config-3N7PBEXH.js → config-RQKPUW5B.js} +5 -4
  24. package/{create-AEQSO6KX.js → create-CYTNZ66Z.js} +10 -10
  25. package/{deprecate-MW76DAZ5.js → deprecate-H3L4MPZS.js} +6 -6
  26. package/{dist-tag-XGQLYA6C.js → dist-tag-CZHTW7C6.js} +3 -3
  27. package/{docs-7CCTL3OY.js → docs-Z76UCNLH.js} +9 -9
  28. package/{exec-GWCIDNOH.js → exec-PGPFYCAM.js} +10 -10
  29. package/{exec-cache-AML2HUTJ.js → exec-cache-HPILZWUY.js} +8 -8
  30. package/{exec-local-JRTO2XG4.js → exec-local-VKDC6XAQ.js} +8 -8
  31. package/{help-4KSCV7GN.js → help-QPZESL4Y.js} +1 -1
  32. package/{init-OHVBHXB7.js → init-MMQV6UC5.js} +6 -6
  33. package/{install-TFDEHY5J.js → install-KZPDV66V.js} +6 -6
  34. package/{list-UD4SDHVE.js → list-PJ2U4FE7.js} +10 -10
  35. package/{login-B6TIQW62.js → login-L3D5FQGT.js} +6 -6
  36. package/{logout-H3CXGLDN.js → logout-SRZ574SQ.js} +3 -3
  37. package/{pack-YYK4LKBQ.js → pack-OI5JLA3R.js} +7 -7
  38. package/package.json +1 -1
  39. package/{ping-G765RWLM.js → ping-VQ662NAP.js} +3 -3
  40. package/{pkg-D4S3SPUH.js → pkg-HNPRMTWV.js} +7 -7
  41. package/{profile-YDQGMWYP.js → profile-Z7IOODZ4.js} +3 -3
  42. package/{publish-ANHSZPIM.js → publish-KTUUX25U.js} +10 -10
  43. package/{query-PZ6C6AZJ.js → query-MV5HKRIT.js} +10 -10
  44. package/registry-BMWXMQS4.js +1 -1
  45. package/registry-client-package.json +1 -1
  46. package/registry-client-src-revalidate.js +64 -7
  47. package/{repo-ZA3TMERE.js → repo-ZBCD65WE.js} +9 -9
  48. package/{run-N4NK35UT.js → run-QJK5LA6Q.js} +8 -8
  49. package/{run-exec-N5FT4QO7.js → run-exec-EAASMT5O.js} +8 -8
  50. package/{setup-MWWDSKQZ.js → setup-Q7NTAV26.js} +32 -14
  51. package/{src-6PISL6QX.js → src-MEEFRFWA.js} +3 -3
  52. package/{src-U4EBFPPT.js → src-MOKZQTH2.js} +163 -205
  53. package/{src-6UF5YTTL.js → src-YVODDQYK.js} +6 -6
  54. package/{token-FFUAFL43.js → token-NQRHTTKG.js} +3 -3
  55. package/{uninstall-A4PUG6RI.js → uninstall-E2SVGYI3.js} +6 -6
  56. package/{unpublish-OJEGZDGQ.js → unpublish-IE4KYVM4.js} +4 -4
  57. package/{update-ENR6ICMR.js → update-KZOWARII.js} +5 -5
  58. package/{version-K3BUGG7X.js → version-T6PTPZPR.js} +7 -7
  59. package/{view-SWVQLQCB.js → view-MVYV7YZ2.js} +5 -4
  60. package/vlr.js +1 -1
  61. package/vlrx.js +1 -1
  62. package/vlt.js +1 -1
  63. package/vlx.js +1 -1
  64. package/vlxl.js +1 -1
  65. package/{whoami-MA733O2T.js → whoami-A5RM2Z7Z.js} +3 -3
  66. package/chunk-AQ3XJJUP.js +0 -75
  67. package/{chunk-FG633ZKS.js → chunk-2YJ5MESP.js} +3 -3
  68. package/{chunk-JXVDCQZF.js → chunk-MXCWH7WC.js} +3 -3
  69. package/{chunk-OWML62W5.js → chunk-USTJECVS.js} +3 -3
@@ -19,15 +19,15 @@ import "./chunk-XKVU23NC.js";
19
19
  import "./chunk-XISRK3R5.js";
20
20
  import {
21
21
  RegistryClient
22
- } from "./chunk-AGHW2E24.js";
22
+ } from "./chunk-ATYE2HQV.js";
23
23
  import "./chunk-HAYXR3MW.js";
24
24
  import "./chunk-E74WGW5C.js";
25
25
  import "./chunk-LPIBYUMT.js";
26
26
  import "./chunk-UBLFPJHV.js";
27
+ import "./chunk-VFBCWAOC.js";
27
28
  import "./chunk-XNLSTHDK.js";
28
- import "./chunk-BJBFEQRR.js";
29
+ import "./chunk-BHJT53TP.js";
29
30
  import "./chunk-VE6CCH33.js";
30
- import "./chunk-VFBCWAOC.js";
31
31
  import {
32
32
  error
33
33
  } from "./chunk-WZWDS3W4.js";
@@ -14,15 +14,15 @@ import {
14
14
  } from "./chunk-CLVRCGOZ.js";
15
15
  import {
16
16
  openUrl
17
- } from "./chunk-OB73T23B.js";
17
+ } from "./chunk-2HDWM6AD.js";
18
18
  import {
19
19
  createHostContextsMap
20
- } from "./chunk-NC3QYZPW.js";
20
+ } from "./chunk-6NQBG3ZR.js";
21
21
  import {
22
22
  PackageInfoClient
23
- } from "./chunk-YCVPEZRM.js";
23
+ } from "./chunk-HRY5MJCA.js";
24
24
  import "./chunk-ZWKI5OSF.js";
25
- import "./chunk-JXVDCQZF.js";
25
+ import "./chunk-MXCWH7WC.js";
26
26
  import "./chunk-YAIKXFLN.js";
27
27
  import "./chunk-G2YT2GWF.js";
28
28
  import "./chunk-GDJ7JT2R.js";
@@ -31,11 +31,11 @@ import "./chunk-WGDTG44V.js";
31
31
  import {
32
32
  Query,
33
33
  actual
34
- } from "./chunk-7D7SNVBV.js";
34
+ } from "./chunk-LHMEJF6J.js";
35
35
  import {
36
36
  SecurityArchive
37
- } from "./chunk-FG633ZKS.js";
38
- import "./chunk-OWML62W5.js";
37
+ } from "./chunk-2YJ5MESP.js";
38
+ import "./chunk-USTJECVS.js";
39
39
  import "./chunk-YOE3VZFX.js";
40
40
  import {
41
41
  commandUsage
@@ -50,10 +50,10 @@ import "./chunk-HAYXR3MW.js";
50
50
  import "./chunk-E74WGW5C.js";
51
51
  import "./chunk-LPIBYUMT.js";
52
52
  import "./chunk-UBLFPJHV.js";
53
+ import "./chunk-VFBCWAOC.js";
53
54
  import "./chunk-XNLSTHDK.js";
54
- import "./chunk-BJBFEQRR.js";
55
+ import "./chunk-BHJT53TP.js";
55
56
  import "./chunk-VE6CCH33.js";
56
- import "./chunk-VFBCWAOC.js";
57
57
  import {
58
58
  error
59
59
  } from "./chunk-WZWDS3W4.js";
@@ -11,9 +11,9 @@ 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-7D7SNVBV.js";
15
- import "./chunk-FG633ZKS.js";
16
- import "./chunk-OWML62W5.js";
14
+ } from "./chunk-LHMEJF6J.js";
15
+ import "./chunk-2YJ5MESP.js";
16
+ import "./chunk-USTJECVS.js";
17
17
  import "./chunk-YOE3VZFX.js";
18
18
  import {
19
19
  commandUsage
@@ -24,12 +24,12 @@ import "./chunk-HTOTG4TS.js";
24
24
  import "./chunk-E74WGW5C.js";
25
25
  import "./chunk-LPIBYUMT.js";
26
26
  import "./chunk-UBLFPJHV.js";
27
- import "./chunk-XNLSTHDK.js";
28
- import "./chunk-BJBFEQRR.js";
29
- import "./chunk-VE6CCH33.js";
30
27
  import {
31
28
  isErrorWithCause
32
29
  } from "./chunk-VFBCWAOC.js";
30
+ import "./chunk-XNLSTHDK.js";
31
+ import "./chunk-BHJT53TP.js";
32
+ import "./chunk-VE6CCH33.js";
33
33
  import {
34
34
  error
35
35
  } from "./chunk-WZWDS3W4.js";
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  stderr,
17
17
  stdout
18
- } from "./chunk-JXVDCQZF.js";
18
+ } from "./chunk-MXCWH7WC.js";
19
19
  import "./chunk-YAIKXFLN.js";
20
20
  import "./chunk-G2YT2GWF.js";
21
21
  import "./chunk-GDJ7JT2R.js";
@@ -34,15 +34,15 @@ import {
34
34
  } from "./chunk-4KCU2KZL.js";
35
35
  import {
36
36
  CacheEntry
37
- } from "./chunk-AGHW2E24.js";
37
+ } from "./chunk-ATYE2HQV.js";
38
38
  import "./chunk-HAYXR3MW.js";
39
39
  import "./chunk-E74WGW5C.js";
40
40
  import "./chunk-LPIBYUMT.js";
41
41
  import "./chunk-UBLFPJHV.js";
42
+ import "./chunk-VFBCWAOC.js";
42
43
  import "./chunk-XNLSTHDK.js";
43
- import "./chunk-BJBFEQRR.js";
44
+ import "./chunk-BHJT53TP.js";
44
45
  import "./chunk-VE6CCH33.js";
45
- import "./chunk-VFBCWAOC.js";
46
46
  import {
47
47
  error
48
48
  } from "./chunk-WZWDS3W4.js";
@@ -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
  stderr
14
- } from "./chunk-JXVDCQZF.js";
14
+ } from "./chunk-MXCWH7WC.js";
15
15
  import {
16
16
  urlOpen
17
17
  } from "./chunk-HAYXR3MW.js";
@@ -13,10 +13,10 @@ import {
13
13
  actual,
14
14
  callLimit,
15
15
  createVirtualRoot
16
- } from "./chunk-7D7SNVBV.js";
16
+ } from "./chunk-LHMEJF6J.js";
17
17
  import {
18
18
  SecurityArchive
19
- } from "./chunk-FG633ZKS.js";
19
+ } from "./chunk-2YJ5MESP.js";
20
20
  import {
21
21
  error
22
22
  } from "./chunk-WZWDS3W4.js";
@@ -115,7 +115,7 @@ var reloadConfig = async (folder) => {
115
115
  unload("project");
116
116
  } catch {
117
117
  }
118
- const { Config } = await import("./config-3N7PBEXH.js");
118
+ const { Config } = await import("./config-RQKPUW5B.js");
119
119
  return Config.load(folder, process.argv, true);
120
120
  };
121
121
 
@@ -11,26 +11,26 @@ 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-YCVPEZRM.js";
14
+ } from "./chunk-HRY5MJCA.js";
15
15
  import {
16
16
  findCmdShimIfExists,
17
17
  install
18
- } from "./chunk-7D7SNVBV.js";
18
+ } from "./chunk-LHMEJF6J.js";
19
19
  import {
20
20
  PathScurry
21
- } from "./chunk-OWML62W5.js";
21
+ } from "./chunk-USTJECVS.js";
22
22
  import {
23
23
  Spec
24
24
  } from "./chunk-XKVU23NC.js";
25
25
  import {
26
26
  walkUp
27
27
  } from "./chunk-HTOTG4TS.js";
28
- import {
29
- XDG
30
- } from "./chunk-XNLSTHDK.js";
31
28
  import {
32
29
  parseScope
33
30
  } from "./chunk-VFBCWAOC.js";
31
+ import {
32
+ XDG
33
+ } from "./chunk-XNLSTHDK.js";
34
34
  import {
35
35
  error
36
36
  } from "./chunk-WZWDS3W4.js";
@@ -14,12 +14,12 @@ import {
14
14
  } from "./chunk-RIYFGX27.js";
15
15
  import {
16
16
  createHostContextsMap
17
- } from "./chunk-NC3QYZPW.js";
17
+ } from "./chunk-6NQBG3ZR.js";
18
18
  import {
19
19
  stderr,
20
20
  stdout,
21
21
  styleTextStdout
22
- } from "./chunk-JXVDCQZF.js";
22
+ } from "./chunk-MXCWH7WC.js";
23
23
  import {
24
24
  require_emoji_regex
25
25
  } from "./chunk-VTEFO2FT.js";
@@ -27,10 +27,10 @@ import {
27
27
  Query,
28
28
  actual,
29
29
  isRunResult
30
- } from "./chunk-7D7SNVBV.js";
30
+ } from "./chunk-LHMEJF6J.js";
31
31
  import {
32
32
  Monorepo
33
- } from "./chunk-OWML62W5.js";
33
+ } from "./chunk-USTJECVS.js";
34
34
  import {
35
35
  isErrorWithCause
36
36
  } from "./chunk-VFBCWAOC.js";
@@ -21,15 +21,15 @@ import {
21
21
  import {
22
22
  logRequest
23
23
  } from "./chunk-UBLFPJHV.js";
24
+ import {
25
+ asError
26
+ } from "./chunk-VFBCWAOC.js";
24
27
  import {
25
28
  XDG
26
29
  } from "./chunk-XNLSTHDK.js";
27
30
  import {
28
31
  rimraf
29
- } from "./chunk-BJBFEQRR.js";
30
- import {
31
- asError
32
- } from "./chunk-VFBCWAOC.js";
32
+ } from "./chunk-BHJT53TP.js";
33
33
  import {
34
34
  error
35
35
  } from "./chunk-WZWDS3W4.js";
@@ -12597,7 +12597,7 @@ var require_mock_utils = __commonJS({
12597
12597
  kTotalDispatchCount
12598
12598
  } = require_mock_symbols();
12599
12599
  var { serializePathWithQuery } = require_util();
12600
- var { STATUS_CODES } = __require("node:http");
12600
+ var { STATUS_CODES: STATUS_CODES2 } = __require("node:http");
12601
12601
  var {
12602
12602
  types: {
12603
12603
  isPromise
@@ -12805,7 +12805,7 @@ var require_mock_utils = __commonJS({
12805
12805
  return result;
12806
12806
  }
12807
12807
  function getStatusText(statusCode) {
12808
- return STATUS_CODES[statusCode] || "unknown";
12808
+ return STATUS_CODES2[statusCode] || "unknown";
12809
12809
  }
12810
12810
  async function getResponse(body) {
12811
12811
  const buffers = [];
@@ -20411,7 +20411,7 @@ var require_fetch = __commonJS({
20411
20411
  var { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url();
20412
20412
  var { getGlobalDispatcher } = require_global2();
20413
20413
  var { webidl } = require_webidl();
20414
- var { STATUS_CODES } = __require("node:http");
20414
+ var { STATUS_CODES: STATUS_CODES2 } = __require("node:http");
20415
20415
  var { bytesMatch } = require_subresource_integrity();
20416
20416
  var { createDeferredPromise } = require_promise();
20417
20417
  var { isomorphicEncode } = require_infra();
@@ -21448,7 +21448,7 @@ var require_fetch = __commonJS({
21448
21448
  }
21449
21449
  resolve5({
21450
21450
  status,
21451
- statusText: STATUS_CODES[status],
21451
+ statusText: STATUS_CODES2[status],
21452
21452
  headersList,
21453
21453
  socket
21454
21454
  });
@@ -21472,7 +21472,7 @@ var require_fetch = __commonJS({
21472
21472
  }
21473
21473
  resolve5({
21474
21474
  status,
21475
- statusText: STATUS_CODES[status],
21475
+ statusText: STATUS_CODES2[status],
21476
21476
  headersList,
21477
21477
  socket
21478
21478
  });
@@ -26130,6 +26130,8 @@ var handleBeforeExit = () => {
26130
26130
 
26131
26131
  // ../../src/registry-client/src/index.ts
26132
26132
  import { randomUUID } from "node:crypto";
26133
+ import { readFileSync as readFileSync2 } from "node:fs";
26134
+ import { STATUS_CODES } from "node:http";
26133
26135
  import { availableParallelism } from "node:os";
26134
26136
  import { dirname as dirname3, resolve as resolve4 } from "node:path";
26135
26137
  import { setTimeout as setTimeout2 } from "node:timers/promises";
@@ -27513,9 +27515,18 @@ var RegistryClient = class {
27513
27515
  return;
27514
27516
  }
27515
27517
  }
27516
- throw error("Failed to perform web login", { response });
27518
+ const { statusCode } = response;
27519
+ const status = STATUS_CODES[statusCode];
27520
+ throw error(
27521
+ `Failed to perform web login: ${statusCode}${status ? ` ${status}` : ""}`,
27522
+ {
27523
+ code: "EREQUEST",
27524
+ url: webLoginURL,
27525
+ status: statusCode,
27526
+ response
27527
+ }
27528
+ );
27517
27529
  }
27518
- /* c8 ignore stop */
27519
27530
  /**
27520
27531
  * Given a {@link WebAuthChallenge}, open the `authUrl` in a browser and
27521
27532
  * hang on the `doneUrl` until it returns a {@link TokenResponse} object.
@@ -27576,6 +27587,52 @@ var RegistryClient = class {
27576
27587
  response
27577
27588
  });
27578
27589
  }
27590
+ /**
27591
+ * Read a valid cached non-JSON body straight off disk, bypassing the
27592
+ * in-memory cache LRU so that a tarball is never held in it.
27593
+ *
27594
+ * One read: the head is decoded from the same bytes the body comes
27595
+ * from, so `cache-unzip` rewriting the head cannot land between the
27596
+ * two and hand back a body at a stale offset.
27597
+ *
27598
+ * Does not log a cache hit -- the caller may still reject the body
27599
+ * and fall back to {@link request}, which logs its own.
27600
+ *
27601
+ * Returns undefined on anything unexpected; callers fall back to
27602
+ * {@link request}.
27603
+ */
27604
+ cachedBody(url, options = {}) {
27605
+ const { integrity, method = "GET" } = options;
27606
+ try {
27607
+ const key = cacheKey(
27608
+ method,
27609
+ typeof url === "string" ? new URL(url) : url
27610
+ );
27611
+ if (this.cache.peek(key)) return void 0;
27612
+ const paths = /* @__PURE__ */ new Set();
27613
+ try {
27614
+ const i = this.cache.integrityPath(integrity);
27615
+ if (i) paths.add(i);
27616
+ } catch {
27617
+ }
27618
+ paths.add(this.cache.path(key));
27619
+ for (const path of paths) {
27620
+ let buf;
27621
+ try {
27622
+ buf = readFileSync2(path);
27623
+ } catch {
27624
+ continue;
27625
+ }
27626
+ const entry = CacheEntry.decode(buf);
27627
+ if (entry.statusCode !== 200 || !entry.valid || entry.isJSON) {
27628
+ continue;
27629
+ }
27630
+ return { path, body: entry.buffer() };
27631
+ }
27632
+ } catch {
27633
+ }
27634
+ return void 0;
27635
+ }
27579
27636
  async request(url, options = {}) {
27580
27637
  const u = typeof url === "string" ? new URL(url) : url;
27581
27638
  const {
@@ -663,5 +663,6 @@ var rimraf = Object.assign(rimraf_, {
663
663
  rimraf.rimraf = rimraf;
664
664
 
665
665
  export {
666
+ rimrafSync,
666
667
  rimraf
667
668
  };
@@ -11,12 +11,12 @@ 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-YCVPEZRM.js";
14
+ } from "./chunk-HRY5MJCA.js";
15
15
  import {
16
16
  Monorepo,
17
17
  PackageJson,
18
18
  PathScurry
19
- } from "./chunk-OWML62W5.js";
19
+ } from "./chunk-USTJECVS.js";
20
20
  import {
21
21
  resetCaches
22
22
  } from "./chunk-YOE3VZFX.js";
@@ -11,19 +11,19 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  openUrl
14
- } from "./chunk-OB73T23B.js";
14
+ } from "./chunk-2HDWM6AD.js";
15
15
  import {
16
16
  stderr
17
- } from "./chunk-JXVDCQZF.js";
17
+ } from "./chunk-MXCWH7WC.js";
18
18
  import {
19
19
  mermaidOutput
20
- } from "./chunk-7D7SNVBV.js";
20
+ } from "./chunk-LHMEJF6J.js";
21
21
  import {
22
22
  ViewClass
23
23
  } from "./chunk-4KCU2KZL.js";
24
24
  import {
25
25
  getTokenByURL
26
- } from "./chunk-AGHW2E24.js";
26
+ } from "./chunk-ATYE2HQV.js";
27
27
 
28
28
  // ../../src/cli-sdk/src/query-auth.ts
29
29
  var createGetAuthHeader = (conf) => async (url) => getTokenByURL(url, conf.options.identity);
@@ -20,16 +20,19 @@ import {
20
20
  pickManifest,
21
21
  resolve,
22
22
  revs
23
- } from "./chunk-OWML62W5.js";
23
+ } from "./chunk-USTJECVS.js";
24
24
  import {
25
25
  Spec
26
26
  } from "./chunk-XKVU23NC.js";
27
27
  import {
28
- XDG
29
- } from "./chunk-XNLSTHDK.js";
28
+ logRequest
29
+ } from "./chunk-UBLFPJHV.js";
30
30
  import {
31
31
  asPackument
32
32
  } from "./chunk-VFBCWAOC.js";
33
+ import {
34
+ XDG
35
+ } from "./chunk-XNLSTHDK.js";
33
36
  import {
34
37
  error
35
38
  } from "./chunk-WZWDS3W4.js";
@@ -55,6 +58,7 @@ import {
55
58
  resolve as pathResolve,
56
59
  relative
57
60
  } from "node:path";
61
+ import { debuglog } from "node:util";
58
62
 
59
63
  // ../../src/package-info/src/rename.ts
60
64
  import { rename as fsRename, rm } from "node:fs/promises";
@@ -76,6 +80,7 @@ var rename = platform !== "win32" ? fsRename : (async function(oldPath, newPath)
76
80
  });
77
81
 
78
82
  // ../../src/package-info/src/index.ts
83
+ var debug = debuglog("vlt");
79
84
  var xdg = new XDG("vlt");
80
85
  var delimiter = "~";
81
86
  var manifestCacheMaxAge = 5 * 60 * 1e3;
@@ -111,7 +116,7 @@ var PackageInfoClient = class {
111
116
  #tarPoolPromise;
112
117
  async getRegistryClient() {
113
118
  if (this.#registryClient) return this.#registryClient;
114
- this.#registryClientPromise ??= import("./src-6PISL6QX.js").then(({ RegistryClient }) => {
119
+ this.#registryClientPromise ??= import("./src-MEEFRFWA.js").then(({ RegistryClient }) => {
115
120
  this.#registryClient = new RegistryClient(this.options);
116
121
  return this.#registryClient;
117
122
  });
@@ -119,7 +124,7 @@ var PackageInfoClient = class {
119
124
  }
120
125
  async getTarPool() {
121
126
  if (this.#tarPool) return this.#tarPool;
122
- this.#tarPoolPromise ??= import("./src-U4EBFPPT.js").then(
127
+ this.#tarPoolPromise ??= import("./src-MOKZQTH2.js").then(
123
128
  ({ Pool }) => {
124
129
  this.#tarPool = new Pool();
125
130
  return this.#tarPool;
@@ -192,6 +197,23 @@ var PackageInfoClient = class {
192
197
  }
193
198
  }
194
199
  case "registry": {
200
+ const cached = (await this.getRegistryClient()).cachedBody(
201
+ r.resolved,
202
+ { integrity: r.integrity }
203
+ );
204
+ if (cached) {
205
+ try {
206
+ await (await this.getTarPool()).unpack(cached.body, target);
207
+ logRequest(r.resolved, "cache");
208
+ return r;
209
+ } catch (er) {
210
+ debug(
211
+ "cached tarball unpack failed: %s: %s",
212
+ cached.path,
213
+ er
214
+ );
215
+ }
216
+ }
195
217
  const fetchTarball = async (useCache) => {
196
218
  const trustIntegrity = this.#trustedIntegrities.get(r.resolved) === r.integrity;
197
219
  const response = await (await this.getRegistryClient()).request(r.resolved, {
@@ -300,7 +322,7 @@ var PackageInfoClient = class {
300
322
  const st = await stat(path);
301
323
  if (st.isFile()) {
302
324
  try {
303
- await (await this.getTarPool()).unpack(await this.tarball(spec, options), target);
325
+ await (await this.getTarPool()).unpackFile(path, target);
304
326
  } catch (er) {
305
327
  throw this.#resolveError(
306
328
  spec,
@@ -653,7 +675,7 @@ var PackageInfoClient = class {
653
675
  const s = spec;
654
676
  return await this.#tmpdir(async (dir) => {
655
677
  try {
656
- await (await this.getTarPool()).unpack(await readFile(path), dir);
678
+ await (await this.getTarPool()).unpackFile(path, dir);
657
679
  } catch (er) {
658
680
  throw this.#resolveError(
659
681
  s,
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  addKey,
14
14
  asDependency
15
- } from "./chunk-7D7SNVBV.js";
15
+ } from "./chunk-LHMEJF6J.js";
16
16
  import {
17
17
  joinDepIDTuple,
18
18
  splitDepID
@@ -13,14 +13,14 @@ import {
13
13
  AbortError,
14
14
  SecurityArchive,
15
15
  pRetry
16
- } from "./chunk-FG633ZKS.js";
16
+ } from "./chunk-2YJ5MESP.js";
17
17
  import {
18
18
  Monorepo,
19
19
  PackageJson,
20
20
  getUser,
21
21
  minimatch,
22
22
  platformCheck
23
- } from "./chunk-OWML62W5.js";
23
+ } from "./chunk-USTJECVS.js";
24
24
  import {
25
25
  asDepID,
26
26
  baseDepID,
@@ -49,12 +49,6 @@ import {
49
49
  import {
50
50
  graphStep
51
51
  } from "./chunk-UBLFPJHV.js";
52
- import {
53
- XDG
54
- } from "./chunk-XNLSTHDK.js";
55
- import {
56
- rimraf
57
- } from "./chunk-BJBFEQRR.js";
58
52
  import {
59
53
  Spec,
60
54
  Version,
@@ -95,6 +89,12 @@ import {
95
89
  shortDependencyTypes,
96
90
  subset
97
91
  } from "./chunk-VFBCWAOC.js";
92
+ import {
93
+ XDG
94
+ } from "./chunk-XNLSTHDK.js";
95
+ import {
96
+ rimraf
97
+ } from "./chunk-BHJT53TP.js";
98
98
  import {
99
99
  error,
100
100
  typeError
@@ -12,12 +12,12 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  init,
14
14
  install
15
- } from "./chunk-7D7SNVBV.js";
15
+ } from "./chunk-LHMEJF6J.js";
16
16
  import {
17
17
  asWSConfig,
18
18
  assertWSConfig,
19
19
  minimatch
20
- } from "./chunk-OWML62W5.js";
20
+ } from "./chunk-USTJECVS.js";
21
21
  import {
22
22
  commandUsage
23
23
  } from "./chunk-PTR5IGFQ.js";
@@ -19,7 +19,7 @@ var run = async (command) => {
19
19
  if (command) {
20
20
  process.argv.splice(2, 0, command);
21
21
  }
22
- const vlt = await import("./src-6UF5YTTL.js");
22
+ const vlt = await import("./src-YVODDQYK.js");
23
23
  await vlt.default();
24
24
  };
25
25
 
@@ -0,0 +1,75 @@
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-5DJJIIGD.js"),
22
+ "./commands/bugs.ts": () => import("./bugs-NRHU4ENC.js"),
23
+ "./commands/build.ts": () => import("./build-5VZJTEBD.js"),
24
+ "./commands/cache.ts": () => import("./cache-QZ5XII4U.js"),
25
+ "./commands/ci.ts": () => import("./ci-MBYD4AGJ.js"),
26
+ "./commands/config.ts": () => import("./config-DTZ7EWQF.js"),
27
+ "./commands/create.ts": () => import("./create-CYTNZ66Z.js"),
28
+ "./commands/deprecate.ts": () => import("./deprecate-H3L4MPZS.js"),
29
+ "./commands/dist-tag.ts": () => import("./dist-tag-CZHTW7C6.js"),
30
+ "./commands/docs.ts": () => import("./docs-Z76UCNLH.js"),
31
+ "./commands/exec-cache.ts": () => import("./exec-cache-HPILZWUY.js"),
32
+ "./commands/exec-local.ts": () => import("./exec-local-VKDC6XAQ.js"),
33
+ "./commands/exec.ts": () => import("./exec-PGPFYCAM.js"),
34
+ "./commands/help.ts": () => import("./help-QPZESL4Y.js"),
35
+ "./commands/init.ts": () => import("./init-MMQV6UC5.js"),
36
+ "./commands/install.ts": () => import("./install-KZPDV66V.js"),
37
+ "./commands/install/reporter.ts": () => import("./reporter-SDMDYYMJ.js"),
38
+ "./commands/list.ts": () => import("./list-PJ2U4FE7.js"),
39
+ "./commands/login.ts": () => import("./login-L3D5FQGT.js"),
40
+ "./commands/logout.ts": () => import("./logout-SRZ574SQ.js"),
41
+ "./commands/pack.ts": () => import("./pack-OI5JLA3R.js"),
42
+ "./commands/ping.ts": () => import("./ping-VQ662NAP.js"),
43
+ "./commands/pkg.ts": () => import("./pkg-HNPRMTWV.js"),
44
+ "./commands/profile.ts": () => import("./profile-Z7IOODZ4.js"),
45
+ "./commands/publish.ts": () => import("./publish-KTUUX25U.js"),
46
+ "./commands/query.ts": () => import("./query-MV5HKRIT.js"),
47
+ "./commands/registry.ts": () => import("./registry-BMWXMQS4.js"),
48
+ "./commands/repo.ts": () => import("./repo-ZBCD65WE.js"),
49
+ "./commands/run-exec.ts": () => import("./run-exec-EAASMT5O.js"),
50
+ "./commands/run.ts": () => import("./run-QJK5LA6Q.js"),
51
+ "./commands/setup.ts": () => import("./setup-Q7NTAV26.js"),
52
+ "./commands/token.ts": () => import("./token-NQRHTTKG.js"),
53
+ "./commands/uninstall.ts": () => import("./uninstall-E2SVGYI3.js"),
54
+ "./commands/unpublish.ts": () => import("./unpublish-IE4KYVM4.js"),
55
+ "./commands/update.ts": () => import("./update-KZOWARII.js"),
56
+ "./commands/version.ts": () => import("./version-T6PTPZPR.js"),
57
+ "./commands/view.ts": () => import("./view-MVYV7YZ2.js"),
58
+ "./commands/whoami.ts": () => import("./whoami-A5RM2Z7Z.js")
59
+ });
60
+
61
+ // ../../src/cli-sdk/src/load-command.ts
62
+ var loadCommand = async (command) => {
63
+ try {
64
+ return await globImport_commands_ts(`./commands/${command}.ts`);
65
+ } catch (e) {
66
+ throw error("Could not load command", {
67
+ found: command,
68
+ cause: e
69
+ });
70
+ }
71
+ };
72
+
73
+ export {
74
+ loadCommand
75
+ };
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-ZWKI5OSF.js";
17
17
  import {
18
18
  minimatch
19
- } from "./chunk-OWML62W5.js";
19
+ } from "./chunk-USTJECVS.js";
20
20
  import {
21
21
  Spec
22
22
  } from "./chunk-XKVU23NC.js";