@vltpkg/cli-js 1.3.2 → 1.3.3

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 (65) hide show
  1. package/{access-M5BOAKLX.js → access-KMBBQIIT.js} +2 -2
  2. package/{bugs-QZ5NURDC.js → bugs-CABZX76X.js} +5 -5
  3. package/{build-CEAMZG7H.js → build-WNHKYA4E.js} +3 -3
  4. package/{cache-ILCET6EY.js → cache-KKT4GIYD.js} +2 -2
  5. package/{chunk-NAVFU65Z.js → chunk-3IDIPSH7.js} +1 -1
  6. package/chunk-7JK53T6G.js +75 -0
  7. package/{chunk-4WQ76RJD.js → chunk-DCFLXO2M.js} +1 -1
  8. package/{chunk-4QYSZZZQ.js → chunk-GA4LA6B2.js} +2 -2
  9. package/{chunk-4FHGRT4J.js → chunk-GZWJAGBL.js} +1 -1
  10. package/{chunk-E53Z7AF6.js → chunk-HCMAX6Q5.js} +1 -1
  11. package/{chunk-EJFGJ543.js → chunk-LY5FNWRY.js} +3 -3
  12. package/{chunk-ZMRJRQDK.js → chunk-MOL2DUEQ.js} +14 -11
  13. package/{chunk-USLE2NXK.js → chunk-QBXGMTDE.js} +1 -1
  14. package/{chunk-HBB2ECAT.js → chunk-ROCFQPP2.js} +1 -1
  15. package/{chunk-O63K3ZP6.js → chunk-SH24EMXO.js} +24 -11
  16. package/{chunk-2UW4UIVL.js → chunk-TJBBYDUN.js} +2 -2
  17. package/{chunk-3NWCWTIU.js → chunk-YU2W5UPG.js} +1 -1
  18. package/{chunk-QX6KMBTX.js → chunk-ZBJRZXSU.js} +2 -2
  19. package/{chunk-IIXKXSLE.js → chunk-ZRRNOLEG.js} +123 -81
  20. package/{ci-4AI6XHRE.js → ci-BGVGC5RF.js} +4 -4
  21. package/cli-package.json +1 -1
  22. package/{config-PJVA5HZQ.js → config-AWX2VEKL.js} +2 -2
  23. package/{config-UHPA5FHX.js → config-FIKZ4VWG.js} +2 -2
  24. package/{create-NQNFYWOC.js → create-CHTG7KO3.js} +7 -7
  25. package/{deprecate-35D4AZFD.js → deprecate-W7KQ62HF.js} +3 -3
  26. package/{dist-tag-W3AJECYB.js → dist-tag-66CC6HT7.js} +2 -2
  27. package/{docs-OFRPTPOG.js → docs-HW4U5TGD.js} +5 -5
  28. package/{exec-UTWGYF3B.js → exec-BVVNAGFI.js} +7 -7
  29. package/{exec-cache-VLPJMK7E.js → exec-cache-L3ONPM5C.js} +5 -5
  30. package/{exec-local-JKBHBKJZ.js → exec-local-NR3RYQDQ.js} +5 -5
  31. package/{help-YRQQVODA.js → help-5YL6SUAN.js} +1 -1
  32. package/{init-2QZ5TITF.js → init-RI2WVCGL.js} +4 -4
  33. package/{install-QBVAEHTO.js → install-OWAI4EOW.js} +8 -8
  34. package/{list-P4UQWDX7.js → list-4ZFX7ANG.js} +6 -6
  35. package/{login-6KPWMFG4.js → login-6TL3EE6Q.js} +4 -4
  36. package/{logout-KCYMUY6H.js → logout-VQWHVHBE.js} +2 -2
  37. package/{pack-WQLFLOE2.js → pack-Q5IRRAMU.js} +4 -4
  38. package/package.json +1 -1
  39. package/{ping-GYFPW4F5.js → ping-2WV3V7GB.js} +2 -2
  40. package/{pkg-KVQ6QMQH.js → pkg-RXB6BRS5.js} +5 -5
  41. package/{profile-APD6X27T.js → profile-GNGWS5H2.js} +2 -2
  42. package/{publish-EYKECRD3.js → publish-PI74W4GH.js} +5 -5
  43. package/{query-3N5D2ZZW.js → query-NESDWXGE.js} +6 -6
  44. package/registry-client-src-revalidate.js +24 -11
  45. package/{repo-6B5W7Q2C.js → repo-PPBN3SKP.js} +5 -5
  46. package/{reporter-ZEDO2YIG.js → reporter-XBHCUW7W.js} +3 -3
  47. package/{run-INZMUBF2.js → run-7GTWIFMV.js} +5 -5
  48. package/{run-exec-RVYS73II.js → run-exec-VLSH5SOB.js} +5 -5
  49. package/security-archive-src-update-expired.js +1 -1
  50. package/{setup-Q7JD6XJV.js → setup-6O7RFGU2.js} +4 -4
  51. package/{src-527GIT4Y.js → src-6E7KCC7J.js} +3 -3
  52. package/{src-3UQFZRM3.js → src-U4MCZFJT.js} +2 -2
  53. package/{token-5HFD3COV.js → token-NZ4HODXE.js} +2 -2
  54. package/{uninstall-4R7Z2FD7.js → uninstall-KBZ6PJBG.js} +5 -5
  55. package/{unpublish-RBRQE53F.js → unpublish-JBWSIBRX.js} +2 -2
  56. package/{update-7LXJAEJN.js → update-X4EC6MPP.js} +7 -7
  57. package/{version-UHRS2KJX.js → version-QEHPAFAE.js} +4 -4
  58. package/{view-BNQKJF5L.js → view-WGGZTYAT.js} +3 -3
  59. package/vlr.js +1 -1
  60. package/vlrx.js +1 -1
  61. package/vlt.js +1 -1
  62. package/vlx.js +1 -1
  63. package/vlxl.js +1 -1
  64. package/{whoami-GYAT6NWM.js → whoami-RYNXOULV.js} +2 -2
  65. package/chunk-TGOC27YZ.js +0 -75
