@vltpkg/cli-js 1.3.4 → 1.3.6

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 (67) hide show
  1. package/{access-AY2CIGVN.js → access-SFEGWG3Y.js} +2 -2
  2. package/{bugs-6PTC6V7S.js → bugs-X2JHO4WZ.js} +6 -6
  3. package/{build-R6OJNJDU.js → build-BK4ITRPX.js} +4 -4
  4. package/{cache-NVLCCVWQ.js → cache-JRW72UJE.js} +2 -2
  5. package/{chunk-MVD5AUNS.js → chunk-2XD7RUKI.js} +1 -1
  6. package/{chunk-B5AKQ5TS.js → chunk-2XDF3JBH.js} +2 -2
  7. package/{chunk-CYN4ADWK.js → chunk-2XFFMF6G.js} +1 -1
  8. package/{chunk-GCLZEI3R.js → chunk-F6ZN6TTL.js} +1 -1
  9. package/{chunk-4XTUCYBW.js → chunk-FOSDT7YU.js} +1 -1
  10. package/{chunk-INEKXXUQ.js → chunk-GDYDW277.js} +16 -5
  11. package/{chunk-QEWKCTQY.js → chunk-HD6TAM7A.js} +3 -3
  12. package/{chunk-QZIC3WVP.js → chunk-IXAHSTBN.js} +3 -3
  13. package/{chunk-D4KNFORN.js → chunk-JELA46YR.js} +11 -1
  14. package/{chunk-DK6HGJCF.js → chunk-LFCZGP2L.js} +2 -2
  15. package/chunk-MXRSLXAC.js +75 -0
  16. package/{chunk-OFHNSAQ5.js → chunk-O2B5SLP7.js} +1 -1
  17. package/{chunk-MWAWPY3P.js → chunk-RAE3LNUK.js} +2 -2
  18. package/{chunk-WXRS5PRL.js → chunk-TY2UJ3SA.js} +1 -1
  19. package/{chunk-TL5SYXSC.js → chunk-VI7V6OCC.js} +155 -82
  20. package/{chunk-QGFDMXDH.js → chunk-WGSYVB4F.js} +27 -18
  21. package/{chunk-BFR3XHEM.js → chunk-WS7BNE5S.js} +3 -3
  22. package/{ci-FEZ6B33S.js → ci-6GQ3GMJK.js} +5 -5
  23. package/cli-package.json +1 -1
  24. package/{config-VVPVV36W.js → config-5VN6JXGK.js} +3 -3
  25. package/{config-EV5S74AA.js → config-6VRNS5F3.js} +3 -3
  26. package/{create-VGCARZLU.js → create-K7ROUCVJ.js} +8 -8
  27. package/{deprecate-3E27QREJ.js → deprecate-WRSZJ2WG.js} +4 -4
  28. package/{dist-tag-ZIDIGEIM.js → dist-tag-NSTCFNON.js} +2 -2
  29. package/{docs-GESU73FF.js → docs-E2PATRJS.js} +6 -6
  30. package/{exec-3SE4PRXY.js → exec-SV4RXF2E.js} +8 -8
  31. package/{exec-cache-7QOIKCYP.js → exec-cache-K4LBRSRD.js} +6 -6
  32. package/{exec-local-EVAI6IYM.js → exec-local-RT27P325.js} +6 -6
  33. package/{help-H54DUW2F.js → help-XXKA42B7.js} +1 -1
  34. package/{init-JOAMKEKV.js → init-IYCFQJPW.js} +5 -5
  35. package/{install-WHOVSLKH.js → install-RRCUQ34D.js} +9 -9
  36. package/{list-7X2RIDA4.js → list-WFYB66G7.js} +7 -7
  37. package/{login-P5NRTQDS.js → login-K6HTWO4J.js} +5 -5
  38. package/{logout-5PCTGCJZ.js → logout-F6EI7WST.js} +2 -2
  39. package/{pack-MLOVKXJZ.js → pack-FX24JZR4.js} +6 -6
  40. package/package.json +1 -1
  41. package/{ping-6D6EEICV.js → ping-6QRL622S.js} +2 -2
  42. package/{pkg-HC6N3DDH.js → pkg-FPWX4VUE.js} +6 -6
  43. package/{profile-C3MNVMAE.js → profile-WAI5BGPU.js} +2 -2
  44. package/{publish-3KUMQXKT.js → publish-GI7T7TE2.js} +7 -7
  45. package/{query-HNBW2ZGX.js → query-GC2DGBWT.js} +7 -7
  46. package/registry-client-src-revalidate.js +1 -1
  47. package/{repo-VWEPCUXK.js → repo-CFXNFSY7.js} +6 -6
  48. package/{reporter-UUDMEN4E.js → reporter-5QKWEQNH.js} +4 -4
  49. package/{run-OFW4MPAV.js → run-VFHTHV5N.js} +6 -6
  50. package/{run-exec-ACGX23HX.js → run-exec-OJEIP3WL.js} +6 -6
  51. package/security-archive-src-update-expired.js +1 -1
  52. package/{setup-5C56O3S3.js → setup-CCM2QAVA.js} +5 -5
  53. package/{src-SI5YMOJI.js → src-54SW7RQE.js} +4 -4
  54. package/{src-LH2HZ6FT.js → src-LLE3Q5NY.js} +2 -2
  55. package/{token-RPQP6BV5.js → token-P5N54F4D.js} +2 -2
  56. package/{uninstall-HDUNLNAD.js → uninstall-QJA3X4GY.js} +6 -6
  57. package/{unpublish-SB647KPY.js → unpublish-IAB6LNVC.js} +2 -2
  58. package/{update-PAIZPQPH.js → update-VZEF6QRY.js} +8 -8
  59. package/{version-5O2P2ROI.js → version-A6FPEDV5.js} +5 -5
  60. package/{view-3YVL4M7Z.js → view-SA6QU2NW.js} +4 -4
  61. package/vlr.js +2 -2
  62. package/vlrx.js +2 -2
  63. package/vlt.js +2 -2
  64. package/vlx.js +2 -2
  65. package/vlxl.js +2 -2
  66. package/{whoami-KFXNKZOX.js → whoami-YDNKCWU7.js} +2 -2
  67. package/chunk-DM2XRLCS.js +0 -75
