vlt 1.6.1 → 1.6.2

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 (88) hide show
  1. package/{access-YSLEWR2C.js → access-LNHKSCBO.js} +5 -5
  2. package/{bugs-S6CRUEA2.js → bugs-PSOZGCKG.js} +15 -14
  3. package/{build-SG3KPX3W.js → build-GBIF54BN.js} +11 -11
  4. package/{cache-HA77ROM7.js → cache-XOYAGCIO.js} +10 -8
  5. package/cache-unzip-src-unzip.js +190 -3
  6. package/chunk-24DWRCPS.js +79 -0
  7. package/chunk-2CFNQ4QB.js +77 -0
  8. package/{chunk-AEVT3CHK.js → chunk-3RYVF2GG.js} +2 -2
  9. package/{chunk-IHERL3TA.js → chunk-3UDBYFAH.js} +95 -8
  10. package/{chunk-ZJE3OTP3.js → chunk-6BD4RCTR.js} +40 -13
  11. package/{chunk-Y5PA7DVK.js → chunk-6ETYWCJN.js} +197 -1
  12. package/{chunk-KURQHX54.js → chunk-6ISFYONV.js} +2 -2
  13. package/{chunk-VGPLFOJO.js → chunk-AQJR7QDA.js} +1 -1
  14. package/{chunk-JZXNHIQE.js → chunk-BGOXKLQ6.js} +1 -1
  15. package/{chunk-MSWOR3FV.js → chunk-C75GDQFE.js} +9 -2
  16. package/{chunk-WMMKUVAT.js → chunk-FRX5IFFY.js} +4 -4
  17. package/{chunk-EMTGRCSE.js → chunk-GJMDZJPJ.js} +1 -1
  18. package/{chunk-M242QVJS.js → chunk-HHSPE2DS.js} +1 -1
  19. package/{chunk-AHLBPSGQ.js → chunk-JASG7RHB.js} +2 -2
  20. package/{chunk-W24SBFY5.js → chunk-JNPVOACH.js} +4 -4
  21. package/{chunk-OWL5G4K4.js → chunk-JYYIWXJX.js} +1 -1
  22. package/{chunk-5Q2HSLVV.js → chunk-L65CG5LE.js} +1 -1
  23. package/{chunk-PDWPFR5T.js → chunk-LEMHGORE.js} +1 -1
  24. package/{chunk-JV5XR5JQ.js → chunk-MCQTGFJY.js} +1 -1
  25. package/{chunk-O6MQ7NN6.js → chunk-N4SU52H5.js} +1 -1
  26. package/{chunk-Q2UEILN6.js → chunk-NB7QVWHU.js} +84 -16
  27. package/{chunk-N6HV7JWC.js → chunk-QFPAFVRR.js} +39 -67
  28. package/{chunk-DXED4ARV.js → chunk-QGLGNPCQ.js} +2 -2
  29. package/{chunk-3E3ISOYM.js → chunk-QGUQZURY.js} +2 -2
  30. package/{chunk-L3ZF7OYM.js → chunk-TGPL6YRK.js} +2 -2
  31. package/{chunk-C4RJ4NNS.js → chunk-TQBSL35R.js} +5 -5
  32. package/{chunk-6XVW7CWJ.js → chunk-XWA55GAN.js} +3 -3
  33. package/{chunk-BQMHDAYL.js → chunk-XWVEIWTT.js} +1 -1
  34. package/{chunk-4UAIPIAV.js → chunk-Y53EROVE.js} +5 -5
  35. package/{chunk-NO53Y3QO.js → chunk-Z63CXYQF.js} +1 -1
  36. package/{chunk-B6RIGNEO.js → chunk-ZESNN24A.js} +11 -1
  37. package/{ci-GVLL72SS.js → ci-XSH7DZGD.js} +13 -13
  38. package/cli-package.json +1 -1
  39. package/{config-KH6AEMHI.js → config-6XFBWC3U.js} +7 -6
  40. package/{config-TIPKOPYS.js → config-C73FLGQV.js} +7 -6
  41. package/{create-SKNEZEZY.js → create-UNCQKKBS.js} +16 -15
  42. package/{deprecate-RFRLJZVL.js → deprecate-HCVFAVZD.js} +9 -8
  43. package/{dist-tag-LVYOTJHJ.js → dist-tag-WXLJRWFJ.js} +5 -5
  44. package/{docs-INXRFEGY.js → docs-5EFY7ZHN.js} +15 -14
  45. package/{exec-5MA5XRPZ.js → exec-EC5D5GE3.js} +16 -15
  46. package/{exec-cache-7GS4KLWJ.js → exec-cache-EMUFVFCJ.js} +14 -13
  47. package/{exec-local-RE4KVTMN.js → exec-local-L5H4M37T.js} +13 -13
  48. package/{help-JHLP565L.js → help-FUHVZ6UH.js} +1 -1
  49. package/{init-4UFHO67B.js → init-63M6W7N4.js} +11 -11
  50. package/{install-Z33YVCDK.js → install-IHQRULIE.js} +20 -19
  51. package/{list-XAMKR6TL.js → list-EDXNWJJR.js} +16 -16
  52. package/{login-6NXUO5FF.js → login-OD7E5AO5.js} +10 -9
  53. package/{logout-6P7LWTAY.js → logout-V2WJTQV2.js} +5 -5
  54. package/{outdated-YNUSWZJD.js → outdated-7N7NGSSR.js} +15 -14
  55. package/{pack-LMQYH75V.js → pack-TKJW7AEB.js} +12 -12
  56. package/package.json +1 -1
  57. package/{ping-VLFZ3WCY.js → ping-PVWRNSCX.js} +5 -5
  58. package/{pkg-JMPBHKSW.js → pkg-PDP4XR5S.js} +12 -12
  59. package/{profile-PJJAA2YM.js → profile-BP5EALWS.js} +5 -5
  60. package/{publish-33RFJ2HJ.js → publish-HCICK5LY.js} +14 -14
  61. package/{query-LUUOK57K.js → query-TZ3BPC4B.js} +16 -16
  62. package/registry-client-src-revalidate.js +304 -44
  63. package/{repo-VLHLQP2S.js → repo-BYOSXG5J.js} +15 -14
  64. package/{reporter-SNSM2TDC.js → reporter-S6DDAHQL.js} +12 -11
  65. package/{run-USWK7R3N.js → run-JAVVTY7B.js} +13 -13
  66. package/{run-exec-PHE44AWW.js → run-exec-GGENQDEW.js} +13 -13
  67. package/security-archive-src-update-expired.js +1 -1
  68. package/{setup-JMY47ERY.js → setup-I6GLYILV.js} +13 -12
  69. package/{skills-YMMV6TMN.js → skills-5V6HKMA7.js} +14 -13
  70. package/{skills-7PYMTDER.js → skills-QOFA6XMM.js} +6 -6
  71. package/{src-2ZS4VHJP.js → src-74IKO7PC.js} +12 -8
  72. package/src-GY57R4DK.js +659 -0
  73. package/{src-A5ZJNOHN.js → src-REZNPR2X.js} +5 -5
  74. package/tar-src-placement-worker.js +6426 -0
  75. package/{token-YKHELNVQ.js → token-JEAMCRK6.js} +5 -5
  76. package/{uninstall-Q46HWR5S.js → uninstall-WA4FJFVA.js} +14 -14
  77. package/{unpublish-LBANPSJ5.js → unpublish-SG3J524L.js} +5 -5
  78. package/{update-B2EGLZHI.js → update-Y3KY2DZD.js} +15 -14
  79. package/{version-IEOBL3NN.js → version-QBEPMA7Q.js} +11 -11
  80. package/{view-JCA5VT6F.js → view-FYRF3SLJ.js} +8 -7
  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-OWJUPO3X.js → whoami-XSQ6SOIC.js} +5 -5
  87. package/chunk-N3V6EK5I.js +0 -77
  88. package/src-W2VQULRG.js +0 -285
