@vltpkg/cli-js 1.3.8 → 1.5.0
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-WLKANIOE.js → access-QPX4QXV4.js} +13 -12
- package/{bugs-5Q3QSTWP.js → bugs-TLOECXEM.js} +28 -25
- package/{build-XSFR63AW.js → build-IQOS3LKO.js} +28 -19
- package/{cache-UVPK5J5A.js → cache-O5IBYYSB.js} +35 -23
- package/cache-unzip-src-unzip.js +56 -12
- package/{chunk-NWHKSRO3.js → chunk-2U4PVHP4.js} +5270 -10837
- package/{chunk-5KOLUYXH.js → chunk-35EG6T3J.js} +61 -15
- package/{chunk-PJJCFMLW.js → chunk-3S3W7QEM.js} +7 -5
- package/chunk-43EJ4Q42.js +57 -0
- package/{chunk-IHXJVKAE.js → chunk-4TSHLSRK.js} +2 -1
- package/chunk-4UH3KMTD.js +6444 -0
- package/{chunk-6D54UN4T.js → chunk-5KW6AOTT.js} +1 -1
- package/chunk-6IF3RJND.js +81 -0
- package/{chunk-IBGFQR23.js → chunk-6LZM3I4Q.js} +56 -11
- package/{chunk-FIUUAQGC.js → chunk-6W5XMVIZ.js} +29 -22
- package/{chunk-OWMR2EDW.js → chunk-7UWRR6EE.js} +2 -2
- package/{chunk-WHLYMMI2.js → chunk-ARE7FKDG.js} +6 -4
- package/chunk-B6RIGNEO.js +626 -0
- package/{chunk-CB65DPZ2.js → chunk-C6ZVVEFV.js} +239 -1190
- package/{chunk-SE2FSMBR.js → chunk-CMLDLZZ3.js} +73 -11
- package/{chunk-6P5CFJR7.js → chunk-CS6AYPY5.js} +6 -6
- package/{chunk-TLY4VGMH.js → chunk-CW56EJIL.js} +1 -1
- package/{chunk-SV4WK3KX.js → chunk-F7NPYSI2.js} +3 -2
- package/{chunk-6BQKR2FM.js → chunk-G3FZ2ZJK.js} +1 -1
- package/chunk-GUP55DM6.js +59 -0
- package/chunk-HOF7LEIC.js +24 -0
- package/chunk-IFEZ6BFV.js +1111 -0
- package/{chunk-3U6QWN62.js → chunk-IJUVVD7E.js} +1 -1
- package/{chunk-H77JYU7F.js → chunk-ISAMD2FE.js} +12 -3
- package/{chunk-WKA5UYNA.js → chunk-LH7J5BDU.js} +5 -5
- package/{chunk-GZ5MYMBT.js → chunk-LUVDMEW4.js} +1 -1
- package/{chunk-OAP2ROTL.js → chunk-MYX4JCIJ.js} +1 -1
- package/{chunk-APMYKJI2.js → chunk-QNHBAGXQ.js} +1 -1
- package/{chunk-XCDLOQZZ.js → chunk-SMXXFQPI.js} +80 -29
- package/chunk-SUU2WETN.js +268 -0
- package/chunk-T2VBCUF5.js +77 -0
- package/{chunk-EL4GVZK5.js → chunk-T5EP7QEF.js} +2 -2
- package/{chunk-A2TSRXZD.js → chunk-UZ6ICZE3.js} +1 -1
- package/{chunk-DL3H4EMY.js → chunk-VR7NRWAD.js} +29 -20
- package/chunk-W4T5CGCO.js +52 -0
- package/{chunk-XDSZO74H.js → chunk-WHWPAYZY.js} +118 -20
- package/{chunk-KMOOTBHM.js → chunk-X6JKMIOU.js} +5 -1
- package/{chunk-43HNQWPQ.js → chunk-XCQCYB6G.js} +78 -13
- package/{chunk-IUL6MPP6.js → chunk-XCSNI6AO.js} +4 -4
- package/{chunk-BGA3WB7H.js → chunk-XD5KUDXX.js} +7 -7
- package/{chunk-QNDM4DVO.js → chunk-Z5D5KODU.js} +1 -1
- package/{ci-EDRETPUF.js → ci-ESVUMOZO.js} +31 -13
- package/cli-package.json +1 -1
- package/{config-MVNXGEOQ.js → config-TMB2X6DW.js} +12 -9
- package/{config-OKBXU7TU.js → config-ZVVLFKR7.js} +16 -13
- package/{create-R7BXYJSU.js → create-BLTNKSBQ.js} +28 -25
- package/{deprecate-YSUKBKQM.js → deprecate-VA6PGHYL.js} +17 -15
- package/{dist-tag-MIGYSR4F.js → dist-tag-OYJREFO2.js} +13 -12
- package/{docs-4WVIN75H.js → docs-6OC3OQNM.js} +28 -25
- package/{exec-IXHDQLAM.js → exec-AZPGFVRY.js} +28 -25
- package/{exec-cache-EA7GHIK7.js → exec-cache-D75UY2WI.js} +24 -22
- package/{exec-local-GM4LH56M.js → exec-local-E2JKB4X4.js} +22 -19
- package/{help-TCXGBICU.js → help-UPW77X5N.js} +5 -5
- package/{init-MWZDWQHM.js → init-SNO6QL7C.js} +14 -11
- package/{install-HPI5HU3C.js → install-TEJM2YVX.js} +165 -26
- package/{list-2CX6REPJ.js → list-NHCC2RNB.js} +33 -27
- package/{login-RAY23CVG.js → login-XNZXCGFD.js} +19 -16
- package/{logout-ICB5OMGY.js → logout-YCM7O36Q.js} +13 -12
- package/{outdated-FYHPXRMT.js → outdated-4LA7N63W.js} +26 -22
- package/{pack-E5MNPQXK.js → pack-RC4CZSWF.js} +25 -18
- package/package.json +1 -1
- package/{ping-REQ2KSAR.js → ping-RLVAZGDL.js} +13 -12
- package/{pkg-YB4GSRII.js → pkg-FED5C6TP.js} +23 -14
- package/{profile-GKBW6GRI.js → profile-DJZNLQPG.js} +13 -12
- package/{publish-4ZQJYYLF.js → publish-54AMVMTQ.js} +61 -45
- package/{query-SKXBF3MJ.js → query-ZQLMSJ7O.js} +35 -29
- package/{registry-MQJJCWJY.js → registry-6HKQYSZX.js} +7 -7
- package/registry-client-src-revalidate.js +110 -20
- package/{repo-ACPTZI2C.js → repo-ITA4BLZ4.js} +28 -25
- package/{reporter-4KK2JNGO.js → reporter-UYVR2WMB.js} +73 -14
- package/{run-YW3ITX2A.js → run-TP2HTJRN.js} +22 -19
- package/{run-exec-7VQX3OFG.js → run-exec-UGCC53DV.js} +22 -19
- package/security-archive-src-update-expired.js +88 -28
- package/{setup-PLEKCMXN.js → setup-XPAM5U3Z.js} +23 -21
- package/skills-LR6GXW3X.js +413 -0
- package/skills-YD2TB2VD.js +495 -0
- package/{src-XQ7KVUVN.js → src-34D4DOOH.js} +37 -27
- package/{src-PXDFMQ6W.js → src-H6DFCAPH.js} +9 -8
- package/{src-GP7VLT7P.js → src-LHDC4NJO.js} +58 -9
- package/{token-GB7RPE5J.js → token-OF63PFTQ.js} +13 -12
- package/{uninstall-RLCECX37.js → uninstall-B54FQ5KQ.js} +20 -15
- package/{unpublish-3ZXEAVHF.js → unpublish-CSHIGMDQ.js} +31 -16
- package/{update-VDZP6EZN.js → update-HS4VJ5ZG.js} +51 -25
- package/{version-MRELJPOK.js → version-L7S3DHUS.js} +24 -14
- package/{view-LCXMTGCJ.js → view-NWKKWFVA.js} +17 -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-PNRDBS45.js → whoami-65K35VGW.js} +13 -12
- package/chunk-4JAZZRKR.js +0 -76
- package/chunk-G2YT2GWF.js +0 -120
- package/chunk-U7TEQCBN.js +0 -880
|
@@ -9,27 +9,28 @@ 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
|
-
resolveRegistry
|
|
14
|
-
} from "./chunk-A2TSRXZD.js";
|
|
15
12
|
import {
|
|
16
13
|
commandUsage
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import
|
|
19
|
-
|
|
14
|
+
} from "./chunk-CW56EJIL.js";
|
|
15
|
+
import {
|
|
16
|
+
resolveRegistry
|
|
17
|
+
} from "./chunk-UZ6ICZE3.js";
|
|
18
|
+
import "./chunk-CMLDLZZ3.js";
|
|
19
|
+
import "./chunk-LUVDMEW4.js";
|
|
20
20
|
import {
|
|
21
21
|
RegistryClient
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-35EG6T3J.js";
|
|
23
|
+
import "./chunk-QNHBAGXQ.js";
|
|
24
|
+
import "./chunk-G3FZ2ZJK.js";
|
|
24
25
|
import {
|
|
25
26
|
assertOk
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-5KW6AOTT.js";
|
|
28
|
+
import "./chunk-SUU2WETN.js";
|
|
29
|
+
import "./chunk-B6RIGNEO.js";
|
|
29
30
|
import "./chunk-XNLSTHDK.js";
|
|
30
31
|
import "./chunk-PDWPFR5T.js";
|
|
31
32
|
import "./chunk-Y5PA7DVK.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-6LZM3I4Q.js";
|
|
33
34
|
import {
|
|
34
35
|
error
|
|
35
36
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -14,46 +14,49 @@ import {
|
|
|
14
14
|
} from "./chunk-CLVRCGOZ.js";
|
|
15
15
|
import {
|
|
16
16
|
openUrl
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7UWRR6EE.js";
|
|
18
18
|
import {
|
|
19
19
|
createHostContextsMap
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-XDSZO74H.js";
|
|
22
|
-
import "./chunk-KMOOTBHM.js";
|
|
23
|
-
import "./chunk-G2YT2GWF.js";
|
|
24
|
-
import "./chunk-IHXJVKAE.js";
|
|
20
|
+
} from "./chunk-ARE7FKDG.js";
|
|
25
21
|
import {
|
|
26
|
-
PackageInfoClient
|
|
27
|
-
} from "./chunk-DL3H4EMY.js";
|
|
28
|
-
import "./chunk-SRWDPPLX.js";
|
|
29
|
-
import "./chunk-WGDTG44V.js";
|
|
30
|
-
import "./chunk-A2TSRXZD.js";
|
|
31
|
-
import {
|
|
32
|
-
Query,
|
|
33
22
|
actual
|
|
34
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4UH3KMTD.js";
|
|
24
|
+
import {
|
|
25
|
+
Query
|
|
26
|
+
} from "./chunk-2U4PVHP4.js";
|
|
35
27
|
import {
|
|
36
28
|
SecurityArchive
|
|
37
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-SMXXFQPI.js";
|
|
30
|
+
import "./chunk-WHWPAYZY.js";
|
|
31
|
+
import "./chunk-X6JKMIOU.js";
|
|
32
|
+
import "./chunk-4TSHLSRK.js";
|
|
38
33
|
import {
|
|
39
34
|
commandUsage
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import
|
|
35
|
+
} from "./chunk-CW56EJIL.js";
|
|
36
|
+
import {
|
|
37
|
+
PackageInfoClient
|
|
38
|
+
} from "./chunk-VR7NRWAD.js";
|
|
39
|
+
import "./chunk-SRWDPPLX.js";
|
|
40
|
+
import "./chunk-IFEZ6BFV.js";
|
|
41
|
+
import "./chunk-C6ZVVEFV.js";
|
|
42
42
|
import "./chunk-4KCU2KZL.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-WGDTG44V.js";
|
|
44
|
+
import "./chunk-UZ6ICZE3.js";
|
|
45
|
+
import "./chunk-CMLDLZZ3.js";
|
|
46
|
+
import "./chunk-F7NPYSI2.js";
|
|
44
47
|
import {
|
|
45
48
|
Spec
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-SE2FSMBR.js";
|
|
49
|
+
} from "./chunk-LUVDMEW4.js";
|
|
48
50
|
import "./chunk-HTOTG4TS.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-QNHBAGXQ.js";
|
|
52
|
+
import "./chunk-G3FZ2ZJK.js";
|
|
53
|
+
import "./chunk-5KW6AOTT.js";
|
|
54
|
+
import "./chunk-SUU2WETN.js";
|
|
55
|
+
import "./chunk-B6RIGNEO.js";
|
|
53
56
|
import "./chunk-XNLSTHDK.js";
|
|
54
57
|
import "./chunk-PDWPFR5T.js";
|
|
55
58
|
import "./chunk-Y5PA7DVK.js";
|
|
56
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-6LZM3I4Q.js";
|
|
57
60
|
import {
|
|
58
61
|
error
|
|
59
62
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -11,40 +11,45 @@ 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-
|
|
14
|
+
} from "./chunk-4UH3KMTD.js";
|
|
15
|
+
import "./chunk-2U4PVHP4.js";
|
|
16
|
+
import "./chunk-SMXXFQPI.js";
|
|
16
17
|
import {
|
|
17
18
|
commandUsage
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-CW56EJIL.js";
|
|
20
|
+
import "./chunk-IFEZ6BFV.js";
|
|
21
|
+
import "./chunk-C6ZVVEFV.js";
|
|
22
|
+
import "./chunk-CMLDLZZ3.js";
|
|
23
|
+
import "./chunk-F7NPYSI2.js";
|
|
24
|
+
import "./chunk-LUVDMEW4.js";
|
|
23
25
|
import "./chunk-HTOTG4TS.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-G3FZ2ZJK.js";
|
|
27
|
+
import "./chunk-SUU2WETN.js";
|
|
28
|
+
import "./chunk-B6RIGNEO.js";
|
|
26
29
|
import "./chunk-XNLSTHDK.js";
|
|
27
30
|
import "./chunk-PDWPFR5T.js";
|
|
28
31
|
import "./chunk-Y5PA7DVK.js";
|
|
29
32
|
import {
|
|
30
33
|
isErrorWithCause
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6LZM3I4Q.js";
|
|
32
35
|
import {
|
|
33
36
|
error
|
|
34
37
|
} from "./chunk-WZWDS3W4.js";
|
|
35
38
|
import "./chunk-PZLD7RTK.js";
|
|
36
39
|
|
|
37
40
|
// ../../src/cli-sdk/src/commands/build.ts
|
|
41
|
+
var skippedMessage = (count, reason) => `${count} package${count === 1 ? "" : "s"} not built, ${reason === "unscanned" ? "Socket has not scanned them yet" : "security data timed out"}. Run "vlt build" again later.`;
|
|
38
42
|
var views = {
|
|
39
43
|
human: (result) => {
|
|
40
44
|
const successCount = result.success.length;
|
|
41
45
|
const failureCount = result.failure.length;
|
|
46
|
+
const skippedCount = result.skipped?.length ?? 0;
|
|
42
47
|
const messages = [];
|
|
43
48
|
if (successCount > 0) {
|
|
44
49
|
messages.push(
|
|
45
50
|
`\u{1F528} Built ${successCount} package${successCount === 1 ? "" : "s"} successfully.`
|
|
46
51
|
);
|
|
47
|
-
} else {
|
|
52
|
+
} else if (!skippedCount) {
|
|
48
53
|
messages.push("\u{1F4E6} All packages are already built.");
|
|
49
54
|
}
|
|
50
55
|
if (failureCount > 0) {
|
|
@@ -53,23 +58,27 @@ var views = {
|
|
|
53
58
|
failureCount === 1 ? "" : "s"} failed to build.`
|
|
54
59
|
);
|
|
55
60
|
}
|
|
61
|
+
if (skippedCount > 0) {
|
|
62
|
+
messages.push(
|
|
63
|
+
`\u23F3 ${skippedMessage(skippedCount, result.skippedReason)}`
|
|
64
|
+
);
|
|
65
|
+
}
|
|
56
66
|
return messages.join("\n");
|
|
57
67
|
},
|
|
58
68
|
json: (result) => {
|
|
59
|
-
const
|
|
69
|
+
const toJSON = (node) => ({
|
|
60
70
|
id: node.id,
|
|
61
71
|
name: node.name,
|
|
62
72
|
version: node.version
|
|
63
|
-
})
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
version: node.version
|
|
68
|
-
}));
|
|
73
|
+
});
|
|
74
|
+
const successList = result.success.map(toJSON);
|
|
75
|
+
const failureList = result.failure.map(toJSON);
|
|
76
|
+
const skippedList = result.skipped?.map(toJSON) ?? [];
|
|
69
77
|
return {
|
|
70
78
|
success: successList,
|
|
71
79
|
failure: failureList,
|
|
72
|
-
|
|
80
|
+
...skippedList.length ? { skipped: skippedList, skippedReason: result.skippedReason } : {},
|
|
81
|
+
message: successList.length > 0 ? `Built ${successList.length} package${successList.length === 1 ? "" : "s"}.` : skippedList.length ? skippedMessage(skippedList.length, result.skippedReason) : "No packages needed building."
|
|
73
82
|
};
|
|
74
83
|
}
|
|
75
84
|
};
|
|
@@ -15,47 +15,48 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
stderr,
|
|
17
17
|
stdout
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-IHXJVKAE.js";
|
|
22
|
-
import "./chunk-WGDTG44V.js";
|
|
23
|
-
import "./chunk-A2TSRXZD.js";
|
|
18
|
+
} from "./chunk-WHWPAYZY.js";
|
|
19
|
+
import "./chunk-X6JKMIOU.js";
|
|
20
|
+
import "./chunk-4TSHLSRK.js";
|
|
24
21
|
import {
|
|
25
22
|
commandUsage
|
|
26
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CW56EJIL.js";
|
|
27
24
|
import {
|
|
28
25
|
ViewClass
|
|
29
26
|
} from "./chunk-4KCU2KZL.js";
|
|
30
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-WGDTG44V.js";
|
|
28
|
+
import "./chunk-UZ6ICZE3.js";
|
|
29
|
+
import "./chunk-CMLDLZZ3.js";
|
|
30
|
+
import "./chunk-F7NPYSI2.js";
|
|
31
31
|
import {
|
|
32
32
|
Spec
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-SE2FSMBR.js";
|
|
33
|
+
} from "./chunk-LUVDMEW4.js";
|
|
35
34
|
import {
|
|
36
35
|
CacheEntry
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-35EG6T3J.js";
|
|
37
|
+
import "./chunk-QNHBAGXQ.js";
|
|
38
|
+
import "./chunk-G3FZ2ZJK.js";
|
|
39
39
|
import {
|
|
40
40
|
assertOk
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-5KW6AOTT.js";
|
|
42
|
+
import "./chunk-SUU2WETN.js";
|
|
43
|
+
import "./chunk-B6RIGNEO.js";
|
|
44
44
|
import "./chunk-XNLSTHDK.js";
|
|
45
45
|
import {
|
|
46
46
|
readStoreIndex,
|
|
47
47
|
removeStoreEntry,
|
|
48
48
|
storeEntryCopied,
|
|
49
|
+
storeEntryLastCopied,
|
|
49
50
|
storeEntryLinked,
|
|
50
51
|
storeEntryNames,
|
|
51
52
|
storeEntryTime,
|
|
52
53
|
verifyStoreEntry
|
|
53
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-ISAMD2FE.js";
|
|
54
55
|
import "./chunk-PDWPFR5T.js";
|
|
55
56
|
import "./chunk-Y5PA7DVK.js";
|
|
56
57
|
import {
|
|
57
58
|
integrityHex
|
|
58
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-6LZM3I4Q.js";
|
|
59
60
|
import {
|
|
60
61
|
error
|
|
61
62
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -78,6 +79,7 @@ var CacheView = class extends ViewClass {
|
|
|
78
79
|
var views = {
|
|
79
80
|
human: CacheView
|
|
80
81
|
};
|
|
82
|
+
var pruneDays = 30;
|
|
81
83
|
var usageDef = {
|
|
82
84
|
command: "cache",
|
|
83
85
|
usage: "<command> [flags]",
|
|
@@ -130,11 +132,14 @@ var usageDef = {
|
|
|
130
132
|
a file in \`node_modules\` was edited in place.`
|
|
131
133
|
},
|
|
132
134
|
"prune-store": {
|
|
133
|
-
usage: "",
|
|
135
|
+
usage: "[<date>]",
|
|
134
136
|
description: `Remove global store entries that no \`node_modules\`
|
|
135
|
-
folder links to.
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
folder links to. Copies do not show use: an entry
|
|
138
|
+
copied or cloned from (install scripts,
|
|
139
|
+
\`store-linker=copy\`, macOS, a cache on another
|
|
140
|
+
drive) stays if that last happened after
|
|
141
|
+
\`<date>\`, or in the last ${pruneDays} days
|
|
142
|
+
without one.`
|
|
138
143
|
}
|
|
139
144
|
},
|
|
140
145
|
examples: {
|
|
@@ -398,14 +403,21 @@ var verify = async (conf, specs, view2) => {
|
|
|
398
403
|
...!all && { missing }
|
|
399
404
|
};
|
|
400
405
|
};
|
|
401
|
-
var pruneStore = async (conf,
|
|
406
|
+
var pruneStore = async (conf, args, view2) => {
|
|
407
|
+
const since = args.length ? new Date(args.join(" ")).getTime() : Date.now() - pruneDays * 24 * 60 * 60 * 1e3;
|
|
408
|
+
if (Number.isNaN(since)) {
|
|
409
|
+
throw error("Invalid date", {
|
|
410
|
+
code: "EUSAGE",
|
|
411
|
+
found: args.join(" ")
|
|
412
|
+
});
|
|
413
|
+
}
|
|
402
414
|
const { storeRoot } = conf.options;
|
|
403
415
|
const names = storeEntryNames(storeRoot);
|
|
404
416
|
const removed = {};
|
|
405
417
|
for (const hex of names) {
|
|
406
418
|
const entry = resolve(storeRoot, hex);
|
|
407
419
|
const index = readStoreIndex(entry);
|
|
408
|
-
if (storeEntryCopied(entry, index) || storeEntryLinked(entry, index)) {
|
|
420
|
+
if (storeEntryCopied(entry, index) && storeEntryLastCopied(entry) >= since || storeEntryLinked(entry, index)) {
|
|
409
421
|
continue;
|
|
410
422
|
}
|
|
411
423
|
removeStoreEntry(entry);
|
package/cache-unzip-src-unzip.js
CHANGED
|
@@ -34,7 +34,27 @@ function syntaxError(message, cause, from) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// ../../src/fast-split/src/index.ts
|
|
37
|
+
var splitTwo = (str, delim) => {
|
|
38
|
+
const a = str.indexOf(delim);
|
|
39
|
+
return a === -1 ? [str] : [str.substring(0, a), str.substring(a + delim.length)];
|
|
40
|
+
};
|
|
41
|
+
var splitThree = (str, delim) => {
|
|
42
|
+
const a = str.indexOf(delim);
|
|
43
|
+
if (a === -1) return [str];
|
|
44
|
+
const l = delim.length;
|
|
45
|
+
const b = str.indexOf(delim, a + l);
|
|
46
|
+
return b === -1 ? [str.substring(0, a), str.substring(a + l)] : [
|
|
47
|
+
str.substring(0, a),
|
|
48
|
+
str.substring(a + l, b),
|
|
49
|
+
str.substring(b + l)
|
|
50
|
+
];
|
|
51
|
+
};
|
|
37
52
|
function fastSplit(str, delim, limit = -1, onPart) {
|
|
53
|
+
if (onPart === void 0) {
|
|
54
|
+
if (limit === 2) return splitTwo(str, delim);
|
|
55
|
+
if (limit === 3)
|
|
56
|
+
return splitThree(str, delim);
|
|
57
|
+
}
|
|
38
58
|
let i = 0;
|
|
39
59
|
let p = 0;
|
|
40
60
|
const l = delim.length;
|
|
@@ -1070,9 +1090,10 @@ var gitHostWebsites = {
|
|
|
1070
1090
|
gitlab: "https://gitlab.com/"
|
|
1071
1091
|
};
|
|
1072
1092
|
var getOptions = (options) => ({
|
|
1073
|
-
catalog: {},
|
|
1074
1093
|
catalogs: {},
|
|
1075
1094
|
...options,
|
|
1095
|
+
// after spread: explicit `catalog: undefined` gets default too
|
|
1096
|
+
catalog: options?.catalog ?? {},
|
|
1076
1097
|
// built-in aliases are user/service-overridable: user config wins
|
|
1077
1098
|
"jsr-registries": {
|
|
1078
1099
|
...defaultJsrRegistries,
|
|
@@ -1249,19 +1270,25 @@ var Spec = class _Spec {
|
|
|
1249
1270
|
}
|
|
1250
1271
|
if (this.bareSpec.startsWith("catalog:")) {
|
|
1251
1272
|
this.catalog = this.bareSpec.substring("catalog:".length);
|
|
1252
|
-
const catalog =
|
|
1273
|
+
const { catalog: defaultCatalog, catalogs = {} } = this.options;
|
|
1274
|
+
const catalog = this.catalog ? Object.hasOwn(catalogs, this.catalog) ? catalogs[this.catalog] : void 0 : Object.keys(defaultCatalog).length ? defaultCatalog : void 0;
|
|
1253
1275
|
if (!catalog) {
|
|
1254
|
-
throw this.#
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
});
|
|
1276
|
+
throw this.#catalogError(
|
|
1277
|
+
this.catalog ? `Catalog "${this.catalog}" not found for ${this.spec}` : `Default catalog not found for ${this.spec}`
|
|
1278
|
+
);
|
|
1258
1279
|
}
|
|
1259
|
-
const
|
|
1280
|
+
const catalogName = this.catalog ? `catalog "${this.catalog}"` : "default catalog";
|
|
1281
|
+
const sub = Object.hasOwn(catalog, this.name) ? catalog[this.name] : void 0;
|
|
1260
1282
|
if (!sub) {
|
|
1261
|
-
throw this.#
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1283
|
+
throw this.#catalogError(
|
|
1284
|
+
`Package "${this.name}" not found in ${catalogName}`
|
|
1285
|
+
);
|
|
1286
|
+
}
|
|
1287
|
+
if (sub.startsWith("catalog:")) {
|
|
1288
|
+
throw this.#error(
|
|
1289
|
+
`Catalog entry "${this.name}" in ${catalogName} cannot be a catalog: spec`,
|
|
1290
|
+
{ code: "ECONFIG", found: sub }
|
|
1291
|
+
);
|
|
1265
1292
|
}
|
|
1266
1293
|
this.subspec = _Spec.parse(this.name, sub, this.options);
|
|
1267
1294
|
this.type = "catalog";
|
|
@@ -1577,6 +1604,23 @@ var Spec = class _Spec {
|
|
|
1577
1604
|
].map((p) => `${p}:`)
|
|
1578
1605
|
});
|
|
1579
1606
|
}
|
|
1607
|
+
/** ECONFIG error listing defined catalogs & ones defining this dep */
|
|
1608
|
+
#catalogError(message) {
|
|
1609
|
+
const { catalog, catalogs = {} } = this.options;
|
|
1610
|
+
const defined = [
|
|
1611
|
+
...Object.keys(catalog).length ? [["", catalog]] : [],
|
|
1612
|
+
...Object.entries(catalogs)
|
|
1613
|
+
];
|
|
1614
|
+
const validOptions = defined.map(([n7]) => `catalog:${n7}`);
|
|
1615
|
+
const wanted = defined.filter(
|
|
1616
|
+
([, c]) => Object.hasOwn(c, this.name) && !!c[this.name]
|
|
1617
|
+
).map(([n7]) => `catalog:${n7}`);
|
|
1618
|
+
return this.#error(message, {
|
|
1619
|
+
code: "ECONFIG",
|
|
1620
|
+
...validOptions.length ? { validOptions } : {},
|
|
1621
|
+
...wanted.length ? { wanted } : {}
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1580
1624
|
#error(message, extra = {}) {
|
|
1581
1625
|
return error(message, { spec: this.spec, ...extra }, this.#error);
|
|
1582
1626
|
}
|
|
@@ -7182,7 +7226,7 @@ import { join as join2 } from "node:path";
|
|
|
7182
7226
|
import { performance as performance2 } from "node:perf_hooks";
|
|
7183
7227
|
import { debuglog as debuglog3 } from "node:util";
|
|
7184
7228
|
var debug3 = debuglog3("vlt");
|
|
7185
|
-
var linkers = /* @__PURE__ */ new Set(["auto", "hardlink", "copy"]);
|
|
7229
|
+
var linkers = /* @__PURE__ */ new Set(["auto", "hardlink", "clone", "copy"]);
|
|
7186
7230
|
var storeEnabled = () => linkers.has(process.env.VLT_STORE_LINKER ?? "");
|
|
7187
7231
|
var STALE_MS = 60 * 60 * 1e3;
|
|
7188
7232
|
var parseConcurrency = (raw) => {
|