@vltpkg/cli-js 1.3.3 → 1.3.4
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-KMBBQIIT.js → access-AY2CIGVN.js} +4 -4
- package/{bugs-CABZX76X.js → bugs-6PTC6V7S.js} +12 -12
- package/{build-WNHKYA4E.js → build-R6OJNJDU.js} +6 -6
- package/{cache-KKT4GIYD.js → cache-NVLCCVWQ.js} +6 -6
- package/{chunk-3IDIPSH7.js → chunk-4XTUCYBW.js} +1 -1
- package/{chunk-MC6CESRA.js → chunk-AFUXQ3P4.js} +1 -1
- package/{chunk-GZWJAGBL.js → chunk-B5AKQ5TS.js} +3 -3
- package/{chunk-CU752KW7.js → chunk-BCANUHR3.js} +1 -1
- package/{chunk-LY5FNWRY.js → chunk-BFR3XHEM.js} +3 -3
- package/{chunk-ROCFQPP2.js → chunk-CYN4ADWK.js} +2 -2
- package/{chunk-QBXGMTDE.js → chunk-D4KNFORN.js} +1 -1
- package/{chunk-GA4LA6B2.js → chunk-DK6HGJCF.js} +4 -4
- package/chunk-DM2XRLCS.js +75 -0
- package/{chunk-SH24EMXO.js → chunk-GCLZEI3R.js} +150 -40
- package/{chunk-BUKZHMMK.js → chunk-INEKXXUQ.js} +1 -0
- package/{chunk-I6QGYSB4.js → chunk-LHIDMYN2.js} +1 -1
- package/{chunk-DCFLXO2M.js → chunk-MVD5AUNS.js} +1 -1
- package/{chunk-HCMAX6Q5.js → chunk-MWAWPY3P.js} +3 -3
- package/chunk-OFHNSAQ5.js +2155 -0
- package/{chunk-TJBBYDUN.js → chunk-QEWKCTQY.js} +4 -4
- package/{chunk-ZRRNOLEG.js → chunk-QGFDMXDH.js} +196 -96
- package/{chunk-ZBJRZXSU.js → chunk-QZIC3WVP.js} +3 -3
- package/{chunk-ZWKI5OSF.js → chunk-SRWDPPLX.js} +0 -1377
- package/{chunk-MOL2DUEQ.js → chunk-TL5SYXSC.js} +279 -35
- package/{chunk-CSZTT7QN.js → chunk-TOKUDCSW.js} +2 -2
- package/{chunk-YU2W5UPG.js → chunk-WXRS5PRL.js} +1 -1
- package/{chunk-ENSGPOLR.js → chunk-XU5WNX4S.js} +3 -1
- package/{ci-BGVGC5RF.js → ci-FEZ6B33S.js} +7 -7
- package/cli-package.json +1 -1
- package/{config-AWX2VEKL.js → config-EV5S74AA.js} +5 -5
- package/{config-FIKZ4VWG.js → config-VVPVV36W.js} +6 -6
- package/{create-CHTG7KO3.js → create-VGCARZLU.js} +13 -13
- package/{deprecate-W7KQ62HF.js → deprecate-3E27QREJ.js} +7 -7
- package/{dist-tag-66CC6HT7.js → dist-tag-ZIDIGEIM.js} +4 -4
- package/{docs-HW4U5TGD.js → docs-GESU73FF.js} +12 -12
- package/{exec-BVVNAGFI.js → exec-3SE4PRXY.js} +13 -13
- package/{exec-cache-L3ONPM5C.js → exec-cache-7QOIKCYP.js} +11 -11
- package/{exec-local-NR3RYQDQ.js → exec-local-EVAI6IYM.js} +10 -10
- package/{help-5YL6SUAN.js → help-H54DUW2F.js} +4 -4
- package/{init-RI2WVCGL.js → init-JOAMKEKV.js} +7 -7
- package/{install-OWAI4EOW.js → install-WHOVSLKH.js} +12 -12
- package/{list-4ZFX7ANG.js → list-7X2RIDA4.js} +12 -12
- package/{login-6TL3EE6Q.js → login-P5NRTQDS.js} +8 -8
- package/{logout-VQWHVHBE.js → logout-5PCTGCJZ.js} +4 -4
- package/{pack-Q5IRRAMU.js → pack-MLOVKXJZ.js} +9 -9
- package/package.json +1 -1
- package/{ping-2WV3V7GB.js → ping-6D6EEICV.js} +4 -4
- package/{pkg-RXB6BRS5.js → pkg-HC6N3DDH.js} +8 -8
- package/{profile-GNGWS5H2.js → profile-C3MNVMAE.js} +4 -4
- package/{publish-PI74W4GH.js → publish-3KUMQXKT.js} +12 -12
- package/{query-NESDWXGE.js → query-HNBW2ZGX.js} +12 -12
- package/{registry-MXAA4HVJ.js → registry-PY2L5ZWC.js} +2 -2
- package/registry-client-src-revalidate.js +150 -40
- package/{repo-PPBN3SKP.js → repo-VWEPCUXK.js} +12 -12
- package/{reporter-XBHCUW7W.js → reporter-UUDMEN4E.js} +6 -6
- package/{run-7GTWIFMV.js → run-OFW4MPAV.js} +10 -10
- package/{run-exec-VLSH5SOB.js → run-exec-ACGX23HX.js} +10 -10
- package/security-archive-src-update-expired.js +1 -1
- package/{setup-6O7RFGU2.js → setup-5C56O3S3.js} +10 -10
- package/{src-EJSVFFXB.js → src-3MEJQYBG.js} +21 -7
- package/{src-U4MCZFJT.js → src-LH2HZ6FT.js} +2 -2
- package/{src-6E7KCC7J.js → src-SI5YMOJI.js} +9 -9
- package/{token-NZ4HODXE.js → token-RPQP6BV5.js} +4 -4
- package/{uninstall-KBZ6PJBG.js → uninstall-HDUNLNAD.js} +8 -8
- package/{unpublish-JBWSIBRX.js → unpublish-SB647KPY.js} +4 -4
- package/{update-X4EC6MPP.js → update-PAIZPQPH.js} +11 -11
- package/{version-QEHPAFAE.js → version-5O2P2ROI.js} +7 -7
- package/{view-WGGZTYAT.js → view-3YVL4M7Z.js} +7 -7
- 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-RYNXOULV.js → whoami-KFXNKZOX.js} +4 -4
- package/chunk-7JK53T6G.js +0 -75
- package/chunk-KH3ERNCA.js +0 -783
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
} from "./chunk-RIYFGX27.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BFR3XHEM.js";
|
|
18
18
|
import {
|
|
19
19
|
stderr,
|
|
20
20
|
stdout,
|
|
21
21
|
styleTextStdout
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TOKUDCSW.js";
|
|
23
23
|
import {
|
|
24
24
|
require_emoji_regex
|
|
25
25
|
} from "./chunk-VTEFO2FT.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
Query,
|
|
28
28
|
actual,
|
|
29
29
|
isRunResult
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-QGFDMXDH.js";
|
|
31
31
|
import {
|
|
32
32
|
Monorepo
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-INEKXXUQ.js";
|
|
34
34
|
import {
|
|
35
35
|
isErrorWithCause
|
|
36
36
|
} from "./chunk-BP3PQ67D.js";
|
|
@@ -13,14 +13,15 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MVD5AUNS.js";
|
|
17
17
|
import {
|
|
18
18
|
Monorepo,
|
|
19
19
|
PackageJson,
|
|
20
|
+
detectLibc,
|
|
20
21
|
getUser,
|
|
21
22
|
minimatch,
|
|
22
23
|
platformCheck
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-INEKXXUQ.js";
|
|
24
25
|
import {
|
|
25
26
|
asDepID,
|
|
26
27
|
baseDepID,
|
|
@@ -46,7 +47,7 @@ import {
|
|
|
46
47
|
import {
|
|
47
48
|
userAgent,
|
|
48
49
|
userAgentHeaders
|
|
49
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-WXRS5PRL.js";
|
|
50
51
|
import {
|
|
51
52
|
graphStep,
|
|
52
53
|
promiseSpawn
|
|
@@ -10669,6 +10670,108 @@ var hasBindingGyp = (node, scurry) => node.bindingGyp ?? onDisk(node.resolvedLoc
|
|
|
10669
10670
|
// ../../src/graph/src/reify/scripts-manifest.ts
|
|
10670
10671
|
var scriptsManifest = (manifest, dir, packageJson) => manifest.hasInstallScript && !manifest.scripts ? packageJson.read(dir) : manifest;
|
|
10671
10672
|
|
|
10673
|
+
// ../../src/graph/src/reify/unshare.ts
|
|
10674
|
+
import { randomBytes } from "node:crypto";
|
|
10675
|
+
import { lstatSync as lstatSync2, readdirSync, rmSync } from "node:fs";
|
|
10676
|
+
import {
|
|
10677
|
+
chmod as chmod3,
|
|
10678
|
+
readFile,
|
|
10679
|
+
rename,
|
|
10680
|
+
rm,
|
|
10681
|
+
writeFile as writeFile2
|
|
10682
|
+
} from "node:fs/promises";
|
|
10683
|
+
import { join as join4 } from "node:path";
|
|
10684
|
+
|
|
10685
|
+
// ../../node_modules/.vlt/~npm~promise-call-limit@3.0.2/node_modules/promise-call-limit/dist/esm/index.js
|
|
10686
|
+
import * as os from "node:os";
|
|
10687
|
+
var defLimit = "availableParallelism" in os ? Math.max(1, os.availableParallelism() - 1) : Math.max(1, os.cpus().length - 1);
|
|
10688
|
+
var callLimit = (queue, { limit: limit2 = defLimit, rejectLate } = {}) => new Promise((res, rej) => {
|
|
10689
|
+
let active = 0;
|
|
10690
|
+
let current = 0;
|
|
10691
|
+
const results = [];
|
|
10692
|
+
let rejected = false;
|
|
10693
|
+
let rejection;
|
|
10694
|
+
const reject = (er) => {
|
|
10695
|
+
if (rejected)
|
|
10696
|
+
return;
|
|
10697
|
+
rejected = true;
|
|
10698
|
+
rejection ??= er;
|
|
10699
|
+
if (!rejectLate)
|
|
10700
|
+
rej(rejection);
|
|
10701
|
+
};
|
|
10702
|
+
let resolved = false;
|
|
10703
|
+
const resolve14 = () => {
|
|
10704
|
+
if (resolved || active > 0)
|
|
10705
|
+
return;
|
|
10706
|
+
resolved = true;
|
|
10707
|
+
res(results);
|
|
10708
|
+
};
|
|
10709
|
+
const run2 = () => {
|
|
10710
|
+
const c = current++;
|
|
10711
|
+
if (c >= queue.length)
|
|
10712
|
+
return rejected ? reject() : resolve14();
|
|
10713
|
+
active++;
|
|
10714
|
+
const step = queue[c];
|
|
10715
|
+
if (!step)
|
|
10716
|
+
throw new Error("walked off queue");
|
|
10717
|
+
results[c] = step().then((result) => {
|
|
10718
|
+
active--;
|
|
10719
|
+
results[c] = result;
|
|
10720
|
+
return result;
|
|
10721
|
+
}, (er) => {
|
|
10722
|
+
active--;
|
|
10723
|
+
reject(er);
|
|
10724
|
+
}).then((result) => {
|
|
10725
|
+
if (rejected && active === 0)
|
|
10726
|
+
return rej(rejection);
|
|
10727
|
+
run2();
|
|
10728
|
+
return result;
|
|
10729
|
+
});
|
|
10730
|
+
};
|
|
10731
|
+
for (let i = 0; i < limit2; i++)
|
|
10732
|
+
run2();
|
|
10733
|
+
});
|
|
10734
|
+
|
|
10735
|
+
// ../../src/graph/src/reify/unshare.ts
|
|
10736
|
+
var TMP = ".vlt-unshare-";
|
|
10737
|
+
var own = async (p, mode, tmp) => {
|
|
10738
|
+
const body = await readFile(p);
|
|
10739
|
+
try {
|
|
10740
|
+
await writeFile2(tmp, body, { mode: mode & 511, flag: "wx" });
|
|
10741
|
+
if (mode & 73) await chmod3(tmp, mode & 511);
|
|
10742
|
+
await rename(tmp, p);
|
|
10743
|
+
} catch (er) {
|
|
10744
|
+
await rm(tmp, { force: true });
|
|
10745
|
+
throw er;
|
|
10746
|
+
}
|
|
10747
|
+
};
|
|
10748
|
+
var unshare = async (dir) => {
|
|
10749
|
+
const pjPath = join4(dir, "package.json");
|
|
10750
|
+
const pj = lstatSync2(pjPath, { throwIfNoEntry: false });
|
|
10751
|
+
if (!pj || pj.nlink < 2) return;
|
|
10752
|
+
const tag = `${TMP}${randomBytes(4).toString("hex")}-`;
|
|
10753
|
+
let n = 0;
|
|
10754
|
+
const shared = [];
|
|
10755
|
+
const walk2 = (d) => {
|
|
10756
|
+
for (const ent of readdirSync(d, { withFileTypes: true })) {
|
|
10757
|
+
const p = join4(d, ent.name);
|
|
10758
|
+
if (ent.isDirectory()) walk2(p);
|
|
10759
|
+
else if (ent.isFile() && p !== pjPath) {
|
|
10760
|
+
const { mode, nlink } = lstatSync2(p);
|
|
10761
|
+
if (nlink > 1) {
|
|
10762
|
+
const tmp = join4(d, `${tag}${n++}`);
|
|
10763
|
+
shared.push(() => own(p, mode, tmp));
|
|
10764
|
+
} else if (ent.name.startsWith(TMP)) {
|
|
10765
|
+
rmSync(p);
|
|
10766
|
+
}
|
|
10767
|
+
}
|
|
10768
|
+
}
|
|
10769
|
+
};
|
|
10770
|
+
walk2(dir);
|
|
10771
|
+
await callLimit(shared, { limit: 16, rejectLate: true });
|
|
10772
|
+
await own(pjPath, pj.mode, join4(dir, `${tag}${n}`));
|
|
10773
|
+
};
|
|
10774
|
+
|
|
10672
10775
|
// ../../src/graph/src/reify/build.ts
|
|
10673
10776
|
var build = async (diff2, packageJson, scurry, allowScriptsNodes) => {
|
|
10674
10777
|
const graph = diff2.to;
|
|
@@ -10722,26 +10825,28 @@ var visit = async (packageJson, scurry, node, signal, _path) => {
|
|
|
10722
10825
|
} = scripts2;
|
|
10723
10826
|
const hasImplicitInstall = hasBindingGyp(node, scurry) && !install2 && !preinstall;
|
|
10724
10827
|
const runInstall = !!(install2 || preinstall || postinstall) || hasImplicitInstall;
|
|
10828
|
+
const prepable = node.id.startsWith("git") || node.importer || !node.inVltStore();
|
|
10829
|
+
const runPrepare = !!(prepare || preprepare || postprepare) && prepable;
|
|
10830
|
+
if ((runInstall || runPrepare) && node.inVltStore())
|
|
10831
|
+
await unshare(dir);
|
|
10725
10832
|
if (runInstall) {
|
|
10726
10833
|
await run({
|
|
10727
10834
|
signal,
|
|
10728
10835
|
arg0: "install",
|
|
10729
10836
|
ignoreMissing: true,
|
|
10730
10837
|
packageJson,
|
|
10731
|
-
cwd:
|
|
10838
|
+
cwd: dir,
|
|
10732
10839
|
projectRoot: node.projectRoot,
|
|
10733
10840
|
manifest
|
|
10734
10841
|
});
|
|
10735
10842
|
}
|
|
10736
|
-
const prepable = node.id.startsWith("git") || node.importer || !node.inVltStore();
|
|
10737
|
-
const runPrepare = !!(prepare || preprepare || postprepare) && prepable;
|
|
10738
10843
|
if (runPrepare) {
|
|
10739
10844
|
await run({
|
|
10740
10845
|
signal,
|
|
10741
10846
|
arg0: "prepare",
|
|
10742
10847
|
ignoreMissing: true,
|
|
10743
10848
|
packageJson,
|
|
10744
|
-
cwd:
|
|
10849
|
+
cwd: dir,
|
|
10745
10850
|
projectRoot: node.projectRoot,
|
|
10746
10851
|
manifest
|
|
10747
10852
|
});
|
|
@@ -11269,7 +11374,7 @@ function mermaidOutput(options) {
|
|
|
11269
11374
|
|
|
11270
11375
|
// ../../src/rollback-remove/src/index.ts
|
|
11271
11376
|
import { spawn as spawn3 } from "node:child_process";
|
|
11272
|
-
import { rename } from "node:fs/promises";
|
|
11377
|
+
import { rename as rename2 } from "node:fs/promises";
|
|
11273
11378
|
import { basename, dirname as dirname3 } from "node:path";
|
|
11274
11379
|
|
|
11275
11380
|
// ../../src/rollback-remove/src/remove.ts
|
|
@@ -11285,7 +11390,7 @@ var RollbackRemove = class {
|
|
|
11285
11390
|
if (this.#paths.has(path2)) return;
|
|
11286
11391
|
const target = `${dirname3(path2)}/.VLT.DELETE.${this.#key}.${basename(path2)}`;
|
|
11287
11392
|
try {
|
|
11288
|
-
await
|
|
11393
|
+
await rename2(path2, target);
|
|
11289
11394
|
} catch (e) {
|
|
11290
11395
|
if (e instanceof Error && "code" in e && /* c8 ignore start - very spurious weirdness on Windows */
|
|
11291
11396
|
(e.code === "ENOENT" || e.code === "EPERM")) {
|
|
@@ -11326,7 +11431,7 @@ var RollbackRemove = class {
|
|
|
11326
11431
|
for (const [original, moved] of this.#paths) {
|
|
11327
11432
|
promises.push(
|
|
11328
11433
|
rimraf(original).catch(() => {
|
|
11329
|
-
}).then(() =>
|
|
11434
|
+
}).then(() => rename2(moved, original))
|
|
11330
11435
|
);
|
|
11331
11436
|
}
|
|
11332
11437
|
await Promise.all(promises);
|
|
@@ -12510,7 +12615,7 @@ var canonicalizePeerIds = (graph, options = {}) => {
|
|
|
12510
12615
|
|
|
12511
12616
|
// ../../src/graph/src/ideal/move-peer-store-dirs.ts
|
|
12512
12617
|
import { existsSync as existsSync3 } from "node:fs";
|
|
12513
|
-
import { rename as
|
|
12618
|
+
import { rename as rename3 } from "node:fs/promises";
|
|
12514
12619
|
var movePeerStoreDirs = async (moves, {
|
|
12515
12620
|
scurry,
|
|
12516
12621
|
remover
|
|
@@ -12530,7 +12635,7 @@ var movePeerStoreDirs = async (moves, {
|
|
|
12530
12635
|
}
|
|
12531
12636
|
const tmp = scurry.resolve(store, `.VLT.MOVE.${key}.${to}`);
|
|
12532
12637
|
try {
|
|
12533
|
-
await
|
|
12638
|
+
await rename3(src, tmp);
|
|
12534
12639
|
} catch {
|
|
12535
12640
|
node.extracted = false;
|
|
12536
12641
|
return;
|
|
@@ -12544,7 +12649,7 @@ var movePeerStoreDirs = async (moves, {
|
|
|
12544
12649
|
const { node, tmp, dest } = s;
|
|
12545
12650
|
try {
|
|
12546
12651
|
await remover.rm(dest);
|
|
12547
|
-
await
|
|
12652
|
+
await rename3(tmp, dest);
|
|
12548
12653
|
} catch {
|
|
12549
12654
|
node.extracted = false;
|
|
12550
12655
|
try {
|
|
@@ -12647,13 +12752,12 @@ var isPathSecurityError = (er) => {
|
|
|
12647
12752
|
};
|
|
12648
12753
|
|
|
12649
12754
|
// ../../src/graph/src/reify/extract-node.ts
|
|
12650
|
-
import { lstatSync as
|
|
12755
|
+
import { lstatSync as lstatSync3 } from "node:fs";
|
|
12651
12756
|
var getOptionalFailedNodeRemover = (node, diff2) => {
|
|
12652
12757
|
return diff2 ? optionalFail(diff2, node) : node.isOptional() ? () => removeOptionalSubgraph(node.graph, node) : void 0;
|
|
12653
12758
|
};
|
|
12654
12759
|
var extractNode = async (node, scurry, remover, options, packageInfo, diff2) => {
|
|
12655
12760
|
node.extracted = true;
|
|
12656
|
-
const { manifest = {} } = node;
|
|
12657
12761
|
const target = node.resolvedLocation(scurry);
|
|
12658
12762
|
const from = scurry.resolve("");
|
|
12659
12763
|
const spec2 = hydrate2(node.id, node.name, options);
|
|
@@ -12670,13 +12774,11 @@ var extractNode = async (node, scurry, remover, options, packageInfo, diff2) =>
|
|
|
12670
12774
|
error: new Error("Platform check failed or package deprecated")
|
|
12671
12775
|
};
|
|
12672
12776
|
}
|
|
12673
|
-
const { scripts: scripts2, hasInstallScript } = manifest;
|
|
12674
12777
|
const extractOptions = {
|
|
12675
12778
|
from,
|
|
12676
12779
|
integrity,
|
|
12677
12780
|
resolved,
|
|
12678
|
-
fromLockfile: node.resolvedFromLockfile
|
|
12679
|
-
installScripts: !!(hasInstallScript || scripts2?.install || scripts2?.preinstall || scripts2?.postinstall)
|
|
12781
|
+
fromLockfile: node.resolvedFromLockfile
|
|
12680
12782
|
};
|
|
12681
12783
|
const extracted = (r) => {
|
|
12682
12784
|
if (r.integrity && !node.integrity) node.integrity = r.integrity;
|
|
@@ -12692,7 +12794,7 @@ var extractNode = async (node, scurry, remover, options, packageInfo, diff2) =>
|
|
|
12692
12794
|
return { success: true, node };
|
|
12693
12795
|
};
|
|
12694
12796
|
try {
|
|
12695
|
-
if (
|
|
12797
|
+
if (lstatSync3(target, { throwIfNoEntry: false })) {
|
|
12696
12798
|
await remover.rm(target);
|
|
12697
12799
|
}
|
|
12698
12800
|
if (removeOptionalFailedNode) {
|
|
@@ -13819,7 +13921,6 @@ var appendNodes = async (packageInfo, graph, fromNode, deps, scurry, options, se
|
|
|
13819
13921
|
peerContext,
|
|
13820
13922
|
depth
|
|
13821
13923
|
}) => {
|
|
13822
|
-
seen.add(node.id);
|
|
13823
13924
|
const result = await fetchManifestsForDeps(
|
|
13824
13925
|
packageInfo,
|
|
13825
13926
|
graph,
|
|
@@ -13896,15 +13997,12 @@ var appendNodes = async (packageInfo, graph, fromNode, deps, scurry, options, se
|
|
|
13896
13997
|
levelResults.push(placed);
|
|
13897
13998
|
}
|
|
13898
13999
|
postPlacementPeerCheck(graph, levelResults);
|
|
14000
|
+
const nextDepth = (currentLevelDeps[0]?.depth ?? 0) + 1;
|
|
13899
14001
|
for (const childDepsToProcess of levelResults) {
|
|
13900
14002
|
for (const childDep of childDepsToProcess) {
|
|
13901
|
-
if (
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
...childDep,
|
|
13905
|
-
depth: currentDepth + 1
|
|
13906
|
-
});
|
|
13907
|
-
}
|
|
14003
|
+
if (seen.has(childDep.node.id)) continue;
|
|
14004
|
+
seen.add(childDep.node.id);
|
|
14005
|
+
nextLevelDeps.push({ ...childDep, depth: nextDepth });
|
|
13908
14006
|
}
|
|
13909
14007
|
}
|
|
13910
14008
|
currentLevelDeps = nextLevelDeps;
|
|
@@ -14076,6 +14174,57 @@ var buildIdealFromStartingGraph = async (options) => {
|
|
|
14076
14174
|
return options.graph;
|
|
14077
14175
|
};
|
|
14078
14176
|
|
|
14177
|
+
// ../../src/graph/src/ideal/prefetch-resolve.ts
|
|
14178
|
+
var prefetchResolve = (graph, packageInfo, options) => {
|
|
14179
|
+
if (options.modifiers) return 0;
|
|
14180
|
+
const registry2 = options.registry;
|
|
14181
|
+
if (!registry2) return 0;
|
|
14182
|
+
const scopes = Object.keys(options["scoped-registries"] ?? {});
|
|
14183
|
+
const scoped = (name) => scopes.some((scope2) => name.startsWith(`${scope2}/`));
|
|
14184
|
+
const roots = [];
|
|
14185
|
+
const seen = /* @__PURE__ */ new Set();
|
|
14186
|
+
for (const importer of graph.importers) {
|
|
14187
|
+
const manifest = importer.manifest;
|
|
14188
|
+
if (!manifest) continue;
|
|
14189
|
+
for (const field of [
|
|
14190
|
+
"dependencies",
|
|
14191
|
+
"devDependencies",
|
|
14192
|
+
"optionalDependencies"
|
|
14193
|
+
]) {
|
|
14194
|
+
const deps = manifest[field];
|
|
14195
|
+
if (!deps) continue;
|
|
14196
|
+
for (const [name, spec2] of Object.entries(deps)) {
|
|
14197
|
+
if (typeof spec2 !== "string") continue;
|
|
14198
|
+
if (spec2.includes(":") || scoped(name)) continue;
|
|
14199
|
+
const key = `${name}@${spec2}`;
|
|
14200
|
+
if (seen.has(key)) continue;
|
|
14201
|
+
seen.add(key);
|
|
14202
|
+
roots.push({ name, spec: spec2 });
|
|
14203
|
+
}
|
|
14204
|
+
}
|
|
14205
|
+
}
|
|
14206
|
+
if (!roots.length) return 0;
|
|
14207
|
+
const have = [];
|
|
14208
|
+
for (const node of graph.nodes.values()) {
|
|
14209
|
+
if (node.manifest && node.name && node.version && !scoped(node.name)) {
|
|
14210
|
+
have.push(`${node.name}@${node.version}`);
|
|
14211
|
+
}
|
|
14212
|
+
}
|
|
14213
|
+
packageInfo.prefetchResolve(registry2, {
|
|
14214
|
+
roots,
|
|
14215
|
+
have,
|
|
14216
|
+
...scopes.length ? { stop: { scopes } } : {},
|
|
14217
|
+
platform: {
|
|
14218
|
+
os: process.platform,
|
|
14219
|
+
cpu: process.arch,
|
|
14220
|
+
node: process.versions.node,
|
|
14221
|
+
// undefined never serializes, so no libc means the field is absent
|
|
14222
|
+
libc: detectLibc()
|
|
14223
|
+
}
|
|
14224
|
+
});
|
|
14225
|
+
return roots.length;
|
|
14226
|
+
};
|
|
14227
|
+
|
|
14079
14228
|
// ../../src/graph/src/ideal/build.ts
|
|
14080
14229
|
var getMap2 = (m) => m ?? /* @__PURE__ */ new Map();
|
|
14081
14230
|
var validateFileDepNode = (graph, id2) => {
|
|
@@ -14112,6 +14261,7 @@ var build3 = async (options) => {
|
|
|
14112
14261
|
monorepo
|
|
14113
14262
|
});
|
|
14114
14263
|
}
|
|
14264
|
+
prefetchResolve(graph, packageInfo, options);
|
|
14115
14265
|
const res = await buildIdealFromStartingGraph({
|
|
14116
14266
|
...options,
|
|
14117
14267
|
scurry,
|
|
@@ -14138,63 +14288,13 @@ var build3 = async (options) => {
|
|
|
14138
14288
|
// ../../src/graph/src/reify/index.ts
|
|
14139
14289
|
import { availableParallelism as availableParallelism2 } from "node:os";
|
|
14140
14290
|
|
|
14141
|
-
// ../../node_modules/.vlt/~npm~promise-call-limit@3.0.2/node_modules/promise-call-limit/dist/esm/index.js
|
|
14142
|
-
import * as os from "node:os";
|
|
14143
|
-
var defLimit = "availableParallelism" in os ? Math.max(1, os.availableParallelism() - 1) : Math.max(1, os.cpus().length - 1);
|
|
14144
|
-
var callLimit = (queue, { limit: limit2 = defLimit, rejectLate } = {}) => new Promise((res, rej) => {
|
|
14145
|
-
let active = 0;
|
|
14146
|
-
let current = 0;
|
|
14147
|
-
const results = [];
|
|
14148
|
-
let rejected = false;
|
|
14149
|
-
let rejection;
|
|
14150
|
-
const reject = (er) => {
|
|
14151
|
-
if (rejected)
|
|
14152
|
-
return;
|
|
14153
|
-
rejected = true;
|
|
14154
|
-
rejection ??= er;
|
|
14155
|
-
if (!rejectLate)
|
|
14156
|
-
rej(rejection);
|
|
14157
|
-
};
|
|
14158
|
-
let resolved = false;
|
|
14159
|
-
const resolve14 = () => {
|
|
14160
|
-
if (resolved || active > 0)
|
|
14161
|
-
return;
|
|
14162
|
-
resolved = true;
|
|
14163
|
-
res(results);
|
|
14164
|
-
};
|
|
14165
|
-
const run2 = () => {
|
|
14166
|
-
const c = current++;
|
|
14167
|
-
if (c >= queue.length)
|
|
14168
|
-
return rejected ? reject() : resolve14();
|
|
14169
|
-
active++;
|
|
14170
|
-
const step = queue[c];
|
|
14171
|
-
if (!step)
|
|
14172
|
-
throw new Error("walked off queue");
|
|
14173
|
-
results[c] = step().then((result) => {
|
|
14174
|
-
active--;
|
|
14175
|
-
results[c] = result;
|
|
14176
|
-
return result;
|
|
14177
|
-
}, (er) => {
|
|
14178
|
-
active--;
|
|
14179
|
-
reject(er);
|
|
14180
|
-
}).then((result) => {
|
|
14181
|
-
if (rejected && active === 0)
|
|
14182
|
-
return rej(rejection);
|
|
14183
|
-
run2();
|
|
14184
|
-
return result;
|
|
14185
|
-
});
|
|
14186
|
-
};
|
|
14187
|
-
for (let i = 0; i < limit2; i++)
|
|
14188
|
-
run2();
|
|
14189
|
-
});
|
|
14190
|
-
|
|
14191
14291
|
// ../../src/cmd-shim/src/index.ts
|
|
14192
14292
|
import {
|
|
14193
|
-
chmod as
|
|
14293
|
+
chmod as chmod4,
|
|
14194
14294
|
mkdir as mkdir2,
|
|
14195
|
-
readFile as
|
|
14295
|
+
readFile as readFile3,
|
|
14196
14296
|
stat as stat2,
|
|
14197
|
-
writeFile as
|
|
14297
|
+
writeFile as writeFile3
|
|
14198
14298
|
} from "node:fs/promises";
|
|
14199
14299
|
import { dirname as dirname5, relative as relative2 } from "node:path";
|
|
14200
14300
|
|
|
@@ -14228,7 +14328,7 @@ var replaceDollarWithPercentPair = (value) => {
|
|
|
14228
14328
|
};
|
|
14229
14329
|
|
|
14230
14330
|
// ../../src/cmd-shim/src/read.ts
|
|
14231
|
-
import { lstat, readFile, readlink } from "node:fs/promises";
|
|
14331
|
+
import { lstat, readFile as readFile2, readlink } from "node:fs/promises";
|
|
14232
14332
|
import { dirname as dirname4, resolve as resolve8 } from "node:path";
|
|
14233
14333
|
|
|
14234
14334
|
// ../../src/cmd-shim/src/paths.ts
|
|
@@ -14280,7 +14380,7 @@ var readCmdShimIfExists = async (path2) => {
|
|
|
14280
14380
|
if (st.isSymbolicLink()) {
|
|
14281
14381
|
return resolve8(dirname4(path2), await readlink(path2));
|
|
14282
14382
|
}
|
|
14283
|
-
const contents = await
|
|
14383
|
+
const contents = await readFile2(path2);
|
|
14284
14384
|
const destination = extractPath(path2, contents.toString());
|
|
14285
14385
|
if (destination) return resolve8(dirname4(path2), destination);
|
|
14286
14386
|
} catch {
|
|
@@ -14305,7 +14405,7 @@ var writeShim = async (from, to, remover) => {
|
|
|
14305
14405
|
remover.rm(to + ".pwsh")
|
|
14306
14406
|
]);
|
|
14307
14407
|
await mkdir2(dirname5(to), { recursive: true });
|
|
14308
|
-
const data = await
|
|
14408
|
+
const data = await readFile3(from, "utf8").catch(() => "");
|
|
14309
14409
|
if (!data) {
|
|
14310
14410
|
return await writeShim_(from, to);
|
|
14311
14411
|
}
|
|
@@ -14420,16 +14520,16 @@ exit $LASTEXITCODE
|
|
|
14420
14520
|
`;
|
|
14421
14521
|
}
|
|
14422
14522
|
await Promise.all([
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14523
|
+
writeFile3(to + ".cmd", cmd, "utf8"),
|
|
14524
|
+
writeFile3(to + ".ps1", pwsh, "utf8"),
|
|
14525
|
+
writeFile3(to, sh, "utf8")
|
|
14426
14526
|
]);
|
|
14427
14527
|
await chmodShim(to);
|
|
14428
14528
|
};
|
|
14429
14529
|
var chmodShim = async (to) => await Promise.all([
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14530
|
+
chmod4(to, 493),
|
|
14531
|
+
chmod4(to + ".cmd", 493),
|
|
14532
|
+
chmod4(to + ".ps1", 493)
|
|
14433
14533
|
]);
|
|
14434
14534
|
|
|
14435
14535
|
// ../../src/graph/src/reify/add-edge.ts
|
|
@@ -15034,7 +15134,7 @@ var reify_ = async (options, diff2, remover, saveImportersPackageJson) => {
|
|
|
15034
15134
|
};
|
|
15035
15135
|
|
|
15036
15136
|
// ../../src/graph/src/install.ts
|
|
15037
|
-
import { existsSync as existsSync6, rmSync as
|
|
15137
|
+
import { existsSync as existsSync6, rmSync as rmSync4 } from "node:fs";
|
|
15038
15138
|
import { resolve as resolve13 } from "node:path";
|
|
15039
15139
|
|
|
15040
15140
|
// ../../src/graph/src/lockfile/format-options-change.ts
|
|
@@ -15054,7 +15154,7 @@ var formatOptionsChange = ({
|
|
|
15054
15154
|
}) => `${section}:${key === void 0 ? "" : ` ${key}`} ` + (from === void 0 ? "(missing)" : `"${redactUserinfo(from)}"`) + ` -> ${to === void 0 ? "(removed)" : `"${redactUserinfo(to)}"`}`;
|
|
15055
15155
|
|
|
15056
15156
|
// ../../src/graph/src/uninstall.ts
|
|
15057
|
-
import { existsSync as existsSync4, rmSync } from "node:fs";
|
|
15157
|
+
import { existsSync as existsSync4, rmSync as rmSync2 } from "node:fs";
|
|
15058
15158
|
import { resolve as resolve11 } from "node:path";
|
|
15059
15159
|
var uninstall = async (options, remove) => {
|
|
15060
15160
|
const mainManifest = options.packageJson.read(options.projectRoot);
|
|
@@ -15107,7 +15207,7 @@ var uninstall = async (options, remove) => {
|
|
|
15107
15207
|
"node_modules/.vlt-lock.json"
|
|
15108
15208
|
);
|
|
15109
15209
|
if (existsSync4(hiddenLockfile)) {
|
|
15110
|
-
|
|
15210
|
+
rmSync2(hiddenLockfile, { force: true });
|
|
15111
15211
|
}
|
|
15112
15212
|
} catch {
|
|
15113
15213
|
}
|
|
@@ -15116,7 +15216,7 @@ var uninstall = async (options, remove) => {
|
|
|
15116
15216
|
};
|
|
15117
15217
|
|
|
15118
15218
|
// ../../src/graph/src/update.ts
|
|
15119
|
-
import { existsSync as existsSync5, rmSync as
|
|
15219
|
+
import { existsSync as existsSync5, rmSync as rmSync3 } from "node:fs";
|
|
15120
15220
|
import { resolve as resolve12 } from "node:path";
|
|
15121
15221
|
var update = async (options) => {
|
|
15122
15222
|
let mainManifest = void 0;
|
|
@@ -15171,7 +15271,7 @@ var update = async (options) => {
|
|
|
15171
15271
|
"node_modules/.vlt-lock.json"
|
|
15172
15272
|
);
|
|
15173
15273
|
if (existsSync5(hiddenLockfile)) {
|
|
15174
|
-
|
|
15274
|
+
rmSync3(hiddenLockfile, { force: true });
|
|
15175
15275
|
}
|
|
15176
15276
|
} catch {
|
|
15177
15277
|
}
|
|
@@ -15471,7 +15571,7 @@ var install = async (options, add) => {
|
|
|
15471
15571
|
"node_modules/.vlt-lock.json"
|
|
15472
15572
|
);
|
|
15473
15573
|
if (existsSync6(hiddenLockfile)) {
|
|
15474
|
-
|
|
15574
|
+
rmSync4(hiddenLockfile, { force: true });
|
|
15475
15575
|
}
|
|
15476
15576
|
} catch {
|
|
15477
15577
|
}
|
|
@@ -15490,12 +15590,12 @@ export {
|
|
|
15490
15590
|
execFG,
|
|
15491
15591
|
runExec,
|
|
15492
15592
|
runExecFG,
|
|
15593
|
+
callLimit,
|
|
15493
15594
|
Query,
|
|
15494
15595
|
build2 as build,
|
|
15495
15596
|
jsonOutput,
|
|
15496
15597
|
humanReadableOutput,
|
|
15497
15598
|
mermaidOutput,
|
|
15498
|
-
callLimit,
|
|
15499
15599
|
findCmdShimIfExists,
|
|
15500
15600
|
RollbackRemove,
|
|
15501
15601
|
GraphModifier,
|
|
@@ -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
|
PackageInfoClient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TL5SYXSC.js";
|
|
15
15
|
import {
|
|
16
16
|
findCmdShimIfExists,
|
|
17
17
|
install
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QGFDMXDH.js";
|
|
19
19
|
import {
|
|
20
20
|
PathScurry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-INEKXXUQ.js";
|
|
22
22
|
import {
|
|
23
23
|
Spec
|
|
24
24
|
} from "./chunk-64VFL4WI.js";
|