@@ -19,7 +19,7 @@ import {
19
19
  pickManifest,
20
20
  resolve,
21
21
  revs
22
- } from "./chunk-INEKXXUQ.js";
22
+ } from "./chunk-GDYDW277.js";
23
23
  import {
24
24
  Spec
25
25
  } from "./chunk-64VFL4WI.js";
@@ -46,7 +46,7 @@ import {
46
46
 
47
47
  // ../../src/package-info/src/resolve-batch.ts
48
48
  import { createInterface } from "node:readline";
49
- var fetchResolve = async (client, registry, request, onRecord) => {
49
+ var fetchResolve = async (client, registry, request, onRecord, signal) => {
50
50
  if (!request.roots.length) return;
51
51
  let body;
52
52
  try {
@@ -56,6 +56,7 @@ var fetchResolve = async (client, registry, request, onRecord) => {
56
56
  // POST, not QUERY: CloudFront's allowed-method sets are fixed and
57
57
  // none includes QUERY. The registry answers both.
58
58
  method: "POST",
59
+ signal,
59
60
  headers: {
60
61
  "content-type": "application/json",
61
62
  accept: "application/x-ndjson"
@@ -203,9 +204,9 @@ var VLT_PACKUMENT_V2_MIME = "application/vnd.vlt.packument-v2+json";
203
204
  var PACKUMENT_ACCEPT = `${VLT_PACKUMENT_V2_MIME}; q=1.0, ${VLT_PACKUMENT_MIME}; q=0.9, application/json; q=0.8, */*; q=0.1`;
204
205
  var resolveWaitMs = () => {
205
206
  const configured = Number(process.env.VLT_BATCH_RESOLVE_WAIT_MS);
206
- return Number.isFinite(configured) && configured >= 0 ? configured : 1e3;
207
+ return Number.isFinite(configured) && configured >= 0 ? configured : 250;
207
208
  };
208
- var stalled = /* @__PURE__ */ Symbol("stalled");
209
+ var graceOver = /* @__PURE__ */ Symbol("graceOver");
209
210
  var SELECTION_OPTIONS = [
210
211
  "before",
211
212
  "os",
@@ -275,10 +276,19 @@ var PackageInfoClient = class {
275
276
  // `${registry}${name}@${range}` for every spec that chose a version and
276
277
  // `${registry}${name}@${version}` for the version itself.
277
278
  #resolvedManifests = /* @__PURE__ */ new Map();
278
- // The resolves still streaming, per registry, each settling when its
279
- // stream ends. The requests overlap whatever the graph build does before
280
- // it asks for its first manifest.
279
+ /**
280
+ * The resolve requests in flight against each registry, with when the
281
+ * registry last delivered a record: the grace a lookup gives the stream
282
+ * is measured from there, and it is set when the request is sent, so
283
+ * a registry with a request in flight always has a time.
284
+ */
281
285
  #resolveInflight = /* @__PURE__ */ new Map();
286
+ /**
287
+ * each request in flight, by its `#resolveSent` key: its controller and
288
+ * how many builds are still reading it. a request that settled on its
289
+ * own stays in `#resolveSent`, since its records are still here
290
+ */
291
+ #resolveOwners = /* @__PURE__ */ new Map();
282
292
  // Requests already sent, so the same ask is not repeated. Keyed on the
283
293
  // request rather than the registry: a later step asking for a different
284
294
  // root set is a different question.
@@ -287,15 +297,11 @@ var PackageInfoClient = class {
287
297
  // it. Waiting per key rather than on the whole response is what lets a
288
298
  // build place level N while the server still walks level N+1.
289
299
  #resolveWaiters = /* @__PURE__ */ new Map();
290
- // When each registry's resolve last delivered a record, which is what a
291
- // waiter checks to tell a stream that is still coming from one that has
292
- // stalled.
293
- #resolveLastRecordAt = /* @__PURE__ */ new Map();
294
300
  #registryClientPromise;
295
301
  #tarPoolPromise;
296
302
  async getRegistryClient() {
297
303
  if (this.#registryClient) return this.#registryClient;
298
- this.#registryClientPromise ??= import("./src-LH2HZ6FT.js").then(({ RegistryClient }) => {
304
+ this.#registryClientPromise ??= import("./src-LLE3Q5NY.js").then(({ RegistryClient }) => {
299
305
  this.#registryClient = new RegistryClient(this.options);
300
306
  return this.#registryClient;
301
307
  });
@@ -554,7 +560,7 @@ var PackageInfoClient = class {
554
560
  }
555
561
  case "remote": {
556
562
  const rc = await this.getRegistryClient();
557
- const { CacheEntry: Entry, cacheKey } = await import("./src-LH2HZ6FT.js");
563
+ const { CacheEntry: Entry, cacheKey } = await import("./src-LLE3Q5NY.js");
558
564
  const key = cacheKey("GET", new URL(r.resolved));
559
565
  const unzipped = (entry) => {
560
566
  try {
@@ -894,46 +900,90 @@ var PackageInfoClient = class {
894
900
  *
895
901
  * A no-op unless the registry says it serves the endpoint. Anything it
896
902
  * does not deliver is left to `manifest()`.
903
+ *
904
+ * Returns the function that releases the request. A build calls it once
905
+ * it has placed its last node; when the last build reading a request has
906
+ * released it, the stream is ended, so an install never waits on a
907
+ * stream nothing will read. The records it delivered stay answerable.
897
908
  */
898
909
  prefetchResolve(registry, request) {
899
- if (!request.roots.length) return;
910
+ if (!request.roots.length) return () => {
911
+ };
900
912
  if (!registry.endsWith("/")) registry += "/";
901
913
  const sent = `${registry}\0${JSON.stringify(request)}`;
902
- if (this.#resolveSent.has(sent)) return;
914
+ const owned = this.#resolveOwners.get(sent);
915
+ if (owned) {
916
+ owned.readers++;
917
+ return () => this.#releaseResolve(sent, owned);
918
+ }
919
+ if (this.#resolveSent.has(sent)) return () => {
920
+ };
903
921
  this.#resolveSent.add(sent);
904
- const promise = this.#runResolve(registry, request);
922
+ const owner = { controller: new AbortController(), readers: 1 };
923
+ this.#resolveOwners.set(sent, owner);
905
924
  let inflight = this.#resolveInflight.get(registry);
906
- if (!inflight)
907
- this.#resolveInflight.set(registry, inflight = /* @__PURE__ */ new Set());
908
- inflight.add(promise);
909
- const clear = () => inflight.delete(promise);
925
+ if (!inflight) {
926
+ inflight = { requests: /* @__PURE__ */ new Set(), lastRecordAt: 0 };
927
+ this.#resolveInflight.set(registry, inflight);
928
+ }
929
+ inflight.lastRecordAt = Date.now();
930
+ const promise = this.#runResolve(
931
+ registry,
932
+ request,
933
+ owner.controller.signal,
934
+ inflight
935
+ );
936
+ inflight.requests.add(promise);
937
+ const clear = () => {
938
+ inflight.requests.delete(promise);
939
+ if (this.#resolveOwners.get(sent) === owner)
940
+ this.#resolveOwners.delete(sent);
941
+ };
910
942
  promise.then(clear, clear);
943
+ return () => this.#releaseResolve(sent, owner);
944
+ }
945
+ /**
946
+ * One build is done reading the request; the last one out ends it, and
947
+ * the same question can then be asked again.
948
+ */
949
+ #releaseResolve(sent, owner) {
950
+ if (--owner.readers > 0) return;
951
+ if (this.#resolveOwners.get(sent) === owner) {
952
+ this.#resolveOwners.delete(sent);
953
+ this.#resolveSent.delete(sent);
954
+ }
955
+ owner.controller.abort();
911
956
  }
912
957
  /** Never rejects: a resolve that fails leaves every spec to manifest(). */
913
- async #runResolve(registry, request) {
958
+ async #runResolve(registry, request, signal, inflight) {
914
959
  try {
915
960
  if ((await this.capabilities(registry)).resolve === void 0)
916
961
  return;
917
962
  const client = await this.getRegistryClient();
918
- this.#resolveLastRecordAt.set(registry, Date.now());
919
- await fetchResolve(client, registry, request, (record) => {
920
- this.#resolveLastRecordAt.set(registry, Date.now());
921
- absolutizeTarball(
922
- record.manifest,
923
- `${registry}${record.name}/-/`
924
- );
925
- this.#vltPackuments.add(`${registry}${record.name}`);
926
- for (const spec of record.requested) {
963
+ await fetchResolve(
964
+ client,
965
+ registry,
966
+ request,
967
+ (record) => {
968
+ inflight.lastRecordAt = Date.now();
969
+ absolutizeTarball(
970
+ record.manifest,
971
+ `${registry}${record.name}/-/`
972
+ );
973
+ this.#vltPackuments.add(`${registry}${record.name}`);
974
+ for (const spec of record.requested) {
975
+ this.#deliverResolved(
976
+ `${registry}${record.name}@${spec}`,
977
+ record.manifest
978
+ );
979
+ }
927
980
  this.#deliverResolved(
928
- `${registry}${record.name}@${spec}`,
981
+ `${registry}${record.name}@${record.version}`,
929
982
  record.manifest
930
983
  );
931
- }
932
- this.#deliverResolved(
933
- `${registry}${record.name}@${record.version}`,
934
- record.manifest
935
- );
936
- });
984
+ },
985
+ signal
986
+ );
937
987
  } catch {
938
988
  }
939
989
  }
@@ -948,17 +998,20 @@ var PackageInfoClient = class {
948
998
  }
949
999
  }
950
1000
  /**
951
- * The manifest an in-flight resolve is expected to carry for `key`, or
952
- * undefined once waiting stopped being worth it: every request settled
953
- * without the key, or no record of any kind arrived for a whole wait.
1001
+ * The manifest for `key` from an in-flight resolve, or from `fetch` when
1002
+ * the resolve is not carrying it. Undefined when nothing is in flight.
954
1003
  *
955
- * A stream that is still delivering is worth waiting on, since its records
956
- * come in the order the build needs them; one that has stalled is not, and
957
- * the packument fetch was the alternative anyway.
1004
+ * A stream that is delivering gets a short grace to carry the key, since
1005
+ * its records come in the order the build asks for them; one that has
1006
+ * gone quiet gets none, so a server that is slow to start never charges
1007
+ * that grace to every level of the build. After the grace `fetch` runs as
1008
+ * well and the first answer wins, so a slow server can never hold a
1009
+ * lookup longer than fetching the packument would have. A fetch that
1010
+ * fails while the stream is still open waits for the stream's verdict.
958
1011
  */
959
- async #awaitResolved(registry, key) {
1012
+ async #awaitResolved(registry, key, fetch) {
960
1013
  const inflight = this.#resolveInflight.get(registry);
961
- if (!inflight?.size) return void 0;
1014
+ if (!inflight?.requests.size) return void 0;
962
1015
  let wake;
963
1016
  const arrival = new Promise((res) => {
964
1017
  wake = res;
@@ -966,22 +1019,33 @@ var PackageInfoClient = class {
966
1019
  let waiters = this.#resolveWaiters.get(key);
967
1020
  if (!waiters) this.#resolveWaiters.set(key, waiters = /* @__PURE__ */ new Set());
968
1021
  waiters.add(wake);
969
- const settled = Promise.all([...inflight]).then(
1022
+ const settled = Promise.all([...inflight.requests]).then(
970
1023
  () => this.#resolvedManifests.get(key)
971
1024
  );
972
- const waitMs = resolveWaitMs();
1025
+ const quietFor = Date.now() - inflight.lastRecordAt;
1026
+ const grace = Math.max(0, resolveWaitMs() - quietFor);
973
1027
  try {
974
- for (; ; ) {
975
- const outcome = await Promise.race([
976
- arrival,
977
- settled,
978
- // unref'd: a pending wait must never be what keeps the process up
979
- setTimeout(waitMs, stalled, { ref: false })
980
- ]);
981
- if (outcome !== stalled) return outcome;
982
- const lastRecordAt = this.#resolveLastRecordAt.get(registry) ?? 0;
983
- if (Date.now() - lastRecordAt >= waitMs) return void 0;
984
- }
1028
+ const early = await Promise.race([
1029
+ arrival,
1030
+ settled,
1031
+ // unref'd: a pending wait must never be what keeps the process up
1032
+ setTimeout(grace, graceOver, { ref: false })
1033
+ ]);
1034
+ if (early !== graceOver) return early ?? await fetch();
1035
+ debug("resolve hedge %s", key);
1036
+ const hedge = fetch();
1037
+ const outcome = await Promise.race([
1038
+ arrival,
1039
+ settled,
1040
+ hedge.catch(() => void 0)
1041
+ ]);
1042
+ if (outcome) return outcome;
1043
+ const found = await Promise.race([
1044
+ arrival,
1045
+ settled,
1046
+ setTimeout(resolveWaitMs(), graceOver, { ref: false })
1047
+ ]);
1048
+ return found && found !== graceOver ? found : await hedge;
985
1049
  } finally {
986
1050
  waiters.delete(wake);
987
1051
  if (!waiters.size) this.#resolveWaiters.delete(key);
@@ -998,15 +1062,13 @@ var PackageInfoClient = class {
998
1062
  const f = spec.final;
999
1063
  switch (f.type) {
1000
1064
  case "registry": {
1001
- if (!SELECTION_OPTIONS.some((k) => options[k] !== void 0)) {
1002
- const key = `${f.registry ?? ""}${f.name}@${f.bareSpec}`;
1003
- const resolved = this.#resolvedManifests.get(key);
1065
+ const selecting = SELECTION_OPTIONS.some(
1066
+ (k) => options[k] !== void 0
1067
+ );
1068
+ const resolveKey = `${f.registry ?? ""}${f.name}@${f.bareSpec}`;
1069
+ if (!selecting) {
1070
+ const resolved = this.#resolvedManifests.get(resolveKey);
1004
1071
  if (resolved) return resolved;
1005
- if (f.registry) {
1006
- const arrived = await this.#awaitResolved(f.registry, key);
1007
- if (arrived) return arrived;
1008
- debug("resolve miss %s", key);
1009
- }
1010
1072
  }
1011
1073
  const cachePath = this._manifestCachePath(spec, options);
1012
1074
  if (cachePath) {
@@ -1030,25 +1092,36 @@ var PackageInfoClient = class {
1030
1092
  } catch {
1031
1093
  }
1032
1094
  }
1033
- const mani = pickManifest(
1034
- await this.#packument(f, options, this.#stable(f)),
1035
- spec,
1036
- options
1037
- );
1038
- if (!mani) throw this.#resolveError(spec, options);
1039
- if (cachePath && !this.#manifestWritePaths.has(cachePath)) {
1040
- this.#manifestWritePaths.add(cachePath);
1041
- const vlt = this.#vltPackuments.has(
1042
- `${f.registry}${f.name}`
1095
+ const fromPackument = async () => {
1096
+ const mani = pickManifest(
1097
+ await this.#packument(f, options, this.#stable(f)),
1098
+ spec,
1099
+ options
1043
1100
  );
1044
- void this.#writeManifestCache(
1045
- cachePath,
1046
- JSON.stringify(
1047
- vlt ? { ...mani, __VLT_PACKUMENT: true } : mani
1048
- )
1101
+ if (!mani) throw this.#resolveError(spec, options);
1102
+ if (cachePath && !this.#manifestWritePaths.has(cachePath)) {
1103
+ this.#manifestWritePaths.add(cachePath);
1104
+ const vlt = this.#vltPackuments.has(
1105
+ `${f.registry}${f.name}`
1106
+ );
1107
+ void this.#writeManifestCache(
1108
+ cachePath,
1109
+ JSON.stringify(
1110
+ vlt ? { ...mani, __VLT_PACKUMENT: true } : mani
1111
+ )
1112
+ );
1113
+ }
1114
+ return mani;
1115
+ };
1116
+ if (!selecting && f.registry) {
1117
+ const resolved = await this.#awaitResolved(
1118
+ f.registry,
1119
+ resolveKey,
1120
+ fromPackument
1049
1121
  );
1122
+ if (resolved) return resolved;
1050
1123
  }
1051
- return mani;
1124
+ return fromPackument();
1052
1125
  }
1053
1126
  case "git": {
1054
1127
  const {
@@ -13,7 +13,7 @@ import {
13
13
  AbortError,
14
14
  SecurityArchive,
15
15
  pRetry
16
- } from "./chunk-MVD5AUNS.js";
16
+ } from "./chunk-2XD7RUKI.js";
17
17
  import {
18
18
  Monorepo,
19
19
  PackageJson,
@@ -21,7 +21,7 @@ import {
21
21
  getUser,
22
22
  minimatch,
23
23
  platformCheck
24
- } from "./chunk-INEKXXUQ.js";
24
+ } from "./chunk-GDYDW277.js";
25
25
  import {
26
26
  asDepID,
27
27
  baseDepID,
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  userAgent,
49
49
  userAgentHeaders
50
- } from "./chunk-WXRS5PRL.js";
50
+ } from "./chunk-TY2UJ3SA.js";
51
51
  import {
52
52
  graphStep,
53
53
  promiseSpawn
@@ -14175,10 +14175,12 @@ var buildIdealFromStartingGraph = async (options) => {
14175
14175
  };
14176
14176
 
14177
14177
  // ../../src/graph/src/ideal/prefetch-resolve.ts
14178
+ var nothing = () => {
14179
+ };
14178
14180
  var prefetchResolve = (graph, packageInfo, options) => {
14179
- if (options.modifiers) return 0;
14181
+ if (options.modifiers) return nothing;
14180
14182
  const registry2 = options.registry;
14181
- if (!registry2) return 0;
14183
+ if (!registry2) return nothing;
14182
14184
  const scopes = Object.keys(options["scoped-registries"] ?? {});
14183
14185
  const scoped = (name) => scopes.some((scope2) => name.startsWith(`${scope2}/`));
14184
14186
  const roots = [];
@@ -14196,6 +14198,9 @@ var prefetchResolve = (graph, packageInfo, options) => {
14196
14198
  for (const [name, spec2] of Object.entries(deps)) {
14197
14199
  if (typeof spec2 !== "string") continue;
14198
14200
  if (spec2.includes(":") || scoped(name)) continue;
14201
+ const edge = importer.edgesOut.get(name);
14202
+ if (edge?.to && edge.spec.bareSpec === spec2 && edge.valid())
14203
+ continue;
14199
14204
  const key = `${name}@${spec2}`;
14200
14205
  if (seen.has(key)) continue;
14201
14206
  seen.add(key);
@@ -14203,14 +14208,14 @@ var prefetchResolve = (graph, packageInfo, options) => {
14203
14208
  }
14204
14209
  }
14205
14210
  }
14206
- if (!roots.length) return 0;
14211
+ if (!roots.length) return nothing;
14207
14212
  const have = [];
14208
14213
  for (const node of graph.nodes.values()) {
14209
14214
  if (node.manifest && node.name && node.version && !scoped(node.name)) {
14210
14215
  have.push(`${node.name}@${node.version}`);
14211
14216
  }
14212
14217
  }
14213
- packageInfo.prefetchResolve(registry2, {
14218
+ return packageInfo.prefetchResolve(registry2, {
14214
14219
  roots,
14215
14220
  have,
14216
14221
  ...scopes.length ? { stop: { scopes } } : {},
@@ -14222,7 +14227,6 @@ var prefetchResolve = (graph, packageInfo, options) => {
14222
14227
  libc: detectLibc()
14223
14228
  }
14224
14229
  });
14225
- return roots.length;
14226
14230
  };
14227
14231
 
14228
14232
  // ../../src/graph/src/ideal/build.ts
@@ -14261,16 +14265,21 @@ var build3 = async (options) => {
14261
14265
  monorepo
14262
14266
  });
14263
14267
  }
14264
- prefetchResolve(graph, packageInfo, options);
14265
- const res = await buildIdealFromStartingGraph({
14266
- ...options,
14267
- scurry,
14268
- add: getMap2(options.add),
14269
- graph,
14270
- packageInfo,
14271
- remove: getMap2(options.remove),
14272
- actual: options.actual
14273
- });
14268
+ const releaseResolve = prefetchResolve(graph, packageInfo, options);
14269
+ let res;
14270
+ try {
14271
+ res = await buildIdealFromStartingGraph({
14272
+ ...options,
14273
+ scurry,
14274
+ add: getMap2(options.add),
14275
+ graph,
14276
+ packageInfo,
14277
+ remove: getMap2(options.remove),
14278
+ actual: options.actual
14279
+ });
14280
+ } finally {
14281
+ releaseResolve();
14282
+ }
14274
14283
  done();
14275
14284
  if (options.add) {
14276
14285
  for (const [addKey2, value] of options.add.entries()) {
@@ -13,10 +13,10 @@ import {
13
13
  actual,
14
14
  callLimit,
15
15
  createVirtualRoot
16
- } from "./chunk-QGFDMXDH.js";
16
+ } from "./chunk-WGSYVB4F.js";
17
17
  import {
18
18
  SecurityArchive
19
- } from "./chunk-MVD5AUNS.js";
19
+ } from "./chunk-2XD7RUKI.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-EV5S74AA.js");
143
+ const { Config } = await import("./config-6VRNS5F3.js");
144
144
  return Config.load(folder, process.argv, true);
145
145
  };
146
146
 
@@ -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
  install
14
- } from "./chunk-QGFDMXDH.js";
15
- import "./chunk-MVD5AUNS.js";
14
+ } from "./chunk-WGSYVB4F.js";
15
+ import "./chunk-2XD7RUKI.js";
16
16
  import {
17
17
  commandUsage
18
18
  } from "./chunk-LHIDMYN2.js";
19
- import "./chunk-INEKXXUQ.js";
19
+ import "./chunk-GDYDW277.js";
20
20
  import {
21
21
  lazyView
22
22
  } from "./chunk-4KCU2KZL.js";
@@ -24,7 +24,7 @@ import "./chunk-JIQBZ2UT.js";
24
24
  import "./chunk-64VFL4WI.js";
25
25
  import "./chunk-XU5WNX4S.js";
26
26
  import "./chunk-HTOTG4TS.js";
27
- import "./chunk-WXRS5PRL.js";
27
+ import "./chunk-TY2UJ3SA.js";
28
28
  import "./chunk-U7TEQCBN.js";
29
29
  import "./chunk-XNLSTHDK.js";
30
30
  import "./chunk-PDWPFR5T.js";
@@ -63,7 +63,7 @@ var usage = () => commandUsage({
63
63
  var views = {
64
64
  json: (i) => i.graph.toJSON(),
65
65
  human: lazyView(
66
- async () => (await import("./reporter-UUDMEN4E.js")).InstallReporter
66
+ async () => (await import("./reporter-5QKWEQNH.js")).InstallReporter
67
67
  )
68
68
  };
69
69
  var command = async (conf) => {
package/cli-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vltpkg/cli-sdk",
3
3
  "description": "The source for the vlt CLI",
4
- "version": "1.3.4",
4
+ "version": "1.3.6",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/vltpkg/vltpkg.git",
@@ -19,13 +19,13 @@ import {
19
19
  import {
20
20
  pairsToRecords,
21
21
  recordsToPairs
22
- } from "./chunk-B5AKQ5TS.js";
23
- import "./chunk-TL5SYXSC.js";
22
+ } from "./chunk-2XDF3JBH.js";
23
+ import "./chunk-VI7V6OCC.js";
24
24
  import "./chunk-SRWDPPLX.js";
25
25
  import {
26
26
  commandUsage
27
27
  } from "./chunk-LHIDMYN2.js";
28
- import "./chunk-INEKXXUQ.js";
28
+ import "./chunk-GDYDW277.js";
29
29
  import "./chunk-JIQBZ2UT.js";
30
30
  import "./chunk-64VFL4WI.js";
31
31
  import {
@@ -16,10 +16,10 @@ import {
16
16
  kCustomInspect,
17
17
  pairsToRecords,
18
18
  recordsToPairs
19
- } from "./chunk-B5AKQ5TS.js";
20
- import "./chunk-TL5SYXSC.js";
19
+ } from "./chunk-2XDF3JBH.js";
20
+ import "./chunk-VI7V6OCC.js";
21
21
  import "./chunk-SRWDPPLX.js";
22
- import "./chunk-INEKXXUQ.js";
22
+ import "./chunk-GDYDW277.js";
23
23
  import "./chunk-JIQBZ2UT.js";
24
24
  import "./chunk-64VFL4WI.js";
25
25
  import {
@@ -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
  vlxResolve
14
- } from "./chunk-QZIC3WVP.js";
14
+ } from "./chunk-IXAHSTBN.js";
15
15
  import {
16
16
  ExecCommand,
17
17
  views
18
- } from "./chunk-QEWKCTQY.js";
18
+ } from "./chunk-HD6TAM7A.js";
19
19
  import "./chunk-RIYFGX27.js";
20
- import "./chunk-BFR3XHEM.js";
20
+ import "./chunk-WS7BNE5S.js";
21
21
  import {
22
22
  styleTextStdout
23
23
  } from "./chunk-TOKUDCSW.js";
@@ -25,26 +25,26 @@ import "./chunk-BCANUHR3.js";
25
25
  import "./chunk-G2YT2GWF.js";
26
26
  import "./chunk-CRGWLUGC.js";
27
27
  import "./chunk-VTEFO2FT.js";
28
- import "./chunk-TL5SYXSC.js";
28
+ import "./chunk-VI7V6OCC.js";
29
29
  import "./chunk-SRWDPPLX.js";
30
30
  import "./chunk-WGDTG44V.js";
31
31
  import "./chunk-J4NHRZX6.js";
32
32
  import {
33
33
  exec,
34
34
  execFG
35
- } from "./chunk-QGFDMXDH.js";
36
- import "./chunk-MVD5AUNS.js";
35
+ } from "./chunk-WGSYVB4F.js";
36
+ import "./chunk-2XD7RUKI.js";
37
37
  import {
38
38
  commandUsage
39
39
  } from "./chunk-LHIDMYN2.js";
40
- import "./chunk-INEKXXUQ.js";
40
+ import "./chunk-GDYDW277.js";
41
41
  import "./chunk-4KCU2KZL.js";
42
42
  import "./chunk-JIQBZ2UT.js";
43
43
  import "./chunk-64VFL4WI.js";
44
44
  import "./chunk-XU5WNX4S.js";
45
45
  import "./chunk-HTOTG4TS.js";
46
46
  import "./chunk-PBBULTAG.js";
47
- import "./chunk-WXRS5PRL.js";
47
+ import "./chunk-TY2UJ3SA.js";
48
48
  import "./chunk-U7TEQCBN.js";
49
49
  import "./chunk-XNLSTHDK.js";
50
50
  import "./chunk-PDWPFR5T.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
  PackageInfoClient
14
- } from "./chunk-TL5SYXSC.js";
14
+ } from "./chunk-VI7V6OCC.js";
15
15
  import "./chunk-SRWDPPLX.js";
16
16
  import {
17
17
  resolveRegistry
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  commandUsage
21
21
  } from "./chunk-LHIDMYN2.js";
22
- import "./chunk-INEKXXUQ.js";
22
+ import "./chunk-GDYDW277.js";
23
23
  import "./chunk-JIQBZ2UT.js";
24
24
  import {
25
25
  Spec
@@ -28,13 +28,13 @@ import "./chunk-XU5WNX4S.js";
28
28
  import "./chunk-HTOTG4TS.js";
29
29
  import {
30
30
  RegistryClient
31
- } from "./chunk-GCLZEI3R.js";
31
+ } from "./chunk-F6ZN6TTL.js";
32
32
  import "./chunk-APMYKJI2.js";
33
33
  import {
34
34
  assertOk,
35
35
  requestError
36
36
  } from "./chunk-PBBULTAG.js";
37
- import "./chunk-WXRS5PRL.js";
37
+ import "./chunk-TY2UJ3SA.js";
38
38
  import "./chunk-U7TEQCBN.js";
39
39
  import "./chunk-XNLSTHDK.js";
40
40
  import "./chunk-PDWPFR5T.js";
@@ -21,12 +21,12 @@ import {
21
21
  import "./chunk-XU5WNX4S.js";
22
22
  import {
23
23
  RegistryClient
24
- } from "./chunk-GCLZEI3R.js";
24
+ } from "./chunk-F6ZN6TTL.js";
25
25
  import "./chunk-APMYKJI2.js";
26
26
  import {
27
27
  assertOk
28
28
  } from "./chunk-PBBULTAG.js";
29
- import "./chunk-WXRS5PRL.js";
29
+ import "./chunk-TY2UJ3SA.js";
30
30
  import "./chunk-U7TEQCBN.js";
31
31
  import "./chunk-XNLSTHDK.js";
32
32
  import "./chunk-PDWPFR5T.js";