@vltpkg/cli-js 1.0.0-rc.30 → 1.0.0-rc.32
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-I7Q5S4HE.js → access-SQZRJLJA.js} +2 -2
- package/{bugs-XJDVOIWV.js → bugs-BMZ5UERM.js} +9 -9
- package/{build-KFMSG6YJ.js → build-LGQI6OGM.js} +6 -6
- package/{cache-RL4MUZZ4.js → cache-JWHNATAX.js} +6 -6
- package/{chunk-6SMCDBB5.js → chunk-3TVABXAG.js} +2 -2
- package/{chunk-LPLXAVG7.js → chunk-5UXEBLLT.js} +3 -3
- package/{chunk-Q3DNNTPG.js → chunk-6YXVQ5HC.js} +112 -7
- package/{chunk-AAO77QBG.js → chunk-7XE7OES7.js} +62 -12
- package/{chunk-IYO5QKUW.js → chunk-DFNHGGGV.js} +1 -1
- package/{chunk-UUE6D7ZK.js → chunk-DI2CYYXF.js} +1 -1
- package/{chunk-EGIFRSA7.js → chunk-DIKKTUBV.js} +2 -2
- package/{chunk-MAIQR5GM.js → chunk-DM3WGEVB.js} +1 -1
- package/chunk-FXIBCUIM.js +73 -0
- package/{chunk-CX6CSVSZ.js → chunk-G6PG3AGN.js} +5 -5
- package/{chunk-TYV4N3S3.js → chunk-IAKUGHGT.js} +1 -1
- package/{chunk-QI6JZT5E.js → chunk-JBVLIV37.js} +2 -2
- package/{chunk-IEISSXS4.js → chunk-JKAZKVQU.js} +3 -2
- package/{chunk-XYCCQT7N.js → chunk-KRGA5VLT.js} +3 -3
- package/{chunk-DPQWORL7.js → chunk-LEX7YPHR.js} +4 -4
- package/{chunk-YXHBZAYO.js → chunk-M2WD7IBO.js} +1 -1
- package/{chunk-FXFN5J74.js → chunk-SDBTQF2Y.js} +5 -5
- package/{chunk-I626GJCR.js → chunk-SIXXDCBI.js} +5 -5
- package/{chunk-LUL76G2K.js → chunk-XFQ2EH5D.js} +3 -3
- package/{chunk-E76YOTJF.js → chunk-YQXDHMHG.js} +238 -42
- package/{chunk-BCS77CZK.js → chunk-ZUP6UTME.js} +1 -1
- package/{ci-25PDKMKT.js → ci-FQJANSQW.js} +7 -7
- package/cli-package.json +1 -1
- package/{config-SGKD6FN7.js → config-4KQTTXJH.js} +8 -8
- package/{config-EUN3UG63.js → config-LRL3N7TN.js} +7 -7
- package/{create-7MBL7X4J.js → create-KN6AXEA6.js} +13 -13
- package/{deprecate-RXSOKRB6.js → deprecate-P26WHVFB.js} +6 -6
- package/{dist-tag-TR6YTPWB.js → dist-tag-FA2BT7SA.js} +3 -3
- package/{docs-SXJQN3VK.js → docs-OAPIY4SC.js} +9 -9
- package/{exec-GZUI7N7U.js → exec-CVZGHJZS.js} +13 -13
- package/{exec-cache-ERIWZB3O.js → exec-cache-3AHODVRN.js} +11 -11
- package/{exec-local-5EIXJDU2.js → exec-local-I4OJX76E.js} +10 -10
- package/{help-VZXBYP36.js → help-QFIQSPNS.js} +1 -1
- package/{init-B3GRYNH5.js → init-QLADIAP5.js} +7 -7
- package/{install-GFUAOCU3.js → install-B7CU2BLC.js} +8 -8
- package/{list-SWSGDOS2.js → list-OTFV3LOM.js} +10 -10
- package/{login-2QU5SPGP.js → login-LG2ZOIDQ.js} +2 -2
- package/{logout-DVW3KZKJ.js → logout-KUI773AM.js} +2 -2
- package/{pack-GNYL35NY.js → pack-C55TTBIQ.js} +8 -8
- package/package.json +1 -1
- package/{ping-5NKJAV3C.js → ping-VNUOC26G.js} +2 -2
- package/{pkg-XGXCIZCS.js → pkg-H4RJEBK5.js} +8 -8
- package/{profile-OZYH6GL2.js → profile-DIJ5JUSE.js} +2 -2
- package/{publish-PUXCD3CT.js → publish-XF2TRBPH.js} +9 -9
- package/{query-TUQMPQGD.js → query-BGP5JMJ7.js} +10 -10
- package/registry-client-package.json +1 -1
- package/{repo-ALXGJFIG.js → repo-NCEHK7KB.js} +9 -9
- package/{reporter-MSQWYN76.js → reporter-OB6SNHOZ.js} +2 -2
- package/{run-GM2E5WHJ.js → run-ZNJJYEJF.js} +10 -10
- package/{run-exec-3AMM56A3.js → run-exec-F5OV7MVN.js} +10 -10
- package/security-archive-src-update-expired.js +2 -1
- package/{src-QQVS7FWK.js → src-M3WI7TSB.js} +10 -10
- package/{token-MW32RFPW.js → token-KXCVRJGF.js} +5 -3
- package/{uninstall-QTAVWQNB.js → uninstall-33SUWR6K.js} +8 -8
- package/{unpublish-B5JROG62.js → unpublish-7AZPBZF2.js} +3 -3
- package/{update-P274ATK3.js → update-2EQF6IKZ.js} +7 -7
- package/{version-23AKGCGL.js → version-HFYI3SEX.js} +7 -7
- package/{view-Q35LCZGS.js → view-C5OT36OB.js} +7 -7
- 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-XH64UEWS.js → whoami-KKFV3XR6.js} +2 -2
- package/chunk-HDWMQCAC.js +0 -73
|
@@ -14,26 +14,26 @@ import {
|
|
|
14
14
|
} from "./chunk-RIYFGX27.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XFQ2EH5D.js";
|
|
18
18
|
import {
|
|
19
19
|
stderr,
|
|
20
20
|
stdout,
|
|
21
21
|
styleTextStdout
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-5UXEBLLT.js";
|
|
23
23
|
import {
|
|
24
24
|
Query,
|
|
25
25
|
actual,
|
|
26
26
|
isRunResult
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YQXDHMHG.js";
|
|
28
28
|
import {
|
|
29
29
|
require_emoji_regex
|
|
30
30
|
} from "./chunk-VTEFO2FT.js";
|
|
31
31
|
import {
|
|
32
32
|
Monorepo
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-KRGA5VLT.js";
|
|
34
34
|
import {
|
|
35
35
|
isErrorWithCause
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-6YXVQ5HC.js";
|
|
37
37
|
import {
|
|
38
38
|
error
|
|
39
39
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -12,22 +12,22 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
findCmdShimIfExists,
|
|
14
14
|
install
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YQXDHMHG.js";
|
|
16
16
|
import {
|
|
17
17
|
PackageInfoClient
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LEX7YPHR.js";
|
|
19
19
|
import {
|
|
20
20
|
PathScurry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KRGA5VLT.js";
|
|
22
22
|
import {
|
|
23
23
|
Spec2 as Spec
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JKAZKVQU.js";
|
|
25
25
|
import {
|
|
26
26
|
walkUp
|
|
27
27
|
} from "./chunk-HTOTG4TS.js";
|
|
28
28
|
import {
|
|
29
29
|
parseScope
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6YXVQ5HC.js";
|
|
31
31
|
import {
|
|
32
32
|
XDG
|
|
33
33
|
} from "./chunk-XNLSTHDK.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
actual,
|
|
14
14
|
callLimit,
|
|
15
15
|
createVirtualRoot
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YQXDHMHG.js";
|
|
17
17
|
import {
|
|
18
18
|
SecurityArchive
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-DM3WGEVB.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-LRL3N7TN.js");
|
|
119
119
|
return Config.load(folder, process.argv, true);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DM3WGEVB.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-KRGA5VLT.js";
|
|
24
24
|
import {
|
|
25
25
|
asDepID,
|
|
26
26
|
getId,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
joinExtra,
|
|
34
34
|
splitDepID,
|
|
35
35
|
splitExtra
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-IAKUGHGT.js";
|
|
37
37
|
import {
|
|
38
38
|
Spec,
|
|
39
39
|
Spec2,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
defaultScopeRegistries,
|
|
47
47
|
getOptions,
|
|
48
48
|
gitHostWebsites
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-JKAZKVQU.js";
|
|
50
50
|
import {
|
|
51
51
|
load,
|
|
52
52
|
walkUp
|
|
@@ -83,8 +83,9 @@ import {
|
|
|
83
83
|
parseRange,
|
|
84
84
|
patch,
|
|
85
85
|
satisfies,
|
|
86
|
-
shortDependencyTypes
|
|
87
|
-
|
|
86
|
+
shortDependencyTypes,
|
|
87
|
+
subset
|
|
88
|
+
} from "./chunk-6YXVQ5HC.js";
|
|
88
89
|
import {
|
|
89
90
|
XDG
|
|
90
91
|
} from "./chunk-XNLSTHDK.js";
|
|
@@ -5980,19 +5981,22 @@ var confused = async (state) => {
|
|
|
5980
5981
|
|
|
5981
5982
|
// ../../src/query/src/pseudo/cve.ts
|
|
5982
5983
|
var parseInternals2 = (nodes) => {
|
|
5984
|
+
if (!nodes[0]) {
|
|
5985
|
+
return { cveId: void 0 };
|
|
5986
|
+
}
|
|
5987
|
+
const selectorNode = asPostcssNodeWithChildren(nodes[0]);
|
|
5988
|
+
if (!selectorNode.nodes[0]) {
|
|
5989
|
+
return { cveId: void 0 };
|
|
5990
|
+
}
|
|
5983
5991
|
let cveId = "";
|
|
5984
|
-
if (isStringNode(
|
|
5985
|
-
cveId = removeQuotes(
|
|
5986
|
-
|
|
5987
|
-
);
|
|
5988
|
-
} else if (isTagNode(asPostcssNodeWithChildren(nodes[0]).nodes[0])) {
|
|
5989
|
-
cveId = asTagNode(
|
|
5990
|
-
asPostcssNodeWithChildren(nodes[0]).nodes[0]
|
|
5991
|
-
).value;
|
|
5992
|
+
if (isStringNode(selectorNode.nodes[0])) {
|
|
5993
|
+
cveId = removeQuotes(asStringNode(selectorNode.nodes[0]).value);
|
|
5994
|
+
} else if (isTagNode(selectorNode.nodes[0])) {
|
|
5995
|
+
cveId = asTagNode(selectorNode.nodes[0]).value;
|
|
5992
5996
|
}
|
|
5993
5997
|
if (!cveId) {
|
|
5994
5998
|
throw error("Expected a CVE ID", {
|
|
5995
|
-
found:
|
|
5999
|
+
found: selectorNode.nodes[0]
|
|
5996
6000
|
});
|
|
5997
6001
|
}
|
|
5998
6002
|
return { cveId };
|
|
@@ -6010,9 +6014,14 @@ var cve = async (state) => {
|
|
|
6010
6014
|
const { cveId } = internals;
|
|
6011
6015
|
for (const node of state.partial.nodes) {
|
|
6012
6016
|
const report = state.securityArchive.get(node.id);
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6017
|
+
let exclude;
|
|
6018
|
+
if (cveId === void 0) {
|
|
6019
|
+
exclude = !report?.alerts.some((alert) => alert.props?.cveId);
|
|
6020
|
+
} else {
|
|
6021
|
+
exclude = !report?.alerts.some(
|
|
6022
|
+
(alert) => alert.props?.cveId?.trim().toLowerCase() === cveId.trim().toLowerCase()
|
|
6023
|
+
);
|
|
6024
|
+
}
|
|
6016
6025
|
if (exclude) {
|
|
6017
6026
|
removeNode(state, node);
|
|
6018
6027
|
}
|
|
@@ -6023,19 +6032,22 @@ var cve = async (state) => {
|
|
|
6023
6032
|
|
|
6024
6033
|
// ../../src/query/src/pseudo/cwe.ts
|
|
6025
6034
|
var parseInternals3 = (nodes) => {
|
|
6035
|
+
if (!nodes[0]) {
|
|
6036
|
+
return { cweId: void 0 };
|
|
6037
|
+
}
|
|
6038
|
+
const selectorNode = asPostcssNodeWithChildren(nodes[0]);
|
|
6039
|
+
if (!selectorNode.nodes[0]) {
|
|
6040
|
+
return { cweId: void 0 };
|
|
6041
|
+
}
|
|
6026
6042
|
let cweId = "";
|
|
6027
|
-
if (isStringNode(
|
|
6028
|
-
cweId = removeQuotes(
|
|
6029
|
-
|
|
6030
|
-
);
|
|
6031
|
-
} else if (isTagNode(asPostcssNodeWithChildren(nodes[0]).nodes[0])) {
|
|
6032
|
-
cweId = asTagNode(
|
|
6033
|
-
asPostcssNodeWithChildren(nodes[0]).nodes[0]
|
|
6034
|
-
).value;
|
|
6043
|
+
if (isStringNode(selectorNode.nodes[0])) {
|
|
6044
|
+
cweId = removeQuotes(asStringNode(selectorNode.nodes[0]).value);
|
|
6045
|
+
} else if (isTagNode(selectorNode.nodes[0])) {
|
|
6046
|
+
cweId = asTagNode(selectorNode.nodes[0]).value;
|
|
6035
6047
|
}
|
|
6036
6048
|
if (!cweId) {
|
|
6037
6049
|
throw error("Expected a CWE ID", {
|
|
6038
|
-
found:
|
|
6050
|
+
found: selectorNode.nodes[0]
|
|
6039
6051
|
});
|
|
6040
6052
|
}
|
|
6041
6053
|
return { cweId };
|
|
@@ -6053,11 +6065,18 @@ var cwe = async (state) => {
|
|
|
6053
6065
|
const { cweId } = internals;
|
|
6054
6066
|
for (const node of state.partial.nodes) {
|
|
6055
6067
|
const report = state.securityArchive.get(node.id);
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6068
|
+
let exclude;
|
|
6069
|
+
if (cweId === void 0) {
|
|
6070
|
+
exclude = !report?.alerts.some(
|
|
6071
|
+
(alert) => alert.props?.cwes && alert.props.cwes.length > 0
|
|
6072
|
+
);
|
|
6073
|
+
} else {
|
|
6074
|
+
exclude = !report?.alerts.some(
|
|
6075
|
+
(alert) => alert.props?.cwes?.some(
|
|
6076
|
+
(cwe2) => cwe2.id.trim().toLowerCase() === cweId.trim().toLowerCase()
|
|
6077
|
+
)
|
|
6078
|
+
);
|
|
6079
|
+
}
|
|
6061
6080
|
if (exclude) {
|
|
6062
6081
|
removeNode(state, node);
|
|
6063
6082
|
}
|
|
@@ -6198,6 +6217,95 @@ var diff = async (state) => {
|
|
|
6198
6217
|
return state;
|
|
6199
6218
|
};
|
|
6200
6219
|
|
|
6220
|
+
// ../../src/query/src/pseudo/dist.ts
|
|
6221
|
+
var retrieveDistTags = async (node, signal) => {
|
|
6222
|
+
const spec2 = hydrate(node.id, String(node.name), node.options);
|
|
6223
|
+
if (!spec2.registry || !node.name) {
|
|
6224
|
+
return {};
|
|
6225
|
+
}
|
|
6226
|
+
const url = new URL(spec2.registry);
|
|
6227
|
+
url.pathname = `/${node.name}`;
|
|
6228
|
+
const response = await fetch(String(url), {
|
|
6229
|
+
headers: {
|
|
6230
|
+
Accept: "application/vnd.npm.install-v1+json"
|
|
6231
|
+
},
|
|
6232
|
+
signal
|
|
6233
|
+
});
|
|
6234
|
+
if (response.status === 404) {
|
|
6235
|
+
throw new AbortError("Missing API");
|
|
6236
|
+
}
|
|
6237
|
+
if (!response.ok) {
|
|
6238
|
+
throw error("Failed to fetch packument", {
|
|
6239
|
+
name: node.name,
|
|
6240
|
+
spec: spec2,
|
|
6241
|
+
response
|
|
6242
|
+
});
|
|
6243
|
+
}
|
|
6244
|
+
const packument = await response.json();
|
|
6245
|
+
return packument["dist-tags"];
|
|
6246
|
+
};
|
|
6247
|
+
var queueNode = async (state, node, tagName) => {
|
|
6248
|
+
if (!node.name || !node.version) {
|
|
6249
|
+
return node;
|
|
6250
|
+
}
|
|
6251
|
+
let distTags;
|
|
6252
|
+
try {
|
|
6253
|
+
distTags = await pRetry(
|
|
6254
|
+
() => retrieveDistTags(node, state.signal),
|
|
6255
|
+
{
|
|
6256
|
+
retries: state.retries,
|
|
6257
|
+
signal: state.signal
|
|
6258
|
+
}
|
|
6259
|
+
);
|
|
6260
|
+
} catch (err) {
|
|
6261
|
+
console.warn(
|
|
6262
|
+
error("Could not retrieve dist-tags", {
|
|
6263
|
+
name: node.name,
|
|
6264
|
+
cause: err
|
|
6265
|
+
})
|
|
6266
|
+
);
|
|
6267
|
+
return node;
|
|
6268
|
+
}
|
|
6269
|
+
const tagVersion = distTags[tagName];
|
|
6270
|
+
if (tagVersion !== node.version) {
|
|
6271
|
+
return node;
|
|
6272
|
+
}
|
|
6273
|
+
return void 0;
|
|
6274
|
+
};
|
|
6275
|
+
var dist = async (state) => {
|
|
6276
|
+
const top = asPostcssNodeWithChildren(state.current);
|
|
6277
|
+
const selector = asPostcssNodeWithChildren(top.nodes[0]);
|
|
6278
|
+
const firstChild = selector.nodes[0];
|
|
6279
|
+
let tagName;
|
|
6280
|
+
try {
|
|
6281
|
+
tagName = removeQuotes(asStringNode(firstChild).value);
|
|
6282
|
+
} catch {
|
|
6283
|
+
if (isTagNode(firstChild)) {
|
|
6284
|
+
tagName = asTagNode(firstChild).value;
|
|
6285
|
+
} else {
|
|
6286
|
+
throw error("Failed to parse :dist selector", {
|
|
6287
|
+
found: firstChild
|
|
6288
|
+
});
|
|
6289
|
+
}
|
|
6290
|
+
}
|
|
6291
|
+
const queue = [];
|
|
6292
|
+
for (const node of state.partial.nodes) {
|
|
6293
|
+
if (splitDepID(node.id)[0] !== "registry") {
|
|
6294
|
+
removeNode(state, node);
|
|
6295
|
+
continue;
|
|
6296
|
+
}
|
|
6297
|
+
queue.push(queueNode(state, node, tagName));
|
|
6298
|
+
}
|
|
6299
|
+
const removeNodeQueue = await Promise.all(queue);
|
|
6300
|
+
for (const node of removeNodeQueue) {
|
|
6301
|
+
if (node) {
|
|
6302
|
+
removeNode(state, node);
|
|
6303
|
+
}
|
|
6304
|
+
}
|
|
6305
|
+
removeDanglingEdges(state);
|
|
6306
|
+
return state;
|
|
6307
|
+
};
|
|
6308
|
+
|
|
6201
6309
|
// ../../src/query/src/pseudo/dynamic.ts
|
|
6202
6310
|
var dynamic = createSecuritySelectorFilter(
|
|
6203
6311
|
"dynamic",
|
|
@@ -6751,7 +6859,7 @@ var parseInternals8 = (nodes) => {
|
|
|
6751
6859
|
}
|
|
6752
6860
|
return { kind };
|
|
6753
6861
|
};
|
|
6754
|
-
var
|
|
6862
|
+
var queueNode2 = async (state, node, kind) => {
|
|
6755
6863
|
if (!node.name || !node.version) {
|
|
6756
6864
|
return node;
|
|
6757
6865
|
}
|
|
@@ -6849,7 +6957,7 @@ var outdated = async (state) => {
|
|
|
6849
6957
|
removeNode(state, node);
|
|
6850
6958
|
continue;
|
|
6851
6959
|
}
|
|
6852
|
-
queue.push(
|
|
6960
|
+
queue.push(queueNode2(state, node, kind));
|
|
6853
6961
|
}
|
|
6854
6962
|
const removeNodeQueue = await Promise.all(queue);
|
|
6855
6963
|
for (const node of removeNodeQueue) {
|
|
@@ -7042,7 +7150,7 @@ var parseInternals9 = (nodes) => {
|
|
|
7042
7150
|
}
|
|
7043
7151
|
return { relativeDate, comparator };
|
|
7044
7152
|
};
|
|
7045
|
-
var
|
|
7153
|
+
var queueNode3 = async (state, node, relativeDate, comparator) => {
|
|
7046
7154
|
if (!node.name || !node.version) {
|
|
7047
7155
|
return node;
|
|
7048
7156
|
}
|
|
@@ -7116,7 +7224,7 @@ var published = async (state) => {
|
|
|
7116
7224
|
removeNode(state, node);
|
|
7117
7225
|
continue;
|
|
7118
7226
|
}
|
|
7119
|
-
queue.push(
|
|
7227
|
+
queue.push(queueNode3(state, node, relativeDate, comparator));
|
|
7120
7228
|
}
|
|
7121
7229
|
const removeNodeQueue = await Promise.all(queue);
|
|
7122
7230
|
for (const node of removeNodeQueue) {
|
|
@@ -7353,7 +7461,9 @@ var semverFunctionNames = /* @__PURE__ */ new Set([
|
|
|
7353
7461
|
"lt",
|
|
7354
7462
|
"lte",
|
|
7355
7463
|
"eq",
|
|
7356
|
-
"neq"
|
|
7464
|
+
"neq",
|
|
7465
|
+
"intersects",
|
|
7466
|
+
"subset"
|
|
7357
7467
|
]);
|
|
7358
7468
|
var isSemverFunctionName = (name) => semverFunctionNames.has(name);
|
|
7359
7469
|
var asSemverFunctionName = (name) => {
|
|
@@ -7374,6 +7484,10 @@ var semverFunctions = /* @__PURE__ */ new Map([
|
|
|
7374
7484
|
["eq", eq],
|
|
7375
7485
|
["neq", neq]
|
|
7376
7486
|
]);
|
|
7487
|
+
var semverRangeFunctions = /* @__PURE__ */ new Map([
|
|
7488
|
+
["intersects", intersects],
|
|
7489
|
+
["subset", subset]
|
|
7490
|
+
]);
|
|
7377
7491
|
var parseInternals11 = (nodes, loose) => {
|
|
7378
7492
|
let semverValue = "";
|
|
7379
7493
|
try {
|
|
@@ -7415,10 +7529,14 @@ var parseInternals11 = (nodes, loose) => {
|
|
|
7415
7529
|
}
|
|
7416
7530
|
}
|
|
7417
7531
|
const semverFunction = semverFunctions.get(fnName);
|
|
7418
|
-
|
|
7532
|
+
const semverRangeFunction = semverRangeFunctions.get(fnName);
|
|
7533
|
+
if (!semverFunction && !semverRangeFunction) {
|
|
7419
7534
|
throw error("Invalid semver function name", {
|
|
7420
7535
|
found: fnName,
|
|
7421
|
-
validOptions:
|
|
7536
|
+
validOptions: [
|
|
7537
|
+
...Array.from(semverFunctions.keys()),
|
|
7538
|
+
...Array.from(semverRangeFunctions.keys())
|
|
7539
|
+
]
|
|
7422
7540
|
});
|
|
7423
7541
|
}
|
|
7424
7542
|
let compareAttribute;
|
|
@@ -7445,7 +7563,8 @@ var parseInternals11 = (nodes, loose) => {
|
|
|
7445
7563
|
}
|
|
7446
7564
|
return {
|
|
7447
7565
|
semverValue,
|
|
7448
|
-
semverFunction,
|
|
7566
|
+
semverFunction: semverFunction ?? satisfies,
|
|
7567
|
+
semverRangeFunction,
|
|
7449
7568
|
compareAttribute
|
|
7450
7569
|
};
|
|
7451
7570
|
};
|
|
@@ -7461,7 +7580,36 @@ var semverParser = async (state) => {
|
|
|
7461
7580
|
cause: err
|
|
7462
7581
|
});
|
|
7463
7582
|
}
|
|
7464
|
-
const {
|
|
7583
|
+
const {
|
|
7584
|
+
semverValue,
|
|
7585
|
+
semverFunction,
|
|
7586
|
+
semverRangeFunction,
|
|
7587
|
+
compareAttribute
|
|
7588
|
+
} = internals;
|
|
7589
|
+
if (semverRangeFunction) {
|
|
7590
|
+
if (compareAttribute) {
|
|
7591
|
+
for (const node of state.partial.nodes) {
|
|
7592
|
+
const compareValues = getManifestPropertyValues(
|
|
7593
|
+
node,
|
|
7594
|
+
compareAttribute.properties,
|
|
7595
|
+
compareAttribute.attribute
|
|
7596
|
+
);
|
|
7597
|
+
const compareValue = compareValues?.[0];
|
|
7598
|
+
if (!compareValue || !semverRangeFunction(compareValue, semverValue)) {
|
|
7599
|
+
removeNode(state, node);
|
|
7600
|
+
}
|
|
7601
|
+
}
|
|
7602
|
+
} else {
|
|
7603
|
+
for (const edge of state.partial.edges) {
|
|
7604
|
+
const edgeRange = edge.spec.semver ?? edge.spec.bareSpec;
|
|
7605
|
+
if (!edgeRange || !semverRangeFunction(edgeRange, semverValue)) {
|
|
7606
|
+
removeEdge(state, edge);
|
|
7607
|
+
}
|
|
7608
|
+
}
|
|
7609
|
+
removeUnlinkedNodes(state);
|
|
7610
|
+
}
|
|
7611
|
+
return state;
|
|
7612
|
+
}
|
|
7465
7613
|
for (const node of state.partial.nodes) {
|
|
7466
7614
|
if (compareAttribute) {
|
|
7467
7615
|
const compareValues = getManifestPropertyValues(
|
|
@@ -7832,6 +7980,20 @@ var unstable = createSecuritySelectorFilter(
|
|
|
7832
7980
|
"unstableOwnership"
|
|
7833
7981
|
);
|
|
7834
7982
|
|
|
7983
|
+
// ../../src/query/src/pseudo/vulnerable.ts
|
|
7984
|
+
var vulnerable = async (state) => {
|
|
7985
|
+
assertSecurityArchive(state, "vulnerable");
|
|
7986
|
+
for (const node of state.partial.nodes) {
|
|
7987
|
+
const report = state.securityArchive.get(node.id);
|
|
7988
|
+
const hasCve = report?.alerts.some((alert) => alert.props?.cveId);
|
|
7989
|
+
if (!hasCve) {
|
|
7990
|
+
removeNode(state, node);
|
|
7991
|
+
}
|
|
7992
|
+
}
|
|
7993
|
+
removeDanglingEdges(state);
|
|
7994
|
+
return state;
|
|
7995
|
+
};
|
|
7996
|
+
|
|
7835
7997
|
// ../../src/query/src/pseudo/workspace.ts
|
|
7836
7998
|
var workspace = async (state) => {
|
|
7837
7999
|
for (const node of state.partial.nodes) {
|
|
@@ -8041,6 +8203,7 @@ var pseudoSelectors = new Map(
|
|
|
8041
8203
|
deprecated,
|
|
8042
8204
|
dev,
|
|
8043
8205
|
diff,
|
|
8206
|
+
dist,
|
|
8044
8207
|
dynamic,
|
|
8045
8208
|
eval: evalParser,
|
|
8046
8209
|
empty,
|
|
@@ -8093,6 +8256,8 @@ var pseudoSelectors = new Map(
|
|
|
8093
8256
|
unpopular,
|
|
8094
8257
|
unstable,
|
|
8095
8258
|
v: semverParser,
|
|
8259
|
+
vuln: vulnerable,
|
|
8260
|
+
vulnerable,
|
|
8096
8261
|
workspace
|
|
8097
8262
|
})
|
|
8098
8263
|
);
|
|
@@ -9311,6 +9476,9 @@ import { resolve as resolve4 } from "node:path";
|
|
|
9311
9476
|
var retrieveNodeFromGraph = (key, value, graph, fromId, seenNodes) => {
|
|
9312
9477
|
const foundNode = graph.nodes.get(asDepID(fromId));
|
|
9313
9478
|
if (!foundNode) {
|
|
9479
|
+
if (fromId.startsWith("workspace") || fromId.startsWith("file")) {
|
|
9480
|
+
return void 0;
|
|
9481
|
+
}
|
|
9314
9482
|
throw error("Edge info missing its `from` node", {
|
|
9315
9483
|
found: {
|
|
9316
9484
|
nodes: [...graph.nodes].map(([id2]) => id2),
|
|
@@ -9360,6 +9528,7 @@ var loadEdges = (graph, edges, options) => {
|
|
|
9360
9528
|
} else {
|
|
9361
9529
|
fromNode = retrieveNodeFromGraph(key, value, graph, fromId);
|
|
9362
9530
|
}
|
|
9531
|
+
if (!fromNode) continue;
|
|
9363
9532
|
const toId = valRest.substring(vrSplit + 1);
|
|
9364
9533
|
let toNode = void 0;
|
|
9365
9534
|
if (toId !== "MISSING") {
|
|
@@ -11260,8 +11429,19 @@ var getImporterSpecs = (options) => {
|
|
|
11260
11429
|
for (const [depName, depSpec] of deps) {
|
|
11261
11430
|
const edge = importer.edgesOut.get(depName);
|
|
11262
11431
|
if (edge?.to && depSpec === edge.spec.bareSpec) continue;
|
|
11432
|
+
const spec2 = Spec2.parse(depName, depSpec, options);
|
|
11433
|
+
if (spec2.type === "workspace" && !edge?.to) {
|
|
11434
|
+
const wsExists = [...graph.importers].some(
|
|
11435
|
+
(n) => n.name === depName
|
|
11436
|
+
);
|
|
11437
|
+
if (!wsExists) {
|
|
11438
|
+
removeDeps.add(depName);
|
|
11439
|
+
removeResult.modifiedDependencies = true;
|
|
11440
|
+
continue;
|
|
11441
|
+
}
|
|
11442
|
+
}
|
|
11263
11443
|
const dependency = asDependency({
|
|
11264
|
-
spec:
|
|
11444
|
+
spec: spec2,
|
|
11265
11445
|
type: shorten(depType, depName, importer.manifest)
|
|
11266
11446
|
});
|
|
11267
11447
|
addDeps.set(depName, dependency);
|
|
@@ -12135,6 +12315,13 @@ var fetchManifestsForDeps = async (packageInfo, graph, fromNode, deps, scurry, p
|
|
|
12135
12315
|
reuseTasks.push({ type: type2, spec: spec2, fromNode, toNode: existingNode });
|
|
12136
12316
|
continue;
|
|
12137
12317
|
}
|
|
12318
|
+
if (spec2.final.type === "workspace") {
|
|
12319
|
+
const wsVersion = graph.nodesByName.get(spec2.name)?.values().next().value?.version;
|
|
12320
|
+
throw error(
|
|
12321
|
+
wsVersion ? `workspace dependency ${spec2} does not match the local workspace version (${wsVersion})` : `no workspace found matching ${spec2}`,
|
|
12322
|
+
{ spec: spec2 }
|
|
12323
|
+
);
|
|
12324
|
+
}
|
|
12138
12325
|
const edgeOptional = type2 === "optional" || type2 === "peerOptional";
|
|
12139
12326
|
const manifestPromise = (
|
|
12140
12327
|
// the "detached" node state means that it has already been load as
|
|
@@ -13406,6 +13593,15 @@ var reify = async (options) => {
|
|
|
13406
13593
|
const skippable = skipOptionalOnly && !options.update;
|
|
13407
13594
|
const res = { diff: diff2 };
|
|
13408
13595
|
if (!diff2.hasChanges() || skippable) {
|
|
13596
|
+
if (!scurry.lstatSync("vlt-lock.json") || !scurry.lstatSync("node_modules/.vlt-lock.json")) {
|
|
13597
|
+
saveHidden(options);
|
|
13598
|
+
const lfData = lockfileData(options);
|
|
13599
|
+
saveData(lfData, scurry.resolve("vlt-lock.json"), false);
|
|
13600
|
+
}
|
|
13601
|
+
const pending = [...actual2.nodes.values()].filter((n) => n.buildState === "needed").map((n) => n.id);
|
|
13602
|
+
if (pending.length) {
|
|
13603
|
+
res.buildQueue = pending;
|
|
13604
|
+
}
|
|
13409
13605
|
done();
|
|
13410
13606
|
return res;
|
|
13411
13607
|
}
|
|
@@ -11,24 +11,24 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
InstallReporter
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZUP6UTME.js";
|
|
15
15
|
import {
|
|
16
16
|
install
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-YQXDHMHG.js";
|
|
18
|
+
import "./chunk-DM3WGEVB.js";
|
|
19
19
|
import "./chunk-VTEFO2FT.js";
|
|
20
20
|
import "./chunk-RXNA2XCX.js";
|
|
21
21
|
import "./chunk-WGDTG44V.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-KRGA5VLT.js";
|
|
23
|
+
import "./chunk-IAKUGHGT.js";
|
|
24
|
+
import "./chunk-JKAZKVQU.js";
|
|
25
25
|
import "./chunk-HTOTG4TS.js";
|
|
26
26
|
import {
|
|
27
27
|
commandUsage
|
|
28
28
|
} from "./chunk-FBTBHRPG.js";
|
|
29
29
|
import "./chunk-R44FR7BY.js";
|
|
30
30
|
import "./chunk-2V4AQPBR.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-6YXVQ5HC.js";
|
|
32
32
|
import "./chunk-XNLSTHDK.js";
|
|
33
33
|
import "./chunk-WZWDS3W4.js";
|
|
34
34
|
import "./chunk-PZLD7RTK.js";
|
package/cli-package.json
CHANGED
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
} from "./chunk-DBANBIL2.js";
|
|
16
16
|
import {
|
|
17
17
|
asRootError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DFNHGGGV.js";
|
|
19
19
|
import {
|
|
20
20
|
pairsToRecords,
|
|
21
21
|
recordsToPairs
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-G6PG3AGN.js";
|
|
23
|
+
import "./chunk-LEX7YPHR.js";
|
|
24
24
|
import "./chunk-HQ4US6G3.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-KRGA5VLT.js";
|
|
26
|
+
import "./chunk-IAKUGHGT.js";
|
|
27
|
+
import "./chunk-JKAZKVQU.js";
|
|
28
28
|
import {
|
|
29
29
|
find,
|
|
30
30
|
load
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
commandUsage
|
|
34
34
|
} from "./chunk-FBTBHRPG.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-DI2CYYXF.js";
|
|
36
36
|
import "./chunk-YCQTLBWF.js";
|
|
37
37
|
import "./chunk-R44FR7BY.js";
|
|
38
38
|
import {
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "./chunk-2V4AQPBR.js";
|
|
42
42
|
import {
|
|
43
43
|
isObject
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-6YXVQ5HC.js";
|
|
45
45
|
import "./chunk-XNLSTHDK.js";
|
|
46
46
|
import {
|
|
47
47
|
error
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
kCustomInspect,
|
|
15
15
|
pairsToRecords,
|
|
16
16
|
recordsToPairs
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-G6PG3AGN.js";
|
|
18
|
+
import "./chunk-LEX7YPHR.js";
|
|
19
19
|
import "./chunk-HQ4US6G3.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KRGA5VLT.js";
|
|
21
|
+
import "./chunk-IAKUGHGT.js";
|
|
22
|
+
import "./chunk-JKAZKVQU.js";
|
|
23
23
|
import "./chunk-HTOTG4TS.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-DI2CYYXF.js";
|
|
25
25
|
import "./chunk-YCQTLBWF.js";
|
|
26
26
|
import "./chunk-R44FR7BY.js";
|
|
27
27
|
import {
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
isRecordField,
|
|
31
31
|
recordFields
|
|
32
32
|
} from "./chunk-2V4AQPBR.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-6YXVQ5HC.js";
|
|
34
34
|
import "./chunk-XNLSTHDK.js";
|
|
35
35
|
import "./chunk-WZWDS3W4.js";
|
|
36
36
|
import "./chunk-PZLD7RTK.js";
|