@vltpkg/cli-js 1.3.4 → 1.3.5
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.
- package/{access-AY2CIGVN.js → access-X2ZZH2BV.js} +2 -2
- package/{bugs-6PTC6V7S.js → bugs-SF56YATZ.js} +5 -5
- package/{build-R6OJNJDU.js → build-RRJ645SV.js} +3 -3
- package/{cache-NVLCCVWQ.js → cache-NETXHYQU.js} +2 -2
- package/{chunk-GCLZEI3R.js → chunk-2B5STVCP.js} +1 -1
- package/{chunk-B5AKQ5TS.js → chunk-35OBZITS.js} +1 -1
- package/{chunk-CYN4ADWK.js → chunk-75F2WCA5.js} +1 -1
- package/{chunk-TL5SYXSC.js → chunk-7DHDJ5XY.js} +154 -81
- package/{chunk-WXRS5PRL.js → chunk-ADDCQBGR.js} +1 -1
- package/{chunk-BFR3XHEM.js → chunk-B2CTWVQM.js} +3 -3
- package/{chunk-DK6HGJCF.js → chunk-EGWLQVDZ.js} +2 -2
- package/chunk-EWZQGHYC.js +75 -0
- package/{chunk-MWAWPY3P.js → chunk-GO5X2SSV.js} +1 -1
- package/{chunk-QEWKCTQY.js → chunk-I2DZC2J3.js} +2 -2
- package/{chunk-D4KNFORN.js → chunk-LHB4CVEH.js} +1 -1
- package/{chunk-QZIC3WVP.js → chunk-PBHCZOUY.js} +2 -2
- package/{chunk-4XTUCYBW.js → chunk-QJHTK7ML.js} +1 -1
- package/{chunk-MVD5AUNS.js → chunk-XUGOPOLF.js} +1 -1
- package/{chunk-QGFDMXDH.js → chunk-ZZFFMXI2.js} +26 -17
- package/{ci-FEZ6B33S.js → ci-YX56QIMV.js} +4 -4
- package/cli-package.json +1 -1
- package/{config-EV5S74AA.js → config-HO7N7FPS.js} +2 -2
- package/{config-VVPVV36W.js → config-SHRCBOCI.js} +2 -2
- package/{create-VGCARZLU.js → create-LO6BUYPU.js} +7 -7
- package/{deprecate-3E27QREJ.js → deprecate-CUMWWMAF.js} +3 -3
- package/{dist-tag-ZIDIGEIM.js → dist-tag-DJJDBPTJ.js} +2 -2
- package/{docs-GESU73FF.js → docs-KDCDJRO5.js} +5 -5
- package/{exec-3SE4PRXY.js → exec-KF4ANRPM.js} +7 -7
- package/{exec-cache-7QOIKCYP.js → exec-cache-GBLLYU5O.js} +5 -5
- package/{exec-local-EVAI6IYM.js → exec-local-VCP4KR6K.js} +5 -5
- package/{help-H54DUW2F.js → help-MV53HEUI.js} +1 -1
- package/{init-JOAMKEKV.js → init-N3BM2FKC.js} +4 -4
- package/{install-WHOVSLKH.js → install-DDYIRJWL.js} +8 -8
- package/{list-7X2RIDA4.js → list-VTCG6GBS.js} +6 -6
- package/{login-P5NRTQDS.js → login-MCX6LCP5.js} +4 -4
- package/{logout-5PCTGCJZ.js → logout-FPNGIQDZ.js} +2 -2
- package/{pack-MLOVKXJZ.js → pack-KCVLNNVZ.js} +4 -4
- package/package.json +1 -1
- package/{ping-6D6EEICV.js → ping-MXTB7GFE.js} +2 -2
- package/{pkg-HC6N3DDH.js → pkg-QDEHGO34.js} +5 -5
- package/{profile-C3MNVMAE.js → profile-GQUM6NRG.js} +2 -2
- package/{publish-3KUMQXKT.js → publish-UEL4KXDZ.js} +5 -5
- package/{query-HNBW2ZGX.js → query-MJTEJIZW.js} +6 -6
- package/registry-client-src-revalidate.js +1 -1
- package/{repo-VWEPCUXK.js → repo-XDMXV744.js} +5 -5
- package/{reporter-UUDMEN4E.js → reporter-K3D4AJBF.js} +3 -3
- package/{run-OFW4MPAV.js → run-MKEP7YKW.js} +5 -5
- package/{run-exec-ACGX23HX.js → run-exec-Q7JNLVVV.js} +5 -5
- package/security-archive-src-update-expired.js +1 -1
- package/{setup-5C56O3S3.js → setup-DYQY6DIX.js} +4 -4
- package/{src-SI5YMOJI.js → src-BZJHOEYT.js} +3 -3
- package/{src-LH2HZ6FT.js → src-ODLA6WPY.js} +2 -2
- package/{token-RPQP6BV5.js → token-RUBMQURU.js} +2 -2
- package/{uninstall-HDUNLNAD.js → uninstall-3NJXWOKS.js} +5 -5
- package/{unpublish-SB647KPY.js → unpublish-3ETADFWK.js} +2 -2
- package/{update-PAIZPQPH.js → update-L6ETRX6Q.js} +7 -7
- package/{version-5O2P2ROI.js → version-RHWAFXPK.js} +4 -4
- package/{view-3YVL4M7Z.js → view-ABHAULFH.js} +3 -3
- package/vlr.js +1 -1
- package/vlrx.js +1 -1
- package/vlt.js +1 -1
- package/vlx.js +1 -1
- package/vlxl.js +1 -1
- package/{whoami-KFXNKZOX.js → whoami-YDR7Q4VT.js} +2 -2
- package/chunk-DM2XRLCS.js +0 -75
|
@@ -19,12 +19,12 @@ import "./chunk-64VFL4WI.js";
|
|
|
19
19
|
import "./chunk-XU5WNX4S.js";
|
|
20
20
|
import {
|
|
21
21
|
RegistryClient
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2B5STVCP.js";
|
|
23
23
|
import "./chunk-APMYKJI2.js";
|
|
24
24
|
import {
|
|
25
25
|
assertOk
|
|
26
26
|
} from "./chunk-PBBULTAG.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-ADDCQBGR.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-AFUXQ3P4.js";
|
|
18
18
|
import {
|
|
19
19
|
createHostContextsMap
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-B2CTWVQM.js";
|
|
21
21
|
import "./chunk-TOKUDCSW.js";
|
|
22
22
|
import "./chunk-BCANUHR3.js";
|
|
23
23
|
import "./chunk-G2YT2GWF.js";
|
|
24
24
|
import "./chunk-CRGWLUGC.js";
|
|
25
25
|
import {
|
|
26
26
|
PackageInfoClient
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7DHDJ5XY.js";
|
|
28
28
|
import "./chunk-SRWDPPLX.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-
|
|
34
|
+
} from "./chunk-ZZFFMXI2.js";
|
|
35
35
|
import {
|
|
36
36
|
SecurityArchive
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XUGOPOLF.js";
|
|
38
38
|
import {
|
|
39
39
|
commandUsage
|
|
40
40
|
} from "./chunk-LHIDMYN2.js";
|
|
@@ -48,7 +48,7 @@ import "./chunk-XU5WNX4S.js";
|
|
|
48
48
|
import "./chunk-HTOTG4TS.js";
|
|
49
49
|
import "./chunk-APMYKJI2.js";
|
|
50
50
|
import "./chunk-PBBULTAG.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-ADDCQBGR.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-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-ZZFFMXI2.js";
|
|
15
|
+
import "./chunk-XUGOPOLF.js";
|
|
16
16
|
import {
|
|
17
17
|
commandUsage
|
|
18
18
|
} from "./chunk-LHIDMYN2.js";
|
|
@@ -21,7 +21,7 @@ import "./chunk-JIQBZ2UT.js";
|
|
|
21
21
|
import "./chunk-64VFL4WI.js";
|
|
22
22
|
import "./chunk-XU5WNX4S.js";
|
|
23
23
|
import "./chunk-HTOTG4TS.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-ADDCQBGR.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-XU5WNX4S.js";
|
|
35
35
|
import {
|
|
36
36
|
CacheEntry
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-2B5STVCP.js";
|
|
38
38
|
import "./chunk-APMYKJI2.js";
|
|
39
39
|
import {
|
|
40
40
|
assertOk
|
|
41
41
|
} from "./chunk-PBBULTAG.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-ADDCQBGR.js";
|
|
43
43
|
import "./chunk-U7TEQCBN.js";
|
|
44
44
|
import "./chunk-XNLSTHDK.js";
|
|
45
45
|
import {
|
|
@@ -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-
|
|
14
|
+
} from "./chunk-7DHDJ5XY.js";
|
|
15
15
|
import {
|
|
16
16
|
Monorepo,
|
|
17
17
|
PackageJson,
|
|
@@ -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 :
|
|
207
|
+
return Number.isFinite(configured) && configured >= 0 ? configured : 250;
|
|
207
208
|
};
|
|
208
|
-
var
|
|
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
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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-
|
|
304
|
+
this.#registryClientPromise ??= import("./src-ODLA6WPY.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-
|
|
563
|
+
const { CacheEntry: Entry, cacheKey } = await import("./src-ODLA6WPY.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
|
-
|
|
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
|
|
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
|
-
|
|
908
|
-
|
|
909
|
-
|
|
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
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
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}@${
|
|
981
|
+
`${registry}${record.name}@${record.version}`,
|
|
929
982
|
record.manifest
|
|
930
983
|
);
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
|
|
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
|
|
952
|
-
*
|
|
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
|
|
956
|
-
* come in the order the build
|
|
957
|
-
*
|
|
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
|
|
1025
|
+
const quietFor = Date.now() - inflight.lastRecordAt;
|
|
1026
|
+
const grace = Math.max(0, resolveWaitMs() - quietFor);
|
|
973
1027
|
try {
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
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
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
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
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
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
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
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
|
|
1124
|
+
return fromPackument();
|
|
1052
1125
|
}
|
|
1053
1126
|
case "git": {
|
|
1054
1127
|
const {
|
|
@@ -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.
|
|
17
|
+
version: "1.3.5",
|
|
18
18
|
repository: {
|
|
19
19
|
type: "git",
|
|
20
20
|
url: "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
actual,
|
|
14
14
|
callLimit,
|
|
15
15
|
createVirtualRoot
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZZFFMXI2.js";
|
|
17
17
|
import {
|
|
18
18
|
SecurityArchive
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XUGOPOLF.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-
|
|
143
|
+
const { Config } = await import("./config-HO7N7FPS.js");
|
|
144
144
|
return Config.load(folder, process.argv, true);
|
|
145
145
|
};
|
|
146
146
|
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
} from "./chunk-TOKUDCSW.js";
|
|
18
18
|
import {
|
|
19
19
|
mermaidOutput
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZZFFMXI2.js";
|
|
21
21
|
import {
|
|
22
22
|
ViewClass
|
|
23
23
|
} from "./chunk-4KCU2KZL.js";
|
|
24
24
|
import {
|
|
25
25
|
getTokenByURL
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2B5STVCP.js";
|
|
27
27
|
|
|
28
28
|
// ../../src/cli-sdk/src/query-auth.ts
|
|
29
29
|
var createGetAuthHeader = (conf) => async (url) => getTokenByURL(url, conf.options.identity);
|
|
@@ -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-X2ZZH2BV.js"),
|
|
22
|
+
"./commands/bugs.ts": () => import("./bugs-SF56YATZ.js"),
|
|
23
|
+
"./commands/build.ts": () => import("./build-RRJ645SV.js"),
|
|
24
|
+
"./commands/cache.ts": () => import("./cache-NETXHYQU.js"),
|
|
25
|
+
"./commands/ci.ts": () => import("./ci-YX56QIMV.js"),
|
|
26
|
+
"./commands/config.ts": () => import("./config-SHRCBOCI.js"),
|
|
27
|
+
"./commands/create.ts": () => import("./create-LO6BUYPU.js"),
|
|
28
|
+
"./commands/deprecate.ts": () => import("./deprecate-CUMWWMAF.js"),
|
|
29
|
+
"./commands/dist-tag.ts": () => import("./dist-tag-DJJDBPTJ.js"),
|
|
30
|
+
"./commands/docs.ts": () => import("./docs-KDCDJRO5.js"),
|
|
31
|
+
"./commands/exec-cache.ts": () => import("./exec-cache-GBLLYU5O.js"),
|
|
32
|
+
"./commands/exec-local.ts": () => import("./exec-local-VCP4KR6K.js"),
|
|
33
|
+
"./commands/exec.ts": () => import("./exec-KF4ANRPM.js"),
|
|
34
|
+
"./commands/help.ts": () => import("./help-MV53HEUI.js"),
|
|
35
|
+
"./commands/init.ts": () => import("./init-N3BM2FKC.js"),
|
|
36
|
+
"./commands/install.ts": () => import("./install-DDYIRJWL.js"),
|
|
37
|
+
"./commands/install/reporter.ts": () => import("./reporter-K3D4AJBF.js"),
|
|
38
|
+
"./commands/list.ts": () => import("./list-VTCG6GBS.js"),
|
|
39
|
+
"./commands/login.ts": () => import("./login-MCX6LCP5.js"),
|
|
40
|
+
"./commands/logout.ts": () => import("./logout-FPNGIQDZ.js"),
|
|
41
|
+
"./commands/pack.ts": () => import("./pack-KCVLNNVZ.js"),
|
|
42
|
+
"./commands/ping.ts": () => import("./ping-MXTB7GFE.js"),
|
|
43
|
+
"./commands/pkg.ts": () => import("./pkg-QDEHGO34.js"),
|
|
44
|
+
"./commands/profile.ts": () => import("./profile-GQUM6NRG.js"),
|
|
45
|
+
"./commands/publish.ts": () => import("./publish-UEL4KXDZ.js"),
|
|
46
|
+
"./commands/query.ts": () => import("./query-MJTEJIZW.js"),
|
|
47
|
+
"./commands/registry.ts": () => import("./registry-PY2L5ZWC.js"),
|
|
48
|
+
"./commands/repo.ts": () => import("./repo-XDMXV744.js"),
|
|
49
|
+
"./commands/run-exec.ts": () => import("./run-exec-Q7JNLVVV.js"),
|
|
50
|
+
"./commands/run.ts": () => import("./run-MKEP7YKW.js"),
|
|
51
|
+
"./commands/setup.ts": () => import("./setup-DYQY6DIX.js"),
|
|
52
|
+
"./commands/token.ts": () => import("./token-RUBMQURU.js"),
|
|
53
|
+
"./commands/uninstall.ts": () => import("./uninstall-3NJXWOKS.js"),
|
|
54
|
+
"./commands/unpublish.ts": () => import("./unpublish-3ETADFWK.js"),
|
|
55
|
+
"./commands/update.ts": () => import("./update-L6ETRX6Q.js"),
|
|
56
|
+
"./commands/version.ts": () => import("./version-RHWAFXPK.js"),
|
|
57
|
+
"./commands/view.ts": () => import("./view-ABHAULFH.js"),
|
|
58
|
+
"./commands/whoami.ts": () => import("./whoami-YDR7Q4VT.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
|
+
};
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-RIYFGX27.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-B2CTWVQM.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-
|
|
30
|
+
} from "./chunk-ZZFFMXI2.js";
|
|
31
31
|
import {
|
|
32
32
|
Monorepo
|
|
33
33
|
} from "./chunk-INEKXXUQ.js";
|
|
@@ -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-
|
|
14
|
+
} from "./chunk-7DHDJ5XY.js";
|
|
15
15
|
import {
|
|
16
16
|
findCmdShimIfExists,
|
|
17
17
|
install
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZZFFMXI2.js";
|
|
19
19
|
import {
|
|
20
20
|
PathScurry
|
|
21
21
|
} from "./chunk-INEKXXUQ.js";
|