@vltpkg/cli-js 1.0.0-rc.32 → 1.0.0-rc.34
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-SXQICNAN.js} +23 -12
- package/{bugs-BMZ5UERM.js → bugs-OOPMFRCI.js} +19 -17
- package/{build-LGQI6OGM.js → build-HDXI5OA7.js} +13 -9
- package/{cache-JWHNATAX.js → cache-RW4Y4XNQ.js} +19 -14
- package/cache-unzip-src-unzip.js +434 -428
- package/{chunk-6YXVQ5HC.js → chunk-2PLIV3N3.js} +1 -27
- package/{chunk-G6PG3AGN.js → chunk-3SQ5Y324.js} +11 -8
- package/{chunk-ZUP6UTME.js → chunk-4RZDJQ5U.js} +42 -61
- package/{chunk-M2WD7IBO.js → chunk-4ZXA6RLP.js} +1 -1
- package/{chunk-R44FR7BY.js → chunk-7NHXV6AH.js} +439 -433
- package/{chunk-SIXXDCBI.js → chunk-CCQYIYTA.js} +7 -7
- package/{chunk-FXDRM4ZO.js → chunk-CLVRCGOZ.js} +247 -235
- package/{chunk-YCQTLBWF.js → chunk-CNSTFT7U.js} +1 -1
- package/{chunk-7XE7OES7.js → chunk-D5CP6O6G.js} +3 -3
- package/{chunk-YQXDHMHG.js → chunk-E5YE7UTZ.js} +3167 -2991
- package/chunk-E74WGW5C.js +49 -0
- package/{chunk-DFNHGGGV.js → chunk-EFWPI6IY.js} +1 -1
- package/{chunk-5UXEBLLT.js → chunk-EHEVBLDB.js} +68 -7
- 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-HB7CKTYO.js +75 -0
- package/{chunk-KRGA5VLT.js → chunk-ICJRCXSG.js} +31 -27
- package/{chunk-FBTBHRPG.js → chunk-LCDBW6IT.js} +1 -1
- package/{chunk-IAKUGHGT.js → chunk-MT76WHSM.js} +1 -1
- package/{chunk-3TVABXAG.js → chunk-MU7Y4R5E.js} +3 -3
- package/{chunk-JKAZKVQU.js → chunk-PW6S6AIO.js} +15 -11
- package/{chunk-DI2CYYXF.js → chunk-U6DM3ROE.js} +706 -442
- package/chunk-UBLFPJHV.js +40 -0
- package/{chunk-SDBTQF2Y.js → chunk-UCD3RJYG.js} +5 -5
- package/{chunk-XFQ2EH5D.js → chunk-VM2RMMY4.js} +3 -3
- package/{chunk-DIKKTUBV.js → chunk-VZ7UNZHR.js} +3 -3
- package/{chunk-2V4AQPBR.js → chunk-WP6CYBPM.js} +81 -46
- package/{chunk-LEX7YPHR.js → chunk-WXMYKCQW.js} +118 -92
- package/{chunk-LRPTCGTW.js → chunk-XA47WS4N.js} +11 -15
- package/{chunk-NLFBANVO.js → chunk-Y7CQIZ7Y.js} +106 -150
- package/{ci-FQJANSQW.js → ci-MTYU2K2A.js} +14 -10
- package/cli-package.json +6 -2
- package/{config-4KQTTXJH.js → config-6NXV2BXW.js} +15 -13
- package/{config-LRL3N7TN.js → config-TVAXCTQO.js} +13 -11
- package/{create-KN6AXEA6.js → create-LXI5DCDW.js} +24 -19
- package/{deprecate-P26WHVFB.js → deprecate-2AQBL5XT.js} +22 -14
- package/{devtools-6NFQDW4L.js → devtools-HGLF4KAO.js} +82 -28
- package/{dist-tag-FA2BT7SA.js → dist-tag-BFSYLRIH.js} +16 -9
- package/{docs-OAPIY4SC.js → docs-ADPJ4B4C.js} +19 -17
- package/{exec-CVZGHJZS.js → exec-GMS54RAC.js} +24 -19
- package/{exec-cache-3AHODVRN.js → exec-cache-R5LVZL5Z.js} +22 -17
- package/{exec-local-I4OJX76E.js → exec-local-TVCLZGIM.js} +17 -14
- package/{help-QFIQSPNS.js → help-6CECUD6C.js} +5 -4
- package/{init-QLADIAP5.js → init-XXFLGYVP.js} +12 -10
- package/{install-B7CU2BLC.js → install-6KMXYSF5.js} +27 -12
- package/{list-OTFV3LOM.js → list-RUO3SUKY.js} +20 -15
- package/{login-LG2ZOIDQ.js → login-6I2CGO7I.js} +23 -9
- package/{logout-KUI773AM.js → logout-JTU4BJKH.js} +19 -8
- package/{pack-C55TTBIQ.js → pack-NCWH2TUA.js} +17 -13
- package/package.json +8 -1
- package/{ping-VNUOC26G.js → ping-4MEAC2WD.js} +17 -10
- package/{pkg-H4RJEBK5.js → pkg-ENSKG6G7.js} +13 -11
- package/{profile-DIJ5JUSE.js → profile-62YHNFSO.js} +16 -8
- package/{publish-XF2TRBPH.js → publish-PPY724N2.js} +58 -23
- package/{query-BGP5JMJ7.js → query-NLWXKOOT.js} +61 -15
- package/registry-QGI44LG4.js +117 -0
- package/registry-client-package.json +6 -2
- package/registry-client-src-revalidate.js +1245 -977
- package/{repo-NCEHK7KB.js → repo-BFRAXIVU.js} +19 -17
- package/{reporter-OB6SNHOZ.js → reporter-2XBYWAVU.js} +3 -2
- package/{run-ZNJJYEJF.js → run-7O65747G.js} +17 -14
- package/{run-exec-F5OV7MVN.js → run-exec-2OYWHL6K.js} +19 -14
- package/security-archive-src-update-expired.js +16 -11
- package/setup-MMIDAIJI.js +181 -0
- package/{src-M3WI7TSB.js → src-OK3KHDYR.js} +25 -17
- package/{token-KXCVRJGF.js → token-VLVXUW54.js} +20 -9
- package/{uninstall-33SUWR6K.js → uninstall-TAG6QIAG.js} +15 -11
- package/{unpublish-7AZPBZF2.js → unpublish-Y4L5J2IA.js} +17 -9
- package/{update-2EQF6IKZ.js → update-RYH4RKBS.js} +14 -10
- package/{version-HFYI3SEX.js → version-COHB32ON.js} +12 -10
- package/{view-C5OT36OB.js → view-P7U4MF43.js} +18 -14
- 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-47MVFMZC.js} +19 -8
- package/chunk-FXIBCUIM.js +0 -73
|
@@ -11,37 +11,39 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
require_lib
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CLVRCGOZ.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VM2RMMY4.js";
|
|
18
18
|
import {
|
|
19
19
|
Query,
|
|
20
20
|
actual
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-E5YE7UTZ.js";
|
|
22
22
|
import {
|
|
23
23
|
SecurityArchive
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-F2FKLPZD.js";
|
|
25
25
|
import {
|
|
26
26
|
PackageInfoClient
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
Spec2 as Spec
|
|
33
|
-
} from "./chunk-JKAZKVQU.js";
|
|
27
|
+
} from "./chunk-WXMYKCQW.js";
|
|
28
|
+
import "./chunk-FWKQ7YDF.js";
|
|
29
|
+
import "./chunk-ICJRCXSG.js";
|
|
30
|
+
import "./chunk-MT76WHSM.js";
|
|
34
31
|
import "./chunk-HTOTG4TS.js";
|
|
35
32
|
import {
|
|
36
33
|
commandUsage
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
34
|
+
} from "./chunk-LCDBW6IT.js";
|
|
35
|
+
import "./chunk-U6DM3ROE.js";
|
|
39
36
|
import {
|
|
40
37
|
urlOpen
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import
|
|
44
|
-
|
|
38
|
+
} from "./chunk-CNSTFT7U.js";
|
|
39
|
+
import "./chunk-7NHXV6AH.js";
|
|
40
|
+
import {
|
|
41
|
+
Spec2 as Spec
|
|
42
|
+
} from "./chunk-PW6S6AIO.js";
|
|
43
|
+
import "./chunk-E74WGW5C.js";
|
|
44
|
+
import "./chunk-WP6CYBPM.js";
|
|
45
|
+
import "./chunk-UBLFPJHV.js";
|
|
46
|
+
import "./chunk-2PLIV3N3.js";
|
|
45
47
|
import "./chunk-XNLSTHDK.js";
|
|
46
48
|
import {
|
|
47
49
|
error
|
|
@@ -11,11 +11,12 @@ 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-4RZDJQ5U.js";
|
|
15
15
|
import "./chunk-VTEFO2FT.js";
|
|
16
16
|
import "./chunk-RXNA2XCX.js";
|
|
17
17
|
import "./chunk-WGDTG44V.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-UBLFPJHV.js";
|
|
19
|
+
import "./chunk-2PLIV3N3.js";
|
|
19
20
|
import "./chunk-WZWDS3W4.js";
|
|
20
21
|
import "./chunk-PZLD7RTK.js";
|
|
21
22
|
export {
|
|
@@ -12,31 +12,34 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
ExecCommand,
|
|
14
14
|
views
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UCD3RJYG.js";
|
|
16
16
|
import "./chunk-RIYFGX27.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-VM2RMMY4.js";
|
|
18
|
+
import "./chunk-EHEVBLDB.js";
|
|
19
19
|
import "./chunk-G2YT2GWF.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-Y7CQIZ7Y.js";
|
|
21
21
|
import {
|
|
22
22
|
run,
|
|
23
23
|
runFG
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-E5YE7UTZ.js";
|
|
25
|
+
import "./chunk-F2FKLPZD.js";
|
|
26
26
|
import "./chunk-VTEFO2FT.js";
|
|
27
27
|
import "./chunk-RXNA2XCX.js";
|
|
28
28
|
import "./chunk-WGDTG44V.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-JKAZKVQU.js";
|
|
29
|
+
import "./chunk-EFWPI6IY.js";
|
|
30
|
+
import "./chunk-ICJRCXSG.js";
|
|
31
|
+
import "./chunk-MT76WHSM.js";
|
|
33
32
|
import "./chunk-HTOTG4TS.js";
|
|
33
|
+
import "./chunk-FAG776ZD.js";
|
|
34
34
|
import {
|
|
35
35
|
commandUsage
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-LCDBW6IT.js";
|
|
37
|
+
import "./chunk-7NHXV6AH.js";
|
|
38
|
+
import "./chunk-PW6S6AIO.js";
|
|
39
|
+
import "./chunk-E74WGW5C.js";
|
|
40
|
+
import "./chunk-WP6CYBPM.js";
|
|
41
|
+
import "./chunk-UBLFPJHV.js";
|
|
42
|
+
import "./chunk-2PLIV3N3.js";
|
|
40
43
|
import "./chunk-XNLSTHDK.js";
|
|
41
44
|
import "./chunk-WZWDS3W4.js";
|
|
42
45
|
import "./chunk-PZLD7RTK.js";
|
|
@@ -12,36 +12,40 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
ExecCommand,
|
|
14
14
|
views
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UCD3RJYG.js";
|
|
16
16
|
import "./chunk-RIYFGX27.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-VM2RMMY4.js";
|
|
18
|
+
import "./chunk-EHEVBLDB.js";
|
|
19
19
|
import "./chunk-G2YT2GWF.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-Y7CQIZ7Y.js";
|
|
21
21
|
import {
|
|
22
22
|
runExec,
|
|
23
23
|
runExecFG
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-E5YE7UTZ.js";
|
|
25
|
+
import "./chunk-F2FKLPZD.js";
|
|
26
26
|
import "./chunk-VTEFO2FT.js";
|
|
27
27
|
import "./chunk-RXNA2XCX.js";
|
|
28
28
|
import "./chunk-WGDTG44V.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-JKAZKVQU.js";
|
|
29
|
+
import "./chunk-EFWPI6IY.js";
|
|
30
|
+
import "./chunk-ICJRCXSG.js";
|
|
31
|
+
import "./chunk-MT76WHSM.js";
|
|
33
32
|
import "./chunk-HTOTG4TS.js";
|
|
33
|
+
import "./chunk-FAG776ZD.js";
|
|
34
34
|
import {
|
|
35
35
|
commandUsage
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-LCDBW6IT.js";
|
|
37
|
+
import "./chunk-7NHXV6AH.js";
|
|
38
|
+
import "./chunk-PW6S6AIO.js";
|
|
39
|
+
import "./chunk-E74WGW5C.js";
|
|
40
|
+
import "./chunk-WP6CYBPM.js";
|
|
41
|
+
import "./chunk-UBLFPJHV.js";
|
|
42
|
+
import "./chunk-2PLIV3N3.js";
|
|
40
43
|
import "./chunk-XNLSTHDK.js";
|
|
41
44
|
import "./chunk-WZWDS3W4.js";
|
|
42
45
|
import "./chunk-PZLD7RTK.js";
|
|
43
46
|
|
|
44
47
|
// ../../src/cli-sdk/src/commands/run-exec.ts
|
|
48
|
+
var needsRegistry = true;
|
|
45
49
|
var usage = () => commandUsage({
|
|
46
50
|
command: "run-exec",
|
|
47
51
|
usage: "[command ...]",
|
|
@@ -80,6 +84,7 @@ var usage = () => commandUsage({
|
|
|
80
84
|
var command = async (conf) => await new ExecCommand(conf, runExec, runExecFG).run();
|
|
81
85
|
export {
|
|
82
86
|
command,
|
|
87
|
+
needsRegistry,
|
|
83
88
|
usage,
|
|
84
89
|
views
|
|
85
90
|
};
|
|
@@ -16,7 +16,7 @@ import { mkdirSync } from "node:fs";
|
|
|
16
16
|
import { dirname as dirname2 } from "node:path";
|
|
17
17
|
import { pathToFileURL } from "node:url";
|
|
18
18
|
|
|
19
|
-
// ../../node_modules/.vlt/~npm~is-network-error@1.3.
|
|
19
|
+
// ../../node_modules/.vlt/~npm~is-network-error@1.3.2/node_modules/is-network-error/index.js
|
|
20
20
|
var objectToString = Object.prototype.toString;
|
|
21
21
|
var isError = (value) => objectToString.call(value) === "[object Error]";
|
|
22
22
|
var errorMessages = /* @__PURE__ */ new Set([
|
|
@@ -43,7 +43,7 @@ function isNetworkError(error2) {
|
|
|
43
43
|
return false;
|
|
44
44
|
}
|
|
45
45
|
const { message, stack } = error2;
|
|
46
|
-
if (message === "Load failed") {
|
|
46
|
+
if (message === "Load failed" || message.startsWith("Load failed (") && message.endsWith(")")) {
|
|
47
47
|
return stack === void 0 || "__sentry_captured__" in error2;
|
|
48
48
|
}
|
|
49
49
|
if (message.startsWith("error sending request for url")) {
|
|
@@ -1240,10 +1240,8 @@ var parseRange = (range, includePrerelease = false) => {
|
|
|
1240
1240
|
|
|
1241
1241
|
// ../../src/spec/src/browser.ts
|
|
1242
1242
|
var kCustomInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
1243
|
-
var defaultRegistry = "https://registry.npmjs.org/";
|
|
1244
1243
|
var defaultRegistryName = "npm";
|
|
1245
1244
|
var defaultRegistries = {
|
|
1246
|
-
npm: defaultRegistry,
|
|
1247
1245
|
gh: "https://npm.pkg.github.com/"
|
|
1248
1246
|
};
|
|
1249
1247
|
var defaultJsrRegistries = { jsr: "https://npm.jsr.io/" };
|
|
@@ -1269,19 +1267,21 @@ var getOptions = (options) => ({
|
|
|
1269
1267
|
catalog: {},
|
|
1270
1268
|
catalogs: {},
|
|
1271
1269
|
...options,
|
|
1270
|
+
// built-in aliases are user/service-overridable: user config wins
|
|
1272
1271
|
"jsr-registries": {
|
|
1273
|
-
...
|
|
1274
|
-
...
|
|
1272
|
+
...defaultJsrRegistries,
|
|
1273
|
+
...options?.["jsr-registries"] ?? {}
|
|
1275
1274
|
},
|
|
1276
|
-
registry: options?.registry
|
|
1275
|
+
registry: options?.registry,
|
|
1276
|
+
"default-registry-alias": options?.["default-registry-alias"] ?? defaultRegistryName,
|
|
1277
1277
|
"scoped-registries": options?.["scoped-registries"] ?? {},
|
|
1278
1278
|
"git-hosts": options?.["git-hosts"] ? {
|
|
1279
1279
|
...defaultGitHosts,
|
|
1280
1280
|
...options["git-hosts"]
|
|
1281
1281
|
} : defaultGitHosts,
|
|
1282
1282
|
registries: {
|
|
1283
|
-
...
|
|
1284
|
-
...
|
|
1283
|
+
...defaultRegistries,
|
|
1284
|
+
...options?.registries ?? {}
|
|
1285
1285
|
},
|
|
1286
1286
|
"git-host-archives": options?.["git-host-archives"] ? {
|
|
1287
1287
|
...defaultGitHostArchives,
|
|
@@ -1617,9 +1617,14 @@ var Spec = class _Spec {
|
|
|
1617
1617
|
this.distTag = this.bareSpec;
|
|
1618
1618
|
}
|
|
1619
1619
|
this.registrySpec = this.bareSpec;
|
|
1620
|
-
const {
|
|
1620
|
+
const {
|
|
1621
|
+
"scoped-registries": scopeRegs,
|
|
1622
|
+
registry,
|
|
1623
|
+
registries,
|
|
1624
|
+
"default-registry-alias": defaultAlias
|
|
1625
|
+
} = this.options;
|
|
1621
1626
|
const scopeReg = this.scope && scopeRegs[this.scope];
|
|
1622
|
-
this.registry = scopeReg ?? registry;
|
|
1627
|
+
this.registry = scopeReg ?? registry ?? registries[defaultAlias];
|
|
1623
1628
|
for (const r of Object.values(this.options["jsr-registries"])) {
|
|
1624
1629
|
if (this.registry === r) return;
|
|
1625
1630
|
}
|
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
stdout
|
|
14
|
+
} from "./chunk-EHEVBLDB.js";
|
|
15
|
+
import "./chunk-G2YT2GWF.js";
|
|
16
|
+
import "./chunk-Y7CQIZ7Y.js";
|
|
17
|
+
import "./chunk-RXNA2XCX.js";
|
|
18
|
+
import "./chunk-WGDTG44V.js";
|
|
19
|
+
import "./chunk-EFWPI6IY.js";
|
|
20
|
+
import "./chunk-MT76WHSM.js";
|
|
21
|
+
import "./chunk-FAG776ZD.js";
|
|
22
|
+
import {
|
|
23
|
+
commandUsage
|
|
24
|
+
} from "./chunk-LCDBW6IT.js";
|
|
25
|
+
import {
|
|
26
|
+
RegistryClient
|
|
27
|
+
} from "./chunk-U6DM3ROE.js";
|
|
28
|
+
import "./chunk-CNSTFT7U.js";
|
|
29
|
+
import "./chunk-7NHXV6AH.js";
|
|
30
|
+
import {
|
|
31
|
+
defaultRegistries
|
|
32
|
+
} from "./chunk-PW6S6AIO.js";
|
|
33
|
+
import "./chunk-E74WGW5C.js";
|
|
34
|
+
import "./chunk-WP6CYBPM.js";
|
|
35
|
+
import "./chunk-UBLFPJHV.js";
|
|
36
|
+
import "./chunk-2PLIV3N3.js";
|
|
37
|
+
import "./chunk-XNLSTHDK.js";
|
|
38
|
+
import {
|
|
39
|
+
error
|
|
40
|
+
} from "./chunk-WZWDS3W4.js";
|
|
41
|
+
import "./chunk-PZLD7RTK.js";
|
|
42
|
+
|
|
43
|
+
// ../../src/cli-sdk/src/commands/setup.ts
|
|
44
|
+
import { createInterface } from "node:readline/promises";
|
|
45
|
+
var VLT_SIGNUP_URL = "https://www.vlt.io";
|
|
46
|
+
var VLT_REGISTRY_BASE = "https://registry.vlt.io";
|
|
47
|
+
var accountRegistries = ["npm", "main"];
|
|
48
|
+
var accountRegistryURL = (account, name) => `${VLT_REGISTRY_BASE}/${encodeURIComponent(account)}/${name}/`;
|
|
49
|
+
var normalizeRegistryURL = (url) => url.endsWith("/") ? url : `${url}/`;
|
|
50
|
+
var views = {
|
|
51
|
+
human: (result) => {
|
|
52
|
+
const lines = [
|
|
53
|
+
`Configured ${Object.keys(result.registries).length} registry ${Object.keys(result.registries).length === 1 ? "alias" : "aliases"} for "${result.account}" in ${result.which} config:`
|
|
54
|
+
];
|
|
55
|
+
for (const [name, url] of Object.entries(result.registries)) {
|
|
56
|
+
lines.push(` ${name} -> ${url}`);
|
|
57
|
+
}
|
|
58
|
+
lines.push(
|
|
59
|
+
"",
|
|
60
|
+
"You can now install packages, e.g.:",
|
|
61
|
+
" vlt install <pkg>"
|
|
62
|
+
);
|
|
63
|
+
return lines.join("\n");
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var usage = () => commandUsage({
|
|
67
|
+
command: "setup",
|
|
68
|
+
usage: "[<account>]",
|
|
69
|
+
description: `Configure the registry aliases for your vlt.io account so
|
|
70
|
+
that \`vlt install\` and \`vlx\` work out of the box.
|
|
71
|
+
|
|
72
|
+
Sign up or log in at ${VLT_SIGNUP_URL} first. The wizard
|
|
73
|
+
authenticates against your account and writes the
|
|
74
|
+
\`npm\` and \`main\` registry aliases (and any additional
|
|
75
|
+
aliases you add) to your user \`vlt.json\`.`,
|
|
76
|
+
options: {
|
|
77
|
+
config: {
|
|
78
|
+
value: "<user | project>",
|
|
79
|
+
description: "Which config file to write to. Defaults to `user`; pass `--config=project` to write to the project `vlt.json`."
|
|
80
|
+
},
|
|
81
|
+
registries: {
|
|
82
|
+
value: "<name=url>",
|
|
83
|
+
description: "Additional registry aliases to stage non-interactively. Combine with `--yes` to run setup unattended."
|
|
84
|
+
},
|
|
85
|
+
yes: {
|
|
86
|
+
description: "Skip interactive prompts (requires <account> and does not open a browser for authentication)."
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
var command = async (conf) => {
|
|
91
|
+
const yes = !!conf.get("yes");
|
|
92
|
+
const which = conf.get("config") === "project" ? "project" : "user";
|
|
93
|
+
let rl;
|
|
94
|
+
const ask = async (question) => {
|
|
95
|
+
rl ??= createInterface(process.stdin, process.stdout);
|
|
96
|
+
return (await rl.question(question)).trim();
|
|
97
|
+
};
|
|
98
|
+
try {
|
|
99
|
+
stdout(
|
|
100
|
+
`Sign up or log in at ${VLT_SIGNUP_URL} before continuing.`
|
|
101
|
+
);
|
|
102
|
+
let account = conf.positionals[0]?.trim();
|
|
103
|
+
if (!account) {
|
|
104
|
+
if (yes) {
|
|
105
|
+
throw error(
|
|
106
|
+
"An account slug is required in non-interactive mode. Pass it as an argument: `vlt setup <account> --yes`.",
|
|
107
|
+
{ code: "ECONFIG" }
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
account = await ask("vlt.io account or organization slug: ");
|
|
111
|
+
if (!account) {
|
|
112
|
+
throw error("No account slug provided.", { code: "ECONFIG" });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const registries = {};
|
|
116
|
+
for (const name of accountRegistries) {
|
|
117
|
+
registries[name] = accountRegistryURL(account, name);
|
|
118
|
+
}
|
|
119
|
+
const builtinRegistries = defaultRegistries;
|
|
120
|
+
for (const [name, url] of Object.entries(
|
|
121
|
+
conf.options.registries
|
|
122
|
+
)) {
|
|
123
|
+
if (builtinRegistries[name] === url) continue;
|
|
124
|
+
registries[name] = normalizeRegistryURL(url);
|
|
125
|
+
}
|
|
126
|
+
const rc = new RegistryClient(conf.options);
|
|
127
|
+
if (!yes) {
|
|
128
|
+
const doAuth = await ask(
|
|
129
|
+
"Authenticate with your vlt.io account now? (Y/n) "
|
|
130
|
+
);
|
|
131
|
+
if (!/^n/i.test(doAuth)) {
|
|
132
|
+
for (const name of accountRegistries) {
|
|
133
|
+
stdout(`Authenticating against the "${name}" registry...`);
|
|
134
|
+
await rc.login(accountRegistryURL(account, name));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
for (; ; ) {
|
|
138
|
+
const more = await ask("Add another registry alias? (y/N) ");
|
|
139
|
+
if (!/^y/i.test(more)) break;
|
|
140
|
+
const name = await ask(" alias name: ");
|
|
141
|
+
if (!name) {
|
|
142
|
+
stdout(" alias name is required, skipping.");
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (name in registries) {
|
|
146
|
+
stdout(` alias "${name}" is already staged, skipping.`);
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const url = await ask(" registry url: ");
|
|
150
|
+
if (!url) {
|
|
151
|
+
stdout(" registry url is required, skipping.");
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
const normalized = normalizeRegistryURL(url);
|
|
155
|
+
registries[name] = normalized;
|
|
156
|
+
const auth = await ask(
|
|
157
|
+
` authenticate against "${name}" now? (y/N) `
|
|
158
|
+
);
|
|
159
|
+
if (/^y/i.test(auth)) {
|
|
160
|
+
await rc.login(normalized);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
await conf.addConfigToFile(which, { registries });
|
|
165
|
+
return { account, which, registries };
|
|
166
|
+
} finally {
|
|
167
|
+
if (rl) {
|
|
168
|
+
rl.close();
|
|
169
|
+
process.stdin.pause();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
export {
|
|
174
|
+
VLT_REGISTRY_BASE,
|
|
175
|
+
VLT_SIGNUP_URL,
|
|
176
|
+
accountRegistries,
|
|
177
|
+
accountRegistryURL,
|
|
178
|
+
command,
|
|
179
|
+
usage,
|
|
180
|
+
views
|
|
181
|
+
};
|
|
@@ -11,38 +11,42 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
loadCommand
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HB7CKTYO.js";
|
|
15
15
|
import {
|
|
16
16
|
indent,
|
|
17
17
|
outputCommand,
|
|
18
18
|
stderr,
|
|
19
19
|
stdout
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EHEVBLDB.js";
|
|
21
21
|
import "./chunk-G2YT2GWF.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-Y7CQIZ7Y.js";
|
|
23
23
|
import "./chunk-RXNA2XCX.js";
|
|
24
24
|
import "./chunk-WGDTG44V.js";
|
|
25
25
|
import {
|
|
26
26
|
asRootError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EFWPI6IY.js";
|
|
28
28
|
import {
|
|
29
29
|
Config
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-JKAZKVQU.js";
|
|
30
|
+
} from "./chunk-3SQ5Y324.js";
|
|
31
|
+
import "./chunk-WXMYKCQW.js";
|
|
32
|
+
import "./chunk-FWKQ7YDF.js";
|
|
33
|
+
import "./chunk-ICJRCXSG.js";
|
|
34
|
+
import "./chunk-MT76WHSM.js";
|
|
36
35
|
import "./chunk-HTOTG4TS.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-FAG776ZD.js";
|
|
37
|
+
import "./chunk-U6DM3ROE.js";
|
|
38
|
+
import "./chunk-CNSTFT7U.js";
|
|
39
|
+
import "./chunk-7NHXV6AH.js";
|
|
40
|
+
import "./chunk-PW6S6AIO.js";
|
|
40
41
|
import {
|
|
41
|
-
getSortedCliOptions,
|
|
42
|
-
getSortedKeys,
|
|
43
42
|
loadPackageJson
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import
|
|
43
|
+
} from "./chunk-E74WGW5C.js";
|
|
44
|
+
import {
|
|
45
|
+
getSortedCliOptions,
|
|
46
|
+
getSortedKeys
|
|
47
|
+
} from "./chunk-WP6CYBPM.js";
|
|
48
|
+
import "./chunk-UBLFPJHV.js";
|
|
49
|
+
import "./chunk-2PLIV3N3.js";
|
|
46
50
|
import "./chunk-XNLSTHDK.js";
|
|
47
51
|
import "./chunk-WZWDS3W4.js";
|
|
48
52
|
import "./chunk-PZLD7RTK.js";
|
|
@@ -116,6 +120,10 @@ var run = async () => {
|
|
|
116
120
|
}
|
|
117
121
|
return process.exit(process.exitCode || 1);
|
|
118
122
|
}
|
|
123
|
+
if (vlt.command === "registry") {
|
|
124
|
+
const { dispatchRegistry } = await import("./registry-QGI44LG4.js");
|
|
125
|
+
await dispatchRegistry(vlt);
|
|
126
|
+
}
|
|
119
127
|
const command = await loadCommand(vlt.command);
|
|
120
128
|
await outputCommand(command, vlt, { start, vltVersion: version });
|
|
121
129
|
};
|
|
@@ -9,9 +9,12 @@ 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
|
+
requireRegistry
|
|
14
|
+
} from "./chunk-FAG776ZD.js";
|
|
12
15
|
import {
|
|
13
16
|
commandUsage
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LCDBW6IT.js";
|
|
15
18
|
import {
|
|
16
19
|
RegistryClient,
|
|
17
20
|
deleteToken,
|
|
@@ -20,11 +23,14 @@ import {
|
|
|
20
23
|
normalizeRegistryKey,
|
|
21
24
|
registryBase,
|
|
22
25
|
setToken
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-U6DM3ROE.js";
|
|
27
|
+
import "./chunk-CNSTFT7U.js";
|
|
28
|
+
import "./chunk-7NHXV6AH.js";
|
|
29
|
+
import "./chunk-PW6S6AIO.js";
|
|
30
|
+
import "./chunk-E74WGW5C.js";
|
|
31
|
+
import "./chunk-WP6CYBPM.js";
|
|
32
|
+
import "./chunk-UBLFPJHV.js";
|
|
33
|
+
import "./chunk-2PLIV3N3.js";
|
|
28
34
|
import "./chunk-XNLSTHDK.js";
|
|
29
35
|
import {
|
|
30
36
|
error
|
|
@@ -60,10 +66,14 @@ var readPassword = async (prompt, { stdin, stdout } = process) => {
|
|
|
60
66
|
};
|
|
61
67
|
|
|
62
68
|
// ../../src/cli-sdk/src/commands/token.ts
|
|
69
|
+
var needsRegistry = true;
|
|
63
70
|
var usage = () => commandUsage({
|
|
64
71
|
command: "token",
|
|
65
72
|
usage: ["list", "add", "rm"],
|
|
66
|
-
description: `Manage registry authentication tokens in the vlt keychain
|
|
73
|
+
description: `Manage registry authentication tokens in the vlt keychain.
|
|
74
|
+
|
|
75
|
+
Target a specific configured registry by alias with
|
|
76
|
+
\`vlt registry <alias> token <subcommand>\`.`,
|
|
67
77
|
subcommands: {
|
|
68
78
|
list: {
|
|
69
79
|
usage: "",
|
|
@@ -189,7 +199,7 @@ var listTokens = async (rc, registry, identity, alias) => {
|
|
|
189
199
|
}
|
|
190
200
|
};
|
|
191
201
|
var command = async (conf) => {
|
|
192
|
-
const reg = normalizeRegistryKey(conf
|
|
202
|
+
const reg = normalizeRegistryKey(requireRegistry(conf));
|
|
193
203
|
switch (conf.positionals[0]) {
|
|
194
204
|
case "ls":
|
|
195
205
|
case "list": {
|
|
@@ -197,7 +207,7 @@ var command = async (conf) => {
|
|
|
197
207
|
const identity = conf.options.identity;
|
|
198
208
|
const registries = [];
|
|
199
209
|
const seen = /* @__PURE__ */ new Set();
|
|
200
|
-
const defaultReg = conf
|
|
210
|
+
const defaultReg = requireRegistry(conf);
|
|
201
211
|
seen.add(normalizeRegistryKey(defaultReg));
|
|
202
212
|
registries.push(
|
|
203
213
|
await listTokens(rc, defaultReg, identity, "default")
|
|
@@ -252,6 +262,7 @@ var command = async (conf) => {
|
|
|
252
262
|
};
|
|
253
263
|
export {
|
|
254
264
|
command,
|
|
265
|
+
needsRegistry,
|
|
255
266
|
usage,
|
|
256
267
|
views
|
|
257
268
|
};
|
|
@@ -11,32 +11,35 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
parseRemoveArgs
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D5CP6O6G.js";
|
|
15
15
|
import {
|
|
16
16
|
InstallReporter
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4RZDJQ5U.js";
|
|
18
18
|
import {
|
|
19
19
|
uninstall
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-E5YE7UTZ.js";
|
|
21
|
+
import "./chunk-F2FKLPZD.js";
|
|
22
22
|
import "./chunk-VTEFO2FT.js";
|
|
23
23
|
import "./chunk-RXNA2XCX.js";
|
|
24
24
|
import "./chunk-WGDTG44V.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-JKAZKVQU.js";
|
|
25
|
+
import "./chunk-ICJRCXSG.js";
|
|
26
|
+
import "./chunk-MT76WHSM.js";
|
|
28
27
|
import "./chunk-HTOTG4TS.js";
|
|
29
28
|
import {
|
|
30
29
|
commandUsage
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-LCDBW6IT.js";
|
|
31
|
+
import "./chunk-7NHXV6AH.js";
|
|
32
|
+
import "./chunk-PW6S6AIO.js";
|
|
33
|
+
import "./chunk-E74WGW5C.js";
|
|
34
|
+
import "./chunk-WP6CYBPM.js";
|
|
35
|
+
import "./chunk-UBLFPJHV.js";
|
|
36
|
+
import "./chunk-2PLIV3N3.js";
|
|
35
37
|
import "./chunk-XNLSTHDK.js";
|
|
36
38
|
import "./chunk-WZWDS3W4.js";
|
|
37
39
|
import "./chunk-PZLD7RTK.js";
|
|
38
40
|
|
|
39
41
|
// ../../src/cli-sdk/src/commands/uninstall.ts
|
|
42
|
+
var needsRegistry = true;
|
|
40
43
|
var usage = () => commandUsage({
|
|
41
44
|
command: "uninstall",
|
|
42
45
|
usage: "[package ...]",
|
|
@@ -73,6 +76,7 @@ var command = async (conf) => {
|
|
|
73
76
|
};
|
|
74
77
|
export {
|
|
75
78
|
command,
|
|
79
|
+
needsRegistry,
|
|
76
80
|
usage,
|
|
77
81
|
views
|
|
78
82
|
};
|