@vltpkg/cli-js 1.0.4 → 1.0.5
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-RYNHM3DJ.js → access-AFFG4IBZ.js} +4 -4
- package/{bugs-ZHOC4U52.js → bugs-MCLLEJJP.js} +8 -8
- package/{build-HTM6Z7OQ.js → build-TKUT6V2P.js} +6 -6
- package/{cache-74GIE5TO.js → cache-O464JQI4.js} +7 -7
- package/cache-unzip-src-unzip.js +3 -1
- package/{chunk-AIQ7Z62O.js → chunk-34VLICEH.js} +3 -3
- package/{chunk-OR5LSCSK.js → chunk-3NGV7EC6.js} +26 -15
- package/{chunk-A2EWSQPE.js → chunk-3NWTVANS.js} +4 -4
- package/{chunk-OCJDISSI.js → chunk-3OPNZI6G.js} +2 -2
- package/{chunk-JOEHZSS7.js → chunk-4LBWNGU6.js} +2 -2
- package/{chunk-T4GYDWUJ.js → chunk-5JFRXIK2.js} +17 -2
- package/{chunk-E737X73P.js → chunk-AL42Z2D3.js} +12 -5
- package/{chunk-WNDUKE42.js → chunk-ED2DDTQT.js} +2 -2
- package/{chunk-AMDP7LYB.js → chunk-FBHWUWBW.js} +2 -2
- package/{chunk-VB3IWNHX.js → chunk-GDJ7JT2R.js} +1 -1
- package/{chunk-GXWZ5T4W.js → chunk-JFO2EQA5.js} +1 -1
- package/{chunk-RB6SUM6U.js → chunk-K55EFH4U.js} +5 -5
- package/{chunk-YRKCPGWZ.js → chunk-QWTGTFHN.js} +2 -2
- package/{chunk-2CLRMD5A.js → chunk-R32BJAKT.js} +157 -110
- package/{chunk-PDLEQEZ3.js → chunk-SVBEF5PK.js} +3 -3
- package/{chunk-R55OHZ2R.js → chunk-UCYLZSZ7.js} +5 -5
- package/{chunk-IITIX4ID.js → chunk-VFBCWAOC.js} +37 -1
- package/{chunk-XU5SMHXP.js → chunk-XKVU23NC.js} +1 -1
- package/{chunk-MZIM7X37.js → chunk-YRLO236S.js} +3 -3
- package/{chunk-AK3RSABL.js → chunk-YZPRRP7W.js} +5 -5
- package/chunk-ZBNPQDQ7.js +75 -0
- package/{ci-XT7IAX2Y.js → ci-GPZGE4SU.js} +9 -7
- package/cli-package.json +1 -1
- package/{config-B2LF4SJ7.js → config-WDCFW5X7.js} +7 -7
- package/{config-SRLA2XPZ.js → config-YEEKT7WH.js} +6 -6
- package/{create-VKNML6FC.js → create-TVVUUIUZ.js} +13 -13
- package/{deprecate-IM4HEDIP.js → deprecate-AH4LOHMI.js} +7 -7
- package/{dist-tag-EKVJAQ66.js → dist-tag-4R6YHSZ7.js} +4 -4
- package/{docs-4DHMAMOU.js → docs-7MHXAHGG.js} +8 -8
- package/{exec-7C74Z3WB.js → exec-FRQOPS5C.js} +15 -13
- package/{exec-cache-QTUCQWSA.js → exec-cache-VYVXFKA2.js} +11 -11
- package/{exec-local-ZCNI2JHK.js → exec-local-MXYOC2AY.js} +11 -11
- package/{help-IKRPBT2R.js → help-J5CYJ7BO.js} +1 -1
- package/{init-PCQ4YK7R.js → init-7D5MFAP5.js} +7 -7
- package/{install-OAQ4K3XX.js → install-T34U5HPS.js} +10 -8
- package/{list-WYBKBCZU.js → list-C2LX6EIY.js} +11 -11
- package/{login-TTRCQ43Z.js → login-6JP7WTRM.js} +4 -4
- package/{logout-3J77F4OO.js → logout-JYOBUHP3.js} +4 -4
- package/{pack-ZLFGYGVZ.js → pack-ON6BK2AI.js} +8 -8
- package/package.json +1 -1
- package/{ping-IRLV5C4D.js → ping-GUNQJ53P.js} +4 -4
- package/{pkg-EKOQ4XKM.js → pkg-GIH3WMUK.js} +8 -8
- package/{profile-7UBKGJBP.js → profile-IEIZFNOD.js} +4 -4
- package/{publish-2ODYT4R2.js → publish-VTRA3MIS.js} +10 -10
- package/{query-ADSAKEK4.js → query-KEXYDRHP.js} +11 -11
- package/{registry-CZPFR3OF.js → registry-43SSGAPE.js} +3 -3
- package/registry-client-package.json +1 -1
- package/registry-client-src-revalidate.js +432 -382
- package/{repo-3THXRT64.js → repo-LI5FOP3N.js} +8 -8
- package/{reporter-6BFJCFVZ.js → reporter-Y7RMSVN4.js} +1 -1
- package/{run-2QLSVP6M.js → run-LEWQVDWO.js} +11 -11
- package/{run-exec-VYD2Q4BD.js → run-exec-CLCZ47NU.js} +11 -11
- package/security-archive-src-update-expired.js +37 -1
- package/{setup-TDX5NXUN.js → setup-MPG4UQPT.js} +7 -7
- package/{src-AVMBIRBC.js → src-ARXB4NH5.js} +11 -11
- package/{src-SWL4UPPI.js → src-B4IYFLHG.js} +4 -2
- package/{src-X66SVM5T.js → src-U4EBFPPT.js} +8 -5
- package/{token-3RDRZ4AO.js → token-UD4AF4I7.js} +4 -4
- package/{uninstall-CNAFZTLA.js → uninstall-MSKFXGAO.js} +10 -8
- package/{unpublish-7YHQQYZG.js → unpublish-2RNLXZWP.js} +4 -4
- package/{update-3W27EZWN.js → update-3HXQLP34.js} +9 -7
- package/{version-K37LT6GZ.js → version-RBLKW6BQ.js} +7 -7
- package/{view-ZVAYKUL2.js → view-3XTRGRGJ.js} +6 -6
- package/vlr.js +1 -1
- package/vlrx.js +1 -1
- package/vlt.js +1 -1
- package/vlx.js +1 -1
- package/vlxl.js +1 -1
- package/{whoami-IOUW56D6.js → whoami-WSXDPFSQ.js} +4 -4
- package/chunk-SKQHW56B.js +0 -75
|
@@ -11,15 +11,15 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
resolveRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5JFRXIK2.js";
|
|
15
15
|
import {
|
|
16
16
|
commandUsage
|
|
17
17
|
} from "./chunk-LCDBW6IT.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-XKVU23NC.js";
|
|
19
19
|
import "./chunk-WP6CYBPM.js";
|
|
20
20
|
import {
|
|
21
21
|
RegistryClient
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-R32BJAKT.js";
|
|
23
23
|
import "./chunk-HAYXR3MW.js";
|
|
24
24
|
import "./chunk-E74WGW5C.js";
|
|
25
25
|
import "./chunk-LPIBYUMT.js";
|
|
@@ -27,7 +27,7 @@ import "./chunk-UBLFPJHV.js";
|
|
|
27
27
|
import "./chunk-XNLSTHDK.js";
|
|
28
28
|
import "./chunk-BJBFEQRR.js";
|
|
29
29
|
import "./chunk-VE6CCH33.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-VFBCWAOC.js";
|
|
31
31
|
import {
|
|
32
32
|
error
|
|
33
33
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -14,26 +14,26 @@ import {
|
|
|
14
14
|
} from "./chunk-CLVRCGOZ.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YRLO236S.js";
|
|
18
18
|
import {
|
|
19
19
|
PackageInfoClient
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YZPRRP7W.js";
|
|
21
21
|
import "./chunk-ZWKI5OSF.js";
|
|
22
22
|
import {
|
|
23
23
|
Query,
|
|
24
24
|
actual
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-3NGV7EC6.js";
|
|
26
26
|
import {
|
|
27
27
|
SecurityArchive
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-ED2DDTQT.js";
|
|
29
|
+
import "./chunk-SVBEF5PK.js";
|
|
30
|
+
import "./chunk-3OPNZI6G.js";
|
|
31
31
|
import {
|
|
32
32
|
commandUsage
|
|
33
33
|
} from "./chunk-LCDBW6IT.js";
|
|
34
34
|
import {
|
|
35
35
|
Spec
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XKVU23NC.js";
|
|
37
37
|
import "./chunk-WP6CYBPM.js";
|
|
38
38
|
import "./chunk-HTOTG4TS.js";
|
|
39
39
|
import {
|
|
@@ -45,7 +45,7 @@ import "./chunk-UBLFPJHV.js";
|
|
|
45
45
|
import "./chunk-XNLSTHDK.js";
|
|
46
46
|
import "./chunk-BJBFEQRR.js";
|
|
47
47
|
import "./chunk-VE6CCH33.js";
|
|
48
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-VFBCWAOC.js";
|
|
49
49
|
import {
|
|
50
50
|
error
|
|
51
51
|
} 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
|
build
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-3NGV7EC6.js";
|
|
15
|
+
import "./chunk-ED2DDTQT.js";
|
|
16
|
+
import "./chunk-SVBEF5PK.js";
|
|
17
|
+
import "./chunk-3OPNZI6G.js";
|
|
18
18
|
import {
|
|
19
19
|
commandUsage
|
|
20
20
|
} from "./chunk-LCDBW6IT.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-XKVU23NC.js";
|
|
22
22
|
import "./chunk-WP6CYBPM.js";
|
|
23
23
|
import "./chunk-HTOTG4TS.js";
|
|
24
24
|
import "./chunk-E74WGW5C.js";
|
|
@@ -29,7 +29,7 @@ import "./chunk-BJBFEQRR.js";
|
|
|
29
29
|
import "./chunk-VE6CCH33.js";
|
|
30
30
|
import {
|
|
31
31
|
isErrorWithCause
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-VFBCWAOC.js";
|
|
33
33
|
import {
|
|
34
34
|
error
|
|
35
35
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -15,26 +15,26 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
stderr,
|
|
17
17
|
stdout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AL42Z2D3.js";
|
|
19
19
|
import "./chunk-FEIPJIEN.js";
|
|
20
20
|
import "./chunk-G2YT2GWF.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-GDJ7JT2R.js";
|
|
22
|
+
import "./chunk-5JFRXIK2.js";
|
|
23
23
|
import "./chunk-WGDTG44V.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-3OPNZI6G.js";
|
|
25
25
|
import {
|
|
26
26
|
commandUsage
|
|
27
27
|
} from "./chunk-LCDBW6IT.js";
|
|
28
28
|
import {
|
|
29
29
|
Spec
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-XKVU23NC.js";
|
|
31
31
|
import "./chunk-WP6CYBPM.js";
|
|
32
32
|
import {
|
|
33
33
|
ViewClass
|
|
34
34
|
} from "./chunk-4KCU2KZL.js";
|
|
35
35
|
import {
|
|
36
36
|
CacheEntry
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-R32BJAKT.js";
|
|
38
38
|
import "./chunk-HAYXR3MW.js";
|
|
39
39
|
import "./chunk-E74WGW5C.js";
|
|
40
40
|
import "./chunk-LPIBYUMT.js";
|
|
@@ -42,7 +42,7 @@ import "./chunk-UBLFPJHV.js";
|
|
|
42
42
|
import "./chunk-XNLSTHDK.js";
|
|
43
43
|
import "./chunk-BJBFEQRR.js";
|
|
44
44
|
import "./chunk-VE6CCH33.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-VFBCWAOC.js";
|
|
46
46
|
import {
|
|
47
47
|
error
|
|
48
48
|
} from "./chunk-WZWDS3W4.js";
|
package/cache-unzip-src-unzip.js
CHANGED
|
@@ -4302,7 +4302,9 @@ var Cache = class _Cache extends I {
|
|
|
4302
4302
|
return this.#diskRead(k3, v2, opts.context?.integrity);
|
|
4303
4303
|
},
|
|
4304
4304
|
allowStaleOnFetchRejection: true,
|
|
4305
|
-
|
|
4305
|
+
// Eviction aborts in-flight fetch() placeholders. Resolving those
|
|
4306
|
+
// as undefined is treated as a cache miss and re-downloads tarballs.
|
|
4307
|
+
ignoreFetchAbort: true,
|
|
4306
4308
|
allowStale: true,
|
|
4307
4309
|
noDeleteOnStaleGet: true
|
|
4308
4310
|
});
|
|
@@ -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-3NGV7EC6.js";
|
|
15
15
|
import {
|
|
16
16
|
joinDepIDTuple,
|
|
17
17
|
splitDepID
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3OPNZI6G.js";
|
|
19
19
|
import {
|
|
20
20
|
Spec
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XKVU23NC.js";
|
|
22
22
|
|
|
23
23
|
// ../../src/cli-sdk/src/parse-add-remove-args.ts
|
|
24
24
|
import { isAbsolute, relative, resolve } from "node:path";
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ED2DDTQT.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-SVBEF5PK.js";
|
|
24
24
|
import {
|
|
25
25
|
asDepID,
|
|
26
26
|
getId,
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
joinExtra,
|
|
34
34
|
splitDepID,
|
|
35
35
|
splitExtra
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-3OPNZI6G.js";
|
|
37
37
|
import {
|
|
38
38
|
Spec as Spec2
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-XKVU23NC.js";
|
|
40
40
|
import {
|
|
41
41
|
load,
|
|
42
42
|
walkUp
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
satisfies,
|
|
93
93
|
shortDependencyTypes,
|
|
94
94
|
subset
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-VFBCWAOC.js";
|
|
96
96
|
import {
|
|
97
97
|
error,
|
|
98
98
|
typeError
|
|
@@ -10117,6 +10117,14 @@ var parseDir = (options, scurry, packageJson, depsFound, graph, fromNode, currDi
|
|
|
10117
10117
|
};
|
|
10118
10118
|
var verifyImporterNodeModules = (graph, projectRoot) => {
|
|
10119
10119
|
for (const importer of graph.importers) {
|
|
10120
|
+
let linked = false;
|
|
10121
|
+
for (const { to } of importer.edgesOut.values()) {
|
|
10122
|
+
if (to) {
|
|
10123
|
+
linked = true;
|
|
10124
|
+
break;
|
|
10125
|
+
}
|
|
10126
|
+
}
|
|
10127
|
+
if (!linked) continue;
|
|
10120
10128
|
const nm = resolve5(projectRoot, importer.location, "node_modules");
|
|
10121
10129
|
if (!existsSync(nm)) {
|
|
10122
10130
|
throw new Error(
|
|
@@ -10384,7 +10392,7 @@ var Diff = class {
|
|
|
10384
10392
|
delete: /* @__PURE__ */ new Set()
|
|
10385
10393
|
};
|
|
10386
10394
|
/**
|
|
10387
|
-
* True if
|
|
10395
|
+
* True if every added node/edge is confined to an optional subtree
|
|
10388
10396
|
*/
|
|
10389
10397
|
optionalOnly = true;
|
|
10390
10398
|
get [Symbol.toStringTag]() {
|
|
@@ -10420,7 +10428,7 @@ var Diff = class {
|
|
|
10420
10428
|
if (fromEdge?.to) this.edges.delete.add(fromEdge);
|
|
10421
10429
|
if (edge.to) {
|
|
10422
10430
|
this.edges.add.add(edge);
|
|
10423
|
-
if (!edge.optional) {
|
|
10431
|
+
if (!edge.optional && !edge.from.optional) {
|
|
10424
10432
|
this.optionalOnly = false;
|
|
10425
10433
|
}
|
|
10426
10434
|
}
|
|
@@ -10887,15 +10895,16 @@ var RollbackRemove = class {
|
|
|
10887
10895
|
async rm(path2) {
|
|
10888
10896
|
if (this.#paths.has(path2)) return;
|
|
10889
10897
|
const target = `${dirname3(path2)}/.VLT.DELETE.${this.#key}.${basename(path2)}`;
|
|
10890
|
-
|
|
10891
|
-
|
|
10898
|
+
try {
|
|
10899
|
+
await rename(path2, target);
|
|
10900
|
+
} catch (e) {
|
|
10892
10901
|
if (e instanceof Error && "code" in e && /* c8 ignore start - very spurious weirdness on Windows */
|
|
10893
10902
|
(e.code === "ENOENT" || e.code === "EPERM")) {
|
|
10894
|
-
this.#paths.delete(path2);
|
|
10895
10903
|
return;
|
|
10896
10904
|
}
|
|
10897
10905
|
throw e;
|
|
10898
|
-
}
|
|
10906
|
+
}
|
|
10907
|
+
this.#paths.set(path2, target);
|
|
10899
10908
|
}
|
|
10900
10909
|
confirm() {
|
|
10901
10910
|
if (!this.#paths.size) return;
|
|
@@ -12661,7 +12670,7 @@ var processPlacementTasks = async (graph, options, placementTasks, add, modifier
|
|
|
12661
12670
|
const bundled = new Set(
|
|
12662
12671
|
node.id.startsWith("git") || node.importer || !isStringArray2(bundleDeps) ? [] : bundleDeps
|
|
12663
12672
|
);
|
|
12664
|
-
const
|
|
12673
|
+
const nextDepsMap = /* @__PURE__ */ new Map();
|
|
12665
12674
|
for (const depTypeName of longDependencyTypes) {
|
|
12666
12675
|
const depRecord = manifest[depTypeName];
|
|
12667
12676
|
if (depRecord && shouldInstallDepType(node, depTypeName)) {
|
|
@@ -12682,11 +12691,12 @@ var processPlacementTasks = async (graph, options, placementTasks, add, modifier
|
|
|
12682
12691
|
if (depTypeName === "peerDependencies") {
|
|
12683
12692
|
nextPeerDeps.set(name, dep);
|
|
12684
12693
|
} else {
|
|
12685
|
-
|
|
12694
|
+
nextDepsMap.set(name, dep);
|
|
12686
12695
|
}
|
|
12687
12696
|
}
|
|
12688
12697
|
}
|
|
12689
12698
|
}
|
|
12699
|
+
const nextDeps = [...nextDepsMap.values()];
|
|
12690
12700
|
const transientDeps = transientAdd?.get(node.id);
|
|
12691
12701
|
if (transientDeps) {
|
|
12692
12702
|
for (const [, dep] of transientDeps) {
|
|
@@ -13820,11 +13830,12 @@ var reify = async (options) => {
|
|
|
13820
13830
|
});
|
|
13821
13831
|
const diff2 = new Diff(actual2, graph);
|
|
13822
13832
|
const noModifiedDependencies = !options.add?.modifiedDependencies && !options.remove?.modifiedDependencies;
|
|
13833
|
+
const hasLockfiles = !!scurry.lstatSync("vlt-lock.json") && !!scurry.lstatSync("node_modules/.vlt-lock.json");
|
|
13823
13834
|
const skipOptionalOnly = noModifiedDependencies && diff2.optionalOnly;
|
|
13824
|
-
const skippable = skipOptionalOnly && !options.update;
|
|
13835
|
+
const skippable = skipOptionalOnly && !options.update && hasLockfiles;
|
|
13825
13836
|
const res = { diff: diff2 };
|
|
13826
13837
|
if (!diff2.hasChanges() || skippable) {
|
|
13827
|
-
if (!
|
|
13838
|
+
if (!hasLockfiles) {
|
|
13828
13839
|
saveHidden(options);
|
|
13829
13840
|
const lfData = lockfileData(options);
|
|
13830
13841
|
saveData(lfData, scurry.resolve("vlt-lock.json"), false);
|
|
@@ -11,15 +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-YZPRRP7W.js";
|
|
15
15
|
import {
|
|
16
16
|
Monorepo,
|
|
17
17
|
PackageJson,
|
|
18
18
|
PathScurry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SVBEF5PK.js";
|
|
20
20
|
import {
|
|
21
21
|
resetCaches
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-3OPNZI6G.js";
|
|
23
23
|
import {
|
|
24
24
|
commands,
|
|
25
25
|
definition,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
assertRecordStringT,
|
|
39
39
|
getOptions,
|
|
40
40
|
isRecordStringString
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-VFBCWAOC.js";
|
|
42
42
|
import {
|
|
43
43
|
error
|
|
44
44
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -11,12 +11,12 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
Spec as Spec2
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XKVU23NC.js";
|
|
15
15
|
import {
|
|
16
16
|
Spec,
|
|
17
17
|
currentDefaultRegistryName,
|
|
18
18
|
defaultRegistryName
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VFBCWAOC.js";
|
|
20
20
|
import {
|
|
21
21
|
error
|
|
22
22
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -11,10 +11,10 @@ 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-AL42Z2D3.js";
|
|
15
15
|
import {
|
|
16
16
|
mermaidOutput
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3NGV7EC6.js";
|
|
18
18
|
import {
|
|
19
19
|
ViewClass
|
|
20
20
|
} from "./chunk-4KCU2KZL.js";
|
|
@@ -10,8 +10,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
12
|
import {
|
|
13
|
-
defaultRegistries
|
|
14
|
-
|
|
13
|
+
defaultRegistries,
|
|
14
|
+
defaultRegistryName
|
|
15
|
+
} from "./chunk-VFBCWAOC.js";
|
|
15
16
|
import {
|
|
16
17
|
error
|
|
17
18
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -67,6 +68,17 @@ var missingRegistryError = () => error(
|
|
|
67
68
|
].join("\n"),
|
|
68
69
|
{ code: "ECONFIG" }
|
|
69
70
|
);
|
|
71
|
+
var missingNpmRegistryError = (alias = defaultRegistryName) => error(
|
|
72
|
+
[
|
|
73
|
+
`Missing ${alias} registry configuration.`,
|
|
74
|
+
"",
|
|
75
|
+
`Install commands require the \`registries.${alias}\` alias.`,
|
|
76
|
+
"Run `vlt setup` to get configured.",
|
|
77
|
+
"",
|
|
78
|
+
"See https://docs.vlt.sh/cli for other ways to set a registry."
|
|
79
|
+
].join("\n"),
|
|
80
|
+
{ code: "ECONFIG" }
|
|
81
|
+
);
|
|
70
82
|
var ambiguousRegistryError = (candidates) => error(
|
|
71
83
|
[
|
|
72
84
|
"Multiple registries are configured; specify which one to use.",
|
|
@@ -95,6 +107,7 @@ var gatherCandidates = (conf) => {
|
|
|
95
107
|
return Object.entries(conf.options.registries).filter(([alias, url]) => builtins[alias] !== url).map(([alias, url]) => ({ alias, url }));
|
|
96
108
|
};
|
|
97
109
|
var hasConfiguredRegistry = (conf) => !!conf.options.registry || gatherCandidates(conf).length > 0;
|
|
110
|
+
var hasNpmRegistry = (conf) => !!conf.options.registries[conf.options["default-registry-alias"]];
|
|
98
111
|
var requireRegistry = (conf, alias) => {
|
|
99
112
|
if (alias !== void 0) return resolveRegistryAlias(conf, alias);
|
|
100
113
|
const { registry } = conf.options;
|
|
@@ -131,7 +144,9 @@ var resolveRegistry = async (conf, {
|
|
|
131
144
|
|
|
132
145
|
export {
|
|
133
146
|
missingRegistryError,
|
|
147
|
+
missingNpmRegistryError,
|
|
134
148
|
hasConfiguredRegistry,
|
|
149
|
+
hasNpmRegistry,
|
|
135
150
|
requireRegistry,
|
|
136
151
|
resolveRegistry
|
|
137
152
|
};
|
|
@@ -20,15 +20,17 @@ import {
|
|
|
20
20
|
} from "./chunk-G2YT2GWF.js";
|
|
21
21
|
import {
|
|
22
22
|
parseError
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GDJ7JT2R.js";
|
|
24
24
|
import {
|
|
25
25
|
hasConfiguredRegistry,
|
|
26
|
+
hasNpmRegistry,
|
|
27
|
+
missingNpmRegistryError,
|
|
26
28
|
missingRegistryError
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5JFRXIK2.js";
|
|
28
30
|
import {
|
|
29
31
|
isGraphRunError,
|
|
30
32
|
splitDepID
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3OPNZI6G.js";
|
|
32
34
|
import {
|
|
33
35
|
defaultView
|
|
34
36
|
} from "./chunk-WP6CYBPM.js";
|
|
@@ -46,7 +48,7 @@ import {
|
|
|
46
48
|
import {
|
|
47
49
|
isErrorWithCause,
|
|
48
50
|
isObject
|
|
49
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-VFBCWAOC.js";
|
|
50
52
|
|
|
51
53
|
// ../../src/cli-sdk/src/print-err.ts
|
|
52
54
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -493,7 +495,7 @@ var startView = async (conf, opts, views, { start } = { start: Date.now() }) =>
|
|
|
493
495
|
var outputCommand = async (cliCommand, conf, { start, vltVersion } = {
|
|
494
496
|
start: Date.now()
|
|
495
497
|
}) => {
|
|
496
|
-
const { usage, views, command, needsRegistry } = cliCommand;
|
|
498
|
+
const { usage, views, command, needsRegistry, needsNpmRegistry } = cliCommand;
|
|
497
499
|
const stdoutColor = conf.values.color ?? supportsColor2(process.stdout);
|
|
498
500
|
const stderrColor = conf.values.color ?? supportsColor2(process.stderr);
|
|
499
501
|
if (conf.values.help) {
|
|
@@ -525,6 +527,11 @@ var outputCommand = async (cliCommand, conf, { start, vltVersion } = {
|
|
|
525
527
|
if (needsRegistry && !hasConfiguredRegistry(conf)) {
|
|
526
528
|
throw missingRegistryError();
|
|
527
529
|
}
|
|
530
|
+
if (needsNpmRegistry && !hasNpmRegistry(conf)) {
|
|
531
|
+
throw missingNpmRegistryError(
|
|
532
|
+
conf.options["default-registry-alias"]
|
|
533
|
+
);
|
|
534
|
+
}
|
|
528
535
|
const output = await onDone(await command(conf));
|
|
529
536
|
stopRequestLog();
|
|
530
537
|
const duration_ms = Date.now() - start;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
asDepID,
|
|
14
14
|
baseDepID,
|
|
15
15
|
splitDepID
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3OPNZI6G.js";
|
|
17
17
|
import {
|
|
18
18
|
loadPackageJson
|
|
19
19
|
} from "./chunk-E74WGW5C.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-XNLSTHDK.js";
|
|
26
26
|
import {
|
|
27
27
|
defaultRegistryName
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VFBCWAOC.js";
|
|
29
29
|
import {
|
|
30
30
|
error
|
|
31
31
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -12,12 +12,12 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
init,
|
|
14
14
|
install
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3NGV7EC6.js";
|
|
16
16
|
import {
|
|
17
17
|
asWSConfig,
|
|
18
18
|
assertWSConfig,
|
|
19
19
|
minimatch
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-SVBEF5PK.js";
|
|
21
21
|
import {
|
|
22
22
|
commandUsage
|
|
23
23
|
} from "./chunk-LCDBW6IT.js";
|
|
@@ -11,17 +11,17 @@ 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-YZPRRP7W.js";
|
|
15
15
|
import {
|
|
16
16
|
findCmdShimIfExists,
|
|
17
17
|
install
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3NGV7EC6.js";
|
|
19
19
|
import {
|
|
20
20
|
PathScurry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SVBEF5PK.js";
|
|
22
22
|
import {
|
|
23
23
|
Spec
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XKVU23NC.js";
|
|
25
25
|
import {
|
|
26
26
|
walkUp
|
|
27
27
|
} from "./chunk-HTOTG4TS.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-XNLSTHDK.js";
|
|
31
31
|
import {
|
|
32
32
|
parseScope
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-VFBCWAOC.js";
|
|
34
34
|
import {
|
|
35
35
|
error
|
|
36
36
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-ZWKI5OSF.js";
|
|
17
17
|
import {
|
|
18
18
|
minimatch
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SVBEF5PK.js";
|
|
20
20
|
import {
|
|
21
21
|
Spec
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XKVU23NC.js";
|
|
23
23
|
import {
|
|
24
24
|
parse,
|
|
25
25
|
stringify
|