@@ -19,12 +19,12 @@ import "./chunk-64VFL4WI.js";
19
19
  import "./chunk-ENSGPOLR.js";
20
20
  import {
21
21
  RegistryClient
22
- } from "./chunk-O63K3ZP6.js";
22
+ } from "./chunk-SH24EMXO.js";
23
23
  import "./chunk-APMYKJI2.js";
24
24
  import {
25
25
  assertOk
26
26
  } from "./chunk-PBBULTAG.js";
27
- import "./chunk-3NWCWTIU.js";
27
+ import "./chunk-YU2W5UPG.js";
28
28
  import "./chunk-U7TEQCBN.js";
29
29
  import "./chunk-XNLSTHDK.js";
30
30
  import "./chunk-PDWPFR5T.js";
@@ -17,24 +17,24 @@ import {
17
17
  } from "./chunk-MC6CESRA.js";
18
18
  import {
19
19
  createHostContextsMap
20
- } from "./chunk-EJFGJ543.js";
20
+ } from "./chunk-LY5FNWRY.js";
21
21
  import "./chunk-CSZTT7QN.js";
22
22
  import "./chunk-CU752KW7.js";
23
23
  import "./chunk-G2YT2GWF.js";
24
24
  import "./chunk-CRGWLUGC.js";
25
25
  import {
26
26
  PackageInfoClient
27
- } from "./chunk-ZMRJRQDK.js";
27
+ } from "./chunk-MOL2DUEQ.js";
28
28
  import "./chunk-ZWKI5OSF.js";
29
29
  import "./chunk-WGDTG44V.js";
30
30
  import "./chunk-J4NHRZX6.js";
31
31
  import {
32
32
  Query,
33
33
  actual
34
- } from "./chunk-IIXKXSLE.js";
34
+ } from "./chunk-ZRRNOLEG.js";
35
35
  import {
36
36
  SecurityArchive
37
- } from "./chunk-4WQ76RJD.js";
37
+ } from "./chunk-DCFLXO2M.js";
38
38
  import {
39
39
  commandUsage
40
40
  } from "./chunk-I6QGYSB4.js";
@@ -48,7 +48,7 @@ import "./chunk-ENSGPOLR.js";
48
48
  import "./chunk-HTOTG4TS.js";
49
49
  import "./chunk-APMYKJI2.js";
50
50
  import "./chunk-PBBULTAG.js";
51
- import "./chunk-3NWCWTIU.js";
51
+ import "./chunk-YU2W5UPG.js";
52
52
  import "./chunk-U7TEQCBN.js";
