@vltpkg/cli-js 1.0.1 → 1.0.3
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-SXQICNAN.js → access-5WETTBDZ.js} +9 -7
- package/{bugs-OOPMFRCI.js → bugs-KONFLIQQ.js} +19 -18
- package/{build-HDXI5OA7.js → build-S7G2DU7I.js} +12 -10
- package/{cache-RW4Y4XNQ.js → cache-Z4OIMLXQ.js} +23 -21
- package/{chunk-RXNA2XCX.js → chunk-4KCU2KZL.js} +8 -1
- package/{chunk-F2FKLPZD.js → chunk-5B23EKN4.js} +4 -4
- package/{chunk-4ZXA6RLP.js → chunk-5QJEOGEM.js} +3 -1
- package/{chunk-CCQYIYTA.js → chunk-5UPPEUG2.js} +11 -11
- package/chunk-BJBFEQRR.js +667 -0
- package/{chunk-MU7Y4R5E.js → chunk-DYCF76WI.js} +4 -4
- package/{chunk-EHEVBLDB.js → chunk-E737X73P.js} +38 -24
- package/{chunk-ICJRCXSG.js → chunk-FFOXTPQA.js} +12 -9
- package/chunk-G7UPIJAP.js +903 -0
- package/{chunk-CNSTFT7U.js → chunk-HAYXR3MW.js} +1 -1
- package/{chunk-U6DM3ROE.js → chunk-HNCE3YE5.js} +1649 -1569
- package/{chunk-2PLIV3N3.js → chunk-IITIX4ID.js} +740 -6
- package/chunk-LPIBYUMT.js +854 -0
- package/{chunk-E5YE7UTZ.js → chunk-LZGKX7JI.js} +114 -50
- package/{chunk-3SQ5Y324.js → chunk-NXEH3NQZ.js} +11 -13
- package/{chunk-MT76WHSM.js → chunk-OCJDISSI.js} +12 -6
- package/chunk-RNJSI3NZ.js +75 -0
- package/{chunk-FAG776ZD.js → chunk-T4GYDWUJ.js} +1 -1
- package/{chunk-VM2RMMY4.js → chunk-TMBNGWXK.js} +3 -3
- package/{chunk-EQ633HIM.js → chunk-UAAZW4N6.js} +4 -4
- package/{chunk-D5CP6O6G.js → chunk-UXIRAU5T.js} +4 -4
- package/{chunk-EFWPI6IY.js → chunk-VB3IWNHX.js} +1 -1
- package/chunk-VE6CCH33.js +3000 -0
- package/{chunk-UCD3RJYG.js → chunk-W2Q5EIMH.js} +8 -8
- package/{chunk-VZ7UNZHR.js → chunk-XQSBCMSC.js} +5 -5
- package/{reporter-2XBYWAVU.js → chunk-XU5SMHXP.js} +35 -10
- package/{ci-MTYU2K2A.js → ci-RZZE375O.js} +17 -16
- package/cli-package.json +1 -1
- package/{config-TVAXCTQO.js → config-LL3RLMZG.js} +9 -12
- package/{config-6NXV2BXW.js → config-MDFY3ORD.js} +15 -18
- package/{create-LXI5DCDW.js → create-GVSDTOGQ.js} +23 -23
- package/{deprecate-2AQBL5XT.js → deprecate-T4TQLGXQ.js} +16 -14
- package/{dist-tag-BFSYLRIH.js → dist-tag-GO46UQUN.js} +11 -9
- package/{docs-ADPJ4B4C.js → docs-FJME563T.js} +19 -18
- package/{exec-GMS54RAC.js → exec-M22KBPCK.js} +23 -23
- package/{exec-cache-R5LVZL5Z.js → exec-cache-3UNLDUAP.js} +22 -22
- package/{exec-local-TVCLZGIM.js → exec-local-YHVO5RLU.js} +20 -18
- package/{help-6CECUD6C.js → help-ZEWMLOJX.js} +3 -3
- package/{init-XXFLGYVP.js → init-4HPZY2KN.js} +12 -10
- package/{install-6KMXYSF5.js → install-2TZIP4PJ.js} +18 -17
- package/{list-RUO3SUKY.js → list-NFFXER43.js} +20 -18
- package/{login-6I2CGO7I.js → login-KV5YC5Z2.js} +9 -7
- package/{logout-JTU4BJKH.js → logout-I2VT3NAR.js} +9 -7
- package/{pack-NCWH2TUA.js → pack-47ZKFSHI.js} +16 -14
- package/package.json +6 -6
- package/{ping-4MEAC2WD.js → ping-Q7Y7QV63.js} +9 -7
- package/{pkg-ENSKG6G7.js → pkg-VTJS2ISJ.js} +13 -11
- package/{profile-62YHNFSO.js → profile-YXZYVEUX.js} +9 -7
- package/{publish-PPY724N2.js → publish-CBN67KN2.js} +21 -19
- package/{query-NLWXKOOT.js → query-U3QHF3ZE.js} +20 -18
- package/{registry-QGI44LG4.js → registry-CZPFR3OF.js} +3 -3
- package/registry-client-package.json +1 -1
- package/registry-client-src-revalidate.js +2080 -349
- package/{repo-BFRAXIVU.js → repo-4UIQRBI7.js} +19 -18
- package/{chunk-4RZDJQ5U.js → reporter-DKZTTACW.js} +5 -5
- package/{run-7O65747G.js → run-5DUYI6GL.js} +20 -18
- package/{run-exec-2OYWHL6K.js → run-exec-HPNBVAXH.js} +20 -18
- package/security-archive-src-update-expired.js +39 -4
- package/{setup-MMIDAIJI.js → setup-23W5FQVW.js} +24 -15
- package/{src-OK3KHDYR.js → src-2NB67FPG.js} +22 -23
- package/src-6OKPBJJT.js +59 -0
- package/src-M5RRGKUM.js +913 -0
- package/{token-VLVXUW54.js → token-SRCS5CRU.js} +9 -7
- package/{uninstall-TAG6QIAG.js → uninstall-JXHAFXZ2.js} +18 -17
- package/{unpublish-Y4L5J2IA.js → unpublish-GRYB5KQH.js} +12 -10
- package/{update-RYH4RKBS.js → update-GDLL4ER6.js} +17 -16
- package/{version-COHB32ON.js → version-JVG4CI4L.js} +13 -11
- package/{view-P7U4MF43.js → view-ABQLVL4L.js} +13 -15
- 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-47MVFMZC.js → whoami-RCCZ7BXI.js} +9 -7
- package/chunk-7NHXV6AH.js +0 -4488
- package/chunk-HB7CKTYO.js +0 -75
- package/chunk-PW6S6AIO.js +0 -716
- package/chunk-WXMYKCQW.js +0 -1640
- package/{chunk-Y7CQIZ7Y.js → chunk-FEIPJIEN.js} +3 -3
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5B23EKN4.js";
|
|
17
17
|
import {
|
|
18
18
|
Monorepo,
|
|
19
19
|
PackageJson,
|
|
20
20
|
getUser,
|
|
21
21
|
minimatch,
|
|
22
22
|
platformCheck
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FFOXTPQA.js";
|
|
24
24
|
import {
|
|
25
25
|
asDepID,
|
|
26
26
|
getId,
|
|
@@ -33,41 +33,47 @@ import {
|
|
|
33
33
|
joinExtra,
|
|
34
34
|
splitDepID,
|
|
35
35
|
splitExtra
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-OCJDISSI.js";
|
|
37
|
+
import {
|
|
38
|
+
Spec as Spec2
|
|
39
|
+
} from "./chunk-XU5SMHXP.js";
|
|
37
40
|
import {
|
|
38
41
|
load,
|
|
39
42
|
walkUp
|
|
40
43
|
} from "./chunk-HTOTG4TS.js";
|
|
41
44
|
import {
|
|
42
|
-
promiseSpawn
|
|
43
|
-
|
|
44
|
-
} from "./chunk-7NHXV6AH.js";
|
|
45
|
-
import {
|
|
46
|
-
Spec,
|
|
47
|
-
Spec2,
|
|
48
|
-
defaultGitHostArchives,
|
|
49
|
-
defaultGitHosts,
|
|
50
|
-
defaultJsrRegistries,
|
|
51
|
-
defaultRegistries,
|
|
52
|
-
defaultRegistryName,
|
|
53
|
-
defaultScopeRegistries,
|
|
54
|
-
getOptions,
|
|
55
|
-
gitHostWebsites
|
|
56
|
-
} from "./chunk-PW6S6AIO.js";
|
|
45
|
+
promiseSpawn
|
|
46
|
+
} from "./chunk-LPIBYUMT.js";
|
|
57
47
|
import {
|
|
58
48
|
graphStep
|
|
59
49
|
} from "./chunk-UBLFPJHV.js";
|
|
60
50
|
import {
|
|
51
|
+
XDG
|
|
52
|
+
} from "./chunk-XNLSTHDK.js";
|
|
53
|
+
import {
|
|
54
|
+
rimraf
|
|
55
|
+
} from "./chunk-BJBFEQRR.js";
|
|
56
|
+
import {
|
|
57
|
+
Spec,
|
|
61
58
|
Version,
|
|
62
59
|
asError,
|
|
63
60
|
asManifest,
|
|
64
61
|
asNormalizedManifest,
|
|
62
|
+
assertPathSafeName,
|
|
65
63
|
assertRecordStringString,
|
|
66
64
|
compare,
|
|
65
|
+
defaultGitHostArchives,
|
|
66
|
+
defaultGitHosts,
|
|
67
|
+
defaultJsrRegistries,
|
|
68
|
+
defaultRegistries,
|
|
69
|
+
defaultRegistryName,
|
|
70
|
+
defaultScopeRegistries,
|
|
67
71
|
dependencyTypes,
|
|
68
72
|
eq,
|
|
69
73
|
expandNormalizedManifestSymbols,
|
|
70
74
|
fastSplit,
|
|
75
|
+
getOptions,
|
|
76
|
+
gitHostWebsites,
|
|
71
77
|
gt,
|
|
72
78
|
gte,
|
|
73
79
|
intersects,
|
|
@@ -86,10 +92,7 @@ import {
|
|
|
86
92
|
satisfies,
|
|
87
93
|
shortDependencyTypes,
|
|
88
94
|
subset
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import {
|
|
91
|
-
XDG
|
|
92
|
-
} from "./chunk-XNLSTHDK.js";
|
|
95
|
+
} from "./chunk-IITIX4ID.js";
|
|
93
96
|
import {
|
|
94
97
|
error,
|
|
95
98
|
typeError
|
|
@@ -4550,6 +4553,11 @@ var Node = class _Node {
|
|
|
4550
4553
|
* The manifest integrity value.
|
|
4551
4554
|
*/
|
|
4552
4555
|
integrity;
|
|
4556
|
+
/**
|
|
4557
|
+
* True when `integrity` and `resolved` came from a lockfile, i.e. they were
|
|
4558
|
+
* verified by the install that wrote them.
|
|
4559
|
+
*/
|
|
4560
|
+
resolvedFromLockfile = false;
|
|
4553
4561
|
/**
|
|
4554
4562
|
* The manifest this node represents in the graph.
|
|
4555
4563
|
*/
|
|
@@ -7657,7 +7665,7 @@ var severity = async (state) => {
|
|
|
7657
7665
|
if (report) {
|
|
7658
7666
|
if (comparator) {
|
|
7659
7667
|
const kindLevel = kindLevelMap.get(kind);
|
|
7660
|
-
if (
|
|
7668
|
+
if (kindLevel == null) break;
|
|
7661
7669
|
for (const alert of report.alerts) {
|
|
7662
7670
|
const alertType = alert.type;
|
|
7663
7671
|
const currentAlertLevelKey = [...kindsMap2.entries()].find(
|
|
@@ -9339,6 +9347,7 @@ var Graph = class {
|
|
|
9339
9347
|
if (to) {
|
|
9340
9348
|
spec2.name = to.name || "(unknown)";
|
|
9341
9349
|
spec2.spec = `${to.name}@${spec2.bareSpec}`;
|
|
9350
|
+
assertPathSafeName(spec2.name, spec2.spec);
|
|
9342
9351
|
} else {
|
|
9343
9352
|
throw error(
|
|
9344
9353
|
"Impossible to place a missing, nameless dependency",
|
|
@@ -9602,7 +9611,18 @@ var retrieveNodeFromGraph = (key, value, graph, fromId, seenNodes) => {
|
|
|
9602
9611
|
}
|
|
9603
9612
|
return foundNode;
|
|
9604
9613
|
};
|
|
9605
|
-
var
|
|
9614
|
+
var parseEdgeSpec = (specName, bareSpec, options, cache) => {
|
|
9615
|
+
if (!cache || specName === "(unknown)") {
|
|
9616
|
+
return Spec.parse(specName, bareSpec, options);
|
|
9617
|
+
}
|
|
9618
|
+
const key = `${cache.prefix}\0${specName}\0${bareSpec}`;
|
|
9619
|
+
const cached = cache.specCache.get(key);
|
|
9620
|
+
if (cached) return cached;
|
|
9621
|
+
const spec2 = Spec.parse(specName, bareSpec, options);
|
|
9622
|
+
cache.specCache.set(key, spec2);
|
|
9623
|
+
return spec2;
|
|
9624
|
+
};
|
|
9625
|
+
var loadEdges = (graph, edges, options, cache) => {
|
|
9606
9626
|
const entries = Object.entries(edges);
|
|
9607
9627
|
const edgeCount = entries.length;
|
|
9608
9628
|
const useOptimizations = edgeCount > 50;
|
|
@@ -9655,10 +9675,11 @@ var loadEdges = (graph, edges, options) => {
|
|
|
9655
9675
|
toNode = graph.nodes.get(asDepID(toId));
|
|
9656
9676
|
}
|
|
9657
9677
|
}
|
|
9658
|
-
const spec2 =
|
|
9678
|
+
const spec2 = parseEdgeSpec(
|
|
9659
9679
|
specName,
|
|
9660
9680
|
valRest.substring(0, vrSplit),
|
|
9661
|
-
options
|
|
9681
|
+
options,
|
|
9682
|
+
cache
|
|
9662
9683
|
);
|
|
9663
9684
|
if (useOptimizations) {
|
|
9664
9685
|
edgeProcessingQueue.push({
|
|
@@ -9689,6 +9710,7 @@ var loadNodes = (graph, nodes, options, actual2, throwOnMissingManifest) => {
|
|
|
9689
9710
|
const nodeCount = entries.length;
|
|
9690
9711
|
const registryVersionCache = nodeCount > 50 ? /* @__PURE__ */ new Map() : null;
|
|
9691
9712
|
for (const [id2, lockfileNode] of entries) {
|
|
9713
|
+
asDepID(id2);
|
|
9692
9714
|
const [
|
|
9693
9715
|
flags,
|
|
9694
9716
|
name,
|
|
@@ -9750,6 +9772,7 @@ var loadNodes = (graph, nodes, options, actual2, throwOnMissingManifest) => {
|
|
|
9750
9772
|
node.optional = optional2;
|
|
9751
9773
|
node.integrity = integrity ?? referenceNode?.integrity;
|
|
9752
9774
|
node.resolved = type2 === "remote" ? filepath : resolved ?? referenceNode?.resolved;
|
|
9775
|
+
node.resolvedFromLockfile = !!(node.integrity && node.resolved);
|
|
9753
9776
|
node.projectRoot = graph.projectRoot;
|
|
9754
9777
|
if (!node.resolved) node.setResolved();
|
|
9755
9778
|
if (location) {
|
|
@@ -9780,11 +9803,12 @@ var loadLockfile = (projectRoot, lockfilePath) => JSON.parse(
|
|
|
9780
9803
|
encoding: "utf8"
|
|
9781
9804
|
})
|
|
9782
9805
|
);
|
|
9806
|
+
var loadData = (projectRoot, lockfilePath = "vlt-lock.json") => loadLockfile(projectRoot, lockfilePath);
|
|
9783
9807
|
var load3 = (options) => {
|
|
9784
9808
|
const { projectRoot } = options;
|
|
9785
9809
|
return loadObject(
|
|
9786
9810
|
options,
|
|
9787
|
-
loadLockfile(projectRoot, "vlt-lock.json")
|
|
9811
|
+
options.lockfileData ?? loadLockfile(projectRoot, "vlt-lock.json")
|
|
9788
9812
|
);
|
|
9789
9813
|
};
|
|
9790
9814
|
var loadHidden = (options) => {
|
|
@@ -9897,7 +9921,11 @@ var loadObject = (options, lockfileData2) => {
|
|
|
9897
9921
|
options.actual,
|
|
9898
9922
|
options.throwOnMissingManifest
|
|
9899
9923
|
);
|
|
9900
|
-
|
|
9924
|
+
const specCache = options.modifiers || !options.specCache ? void 0 : {
|
|
9925
|
+
specCache: options.specCache,
|
|
9926
|
+
prefix: JSON.stringify(lockfileOptions)
|
|
9927
|
+
};
|
|
9928
|
+
loadEdges(graph, lockfileData2.edges, mergedOptions, specCache);
|
|
9901
9929
|
for (const node of graph.nodes.values()) {
|
|
9902
9930
|
const [firstEdge] = node.edgesIn;
|
|
9903
9931
|
if (firstEdge?.spec.registry) {
|
|
@@ -11767,6 +11795,17 @@ var fixupAddedNames = (add, manifest, options, spec2) => {
|
|
|
11767
11795
|
return spec2;
|
|
11768
11796
|
};
|
|
11769
11797
|
|
|
11798
|
+
// ../../src/graph/src/path-security-error.ts
|
|
11799
|
+
var codes = /* @__PURE__ */ new Set(["EINVALIDNAME"]);
|
|
11800
|
+
var isPathSecurityError = (er) => {
|
|
11801
|
+
for (let e = er; e && typeof e === "object"; e = e.cause) {
|
|
11802
|
+
const { code } = e;
|
|
11803
|
+
if (typeof code === "string" && codes.has(code))
|
|
11804
|
+
return true;
|
|
11805
|
+
}
|
|
11806
|
+
return false;
|
|
11807
|
+
};
|
|
11808
|
+
|
|
11770
11809
|
// ../../src/graph/src/reify/extract-node.ts
|
|
11771
11810
|
var getOptionalFailedNodeRemover = (node, diff2) => {
|
|
11772
11811
|
return diff2 ? optionalFail(diff2, node) : node.isOptional() ? () => removeOptionalSubgraph(node.graph, node) : void 0;
|
|
@@ -11797,15 +11836,21 @@ var extractNode = async (node, scurry, remover, options, packageInfo, diff2) =>
|
|
|
11797
11836
|
error: new Error("Platform check failed or package deprecated")
|
|
11798
11837
|
};
|
|
11799
11838
|
}
|
|
11839
|
+
const extractOptions = {
|
|
11840
|
+
from,
|
|
11841
|
+
integrity,
|
|
11842
|
+
resolved,
|
|
11843
|
+
fromLockfile: node.resolvedFromLockfile
|
|
11844
|
+
};
|
|
11800
11845
|
try {
|
|
11801
11846
|
await remover.rm(target);
|
|
11802
11847
|
if (removeOptionalFailedNode) {
|
|
11803
11848
|
try {
|
|
11804
|
-
const result = await packageInfo.extract(
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11849
|
+
const result = await packageInfo.extract(
|
|
11850
|
+
spec2,
|
|
11851
|
+
target,
|
|
11852
|
+
extractOptions
|
|
11853
|
+
);
|
|
11809
11854
|
if (result.integrity && !node.integrity) {
|
|
11810
11855
|
node.integrity = result.integrity;
|
|
11811
11856
|
}
|
|
@@ -11815,11 +11860,11 @@ var extractNode = async (node, scurry, remover, options, packageInfo, diff2) =>
|
|
|
11815
11860
|
return { success: false, node, error: error2 };
|
|
11816
11861
|
}
|
|
11817
11862
|
} else {
|
|
11818
|
-
const result = await packageInfo.extract(
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11863
|
+
const result = await packageInfo.extract(
|
|
11864
|
+
spec2,
|
|
11865
|
+
target,
|
|
11866
|
+
extractOptions
|
|
11867
|
+
);
|
|
11823
11868
|
if (result.integrity && !node.integrity) {
|
|
11824
11869
|
node.integrity = result.integrity;
|
|
11825
11870
|
}
|
|
@@ -11973,7 +12018,7 @@ var checkPeerEdgesCompatible = (existingNode, fromNode, peerContext, graph) => {
|
|
|
11973
12018
|
existingTarget,
|
|
11974
12019
|
peerSpec
|
|
11975
12020
|
);
|
|
11976
|
-
if (existingTargetSatisfiesPeer && nodeSatisfiesAll(existingTarget, contextEntry.specs)) {
|
|
12021
|
+
if (existingTargetSatisfiesPeer && nodeSatisfiesAll(existingTarget, contextEntry.specs.values())) {
|
|
11977
12022
|
continue;
|
|
11978
12023
|
}
|
|
11979
12024
|
const result = buildIncompatibleResult(
|
|
@@ -12045,9 +12090,13 @@ var retrievePeerContextHash = (peerContext) => {
|
|
|
12045
12090
|
if (!peerContext?.index) return void 0;
|
|
12046
12091
|
return `peer.${peerContext.index}`;
|
|
12047
12092
|
};
|
|
12093
|
+
var peerSpecKey = (spec2) => {
|
|
12094
|
+
const f = spec2.final;
|
|
12095
|
+
return `${f.type}\0${String(f)}\0${f.registry ?? ""}`;
|
|
12096
|
+
};
|
|
12048
12097
|
var incompatibleSpecs = (spec2, entry) => {
|
|
12049
12098
|
if (entry.specs.size > 0) {
|
|
12050
|
-
for (const s_ of entry.specs) {
|
|
12099
|
+
for (const s_ of entry.specs.values()) {
|
|
12051
12100
|
const s = s_.final;
|
|
12052
12101
|
if (
|
|
12053
12102
|
// Registry types: check semver range intersection
|
|
@@ -12080,7 +12129,7 @@ var addEntriesToPeerContext = (peerContext, entries, fromNode, monorepo) => {
|
|
|
12080
12129
|
if (!entry) {
|
|
12081
12130
|
entry = {
|
|
12082
12131
|
active: true,
|
|
12083
|
-
specs: /* @__PURE__ */ new
|
|
12132
|
+
specs: /* @__PURE__ */ new Map([[peerSpecKey(spec2), spec2]]),
|
|
12084
12133
|
target,
|
|
12085
12134
|
type: type2,
|
|
12086
12135
|
contextDependents: /* @__PURE__ */ new Set()
|
|
@@ -12090,7 +12139,7 @@ var addEntriesToPeerContext = (peerContext, entries, fromNode, monorepo) => {
|
|
|
12090
12139
|
continue;
|
|
12091
12140
|
}
|
|
12092
12141
|
if (incompatibleSpecs(spec2.final, entry)) return true;
|
|
12093
|
-
if (target && [...entry.specs].every(
|
|
12142
|
+
if (target && [...entry.specs.values()].every(
|
|
12094
12143
|
(s) => satisfies2(
|
|
12095
12144
|
target.id,
|
|
12096
12145
|
s,
|
|
@@ -12112,7 +12161,8 @@ var addEntriesToPeerContext = (peerContext, entries, fromNode, monorepo) => {
|
|
|
12112
12161
|
}
|
|
12113
12162
|
entry.target ??= target;
|
|
12114
12163
|
}
|
|
12115
|
-
|
|
12164
|
+
const specKey = peerSpecKey(spec2);
|
|
12165
|
+
if (!entry.specs.has(specKey)) entry.specs.set(specKey, spec2);
|
|
12116
12166
|
if (dependent) entry.contextDependents.add(dependent);
|
|
12117
12167
|
}
|
|
12118
12168
|
return false;
|
|
@@ -12130,7 +12180,7 @@ var forkPeerContext = (graph, peerContext, entries) => {
|
|
|
12130
12180
|
for (const [name, entry] of peerContext.entries()) {
|
|
12131
12181
|
nextPeerContext.set(name, {
|
|
12132
12182
|
active: false,
|
|
12133
|
-
specs: new
|
|
12183
|
+
specs: new Map(entry.specs),
|
|
12134
12184
|
target: void 0,
|
|
12135
12185
|
type: entry.type,
|
|
12136
12186
|
contextDependents: new Set(entry.contextDependents)
|
|
@@ -12141,7 +12191,7 @@ var forkPeerContext = (graph, peerContext, entries) => {
|
|
|
12141
12191
|
const name = target?.name ?? spec2.final.name;
|
|
12142
12192
|
const newEntry = {
|
|
12143
12193
|
active: true,
|
|
12144
|
-
specs: /* @__PURE__ */ new
|
|
12194
|
+
specs: /* @__PURE__ */ new Map([[peerSpecKey(spec2), spec2]]),
|
|
12145
12195
|
target,
|
|
12146
12196
|
type: type2,
|
|
12147
12197
|
contextDependents: dependent ? /* @__PURE__ */ new Set([dependent]) : /* @__PURE__ */ new Set()
|
|
@@ -12299,7 +12349,10 @@ var endPeerPlacement = (peerContext, nextDeps, nextPeerDeps, graph, spec2, fromN
|
|
|
12299
12349
|
const entry = peerContext.get(name);
|
|
12300
12350
|
if (!node.edgesOut.has(name) && entry?.target && nodeSatisfiesSpec(entry.target, spec3, fromNode, graph)) {
|
|
12301
12351
|
graph.addEdge(type3, spec3, node, entry.target);
|
|
12302
|
-
|
|
12352
|
+
const finalKey = peerSpecKey(spec3.final);
|
|
12353
|
+
if (!entry.specs.has(finalKey)) {
|
|
12354
|
+
entry.specs.set(finalKey, spec3.final);
|
|
12355
|
+
}
|
|
12303
12356
|
continue;
|
|
12304
12357
|
}
|
|
12305
12358
|
if (type3 === "peerOptional") {
|
|
@@ -12483,6 +12536,7 @@ var fetchManifestsForDeps = async (packageInfo, graph, fromNode, deps, scurry, p
|
|
|
12483
12536
|
// part of a graph (either lockfile or actual) and it has valid manifest
|
|
12484
12537
|
// data so we shortcut the package info manifest fetch here
|
|
12485
12538
|
existingNode?.detached && existingNode.manifest ? Promise.resolve(existingNode.manifest) : packageInfo.manifest(spec2, { from: scurry.resolve(fromNode.location) }).then((manifest) => manifest).catch((er) => {
|
|
12539
|
+
if (isPathSecurityError(er)) throw er;
|
|
12486
12540
|
if (edgeOptional || fromNode.optional) {
|
|
12487
12541
|
return void 0;
|
|
12488
12542
|
}
|
|
@@ -12554,7 +12608,8 @@ var processPlacementTasks = async (graph, options, placementTasks, add, modifier
|
|
|
12554
12608
|
fromNode,
|
|
12555
12609
|
type2,
|
|
12556
12610
|
spec2,
|
|
12557
|
-
|
|
12611
|
+
// report broken manifest names against the dependency spec
|
|
12612
|
+
normalizeManifest(manifest, String(spec2)),
|
|
12558
12613
|
fileTypeInfo?.id,
|
|
12559
12614
|
joinExtra({ peerSetHash, modifier: queryModifier })
|
|
12560
12615
|
);
|
|
@@ -12934,6 +12989,7 @@ var build3 = async (options) => {
|
|
|
12934
12989
|
monorepo
|
|
12935
12990
|
});
|
|
12936
12991
|
} catch (err) {
|
|
12992
|
+
if (isPathSecurityError(err)) throw err;
|
|
12937
12993
|
const cause = err.cause;
|
|
12938
12994
|
if (cause?.code === "ELOCKFILEVERSION") {
|
|
12939
12995
|
if (typeof cause.found === "number" && typeof cause.wanted === "number") {
|
|
@@ -14055,6 +14111,7 @@ var createVirtualRoot = (name = "virtual-root", options, mainImporters) => {
|
|
|
14055
14111
|
var actual = { load: load4 };
|
|
14056
14112
|
var lockfile = {
|
|
14057
14113
|
load: load3,
|
|
14114
|
+
loadData,
|
|
14058
14115
|
loadEdges,
|
|
14059
14116
|
loadNodes,
|
|
14060
14117
|
save
|
|
@@ -14095,6 +14152,8 @@ var install = async (options, add) => {
|
|
|
14095
14152
|
packageJson: options.packageJson,
|
|
14096
14153
|
scurry: options.scurry
|
|
14097
14154
|
});
|
|
14155
|
+
const specCache = /* @__PURE__ */ new Map();
|
|
14156
|
+
const lockfileData2 = options.frozenLockfile ? loadData(options.projectRoot) : void 0;
|
|
14098
14157
|
if (options.frozenLockfile) {
|
|
14099
14158
|
if (add?.modifiedDependencies) {
|
|
14100
14159
|
const dependencies = [];
|
|
@@ -14111,7 +14170,9 @@ var install = async (options, add) => {
|
|
|
14111
14170
|
const lockfileGraph = load3({
|
|
14112
14171
|
...options,
|
|
14113
14172
|
mainManifest,
|
|
14114
|
-
monorepo: fullMonorepo
|
|
14173
|
+
monorepo: fullMonorepo,
|
|
14174
|
+
specCache,
|
|
14175
|
+
lockfileData: lockfileData2
|
|
14115
14176
|
});
|
|
14116
14177
|
const emptyAdd = Object.assign(
|
|
14117
14178
|
/* @__PURE__ */ new Map(),
|
|
@@ -14211,7 +14272,8 @@ var install = async (options, add) => {
|
|
|
14211
14272
|
loadManifests: true,
|
|
14212
14273
|
modifiers: void 0,
|
|
14213
14274
|
// modifiers should not be used here
|
|
14214
|
-
monorepo: fullMonorepo
|
|
14275
|
+
monorepo: fullMonorepo,
|
|
14276
|
+
specCache
|
|
14215
14277
|
});
|
|
14216
14278
|
if (act.importers.size === act.nodes.size) {
|
|
14217
14279
|
act = void 0;
|
|
@@ -14225,7 +14287,9 @@ var install = async (options, add) => {
|
|
|
14225
14287
|
modifiers,
|
|
14226
14288
|
remove,
|
|
14227
14289
|
remover,
|
|
14228
|
-
monorepo: fullMonorepo
|
|
14290
|
+
monorepo: fullMonorepo,
|
|
14291
|
+
specCache,
|
|
14292
|
+
lockfileData: lockfileData2
|
|
14229
14293
|
});
|
|
14230
14294
|
if (options.lockfileOnly) {
|
|
14231
14295
|
lockfile.save({ ...options, graph, modifiers });
|
|
@@ -11,24 +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-G7UPIJAP.js";
|
|
15
15
|
import {
|
|
16
16
|
Monorepo,
|
|
17
17
|
PackageJson,
|
|
18
18
|
PathScurry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FFOXTPQA.js";
|
|
20
20
|
import {
|
|
21
21
|
resetCaches
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
find,
|
|
25
|
-
load,
|
|
26
|
-
reload,
|
|
27
|
-
save
|
|
28
|
-
} from "./chunk-HTOTG4TS.js";
|
|
29
|
-
import {
|
|
30
|
-
getOptions
|
|
31
|
-
} from "./chunk-PW6S6AIO.js";
|
|
22
|
+
} from "./chunk-OCJDISSI.js";
|
|
32
23
|
import {
|
|
33
24
|
commands,
|
|
34
25
|
definition,
|
|
@@ -36,11 +27,18 @@ import {
|
|
|
36
27
|
isRecordField,
|
|
37
28
|
recordFields
|
|
38
29
|
} from "./chunk-WP6CYBPM.js";
|
|
30
|
+
import {
|
|
31
|
+
find,
|
|
32
|
+
load,
|
|
33
|
+
reload,
|
|
34
|
+
save
|
|
35
|
+
} from "./chunk-HTOTG4TS.js";
|
|
39
36
|
import {
|
|
40
37
|
assertRecordStringString,
|
|
41
38
|
assertRecordStringT,
|
|
39
|
+
getOptions,
|
|
42
40
|
isRecordStringString
|
|
43
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-IITIX4ID.js";
|
|
44
42
|
import {
|
|
45
43
|
error
|
|
46
44
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -9,12 +9,14 @@ 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
|
+
Spec as Spec2
|
|
14
|
+
} from "./chunk-XU5SMHXP.js";
|
|
12
15
|
import {
|
|
13
16
|
Spec,
|
|
14
|
-
Spec2,
|
|
15
17
|
currentDefaultRegistryName,
|
|
16
18
|
defaultRegistryName
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IITIX4ID.js";
|
|
18
20
|
import {
|
|
19
21
|
error
|
|
20
22
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -25,10 +27,12 @@ var EXTRA_PEER_SET_DELIMITER = "peer.";
|
|
|
25
27
|
var depIDRegExp = new RegExp(
|
|
26
28
|
`^((git)?${delimiter}[^${delimiter}]*${delimiter}[^${delimiter}]*(${delimiter}[^${delimiter}]*)?$|^(file|remote|workspace)${delimiter}[^${delimiter}]*)(${delimiter}[^${delimiter}]*)?$`
|
|
27
29
|
);
|
|
28
|
-
var
|
|
30
|
+
var pathUnsafeDepID = (str) => /[/\\\x00-\x1f\x7f]/.test(str) || /^[A-Za-z]:/.test(str) || str.split(delimiter).some((p) => p === "." || p === "..");
|
|
31
|
+
var isDepID = (str) => typeof str === "string" && depIDRegExp.test(str) && !pathUnsafeDepID(str);
|
|
29
32
|
var asDepID = (str) => {
|
|
30
33
|
if (!isDepID(str)) {
|
|
31
|
-
throw error(
|
|
34
|
+
throw error(`Expected dep id.`, {
|
|
35
|
+
code: "EINVALIDNAME",
|
|
32
36
|
found: str
|
|
33
37
|
});
|
|
34
38
|
}
|
|
@@ -287,7 +291,8 @@ var hydrateTuple = (tuple, name, options = {}) => {
|
|
|
287
291
|
if (!first) {
|
|
288
292
|
throw error("no name/path on workspace id", { found: tuple });
|
|
289
293
|
}
|
|
290
|
-
|
|
294
|
+
const workspaceName = name ?? first.slice(first.lastIndexOf("/") + 1);
|
|
295
|
+
res = workspaceName !== first ? Spec.parse(workspaceName, `workspace:${first}@*`, options) : Spec.parse(first, "workspace:*", options);
|
|
291
296
|
break;
|
|
292
297
|
}
|
|
293
298
|
}
|
|
@@ -503,7 +508,8 @@ var hydrateTuple2 = (tuple, name, options = {}) => {
|
|
|
503
508
|
if (!first) {
|
|
504
509
|
throw error("no name/path on workspace id", { found: tuple });
|
|
505
510
|
}
|
|
506
|
-
|
|
511
|
+
const workspaceName = name ?? first.slice(first.lastIndexOf("/") + 1);
|
|
512
|
+
res = workspaceName !== first ? Spec2.parse(workspaceName, `workspace:${first}@*`, options) : Spec2.parse(first, "workspace:*", options);
|
|
507
513
|
break;
|
|
508
514
|
}
|
|
509
515
|
}
|
|
@@ -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-5WETTBDZ.js"),
|
|
22
|
+
"./commands/bugs.ts": () => import("./bugs-KONFLIQQ.js"),
|
|
23
|
+
"./commands/build.ts": () => import("./build-S7G2DU7I.js"),
|
|
24
|
+
"./commands/cache.ts": () => import("./cache-Z4OIMLXQ.js"),
|
|
25
|
+
"./commands/ci.ts": () => import("./ci-RZZE375O.js"),
|
|
26
|
+
"./commands/config.ts": () => import("./config-MDFY3ORD.js"),
|
|
27
|
+
"./commands/create.ts": () => import("./create-GVSDTOGQ.js"),
|
|
28
|
+
"./commands/deprecate.ts": () => import("./deprecate-T4TQLGXQ.js"),
|
|
29
|
+
"./commands/dist-tag.ts": () => import("./dist-tag-GO46UQUN.js"),
|
|
30
|
+
"./commands/docs.ts": () => import("./docs-FJME563T.js"),
|
|
31
|
+
"./commands/exec-cache.ts": () => import("./exec-cache-3UNLDUAP.js"),
|
|
32
|
+
"./commands/exec-local.ts": () => import("./exec-local-YHVO5RLU.js"),
|
|
33
|
+
"./commands/exec.ts": () => import("./exec-M22KBPCK.js"),
|
|
34
|
+
"./commands/help.ts": () => import("./help-ZEWMLOJX.js"),
|
|
35
|
+
"./commands/init.ts": () => import("./init-4HPZY2KN.js"),
|
|
36
|
+
"./commands/install.ts": () => import("./install-2TZIP4PJ.js"),
|
|
37
|
+
"./commands/install/reporter.ts": () => import("./reporter-DKZTTACW.js"),
|
|
38
|
+
"./commands/list.ts": () => import("./list-NFFXER43.js"),
|
|
39
|
+
"./commands/login.ts": () => import("./login-KV5YC5Z2.js"),
|
|
40
|
+
"./commands/logout.ts": () => import("./logout-I2VT3NAR.js"),
|
|
41
|
+
"./commands/pack.ts": () => import("./pack-47ZKFSHI.js"),
|
|
42
|
+
"./commands/ping.ts": () => import("./ping-Q7Y7QV63.js"),
|
|
43
|
+
"./commands/pkg.ts": () => import("./pkg-VTJS2ISJ.js"),
|
|
44
|
+
"./commands/profile.ts": () => import("./profile-YXZYVEUX.js"),
|
|
45
|
+
"./commands/publish.ts": () => import("./publish-CBN67KN2.js"),
|
|
46
|
+
"./commands/query.ts": () => import("./query-U3QHF3ZE.js"),
|
|
47
|
+
"./commands/registry.ts": () => import("./registry-CZPFR3OF.js"),
|
|
48
|
+
"./commands/repo.ts": () => import("./repo-4UIQRBI7.js"),
|
|
49
|
+
"./commands/run-exec.ts": () => import("./run-exec-HPNBVAXH.js"),
|
|
50
|
+
"./commands/run.ts": () => import("./run-5DUYI6GL.js"),
|
|
51
|
+
"./commands/setup.ts": () => import("./setup-23W5FQVW.js"),
|
|
52
|
+
"./commands/token.ts": () => import("./token-SRCS5CRU.js"),
|
|
53
|
+
"./commands/uninstall.ts": () => import("./uninstall-JXHAFXZ2.js"),
|
|
54
|
+
"./commands/unpublish.ts": () => import("./unpublish-GRYB5KQH.js"),
|
|
55
|
+
"./commands/update.ts": () => import("./update-GDLL4ER6.js"),
|
|
56
|
+
"./commands/version.ts": () => import("./version-JVG4CI4L.js"),
|
|
57
|
+
"./commands/view.ts": () => import("./view-ABQLVL4L.js"),
|
|
58
|
+
"./commands/whoami.ts": () => import("./whoami-RCCZ7BXI.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
|
+
};
|
|
@@ -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
|
defaultRegistries
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IITIX4ID.js";
|
|
15
15
|
import {
|
|
16
16
|
error
|
|
17
17
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
actual,
|
|
14
14
|
callLimit,
|
|
15
15
|
createVirtualRoot
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LZGKX7JI.js";
|
|
17
17
|
import {
|
|
18
18
|
SecurityArchive
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5B23EKN4.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-LL3RLMZG.js");
|
|
119
119
|
return Config.load(folder, process.argv, true);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
} from "./chunk-FWKQ7YDF.js";
|
|
17
17
|
import {
|
|
18
18
|
minimatch
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FFOXTPQA.js";
|
|
20
|
+
import {
|
|
21
|
+
Spec
|
|
22
|
+
} from "./chunk-XU5SMHXP.js";
|
|
20
23
|
import {
|
|
21
24
|
parse,
|
|
22
25
|
stringify
|
|
23
26
|
} from "./chunk-HTOTG4TS.js";
|
|
24
|
-
import {
|
|
25
|
-
Spec2 as Spec
|
|
26
|
-
} from "./chunk-PW6S6AIO.js";
|
|
27
27
|
import {
|
|
28
28
|
error
|
|
29
29
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -11,14 +11,14 @@ 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-LZGKX7JI.js";
|
|
15
15
|
import {
|
|
16
16
|
joinDepIDTuple,
|
|
17
17
|
splitDepID
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OCJDISSI.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
Spec
|
|
21
|
+
} from "./chunk-XU5SMHXP.js";
|
|
22
22
|
|
|
23
23
|
// ../../src/cli-sdk/src/parse-add-remove-args.ts
|
|
24
24
|
import { isAbsolute, relative, resolve } from "node:path";
|