@vltpkg/cli-js 1.0.0-rc.24 → 1.0.0-rc.26
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/{bugs-DIPRXK73.js → bugs-5UZKBRJ6.js} +9 -9
- package/{build-R53AIRYP.js → build-HHRMIGWX.js} +6 -6
- package/{cache-PFWAIDXW.js → cache-S7AIJNAW.js} +5 -5
- package/{chunk-M562AXMZ.js → chunk-3PCMZMV5.js} +1 -1
- package/{chunk-PQJO2HPJ.js → chunk-3T3M5JJF.js} +5 -5
- package/{chunk-FEV5BCW7.js → chunk-45PZMAKV.js} +1 -1
- package/{chunk-5WHVV7CQ.js → chunk-5TAPASMO.js} +1 -1
- package/{chunk-K4X2TU3S.js → chunk-BRSCRAUI.js} +48 -21
- package/{chunk-XBN4TEBD.js → chunk-CEEMJNRZ.js} +1 -1
- package/{chunk-QRBXNJDL.js → chunk-CY225LQK.js} +2 -2
- package/{chunk-EHD7YJKI.js → chunk-D3UYPLBW.js} +18 -6
- package/{chunk-267FYLJB.js → chunk-GM7VNI3N.js} +1 -1
- package/{chunk-KXBF4HVG.js → chunk-HIGHMXU7.js} +8 -3
- package/chunk-J5OZBIY5.js +68 -0
- package/{chunk-K6X4DF6U.js → chunk-JXGBASMB.js} +2 -2
- package/{chunk-QFA4L7SI.js → chunk-KSOWJE5Z.js} +39 -8
- package/{chunk-56TWRLHO.js → chunk-LCUNWXND.js} +3 -3
- package/{chunk-WEU2II6J.js → chunk-ORGRCZV6.js} +3 -3
- package/{chunk-VVTZN4QQ.js → chunk-QI6PGM7S.js} +2 -2
- package/{chunk-Z76BQOEV.js → chunk-R3KDJL6J.js} +2 -2
- package/{chunk-GQUU7WYA.js → chunk-REEVCBSC.js} +2 -2
- package/{chunk-WL7XN6ON.js → chunk-UNANFLLJ.js} +4 -4
- package/{chunk-A2LFSPYL.js → chunk-WC3VIV77.js} +6 -5
- package/{chunk-DED3ZRSM.js → chunk-WYE4WWGF.js} +2 -2
- package/{ci-TH7ZUQ7W.js → ci-2U44K5HH.js} +7 -7
- package/cli-package.json +1 -1
- package/{config-ECUAC3VA.js → config-2OSWSNLR.js} +6 -6
- package/{config-GQHPERU5.js → config-J7A3MQFH.js} +7 -7
- package/{create-P6Q344DA.js → create-QORFVTHP.js} +13 -13
- package/{docs-VQ3ASW4D.js → docs-5X4WDWUP.js} +9 -9
- package/{exec-QNDDSXFJ.js → exec-YMICUMJA.js} +13 -13
- package/{exec-cache-MNOBZGEN.js → exec-cache-A6CMJUZ7.js} +11 -11
- package/{exec-local-X7QTI2RT.js → exec-local-TYAKTIYJ.js} +10 -10
- package/{help-LEPLLKAZ.js → help-OKCOEMB3.js} +1 -1
- package/{init-32T4YJZ5.js → init-VC6AG2UU.js} +5 -5
- package/{install-5BBY7G5X.js → install-P5AO6772.js} +53 -17
- package/{list-O6SW6DH3.js → list-CIK732ED.js} +10 -10
- package/{login-LFHU3GCN.js → login-R3B4H2I2.js} +2 -2
- package/{logout-HRFY65WG.js → logout-YUUXIVUO.js} +2 -2
- package/{pack-VJOIINYL.js → pack-QEI3LPIQ.js} +8 -8
- package/package.json +3 -2
- package/{ping-ABWRUAWQ.js → ping-QSR64W6S.js} +2 -2
- package/{pkg-3LKU4JA7.js → pkg-CNGHBNXD.js} +8 -8
- package/{publish-MJ6HBVO7.js → publish-5N6MWW6E.js} +9 -9
- package/{query-NIACPXFM.js → query-MIH452QT.js} +10 -10
- package/registry-client-package.json +1 -1
- package/{repo-ZQS5FCHE.js → repo-I7XLLP24.js} +9 -9
- package/{reporter-L7KNFUVD.js → reporter-WBQK75RI.js} +2 -2
- package/{run-7KKZOV4V.js → run-NUQ63SUS.js} +10 -10
- package/{run-exec-SNNLAS7X.js → run-exec-ZJSAJPME.js} +10 -10
- package/security-archive-src-update-expired.js +2247 -0
- package/{src-MQ7RJS5V.js → src-BTES32CE.js} +9 -9
- package/{token-NTSPC4UL.js → token-JOS6MHEW.js} +2 -2
- package/{uninstall-IM5T6TS5.js → uninstall-A6XPKFIM.js} +8 -8
- package/{update-Z67JWNNP.js → update-FOBAWWTD.js} +7 -7
- package/{version-GG5XKQIS.js → version-AZK2MPTV.js} +7 -7
- package/{view-2CLEZWZL.js → view-PMXWE6QG.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-ITPWALIQ.js → whoami-OLZU4KG7.js} +2 -2
- package/chunk-JGIRYPNR.js +0 -68
|
@@ -14,36 +14,36 @@ import {
|
|
|
14
14
|
} from "./chunk-AZLX27EM.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ORGRCZV6.js";
|
|
18
18
|
import {
|
|
19
19
|
Query,
|
|
20
20
|
actual
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-D3UYPLBW.js";
|
|
22
22
|
import {
|
|
23
23
|
SecurityArchive
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-BRSCRAUI.js";
|
|
25
|
+
import "./chunk-QI6PGM7S.js";
|
|
26
26
|
import {
|
|
27
27
|
commandUsage
|
|
28
28
|
} from "./chunk-5E5GX4G6.js";
|
|
29
29
|
import {
|
|
30
30
|
PackageInfoClient
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KSOWJE5Z.js";
|
|
32
32
|
import "./chunk-FI5TUER7.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-CEEMJNRZ.js";
|
|
34
34
|
import {
|
|
35
35
|
urlOpen
|
|
36
36
|
} from "./chunk-D7U7KDEM.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-R3KDJL6J.js";
|
|
38
38
|
import "./chunk-BGQCUUCA.js";
|
|
39
39
|
import "./chunk-E74WGW5C.js";
|
|
40
40
|
import {
|
|
41
41
|
Spec2 as Spec
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-45PZMAKV.js";
|
|
43
43
|
import "./chunk-VCSVHRCS.js";
|
|
44
44
|
import "./chunk-D27QPHKI.js";
|
|
45
45
|
import "./chunk-JLJKOF75.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-HIGHMXU7.js";
|
|
47
47
|
import "./chunk-HTOTG4TS.js";
|
|
48
48
|
import "./chunk-XNLSTHDK.js";
|
|
49
49
|
import {
|
|
@@ -11,22 +11,22 @@ 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-
|
|
14
|
+
} from "./chunk-D3UYPLBW.js";
|
|
15
|
+
import "./chunk-BRSCRAUI.js";
|
|
16
|
+
import "./chunk-QI6PGM7S.js";
|
|
17
17
|
import {
|
|
18
18
|
commandUsage
|
|
19
19
|
} from "./chunk-5E5GX4G6.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-R3KDJL6J.js";
|
|
21
21
|
import "./chunk-BGQCUUCA.js";
|
|
22
22
|
import "./chunk-E74WGW5C.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-45PZMAKV.js";
|
|
24
24
|
import "./chunk-VCSVHRCS.js";
|
|
25
25
|
import "./chunk-D27QPHKI.js";
|
|
26
26
|
import "./chunk-JLJKOF75.js";
|
|
27
27
|
import {
|
|
28
28
|
isErrorWithCause
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-HIGHMXU7.js";
|
|
30
30
|
import "./chunk-HTOTG4TS.js";
|
|
31
31
|
import "./chunk-XNLSTHDK.js";
|
|
32
32
|
import {
|
|
@@ -15,29 +15,29 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
stderr,
|
|
17
17
|
stdout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LCUNWXND.js";
|
|
19
19
|
import "./chunk-TDTJOKF2.js";
|
|
20
20
|
import {
|
|
21
21
|
ViewClass
|
|
22
22
|
} from "./chunk-RXNA2XCX.js";
|
|
23
23
|
import "./chunk-WGDTG44V.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-5TAPASMO.js";
|
|
25
25
|
import {
|
|
26
26
|
commandUsage
|
|
27
27
|
} from "./chunk-5E5GX4G6.js";
|
|
28
28
|
import {
|
|
29
29
|
CacheEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CEEMJNRZ.js";
|
|
31
31
|
import "./chunk-D7U7KDEM.js";
|
|
32
32
|
import "./chunk-BGQCUUCA.js";
|
|
33
33
|
import "./chunk-E74WGW5C.js";
|
|
34
34
|
import {
|
|
35
35
|
Spec2 as Spec
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-45PZMAKV.js";
|
|
37
37
|
import "./chunk-VCSVHRCS.js";
|
|
38
38
|
import "./chunk-D27QPHKI.js";
|
|
39
39
|
import "./chunk-JLJKOF75.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-HIGHMXU7.js";
|
|
41
41
|
import "./chunk-XNLSTHDK.js";
|
|
42
42
|
import {
|
|
43
43
|
error
|
|
@@ -12,19 +12,19 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
findCmdShimIfExists,
|
|
14
14
|
install
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-D3UYPLBW.js";
|
|
16
16
|
import {
|
|
17
17
|
PackageInfoClient
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KSOWJE5Z.js";
|
|
19
19
|
import {
|
|
20
20
|
PathScurry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-R3KDJL6J.js";
|
|
22
22
|
import {
|
|
23
23
|
Spec2 as Spec
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-45PZMAKV.js";
|
|
25
25
|
import {
|
|
26
26
|
parseScope
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-HIGHMXU7.js";
|
|
28
28
|
import {
|
|
29
29
|
walkUp
|
|
30
30
|
} from "./chunk-HTOTG4TS.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
asDepID,
|
|
17
17
|
baseDepID,
|
|
18
18
|
splitDepID
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-45PZMAKV.js";
|
|
20
20
|
import {
|
|
21
21
|
L
|
|
22
22
|
} from "./chunk-VCSVHRCS.js";
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
|
|
30
30
|
// ../../src/security-archive/src/index.ts
|
|
31
31
|
import { DatabaseSync } from "node:sqlite";
|
|
32
|
+
import { spawn } from "node:child_process";
|
|
32
33
|
import { mkdirSync } from "node:fs";
|
|
33
34
|
import { dirname } from "node:path";
|
|
34
35
|
|
|
@@ -165,7 +166,7 @@ async function onAttemptFailure({ error: error2, attemptNumber, retriesConsumed,
|
|
|
165
166
|
const finalDelay = Math.min(delayTime, remainingTime);
|
|
166
167
|
options.signal?.throwIfAborted();
|
|
167
168
|
if (finalDelay > 0) {
|
|
168
|
-
await new Promise((
|
|
169
|
+
await new Promise((resolve2, reject) => {
|
|
169
170
|
const onAbort = () => {
|
|
170
171
|
clearTimeout(timeoutToken);
|
|
171
172
|
options.signal?.removeEventListener("abort", onAbort);
|
|
@@ -173,7 +174,7 @@ async function onAttemptFailure({ error: error2, attemptNumber, retriesConsumed,
|
|
|
173
174
|
};
|
|
174
175
|
const timeoutToken = setTimeout(() => {
|
|
175
176
|
options.signal?.removeEventListener("abort", onAbort);
|
|
176
|
-
|
|
177
|
+
resolve2();
|
|
177
178
|
}, finalDelay);
|
|
178
179
|
if (options.unref) {
|
|
179
180
|
timeoutToken.unref?.();
|
|
@@ -242,6 +243,10 @@ var asPackageReportData = (o) => {
|
|
|
242
243
|
return o;
|
|
243
244
|
};
|
|
244
245
|
|
|
246
|
+
// ../../src/security-archive/src/update-expired.ts
|
|
247
|
+
import { resolve } from "node:path";
|
|
248
|
+
var __CODE_SPLIT_SCRIPT_NAME = resolve(import.meta.dirname, "security-archive-src-update-expired.js");
|
|
249
|
+
|
|
245
250
|
// ../../src/security-archive/src/index.ts
|
|
246
251
|
var SOCKET_API_V0_URL = "https://api.socket.dev/v0/purl?alerts=true";
|
|
247
252
|
var SOCKET_PUBLIC_API_TOKEN = "sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api";
|
|
@@ -262,7 +267,6 @@ var { version } = loadPackageJson(
|
|
|
262
267
|
);
|
|
263
268
|
var SecurityArchive = class _SecurityArchive extends L {
|
|
264
269
|
#expired = /* @__PURE__ */ new Set();
|
|
265
|
-
#pUpdateExpired;
|
|
266
270
|
#path;
|
|
267
271
|
#retries;
|
|
268
272
|
#nodesByName = /* @__PURE__ */ new Map();
|
|
@@ -352,28 +356,53 @@ var SecurityArchive = class _SecurityArchive extends L {
|
|
|
352
356
|
db.prepare("DELETE FROM cache WHERE depID = ?").run(depID);
|
|
353
357
|
}
|
|
354
358
|
}
|
|
355
|
-
this.#
|
|
359
|
+
this.#spawnUpdateExpired();
|
|
356
360
|
}
|
|
357
361
|
/**
|
|
358
|
-
*
|
|
362
|
+
* Spawns a detached child process to revalidate expired entries.
|
|
363
|
+
* The process runs independently — the main process does not wait for it.
|
|
359
364
|
*/
|
|
360
|
-
|
|
361
|
-
const
|
|
365
|
+
#spawnUpdateExpired() {
|
|
366
|
+
const expired = [];
|
|
362
367
|
for (const depID of this.#expired) {
|
|
363
368
|
const node = this.#nodesByID.get(baseDepID(depID));
|
|
364
|
-
if (!node?.version) {
|
|
369
|
+
if (!node?.version || !node.name) {
|
|
365
370
|
continue;
|
|
366
371
|
}
|
|
367
|
-
|
|
368
|
-
|
|
372
|
+
expired.push({
|
|
373
|
+
depID: baseDepID(depID),
|
|
374
|
+
name: node.name,
|
|
375
|
+
version: node.version
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
if (!expired.length) {
|
|
379
|
+
return;
|
|
369
380
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
381
|
+
const isDeno = globalThis.Deno != void 0;
|
|
382
|
+
const payload = {
|
|
383
|
+
dbPath: this.#path,
|
|
384
|
+
retries: this.#retries,
|
|
385
|
+
ttl: _SecurityArchive.defaultTtl,
|
|
386
|
+
expired
|
|
387
|
+
};
|
|
388
|
+
const args = [];
|
|
389
|
+
const detached = !(isDeno && process.platform === "win32");
|
|
390
|
+
if (isDeno) {
|
|
391
|
+
args.push(
|
|
392
|
+
"--unstable-node-globals",
|
|
393
|
+
"--unstable-bare-node-builtins"
|
|
374
394
|
);
|
|
375
|
-
|
|
376
|
-
|
|
395
|
+
}
|
|
396
|
+
args.push(__CODE_SPLIT_SCRIPT_NAME);
|
|
397
|
+
const proc = spawn(process.execPath, args, {
|
|
398
|
+
detached,
|
|
399
|
+
stdio: ["pipe", "ignore", "ignore"],
|
|
400
|
+
env: { ...process.env }
|
|
401
|
+
});
|
|
402
|
+
proc.stdin.write(JSON.stringify(payload));
|
|
403
|
+
proc.stdin.end();
|
|
404
|
+
if (detached) {
|
|
405
|
+
proc.unref();
|
|
377
406
|
}
|
|
378
407
|
}
|
|
379
408
|
/**
|
|
@@ -528,18 +557,16 @@ var SecurityArchive = class _SecurityArchive extends L {
|
|
|
528
557
|
}
|
|
529
558
|
this.#validateReportData();
|
|
530
559
|
} finally {
|
|
531
|
-
|
|
560
|
+
this.#close(db);
|
|
532
561
|
}
|
|
533
562
|
}
|
|
534
563
|
/**
|
|
535
564
|
* Closes the database connection and cleans up the internal state.
|
|
536
565
|
*/
|
|
537
|
-
|
|
538
|
-
await this.#pUpdateExpired;
|
|
566
|
+
#close(db) {
|
|
539
567
|
db.exec("PRAGMA optimize");
|
|
540
568
|
db.close();
|
|
541
569
|
this.#expired.clear();
|
|
542
|
-
this.#pUpdateExpired = void 0;
|
|
543
570
|
}
|
|
544
571
|
/**
|
|
545
572
|
* Outputs the current in-memory cache as a JSON object.
|
|
@@ -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
|
init
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QI6PGM7S.js";
|
|
15
15
|
import {
|
|
16
16
|
commandUsage
|
|
17
17
|
} from "./chunk-5E5GX4G6.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
asWSConfig,
|
|
20
20
|
assertWSConfig,
|
|
21
21
|
minimatch
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-R3KDJL6J.js";
|
|
23
23
|
import {
|
|
24
24
|
load,
|
|
25
25
|
save
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BRSCRAUI.js";
|
|
17
17
|
import {
|
|
18
18
|
init
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QI6PGM7S.js";
|
|
20
20
|
import {
|
|
21
21
|
Monorepo,
|
|
22
22
|
PackageJson,
|
|
23
23
|
minimatch,
|
|
24
24
|
platformCheck
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-R3KDJL6J.js";
|
|
26
26
|
import {
|
|
27
27
|
rimraf
|
|
28
28
|
} from "./chunk-BGQCUUCA.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
joinExtra,
|
|
50
50
|
splitDepID,
|
|
51
51
|
splitExtra
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-45PZMAKV.js";
|
|
53
53
|
import {
|
|
54
54
|
promiseSpawn
|
|
55
55
|
} from "./chunk-VCSVHRCS.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
patch,
|
|
85
85
|
satisfies,
|
|
86
86
|
shortDependencyTypes
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-HIGHMXU7.js";
|
|
88
88
|
import {
|
|
89
89
|
load,
|
|
90
90
|
walkUp
|
|
@@ -5376,7 +5376,7 @@ var exec = async (options) => {
|
|
|
5376
5376
|
{
|
|
5377
5377
|
...process.env,
|
|
5378
5378
|
...env2,
|
|
5379
|
-
FORCE_COLOR: color ? "1" : "0"
|
|
5379
|
+
FORCE_COLOR: color && process.stdout.isTTY ? "1" : "0"
|
|
5380
5380
|
},
|
|
5381
5381
|
arg0
|
|
5382
5382
|
),
|
|
@@ -7865,6 +7865,8 @@ var has = async (state) => {
|
|
|
7865
7865
|
edges: new Set(state.partial.edges),
|
|
7866
7866
|
nodes: new Set(state.partial.nodes)
|
|
7867
7867
|
},
|
|
7868
|
+
diffFiles: state.diffFiles,
|
|
7869
|
+
loose: state.loose,
|
|
7868
7870
|
hostContexts: state.hostContexts,
|
|
7869
7871
|
importers: state.importers,
|
|
7870
7872
|
retries: state.retries,
|
|
@@ -7924,6 +7926,7 @@ var is = async (state) => {
|
|
|
7924
7926
|
nodes: /* @__PURE__ */ new Set()
|
|
7925
7927
|
},
|
|
7926
7928
|
current: node,
|
|
7929
|
+
diffFiles: state.diffFiles,
|
|
7927
7930
|
initial: state.initial,
|
|
7928
7931
|
loose: true,
|
|
7929
7932
|
partial: {
|
|
@@ -7964,7 +7967,9 @@ var not = async (state) => {
|
|
|
7964
7967
|
nodes: /* @__PURE__ */ new Set()
|
|
7965
7968
|
},
|
|
7966
7969
|
current: node,
|
|
7970
|
+
diffFiles: state.diffFiles,
|
|
7967
7971
|
initial: state.initial,
|
|
7972
|
+
loose: state.loose,
|
|
7968
7973
|
partial: {
|
|
7969
7974
|
nodes: new Set(state.partial.nodes),
|
|
7970
7975
|
edges: new Set(state.partial.edges)
|
|
@@ -9163,6 +9168,13 @@ var Graph = class {
|
|
|
9163
9168
|
toFoundNode.detached = false;
|
|
9164
9169
|
toFoundNode.dev &&= flags.dev;
|
|
9165
9170
|
toFoundNode.optional &&= flags.optional;
|
|
9171
|
+
if (manifest) {
|
|
9172
|
+
if (!toFoundNode.manifest) {
|
|
9173
|
+
toFoundNode.manifest = manifest;
|
|
9174
|
+
this.manifests.set(toFoundNode.id, manifest);
|
|
9175
|
+
}
|
|
9176
|
+
toFoundNode.integrity ??= manifest.dist?.integrity;
|
|
9177
|
+
}
|
|
9166
9178
|
return toFoundNode;
|
|
9167
9179
|
}
|
|
9168
9180
|
const toNode = this.addNode(depId, manifest, spec2);
|
|
@@ -1001,22 +1001,27 @@ var parsePerson = (person, writeAccess, isPublisher) => {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
const name = typeof person.name === "string" ? person.name : void 0;
|
|
1003
1003
|
const email = typeof person.email === "string" ? person.email : typeof person.mail === "string" ? person.mail : void 0;
|
|
1004
|
-
|
|
1004
|
+
const url = typeof person.url === "string" ? person.url : void 0;
|
|
1005
|
+
if (!name && !email && !url) return void 0;
|
|
1005
1006
|
return {
|
|
1006
1007
|
name,
|
|
1007
1008
|
email,
|
|
1009
|
+
...url ? { url } : {},
|
|
1008
1010
|
[kWriteAccess]: writeAccess ?? false,
|
|
1009
1011
|
[kIsPublisher]: isPublisher ?? false
|
|
1010
1012
|
};
|
|
1011
1013
|
} else if (typeof person === "string") {
|
|
1012
1014
|
const NAME_PATTERN = /^([^(<]+)/;
|
|
1013
1015
|
const EMAIL_PATTERN = /<([^<>]+)>/;
|
|
1016
|
+
const URL_PATTERN = /\(([^()]+)\)/;
|
|
1014
1017
|
const name = NAME_PATTERN.exec(person)?.[0].trim() || "";
|
|
1015
1018
|
const email = EMAIL_PATTERN.exec(person)?.[1] || "";
|
|
1016
|
-
|
|
1019
|
+
const url = URL_PATTERN.exec(person)?.[1] || "";
|
|
1020
|
+
if (!name && !email && !url) return void 0;
|
|
1017
1021
|
return {
|
|
1018
1022
|
name: name || void 0,
|
|
1019
1023
|
email: email || void 0,
|
|
1024
|
+
...url ? { url } : {},
|
|
1020
1025
|
[kWriteAccess]: writeAccess ?? false,
|
|
1021
1026
|
[kIsPublisher]: isPublisher ?? false
|
|
1022
1027
|
};
|
|
@@ -1024,7 +1029,7 @@ var parsePerson = (person, writeAccess, isPublisher) => {
|
|
|
1024
1029
|
return;
|
|
1025
1030
|
};
|
|
1026
1031
|
var isNormalizedContributorEntry = (o) => {
|
|
1027
|
-
return isObject(o) && typeof o.name === "string" && !!o.name && typeof o.email === "string" && !!o.email && (isBoolean(o[kWriteAccess]) || isBoolean(o.writeAccess)) && (isBoolean(o[kIsPublisher]) || isBoolean(o.isPublisher));
|
|
1032
|
+
return isObject(o) && (typeof o.name === "string" || typeof o.email === "string" || typeof o.url === "string") && (typeof o.name === "undefined" || typeof o.name === "string" && !!o.name) && (typeof o.email === "undefined" || typeof o.email === "string" && !!o.email) && (typeof o.url === "undefined" || typeof o.url === "string" && !!o.url) && (isBoolean(o[kWriteAccess]) || isBoolean(o.writeAccess)) && (isBoolean(o[kIsPublisher]) || isBoolean(o.isPublisher));
|
|
1028
1033
|
};
|
|
1029
1034
|
var isNormalizedContributors = (o) => {
|
|
1030
1035
|
return Array.isArray(o) && o.length > 0 && o.every(isNormalizedContributorEntry);
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
error
|
|
14
|
+
} from "./chunk-WZWDS3W4.js";
|
|
15
|
+
import {
|
|
16
|
+
__glob
|
|
17
|
+
} from "./chunk-PZLD7RTK.js";
|
|
18
|
+
|
|
19
|
+
// import("./commands/**/*.ts") in ../../src/cli-sdk/src/load-command.ts
|
|
20
|
+
var globImport_commands_ts = __glob({
|
|
21
|
+
"./commands/bugs.ts": () => import("./bugs-5UZKBRJ6.js"),
|
|
22
|
+
"./commands/build.ts": () => import("./build-HHRMIGWX.js"),
|
|
23
|
+
"./commands/cache.ts": () => import("./cache-S7AIJNAW.js"),
|
|
24
|
+
"./commands/ci.ts": () => import("./ci-2U44K5HH.js"),
|
|
25
|
+
"./commands/config.ts": () => import("./config-J7A3MQFH.js"),
|
|
26
|
+
"./commands/create.ts": () => import("./create-QORFVTHP.js"),
|
|
27
|
+
"./commands/docs.ts": () => import("./docs-5X4WDWUP.js"),
|
|
28
|
+
"./commands/exec-cache.ts": () => import("./exec-cache-A6CMJUZ7.js"),
|
|
29
|
+
"./commands/exec-local.ts": () => import("./exec-local-TYAKTIYJ.js"),
|
|
30
|
+
"./commands/exec.ts": () => import("./exec-YMICUMJA.js"),
|
|
31
|
+
"./commands/help.ts": () => import("./help-OKCOEMB3.js"),
|
|
32
|
+
"./commands/init.ts": () => import("./init-VC6AG2UU.js"),
|
|
33
|
+
"./commands/install.ts": () => import("./install-P5AO6772.js"),
|
|
34
|
+
"./commands/install/reporter.ts": () => import("./reporter-WBQK75RI.js"),
|
|
35
|
+
"./commands/list.ts": () => import("./list-CIK732ED.js"),
|
|
36
|
+
"./commands/login.ts": () => import("./login-R3B4H2I2.js"),
|
|
37
|
+
"./commands/logout.ts": () => import("./logout-YUUXIVUO.js"),
|
|
38
|
+
"./commands/pack.ts": () => import("./pack-QEI3LPIQ.js"),
|
|
39
|
+
"./commands/ping.ts": () => import("./ping-QSR64W6S.js"),
|
|
40
|
+
"./commands/pkg.ts": () => import("./pkg-CNGHBNXD.js"),
|
|
41
|
+
"./commands/publish.ts": () => import("./publish-5N6MWW6E.js"),
|
|
42
|
+
"./commands/query.ts": () => import("./query-MIH452QT.js"),
|
|
43
|
+
"./commands/repo.ts": () => import("./repo-I7XLLP24.js"),
|
|
44
|
+
"./commands/run-exec.ts": () => import("./run-exec-ZJSAJPME.js"),
|
|
45
|
+
"./commands/run.ts": () => import("./run-NUQ63SUS.js"),
|
|
46
|
+
"./commands/token.ts": () => import("./token-JOS6MHEW.js"),
|
|
47
|
+
"./commands/uninstall.ts": () => import("./uninstall-A6XPKFIM.js"),
|
|
48
|
+
"./commands/update.ts": () => import("./update-FOBAWWTD.js"),
|
|
49
|
+
"./commands/version.ts": () => import("./version-AZK2MPTV.js"),
|
|
50
|
+
"./commands/view.ts": () => import("./view-PMXWE6QG.js"),
|
|
51
|
+
"./commands/whoami.ts": () => import("./whoami-OLZU4KG7.js")
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// ../../src/cli-sdk/src/load-command.ts
|
|
55
|
+
var loadCommand = async (command) => {
|
|
56
|
+
try {
|
|
57
|
+
return await globImport_commands_ts(`./commands/${command}.ts`);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
throw error("Could not load command", {
|
|
60
|
+
found: command,
|
|
61
|
+
cause: e
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
loadCommand
|
|
68
|
+
};
|
|
@@ -11,11 +11,11 @@ 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-D3UYPLBW.js";
|
|
15
15
|
import {
|
|
16
16
|
Spec2 as Spec,
|
|
17
17
|
joinDepIDTuple
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-45PZMAKV.js";
|
|
19
19
|
|
|
20
20
|
// ../../src/cli-sdk/src/parse-add-remove-args.ts
|
|
21
21
|
var rootDepID = joinDepIDTuple(["file", "."]);
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-FI5TUER7.js";
|
|
16
16
|
import {
|
|
17
17
|
RegistryClient
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CEEMJNRZ.js";
|
|
19
19
|
import {
|
|
20
20
|
Monorepo,
|
|
21
21
|
PackageJson,
|
|
@@ -23,18 +23,18 @@ import {
|
|
|
23
23
|
pickManifest,
|
|
24
24
|
resolve,
|
|
25
25
|
revs
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-R3KDJL6J.js";
|
|
27
27
|
import {
|
|
28
28
|
rimraf
|
|
29
29
|
} from "./chunk-BGQCUUCA.js";
|
|
30
30
|
import {
|
|
31
31
|
Spec2 as Spec
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-45PZMAKV.js";
|
|
33
33
|
import {
|
|
34
34
|
asError,
|
|
35
35
|
asPackument,
|
|
36
36
|
isIntegrity
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-HIGHMXU7.js";
|
|
38
38
|
import {
|
|
39
39
|
XDG
|
|
40
40
|
} from "./chunk-XNLSTHDK.js";
|
|
@@ -783,7 +783,7 @@ var Pool = class {
|
|
|
783
783
|
|
|
784
784
|
// ../../src/package-info/src/index.ts
|
|
785
785
|
var import_ssri = __toESM(require_lib(), 1);
|
|
786
|
-
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
786
|
+
import { createHash, randomBytes as randomBytes2 } from "node:crypto";
|
|
787
787
|
import {
|
|
788
788
|
mkdir as mkdir2,
|
|
789
789
|
readFile,
|
|
@@ -869,7 +869,8 @@ var PackageInfoClient = class {
|
|
|
869
869
|
spec = Spec.parse(spec, this.options);
|
|
870
870
|
const { from = this.#projectRoot, integrity, resolved } = options;
|
|
871
871
|
const f = spec.final;
|
|
872
|
-
const
|
|
872
|
+
const fromLockfile = !!(integrity && resolved);
|
|
873
|
+
const r = fromLockfile ? { resolved, integrity, spec } : await this.resolve(spec, options);
|
|
873
874
|
switch (f.type) {
|
|
874
875
|
case "git": {
|
|
875
876
|
const {
|
|
@@ -925,8 +926,23 @@ var PackageInfoClient = class {
|
|
|
925
926
|
if (!trustIntegrity && response.checkIntegrity({ spec, url: resolved })) {
|
|
926
927
|
this.#trustedIntegrities.set(r.resolved, response.integrity);
|
|
927
928
|
}
|
|
929
|
+
const buf = response.buffer();
|
|
930
|
+
if (r.integrity && !fromLockfile) {
|
|
931
|
+
const hash = createHash("sha512");
|
|
932
|
+
hash.update(buf);
|
|
933
|
+
const computed = `sha512-${hash.digest("base64")}`;
|
|
934
|
+
if (computed !== r.integrity) {
|
|
935
|
+
throw error("Tarball integrity check failed", {
|
|
936
|
+
code: "EINTEGRITY",
|
|
937
|
+
spec,
|
|
938
|
+
url: r.resolved,
|
|
939
|
+
wanted: r.integrity,
|
|
940
|
+
found: computed
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
}
|
|
928
944
|
try {
|
|
929
|
-
await this.tarPool.unpack(
|
|
945
|
+
await this.tarPool.unpack(buf, target);
|
|
930
946
|
} catch (er) {
|
|
931
947
|
throw this.#resolveError(
|
|
932
948
|
spec,
|
|
@@ -1139,7 +1155,22 @@ var PackageInfoClient = class {
|
|
|
1139
1155
|
if (!trustIntegrity && response.checkIntegrity({ spec, url: tarball })) {
|
|
1140
1156
|
this.#trustedIntegrities.set(tarball, response.integrity);
|
|
1141
1157
|
}
|
|
1142
|
-
|
|
1158
|
+
const buf = response.buffer();
|
|
1159
|
+
if (integrity) {
|
|
1160
|
+
const hash = createHash("sha512");
|
|
1161
|
+
hash.update(buf);
|
|
1162
|
+
const computed = `sha512-${hash.digest("base64")}`;
|
|
1163
|
+
if (computed !== integrity) {
|
|
1164
|
+
throw error("Tarball integrity check failed", {
|
|
1165
|
+
code: "EINTEGRITY",
|
|
1166
|
+
spec,
|
|
1167
|
+
url: tarball,
|
|
1168
|
+
wanted: integrity,
|
|
1169
|
+
found: computed
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
return buf;
|
|
1143
1174
|
}
|
|
1144
1175
|
case "git": {
|
|
1145
1176
|
const {
|