53
53
  import "./chunk-XNLSTHDK.js";
54
54
  import "./chunk-PDWPFR5T.js";
@@ -11,8 +11,8 @@ 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-IIXKXSLE.js";
15
- import "./chunk-4WQ76RJD.js";
14
+ } from "./chunk-ZRRNOLEG.js";
15
+ import "./chunk-DCFLXO2M.js";
16
16
  import {
17
17
  commandUsage
18
18
  } from "./chunk-I6QGYSB4.js";
@@ -21,7 +21,7 @@ import "./chunk-JIQBZ2UT.js";
21
21
  import "./chunk-64VFL4WI.js";
22
22
  import "./chunk-ENSGPOLR.js";
23
23
  import "./chunk-HTOTG4TS.js";
24
- import "./chunk-3NWCWTIU.js";
24
+ import "./chunk-YU2W5UPG.js";
25
25
  import "./chunk-U7TEQCBN.js";
26
26
  import "./chunk-XNLSTHDK.js";
27
27
  import "./chunk-PDWPFR5T.js";
@@ -34,12 +34,12 @@ import {
34
34
  import "./chunk-ENSGPOLR.js";
35
35
  import {
36
36
  CacheEntry
37
- } from "./chunk-O63K3ZP6.js";
37
+ } from "./chunk-SH24EMXO.js";
38
38
  import "./chunk-APMYKJI2.js";
39
39
  import {
40
40
  assertOk
41
41
  } from "./chunk-PBBULTAG.js";
42
- import "./chunk-3NWCWTIU.js";
42
+ import "./chunk-YU2W5UPG.js";
43
43
  import "./chunk-U7TEQCBN.js";
44
44
  import "./chunk-XNLSTHDK.js";
45
45
  import {
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  addKey,
17
17
  asDependency
18
- } from "./chunk-IIXKXSLE.js";
18
+ } from "./chunk-ZRRNOLEG.js";
19
19
  import {
20
20
  joinDepIDTuple,
21
21
  splitDepID
@@ -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-KMBBQIIT.js"),
22
+ "./commands/bugs.ts": () => import("./bugs-CABZX76X.js"),
23
+ "./commands/build.ts": () => import("./build-WNHKYA4E.js"),
24
+ "./commands/cache.ts": () => import("./cache-KKT4GIYD.js"),
25
+ "./commands/ci.ts": () => import("./ci-BGVGC5RF.js"),
26
+ "./commands/config.ts": () => import("./config-FIKZ4VWG.js"),
27
+ "./commands/create.ts": () => import("./create-CHTG7KO3.js"),
28
+ "./commands/deprecate.ts": () => import("./deprecate-W7KQ62HF.js"),
29
+ "./commands/dist-tag.ts": () => import("./dist-tag-66CC6HT7.js"),
30
+ "./commands/docs.ts": () => import("./docs-HW4U5TGD.js"),
31
+ "./commands/exec-cache.ts": () => import("./exec-cache-L3ONPM5C.js"),
32
+ "./commands/exec-local.ts": () => import("./exec-local-NR3RYQDQ.js"),
33
+ "./commands/exec.ts": () => import("./exec-BVVNAGFI.js"),
34
+ "./commands/help.ts": () => import("./help-5YL6SUAN.js"),
35
+ "./commands/init.ts": () => import("./init-RI2WVCGL.js"),
36
+ "./commands/install.ts": () => import("./install-OWAI4EOW.js"),
37
+ "./commands/install/reporter.ts": () => import("./reporter-XBHCUW7W.js"),
38
+ "./commands/list.ts": () => import("./list-4ZFX7ANG.js"),
39
+ "./commands/login.ts": () => import("./login-6TL3EE6Q.js"),
40
+ "./commands/logout.ts": () => import("./logout-VQWHVHBE.js"),
41
+ "./commands/pack.ts": () => import("./pack-Q5IRRAMU.js"),
42
+ "./commands/ping.ts": () => import("./ping-2WV3V7GB.js"),
43
+ "./commands/pkg.ts": () => import("./pkg-RXB6BRS5.js"),
44
+ "./commands/profile.ts": () => import("./profile-GNGWS5H2.js"),
45
+ "./commands/publish.ts": () => import("./publish-PI74W4GH.js"),
46
+ "./commands/query.ts": () => import("./query-NESDWXGE.js"),
47
+ "./commands/registry.ts": () => import("./registry-MXAA4HVJ.js"),
48
+ "./commands/repo.ts": () => import("./repo-PPBN3SKP.js"),
49
+ "./commands/run-exec.ts": () => import("./run-exec-VLSH5SOB.js"),
50
+ "./commands/run.ts": () => import("./run-7GTWIFMV.js"),
51
+ "./commands/setup.ts": () => import("./setup-6O7RFGU2.js"),
52
+ "./commands/token.ts": () => import("./token-NZ4HODXE.js"),
53
+ "./commands/uninstall.ts": () => import("./uninstall-KBZ6PJBG.js"),
54
+ "./commands/unpublish.ts": () => import("./unpublish-JBWSIBRX.js"),
55
+ "./commands/update.ts": () => import("./update-X4EC6MPP.js"),
56
+ "./commands/version.ts": () => import("./version-QEHPAFAE.js"),
57
+ "./commands/view.ts": () => import("./view-WGGZTYAT.js"),
58
+ "./commands/whoami.ts": () => import("./whoami-RYNXOULV.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-JIQBZ2UT.js";
17
17
  import {
18
18
  userAgent
19
- } from "./chunk-3NWCWTIU.js";
19
+ } from "./chunk-YU2W5UPG.js";
20
20
  import {
21
21
  I
22
22
  } from "./chunk-U7TEQCBN.js";
@@ -17,13 +17,13 @@ import {
17
17
  } from "./chunk-CSZTT7QN.js";
18
18
  import {
19
19
  mermaidOutput
20
- } from "./chunk-IIXKXSLE.js";
20
+ } from "./chunk-ZRRNOLEG.js";
21
21
  import {
22
22
  ViewClass
23
23
  } from "./chunk-4KCU2KZL.js";
