vlt 1.6.0 → 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 (89) hide show
  1. package/{access-AJ654YKY.js → access-LNHKSCBO.js} +5 -5
  2. package/{bugs-N73DVYHD.js → bugs-PSOZGCKG.js} +15 -14
  3. package/{build-VZ3EZKMM.js → build-GBIF54BN.js} +11 -11
  4. package/{cache-VROEWG2C.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-LP3ORD3D.js → chunk-3RYVF2GG.js} +2 -2
  9. package/{chunk-LCLRP64K.js → chunk-3UDBYFAH.js} +104 -16
  10. package/{chunk-36UIE654.js → chunk-6BD4RCTR.js} +46 -16
  11. package/{chunk-Y5PA7DVK.js → chunk-6ETYWCJN.js} +197 -1
  12. package/{chunk-TQQO2F56.js → chunk-6ISFYONV.js} +3 -2
  13. package/{chunk-FXD3IV2S.js → chunk-AQJR7QDA.js} +1 -1
  14. package/{chunk-VLVMLSIF.js → chunk-BGOXKLQ6.js} +27 -27
  15. package/{chunk-KVWGMSPW.js → chunk-C75GDQFE.js} +18 -3
  16. package/{chunk-TWDSXQPN.js → chunk-FRX5IFFY.js} +4 -4
  17. package/{chunk-DBANBIL2.js → chunk-FZCPQWCJ.js} +1 -0
  18. package/{chunk-EMTGRCSE.js → chunk-GJMDZJPJ.js} +1 -1
  19. package/{chunk-GEQFMH5M.js → chunk-HHSPE2DS.js} +1 -1
  20. package/{chunk-YTDABXPD.js → chunk-JASG7RHB.js} +2 -2
  21. package/{chunk-JCNI6ZHH.js → chunk-JNPVOACH.js} +4 -4
  22. package/{chunk-ANW36H4T.js → chunk-JYYIWXJX.js} +1 -1
  23. package/{chunk-22LZBDEC.js → chunk-L65CG5LE.js} +1 -1
  24. package/{chunk-PDWPFR5T.js → chunk-LEMHGORE.js} +1 -1
  25. package/{chunk-JV5XR5JQ.js → chunk-MCQTGFJY.js} +1 -1
  26. package/{chunk-O6MQ7NN6.js → chunk-N4SU52H5.js} +1 -1
  27. package/{chunk-44AWMA4F.js → chunk-NB7QVWHU.js} +84 -16
  28. package/{chunk-N6HV7JWC.js → chunk-QFPAFVRR.js} +39 -67
  29. package/{chunk-DXED4ARV.js → chunk-QGLGNPCQ.js} +2 -2
  30. package/{chunk-PC2HOBAQ.js → chunk-QGUQZURY.js} +9 -4
  31. package/{chunk-RBQO54TG.js → chunk-TGPL6YRK.js} +2 -2
  32. package/{chunk-F5LZMLAQ.js → chunk-TQBSL35R.js} +19 -12
  33. package/{chunk-IXAMCWIT.js → chunk-XWA55GAN.js} +3 -3
  34. package/{chunk-GZVI75KX.js → chunk-XWVEIWTT.js} +1 -1
  35. package/{chunk-75HGJVNG.js → chunk-Y53EROVE.js} +5 -5
  36. package/{chunk-CYK6I4M6.js → chunk-Z63CXYQF.js} +1 -1
  37. package/{chunk-B6RIGNEO.js → chunk-ZESNN24A.js} +11 -1
  38. package/{ci-3BVMVQIT.js → ci-XSH7DZGD.js} +13 -13
  39. package/cli-package.json +1 -1
  40. package/{config-2KQV7N5A.js → config-6XFBWC3U.js} +8 -7
  41. package/{config-EKHBW6I5.js → config-C73FLGQV.js} +7 -6
  42. package/{create-QVHNOIV3.js → create-UNCQKKBS.js} +16 -15
  43. package/{deprecate-E254QBH6.js → deprecate-HCVFAVZD.js} +9 -8
  44. package/{dist-tag-SITRFD7O.js → dist-tag-WXLJRWFJ.js} +5 -5
  45. package/{docs-IDL2P7CA.js → docs-5EFY7ZHN.js} +15 -14
  46. package/{exec-7BK2W2WL.js → exec-EC5D5GE3.js} +16 -15
  47. package/{exec-cache-VY46L7DR.js → exec-cache-EMUFVFCJ.js} +14 -13
  48. package/{exec-local-D7R5T3DF.js → exec-local-L5H4M37T.js} +13 -13
  49. package/{help-RMRIEJQL.js → help-FUHVZ6UH.js} +1 -1
  50. package/{init-BGW4HJ6V.js → init-63M6W7N4.js} +11 -11
  51. package/{install-U5GATZ2N.js → install-IHQRULIE.js} +20 -19
  52. package/{list-3VG4M2XL.js → list-EDXNWJJR.js} +16 -16
  53. package/{login-PHQWI6S6.js → login-OD7E5AO5.js} +10 -9
  54. package/{logout-DJCOGRFF.js → logout-V2WJTQV2.js} +5 -5
  55. package/{outdated-JH3O6R3Y.js → outdated-7N7NGSSR.js} +15 -14
  56. package/{pack-U5W5YWHK.js → pack-TKJW7AEB.js} +12 -12
  57. package/package.json +1 -1
  58. package/{ping-EKX43AOW.js → ping-PVWRNSCX.js} +5 -5
  59. package/{pkg-SW5GMERT.js → pkg-PDP4XR5S.js} +13 -13
  60. package/{profile-UGDRDMQ6.js → profile-BP5EALWS.js} +5 -5
  61. package/{publish-HTWKK3NN.js → publish-HCICK5LY.js} +14 -14
  62. package/{query-YE3FUVGG.js → query-TZ3BPC4B.js} +16 -16
  63. package/registry-client-src-revalidate.js +304 -44
  64. package/{repo-WDOCU6SE.js → repo-BYOSXG5J.js} +15 -14
  65. package/{reporter-N5PAXB26.js → reporter-S6DDAHQL.js} +12 -11
  66. package/{run-IPARVIIQ.js → run-JAVVTY7B.js} +13 -13
  67. package/{run-exec-C4RTREEW.js → run-exec-GGENQDEW.js} +13 -13
  68. package/security-archive-src-update-expired.js +1 -1
  69. package/{setup-SYYUEHZL.js → setup-I6GLYILV.js} +13 -12
  70. package/{skills-UBBMSBDQ.js → skills-5V6HKMA7.js} +14 -13
  71. package/{skills-KA2VR5Q5.js → skills-QOFA6XMM.js} +6 -6
  72. package/{src-FUSTSM4J.js → src-74IKO7PC.js} +12 -8
  73. package/src-GY57R4DK.js +659 -0
  74. package/{src-QO5G2S4O.js → src-REZNPR2X.js} +5 -5
  75. package/tar-src-placement-worker.js +6426 -0
  76. package/{token-UQNABECH.js → token-JEAMCRK6.js} +5 -5
  77. package/{uninstall-FHBJ3OUV.js → uninstall-WA4FJFVA.js} +14 -14
  78. package/{unpublish-APJTEUBA.js → unpublish-SG3J524L.js} +5 -5
  79. package/{update-NWZTL4S7.js → update-Y3KY2DZD.js} +15 -14
  80. package/{version-EMKKTL77.js → version-QBEPMA7Q.js} +11 -11
  81. package/{view-BUUI33RV.js → view-FYRF3SLJ.js} +9 -8
  82. package/vlr.js +1 -1
  83. package/vlrx.js +1 -1
  84. package/vlt.js +1 -1
  85. package/vlx.js +1 -1
  86. package/vlxl.js +1 -1
  87. package/{whoami-F6BSXGQ2.js → whoami-XSQ6SOIC.js} +5 -5
  88. package/chunk-4E65BBTM.js +0 -77
  89. package/src-W2VQULRG.js +0 -285
