@vltpkg/cli-js 1.0.0-rc.26 → 1.0.0-rc.27
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/{bugs-5UZKBRJ6.js → bugs-CS34LDPD.js} +9 -9
- package/{build-HHRMIGWX.js → build-XHEFAWMN.js} +6 -6
- package/{cache-S7AIJNAW.js → cache-LII2V5IM.js} +5 -5
- package/{chunk-QI6PGM7S.js → chunk-52LBC3AX.js} +2 -2
- package/{chunk-WC3VIV77.js → chunk-6YTJVEK2.js} +5 -5
- package/{chunk-BRSCRAUI.js → chunk-BIUCOMBH.js} +1 -1
- package/{chunk-D3UYPLBW.js → chunk-DJBBJDHI.js} +5 -5
- package/{chunk-WYE4WWGF.js → chunk-DJBVQKBB.js} +2 -2
- package/{chunk-JXGBASMB.js → chunk-DYL7AFY7.js} +2 -2
- package/{chunk-KSOWJE5Z.js → chunk-INXSTZAX.js} +104 -78
- package/{chunk-CEEMJNRZ.js → chunk-JQHMLTO5.js} +1 -1
- package/{chunk-REEVCBSC.js → chunk-LAG2R3YJ.js} +2 -2
- package/{chunk-CY225LQK.js → chunk-LKFTVDWS.js} +2 -2
- package/{chunk-LCUNWXND.js → chunk-P2HZ4ISK.js} +3 -3
- package/{chunk-45PZMAKV.js → chunk-QDGZZ5FZ.js} +1 -1
- package/{chunk-GM7VNI3N.js → chunk-QWWYZ3TT.js} +1 -1
- package/{chunk-3T3M5JJF.js → chunk-S5I2UOBT.js} +5 -5
- package/{chunk-3PCMZMV5.js → chunk-SR66HWMM.js} +1 -1
- package/{chunk-5TAPASMO.js → chunk-TRXTSZFT.js} +1 -1
- package/{chunk-ORGRCZV6.js → chunk-VTZZIXYW.js} +3 -3
- package/{chunk-UNANFLLJ.js → chunk-XSUIV5NF.js} +4 -4
- package/{chunk-HIGHMXU7.js → chunk-XWF3GJKE.js} +0 -3
- package/chunk-YP4YNE5Y.js +68 -0
- package/{chunk-R3KDJL6J.js → chunk-YR47M5L7.js} +2 -2
- package/{ci-2U44K5HH.js → ci-EEXNEPKP.js} +7 -7
- package/cli-package.json +1 -1
- package/{config-2OSWSNLR.js → config-4ZFJD5AY.js} +6 -6
- package/{config-J7A3MQFH.js → config-6MUU2TRJ.js} +7 -7
- package/{create-QORFVTHP.js → create-DEKJKPYX.js} +13 -13
- package/{docs-5X4WDWUP.js → docs-5EKPZANX.js} +9 -9
- package/{exec-YMICUMJA.js → exec-I4YPE6YW.js} +13 -13
- package/{exec-cache-A6CMJUZ7.js → exec-cache-XEWPABLK.js} +11 -11
- package/{exec-local-TYAKTIYJ.js → exec-local-OQXG2VPW.js} +10 -10
- package/{help-OKCOEMB3.js → help-OG655SE5.js} +1 -1
- package/{init-VC6AG2UU.js → init-LJH2YTBM.js} +5 -5
- package/{install-P5AO6772.js → install-KP2FGWOR.js} +8 -8
- package/{list-CIK732ED.js → list-ACZ3ZSIZ.js} +10 -10
- package/{login-R3B4H2I2.js → login-VFTRKZE2.js} +2 -2
- package/{logout-YUUXIVUO.js → logout-Z4AVG64D.js} +2 -2
- package/{pack-QEI3LPIQ.js → pack-GPJNX7RP.js} +8 -8
- package/package.json +1 -1
- package/{ping-QSR64W6S.js → ping-B2YS4SR3.js} +2 -2
- package/{pkg-CNGHBNXD.js → pkg-WUYJDFSH.js} +8 -8
- package/{publish-5N6MWW6E.js → publish-WTMGC4ET.js} +9 -9
- package/{query-MIH452QT.js → query-UCM35VVC.js} +10 -10
- package/registry-client-package.json +1 -1
- package/{repo-I7XLLP24.js → repo-MZCPTQZU.js} +9 -9
- package/{reporter-WBQK75RI.js → reporter-XRZ37LFK.js} +2 -2
- package/{run-NUQ63SUS.js → run-CAX4Z2SC.js} +10 -10
- package/{run-exec-ZJSAJPME.js → run-exec-SM42FE7W.js} +10 -10
- package/{src-BTES32CE.js → src-SDJWTPCU.js} +9 -9
- package/{token-JOS6MHEW.js → token-YCURCCNR.js} +2 -2
- package/{uninstall-A6XPKFIM.js → uninstall-YYPPXM2O.js} +8 -8
- package/{update-FOBAWWTD.js → update-YFUTH33A.js} +7 -7
- package/{version-AZK2MPTV.js → version-SK256WED.js} +7 -7
- package/{view-PMXWE6QG.js → view-CBYGJ76J.js} +6 -6
- 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-OLZU4KG7.js → whoami-ZT4ZEN2C.js} +2 -2
- package/chunk-J5OZBIY5.js +0 -68
|
@@ -14,36 +14,36 @@ import {
|
|
|
14
14
|
} from "./chunk-AZLX27EM.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VTZZIXYW.js";
|
|
18
18
|
import {
|
|
19
19
|
Query,
|
|
20
20
|
actual
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DJBBJDHI.js";
|
|
22
22
|
import {
|
|
23
23
|
SecurityArchive
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-BIUCOMBH.js";
|
|
25
|
+
import "./chunk-52LBC3AX.js";
|
|
26
26
|
import {
|
|
27
27
|
commandUsage
|
|
28
28
|
} from "./chunk-5E5GX4G6.js";
|
|
29
29
|
import {
|
|
30
30
|
PackageInfoClient
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-INXSTZAX.js";
|
|
32
32
|
import "./chunk-FI5TUER7.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-JQHMLTO5.js";
|
|
34
34
|
import {
|
|
35
35
|
urlOpen
|
|
36
36
|
} from "./chunk-D7U7KDEM.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-YR47M5L7.js";
|
|
38
38
|
import "./chunk-BGQCUUCA.js";
|
|
39
39
|
import "./chunk-E74WGW5C.js";
|
|
40
40
|
import {
|
|
41
41
|
Spec2 as Spec
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-QDGZZ5FZ.js";
|
|
43
43
|
import "./chunk-VCSVHRCS.js";
|
|
44
44
|
import "./chunk-D27QPHKI.js";
|
|
45
45
|
import "./chunk-JLJKOF75.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-XWF3GJKE.js";
|
|
47
47
|
import "./chunk-HTOTG4TS.js";
|
|
48
48
|
import "./chunk-XNLSTHDK.js";
|
|
49
49
|
import {
|
|
@@ -11,22 +11,22 @@ 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-
|
|
14
|
+
} from "./chunk-DJBBJDHI.js";
|
|
15
|
+
import "./chunk-BIUCOMBH.js";
|
|
16
|
+
import "./chunk-52LBC3AX.js";
|
|
17
17
|
import {
|
|
18
18
|
commandUsage
|
|
19
19
|
} from "./chunk-5E5GX4G6.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-YR47M5L7.js";
|
|
21
21
|
import "./chunk-BGQCUUCA.js";
|
|
22
22
|
import "./chunk-E74WGW5C.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-QDGZZ5FZ.js";
|
|
24
24
|
import "./chunk-VCSVHRCS.js";
|
|
25
25
|
import "./chunk-D27QPHKI.js";
|
|
26
26
|
import "./chunk-JLJKOF75.js";
|
|
27
27
|
import {
|
|
28
28
|
isErrorWithCause
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-XWF3GJKE.js";
|
|
30
30
|
import "./chunk-HTOTG4TS.js";
|
|
31
31
|
import "./chunk-XNLSTHDK.js";
|
|
32
32
|
import {
|
|
@@ -15,29 +15,29 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
stderr,
|
|
17
17
|
stdout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-P2HZ4ISK.js";
|
|
19
19
|
import "./chunk-TDTJOKF2.js";
|
|
20
20
|
import {
|
|
21
21
|
ViewClass
|
|
22
22
|
} from "./chunk-RXNA2XCX.js";
|
|
23
23
|
import "./chunk-WGDTG44V.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-TRXTSZFT.js";
|
|
25
25
|
import {
|
|
26
26
|
commandUsage
|
|
27
27
|
} from "./chunk-5E5GX4G6.js";
|
|
28
28
|
import {
|
|
29
29
|
CacheEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-JQHMLTO5.js";
|
|
31
31
|
import "./chunk-D7U7KDEM.js";
|
|
32
32
|
import "./chunk-BGQCUUCA.js";
|
|
33
33
|
import "./chunk-E74WGW5C.js";
|
|
34
34
|
import {
|
|
35
35
|
Spec2 as Spec
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-QDGZZ5FZ.js";
|
|
37
37
|
import "./chunk-VCSVHRCS.js";
|
|
38
38
|
import "./chunk-D27QPHKI.js";
|
|
39
39
|
import "./chunk-JLJKOF75.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-XWF3GJKE.js";
|
|
41
41
|
import "./chunk-XNLSTHDK.js";
|
|
42
42
|
import {
|
|
43
43
|
error
|
|
@@ -12,11 +12,11 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
PackageJson,
|
|
14
14
|
getUser
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YR47M5L7.js";
|
|
16
16
|
import {
|
|
17
17
|
asError,
|
|
18
18
|
normalizeManifest
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XWF3GJKE.js";
|
|
20
20
|
|
|
21
21
|
// ../../src/init/src/index.ts
|
|
22
22
|
import { basename, resolve } from "node:path";
|
|
@@ -16,24 +16,24 @@ import {
|
|
|
16
16
|
stderr,
|
|
17
17
|
stdout,
|
|
18
18
|
styleTextStdout
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-P2HZ4ISK.js";
|
|
20
20
|
import {
|
|
21
21
|
require_emoji_regex
|
|
22
22
|
} from "./chunk-VTEFO2FT.js";
|
|
23
23
|
import {
|
|
24
24
|
createHostContextsMap
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VTZZIXYW.js";
|
|
26
26
|
import {
|
|
27
27
|
Query,
|
|
28
28
|
actual,
|
|
29
29
|
isRunResult
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-DJBBJDHI.js";
|
|
31
31
|
import {
|
|
32
32
|
Monorepo
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YR47M5L7.js";
|
|
34
34
|
import {
|
|
35
35
|
isErrorWithCause
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XWF3GJKE.js";
|
|
37
37
|
import {
|
|
38
38
|
error
|
|
39
39
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BIUCOMBH.js";
|
|
17
17
|
import {
|
|
18
18
|
init
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-52LBC3AX.js";
|
|
20
20
|
import {
|
|
21
21
|
Monorepo,
|
|
22
22
|
PackageJson,
|
|
23
23
|
minimatch,
|
|
24
24
|
platformCheck
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-YR47M5L7.js";
|
|
26
26
|
import {
|
|
27
27
|
rimraf
|
|
28
28
|
} from "./chunk-BGQCUUCA.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
joinExtra,
|
|
50
50
|
splitDepID,
|
|
51
51
|
splitExtra
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-QDGZZ5FZ.js";
|
|
53
53
|
import {
|
|
54
54
|
promiseSpawn
|
|
55
55
|
} from "./chunk-VCSVHRCS.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
patch,
|
|
85
85
|
satisfies,
|
|
86
86
|
shortDependencyTypes
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-XWF3GJKE.js";
|
|
88
88
|
import {
|
|
89
89
|
load,
|
|
90
90
|
walkUp
|
|
@@ -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
|
stderr
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-P2HZ4ISK.js";
|
|
15
15
|
import {
|
|
16
16
|
ViewClass
|
|
17
17
|
} from "./chunk-RXNA2XCX.js";
|
|
18
18
|
import {
|
|
19
19
|
mermaidOutput
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DJBBJDHI.js";
|
|
21
21
|
import {
|
|
22
22
|
urlOpen
|
|
23
23
|
} from "./chunk-D7U7KDEM.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
|
asDependency
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DJBBJDHI.js";
|
|
15
15
|
import {
|
|
16
16
|
Spec2 as Spec,
|
|
17
17
|
joinDepIDTuple
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QDGZZ5FZ.js";
|
|
19
19
|
|
|
20
20
|
// ../../src/cli-sdk/src/parse-add-remove-args.ts
|
|
21
21
|
var rootDepID = joinDepIDTuple(["file", "."]);
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-FI5TUER7.js";
|
|
16
16
|
import {
|
|
17
17
|
RegistryClient
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JQHMLTO5.js";
|
|
19
19
|
import {
|
|
20
20
|
Monorepo,
|
|
21
21
|
PackageJson,
|
|
@@ -23,18 +23,17 @@ import {
|
|
|
23
23
|
pickManifest,
|
|
24
24
|
resolve,
|
|
25
25
|
revs
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-YR47M5L7.js";
|
|
27
27
|
import {
|
|
28
28
|
rimraf
|
|
29
29
|
} from "./chunk-BGQCUUCA.js";
|
|
30
30
|
import {
|
|
31
31
|
Spec2 as Spec
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-QDGZZ5FZ.js";
|
|
33
33
|
import {
|
|
34
34
|
asError,
|
|
35
|
-
asPackument
|
|
36
|
-
|
|
37
|
-
} from "./chunk-HIGHMXU7.js";
|
|
35
|
+
asPackument
|
|
36
|
+
} from "./chunk-XWF3GJKE.js";
|
|
38
37
|
import {
|
|
39
38
|
XDG
|
|
40
39
|
} from "./chunk-XNLSTHDK.js";
|
|
@@ -867,10 +866,15 @@ var PackageInfoClient = class {
|
|
|
867
866
|
async extract(spec, target, options = {}) {
|
|
868
867
|
if (typeof spec === "string")
|
|
869
868
|
spec = Spec.parse(spec, this.options);
|
|
870
|
-
const {
|
|
869
|
+
const {
|
|
870
|
+
from = this.#projectRoot,
|
|
871
|
+
integrity,
|
|
872
|
+
resolved,
|
|
873
|
+
fromLockfile = false
|
|
874
|
+
} = options;
|
|
871
875
|
const f = spec.final;
|
|
872
|
-
const
|
|
873
|
-
const r =
|
|
876
|
+
const alreadyResolved = !!(integrity && resolved);
|
|
877
|
+
const r = alreadyResolved ? { resolved, integrity, spec } : await this.resolve(spec, options);
|
|
874
878
|
switch (f.type) {
|
|
875
879
|
case "git": {
|
|
876
880
|
const {
|
|
@@ -904,41 +908,58 @@ var PackageInfoClient = class {
|
|
|
904
908
|
}
|
|
905
909
|
}
|
|
906
910
|
case "registry": {
|
|
907
|
-
const
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
integrity: r.integrity,
|
|
912
|
-
trustIntegrity
|
|
913
|
-
}
|
|
914
|
-
);
|
|
915
|
-
if (response.statusCode !== 200) {
|
|
916
|
-
throw this.#resolveError(
|
|
917
|
-
spec,
|
|
918
|
-
options,
|
|
919
|
-
"failed to fetch tarball",
|
|
911
|
+
const fetchTarball = async (useCache) => {
|
|
912
|
+
const trustIntegrity = this.#trustedIntegrities.get(r.resolved) === r.integrity;
|
|
913
|
+
const response = await this.registryClient.request(
|
|
914
|
+
r.resolved,
|
|
920
915
|
{
|
|
921
|
-
|
|
922
|
-
|
|
916
|
+
integrity: r.integrity,
|
|
917
|
+
trustIntegrity,
|
|
918
|
+
...useCache === false ? { useCache } : {}
|
|
923
919
|
}
|
|
924
920
|
);
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
this.#trustedIntegrities.set(r.resolved, response.integrity);
|
|
928
|
-
}
|
|
929
|
-
const buf = response.buffer();
|
|
930
|
-
if (r.integrity && !fromLockfile) {
|
|
931
|
-
const hash = createHash("sha512");
|
|
932
|
-
hash.update(buf);
|
|
933
|
-
const computed = `sha512-${hash.digest("base64")}`;
|
|
934
|
-
if (computed !== r.integrity) {
|
|
935
|
-
throw error("Tarball integrity check failed", {
|
|
936
|
-
code: "EINTEGRITY",
|
|
921
|
+
if (response.statusCode !== 200) {
|
|
922
|
+
throw this.#resolveError(
|
|
937
923
|
spec,
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
924
|
+
options,
|
|
925
|
+
"failed to fetch tarball",
|
|
926
|
+
{
|
|
927
|
+
url: r.resolved,
|
|
928
|
+
response
|
|
929
|
+
}
|
|
930
|
+
);
|
|
931
|
+
}
|
|
932
|
+
if (!trustIntegrity && response.checkIntegrity({ spec, url: resolved })) {
|
|
933
|
+
this.#trustedIntegrities.set(
|
|
934
|
+
r.resolved,
|
|
935
|
+
response.integrity
|
|
936
|
+
);
|
|
937
|
+
}
|
|
938
|
+
const buf2 = response.buffer();
|
|
939
|
+
if (r.integrity && !fromLockfile) {
|
|
940
|
+
const hash = createHash("sha512");
|
|
941
|
+
hash.update(buf2);
|
|
942
|
+
const computed = `sha512-${hash.digest("base64")}`;
|
|
943
|
+
if (computed !== r.integrity) {
|
|
944
|
+
throw error("Tarball integrity check failed", {
|
|
945
|
+
code: "EINTEGRITY",
|
|
946
|
+
spec,
|
|
947
|
+
url: r.resolved,
|
|
948
|
+
wanted: r.integrity,
|
|
949
|
+
found: computed
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
return buf2;
|
|
954
|
+
};
|
|
955
|
+
let buf;
|
|
956
|
+
try {
|
|
957
|
+
buf = await fetchTarball();
|
|
958
|
+
} catch (er) {
|
|
959
|
+
if (er instanceof Error && "cause" in er && er.cause?.code === "EINTEGRITY") {
|
|
960
|
+
buf = await fetchTarball(false);
|
|
961
|
+
} else {
|
|
962
|
+
throw er;
|
|
942
963
|
}
|
|
943
964
|
}
|
|
944
965
|
try {
|
|
@@ -1138,39 +1159,53 @@ var PackageInfoClient = class {
|
|
|
1138
1159
|
"no tarball found in manifest.dist"
|
|
1139
1160
|
);
|
|
1140
1161
|
}
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
"failed to fetch tarball",
|
|
1152
|
-
{ response, url: tarball }
|
|
1162
|
+
const fetchTarball = async (useCache) => {
|
|
1163
|
+
const trustIntegrity = this.#trustedIntegrities.get(tarball) === integrity;
|
|
1164
|
+
const response = await this.registryClient.request(
|
|
1165
|
+
tarball,
|
|
1166
|
+
{
|
|
1167
|
+
...options,
|
|
1168
|
+
integrity,
|
|
1169
|
+
trustIntegrity,
|
|
1170
|
+
...useCache === false ? { useCache } : {}
|
|
1171
|
+
}
|
|
1153
1172
|
);
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
this.#trustedIntegrities.set(tarball, response.integrity);
|
|
1157
|
-
}
|
|
1158
|
-
const buf = response.buffer();
|
|
1159
|
-
if (integrity) {
|
|
1160
|
-
const hash = createHash("sha512");
|
|
1161
|
-
hash.update(buf);
|
|
1162
|
-
const computed = `sha512-${hash.digest("base64")}`;
|
|
1163
|
-
if (computed !== integrity) {
|
|
1164
|
-
throw error("Tarball integrity check failed", {
|
|
1165
|
-
code: "EINTEGRITY",
|
|
1173
|
+
if (response.statusCode !== 200) {
|
|
1174
|
+
throw this.#resolveError(
|
|
1166
1175
|
spec,
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1176
|
+
options,
|
|
1177
|
+
"failed to fetch tarball",
|
|
1178
|
+
{ response, url: tarball }
|
|
1179
|
+
);
|
|
1180
|
+
}
|
|
1181
|
+
if (!trustIntegrity && response.checkIntegrity({ spec, url: tarball })) {
|
|
1182
|
+
this.#trustedIntegrities.set(tarball, response.integrity);
|
|
1183
|
+
}
|
|
1184
|
+
const buf = response.buffer();
|
|
1185
|
+
if (integrity) {
|
|
1186
|
+
const hash = createHash("sha512");
|
|
1187
|
+
hash.update(buf);
|
|
1188
|
+
const computed = `sha512-${hash.digest("base64")}`;
|
|
1189
|
+
if (computed !== integrity) {
|
|
1190
|
+
throw error("Tarball integrity check failed", {
|
|
1191
|
+
code: "EINTEGRITY",
|
|
1192
|
+
spec,
|
|
1193
|
+
url: tarball,
|
|
1194
|
+
wanted: integrity,
|
|
1195
|
+
found: computed
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1171
1198
|
}
|
|
1199
|
+
return buf;
|
|
1200
|
+
};
|
|
1201
|
+
try {
|
|
1202
|
+
return await fetchTarball();
|
|
1203
|
+
} catch (er) {
|
|
1204
|
+
if (er instanceof Error && "cause" in er && er.cause?.code === "EINTEGRITY") {
|
|
1205
|
+
return await fetchTarball(false);
|
|
1206
|
+
}
|
|
1207
|
+
throw er;
|
|
1172
1208
|
}
|
|
1173
|
-
return buf;
|
|
1174
1209
|
}
|
|
1175
1210
|
case "git": {
|
|
1176
1211
|
const {
|
|
@@ -1276,15 +1311,6 @@ var PackageInfoClient = class {
|
|
|
1276
1311
|
options
|
|
1277
1312
|
);
|
|
1278
1313
|
if (!mani) throw this.#resolveError(spec, options);
|
|
1279
|
-
const { integrity, tarball } = mani.dist ?? /* c8 ignore next */
|
|
1280
|
-
{};
|
|
1281
|
-
if (isIntegrity(integrity) && tarball) {
|
|
1282
|
-
const registryOrigin = new URL(String(f.registry)).origin;
|
|
1283
|
-
const tgzOrigin = new URL(tarball).origin;
|
|
1284
|
-
if (tgzOrigin === registryOrigin) {
|
|
1285
|
-
this.#trustedIntegrities.set(tarball, integrity);
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
1314
|
if (cachePath) {
|
|
1289
1315
|
const json = JSON.stringify({
|
|
1290
1316
|
...mani,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-FI5TUER7.js";
|
|
17
17
|
import {
|
|
18
18
|
minimatch
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YR47M5L7.js";
|
|
20
20
|
import {
|
|
21
21
|
Spec2 as Spec
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QDGZZ5FZ.js";
|
|
23
23
|
import {
|
|
24
24
|
parse,
|
|
25
25
|
stringify
|
|
@@ -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
|
init
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-52LBC3AX.js";
|
|
15
15
|
import {
|
|
16
16
|
commandUsage
|
|
17
17
|
} from "./chunk-5E5GX4G6.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
asWSConfig,
|
|
20
20
|
assertWSConfig,
|
|
21
21
|
minimatch
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YR47M5L7.js";
|
|
23
23
|
import {
|
|
24
24
|
load,
|
|
25
25
|
save
|
|
@@ -18,18 +18,18 @@ import {
|
|
|
18
18
|
} from "./chunk-RXNA2XCX.js";
|
|
19
19
|
import {
|
|
20
20
|
parseError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TRXTSZFT.js";
|
|
22
22
|
import {
|
|
23
23
|
isGraphRunError,
|
|
24
24
|
splitDepID
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-QDGZZ5FZ.js";
|
|
26
26
|
import {
|
|
27
27
|
defaultView
|
|
28
28
|
} from "./chunk-D27QPHKI.js";
|
|
29
29
|
import {
|
|
30
30
|
isErrorWithCause,
|
|
31
31
|
isObject
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XWF3GJKE.js";
|
|
33
33
|
import {
|
|
34
34
|
XDG
|
|
35
35
|
} from "./chunk-XNLSTHDK.js";
|
|
@@ -12,19 +12,19 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
findCmdShimIfExists,
|
|
14
14
|
install
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DJBBJDHI.js";
|
|
16
16
|
import {
|
|
17
17
|
PackageInfoClient
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-INXSTZAX.js";
|
|
19
19
|
import {
|
|
20
20
|
PathScurry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YR47M5L7.js";
|
|
22
22
|
import {
|
|
23
23
|
Spec2 as Spec
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QDGZZ5FZ.js";
|
|
25
25
|
import {
|
|
26
26
|
parseScope
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-XWF3GJKE.js";
|
|
28
28
|
import {
|
|
29
29
|
walkUp
|
|
30
30
|
} from "./chunk-HTOTG4TS.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
actual,
|
|
14
14
|
callLimit,
|
|
15
15
|
createVirtualRoot
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DJBBJDHI.js";
|
|
17
17
|
import {
|
|
18
18
|
SecurityArchive
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BIUCOMBH.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-4ZFJD5AY.js");
|
|
119
119
|
return Config.load(folder, process.argv, true);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -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
|
PackageInfoClient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-INXSTZAX.js";
|
|
15
15
|
import {
|
|
16
16
|
Monorepo,
|
|
17
17
|
PackageJson,
|
|
18
18
|
PathScurry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YR47M5L7.js";
|
|
20
20
|
import {
|
|
21
21
|
getOptions,
|
|
22
22
|
resetCaches
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QDGZZ5FZ.js";
|
|
24
24
|
import {
|
|
25
25
|
commands,
|
|
26
26
|
definition,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
assertRecordStringString,
|
|
33
33
|
assertRecordStringT,
|
|
34
34
|
isRecordStringString
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-XWF3GJKE.js";
|
|
36
36
|
import {
|
|
37
37
|
find,
|
|
38
38
|
load,
|