24
24
  import {
25
25
  getTokenByURL
26
- } from "./chunk-O63K3ZP6.js";
26
+ } from "./chunk-SH24EMXO.js";
27
27
 
28
28
  // ../../src/cli-sdk/src/query-auth.ts
29
29
  var createGetAuthHeader = (conf) => async (url) => getTokenByURL(url, conf.options.identity);
@@ -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
  PackageInfoClient
14
- } from "./chunk-ZMRJRQDK.js";
14
+ } from "./chunk-MOL2DUEQ.js";
15
15
  import {
16
16
  Monorepo,
17
17
  PackageJson,
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  init,
14
14
  install
15
- } from "./chunk-IIXKXSLE.js";
15
+ } from "./chunk-ZRRNOLEG.js";
16
16
  import {
17
17
  commandUsage
18
18
  } from "./chunk-I6QGYSB4.js";
@@ -13,10 +13,10 @@ import {
13
13
  actual,
14
14
  callLimit,
15
15
  createVirtualRoot
16
- } from "./chunk-IIXKXSLE.js";
16
+ } from "./chunk-ZRRNOLEG.js";
17
17
  import {
18
18
  SecurityArchive
19
- } from "./chunk-4WQ76RJD.js";
19
+ } from "./chunk-DCFLXO2M.js";
20
20
  import {
21
21
  error
22
22
  } from "./chunk-WZWDS3W4.js";
@@ -140,7 +140,7 @@ var reloadConfig = async (folder) => {
140
140
  unload("project");
141
141
  } catch {
142
142
  }
143
- const { Config } = await import("./config-PJVA5HZQ.js");
143
+ const { Config } = await import("./config-AWX2VEKL.js");
144
144
  return Config.load(folder, process.argv, true);
145
145
  };
146
146
 
@@ -153,6 +153,7 @@ var noRegistryError = (spec) => error(
153
153
  { code: "ECONFIG", spec }
154
154
  );
155
155
  var isMovingSelector = (f) => !!(f.distTag || f.range?.isAny);
