@vltpkg/cli-js 1.0.7 → 1.0.9
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-OKO4MXDT.js → access-5DJJIIGD.js} +3 -3
- package/{bugs-J56QQ3CP.js → bugs-NRHU4ENC.js} +21 -13
- package/{build-CQ2E2XRO.js → build-5VZJTEBD.js} +7 -7
- package/{cache-PPEXAQT7.js → cache-QZ5XII4U.js} +5 -5
- package/chunk-2HDWM6AD.js +30 -0
- package/{chunk-ED2DDTQT.js → chunk-2YJ5MESP.js} +34 -7
- package/{chunk-CHHGSDAP.js → chunk-6NQBG3ZR.js} +3 -3
- package/{chunk-SVO3HI2G.js → chunk-6WMR7BLF.js} +6 -6
- package/{chunk-JLKFIX2H.js → chunk-A6TBJ4AB.js} +4 -4
- package/{chunk-JWWDJYSU.js → chunk-ATYE2HQV.js} +85 -25
- package/{chunk-BJBFEQRR.js → chunk-BHJT53TP.js} +1 -0
- package/{chunk-GVZRKITF.js → chunk-EBXBZ2Y5.js} +3 -3
- package/{chunk-ADYHZTEI.js → chunk-GKCU7R4B.js} +13 -6
- package/{chunk-A4EKZ32F.js → chunk-HRY5MJCA.js} +29 -7
- package/{chunk-34VLICEH.js → chunk-KCXN2GTX.js} +5 -5
- package/{chunk-3NGV7EC6.js → chunk-LHMEJF6J.js} +1183 -220
- package/{chunk-OUF2P2OD.js → chunk-MXCWH7WC.js} +17 -5
- package/{chunk-CIKUT62L.js → chunk-SBEZ7RUC.js} +2 -2
- package/{chunk-RKXQ66T4.js → chunk-USRMYD4F.js} +1 -1
- package/{chunk-SVBEF5PK.js → chunk-USTJECVS.js} +4 -4
- package/chunk-XEPCV7DP.js +75 -0
- package/{chunk-QWTGTFHN.js → chunk-XFI4THXZ.js} +1 -1
- package/{chunk-3OPNZI6G.js → chunk-YOE3VZFX.js} +8 -7
- package/{ci-WDQ4SQN6.js → ci-MBYD4AGJ.js} +7 -7
- package/cli-package.json +1 -1
- package/{config-JMARDHLW.js → config-DTZ7EWQF.js} +7 -6
- package/{config-XY5CDGTD.js → config-RQKPUW5B.js} +6 -5
- package/{create-C24ZGR6S.js → create-CYTNZ66Z.js} +11 -11
- package/{deprecate-HYHD5WQC.js → deprecate-H3L4MPZS.js} +7 -7
- package/{devtools-66MVSNF5.js → devtools-UEMPW5GG.js} +29 -29
- package/{dist-tag-RPQ5LZWM.js → dist-tag-CZHTW7C6.js} +3 -3
- package/{docs-UKQNAVM3.js → docs-Z76UCNLH.js} +21 -13
- package/{exec-FNZEVDGU.js → exec-PGPFYCAM.js} +11 -11
- package/{exec-cache-GRHS57DV.js → exec-cache-HPILZWUY.js} +9 -9
- package/{exec-local-AHDW7CKQ.js → exec-local-VKDC6XAQ.js} +9 -9
- package/{help-VDBXIWF3.js → help-QPZESL4Y.js} +1 -1
- package/{init-2ICZBLI2.js → init-MMQV6UC5.js} +7 -7
- package/{install-IFSVVRU5.js → install-KZPDV66V.js} +8 -8
- package/{list-RCAPA3OE.js → list-PJ2U4FE7.js} +18 -12
- package/{login-T42R75OV.js → login-L3D5FQGT.js} +7 -7
- package/{logout-PVR6J2AK.js → logout-SRZ574SQ.js} +3 -3
- package/{pack-HPLDE4RB.js → pack-OI5JLA3R.js} +8 -8
- package/package.json +1 -1
- package/{ping-N5U4XHUU.js → ping-VQ662NAP.js} +3 -3
- package/{pkg-VNKZX5JC.js → pkg-HNPRMTWV.js} +8 -8
- package/{profile-N7UOXZ2X.js → profile-Z7IOODZ4.js} +3 -3
- package/{publish-CRSF7NZP.js → publish-KTUUX25U.js} +11 -11
- package/{query-MEAXXYOE.js → query-MV5HKRIT.js} +18 -12
- package/registry-BMWXMQS4.js +1 -1
- package/registry-client-package.json +1 -1
- package/registry-client-src-revalidate.js +81 -21
- package/{repo-IRTGGLIC.js → repo-ZBCD65WE.js} +21 -13
- package/{reporter-Y7RMSVN4.js → reporter-SDMDYYMJ.js} +72 -72
- package/{run-I6HWURSB.js → run-QJK5LA6Q.js} +9 -9
- package/{run-exec-BV3RUWQM.js → run-exec-EAASMT5O.js} +9 -9
- package/security-archive-src-update-expired.js +6 -7
- package/{setup-U6DWTZBA.js → setup-Q7NTAV26.js} +33 -15
- package/{src-44BBCHST.js → src-MEEFRFWA.js} +3 -3
- package/{src-U4EBFPPT.js → src-MOKZQTH2.js} +163 -205
- package/{src-SXMLUOLI.js → src-YVODDQYK.js} +10 -9
- package/{token-CTUMLTQP.js → token-NQRHTTKG.js} +3 -3
- package/{uninstall-UUFXE47B.js → uninstall-E2SVGYI3.js} +16 -9
- package/{unpublish-G4NALOC6.js → unpublish-IE4KYVM4.js} +4 -4
- package/{update-BGMQQNYE.js → update-KZOWARII.js} +7 -7
- package/{version-QVFPFL6M.js → version-T6PTPZPR.js} +8 -8
- package/{view-QFYMJVBE.js → view-MVYV7YZ2.js} +6 -5
- 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-5D4XUOSP.js → whoami-A5RM2Z7Z.js} +3 -3
- package/chunk-NEFV2B5V.js +0 -75
|
@@ -19,15 +19,15 @@ import "./chunk-XKVU23NC.js";
|
|
|
19
19
|
import "./chunk-XISRK3R5.js";
|
|
20
20
|
import {
|
|
21
21
|
RegistryClient
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ATYE2HQV.js";
|
|
23
23
|
import "./chunk-HAYXR3MW.js";
|
|
24
24
|
import "./chunk-E74WGW5C.js";
|
|
25
25
|
import "./chunk-LPIBYUMT.js";
|
|
26
26
|
import "./chunk-UBLFPJHV.js";
|
|
27
|
+
import "./chunk-VFBCWAOC.js";
|
|
27
28
|
import "./chunk-XNLSTHDK.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-BHJT53TP.js";
|
|
29
30
|
import "./chunk-VE6CCH33.js";
|
|
30
|
-
import "./chunk-VFBCWAOC.js";
|
|
31
31
|
import {
|
|
32
32
|
error
|
|
33
33
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -12,22 +12,31 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
require_lib
|
|
14
14
|
} from "./chunk-CLVRCGOZ.js";
|
|
15
|
+
import {
|
|
16
|
+
openUrl
|
|
17
|
+
} from "./chunk-2HDWM6AD.js";
|
|
15
18
|
import {
|
|
16
19
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6NQBG3ZR.js";
|
|
18
21
|
import {
|
|
19
22
|
PackageInfoClient
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HRY5MJCA.js";
|
|
21
24
|
import "./chunk-ZWKI5OSF.js";
|
|
25
|
+
import "./chunk-MXCWH7WC.js";
|
|
26
|
+
import "./chunk-YAIKXFLN.js";
|
|
27
|
+
import "./chunk-G2YT2GWF.js";
|
|
28
|
+
import "./chunk-GDJ7JT2R.js";
|
|
29
|
+
import "./chunk-5JFRXIK2.js";
|
|
30
|
+
import "./chunk-WGDTG44V.js";
|
|
22
31
|
import {
|
|
23
32
|
Query,
|
|
24
33
|
actual
|
|
25
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-LHMEJF6J.js";
|
|
26
35
|
import {
|
|
27
36
|
SecurityArchive
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-2YJ5MESP.js";
|
|
38
|
+
import "./chunk-USTJECVS.js";
|
|
39
|
+
import "./chunk-YOE3VZFX.js";
|
|
31
40
|
import {
|
|
32
41
|
commandUsage
|
|
33
42
|
} from "./chunk-PTR5IGFQ.js";
|
|
@@ -35,17 +44,16 @@ import {
|
|
|
35
44
|
Spec
|
|
36
45
|
} from "./chunk-XKVU23NC.js";
|
|
37
46
|
import "./chunk-XISRK3R5.js";
|
|
47
|
+
import "./chunk-4KCU2KZL.js";
|
|
38
48
|
import "./chunk-HTOTG4TS.js";
|
|
39
|
-
import
|
|
40
|
-
urlOpen
|
|
41
|
-
} from "./chunk-HAYXR3MW.js";
|
|
49
|
+
import "./chunk-HAYXR3MW.js";
|
|
42
50
|
import "./chunk-E74WGW5C.js";
|
|
43
51
|
import "./chunk-LPIBYUMT.js";
|
|
44
52
|
import "./chunk-UBLFPJHV.js";
|
|
53
|
+
import "./chunk-VFBCWAOC.js";
|
|
45
54
|
import "./chunk-XNLSTHDK.js";
|
|
46
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-BHJT53TP.js";
|
|
47
56
|
import "./chunk-VE6CCH33.js";
|
|
48
|
-
import "./chunk-VFBCWAOC.js";
|
|
49
57
|
import {
|
|
50
58
|
error
|
|
51
59
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -174,7 +182,7 @@ var command = async (conf) => {
|
|
|
174
182
|
if (!result) {
|
|
175
183
|
throw error("Unexpected empty result");
|
|
176
184
|
}
|
|
177
|
-
await
|
|
185
|
+
await openUrl(result.url);
|
|
178
186
|
return result;
|
|
179
187
|
}
|
|
180
188
|
return results;
|
|
@@ -191,7 +199,7 @@ var command = async (conf) => {
|
|
|
191
199
|
if (!name) {
|
|
192
200
|
throw error("No package name found");
|
|
193
201
|
}
|
|
194
|
-
await
|
|
202
|
+
await openUrl(url);
|
|
195
203
|
return { url, name };
|
|
196
204
|
};
|
|
197
205
|
export {
|
|
@@ -11,10 +11,10 @@ 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-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-LHMEJF6J.js";
|
|
15
|
+
import "./chunk-2YJ5MESP.js";
|
|
16
|
+
import "./chunk-USTJECVS.js";
|
|
17
|
+
import "./chunk-YOE3VZFX.js";
|
|
18
18
|
import {
|
|
19
19
|
commandUsage
|
|
20
20
|
} from "./chunk-PTR5IGFQ.js";
|
|
@@ -24,12 +24,12 @@ import "./chunk-HTOTG4TS.js";
|
|
|
24
24
|
import "./chunk-E74WGW5C.js";
|
|
25
25
|
import "./chunk-LPIBYUMT.js";
|
|
26
26
|
import "./chunk-UBLFPJHV.js";
|
|
27
|
-
import "./chunk-XNLSTHDK.js";
|
|
28
|
-
import "./chunk-BJBFEQRR.js";
|
|
29
|
-
import "./chunk-VE6CCH33.js";
|
|
30
27
|
import {
|
|
31
28
|
isErrorWithCause
|
|
32
29
|
} from "./chunk-VFBCWAOC.js";
|
|
30
|
+
import "./chunk-XNLSTHDK.js";
|
|
31
|
+
import "./chunk-BHJT53TP.js";
|
|
32
|
+
import "./chunk-VE6CCH33.js";
|
|
33
33
|
import {
|
|
34
34
|
error
|
|
35
35
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
stderr,
|
|
17
17
|
stdout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MXCWH7WC.js";
|
|
19
19
|
import "./chunk-YAIKXFLN.js";
|
|
20
20
|
import "./chunk-G2YT2GWF.js";
|
|
21
21
|
import "./chunk-GDJ7JT2R.js";
|
|
22
22
|
import "./chunk-5JFRXIK2.js";
|
|
23
23
|
import "./chunk-WGDTG44V.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-YOE3VZFX.js";
|
|
25
25
|
import {
|
|
26
26
|
commandUsage
|
|
27
27
|
} from "./chunk-PTR5IGFQ.js";
|
|
@@ -34,15 +34,15 @@ import {
|
|
|
34
34
|
} from "./chunk-4KCU2KZL.js";
|
|
35
35
|
import {
|
|
36
36
|
CacheEntry
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-ATYE2HQV.js";
|
|
38
38
|
import "./chunk-HAYXR3MW.js";
|
|
39
39
|
import "./chunk-E74WGW5C.js";
|
|
40
40
|
import "./chunk-LPIBYUMT.js";
|
|
41
41
|
import "./chunk-UBLFPJHV.js";
|
|
42
|
+
import "./chunk-VFBCWAOC.js";
|
|
42
43
|
import "./chunk-XNLSTHDK.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-BHJT53TP.js";
|
|
44
45
|
import "./chunk-VE6CCH33.js";
|
|
45
|
-
import "./chunk-VFBCWAOC.js";
|
|
46
46
|
import {
|
|
47
47
|
error
|
|
48
48
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
stderr
|
|
14
|
+
} from "./chunk-MXCWH7WC.js";
|
|
15
|
+
import {
|
|
16
|
+
urlOpen
|
|
17
|
+
} from "./chunk-HAYXR3MW.js";
|
|
18
|
+
|
|
19
|
+
// ../../src/cli-sdk/src/open-url.ts
|
|
20
|
+
var openUrl = async (url) => {
|
|
21
|
+
try {
|
|
22
|
+
await urlOpen(url);
|
|
23
|
+
} catch {
|
|
24
|
+
stderr(`Could not open a browser. Please open ${url} manually.`);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
openUrl
|
|
30
|
+
};
|
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
asDepID,
|
|
14
14
|
baseDepID,
|
|
15
15
|
splitDepID
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YOE3VZFX.js";
|
|
17
17
|
import {
|
|
18
18
|
loadPackageJson
|
|
19
19
|
} from "./chunk-E74WGW5C.js";
|
|
20
20
|
import {
|
|
21
21
|
I
|
|
22
22
|
} from "./chunk-LPIBYUMT.js";
|
|
23
|
-
import {
|
|
24
|
-
XDG
|
|
25
|
-
} from "./chunk-XNLSTHDK.js";
|
|
26
23
|
import {
|
|
27
24
|
defaultRegistryName
|
|
28
25
|
} from "./chunk-VFBCWAOC.js";
|
|
26
|
+
import {
|
|
27
|
+
XDG
|
|
28
|
+
} from "./chunk-XNLSTHDK.js";
|
|
29
29
|
import {
|
|
30
30
|
error
|
|
31
31
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -250,9 +250,7 @@ var asPackageReportData = (o) => {
|
|
|
250
250
|
import { resolve } from "node:path";
|
|
251
251
|
var __CODE_SPLIT_SCRIPT_NAME = resolve(import.meta.dirname, "security-archive-src-update-expired.js");
|
|
252
252
|
|
|
253
|
-
// ../../src/security-archive/src/
|
|
254
|
-
var SOCKET_API_V0_URL = "https://api.socket.dev/v0/purl?alerts=true";
|
|
255
|
-
var SOCKET_PUBLIC_API_TOKEN = "sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api";
|
|
253
|
+
// ../../src/security-archive/src/browser.ts
|
|
256
254
|
var npmRegistryURL = "https://registry.npmjs.org/";
|
|
257
255
|
var normalizeRegistryURL = (url) => url.endsWith("/") ? url : `${url}/`;
|
|
258
256
|
var nodeRegistryURL = (node) => {
|
|
@@ -268,6 +266,10 @@ var usesNpmRegistry = (node) => {
|
|
|
268
266
|
const npmAlias = node.options.registries?.[defaultRegistryName];
|
|
269
267
|
return !!npmAlias && normalizeRegistryURL(npmAlias) === origin;
|
|
270
268
|
};
|
|
269
|
+
|
|
270
|
+
// ../../src/security-archive/src/index.ts
|
|
271
|
+
var SOCKET_API_V0_URL = "https://api.socket.dev/v0/purl?alerts=true";
|
|
272
|
+
var SOCKET_PUBLIC_API_TOKEN = "sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api";
|
|
271
273
|
var { version } = loadPackageJson(
|
|
272
274
|
import.meta.filename,
|
|
273
275
|
"cli-package.json"
|
|
@@ -313,6 +315,31 @@ var SecurityArchive = class _SecurityArchive extends I {
|
|
|
313
315
|
this.#path = options.path ?? new XDG("vlt").cache("security-archive.db");
|
|
314
316
|
this.#retries = options.retries ?? 3;
|
|
315
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* Get the report data for a node, keyed by its base {@link DepID}.
|
|
320
|
+
*/
|
|
321
|
+
get(k, options) {
|
|
322
|
+
return super.get(baseDepID(k), options);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Check for report data, keyed by the base {@link DepID}.
|
|
326
|
+
*/
|
|
327
|
+
has(k) {
|
|
328
|
+
return super.has(baseDepID(k));
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Store report data for a node, keyed by its base {@link DepID} so
|
|
332
|
+
* peer-suffixed copies of the same package share one entry.
|
|
333
|
+
*/
|
|
334
|
+
set(k, v, setOptions) {
|
|
335
|
+
return super.set(baseDepID(k), v, setOptions);
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Delete the report data stored under the base {@link DepID}.
|
|
339
|
+
*/
|
|
340
|
+
delete(k) {
|
|
341
|
+
return super.delete(baseDepID(k));
|
|
342
|
+
}
|
|
316
343
|
/**
|
|
317
344
|
* Retrieves a node using its name and version.
|
|
318
345
|
*/
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
actual,
|
|
14
14
|
callLimit,
|
|
15
15
|
createVirtualRoot
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LHMEJF6J.js";
|
|
17
17
|
import {
|
|
18
18
|
SecurityArchive
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2YJ5MESP.js";
|
|
20
20
|
import {
|
|
21
21
|
error
|
|
22
22
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -115,7 +115,7 @@ var reloadConfig = async (folder) => {
|
|
|
115
115
|
unload("project");
|
|
116
116
|
} catch {
|
|
117
117
|
}
|
|
118
|
-
const { Config } = await import("./config-
|
|
118
|
+
const { Config } = await import("./config-RQKPUW5B.js");
|
|
119
119
|
return Config.load(folder, process.argv, true);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -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
|
PackageInfoClient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HRY5MJCA.js";
|
|
15
15
|
import {
|
|
16
16
|
findCmdShimIfExists,
|
|
17
17
|
install
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LHMEJF6J.js";
|
|
19
19
|
import {
|
|
20
20
|
PathScurry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-USTJECVS.js";
|
|
22
22
|
import {
|
|
23
23
|
Spec
|
|
24
24
|
} from "./chunk-XKVU23NC.js";
|
|
25
25
|
import {
|
|
26
26
|
walkUp
|
|
27
27
|
} from "./chunk-HTOTG4TS.js";
|
|
28
|
-
import {
|
|
29
|
-
XDG
|
|
30
|
-
} from "./chunk-XNLSTHDK.js";
|
|
31
28
|
import {
|
|
32
29
|
parseScope
|
|
33
30
|
} from "./chunk-VFBCWAOC.js";
|
|
31
|
+
import {
|
|
32
|
+
XDG
|
|
33
|
+
} from "./chunk-XNLSTHDK.js";
|
|
34
34
|
import {
|
|
35
35
|
error
|
|
36
36
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
} from "./chunk-RIYFGX27.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6NQBG3ZR.js";
|
|
18
18
|
import {
|
|
19
19
|
stderr,
|
|
20
20
|
stdout,
|
|
21
21
|
styleTextStdout
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MXCWH7WC.js";
|
|
23
23
|
import {
|
|
24
24
|
require_emoji_regex
|
|
25
25
|
} from "./chunk-VTEFO2FT.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
Query,
|
|
28
28
|
actual,
|
|
29
29
|
isRunResult
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LHMEJF6J.js";
|
|
31
31
|
import {
|
|
32
32
|
Monorepo
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-USTJECVS.js";
|
|
34
34
|
import {
|
|
35
35
|
isErrorWithCause
|
|
36
36
|
} from "./chunk-VFBCWAOC.js";
|
|
@@ -21,15 +21,15 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
logRequest
|
|
23
23
|
} from "./chunk-UBLFPJHV.js";
|
|
24
|
+
import {
|
|
25
|
+
asError
|
|
26
|
+
} from "./chunk-VFBCWAOC.js";
|
|
24
27
|
import {
|
|
25
28
|
XDG
|
|
26
29
|
} from "./chunk-XNLSTHDK.js";
|
|
27
30
|
import {
|
|
28
31
|
rimraf
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import {
|
|
31
|
-
asError
|
|
32
|
-
} from "./chunk-VFBCWAOC.js";
|
|
32
|
+
} from "./chunk-BHJT53TP.js";
|
|
33
33
|
import {
|
|
34
34
|
error
|
|
35
35
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -12597,7 +12597,7 @@ var require_mock_utils = __commonJS({
|
|
|
12597
12597
|
kTotalDispatchCount
|
|
12598
12598
|
} = require_mock_symbols();
|
|
12599
12599
|
var { serializePathWithQuery } = require_util();
|
|
12600
|
-
var { STATUS_CODES } = __require("node:http");
|
|
12600
|
+
var { STATUS_CODES: STATUS_CODES2 } = __require("node:http");
|
|
12601
12601
|
var {
|
|
12602
12602
|
types: {
|
|
12603
12603
|
isPromise
|
|
@@ -12805,7 +12805,7 @@ var require_mock_utils = __commonJS({
|
|
|
12805
12805
|
return result;
|
|
12806
12806
|
}
|
|
12807
12807
|
function getStatusText(statusCode) {
|
|
12808
|
-
return
|
|
12808
|
+
return STATUS_CODES2[statusCode] || "unknown";
|
|
12809
12809
|
}
|
|
12810
12810
|
async function getResponse(body) {
|
|
12811
12811
|
const buffers = [];
|
|
@@ -13218,13 +13218,13 @@ var require_mock_call_history = __commonJS({
|
|
|
13218
13218
|
function makeFilterCalls(parameterName) {
|
|
13219
13219
|
return (parameterValue, logs) => {
|
|
13220
13220
|
if (typeof parameterValue === "string" || parameterValue == null) {
|
|
13221
|
-
return logs.filter((
|
|
13222
|
-
return
|
|
13221
|
+
return logs.filter((log4) => {
|
|
13222
|
+
return log4[parameterName] === parameterValue;
|
|
13223
13223
|
});
|
|
13224
13224
|
}
|
|
13225
13225
|
if (parameterValue instanceof RegExp) {
|
|
13226
|
-
return logs.filter((
|
|
13227
|
-
return parameterValue.test(
|
|
13226
|
+
return logs.filter((log4) => {
|
|
13227
|
+
return parameterValue.test(log4[parameterName]);
|
|
13228
13228
|
});
|
|
13229
13229
|
}
|
|
13230
13230
|
throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`);
|
|
@@ -13319,8 +13319,8 @@ var require_mock_call_history = __commonJS({
|
|
|
13319
13319
|
return this.logs.filter(criteria);
|
|
13320
13320
|
}
|
|
13321
13321
|
if (criteria instanceof RegExp) {
|
|
13322
|
-
return this.logs.filter((
|
|
13323
|
-
return criteria.test(
|
|
13322
|
+
return this.logs.filter((log4) => {
|
|
13323
|
+
return criteria.test(log4.toString());
|
|
13324
13324
|
});
|
|
13325
13325
|
}
|
|
13326
13326
|
if (typeof criteria === "object" && criteria !== null) {
|
|
@@ -13370,13 +13370,13 @@ var require_mock_call_history = __commonJS({
|
|
|
13370
13370
|
this.logs = [];
|
|
13371
13371
|
}
|
|
13372
13372
|
[kMockCallHistoryAddLog](requestInit) {
|
|
13373
|
-
const
|
|
13374
|
-
this.logs.push(
|
|
13375
|
-
return
|
|
13373
|
+
const log4 = new MockCallHistoryLog(requestInit);
|
|
13374
|
+
this.logs.push(log4);
|
|
13375
|
+
return log4;
|
|
13376
13376
|
}
|
|
13377
13377
|
*[Symbol.iterator]() {
|
|
13378
|
-
for (const
|
|
13379
|
-
yield
|
|
13378
|
+
for (const log4 of this.calls()) {
|
|
13379
|
+
yield log4;
|
|
13380
13380
|
}
|
|
13381
13381
|
}
|
|
13382
13382
|
};
|
|
@@ -20411,7 +20411,7 @@ var require_fetch = __commonJS({
|
|
|
20411
20411
|
var { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url();
|
|
20412
20412
|
var { getGlobalDispatcher } = require_global2();
|
|
20413
20413
|
var { webidl } = require_webidl();
|
|
20414
|
-
var { STATUS_CODES } = __require("node:http");
|
|
20414
|
+
var { STATUS_CODES: STATUS_CODES2 } = __require("node:http");
|
|
20415
20415
|
var { bytesMatch } = require_subresource_integrity();
|
|
20416
20416
|
var { createDeferredPromise } = require_promise();
|
|
20417
20417
|
var { isomorphicEncode } = require_infra();
|
|
@@ -21448,7 +21448,7 @@ var require_fetch = __commonJS({
|
|
|
21448
21448
|
}
|
|
21449
21449
|
resolve5({
|
|
21450
21450
|
status,
|
|
21451
|
-
statusText:
|
|
21451
|
+
statusText: STATUS_CODES2[status],
|
|
21452
21452
|
headersList,
|
|
21453
21453
|
socket
|
|
21454
21454
|
});
|
|
@@ -21472,7 +21472,7 @@ var require_fetch = __commonJS({
|
|
|
21472
21472
|
}
|
|
21473
21473
|
resolve5({
|
|
21474
21474
|
status,
|
|
21475
|
-
statusText:
|
|
21475
|
+
statusText: STATUS_CODES2[status],
|
|
21476
21476
|
headersList,
|
|
21477
21477
|
socket
|
|
21478
21478
|
});
|
|
@@ -26130,6 +26130,8 @@ var handleBeforeExit = () => {
|
|
|
26130
26130
|
|
|
26131
26131
|
// ../../src/registry-client/src/index.ts
|
|
26132
26132
|
import { randomUUID } from "node:crypto";
|
|
26133
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
26134
|
+
import { STATUS_CODES } from "node:http";
|
|
26133
26135
|
import { availableParallelism } from "node:os";
|
|
26134
26136
|
import { dirname as dirname3, resolve as resolve4 } from "node:path";
|
|
26135
26137
|
import { setTimeout as setTimeout2 } from "node:timers/promises";
|
|
@@ -27071,7 +27073,8 @@ var otplease = async (client, options, response) => {
|
|
|
27071
27073
|
const notice = String(npmNotice);
|
|
27072
27074
|
const match = otpChallengeNotice.exec(notice);
|
|
27073
27075
|
if (match?.[1]) {
|
|
27074
|
-
await urlOpen(match[1])
|
|
27076
|
+
await urlOpen(match[1]).catch(() => {
|
|
27077
|
+
});
|
|
27075
27078
|
log(notice);
|
|
27076
27079
|
return {
|
|
27077
27080
|
retry: {
|
|
@@ -27356,6 +27359,7 @@ var exchangeToken = async (idToken, packageName, registry) => {
|
|
|
27356
27359
|
};
|
|
27357
27360
|
|
|
27358
27361
|
// ../../src/registry-client/src/index.ts
|
|
27362
|
+
var log3 = (msg) => console.error(msg);
|
|
27359
27363
|
var isCacheableMethod = (m) => m === "GET" || m === "HEAD";
|
|
27360
27364
|
var cacheKey = (method, url) => `${method !== "GET" ? method + " " : ""}${url}`;
|
|
27361
27365
|
var { version } = loadPackageJson(
|
|
@@ -27511,9 +27515,18 @@ var RegistryClient = class {
|
|
|
27511
27515
|
return;
|
|
27512
27516
|
}
|
|
27513
27517
|
}
|
|
27514
|
-
|
|
27518
|
+
const { statusCode } = response;
|
|
27519
|
+
const status = STATUS_CODES[statusCode];
|
|
27520
|
+
throw error(
|
|
27521
|
+
`Failed to perform web login: ${statusCode}${status ? ` ${status}` : ""}`,
|
|
27522
|
+
{
|
|
27523
|
+
code: "EREQUEST",
|
|
27524
|
+
url: webLoginURL,
|
|
27525
|
+
status: statusCode,
|
|
27526
|
+
response
|
|
27527
|
+
}
|
|
27528
|
+
);
|
|
27515
27529
|
}
|
|
27516
|
-
/* c8 ignore stop */
|
|
27517
27530
|
/**
|
|
27518
27531
|
* Given a {@link WebAuthChallenge}, open the `authUrl` in a browser and
|
|
27519
27532
|
* hang on the `doneUrl` until it returns a {@link TokenResponse} object.
|
|
@@ -27528,8 +27541,9 @@ var RegistryClient = class {
|
|
|
27528
27541
|
}),
|
|
27529
27542
|
urlOpen(authUrl, { signal }).catch((er) => {
|
|
27530
27543
|
if (asError(er).name === "AbortError") return;
|
|
27531
|
-
|
|
27532
|
-
|
|
27544
|
+
log3(
|
|
27545
|
+
`Could not open a browser. Please open ${authUrl} manually.`
|
|
27546
|
+
);
|
|
27533
27547
|
})
|
|
27534
27548
|
]);
|
|
27535
27549
|
return result;
|
|
@@ -27573,6 +27587,52 @@ var RegistryClient = class {
|
|
|
27573
27587
|
response
|
|
27574
27588
|
});
|
|
27575
27589
|
}
|
|
27590
|
+
/**
|
|
27591
|
+
* Read a valid cached non-JSON body straight off disk, bypassing the
|
|
27592
|
+
* in-memory cache LRU so that a tarball is never held in it.
|
|
27593
|
+
*
|
|
27594
|
+
* One read: the head is decoded from the same bytes the body comes
|
|
27595
|
+
* from, so `cache-unzip` rewriting the head cannot land between the
|
|
27596
|
+
* two and hand back a body at a stale offset.
|
|
27597
|
+
*
|
|
27598
|
+
* Does not log a cache hit -- the caller may still reject the body
|
|
27599
|
+
* and fall back to {@link request}, which logs its own.
|
|
27600
|
+
*
|
|
27601
|
+
* Returns undefined on anything unexpected; callers fall back to
|
|
27602
|
+
* {@link request}.
|
|
27603
|
+
*/
|
|
27604
|
+
cachedBody(url, options = {}) {
|
|
27605
|
+
const { integrity, method = "GET" } = options;
|
|
27606
|
+
try {
|
|
27607
|
+
const key = cacheKey(
|
|
27608
|
+
method,
|
|
27609
|
+
typeof url === "string" ? new URL(url) : url
|
|
27610
|
+
);
|
|
27611
|
+
if (this.cache.peek(key)) return void 0;
|
|
27612
|
+
const paths = /* @__PURE__ */ new Set();
|
|
27613
|
+
try {
|
|
27614
|
+
const i = this.cache.integrityPath(integrity);
|
|
27615
|
+
if (i) paths.add(i);
|
|
27616
|
+
} catch {
|
|
27617
|
+
}
|
|
27618
|
+
paths.add(this.cache.path(key));
|
|
27619
|
+
for (const path of paths) {
|
|
27620
|
+
let buf;
|
|
27621
|
+
try {
|
|
27622
|
+
buf = readFileSync2(path);
|
|
27623
|
+
} catch {
|
|
27624
|
+
continue;
|
|
27625
|
+
}
|
|
27626
|
+
const entry = CacheEntry.decode(buf);
|
|
27627
|
+
if (entry.statusCode !== 200 || !entry.valid || entry.isJSON) {
|
|
27628
|
+
continue;
|
|
27629
|
+
}
|
|
27630
|
+
return { path, body: entry.buffer() };
|
|
27631
|
+
}
|
|
27632
|
+
} catch {
|
|
27633
|
+
}
|
|
27634
|
+
return void 0;
|
|
27635
|
+
}
|
|
27576
27636
|
async request(url, options = {}) {
|
|
27577
27637
|
const u = typeof url === "string" ? new URL(url) : url;
|
|
27578
27638
|
const {
|
|
@@ -11,15 +11,15 @@ 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-HRY5MJCA.js";
|
|
15
15
|
import {
|
|
16
16
|
Monorepo,
|
|
17
17
|
PackageJson,
|
|
18
18
|
PathScurry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-USTJECVS.js";
|
|
20
20
|
import {
|
|
21
21
|
resetCaches
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YOE3VZFX.js";
|
|
23
23
|
import {
|
|
24
24
|
commands,
|
|
25
25
|
defaultValues,
|
|
@@ -9,18 +9,24 @@ globalThis.setInterval = _vlt_setInterval;
|
|
|
9
9
|
globalThis.clearInterval = _vlt_clearInterval;
|
|
10
10
|
import {createRequire as _vlt_createRequire} from "node:module";
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
|
+
import {
|
|
13
|
+
openUrl
|
|
14
|
+
} from "./chunk-2HDWM6AD.js";
|
|
12
15
|
import {
|
|
13
16
|
stderr
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MXCWH7WC.js";
|
|
15
18
|
import {
|
|
16
19
|
mermaidOutput
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LHMEJF6J.js";
|
|
18
21
|
import {
|
|
19
22
|
ViewClass
|
|
20
23
|
} from "./chunk-4KCU2KZL.js";
|
|
21
24
|
import {
|
|
22
|
-
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
getTokenByURL
|
|
26
|
+
} from "./chunk-ATYE2HQV.js";
|
|
27
|
+
|
|
28
|
+
// ../../src/cli-sdk/src/query-auth.ts
|
|
29
|
+
var createGetAuthHeader = (conf) => async (url) => getTokenByURL(url, conf.options.identity);
|
|
24
30
|
|
|
25
31
|
// ../../src/cli-sdk/src/mermaid-image-view.ts
|
|
26
32
|
var MermaidImageView = class extends ViewClass {
|
|
@@ -36,16 +42,17 @@ var MermaidImageView = class extends ViewClass {
|
|
|
36
42
|
stderr(`Generating PNG image...`);
|
|
37
43
|
const filePath = await renderMermaidToPng(mermaidText);
|
|
38
44
|
stderr(`Image saved to: ${filePath}`);
|
|
39
|
-
await
|
|
45
|
+
await openUrl(filePath);
|
|
40
46
|
} else {
|
|
41
47
|
stderr(`Generating SVG image...`);
|
|
42
48
|
const filePath = await renderMermaidToFile(mermaidText);
|
|
43
49
|
stderr(`Image saved to: ${filePath}`);
|
|
44
|
-
await
|
|
50
|
+
await openUrl(filePath);
|
|
45
51
|
}
|
|
46
52
|
}
|
|
47
53
|
};
|
|
48
54
|
|
|
49
55
|
export {
|
|
56
|
+
createGetAuthHeader,
|
|
50
57
|
MermaidImageView
|
|
51
58
|
};
|