@@ -17,11 +17,11 @@ import {
17
17
  pickManifest,
18
18
  resolve,
19
19
  revs
20
- } from "./chunk-EMTGRCSE.js";
20
+ } from "./chunk-GJMDZJPJ.js";
21
21
  import {
22
22
  Monorepo,
23
23
  PackageJson
24
- } from "./chunk-TQQO2F56.js";
24
+ } from "./chunk-6ISFYONV.js";
25
25
  import {
26
26
  Spec
27
27
  } from "./chunk-6D3QAFNZ.js";
@@ -32,10 +32,16 @@ import {
32
32
  } from "./chunk-4GMNWW4C.js";
33
33
  import {
34
34
  logRequest
35
- } from "./chunk-B6RIGNEO.js";
35
+ } from "./chunk-ZESNN24A.js";
36
36
  import {
37
37
  XDG
38
38
  } from "./chunk-XNLSTHDK.js";
39
+ import {
40
+ storeIndexPath
41
+ } from "./chunk-24DWRCPS.js";
42
+ import {
43
+ span
44
+ } from "./chunk-6ETYWCJN.js";
39
45
  import {
40
46
  asPackument,
41
47
  brotliTarballUrl,
@@ -107,6 +113,7 @@ var parseRecord = (l) => {
107
113
 
108
114
  // ../../src/package-info/src/index.ts
109
115
  import { createHash, randomBytes } from "node:crypto";
116
+ import { lstatSync } from "node:fs";
110
117
  import {
111
118
  mkdir,
112
119
  readFile,
@@ -338,7 +345,7 @@ var PackageInfoClient = class {
338
345
  }
339
346
  async getRegistryClient() {
340
347
  if (this.#registryClient) return this.#registryClient;
341
- this.#registryClientPromise ??= import("./src-QO5G2S4O.js").then(({ RegistryClient }) => {
348
+ this.#registryClientPromise ??= import("./src-REZNPR2X.js").then(({ RegistryClient }) => {
342
349
  this.#registryClient = new RegistryClient(this.options);
343
350
  return this.#registryClient;
344
351
  });
@@ -377,7 +384,7 @@ var PackageInfoClient = class {
377
384
  }
378
385
  async getTarPool() {
379
386
  if (this.#tarPool) return this.#tarPool;
380
- this.#tarPoolPromise ??= import("./src-W2VQULRG.js").then(
387
+ this.#tarPoolPromise ??= import("./src-GY57R4DK.js").then(
381
388
  ({ Pool }) => {
382
389
  this.#tarPool = new Pool();
383
390
  return this.#tarPool;
@@ -385,6 +392,44 @@ var PackageInfoClient = class {
385
392
  );
386
393
  return this.#tarPoolPromise;
387
394
  }
395
+ /**
396
+ * Terminate the tar pool's placement worker threads, if any were
397
+ * started. Reify calls this once placement is done; it is a no-op when
398
+ * the pool was never created or ran inline.
399
+ */
400
+ async closeTarPool() {
401
+ await this.#tarPoolPromise;
402
+ await this.#tarPool?.close();
403
+ }
404
+ /**
405
+ * Start the tar pool's unpack workers for an install about to place
406
+ * `nodes`, so they boot while the first packages are fetched instead
407
+ * of on the critical path of the first unpack. Only the nodes the
408
+ * global store does not already hold count: a store hit is linked on
409
+ * the main thread, so a warm install of all hits starts no worker.
410
+ * Best effort and never rejects: if the pool cannot start, unpacking
411
+ * just runs inline, and a real failure resurfaces at the first
412
+ * extract.
413
+ */
414
+ async warmTarPool(nodes) {
415
+ try {
416
+ const storeOn = this.#storeLinker !== "unpack";
417
+ let jobs = 0;
418
+ for (const { integrity } of nodes) {
419
+ const hex = storeOn ? integrityHex(integrity) : void 0;
420
+ if (hex && lstatSync(
421
+ storeIndexPath(pathResolve(this.#storeRoot, hex)),
422
+ { throwIfNoEntry: false }
423
+ )) {
424
+ continue;
425
+ }
426
+ jobs++;
427
+ }
428
+ if (!jobs) return;
429
+ await (await this.getTarPool()).warm(jobs);
430
+ } catch {
431
+ }
432
+ }
388
433
  /**
389
434
  * A version's Brotli (`.tar.br`) alternate: its absolute URL, plus its
390
435
  * hash if the registry sent one. Returns undefined if the version has no
@@ -417,6 +462,15 @@ var PackageInfoClient = class {
417
462
  this.#storeLinker = linker && storeLinkers.has(linker) ? linker : "unpack";
418
463
  }
419
464
  async extract(spec, target, options = {}) {
465
+ const extractSpan = {};
466
+ try {
467
+ return await this.#extract(spec, target, options, extractSpan);
468
+ } catch (er) {
469
+ extractSpan.end?.({ how: "error" });
470
+ throw er;
471
+ }
472
+ }
473
+ async #extract(spec, target, options, extractSpan) {
420
474
  if (typeof spec === "string")
421
475
  spec = Spec.parse(spec, this.options);
422
476
  const {
@@ -426,13 +480,19 @@ var PackageInfoClient = class {
426
480
  fromLockfile = false
427
481
  } = options;
428
482
  const f = spec.final;
429
- const brotli = !!resolved && tarballFormat(resolved) === "brotli";
430
- const r = resolved && (integrity || brotli) ? {
431
- resolved,
483
+ const url = f.type === "git" && f.remoteURL && resolved && !/^https?:\/\//.test(resolved) ? f.remoteURL : resolved;
484
+ const brotli = !!url && tarballFormat(url) === "brotli";
485
+ const r = url && (integrity || brotli) ? {
486
+ resolved: url,
432
487
  integrity,
433
488
  spec,
434
489
  ...brotli && !integrity ? { digestRequired: true } : {}
435
490
  } : await this.resolve(spec, options);
491
+ const end = span("extract", {
492
+ spec: String(spec),
493
+ url: r.resolved
494
+ });
495
+ extractSpan.end = end;
436
496
  switch (f.type) {
437
497
  case "git": {
438
498
  const {
@@ -462,6 +522,7 @@ var PackageInfoClient = class {
462
522
  await clone(gitRemote, gitCommittish, target, { spec });
463
523
  void rm2(target + "/.git", { recursive: true });
464
524
  }
525
+ end({ how: "git" });
465
526
  return r;
466
527
  }
467
528
  }
@@ -471,11 +532,10 @@ var PackageInfoClient = class {
471
532
  const storeOn = f.type === "registry" && this.#storeLinker !== "unpack";
472
533
  const copy = this.#storeLinker === "copy";
473
534
  const clone2 = this.#storeLinker === "clone";
474
- const hex = !storeOn ? void 0 : r.integrity ? integrityHex(r.integrity) : integrityHex(
475
- (await this.getRegistryClient()).cachedIntegrity(
476
- r.resolved
477
- )
478
- );
535
+ const cachedIntegrity = storeOn && !r.integrity ? (await this.getRegistryClient()).cachedIntegrity(
536
+ r.resolved
537
+ ) : void 0;
538
+ const hex = !storeOn ? void 0 : r.integrity ? integrityHex(r.integrity) : integrityHex(cachedIntegrity);
479
539
  if (hex) {
480
540
  if (debug.enabled && !this.#storeHitRateLogged) {
481
541
  this.#storeHitRateLogged = true;
@@ -490,6 +550,8 @@ var PackageInfoClient = class {
490
550
  const { how, index } = linked;
491
551
  this.#storeHits[how]++;
492
552
  logRequest(r.resolved, how === "copy" ? "cache" : "store");
553
+ r.integrity ??= cachedIntegrity;
554
+ end({ how });
493
555
  return {
494
556
  ...r,
495
557
  manifest: index.manifest,
@@ -500,17 +562,23 @@ var PackageInfoClient = class {
500
562
  this.#storeMisses++;
501
563
  }
502
564
  const rc = await this.getRegistryClient();
503
- const cached = rc.cachedBody(r.resolved, {
565
+ const cached = rc.cachedTarball(r.resolved, {
504
566
  integrity: r.integrity
505
567
  });
506
568
  if (cached) {
507
569
  try {
508
- await pool.unpack(cached.body, target, format);
570
+ const unpacked = span("tarball:unpack", {
571
+ url: r.resolved,
572
+ bytes: cached.bytes
573
+ });
574
+ await pool.unpackCacheEntry(cached.path, target, format);
575
+ unpacked();
509
576
  logRequest(r.resolved, "cache");
510
577
  r.integrity ??= cached.integrity;
511
578
  if (storeOn || cached.gzip) {
512
579
  rc.queueForStore(cached.key, r.integrity);
513
580
  }
581
+ end({ how: "cache" });
514
582
  return r;
515
583
  } catch (er) {
516
584
  debug(
@@ -522,12 +590,17 @@ var PackageInfoClient = class {
522
590
  }
523
591
  const fetchTarball = async (useCache) => {
524
592
  const trustIntegrity = this.#trustedIntegrities.get(r.resolved) === r.integrity;
593
+ const fetched = span("tarball:fetch", { url: r.resolved });
525
594
  const response = await (await this.getRegistryClient()).request(r.resolved, {
526
595
  integrity: r.integrity,
527
596
  trustIntegrity,
528
597
  verifyDigest: r.digestRequired ? "required" : true,
529
598
  ...useCache === false ? { useCache } : {}
530
599
  });
600
+ fetched({
601
+ status: response.statusCode,
602
+ fromCache: response.fromCache
603
+ });
531
604
  if (response.statusCode !== 200) {
532
605
  throw this.#resolveError(
533
606
  spec,
@@ -580,7 +653,12 @@ var PackageInfoClient = class {
580
653
  }
581
654
  }
582
655
  try {
656
+ const unpacked = span("tarball:unpack", {
657
+ url: r.resolved,
658
+ bytes: buf.length
659
+ });
583
660
  await pool.unpack(buf, target, format);
661
+ unpacked();
584
662
  } catch (er) {
585
663
  throw this.#resolveError(
586
664
  spec,
@@ -589,11 +667,12 @@ var PackageInfoClient = class {
589
667
  { cause: er }
590
668
  );
591
669
  }
670
+ end({ how: "fetch", bytes: buf.length });
592
671
  return r;
593
672
  }
594
673
  case "remote": {
595
674
  const rc = await this.getRegistryClient();
596
- const { CacheEntry: Entry, cacheKey } = await import("./src-QO5G2S4O.js");
675
+ const { CacheEntry: Entry, cacheKey } = await import("./src-REZNPR2X.js");
597
676
  const key = cacheKey("GET", new URL(r.resolved));
598
677
  const unzipped = (entry) => {
599
678
  try {
@@ -667,6 +746,7 @@ var PackageInfoClient = class {
667
746
  { cause: er }
668
747
  );
669
748
  }
749
+ end({ how: "remote", bytes: buf.length });
670
750
  return r;
671
751
  }
672
752
  case "file": {
@@ -696,12 +776,14 @@ var PackageInfoClient = class {
696
776
  "file: specifier does not resolve to directory or tarball"
697
777
  );
698
778
  }
779
+ end({ how: "file" });
699
780
  return r;
700
781
  }
701
782
  case "workspace": {
702
783
  const ws = this.#getWS(spec, options);
703
784
  const rel = relative(dirname(target), ws.fullpath);
704
785
  await symlink(rel, target, "dir");
786
+ end({ how: "workspace" });
705
787
  return r;
706
788
  }
707
789
  }
@@ -1091,6 +1173,12 @@ var PackageInfoClient = class {
1091
1173
  return this.#resolvedManifests.size;
1092
1174
  }
1093
1175
  async manifest(spec, options = {}) {
1176
+ const end = span("manifest", { spec: String(spec) });
1177
+ const mani = await this.#manifest(spec, options);
1178
+ end();
1179
+ return mani;
1180
+ }
1181
+ async #manifest(spec, options) {
1094
1182
  const { from = this.#projectRoot } = options;
1095
1183
  if (typeof spec === "string")
1096
1184
  spec = Spec.parse(spec, this.options);
@@ -51,25 +51,25 @@ import {
51
51
  shouldInstallDepType,
52
52
  symlinkSyncMkdirp,
53
53
  unshare
54
- } from "./chunk-F5LZMLAQ.js";
54
+ } from "./chunk-TQBSL35R.js";
55
55
  import {
56
56
  SecurityArchive,
57
57
  usesNpmRegistry
58
- } from "./chunk-YTDABXPD.js";
58
+ } from "./chunk-JASG7RHB.js";
59
59
  import {
60
60
  RollbackRemove,
61
61
  cmdShimIfExists,
62
62
  readCmdShimIfExists
63
- } from "./chunk-JV5XR5JQ.js";
63
+ } from "./chunk-MCQTGFJY.js";
64
64
  import {
65
65
  detectLibc,
66
66
  getUser,
67
67
  platformCheck
68
- } from "./chunk-EMTGRCSE.js";
68
+ } from "./chunk-GJMDZJPJ.js";
69
69
  import {
70
70
  Monorepo,
71
71
  PackageJson
72
- } from "./chunk-TQQO2F56.js";
72
+ } from "./chunk-6ISFYONV.js";
73
73
  import {
74
74
  baseDepID,
75
75
  getTuple,
@@ -88,16 +88,20 @@ import {
88
88
  } from "./chunk-HTOTG4TS.js";
89
89
  import {
90
90
  userAgent
91
- } from "./chunk-GEQFMH5M.js";
91
+ } from "./chunk-HHSPE2DS.js";
92
92
  import {
93
93
  promiseSpawn
94
94
  } from "./chunk-SUU2WETN.js";
95
95
  import {
96
96
  graphStep
97
- } from "./chunk-B6RIGNEO.js";
97
+ } from "./chunk-ZESNN24A.js";
98
98
  import {
99
99
  XDG
100
100
  } from "./chunk-XNLSTHDK.js";
101
+ import {
102
+ mark,
103
+ trace
104
+ } from "./chunk-6ETYWCJN.js";
101
105
  import {
102
106
  Spec,
103
107
  Version,
@@ -2750,9 +2754,9 @@ var ensureNpmignore = (cwd) => {
2750
2754
  var init = async ({
2751
2755
  cwd = process.cwd(),
2752
2756
  author,
2753
- logger = stderr
2757
+ logger = stderr,
2758
+ packageJson = new PackageJson()
2754
2759
  } = {}) => {
2755
- const packageJson = new PackageJson();
2756
2760
  const path = resolve2(cwd, "package.json");
2757
2761
  let existingData;
2758
2762
  try {
@@ -4670,6 +4674,12 @@ var appendNodes = async (packageInfo, graph, fromNode, deps, scurry, options, se
4670
4674
  ];
4671
4675
  while (currentLevelDeps.length > 0) {
4672
4676
  const nextLevelDeps = [];
4677
+ const depth = currentLevelDeps[0]?.depth ?? 0;
4678
+ trace("build:level", {
4679
+ from: fromNode.id,
4680
+ depth,
4681
+ entries: currentLevelDeps.length
4682
+ });
4673
4683
  const fetchResults = await Promise.all(
4674
4684
  currentLevelDeps.map(
4675
4685
  async ({
@@ -4677,7 +4687,7 @@ var appendNodes = async (packageInfo, graph, fromNode, deps, scurry, options, se
4677
4687
  deps: nodeDeps,
4678
4688
  modifierRefs: nodeModifierRefs,
4679
4689
  peerContext,
4680
- depth
4690
+ depth: depth2
4681
4691
  }) => {
4682
4692
  const result = await fetchManifestsForDeps(
4683
4693
  packageInfo,
@@ -4692,7 +4702,7 @@ var appendNodes = async (packageInfo, graph, fromNode, deps, scurry, options, se
4692
4702
  hydrations,
4693
4703
  peerContext,
4694
4704
  nodeModifierRefs,
4695
- depth,
4705
+ depth2,
4696
4706
  explicit
4697
4707
  );
4698
4708
  return {
@@ -4701,13 +4711,14 @@ var appendNodes = async (packageInfo, graph, fromNode, deps, scurry, options, se
4701
4711
  deps: nodeDeps,
4702
4712
  modifierRefs: nodeModifierRefs,
4703
4713
  peerContext,
4704
- depth
4714
+ depth: depth2
4705
4715
  },
4706
4716
  result
4707
4717
  };
4708
4718
  }
4709
4719
  )
4710
4720
  );
4721
+ trace("build:level:fetched", { from: fromNode.id, depth });
4711
4722
  const sortedResults = fetchResults.sort((a, b) => {
4712
4723
  const keyA = `${a.entry.node.id}::${a.entry.depth}`;
4713
4724
  const keyB = `${b.entry.node.id}::${b.entry.depth}`;
@@ -4764,6 +4775,11 @@ var appendNodes = async (packageInfo, graph, fromNode, deps, scurry, options, se
4764
4775
  nextLevelDeps.push({ ...childDep, depth: nextDepth });
4765
4776
  }
4766
4777
  }
4778
+ trace("build:level:placed", {
4779
+ from: fromNode.id,
4780
+ depth,
4781
+ next: nextLevelDeps.length
4782
+ });
4767
4783
  currentLevelDeps = nextLevelDeps;
4768
4784
  }
4769
4785
  };
@@ -4877,6 +4893,7 @@ var refreshIdealGraph = async ({
4877
4893
  node.setDefaultLocation();
4878
4894
  }
4879
4895
  if (extractPromises?.length) {
4896
+ mark("build:extract-wait", { jobs: extractPromises.length });
4880
4897
  await Promise.all(extractPromises);
4881
4898
  }
4882
4899
  };
@@ -5604,6 +5621,8 @@ var reify = async (options) => {
5604
5621
  success = true;
5605
5622
  res.buildQueue = buildQueue;
5606
5623
  } finally {
5624
+ await options.packageInfo.closeTarPool().catch(() => {
5625
+ });
5607
5626
  if (!success) {
5608
5627
  await rollback(remover, diff, scurry).catch(() => {
5609
5628
  });
@@ -5617,6 +5636,7 @@ var reify_ = async (options, diff, remover, saveImportersPackageJson) => {
5617
5636
  const { packageInfo, packageJson, scurry, allowScripts } = options;
5618
5637
  const lfData = lockfileData(options);
5619
5638
  pruneUnsupportedOptional(diff);
5639
+ void packageInfo.warmTarPool(diff.nodes.add);
5620
5640
  const actions = addNodes(
5621
5641
  diff,
5622
5642
  scurry,
@@ -5624,18 +5644,23 @@ var reify_ = async (options, diff, remover, saveImportersPackageJson) => {
5624
5644
  options,
5625
5645
  packageInfo
5626
5646
  ).concat(deleteEdges(diff, scurry, remover));
5647
+ mark("reify:extract", { jobs: actions.length, limit });
5627
5648
  if (actions.length) await callLimit(actions, { limit });
5628
5649
  const edgeActions = addEdges(diff, scurry, remover);
5650
+ mark("reify:edges", { jobs: edgeActions.length });
5629
5651
  if (edgeActions.length) await callLimit(edgeActions, { limit });
5630
5652
  const binActions = relinkBins(diff, scurry, remover);
5631
5653
  if (binActions.length) await callLimit(binActions, { limit });
5654
+ mark("reify:hoist");
5632
5655
  await internalHoist(diff.to, options, remover);
5633
5656
  checkNeededBuild({ diff, scurry, packageJson });
5634
5657
  const allowScriptsNodes = await filterNodesByQuery(
5635
5658
  diff.to,
5636
5659
  allowScripts
5637
5660
  );
5661
+ mark("reify:chmod");
5638
5662
  await binChmodAll(diff.nodes.add, scurry);
5663
+ mark("reify:scripts");
5639
5664
  await build(diff, packageJson, scurry, allowScriptsNodes);
5640
5665
  res.buildQueue = [...diff.to.nodes.values()].filter((node) => node.buildState === "needed").map((node) => node.id);
5641
5666
  if (diff.hadOptionalFailures) {
@@ -5644,6 +5669,7 @@ var reify_ = async (options, diff, remover, saveImportersPackageJson) => {
5644
5669
  diff.nodes.delete.add(node);
5645
5670
  }
5646
5671
  }
5672
+ mark("reify:lockfile");
5647
5673
  saveHidden(options);
5648
5674
  const rmActions = deleteNodes(
5649
5675
  diff,
@@ -5651,6 +5677,7 @@ var reify_ = async (options, diff, remover, saveImportersPackageJson) => {
5651
5677
  scurry,
5652
5678
  options.keepNodes
5653
5679
  );
5680
+ mark("reify:delete", { jobs: rmActions.length });
5654
5681
  if (rmActions.length) await Promise.all(rmActions);
5655
5682
  saveImportersPackageJson?.();
5656
5683
  for (const node of diff.nodes.add) {
@@ -5765,7 +5792,7 @@ var uninstall = async (options, remove) => {
5765
5792
  throw err;
5766
5793
  }
5767
5794
  if (!allowSkills) return result;
5768
- const { linkSkills: linkSkills2 } = await import("./skills-KA2VR5Q5.js");
5795
+ const { linkSkills: linkSkills2 } = await import("./skills-QOFA6XMM.js");
5769
5796
  result.skills = await linkSkills2({
5770
5797
  ...options,
5771
5798
  graph: result.graph,
@@ -5875,7 +5902,7 @@ var update = async (options) => {
5875
5902
  throw err;
5876
5903
  }
5877
5904
  if (!allowSkills) return result;
5878
- const { linkSkills: linkSkills2 } = await import("./skills-KA2VR5Q5.js");
5905
+ const { linkSkills: linkSkills2 } = await import("./skills-QOFA6XMM.js");
5879
5906
  result.skills = await linkSkills2({
5880
5907
  ...options,
5881
5908
  graph: result.graph,
@@ -5990,7 +6017,10 @@ var install = async (options, add) => {
5990
6017
  mainManifest = options.packageJson.read(options.projectRoot);
5991
6018
  } catch (err) {
5992
6019
  if (asError(err).message === "Could not read package.json file") {
5993
- await init({ cwd: options.projectRoot });
6020
+ await init({
6021
+ cwd: options.projectRoot,
6022
+ packageJson: options.packageJson
6023
+ });
5994
6024
  mainManifest = options.packageJson.read(options.projectRoot, {
5995
6025
  reload: true
5996
6026
  });
@@ -6216,7 +6246,7 @@ var install = async (options, add) => {
6216
6246
  throw err;
6217
6247
  }
6218
6248
  if (!allowSkills) return result;
6219
- const { linkSkills: linkSkills2 } = await import("./skills-KA2VR5Q5.js");
6249
+ const { linkSkills: linkSkills2 } = await import("./skills-QOFA6XMM.js");
6220
6250
  result.skills = await linkSkills2({
6221
6251
  ...options,
6222
6252
  graph: result.graph,