@vltpkg/cli-js 1.0.0-rc.32 → 1.0.0-rc.33
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-SQZRJLJA.js → access-VP3KSJ2M.js} +23 -12
- package/{bugs-BMZ5UERM.js → bugs-4ZQXJA4F.js} +19 -17
- package/{build-LGQI6OGM.js → build-P74RVUUP.js} +13 -9
- package/{cache-JWHNATAX.js → cache-J4J3ZWXP.js} +19 -14
- package/cache-unzip-src-unzip.js +434 -428
- package/{chunk-6YXVQ5HC.js → chunk-2PLIV3N3.js} +1 -27
- package/{chunk-ZUP6UTME.js → chunk-4RZDJQ5U.js} +42 -61
- package/{chunk-LEX7YPHR.js → chunk-4SSFBFB5.js} +123 -92
- package/{chunk-SDBTQF2Y.js → chunk-5COWONUB.js} +5 -5
- package/{chunk-5UXEBLLT.js → chunk-7KI6XHXZ.js} +68 -7
- package/{chunk-R44FR7BY.js → chunk-7NHXV6AH.js} +439 -433
- package/{chunk-FBTBHRPG.js → chunk-7TNSW6W3.js} +1 -1
- package/{chunk-DI2CYYXF.js → chunk-BAUMCTQK.js} +694 -440
- package/{chunk-FXDRM4ZO.js → chunk-CLVRCGOZ.js} +247 -235
- package/{chunk-YCQTLBWF.js → chunk-CNSTFT7U.js} +1 -1
- package/{chunk-SIXXDCBI.js → chunk-DJYKQWV2.js} +7 -7
- package/chunk-E74WGW5C.js +49 -0
- package/chunk-EAWRHC27.js +75 -0
- package/{chunk-DFNHGGGV.js → chunk-EFWPI6IY.js} +1 -1
- package/{chunk-JBVLIV37.js → chunk-EQ633HIM.js} +14 -13
- package/{chunk-DM3WGEVB.js → chunk-F2FKLPZD.js} +7 -7
- package/chunk-FAG776ZD.js +137 -0
- package/{chunk-HQ4US6G3.js → chunk-FWKQ7YDF.js} +1049 -980
- package/{chunk-G6PG3AGN.js → chunk-GTICKXWZ.js} +11 -8
- package/{chunk-KRGA5VLT.js → chunk-ICJRCXSG.js} +31 -27
- package/{chunk-3TVABXAG.js → chunk-JEE4B4FL.js} +3 -3
- package/{chunk-7XE7OES7.js → chunk-JLGPPV6Z.js} +3 -3
- package/{chunk-M2WD7IBO.js → chunk-JZQAUAHT.js} +1 -1
- package/{chunk-IAKUGHGT.js → chunk-MT76WHSM.js} +1 -1
- package/{chunk-DIKKTUBV.js → chunk-OTNMX4EK.js} +3 -3
- package/{chunk-2V4AQPBR.js → chunk-PMCAQG5J.js} +85 -46
- package/{chunk-JKAZKVQU.js → chunk-PW6S6AIO.js} +15 -11
- package/{chunk-NLFBANVO.js → chunk-SSN4CYZF.js} +18 -2
- package/chunk-UBLFPJHV.js +40 -0
- package/{chunk-YQXDHMHG.js → chunk-VGWEB64T.js} +2932 -2786
- package/{chunk-LRPTCGTW.js → chunk-XA47WS4N.js} +11 -15
- package/{chunk-XFQ2EH5D.js → chunk-XIJFEV6U.js} +3 -3
- package/{ci-FQJANSQW.js → ci-GIDCFAZF.js} +14 -10
- package/cli-package.json +6 -2
- package/{config-4KQTTXJH.js → config-LIQMIMTF.js} +15 -13
- package/{config-LRL3N7TN.js → config-NBO3COMM.js} +13 -11
- package/{create-KN6AXEA6.js → create-K2S3J62I.js} +24 -19
- package/{deprecate-P26WHVFB.js → deprecate-4PJKNFXN.js} +22 -14
- package/{devtools-6NFQDW4L.js → devtools-HGLF4KAO.js} +82 -28
- package/{dist-tag-FA2BT7SA.js → dist-tag-TA6LWT2V.js} +16 -9
- package/{docs-OAPIY4SC.js → docs-ZCMIKQAN.js} +19 -17
- package/{exec-CVZGHJZS.js → exec-XVF4KCRJ.js} +24 -19
- package/{exec-cache-3AHODVRN.js → exec-cache-2IWJNBFB.js} +22 -17
- package/{exec-local-I4OJX76E.js → exec-local-FNFTQYFP.js} +17 -14
- package/{help-QFIQSPNS.js → help-ZDRILKVQ.js} +5 -4
- package/{init-QLADIAP5.js → init-VMYJE5Q3.js} +12 -10
- package/{install-B7CU2BLC.js → install-ZHMWN27D.js} +27 -12
- package/{list-OTFV3LOM.js → list-BPFKWXCR.js} +20 -15
- package/{login-LG2ZOIDQ.js → login-DQL5A4NT.js} +23 -9
- package/{logout-KUI773AM.js → logout-Q74VRDSN.js} +19 -8
- package/{pack-C55TTBIQ.js → pack-GLURO5KY.js} +17 -13
- package/package.json +8 -1
- package/{ping-VNUOC26G.js → ping-PPEYPKZD.js} +17 -10
- package/{pkg-H4RJEBK5.js → pkg-UTEKJ5CB.js} +13 -11
- package/{profile-DIJ5JUSE.js → profile-5QFRWC2L.js} +16 -8
- package/{publish-XF2TRBPH.js → publish-5VDI3JXX.js} +23 -16
- package/{query-BGP5JMJ7.js → query-I6DZ7TF2.js} +20 -15
- package/registry-ZVO3VAHY.js +117 -0
- package/registry-client-package.json +6 -2
- package/registry-client-src-revalidate.js +1233 -975
- package/{repo-NCEHK7KB.js → repo-SB3C7MZZ.js} +19 -17
- package/{reporter-OB6SNHOZ.js → reporter-2XBYWAVU.js} +3 -2
- package/{run-ZNJJYEJF.js → run-U6CW5Q56.js} +17 -14
- package/{run-exec-F5OV7MVN.js → run-exec-RFB572AL.js} +19 -14
- package/security-archive-src-update-expired.js +16 -11
- package/setup-BFKUYGJB.js +181 -0
- package/{src-M3WI7TSB.js → src-ZWBXAZOV.js} +25 -17
- package/{token-KXCVRJGF.js → token-M5HPJJJQ.js} +20 -9
- package/{uninstall-33SUWR6K.js → uninstall-UUBTM4ZQ.js} +15 -11
- package/{unpublish-7AZPBZF2.js → unpublish-WDSRB6DV.js} +17 -9
- package/{update-2EQF6IKZ.js → update-J4BEFJRC.js} +14 -10
- package/{version-HFYI3SEX.js → version-ZVG66SKC.js} +12 -10
- package/{view-C5OT36OB.js → view-WFK75G74.js} +19 -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-KKFV3XR6.js → whoami-TCSDOBU2.js} +19 -8
- package/chunk-FXIBCUIM.js +0 -73
|
@@ -11,36 +11,36 @@ 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-4SSFBFB5.js";
|
|
15
15
|
import {
|
|
16
16
|
Monorepo,
|
|
17
17
|
PackageJson,
|
|
18
18
|
PathScurry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ICJRCXSG.js";
|
|
20
20
|
import {
|
|
21
21
|
resetCaches
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
getOptions
|
|
25
|
-
} from "./chunk-JKAZKVQU.js";
|
|
22
|
+
} from "./chunk-MT76WHSM.js";
|
|
26
23
|
import {
|
|
27
24
|
find,
|
|
28
25
|
load,
|
|
29
26
|
reload,
|
|
30
27
|
save
|
|
31
28
|
} from "./chunk-HTOTG4TS.js";
|
|
29
|
+
import {
|
|
30
|
+
getOptions
|
|
31
|
+
} from "./chunk-PW6S6AIO.js";
|
|
32
32
|
import {
|
|
33
33
|
commands,
|
|
34
34
|
definition,
|
|
35
35
|
getCommand,
|
|
36
36
|
isRecordField,
|
|
37
37
|
recordFields
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PMCAQG5J.js";
|
|
39
39
|
import {
|
|
40
40
|
assertRecordStringString,
|
|
41
41
|
assertRecordStringT,
|
|
42
42
|
isRecordStringString
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-2PLIV3N3.js";
|
|
44
44
|
import {
|
|
45
45
|
error
|
|
46
46
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -238,6 +238,9 @@ var Config = class _Config {
|
|
|
238
238
|
if (this.command) p.positionals.shift();
|
|
239
239
|
else this.command = getCommand(p.values["fallback-command"]);
|
|
240
240
|
Object.assign(this, p);
|
|
241
|
+
if (p.values.verbose && p.values.loglevel === "info") {
|
|
242
|
+
p.values.loglevel = "verbose";
|
|
243
|
+
}
|
|
241
244
|
if (!isParsed(this)) throw error("failed to parse config");
|
|
242
245
|
return this;
|
|
243
246
|
}
|
|
@@ -13,11 +13,7 @@ import {
|
|
|
13
13
|
graphRun,
|
|
14
14
|
graphRunSync,
|
|
15
15
|
joinDepIDTuple
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
Spec2 as Spec,
|
|
19
|
-
isSpec
|
|
20
|
-
} from "./chunk-JKAZKVQU.js";
|
|
16
|
+
} from "./chunk-MT76WHSM.js";
|
|
21
17
|
import {
|
|
22
18
|
load,
|
|
23
19
|
parse as parse2,
|
|
@@ -25,11 +21,15 @@ import {
|
|
|
25
21
|
walkUp
|
|
26
22
|
} from "./chunk-HTOTG4TS.js";
|
|
27
23
|
import {
|
|
28
|
-
|
|
24
|
+
I,
|
|
29
25
|
promiseSpawn,
|
|
30
26
|
ts,
|
|
31
27
|
whichSync
|
|
32
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-7NHXV6AH.js";
|
|
29
|
+
import {
|
|
30
|
+
Spec2 as Spec,
|
|
31
|
+
isSpec
|
|
32
|
+
} from "./chunk-PW6S6AIO.js";
|
|
33
33
|
import {
|
|
34
34
|
Range,
|
|
35
35
|
Version,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
normalizeManifest,
|
|
40
40
|
parse,
|
|
41
41
|
satisfies
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-2PLIV3N3.js";
|
|
43
43
|
import {
|
|
44
44
|
error
|
|
45
45
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -893,7 +893,7 @@ var fetchMethod = async (repo, _, options) => {
|
|
|
893
893
|
const revsDoc = linesToRevs(result.stdout.split("\n"));
|
|
894
894
|
return revsDoc;
|
|
895
895
|
};
|
|
896
|
-
var revsCache = new
|
|
896
|
+
var revsCache = new I({
|
|
897
897
|
max: 100,
|
|
898
898
|
ttl: 5 * 60 * 1e3,
|
|
899
899
|
allowStaleOnFetchAbort: true,
|
|
@@ -1282,7 +1282,7 @@ var range = (a, b, str) => {
|
|
|
1282
1282
|
return result;
|
|
1283
1283
|
};
|
|
1284
1284
|
|
|
1285
|
-
// ../../node_modules/.vlt/~npm~brace-expansion@5.0.
|
|
1285
|
+
// ../../node_modules/.vlt/~npm~brace-expansion@5.0.7/node_modules/brace-expansion/dist/esm/index.js
|
|
1286
1286
|
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
1287
1287
|
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
1288
1288
|
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
@@ -1353,17 +1353,19 @@ function gte(i, y) {
|
|
|
1353
1353
|
}
|
|
1354
1354
|
function expand_(str, max, isTop) {
|
|
1355
1355
|
const expansions = [];
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1356
|
+
for (; ; ) {
|
|
1357
|
+
const m = balanced("{", "}", str);
|
|
1358
|
+
if (!m)
|
|
1359
|
+
return [str];
|
|
1360
|
+
const pre = m.pre;
|
|
1361
|
+
if (/\$$/.test(m.pre)) {
|
|
1362
|
+
const post2 = m.post.length ? expand_(m.post, max, false) : [""];
|
|
1363
|
+
for (let k = 0; k < post2.length && k < max; k++) {
|
|
1364
|
+
const expansion = pre + "{" + m.body + "}" + post2[k];
|
|
1365
|
+
expansions.push(expansion);
|
|
1366
|
+
}
|
|
1367
|
+
return expansions;
|
|
1365
1368
|
}
|
|
1366
|
-
} else {
|
|
1367
1369
|
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
1368
1370
|
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
1369
1371
|
const isSequence = isNumericSequence || isAlphaSequence;
|
|
@@ -1371,10 +1373,12 @@ function expand_(str, max, isTop) {
|
|
|
1371
1373
|
if (!isSequence && !isOptions) {
|
|
1372
1374
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
1373
1375
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
1374
|
-
|
|
1376
|
+
isTop = true;
|
|
1377
|
+
continue;
|
|
1375
1378
|
}
|
|
1376
1379
|
return [str];
|
|
1377
1380
|
}
|
|
1381
|
+
const post = m.post.length ? expand_(m.post, max, false) : [""];
|
|
1378
1382
|
let n;
|
|
1379
1383
|
if (isSequence) {
|
|
1380
1384
|
n = m.body.split(/\.\./);
|
|
@@ -1401,7 +1405,7 @@ function expand_(str, max, isTop) {
|
|
|
1401
1405
|
}
|
|
1402
1406
|
const pad = n.some(isPadded);
|
|
1403
1407
|
N = [];
|
|
1404
|
-
for (let i = x; test(i, y); i += incr) {
|
|
1408
|
+
for (let i = x; test(i, y) && N.length < max; i += incr) {
|
|
1405
1409
|
let c;
|
|
1406
1410
|
if (isAlphaSequence) {
|
|
1407
1411
|
c = String.fromCharCode(i);
|
|
@@ -1438,8 +1442,8 @@ function expand_(str, max, isTop) {
|
|
|
1438
1442
|
}
|
|
1439
1443
|
}
|
|
1440
1444
|
}
|
|
1445
|
+
return expansions;
|
|
1441
1446
|
}
|
|
1442
|
-
return expansions;
|
|
1443
1447
|
}
|
|
1444
1448
|
|
|
1445
1449
|
// ../../node_modules/.vlt/~npm~minimatch@10.2.5/node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
@@ -3965,7 +3969,7 @@ var ENOREALPATH = 512;
|
|
|
3965
3969
|
var ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
|
|
3966
3970
|
var TYPEMASK = 1023;
|
|
3967
3971
|
var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN;
|
|
3968
|
-
var normalizeCache = new
|
|
3972
|
+
var normalizeCache = new I({ max: 2 ** 12 });
|
|
3969
3973
|
var normalize = (s) => {
|
|
3970
3974
|
const c = normalizeCache.get(s);
|
|
3971
3975
|
if (c)
|
|
@@ -3974,7 +3978,7 @@ var normalize = (s) => {
|
|
|
3974
3978
|
normalizeCache.set(s, n);
|
|
3975
3979
|
return n;
|
|
3976
3980
|
};
|
|
3977
|
-
var normalizeNocaseCache = new
|
|
3981
|
+
var normalizeNocaseCache = new I({ max: 2 ** 12 });
|
|
3978
3982
|
var normalizeNocase = (s) => {
|
|
3979
3983
|
const c = normalizeNocaseCache.get(s);
|
|
3980
3984
|
if (c)
|
|
@@ -3983,12 +3987,12 @@ var normalizeNocase = (s) => {
|
|
|
3983
3987
|
normalizeNocaseCache.set(s, n);
|
|
3984
3988
|
return n;
|
|
3985
3989
|
};
|
|
3986
|
-
var ResolveCache = class extends
|
|
3990
|
+
var ResolveCache = class extends I {
|
|
3987
3991
|
constructor() {
|
|
3988
3992
|
super({ max: 256 });
|
|
3989
3993
|
}
|
|
3990
3994
|
};
|
|
3991
|
-
var ChildrenCache = class extends
|
|
3995
|
+
var ChildrenCache = class extends I {
|
|
3992
3996
|
constructor(maxSize = 16 * 1024) {
|
|
3993
3997
|
super({
|
|
3994
3998
|
maxSize,
|
|
@@ -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
|
stderr
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7KI6XHXZ.js";
|
|
15
15
|
import {
|
|
16
16
|
mermaidOutput
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VGWEB64T.js";
|
|
18
18
|
import {
|
|
19
19
|
ViewClass
|
|
20
20
|
} from "./chunk-RXNA2XCX.js";
|
|
21
21
|
import {
|
|
22
22
|
urlOpen
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CNSTFT7U.js";
|
|
24
24
|
|
|
25
25
|
// ../../src/cli-sdk/src/mermaid-image-view.ts
|
|
26
26
|
var MermaidImageView = class extends ViewClass {
|
|
@@ -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-VGWEB64T.js";
|
|
15
15
|
import {
|
|
16
16
|
joinDepIDTuple,
|
|
17
17
|
splitDepID
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MT76WHSM.js";
|
|
19
19
|
import {
|
|
20
20
|
Spec2 as Spec
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PW6S6AIO.js";
|
|
22
22
|
|
|
23
23
|
// ../../src/cli-sdk/src/parse-add-remove-args.ts
|
|
24
24
|
import { isAbsolute, relative, resolve } from "node:path";
|
|
@@ -12,19 +12,19 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
init,
|
|
14
14
|
install
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VGWEB64T.js";
|
|
16
16
|
import {
|
|
17
17
|
asWSConfig,
|
|
18
18
|
assertWSConfig,
|
|
19
19
|
minimatch
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ICJRCXSG.js";
|
|
21
21
|
import {
|
|
22
22
|
load,
|
|
23
23
|
save
|
|
24
24
|
} from "./chunk-HTOTG4TS.js";
|
|
25
25
|
import {
|
|
26
26
|
commandUsage
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7TNSW6W3.js";
|
|
28
28
|
|
|
29
29
|
// ../../src/cli-sdk/src/commands/init.ts
|
|
30
30
|
import { mkdirSync } from "node:fs";
|
|
@@ -16,40 +16,6 @@ import {
|
|
|
16
16
|
error
|
|
17
17
|
} from "./chunk-WZWDS3W4.js";
|
|
18
18
|
|
|
19
|
-
// ../../node_modules/.vlt/~npm~package-json-from-dist@1.0.1/node_modules/package-json-from-dist/dist/esm/index.js
|
|
20
|
-
import { readFileSync } from "node:fs";
|
|
21
|
-
import { dirname, resolve, sep } from "node:path";
|
|
22
|
-
import { fileURLToPath } from "node:url";
|
|
23
|
-
var NM = `${sep}node_modules${sep}`;
|
|
24
|
-
var STORE = `.store${sep}`;
|
|
25
|
-
var PKG = `${sep}package${sep}`;
|
|
26
|
-
var DIST = `${sep}dist${sep}`;
|
|
27
|
-
var findPackageJson = (from, pathFromSrc = "../package.json") => {
|
|
28
|
-
const f2 = typeof from === "object" || from.startsWith("file://") ? fileURLToPath(from) : from;
|
|
29
|
-
const __dirname = dirname(f2);
|
|
30
|
-
const nms = __dirname.lastIndexOf(NM);
|
|
31
|
-
if (nms !== -1) {
|
|
32
|
-
const nm = __dirname.substring(0, nms + NM.length);
|
|
33
|
-
const pkgDir = __dirname.substring(nms + NM.length);
|
|
34
|
-
if (pkgDir.startsWith(STORE)) {
|
|
35
|
-
const pkg = pkgDir.indexOf(PKG, STORE.length);
|
|
36
|
-
if (pkg) {
|
|
37
|
-
return resolve(nm, pkgDir.substring(0, pkg + PKG.length), "package.json");
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const pkgName = pkgDir.startsWith("@") ? pkgDir.split(sep, 2).join(sep) : String(pkgDir.split(sep)[0]);
|
|
41
|
-
return resolve(nm, pkgName, "package.json");
|
|
42
|
-
} else {
|
|
43
|
-
const d2 = __dirname.lastIndexOf(DIST);
|
|
44
|
-
if (d2 !== -1) {
|
|
45
|
-
return resolve(__dirname.substring(0, d2), "package.json");
|
|
46
|
-
} else {
|
|
47
|
-
return resolve(__dirname, pathFromSrc);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
var loadPackageJson = (from, pathFromSrc = "../package.json") => JSON.parse(readFileSync(findPackageJson(from, pathFromSrc), "utf8"));
|
|
52
|
-
|
|
53
19
|
// ../../node_modules/.vlt/~npm~jackspeak@4.2.3/node_modules/jackspeak/dist/esm/index.js
|
|
54
20
|
import { inspect, parseArgs } from "node:util";
|
|
55
21
|
|
|
@@ -1112,6 +1078,7 @@ var defaultView = (
|
|
|
1112
1078
|
var defaultEditor = () => process.env.EDITOR || process.env.VISUAL || (process.platform === "win32" ? `${process.env.SYSTEMROOT}\\notepad.exe` : "vi");
|
|
1113
1079
|
var canonicalCommands = {
|
|
1114
1080
|
access: "access",
|
|
1081
|
+
audit: "audit",
|
|
1115
1082
|
bugs: "bugs",
|
|
1116
1083
|
build: "build",
|
|
1117
1084
|
cache: "cache",
|
|
@@ -1123,6 +1090,7 @@ var canonicalCommands = {
|
|
|
1123
1090
|
docs: "docs",
|
|
1124
1091
|
exec: "exec",
|
|
1125
1092
|
"exec-local": "exec-local",
|
|
1093
|
+
fund: "fund",
|
|
1126
1094
|
help: "help",
|
|
1127
1095
|
init: "init",
|
|
1128
1096
|
install: "install",
|
|
@@ -1130,15 +1098,18 @@ var canonicalCommands = {
|
|
|
1130
1098
|
logout: "logout",
|
|
1131
1099
|
list: "list",
|
|
1132
1100
|
ls: "ls",
|
|
1101
|
+
outdated: "outdated",
|
|
1133
1102
|
pack: "pack",
|
|
1134
1103
|
ping: "ping",
|
|
1135
1104
|
pkg: "pkg",
|
|
1136
1105
|
profile: "profile",
|
|
1137
1106
|
publish: "publish",
|
|
1138
1107
|
query: "query",
|
|
1108
|
+
registry: "registry",
|
|
1139
1109
|
repo: "repo",
|
|
1140
1110
|
"run-exec": "run-exec",
|
|
1141
1111
|
run: "run",
|
|
1112
|
+
setup: "setup",
|
|
1142
1113
|
token: "token",
|
|
1143
1114
|
uninstall: "uninstall",
|
|
1144
1115
|
unpublish: "unpublish",
|
|
@@ -1166,6 +1137,7 @@ var aliases = {
|
|
|
1166
1137
|
"?": "help",
|
|
1167
1138
|
info: "view",
|
|
1168
1139
|
ls: "list",
|
|
1140
|
+
out: "outdated",
|
|
1169
1141
|
show: "view",
|
|
1170
1142
|
xc: "exec-cache"
|
|
1171
1143
|
};
|
|
@@ -1240,25 +1212,45 @@ var definition = j2.heading("Configuration").description(
|
|
|
1240
1212
|
}).opt({
|
|
1241
1213
|
registry: {
|
|
1242
1214
|
hint: "url",
|
|
1243
|
-
default: "https://registry.npmjs.org/",
|
|
1244
1215
|
description: `Sets the registry for fetching packages, when no registry
|
|
1245
1216
|
is explicitly set on a specifier.
|
|
1246
1217
|
|
|
1247
1218
|
For example, \`express@latest\` will be resolved by looking
|
|
1248
1219
|
up the metadata from this registry.
|
|
1249
1220
|
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1221
|
+
There is **no default**. When unset, bare specifiers fall
|
|
1222
|
+
back to the registry alias named by
|
|
1223
|
+
\`--default-registry-alias\` (\`npm\` by default). If that
|
|
1224
|
+
alias is also unconfigured, commands that need a registry
|
|
1225
|
+
fail with a config error. Run \`vlt setup\` (or
|
|
1226
|
+
\`vlt login\`) to configure one.
|
|
1227
|
+
|
|
1228
|
+
See https://docs.vlt.sh/cli
|
|
1229
|
+
`
|
|
1230
|
+
},
|
|
1231
|
+
"default-registry-alias": {
|
|
1232
|
+
hint: "name",
|
|
1233
|
+
default: "npm",
|
|
1234
|
+
description: `The name of the registry alias (a key in
|
|
1235
|
+
\`--registries\`) that bare specifiers (e.g.
|
|
1236
|
+
\`express@latest\`) and transitive dependencies without an
|
|
1237
|
+
explicit registry protocol resolve through, when neither
|
|
1238
|
+
\`--registry\` nor a matching \`--scoped-registries\` entry
|
|
1239
|
+
applies.
|
|
1240
|
+
|
|
1241
|
+
Defaults to \`npm\`. Note that the \`npm\` alias has **no**
|
|
1242
|
+
built-in URL -- it must be configured (for example via
|
|
1243
|
+
\`vlt setup\`, which points it at your vlt.io registry),
|
|
1244
|
+
otherwise bare specifiers will have no registry to resolve
|
|
1245
|
+
against.
|
|
1254
1246
|
`
|
|
1255
1247
|
}
|
|
1256
1248
|
}).optList({
|
|
1257
1249
|
registries: {
|
|
1258
1250
|
hint: "name=url",
|
|
1259
|
-
description: `Specify named registry hosts by their prefix. To
|
|
1260
|
-
|
|
1261
|
-
|
|
1251
|
+
description: `Specify named registry hosts by their prefix. To choose
|
|
1252
|
+
which alias is used for non-namespaced specifiers, use the
|
|
1253
|
+
\`--default-registry-alias\` option.
|
|
1262
1254
|
|
|
1263
1255
|
Prefixes can be used as a package alias. For example:
|
|
1264
1256
|
|
|
@@ -1266,9 +1258,10 @@ var definition = j2.heading("Configuration").description(
|
|
|
1266
1258
|
vlt --registries loc=http://reg.local install foo@loc:foo@1.x
|
|
1267
1259
|
\`\`\`
|
|
1268
1260
|
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1261
|
+
There is **no** built-in \`npm\` registry URL; the \`npm\`
|
|
1262
|
+
alias must be configured (e.g. via \`vlt setup\`) before it
|
|
1263
|
+
can be used. The \`gh\` and \`jsr\` aliases have built-in
|
|
1264
|
+
defaults that can be overridden here.
|
|
1272
1265
|
`
|
|
1273
1266
|
},
|
|
1274
1267
|
"scoped-registries": {
|
|
@@ -1626,6 +1619,39 @@ var definition = j2.heading("Configuration").description(
|
|
|
1626
1619
|
"silent"
|
|
1627
1620
|
]
|
|
1628
1621
|
}
|
|
1622
|
+
}).opt({
|
|
1623
|
+
loglevel: {
|
|
1624
|
+
hint: "level",
|
|
1625
|
+
default: "info",
|
|
1626
|
+
description: `Sets the verbosity of diagnostic logging written to
|
|
1627
|
+
stderr (registry requests, warnings, etc). This is
|
|
1628
|
+
independent of \`--view\`, which controls a command's
|
|
1629
|
+
result output on stdout.
|
|
1630
|
+
|
|
1631
|
+
- silent: No diagnostic logging.
|
|
1632
|
+
- error: Only errors.
|
|
1633
|
+
- warn: Errors and warnings.
|
|
1634
|
+
- info: Default. High-level progress.
|
|
1635
|
+
- verbose: Adds per-request logging (each registry URL
|
|
1636
|
+
with its cache/stale/fetch outcome and status code).
|
|
1637
|
+
- debug: Everything, including low-level detail.
|
|
1638
|
+
|
|
1639
|
+
\`--verbose\` is shorthand for \`--loglevel=verbose\`.`,
|
|
1640
|
+
validOptions: [
|
|
1641
|
+
"silent",
|
|
1642
|
+
"error",
|
|
1643
|
+
"warn",
|
|
1644
|
+
"info",
|
|
1645
|
+
"verbose",
|
|
1646
|
+
"debug"
|
|
1647
|
+
]
|
|
1648
|
+
}
|
|
1649
|
+
}).flag({
|
|
1650
|
+
verbose: {
|
|
1651
|
+
description: `Shorthand for \`--loglevel=verbose\`. Streams each
|
|
1652
|
+
registry request to stderr with its cache/fetch outcome
|
|
1653
|
+
and status code, useful for debugging request behavior.`
|
|
1654
|
+
}
|
|
1629
1655
|
}).optList({
|
|
1630
1656
|
"dashboard-root": {
|
|
1631
1657
|
hint: "path",
|
|
@@ -1638,6 +1664,12 @@ var definition = j2.heading("Configuration").description(
|
|
|
1638
1664
|
description: `Save installed packages to a package.json file as
|
|
1639
1665
|
devDependencies`
|
|
1640
1666
|
},
|
|
1667
|
+
"save-exact": {
|
|
1668
|
+
short: "E",
|
|
1669
|
+
description: `Save installed packages to package.json with an exact
|
|
1670
|
+
version rather than using the default semver range
|
|
1671
|
+
operator (e.g. \`1.2.3\` instead of \`^1.2.3\`).`
|
|
1672
|
+
},
|
|
1641
1673
|
"save-optional": {
|
|
1642
1674
|
short: "O",
|
|
1643
1675
|
description: `Save installed packages to a package.json file as
|
|
@@ -1654,6 +1686,14 @@ var definition = j2.heading("Configuration").description(
|
|
|
1654
1686
|
devDependencies or optionalDependencies, but you want to
|
|
1655
1687
|
move it to be a non-optional production dependency.`
|
|
1656
1688
|
}
|
|
1689
|
+
}).opt({
|
|
1690
|
+
"save-prefix": {
|
|
1691
|
+
description: `The version prefix to use when saving dependencies to
|
|
1692
|
+
package.json (e.g. \`^\`, \`~\`, \`>=\`, or empty string
|
|
1693
|
+
for exact versions). Defaults to \`^\`.
|
|
1694
|
+
Ignored when \`--save-exact\` is set.`,
|
|
1695
|
+
default: "^"
|
|
1696
|
+
}
|
|
1657
1697
|
}).opt({
|
|
1658
1698
|
"expect-results": {
|
|
1659
1699
|
hint: "value",
|
|
@@ -1752,7 +1792,6 @@ var getSortedCliOptions = () => {
|
|
|
1752
1792
|
var getSortedKeys = () => Object.keys(definition.toJSON()).sort((a, b2) => a.localeCompare(b2));
|
|
1753
1793
|
|
|
1754
1794
|
export {
|
|
1755
|
-
loadPackageJson,
|
|
1756
1795
|
jack,
|
|
1757
1796
|
defaultView,
|
|
1758
1797
|
commands,
|
|
@@ -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
|
parseRange
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2PLIV3N3.js";
|
|
15
15
|
import {
|
|
16
16
|
error,
|
|
17
17
|
typeError
|
|
@@ -19,10 +19,8 @@ import {
|
|
|
19
19
|
|
|
20
20
|
// ../../src/spec/src/browser.ts
|
|
21
21
|
var kCustomInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
22
|
-
var defaultRegistry = "https://registry.npmjs.org/";
|
|
23
22
|
var defaultRegistryName = "npm";
|
|
24
23
|
var defaultRegistries = {
|
|
25
|
-
npm: defaultRegistry,
|
|
26
24
|
gh: "https://npm.pkg.github.com/"
|
|
27
25
|
};
|
|
28
26
|
var defaultJsrRegistries = { jsr: "https://npm.jsr.io/" };
|
|
@@ -51,19 +49,21 @@ var getOptions = (options) => ({
|
|
|
51
49
|
catalog: {},
|
|
52
50
|
catalogs: {},
|
|
53
51
|
...options,
|
|
52
|
+
// built-in aliases are user/service-overridable: user config wins
|
|
54
53
|
"jsr-registries": {
|
|
55
|
-
...
|
|
56
|
-
...
|
|
54
|
+
...defaultJsrRegistries,
|
|
55
|
+
...options?.["jsr-registries"] ?? {}
|
|
57
56
|
},
|
|
58
|
-
registry: options?.registry
|
|
57
|
+
registry: options?.registry,
|
|
58
|
+
"default-registry-alias": options?.["default-registry-alias"] ?? defaultRegistryName,
|
|
59
59
|
"scoped-registries": options?.["scoped-registries"] ?? {},
|
|
60
60
|
"git-hosts": options?.["git-hosts"] ? {
|
|
61
61
|
...defaultGitHosts,
|
|
62
62
|
...options["git-hosts"]
|
|
63
63
|
} : defaultGitHosts,
|
|
64
64
|
registries: {
|
|
65
|
-
...
|
|
66
|
-
...
|
|
65
|
+
...defaultRegistries,
|
|
66
|
+
...options?.registries ?? {}
|
|
67
67
|
},
|
|
68
68
|
"git-host-archives": options?.["git-host-archives"] ? {
|
|
69
69
|
...defaultGitHostArchives,
|
|
@@ -411,9 +411,14 @@ var Spec = class _Spec {
|
|
|
411
411
|
this.distTag = this.bareSpec;
|
|
412
412
|
}
|
|
413
413
|
this.registrySpec = this.bareSpec;
|
|
414
|
-
const {
|
|
414
|
+
const {
|
|
415
|
+
"scoped-registries": scopeRegs,
|
|
416
|
+
registry,
|
|
417
|
+
registries,
|
|
418
|
+
"default-registry-alias": defaultAlias
|
|
419
|
+
} = this.options;
|
|
415
420
|
const scopeReg = this.scope && scopeRegs[this.scope];
|
|
416
|
-
this.registry = scopeReg ?? registry;
|
|
421
|
+
this.registry = scopeReg ?? registry ?? registries[defaultAlias];
|
|
417
422
|
for (const r of Object.values(this.options["jsr-registries"])) {
|
|
418
423
|
if (this.registry === r) return;
|
|
419
424
|
}
|
|
@@ -696,7 +701,6 @@ Spec2.nodejsDependencies = {
|
|
|
696
701
|
};
|
|
697
702
|
|
|
698
703
|
export {
|
|
699
|
-
defaultRegistry,
|
|
700
704
|
defaultRegistryName,
|
|
701
705
|
defaultRegistries,
|
|
702
706
|
defaultJsrRegistries,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-WGDTG44V.js";
|
|
15
15
|
import {
|
|
16
16
|
loadPackageJson
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-E74WGW5C.js";
|
|
18
18
|
|
|
19
19
|
// ../../src/cli-sdk/src/custom-help.ts
|
|
20
20
|
var { version } = loadPackageJson(
|
|
@@ -213,6 +213,14 @@ var allCommands = [
|
|
|
213
213
|
showByDefault: true,
|
|
214
214
|
defaultOrder: 3
|
|
215
215
|
},
|
|
216
|
+
{
|
|
217
|
+
name: "registry",
|
|
218
|
+
aliases: [],
|
|
219
|
+
args: "<alias> <command>",
|
|
220
|
+
desc: "Run an account command against a named registry",
|
|
221
|
+
showByDefault: true,
|
|
222
|
+
defaultOrder: 9
|
|
223
|
+
},
|
|
216
224
|
{
|
|
217
225
|
name: "repo",
|
|
218
226
|
aliases: [],
|
|
@@ -235,6 +243,14 @@ var allCommands = [
|
|
|
235
243
|
desc: "Run a script &/or fallback to executing a binary",
|
|
236
244
|
showByDefault: false
|
|
237
245
|
},
|
|
246
|
+
{
|
|
247
|
+
name: "setup",
|
|
248
|
+
aliases: [],
|
|
249
|
+
args: "[<account>]",
|
|
250
|
+
desc: "Configure your vlt.io account registries",
|
|
251
|
+
showByDefault: true,
|
|
252
|
+
defaultOrder: 0
|
|
253
|
+
},
|
|
238
254
|
{
|
|
239
255
|
name: "token",
|
|
240
256
|
aliases: [],
|
|
@@ -348,7 +364,7 @@ var generateFullHelp = (colors = false) => {
|
|
|
348
364
|
shorts: [],
|
|
349
365
|
long: "registry",
|
|
350
366
|
args: "<url>",
|
|
351
|
-
desc: "
|
|
367
|
+
desc: "Set the registry to resolve packages against"
|
|
352
368
|
},
|
|
353
369
|
{
|
|
354
370
|
shorts: ["v"],
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
|
|
13
|
+
// ../../src/output/src/index.ts
|
|
14
|
+
import EventEmitter from "node:events";
|
|
15
|
+
var OutputEmitter = class {
|
|
16
|
+
emitter = new EventEmitter();
|
|
17
|
+
emit(eventName, payload) {
|
|
18
|
+
this.emitter.emit(eventName, payload);
|
|
19
|
+
}
|
|
20
|
+
on(eventName, handler) {
|
|
21
|
+
this.emitter.on(eventName, handler);
|
|
22
|
+
}
|
|
23
|
+
off(eventName, handler) {
|
|
24
|
+
this.emitter.off(eventName, handler);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var emitter = new OutputEmitter();
|
|
28
|
+
var logRequest = (url, state, details = {}) => {
|
|
29
|
+
emitter.emit("request", { url, state, ...details });
|
|
30
|
+
};
|
|
31
|
+
var graphStep = (step) => {
|
|
32
|
+
emitter.emit("graphStep", { step, state: "start" });
|
|
33
|
+
return () => emitter.emit("graphStep", { step, state: "stop" });
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
emitter,
|
|
38
|
+
logRequest,
|
|
39
|
+
graphStep
|
|
40
|
+
};
|