@vltpkg/cli-js 1.3.7 → 1.4.0
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-4W6PMOGC.js → access-422UGEWN.js} +8 -8
- package/{bugs-FJHQFPZF.js → bugs-RED7Y33Q.js} +17 -17
- package/{build-SPWU3NOH.js → build-IHMPBWRO.js} +9 -9
- package/{cache-SBNEPOMQ.js → cache-FJP2RZJX.js} +31 -19
- package/cache-unzip-src-unzip.js +21 -1
- package/{chunk-SPWJ3X5Y.js → chunk-2AMOC4DN.js} +4 -4
- package/{chunk-QYS5MGGM.js → chunk-4UCADW6S.js} +86 -10
- package/{chunk-GZ5MYMBT.js → chunk-5IJTPZXP.js} +1 -1
- package/{chunk-L3K2ZAOO.js → chunk-5RHABCYI.js} +76 -11
- package/{chunk-OWUICQFY.js → chunk-5TNXLRW2.js} +33 -20
- package/{chunk-IHXJVKAE.js → chunk-5Y4SYLJ2.js} +2 -1
- package/chunk-6IF3RJND.js +81 -0
- package/{chunk-3U6QWN62.js → chunk-7T3XAYP4.js} +1 -1
- package/{chunk-FKZ5I53D.js → chunk-ASLX43R3.js} +3 -3
- package/{chunk-5ZCDGBVU.js → chunk-C23TDXRG.js} +1 -1
- package/{chunk-H77JYU7F.js → chunk-DNRR3XMG.js} +12 -3
- package/{chunk-IBGFQR23.js → chunk-FLH4YC6W.js} +21 -0
- package/{chunk-XDSZO74H.js → chunk-FZUYGJZU.js} +7 -7
- package/{chunk-W2ZO5RZL.js → chunk-GIIAODRI.js} +4 -4
- package/{chunk-F5D3DVC5.js → chunk-HZXJ423P.js} +7 -3
- package/{chunk-CB65DPZ2.js → chunk-I7UMHYZX.js} +151 -27
- package/{chunk-2M2O6A4R.js → chunk-ISE4IRHF.js} +4 -4
- package/{chunk-TLY4VGMH.js → chunk-LHPEBLOU.js} +1 -1
- package/{chunk-EL4GVZK5.js → chunk-MKWPTN3C.js} +2 -2
- package/{chunk-QVPNKMUU.js → chunk-OAJ3PO3Z.js} +115 -19
- package/{chunk-7BHHCB5C.js → chunk-OVPHE4O7.js} +348 -24
- package/{chunk-KOFQTETH.js → chunk-PHJJPY5G.js} +3 -3
- package/{chunk-SV4WK3KX.js → chunk-PLG3OYCX.js} +2 -2
- package/{chunk-KMOOTBHM.js → chunk-QCSUWACA.js} +1 -1
- package/{chunk-6D54UN4T.js → chunk-SR2VOY5J.js} +1 -1
- package/chunk-T6FBP4OU.js +76 -0
- package/{chunk-A2TSRXZD.js → chunk-THSYN5EK.js} +1 -1
- package/{chunk-3D3IB4YN.js → chunk-TO23PR7J.js} +61 -27
- package/{chunk-OWMR2EDW.js → chunk-TPRK6IDA.js} +1 -1
- package/chunk-UGCKF5ZE.js +57 -0
- package/{chunk-SE2FSMBR.js → chunk-WF6KLKRN.js} +26 -10
- package/{chunk-I7SCSGUO.js → chunk-X4FVR4R5.js} +23 -18
- package/{chunk-VBDNOU76.js → chunk-ZJMJ7MCT.js} +1 -1
- package/{ci-76TAJGF5.js → ci-YSKNNO5M.js} +10 -10
- package/cli-package.json +1 -1
- package/{config-3UQXAYAA.js → config-CSPCDMR3.js} +9 -8
- package/{config-AFIHF54I.js → config-HO7GY3QT.js} +11 -10
- package/{create-5ADQTH6K.js → create-2TJT3AHJ.js} +19 -18
- package/{deprecate-RTQVLJDZ.js → deprecate-7FRJI2RL.js} +11 -11
- package/{dist-tag-V4DRDHWA.js → dist-tag-WCFF5OEG.js} +8 -8
- package/{docs-RRULRTKQ.js → docs-JMBPTU23.js} +17 -17
- package/{exec-NXQUCX3I.js → exec-FBOUKZZ2.js} +27 -18
- package/{exec-cache-KVZJHFZD.js → exec-cache-X3ZWM5S3.js} +16 -16
- package/{exec-local-53B5IRKG.js → exec-local-Y3KQC22N.js} +16 -15
- package/{help-EN4XUTMS.js → help-PUKVH5X7.js} +4 -4
- package/{init-4L6CQMIL.js → init-GOKAQXXZ.js} +10 -10
- package/{install-MHWLYW3X.js → install-XFN4UFOC.js} +116 -16
- package/{list-XZRF7TBW.js → list-43JFFG5D.js} +19 -19
- package/{login-6GRRY4H7.js → login-RSTZKNKN.js} +13 -12
- package/{logout-KI2AOYRT.js → logout-4576FFXZ.js} +8 -8
- package/{outdated-TWUPFRCD.js → outdated-ACQ5A2Y7.js} +31 -29
- package/{pack-2ZQLDYFD.js → pack-QQVJ3G25.js} +15 -12
- package/package.json +1 -1
- package/{ping-ZOTGLOKY.js → ping-QCDQQRO5.js} +8 -8
- package/{pkg-HRNOTFXB.js → pkg-CSOJV7UC.js} +17 -12
- package/{profile-5V3FFDMG.js → profile-VL4HPW3N.js} +8 -8
- package/{publish-7ZXEMWTW.js → publish-2YBO6ZXE.js} +23 -18
- package/{query-62UDNMGR.js → query-IHHFMJRT.js} +19 -19
- package/{registry-MQJJCWJY.js → registry-W7BRZZZ2.js} +5 -5
- package/registry-client-src-revalidate.js +132 -17
- package/{repo-HDUGP5PH.js → repo-L3BXAAWS.js} +17 -17
- package/{reporter-TGBPLNR5.js → reporter-5NYOHBO7.js} +11 -10
- package/{run-6NRDZD4T.js → run-AMUUVLTI.js} +16 -15
- package/{run-exec-I4IIXTLW.js → run-exec-5W3XWQZA.js} +16 -15
- package/security-archive-src-update-expired.js +46 -12
- package/{setup-UVXEFUUJ.js → setup-TFM4GJF7.js} +16 -15
- package/{src-QEJ6WZQ7.js → src-4CYCUWZL.js} +29 -24
- package/{src-6CJEMSVB.js → src-I3GMULFP.js} +6 -4
- package/{src-GP7VLT7P.js → src-LUTN2ODD.js} +58 -9
- package/{token-WTN27E7A.js → token-OANOBE3G.js} +8 -8
- package/{uninstall-ZJOKXIVQ.js → uninstall-YXTQ4AIZ.js} +12 -12
- package/{unpublish-LMUGR7GI.js → unpublish-SZXYMYIU.js} +8 -8
- package/{update-WVWMRUYY.js → update-FHLMWGIM.js} +26 -16
- package/{version-OJTRHNKV.js → version-ZWFCTU5V.js} +16 -11
- package/{view-6Q5B7ZYN.js → view-NFNJXMLV.js} +73 -25
- 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-SPF34TV6.js → whoami-O7GOSGCI.js} +8 -8
- package/chunk-A6FAI65V.js +0 -76
|
@@ -11,57 +11,60 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
packTarball
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MKWPTN3C.js";
|
|
15
|
+
import {
|
|
16
|
+
sortScopeLocations
|
|
17
|
+
} from "./chunk-UGCKF5ZE.js";
|
|
15
18
|
import {
|
|
16
19
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ASLX43R3.js";
|
|
18
21
|
import {
|
|
19
22
|
prettyBytes
|
|
20
23
|
} from "./chunk-XA47WS4N.js";
|
|
21
24
|
import {
|
|
22
25
|
stderr
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-FZUYGJZU.js";
|
|
27
|
+
import "./chunk-QCSUWACA.js";
|
|
25
28
|
import "./chunk-G2YT2GWF.js";
|
|
26
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-5Y4SYLJ2.js";
|
|
27
30
|
import "./chunk-SRWDPPLX.js";
|
|
28
31
|
import "./chunk-WGDTG44V.js";
|
|
29
32
|
import {
|
|
30
33
|
resolveRegistry
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-THSYN5EK.js";
|
|
32
35
|
import {
|
|
33
36
|
Query,
|
|
34
37
|
actual,
|
|
35
38
|
run
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
39
|
+
} from "./chunk-OVPHE4O7.js";
|
|
40
|
+
import "./chunk-5TNXLRW2.js";
|
|
38
41
|
import {
|
|
39
42
|
commandUsage
|
|
40
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-LHPEBLOU.js";
|
|
41
44
|
import {
|
|
42
45
|
minimatch
|
|
43
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-I7UMHYZX.js";
|
|
44
47
|
import "./chunk-4KCU2KZL.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-PLG3OYCX.js";
|
|
49
|
+
import "./chunk-5IJTPZXP.js";
|
|
50
|
+
import "./chunk-WF6KLKRN.js";
|
|
48
51
|
import "./chunk-HTOTG4TS.js";
|
|
49
52
|
import {
|
|
50
53
|
RegistryClient,
|
|
51
54
|
oidc,
|
|
52
55
|
registryBase
|
|
53
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-OAJ3PO3Z.js";
|
|
54
57
|
import "./chunk-APMYKJI2.js";
|
|
55
58
|
import {
|
|
56
59
|
assertOk,
|
|
57
60
|
requestError
|
|
58
|
-
} from "./chunk-
|
|
59
|
-
import "./chunk-
|
|
61
|
+
} from "./chunk-SR2VOY5J.js";
|
|
62
|
+
import "./chunk-ZJMJ7MCT.js";
|
|
60
63
|
import "./chunk-U7TEQCBN.js";
|
|
61
64
|
import "./chunk-XNLSTHDK.js";
|
|
62
65
|
import "./chunk-PDWPFR5T.js";
|
|
63
66
|
import "./chunk-Y5PA7DVK.js";
|
|
64
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-FLH4YC6W.js";
|
|
65
68
|
import {
|
|
66
69
|
error
|
|
67
70
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -168,6 +171,7 @@ var command = async (conf) => {
|
|
|
168
171
|
const { nodes } = await query.search(queryString, {
|
|
169
172
|
signal: new AbortController().signal
|
|
170
173
|
});
|
|
174
|
+
const found = [];
|
|
171
175
|
for (const node of nodes) {
|
|
172
176
|
const { location } = node.toJSON();
|
|
173
177
|
assert(
|
|
@@ -176,8 +180,9 @@ var command = async (conf) => {
|
|
|
176
180
|
found: node
|
|
177
181
|
})
|
|
178
182
|
);
|
|
179
|
-
|
|
183
|
+
found.push(resolve(projectRoot, location));
|
|
180
184
|
}
|
|
185
|
+
locations.push(...sortScopeLocations(found, options.monorepo));
|
|
181
186
|
} else if (paths?.length || groups?.length || recursive) {
|
|
182
187
|
for (const workspace of options.monorepo ?? []) {
|
|
183
188
|
if (paths?.length) {
|
|
@@ -11,26 +11,26 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
MermaidImageView
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PHJJPY5G.js";
|
|
15
15
|
import {
|
|
16
16
|
createGetAuthHeader
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HZXJ423P.js";
|
|
18
18
|
import {
|
|
19
19
|
createDiffFilesProvider
|
|
20
20
|
} from "./chunk-RIYFGX27.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-TPRK6IDA.js";
|
|
22
22
|
import {
|
|
23
23
|
assertVltInstalled,
|
|
24
24
|
createHostContextsMap
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ASLX43R3.js";
|
|
26
26
|
import {
|
|
27
27
|
stdout
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-FZUYGJZU.js";
|
|
29
|
+
import "./chunk-QCSUWACA.js";
|
|
30
30
|
import "./chunk-G2YT2GWF.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-5Y4SYLJ2.js";
|
|
32
32
|
import "./chunk-WGDTG44V.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-THSYN5EK.js";
|
|
34
34
|
import {
|
|
35
35
|
GraphModifier,
|
|
36
36
|
Query,
|
|
@@ -39,28 +39,28 @@ import {
|
|
|
39
39
|
humanReadableOutput,
|
|
40
40
|
jsonOutput,
|
|
41
41
|
mermaidOutput
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-OVPHE4O7.js";
|
|
43
43
|
import {
|
|
44
44
|
SecurityArchive
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-5TNXLRW2.js";
|
|
46
46
|
import {
|
|
47
47
|
commandUsage
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-LHPEBLOU.js";
|
|
49
|
+
import "./chunk-I7UMHYZX.js";
|
|
50
50
|
import "./chunk-4KCU2KZL.js";
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-PLG3OYCX.js";
|
|
52
|
+
import "./chunk-5IJTPZXP.js";
|
|
53
|
+
import "./chunk-WF6KLKRN.js";
|
|
54
54
|
import "./chunk-HTOTG4TS.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-OAJ3PO3Z.js";
|
|
56
56
|
import "./chunk-APMYKJI2.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-SR2VOY5J.js";
|
|
58
|
+
import "./chunk-ZJMJ7MCT.js";
|
|
59
59
|
import "./chunk-U7TEQCBN.js";
|
|
60
60
|
import "./chunk-XNLSTHDK.js";
|
|
61
61
|
import "./chunk-PDWPFR5T.js";
|
|
62
62
|
import "./chunk-Y5PA7DVK.js";
|
|
63
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-FLH4YC6W.js";
|
|
64
64
|
import {
|
|
65
65
|
error
|
|
66
66
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -11,16 +11,16 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
resolveRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-THSYN5EK.js";
|
|
15
15
|
import {
|
|
16
16
|
commandUsage
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-LHPEBLOU.js";
|
|
18
|
+
import "./chunk-5IJTPZXP.js";
|
|
19
19
|
import {
|
|
20
20
|
getCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WF6KLKRN.js";
|
|
22
22
|
import "./chunk-XNLSTHDK.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-FLH4YC6W.js";
|
|
24
24
|
import {
|
|
25
25
|
error
|
|
26
26
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -11268,14 +11268,14 @@ var require_retry_agent = __commonJS({
|
|
|
11268
11268
|
this.#options = options;
|
|
11269
11269
|
}
|
|
11270
11270
|
dispatch(opts, handler) {
|
|
11271
|
-
const
|
|
11271
|
+
const retry2 = new RetryHandler({
|
|
11272
11272
|
...opts,
|
|
11273
11273
|
retryOptions: this.#options
|
|
11274
11274
|
}, {
|
|
11275
11275
|
dispatch: this.#agent.dispatch.bind(this.#agent),
|
|
11276
11276
|
handler
|
|
11277
11277
|
});
|
|
11278
|
-
return this.#agent.dispatch(opts,
|
|
11278
|
+
return this.#agent.dispatch(opts, retry2);
|
|
11279
11279
|
}
|
|
11280
11280
|
close() {
|
|
11281
11281
|
return this.#agent.close();
|
|
@@ -13765,7 +13765,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
13765
13765
|
"use strict";
|
|
13766
13766
|
var { writeFile: writeFile3, readFile: readFile4, mkdir: mkdir3 } = __require("node:fs/promises");
|
|
13767
13767
|
var { dirname: dirname4, resolve: resolve11 } = __require("node:path");
|
|
13768
|
-
var { setTimeout:
|
|
13768
|
+
var { setTimeout: setTimeout5, clearTimeout: clearTimeout2 } = __require("node:timers");
|
|
13769
13769
|
var { InvalidArgumentError, UndiciError } = require_errors();
|
|
13770
13770
|
var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
|
|
13771
13771
|
function formatRequestKey(opts, headerFilters, matchOptions = {}) {
|
|
@@ -14099,7 +14099,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
14099
14099
|
* Schedules a flush (debounced to avoid excessive writes)
|
|
14100
14100
|
*/
|
|
14101
14101
|
#scheduleFlush() {
|
|
14102
|
-
this.#flushTimeout =
|
|
14102
|
+
this.#flushTimeout = setTimeout5(() => {
|
|
14103
14103
|
this.saveSnapshots().catch(() => {
|
|
14104
14104
|
});
|
|
14105
14105
|
if (this.#autoFlush) {
|
|
@@ -19482,7 +19482,7 @@ var require_request2 = __commonJS({
|
|
|
19482
19482
|
var { URLSerializer } = require_data_url();
|
|
19483
19483
|
var { kConstruct } = require_symbols();
|
|
19484
19484
|
var assert = __require("node:assert");
|
|
19485
|
-
var { getMaxListeners, setMaxListeners, defaultMaxListeners } = __require("node:events");
|
|
19485
|
+
var { getMaxListeners, setMaxListeners: setMaxListeners2, defaultMaxListeners } = __require("node:events");
|
|
19486
19486
|
var kAbortController = /* @__PURE__ */ Symbol("abortController");
|
|
19487
19487
|
var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {
|
|
19488
19488
|
signal.removeEventListener("abort", abort);
|
|
@@ -19722,7 +19722,7 @@ var require_request2 = __commonJS({
|
|
|
19722
19722
|
const acRef = new WeakRef(ac);
|
|
19723
19723
|
const abort = buildAbort(acRef);
|
|
19724
19724
|
if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) {
|
|
19725
|
-
|
|
19725
|
+
setMaxListeners2(1500, signal);
|
|
19726
19726
|
}
|
|
19727
19727
|
util.addAbortListener(signal, abort);
|
|
19728
19728
|
requestFinalizer.register(ac, { signal, abort }, abort);
|
|
@@ -25806,7 +25806,27 @@ function syntaxError(message, cause, from) {
|
|
|
25806
25806
|
}
|
|
25807
25807
|
|
|
25808
25808
|
// ../../src/fast-split/src/index.ts
|
|
25809
|
+
var splitTwo = (str, delim) => {
|
|
25810
|
+
const a2 = str.indexOf(delim);
|
|
25811
|
+
return a2 === -1 ? [str] : [str.substring(0, a2), str.substring(a2 + delim.length)];
|
|
25812
|
+
};
|
|
25813
|
+
var splitThree = (str, delim) => {
|
|
25814
|
+
const a2 = str.indexOf(delim);
|
|
25815
|
+
if (a2 === -1) return [str];
|
|
25816
|
+
const l = delim.length;
|
|
25817
|
+
const b = str.indexOf(delim, a2 + l);
|
|
25818
|
+
return b === -1 ? [str.substring(0, a2), str.substring(a2 + l)] : [
|
|
25819
|
+
str.substring(0, a2),
|
|
25820
|
+
str.substring(a2 + l, b),
|
|
25821
|
+
str.substring(b + l)
|
|
25822
|
+
];
|
|
25823
|
+
};
|
|
25809
25824
|
function fastSplit(str, delim, limit = -1, onPart) {
|
|
25825
|
+
if (onPart === void 0) {
|
|
25826
|
+
if (limit === 2) return splitTwo(str, delim);
|
|
25827
|
+
if (limit === 3)
|
|
25828
|
+
return splitThree(str, delim);
|
|
25829
|
+
}
|
|
25810
25830
|
let i2 = 0;
|
|
25811
25831
|
let p = 0;
|
|
25812
25832
|
const l = delim.length;
|
|
@@ -32460,15 +32480,16 @@ import { randomUUID } from "node:crypto";
|
|
|
32460
32480
|
import { closeSync, openSync, readFileSync as readFileSync2, readSync } from "node:fs";
|
|
32461
32481
|
import { availableParallelism } from "node:os";
|
|
32462
32482
|
import { dirname as dirname3, resolve as resolve10 } from "node:path";
|
|
32483
|
+
import { setMaxListeners } from "node:events";
|
|
32463
32484
|
import { pipeline } from "node:stream";
|
|
32464
|
-
import { setTimeout as
|
|
32485
|
+
import { setTimeout as setTimeout4 } from "node:timers/promises";
|
|
32465
32486
|
import { createGunzip } from "node:zlib";
|
|
32466
32487
|
|
|
32467
32488
|
// ../../src/user-agent/package.json
|
|
32468
32489
|
var package_default = {
|
|
32469
32490
|
name: "@vltpkg/user-agent",
|
|
32470
32491
|
description: "The User-Agent string that vlt sends with every outbound request",
|
|
32471
|
-
version: "1.
|
|
32492
|
+
version: "1.4.0",
|
|
32472
32493
|
repository: {
|
|
32473
32494
|
type: "git",
|
|
32474
32495
|
url: "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -32693,10 +32714,15 @@ var getKC = (identity) => {
|
|
|
32693
32714
|
keychains.set(identity, nkc);
|
|
32694
32715
|
return nkc;
|
|
32695
32716
|
};
|
|
32696
|
-
var deleteToken = async (registry, identity) => {
|
|
32717
|
+
var deleteToken = async (registry, identity, token) => {
|
|
32697
32718
|
const kc = getKC(identity);
|
|
32698
32719
|
await kc.load();
|
|
32699
32720
|
kc.delete(normalizeRegistryKey(registry));
|
|
32721
|
+
if (token) {
|
|
32722
|
+
for (const key of kc.keysSync()) {
|
|
32723
|
+
if (kc.getSync(key) === token) kc.delete(key);
|
|
32724
|
+
}
|
|
32725
|
+
}
|
|
32700
32726
|
await kc.save();
|
|
32701
32727
|
};
|
|
32702
32728
|
var setToken = async (registry, token, identity) => {
|
|
@@ -32719,9 +32745,19 @@ var getToken = async (registry, identity) => {
|
|
|
32719
32745
|
if (tok) return `Bearer ${tok}`;
|
|
32720
32746
|
return kc.get(key);
|
|
32721
32747
|
};
|
|
32722
|
-
var
|
|
32748
|
+
var registryKeys = (o) => [
|
|
32749
|
+
...new Set(
|
|
32750
|
+
[
|
|
32751
|
+
o.registry,
|
|
32752
|
+
...Object.values(o.registries ?? {}),
|
|
32753
|
+
...Object.values(o["scoped-registries"] ?? {}),
|
|
32754
|
+
...Object.values(o["jsr-registries"] ?? {})
|
|
32755
|
+
].filter((u2) => !!u2 && URL.canParse(u2)).map(normalizeRegistryKey)
|
|
32756
|
+
)
|
|
32757
|
+
];
|
|
32758
|
+
var getTokenByURL = async (requestUrl, identity, keys = []) => {
|
|
32723
32759
|
const normalized = normalizeRegistryKey(requestUrl);
|
|
32724
|
-
const candidates = [...runtimeTokens.keys()];
|
|
32760
|
+
const candidates = [...runtimeTokens.keys(), ...keys];
|
|
32725
32761
|
const envReg = process.env.VLT_REGISTRY;
|
|
32726
32762
|
if (envReg) {
|
|
32727
32763
|
candidates.push(normalizeRegistryKey(envReg));
|
|
@@ -33856,6 +33892,40 @@ var readBody = async (response, entry) => {
|
|
|
33856
33892
|
});
|
|
33857
33893
|
};
|
|
33858
33894
|
|
|
33895
|
+
// ../../src/registry-client/src/retry.ts
|
|
33896
|
+
import { setTimeout as setTimeout3 } from "node:timers/promises";
|
|
33897
|
+
var retry = (err, { state: { counter }, opts }, cb) => {
|
|
33898
|
+
const { code, statusCode, headers } = err;
|
|
33899
|
+
const { method } = opts;
|
|
33900
|
+
const { signal } = opts;
|
|
33901
|
+
const {
|
|
33902
|
+
maxRetries,
|
|
33903
|
+
minTimeout,
|
|
33904
|
+
maxTimeout,
|
|
33905
|
+
timeoutFactor,
|
|
33906
|
+
methods,
|
|
33907
|
+
statusCodes,
|
|
33908
|
+
errorCodes
|
|
33909
|
+
} = opts.retryOptions;
|
|
33910
|
+
if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code) || !methods.includes(method) || typeof statusCode === "number" && !statusCodes.includes(statusCode) || counter > maxRetries) {
|
|
33911
|
+
cb(err);
|
|
33912
|
+
return;
|
|
33913
|
+
}
|
|
33914
|
+
const ra = String(headers?.["retry-after"] ?? "");
|
|
33915
|
+
const secs = Number(ra);
|
|
33916
|
+
const after = Number.isNaN(secs) ? Date.parse(ra) - Date.now() : secs * 1e3;
|
|
33917
|
+
const wait = Math.min(
|
|
33918
|
+
after > 0 ? after : minTimeout * timeoutFactor ** (counter - 1),
|
|
33919
|
+
maxTimeout
|
|
33920
|
+
);
|
|
33921
|
+
setTimeout3(wait, null, {
|
|
33922
|
+
signal: signal instanceof AbortSignal ? signal : void 0
|
|
33923
|
+
}).then(
|
|
33924
|
+
() => cb(null),
|
|
33925
|
+
(er) => cb(er)
|
|
33926
|
+
);
|
|
33927
|
+
};
|
|
33928
|
+
|
|
33859
33929
|
// ../../src/registry-client/src/store-root.ts
|
|
33860
33930
|
import { resolve as resolve9 } from "node:path";
|
|
33861
33931
|
var storeRoot = (cache) => resolve9(cache, "store", "v1");
|
|
@@ -33895,10 +33965,22 @@ var RegistryClient = class {
|
|
|
33895
33965
|
agent;
|
|
33896
33966
|
cache;
|
|
33897
33967
|
identity;
|
|
33968
|
+
/** configured registry keys; `VLT_TOKEN_<key>` applies under each */
|
|
33969
|
+
registryKeys;
|
|
33898
33970
|
staleWhileRevalidateFactor;
|
|
33899
33971
|
#session = randomUUID();
|
|
33900
33972
|
#decoded = /* @__PURE__ */ new WeakMap();
|
|
33973
|
+
// request() calls not settled yet, awaited by drain()
|
|
33974
|
+
#inFlight = /* @__PURE__ */ new Set();
|
|
33975
|
+
#signal;
|
|
33976
|
+
/** the request's own signal joined with the client's */
|
|
33977
|
+
#withSignal(own) {
|
|
33978
|
+
const c = this.#signal;
|
|
33979
|
+
return !c || own === c || !(own instanceof AbortSignal) ? own ?? c : AbortSignal.any([own, c]);
|
|
33980
|
+
}
|
|
33901
33981
|
constructor(options) {
|
|
33982
|
+
this.#signal = options.signal;
|
|
33983
|
+
if (options.signal) setMaxListeners(0, options.signal);
|
|
33902
33984
|
const {
|
|
33903
33985
|
cache = xdg.cache(),
|
|
33904
33986
|
"fetch-retry-factor": timeoutFactor = 2,
|
|
@@ -33910,6 +33992,7 @@ var RegistryClient = class {
|
|
|
33910
33992
|
// 48h for a 5min cache
|
|
33911
33993
|
} = options;
|
|
33912
33994
|
this.identity = identity;
|
|
33995
|
+
this.registryKeys = registryKeys(options);
|
|
33913
33996
|
this.staleWhileRevalidateFactor = staleWhileRevalidateFactor;
|
|
33914
33997
|
const path2 = resolve10(cache, "registry-client");
|
|
33915
33998
|
const store = options.storeRoot ?? storeRoot(cache);
|
|
@@ -33930,6 +34013,7 @@ var RegistryClient = class {
|
|
|
33930
34013
|
minTimeout,
|
|
33931
34014
|
maxTimeout,
|
|
33932
34015
|
retryAfter: true,
|
|
34016
|
+
retry,
|
|
33933
34017
|
errorCodes: [
|
|
33934
34018
|
"ECONNREFUSED",
|
|
33935
34019
|
"ECONNRESET",
|
|
@@ -34032,7 +34116,7 @@ var RegistryClient = class {
|
|
|
34032
34116
|
}
|
|
34033
34117
|
}
|
|
34034
34118
|
} finally {
|
|
34035
|
-
await deleteToken(registry, this.identity);
|
|
34119
|
+
await deleteToken(registry, this.identity, tok);
|
|
34036
34120
|
}
|
|
34037
34121
|
}
|
|
34038
34122
|
/**
|
|
@@ -34133,7 +34217,7 @@ var RegistryClient = class {
|
|
|
34133
34217
|
const rt2 = response.getHeaderString("retry-after");
|
|
34134
34218
|
const retryAfter = rt2 ? Number(rt2) : -1;
|
|
34135
34219
|
if (retryAfter > 0) {
|
|
34136
|
-
await
|
|
34220
|
+
await setTimeout4(retryAfter * 1e3, null, { signal });
|
|
34137
34221
|
}
|
|
34138
34222
|
return await this.#checkLogin(url, options);
|
|
34139
34223
|
}
|
|
@@ -34273,6 +34357,7 @@ var RegistryClient = class {
|
|
|
34273
34357
|
const u2 = typeof url === "string" ? new URL(url) : url;
|
|
34274
34358
|
const o = {
|
|
34275
34359
|
...options,
|
|
34360
|
+
signal: this.#withSignal(options.signal),
|
|
34276
34361
|
method: options.method ?? "GET",
|
|
34277
34362
|
path: u2.pathname.replace(/\/+$/, "") + u2.search,
|
|
34278
34363
|
origin: u2.origin,
|
|
@@ -34293,7 +34378,11 @@ var RegistryClient = class {
|
|
|
34293
34378
|
o.headers = addHeader(
|
|
34294
34379
|
o.headers,
|
|
34295
34380
|
"authorization",
|
|
34296
|
-
await getTokenByURL(
|
|
34381
|
+
await getTokenByURL(
|
|
34382
|
+
String(u2),
|
|
34383
|
+
this.identity,
|
|
34384
|
+
this.registryKeys
|
|
34385
|
+
)
|
|
34297
34386
|
);
|
|
34298
34387
|
logRequest(url, "start", { method: o.method });
|
|
34299
34388
|
const requestStart = Date.now();
|
|
@@ -34316,7 +34405,29 @@ var RegistryClient = class {
|
|
|
34316
34405
|
}
|
|
34317
34406
|
return { statusCode: response.statusCode, body };
|
|
34318
34407
|
}
|
|
34408
|
+
/**
|
|
34409
|
+
* Settle in-flight requests and their cache writes. Await before
|
|
34410
|
+
* removing the cache dir.
|
|
34411
|
+
*/
|
|
34412
|
+
async drain() {
|
|
34413
|
+
do {
|
|
34414
|
+
await Promise.all(this.#inFlight);
|
|
34415
|
+
await this.cache.promise();
|
|
34416
|
+
} while (this.#inFlight.size);
|
|
34417
|
+
}
|
|
34319
34418
|
async request(url, options = {}) {
|
|
34419
|
+
options.signal = this.#withSignal(options.signal);
|
|
34420
|
+
let settle;
|
|
34421
|
+
const tracked = new Promise((res) => settle = res);
|
|
34422
|
+
this.#inFlight.add(tracked);
|
|
34423
|
+
try {
|
|
34424
|
+
return await this.#request(url, options);
|
|
34425
|
+
} finally {
|
|
34426
|
+
this.#inFlight.delete(tracked);
|
|
34427
|
+
settle();
|
|
34428
|
+
}
|
|
34429
|
+
}
|
|
34430
|
+
async #request(url, options) {
|
|
34320
34431
|
const u2 = typeof url === "string" ? new URL(url) : url;
|
|
34321
34432
|
const {
|
|
34322
34433
|
method = "GET",
|
|
@@ -34392,7 +34503,11 @@ var RegistryClient = class {
|
|
|
34392
34503
|
options.headers = addHeader(
|
|
34393
34504
|
options.headers,
|
|
34394
34505
|
"authorization",
|
|
34395
|
-
await getTokenByURL(
|
|
34506
|
+
await getTokenByURL(
|
|
34507
|
+
String(u2),
|
|
34508
|
+
this.identity,
|
|
34509
|
+
this.registryKeys
|
|
34510
|
+
)
|
|
34396
34511
|
);
|
|
34397
34512
|
}
|
|
34398
34513
|
let response = null;
|
|
@@ -34456,7 +34571,7 @@ var RegistryClient = class {
|
|
|
34456
34571
|
if (response.statusCode === 401) {
|
|
34457
34572
|
const otpResult = await otplease(this, options, response);
|
|
34458
34573
|
if (otpResult && "retry" in otpResult) {
|
|
34459
|
-
return await this
|
|
34574
|
+
return await this.#request(url, otpResult.retry);
|
|
34460
34575
|
}
|
|
34461
34576
|
if (otpResult && "bodyConsumed" in otpResult) {
|
|
34462
34577
|
consumedBody = otpResult.bodyConsumed;
|
|
@@ -34484,7 +34599,7 @@ var RegistryClient = class {
|
|
|
34484
34599
|
response.body.resume();
|
|
34485
34600
|
const [nextURL, nextOptions] = redirect(options, result, url);
|
|
34486
34601
|
if (nextOptions && nextURL) {
|
|
34487
|
-
return await this
|
|
34602
|
+
return await this.#request(nextURL, nextOptions);
|
|
34488
34603
|
}
|
|
34489
34604
|
return result;
|
|
34490
34605
|
}
|
|
@@ -14,46 +14,46 @@ import {
|
|
|
14
14
|
} from "./chunk-CLVRCGOZ.js";
|
|
15
15
|
import {
|
|
16
16
|
openUrl
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TPRK6IDA.js";
|
|
18
18
|
import {
|
|
19
19
|
createHostContextsMap
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-ASLX43R3.js";
|
|
21
|
+
import "./chunk-FZUYGJZU.js";
|
|
22
|
+
import "./chunk-QCSUWACA.js";
|
|
23
23
|
import "./chunk-G2YT2GWF.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-5Y4SYLJ2.js";
|
|
25
25
|
import {
|
|
26
26
|
PackageInfoClient
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-TO23PR7J.js";
|
|
28
28
|
import "./chunk-SRWDPPLX.js";
|
|
29
29
|
import "./chunk-WGDTG44V.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-THSYN5EK.js";
|
|
31
31
|
import {
|
|
32
32
|
Query,
|
|
33
33
|
actual
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-OVPHE4O7.js";
|
|
35
35
|
import {
|
|
36
36
|
SecurityArchive
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-5TNXLRW2.js";
|
|
38
38
|
import {
|
|
39
39
|
commandUsage
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-LHPEBLOU.js";
|
|
41
|
+
import "./chunk-I7UMHYZX.js";
|
|
42
42
|
import "./chunk-4KCU2KZL.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-PLG3OYCX.js";
|
|
44
44
|
import {
|
|
45
45
|
Spec
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-5IJTPZXP.js";
|
|
47
|
+
import "./chunk-WF6KLKRN.js";
|
|
48
48
|
import "./chunk-HTOTG4TS.js";
|
|
49
49
|
import "./chunk-APMYKJI2.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-SR2VOY5J.js";
|
|
51
|
+
import "./chunk-ZJMJ7MCT.js";
|
|
52
52
|
import "./chunk-U7TEQCBN.js";
|
|
53
53
|
import "./chunk-XNLSTHDK.js";
|
|
54
54
|
import "./chunk-PDWPFR5T.js";
|
|
55
55
|
import "./chunk-Y5PA7DVK.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-FLH4YC6W.js";
|
|
57
57
|
import {
|
|
58
58
|
error
|
|
59
59
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -11,34 +11,35 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
persistedEntries
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2AMOC4DN.js";
|
|
15
15
|
import {
|
|
16
16
|
require_emoji_regex
|
|
17
17
|
} from "./chunk-VTEFO2FT.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5RHABCYI.js";
|
|
19
|
+
import "./chunk-TO23PR7J.js";
|
|
20
20
|
import "./chunk-SRWDPPLX.js";
|
|
21
21
|
import {
|
|
22
22
|
source_default
|
|
23
23
|
} from "./chunk-WGDTG44V.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-THSYN5EK.js";
|
|
25
|
+
import "./chunk-I7UMHYZX.js";
|
|
26
26
|
import {
|
|
27
27
|
ViewClass
|
|
28
28
|
} from "./chunk-4KCU2KZL.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-PLG3OYCX.js";
|
|
30
|
+
import "./chunk-5IJTPZXP.js";
|
|
31
|
+
import "./chunk-WF6KLKRN.js";
|
|
32
32
|
import "./chunk-HTOTG4TS.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-SR2VOY5J.js";
|
|
34
34
|
import {
|
|
35
35
|
emitter
|
|
36
36
|
} from "./chunk-U7TEQCBN.js";
|
|
37
37
|
import "./chunk-XNLSTHDK.js";
|
|
38
|
+
import "./chunk-6IF3RJND.js";
|
|
38
39
|
import "./chunk-Y5PA7DVK.js";
|
|
39
40
|
import {
|
|
40
41
|
asError
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FLH4YC6W.js";
|
|
42
43
|
import "./chunk-WZWDS3W4.js";
|
|
43
44
|
import {
|
|
44
45
|
__commonJS,
|
|
@@ -12,36 +12,37 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
ExecCommand,
|
|
14
14
|
views
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-X4FVR4R5.js";
|
|
16
|
+
import "./chunk-UGCKF5ZE.js";
|
|
16
17
|
import "./chunk-RIYFGX27.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-ASLX43R3.js";
|
|
19
|
+
import "./chunk-FZUYGJZU.js";
|
|
20
|
+
import "./chunk-QCSUWACA.js";
|
|
20
21
|
import "./chunk-G2YT2GWF.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-5Y4SYLJ2.js";
|
|
22
23
|
import "./chunk-VTEFO2FT.js";
|
|
23
24
|
import "./chunk-WGDTG44V.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-THSYN5EK.js";
|
|
25
26
|
import {
|
|
26
27
|
run,
|
|
27
28
|
runFG
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-OVPHE4O7.js";
|
|
30
|
+
import "./chunk-5TNXLRW2.js";
|
|
30
31
|
import {
|
|
31
32
|
commandUsage
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-LHPEBLOU.js";
|
|
34
|
+
import "./chunk-I7UMHYZX.js";
|
|
34
35
|
import "./chunk-4KCU2KZL.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-PLG3OYCX.js";
|
|
37
|
+
import "./chunk-5IJTPZXP.js";
|
|
38
|
+
import "./chunk-WF6KLKRN.js";
|
|
38
39
|
import "./chunk-HTOTG4TS.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-ZJMJ7MCT.js";
|
|
40
41
|
import "./chunk-U7TEQCBN.js";
|
|
41
42
|
import "./chunk-XNLSTHDK.js";
|
|
42
43
|
import "./chunk-PDWPFR5T.js";
|
|
43
44
|
import "./chunk-Y5PA7DVK.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-FLH4YC6W.js";
|
|
45
46
|
import "./chunk-WZWDS3W4.js";
|
|
46
47
|
import "./chunk-PZLD7RTK.js";
|
|
47
48
|
|