@@ -42,10 +42,13 @@ import {
42
42
  } from "./chunk-CAV7FKWQ.js";
43
43
  import {
44
44
  emitter
45
- } from "./chunk-B6RIGNEO.js";
45
+ } from "./chunk-ZESNN24A.js";
46
46
  import {
47
47
  XDG
48
48
  } from "./chunk-XNLSTHDK.js";
49
+ import {
50
+ mark
51
+ } from "./chunk-6ETYWCJN.js";
49
52
  import {
50
53
  isErrorWithCause,
51
54
  isObject
@@ -701,7 +704,10 @@ var outputCommand = async (cliCommand, conf, { start, vltVersion } = {
701
704
  );
702
705
  }
703
706
  if (conf.globalRoot) await sweepPendingRemove(conf.globalRoot);
704
- const output = await onDone(await command(conf));
707
+ const result = await command(conf);
708
+ mark("command:done");
709
+ const output = await onDone(result);
710
+ mark("view:done");
705
711
  stopRequestLog();
706
712
  const duration_ms = Date.now() - start;
707
713
  trackCommand(
@@ -729,6 +735,7 @@ var outputCommand = async (cliCommand, conf, { start, vltVersion } = {
729
735
  );
730
736
  }
731
737
  await flush();
738
+ mark("telemetry:flushed");
732
739
  } catch (err) {
733
740
  stopRequestLog();
734
741
  onError?.(err);
@@ -11,18 +11,18 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  install
14
- } from "./chunk-ZJE3OTP3.js";
14
+ } from "./chunk-6BD4RCTR.js";
15
15
  import {
16
16
  PackageInfoClient
17
- } from "./chunk-IHERL3TA.js";
17
+ } from "./chunk-3UDBYFAH.js";
18
18
  import {
19
19
  RollbackRemove,
20
20
  cmdShim,
21
21
  findCmdShimIfExists
22
- } from "./chunk-JV5XR5JQ.js";
22
+ } from "./chunk-MCQTGFJY.js";
23
23
  import {
24
24
  PathScurry
25
- } from "./chunk-KURQHX54.js";
25
+ } from "./chunk-6ISFYONV.js";
26
26
  import {
27
27
  Spec
28
28
  } from "./chunk-6D3QAFNZ.js";
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-SUU2WETN.js";
19
19
  import {
20
20
  I
21
- } from "./chunk-B6RIGNEO.js";
21
+ } from "./chunk-ZESNN24A.js";
22
22
  import {
23
23
  Range,
24
24
  Version,
@@ -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.6.1",
17
+ version: "1.6.2",
18
18
  repository: {
19
19
  type: "git",
20
20
  url: "git+https://github.com/vltpkg/vltpkg.git",
@@ -16,10 +16,10 @@ import {
16
16
  } from "./chunk-CAV7FKWQ.js";
17
17
  import {
18
18
  userAgent
19
- } from "./chunk-M242QVJS.js";
19
+ } from "./chunk-HHSPE2DS.js";
20
20
  import {
21
21
  I
22
- } from "./chunk-B6RIGNEO.js";
22
+ } from "./chunk-ZESNN24A.js";
23
23
  import {
24
24
  XDG
25
25
  } from "./chunk-XNLSTHDK.js";