156
+ var revalidateMode = (f, options) => !isMovingSelector(f) ? void 0 : options.backgroundRevalidate ? "background" : true;
156
157
  var isStableSelector = (f) => {
157
158
  const { range } = f;
158
159
  if (!range) return false;
@@ -191,8 +192,8 @@ var PackageInfoClient = class {
191
192
  // In-flight coalescing key is `${registry}${name}` — no representation
192
193
  // component. Safe only because every caller requests the same full
193
194
  // packument (see #fetchPackument). The one thing that does vary per
194
- // caller is forceRevalidate, so record it and let a moving selector
195
- // reuse a forced promise but never a non-forced one (see packument()).
195
+ // caller is forceRevalidate, so record how hard it revalidates and
196
+ // never let a request ride a weaker one (see #packument()).
196
197
  #packumentPromises = /* @__PURE__ */ new Map();
197
198
  // unique temp file names for atomic manifest cache writes
198
199
  #manifestWriteRandom = randomBytes(6).toString("hex");
@@ -207,7 +208,7 @@ var PackageInfoClient = class {
207
208
  #tarPoolPromise;
208
209
  async getRegistryClient() {
209
210
  if (this.#registryClient) return this.#registryClient;
210
- this.#registryClientPromise ??= import("./src-3UQFZRM3.js").then(({ RegistryClient }) => {
211
+ this.#registryClientPromise ??= import("./src-U4MCZFJT.js").then(({ RegistryClient }) => {
211
212
  this.#registryClient = new RegistryClient(this.options);
212
213
  return this.#registryClient;
213
214
  });
@@ -948,19 +949,19 @@ var PackageInfoClient = class {
948
949
  );
949
950
  const fullKey = `${registry}${name}`;
950
951
  const packumentKey = stable ? `${fullKey}?stable` : fullKey;
951
- const forced = isMovingSelector(f);
952
+ const mode = revalidateMode(f, options);
953
+ const rank = mode === true ? 2 : mode ? 1 : 0;
952
954
  const inflight = this.#packumentPromises.get(packumentKey) ?? // the full packument is a superset of the stable one, so an
953
955
  // in-flight full request answers a stable ask too, and a package
954
956
  // wanted both ways is still fetched once
955
957
  (stable ? this.#packumentPromises.get(fullKey) : void 0);
956
- if (inflight && (!forced || inflight.forced))
957
- return inflight.promise;
958
+ if (inflight && inflight.rank >= rank) return inflight.promise;
958
959
  const pakuURL = new URL(
959
960
  stable ? `${name}?stable` : name,
960
961
  registry
961
962
  );
962
963
  const promise = this.#fetchPackument(spec, options, pakuURL);
963
- const record = { promise, forced };
964
+ const record = { promise, rank };
964
965
  this.#packumentPromises.set(packumentKey, record);
965
966
  const clear = () => {
966
967
  if (this.#packumentPromises.get(packumentKey) === record) {
@@ -973,15 +974,17 @@ var PackageInfoClient = class {
973
974
  }
974
975
  }
975
976
  async #fetchPackument(spec, options, pakuURL, useCache) {
977
+ const mode = revalidateMode(spec.final, options);
976
978
  const response = await (await this.getRegistryClient()).request(pakuURL, {
977
979
  headers: {
978
980
  accept: options.full ? "application/json" : PACKUMENT_ACCEPT
979
981
  },
980
982
  ...useCache === false || options.full ? { useCache: false } : {},
981
- // costs a conditional GET per moving selector on an otherwise warm
982
- // cache, install included. 304s are cheap but not free; the
983
- // alternative is serving a dist tag that moved (#1656).
984
- ...isMovingSelector(spec.final) ? { forceRevalidate: true } : {}
983
+ // a moving selector pays a conditional GET before use, so a moved
984
+ // dist tag is seen at once (#1656). with backgroundRevalidate a
985
+ // packument still within max-age is served and revalidated after
986
+ // exit instead.
987
+ ...mode === void 0 ? {} : { forceRevalidate: mode }
985
988
  });
986
989
  if (response.statusCode !== 200) {
987
990
  throw this.#resolveError(
@@ -24,7 +24,7 @@ var run = async (command) => {
24
24
  if (command) {
25
25
  process.argv.splice(2, 0, command);
26
26
  }
27
- const vlt = await import("./src-527GIT4Y.js");
27
+ const vlt = await import("./src-6E7KCC7J.js");
28
28
  await vlt.default();
29
29
  };
30
30
 
@@ -15,7 +15,7 @@ import {
15
15
  pairsToRecords,
16
16
  registrySelectionFields,
17
17
  registrySelectors
18
- } from "./chunk-4FHGRT4J.js";
18
+ } from "./chunk-GZWJAGBL.js";
19
19
  import {
20
20
  normalizeRegistryURL
21
21
  } from "./chunk-J4NHRZX6.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-PBBULTAG.js";
22
22
  import {
23
23
  userAgent
24
- } from "./chunk-3NWCWTIU.js";
24
+ } from "./chunk-YU2W5UPG.js";
25
25
  import {
26
26
  I,
27
27
  logRequest
@@ -26739,6 +26739,12 @@ var CacheEntry = class _CacheEntry {
26739
26739
  */
26740
26740
  setHeader(h, value) {
26741
26741
  this.#headers = setRawHeader(this.#headers, h, value);
26742
+ if (h.toLowerCase() === "date") {
26743
+ this.#date = void 0;
26744
+ this.#valid = void 0;
26745
+ this.#validUntil = void 0;
26746
+ this.#staleUntil = void 0;
26747
+ }
26742
26748
  }
26743
26749
  /**
26744
26750
  * Remove a header, if present
@@ -27898,7 +27904,15 @@ var RegistryClient = class {
27898
27904
  const key = cacheKey(method, u);
27899
27905
  const buffer = useCache ? await this.cache.fetch(key, { context: { integrity } }) : void 0;
27900
27906
  const entry = buffer ? this.#decodeCached(buffer) : void 0;
27901
- if (entry?.valid && !forceRevalidate) {
27907
+ if (entry?.valid && forceRevalidate !== true) {
27908
+ if (forceRevalidate === "background" && m) {
27909
+ register2(
27910
+ dirname3(this.cache.path()),
27911
+ m,
27912
+ url,
27913
+ getHeader(options.headers, "accept")
27914
+ );
27915
+ }
27902
27916
  logRequest(url, "cache", { method });
27903
27917
  return entry;
27904
27918
  }
@@ -27993,16 +28007,15 @@ var RegistryClient = class {
27993
28007
  const clobbersCachedEntry = forceRevalidate && !!entry && result.statusCode !== 200;
27994
28008
  if (useCache && !clobbersCachedEntry) {
27995
28009
  const integrity2 = result.integrity ?? (result.statusCode === 200 && !result.isJSON ? result.integrityActual : void 0);
27996
- const buffer2 = result.encode();
27997
- this.cache.set(
27998
- key,
27999
- Buffer.from(
28000
- buffer2.buffer,
28001
- buffer2.byteOffset,
28002
- buffer2.byteLength
28003
- ),
28004
- { integrity: integrity2 }
28010
+ const encoded = result.encode();
28011
+ const stored = Buffer.from(
28012
+ encoded.buffer,
28013
+ encoded.byteOffset,
28014
+ encoded.byteLength
28005
28015
  );
28016
+ this.cache.set(key, stored, { integrity: integrity2 });
28017
+ if (result === entry && entry.isJSON)
28018
+ this.#decoded.set(stored, entry);
28006
28019
  }
28007
28020
  return result;
28008
28021
  }
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-RIYFGX27.js";
15
15
  import {
16
16
  createHostContextsMap
17
- } from "./chunk-EJFGJ543.js";
17
+ } from "./chunk-LY5FNWRY.js";
18
18
  import {
19
19
  stderr,
20
20
  stdout,
@@ -27,7 +27,7 @@ import {
27
27
  Query,
28
28
  actual,
29
29
  isRunResult
30
- } from "./chunk-IIXKXSLE.js";
30
+ } from "./chunk-ZRRNOLEG.js";
31
31
  import {
32
32
  Monorepo
33
33
  } from "./chunk-BUKZHMMK.js";
@@ -14,7 +14,7 @@ var require = _vlt_createRequire(import.meta.filename);
14
14
  var package_default = {
15
15
  name: "@vltpkg/user-agent",
16
16
  description: "The User-Agent string that vlt sends with every outbound request",
17
- version: "1.3.2",
17
+ version: "1.3.3",
18
18
  repository: {
19
19
  type: "git",
20
20
  url: "git+https://github.com/vltpkg/vltpkg.git",
@@ -11,11 +11,11 @@ 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-ZMRJRQDK.js";
14
+ } from "./chunk-MOL2DUEQ.js";
15
15
  import {
16
16
  findCmdShimIfExists,
17
17
  install
18
- } from "./chunk-IIXKXSLE.js";
18
+ } from "./chunk-ZRRNOLEG.js";
19
19
  import {
20
20
  PathScurry
21
21
  } from "./chunk-BUKZHMMK.js";