@@ -12,13 +12,13 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  actual,
14
14
  createVirtualRoot
15
- } from "./chunk-ZJE3OTP3.js";
15
+ } from "./chunk-6BD4RCTR.js";
16
16
  import {
17
17
  callLimit
18
- } from "./chunk-C4RJ4NNS.js";
18
+ } from "./chunk-TQBSL35R.js";
19
19
  import {
20
20
  SecurityArchive
21
- } from "./chunk-AHLBPSGQ.js";
21
+ } from "./chunk-JASG7RHB.js";
22
22
  import {
23
23
  error
24
24
  } from "./chunk-WZWDS3W4.js";
@@ -142,7 +142,7 @@ var reloadConfig = async (folder) => {
142
142
  unload("project");
143
143
  } catch {
144
144
  }
145
- const { Config } = await import("./config-TIPKOPYS.js");
145
+ const { Config } = await import("./config-C73FLGQV.js");
146
146
  return Config.load(folder, process.argv, true, false);
147
147
  };
148
148
 
@@ -15,7 +15,7 @@ import {
15
15
  pairsToRecords,
16
16
  registrySelectionFields,
17
17
  registrySelectors
18
- } from "./chunk-AEVT3CHK.js";
18
+ } from "./chunk-3RYVF2GG.js";
19
19
  import {
20
20
  normalizeRegistryURL
21
21
  } from "./chunk-7M2VTFLP.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-MSWOR3FV.js";
14
+ } from "./chunk-C75GDQFE.js";
15
15
  import {
16
16
  urlOpen
17
17
  } from "./chunk-QNHBAGXQ.js";
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  Ze,
14
14
  ts
15
- } from "./chunk-Y5PA7DVK.js";
15
+ } from "./chunk-6ETYWCJN.js";
16
16
 
17
17
  // ../../node_modules/.vlt/~npm~rimraf@6.1.3/node_modules/rimraf/dist/esm/opt-arg.js
18
18
  var typeOrUndef = (val, t) => typeof val === "undefined" || typeof val === t;
@@ -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
  rimraf
14
- } from "./chunk-PDWPFR5T.js";
14
+ } from "./chunk-LEMHGORE.js";
15
15
  import {
16
16
  error
17
17
  } from "./chunk-WZWDS3W4.js";
@@ -21,7 +21,7 @@ import {
21
21
  RollbackRemove,
22
22
  cmdShimIfExists,
23
23
  findCmdShimIfExists
24
- } from "./chunk-JV5XR5JQ.js";
24
+ } from "./chunk-MCQTGFJY.js";
25
25
  import {
26
26
  readGlobalState,
27
27
  updateGlobalState,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-QNHBAGXQ.js";
15
15
  import {
16
16
  userAgent
17
- } from "./chunk-M242QVJS.js";
17
+ } from "./chunk-HHSPE2DS.js";
18
18
  import {
19
19
  assertOk,
20
20
  registryErrorMessage,
@@ -25,13 +25,13 @@ import {
25
25
  import {
26
26
  I,
27
27
  logRequest
28
- } from "./chunk-B6RIGNEO.js";
28
+ } from "./chunk-ZESNN24A.js";
29
29
  import {
30
30
  XDG
31
31
  } from "./chunk-XNLSTHDK.js";
32
32
  import {
33
33
  rimraf
34
- } from "./chunk-PDWPFR5T.js";
34
+ } from "./chunk-LEMHGORE.js";
35
35
  import {
36
36
  asError,
37
37
  integrityHex,
@@ -26150,7 +26150,13 @@ var handleBeforeExit = () => {
26150
26150
  // ../../src/registry-client/src/index.ts
26151
26151
  var import_undici3 = __toESM(require_undici(), 1);
26152
26152
  import { randomUUID } from "node:crypto";
26153
- import { closeSync, openSync, readFileSync as readFileSync2, readSync } from "node:fs";
26153
+ import {
26154
+ closeSync,
26155
+ fstatSync,
26156
+ openSync,
26157
+ readFileSync as readFileSync2,
26158
+ readSync
26159
+ } from "node:fs";
26154
26160
  import { availableParallelism } from "node:os";
26155
26161
  import { dirname as dirname3, resolve as resolve4 } from "node:path";
26156
26162
  import { setMaxListeners } from "node:events";
@@ -27959,18 +27965,9 @@ var RegistryClient = class {
27959
27965
  cachedBody(url, options = {}) {
27960
27966
  const { integrity, method = "GET" } = options;
27961
27967
  try {
27962
- const key = cacheKey(
27963
- method,
27964
- typeof url === "string" ? new URL(url) : url
27965
- );
27966
- if (this.cache.peek(key)) return void 0;
27967
- const paths = /* @__PURE__ */ new Set();
27968
- try {
27969
- const i = this.cache.integrityPath(integrity);
27970
- if (i) paths.add(i);
27971
- } catch {
27972
- }
27973
- if (!integrity) paths.add(this.cache.path(key));
27968
+ const found = this.#cachedPaths(url, method, integrity);
27969
+ if (!found) return void 0;
27970
+ const { key, paths } = found;
27974
27971
  for (const path of paths) {
27975
27972
  let buf;
27976
27973
  try {
@@ -27994,6 +27991,77 @@ var RegistryClient = class {
27994
27991
  }
27995
27992
  return void 0;
27996
27993
  }
27994
+ /**
27995
+ * Find a valid cached non-JSON body on disk without reading it: only
27996
+ * the head is read, to check the entry. Bypasses the in-memory cache
27997
+ * LRU like {@link cachedBody}.
27998
+ *
27999
+ * The body's offset is not returned. `cache-unzip` can rewrite the
28000
+ * entry, and its head, before the body is read, so whoever reads the
28001
+ * body takes the head length from the same bytes (see `@vltpkg/tar`'s
28002
+ * `unpackCacheEntry`). A rewrite keeps the same tarball, un-gzipped.
28003
+ *
28004
+ * Does not log a cache hit. Returns undefined on anything unexpected;
28005
+ * callers fall back to {@link request}.
28006
+ */
28007
+ cachedTarball(url, options = {}) {
28008
+ const { integrity, method = "GET" } = options;
28009
+ try {
28010
+ const found = this.#cachedPaths(url, method, integrity);
28011
+ if (!found) return void 0;
28012
+ const { key, paths } = found;
28013
+ for (const path of paths) {
28014
+ let fd;
28015
+ try {
28016
+ fd = openSync(path, "r");
28017
+ } catch {
28018
+ continue;
28019
+ }
28020
+ try {
28021
+ const size = Buffer.allocUnsafe(4);
28022
+ if (readSync(fd, size, 0, 4, 0) < 4) continue;
28023
+ const headSize = size.readUInt32BE(0);
28024
+ if (headSize < 7 || headSize > maxHeadSize) continue;
28025
+ const head = Buffer.allocUnsafe(headSize + 2);
28026
+ const read = readSync(fd, head, 0, headSize + 2, 0);
28027
+ if (read < headSize) continue;
28028
+ const entry = CacheEntry.decodeHead(head.subarray(0, read));
28029
+ if (entry.statusCode !== 200 || !entry.valid || entry.isJSON) {
28030
+ continue;
28031
+ }
28032
+ return {
28033
+ path,
28034
+ key,
28035
+ bytes: fstatSync(fd).size - headSize,
28036
+ integrity: entry.integrity,
28037
+ gzip: CacheEntry.isGzipEntry(head.subarray(0, read))
28038
+ };
28039
+ } finally {
28040
+ closeSync(fd);
28041
+ }
28042
+ }
28043
+ } catch {
28044
+ }
28045
+ return void 0;
28046
+ }
28047
+ // The cache files that may hold a body for `url`, or undefined when
28048
+ // the in-memory cache should answer instead. Shared by cachedBody and
28049
+ // cachedTarball.
28050
+ #cachedPaths(url, method, integrity) {
28051
+ const key = cacheKey(
28052
+ method,
28053
+ typeof url === "string" ? new URL(url) : url
28054
+ );
28055
+ if (this.cache.peek(key)) return void 0;
28056
+ const paths = /* @__PURE__ */ new Set();
28057
+ try {
28058
+ const i = this.cache.integrityPath(integrity);
28059
+ if (i) paths.add(i);
28060
+ } catch {
28061
+ }
28062
+ if (!integrity) paths.add(this.cache.path(key));
28063
+ return { key, paths };
28064
+ }
27997
28065
  /**
27998
28066
  * Queue the cached tarball at `key` (a {@link CachedBody} key) for the
27999
28067
  * background child: exploded into the global store when that is on,
@@ -9,80 +9,29 @@ 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
+ readStoreIndex,
14
+ storeIndexManifest,
15
+ storeIndexPath
16
+ } from "./chunk-24DWRCPS.js";
12
17
  import {
13
18
  rimraf,
14
19
  rimrafSync
15
- } from "./chunk-PDWPFR5T.js";
20
+ } from "./chunk-LEMHGORE.js";
16
21
  import {
17
- isManifest,
18
- normalizeBinPaths
19
- } from "./chunk-BF5DRGRZ.js";
22
+ span
23
+ } from "./chunk-6ETYWCJN.js";
20
24
  import {
21
25
  error
22
26
  } from "./chunk-WZWDS3W4.js";
23
27
 
24
- // ../../src/tar/src/store-index.ts
25
- import { readFileSync } from "node:fs";
26
- import { debuglog } from "node:util";
27
- var debug = debuglog("vlt");
28
- var storeIndexPath = (storeEntry) => storeEntry + ".json";
29
- var isRecord = (x) => !!x && typeof x === "object" && !Array.isArray(x);
30
- var isOptString = (x) => x === void 0 || typeof x === "string";
31
- var unsafePath = /(?:^|\/)\.{0,2}(?:\/|$)|\\/;
32
- var isRelPath = (p) => typeof p === "string" && !unsafePath.test(p);
33
- var isIndexFile = (f) => Array.isArray(f) && f.length === 3 && isRelPath(f[0]) && typeof f[1] === "number" && (f[2] === 0 || f[2] === 1);
34
- var isStoreIndex = (x) => isRecord(x) && x.v === 1 && typeof x.scripts === "boolean" && isOptString(x.name) && isOptString(x.version) && (x.bins === void 0 || isRecord(x.bins) && Object.values(x.bins).every((b) => typeof b === "string")) && Array.isArray(x.dirs) && x.dirs.every(isRelPath) && Array.isArray(x.files) && x.files.every(isIndexFile) && isOptString(x.manifest);
35
- var readStoreIndex = (storeEntry) => {
36
- let index;
37
- try {
38
- index = JSON.parse(
39
- readFileSync(storeIndexPath(storeEntry), "utf8")
40
- );
41
- } catch (er) {
42
- if (er.code !== "ENOENT") {
43
- debug("global store: invalid index", storeEntry);
44
- }
45
- return void 0;
46
- }
47
- if (isStoreIndex(index)) return index;
48
- debug("global store: invalid index", storeEntry);
49
- return void 0;
50
- };
51
- var storeIndexManifest = (packageJson, bindingGyp) => {
52
- let pkg;
53
- try {
54
- pkg = JSON.parse(
55
- packageJson.toString("utf8").replace(/^\uFEFF/, "")
56
- );
57
- } catch (cause) {
58
- throw error("invalid package.json in tarball", { cause });
59
- }
60
- if (!isRecord(pkg)) {
61
- throw error("invalid package.json in tarball", { found: pkg });
62
- }
63
- const { name: name2, version, scripts, bin } = pkg;
64
- const s = isRecord(scripts) ? scripts : {};
65
- const result = {
66
- scripts: !!(s.install || s.preinstall || s.postinstall) || bindingGyp
67
- };
68
- const bins = normalizeBinPaths({
69
- name: typeof name2 === "string" ? name2 : void 0,
70
- bin
71
- });
72
- if (bins && Object.keys(bins).length) result.bins = bins;
73
- if (typeof name2 === "string") result.name = name2;
74
- if (typeof version === "string") result.version = version;
75
- if (isManifest(pkg)) result.manifest = JSON.stringify(pkg);
76
- return result;
77
- };
78
-
79
28
  // ../../src/tar/src/unpack.ts
80
29
  import { randomBytes } from "node:crypto";
81
30
  import {
82
31
  chmodSync,
83
32
  lstatSync,
84
33
  mkdirSync,
85
- readFileSync as readFileSync2,
34
+ readFileSync,
86
35
  renameSync,
87
36
  statSync,
88
37
  writeFileSync
@@ -773,17 +722,39 @@ var unpack = async (tarData, target, format) => {
773
722
  await unpackUnzipped(await decompress(tarData, format), target);
774
723
  };
775
724
  var unpackSync = (tarData, target, format) => {
776
- unpackUnzippedSync(decompressSync(tarData, format), target);
725
+ const inflated = span("inflate", {
726
+ bytes: tarData.length,
727
+ sync: true
728
+ });
729
+ const buffer = decompressSync(tarData, format);
730
+ inflated({ out: buffer.length });
731
+ const written = span("write", { bytes: buffer.length });
732
+ unpackUnzippedSync(buffer, target);
733
+ written();
777
734
  };
778
735
  var unpackParallel = async (tarData, target, format) => {
779
- unpackUnzippedSync(await decompress(tarData, format), target);
736
+ const inflated = span("inflate", { bytes: tarData.length });
737
+ const buffer = await decompress(tarData, format);
738
+ inflated({ out: buffer.length });
739
+ const written = span("write", { bytes: buffer.length });
740
+ unpackUnzippedSync(buffer, target);
741
+ written();
780
742
  };
781
743
  var unpackFileParallel = async (file, target, offset = 0, format) => unpackParallel(
782
744
  (await readFile(file)).subarray(offset),
783
745
  target,
784
746
  format
785
747
  );
786
- var unpackFileSync = (file, target, offset = 0, format) => unpackSync(readFileSync2(file).subarray(offset), target, format);
748
+ var unpackFileSync = (file, target, offset = 0, format) => unpackSync(readFileSync(file).subarray(offset), target, format);
749
+ var cacheEntryBody = (entry) => {
750
+ const headSize = entry.length >= 4 ? entry.readUInt32BE(0) : 0;
751
+ if (headSize < 7 || headSize > entry.length) {
752
+ throw error("not a cache entry", { found: headSize });
753
+ }
754
+ return entry.subarray(headSize);
755
+ };
756
+ var unpackCacheEntrySync = (file, target, format) => unpackSync(cacheEntryBody(readFileSync(file)), target, format);
757
+ var unpackCacheEntryParallel = async (file, target, format) => unpackParallel(cacheEntryBody(await readFile(file)), target, format);
787
758
  var tmpName = (target) => dirname(target) + sep + "." + basename2(target) + "." + tmpSuffix();
788
759
  var parseTarball = (buffer, tmp2) => {
789
760
  if (isGzip(buffer)) {
@@ -1033,7 +1004,7 @@ import {
1033
1004
  lstatSync as lstatSync2,
1034
1005
  openSync,
1035
1006
  readdirSync,
1036
- readFileSync as readFileSync3,
1007
+ readFileSync as readFileSync2,
1037
1008
  statSync as statSync2,
1038
1009
  utimesSync
1039
1010
  } from "node:fs";
@@ -1124,7 +1095,7 @@ var verifyStoreEntry = (storeEntry, tarData) => {
1124
1095
  let mode;
1125
1096
  try {
1126
1097
  mode = statSync2(f.path).mode;
1127
- body = readFileSync3(f.path);
1098
+ body = readFileSync2(f.path);
1128
1099
  } catch {
1129
1100
  return `unreadable ${p}`;
1130
1101
  }
@@ -1138,13 +1109,14 @@ var verifyStoreEntry = (storeEntry, tarData) => {
1138
1109
  };
1139
1110
 
1140
1111
  export {
1141
- storeIndexPath,
1142
- readStoreIndex,
1143
1112
  unpack,
1144
1113
  unpackSync,
1145
1114
  unpackParallel,
1146
1115
  unpackFileParallel,
1147
1116
  unpackFileSync,
1117
+ cacheEntryBody,
1118
+ unpackCacheEntrySync,
1119
+ unpackCacheEntryParallel,
1148
1120
  tmpName,
1149
1121
  unpackToStoreSync,
1150
1122
  storeEntryNames,
@@ -13,13 +13,13 @@ import {
13
13
  findSelf,
14
14
  globalSpec,
15
15
  writeInstallReceipt
16
- } from "./chunk-O6MQ7NN6.js";
16
+ } from "./chunk-N4SU52H5.js";
17
17
  import {
18
18
  prettyPath
19
19
  } from "./chunk-BH5CVXNY.js";
20
20
  import {
21
21
  findCmdShimIfExists
22
- } from "./chunk-JV5XR5JQ.js";
22
+ } from "./chunk-MCQTGFJY.js";
23
23
  import {
24
24
  loadPackageJson
25
25
  } from "./chunk-E74WGW5C.js";
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  init,
14
14
  install
15
- } from "./chunk-ZJE3OTP3.js";
15
+ } from "./chunk-6BD4RCTR.js";
16
16
  import {
17
17
  commandUsage
18
18
  } from "./chunk-HT6FS4VB.js";
@@ -22,7 +22,7 @@ import {
22
22
  minimatch,
23
23
  resolveWSConfig,
24
24
  splitNegatedPatterns
25
- } from "./chunk-KURQHX54.js";
25
+ } from "./chunk-6ISFYONV.js";
26
26
  import {
27
27
  load,
28
28
  save
@@ -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
  stderr
14
- } from "./chunk-MSWOR3FV.js";
14
+ } from "./chunk-C75GDQFE.js";
15
15
  import {
16
16
  migratableWSConfig,
17
17
  resolveWSConfig
18
- } from "./chunk-KURQHX54.js";
18
+ } from "./chunk-6ISFYONV.js";
19
19
  import {
20
20
  save
21
21
  } from "./chunk-HTOTG4TS.js";
@@ -14,12 +14,12 @@ import {
14
14
  SecurityArchive,
15
15
  pRetry,
16
16
  usesNpmRegistry
17
- } from "./chunk-AHLBPSGQ.js";
17
+ } from "./chunk-JASG7RHB.js";
18
18
  import {
19
19
  Monorepo,
20
20
  PackageJson,
21
21
  minimatch
22
- } from "./chunk-KURQHX54.js";
22
+ } from "./chunk-6ISFYONV.js";
23
23
  import {
24
24
  asDepID,
25
25
  baseDepID,
@@ -39,10 +39,10 @@ import {
39
39
  } from "./chunk-6D3QAFNZ.js";
40
40
  import {
41
41
  userAgentHeaders
42
- } from "./chunk-M242QVJS.js";
42
+ } from "./chunk-HHSPE2DS.js";
43
43
  import {
44
44
  graphStep
45
- } from "./chunk-B6RIGNEO.js";
45
+ } from "./chunk-ZESNN24A.js";
46
46
  import {
47
47
  Spec,
48
48
  Version,
@@ -9813,7 +9813,7 @@ var Query = class {
9813
9813
  };
9814
9814
 
9815
9815
  // ../../src/graph/src/skills/lazy.ts
9816
- var load3 = () => import("./skills-7PYMTDER.js");
9816
+ var load3 = () => import("./skills-QOFA6XMM.js");
9817
9817
  var listSkills = async (o) => (await load3()).listSkills(o);
9818
9818
  var linkSkills = async (o) => (await load3()).linkSkills(o);
9819
9819
  var hasSkills = async (node) => isNode(node) && (await load3()).shipsSkills(node);
@@ -11,13 +11,13 @@ 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-5Q2HSLVV.js";
14
+ } from "./chunk-L65CG5LE.js";
15
15
  import {
16
16
  mermaidOutput
17
- } from "./chunk-ZJE3OTP3.js";
17
+ } from "./chunk-6BD4RCTR.js";
18
18
  import {
19
19
  stderr
20
- } from "./chunk-MSWOR3FV.js";
20
+ } from "./chunk-C75GDQFE.js";
21
21
  import {
22
22
  ViewClass
23
23
  } from "./chunk-4KCU2KZL.js";
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  addKey,
14
14
  asDependency
15
- } from "./chunk-C4RJ4NNS.js";
15
+ } from "./chunk-TQBSL35R.js";
16
16
  import {
17
17
  parseSpecArg
18
18
  } from "./chunk-7M2VTFLP.js";
@@ -17,25 +17,25 @@ import {
17
17
  } from "./chunk-RIYFGX27.js";
18
18
  import {
19
19
  createHostContextsMap
20
- } from "./chunk-W24SBFY5.js";
20
+ } from "./chunk-JNPVOACH.js";
21
21
  import {
22
22
  actual,
23
23
  isRunResult
24
- } from "./chunk-ZJE3OTP3.js";
24
+ } from "./chunk-6BD4RCTR.js";
25
25
  import {
26
26
  Query
27
- } from "./chunk-C4RJ4NNS.js";
27
+ } from "./chunk-TQBSL35R.js";
28
28
  import {
29
29
  stderr,
30
30
  stdout,
31
31
  styleTextStdout
32
- } from "./chunk-MSWOR3FV.js";
32
+ } from "./chunk-C75GDQFE.js";
33
33
  import {
34
34
  require_emoji_regex
35
35
  } from "./chunk-VTEFO2FT.js";
36
36
  import {
37
37
  Monorepo
38
- } from "./chunk-KURQHX54.js";
38
+ } from "./chunk-6ISFYONV.js";
39
39
  import {
40
40
  isErrorWithCause
41
41
  } from "./chunk-BF5DRGRZ.js";
@@ -34,7 +34,7 @@ var run = async (command) => {
34
34
  if (command) {
35
35
  process.argv.splice(2, 0, command);
36
36
  }
37
- const vlt = await import("./src-2ZS4VHJP.js");
37
+ const vlt = await import("./src-74IKO7PC.js");
38
38
  await vlt.default();
39
39
  };
40
40
 
@@ -9,6 +9,9 @@ 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
+ tracer
14
+ } from "./chunk-6ETYWCJN.js";
12
15
 
13
16
  // ../../src/output/src/index.ts
14
17
  import EventEmitter from "node:events";
@@ -27,10 +30,17 @@ var OutputEmitter = class {
27
30
  var emitter = new OutputEmitter();
28
31
  var logRequest = (url, state, details = {}) => {
29
32
  emitter.emit("request", { url, state, ...details });
33
+ if (tracer.file) {
34
+ tracer.trace("request", { ...details, url: String(url), state });
35
+ }
30
36
  };
31
37
  var graphStep = (step) => {
32
38
  emitter.emit("graphStep", { step, state: "start" });
33
- return () => emitter.emit("graphStep", { step, state: "stop" });
39
+ tracer.mark(step);
40
+ return () => {
41
+ emitter.emit("graphStep", { step, state: "stop" });
42
+ tracer.mark(`${step}:done`);
43
+ };
34
44
  };
35
45
 
36
46
  // ../../node_modules/.vlt/~npm~lru-cache@11.5.2/node_modules/lru-cache/dist/esm/node/index.min.js