@vltpkg/cli-js 1.3.3 → 1.3.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-KMBBQIIT.js → access-X2ZZH2BV.js} +4 -4
- package/{bugs-CABZX76X.js → bugs-SF56YATZ.js} +12 -12
- package/{build-WNHKYA4E.js → build-RRJ645SV.js} +6 -6
- package/{cache-KKT4GIYD.js → cache-NETXHYQU.js} +6 -6
- package/{chunk-SH24EMXO.js → chunk-2B5STVCP.js} +150 -40
- package/{chunk-GZWJAGBL.js → chunk-35OBZITS.js} +3 -3
- package/{chunk-ROCFQPP2.js → chunk-75F2WCA5.js} +2 -2
- package/{chunk-MOL2DUEQ.js → chunk-7DHDJ5XY.js} +368 -51
- package/{chunk-YU2W5UPG.js → chunk-ADDCQBGR.js} +1 -1
- package/{chunk-MC6CESRA.js → chunk-AFUXQ3P4.js} +1 -1
- package/{chunk-LY5FNWRY.js → chunk-B2CTWVQM.js} +3 -3
- package/{chunk-CU752KW7.js → chunk-BCANUHR3.js} +1 -1
- package/{chunk-GA4LA6B2.js → chunk-EGWLQVDZ.js} +4 -4
- package/chunk-EWZQGHYC.js +75 -0
- package/{chunk-HCMAX6Q5.js → chunk-GO5X2SSV.js} +3 -3
- package/{chunk-TJBBYDUN.js → chunk-I2DZC2J3.js} +4 -4
- package/{chunk-BUKZHMMK.js → chunk-INEKXXUQ.js} +1 -0
- package/{chunk-QBXGMTDE.js → chunk-LHB4CVEH.js} +1 -1
- package/{chunk-I6QGYSB4.js → chunk-LHIDMYN2.js} +1 -1
- package/chunk-OFHNSAQ5.js +2155 -0
- package/{chunk-ZBJRZXSU.js → chunk-PBHCZOUY.js} +3 -3
- package/{chunk-3IDIPSH7.js → chunk-QJHTK7ML.js} +1 -1
- package/{chunk-ZWKI5OSF.js → chunk-SRWDPPLX.js} +0 -1377
- package/{chunk-CSZTT7QN.js → chunk-TOKUDCSW.js} +2 -2
- package/{chunk-ENSGPOLR.js → chunk-XU5WNX4S.js} +3 -1
- package/{chunk-DCFLXO2M.js → chunk-XUGOPOLF.js} +1 -1
- package/{chunk-ZRRNOLEG.js → chunk-ZZFFMXI2.js} +214 -105
- package/{ci-BGVGC5RF.js → ci-YX56QIMV.js} +7 -7
- package/cli-package.json +1 -1
- package/{config-AWX2VEKL.js → config-HO7N7FPS.js} +5 -5
- package/{config-FIKZ4VWG.js → config-SHRCBOCI.js} +6 -6
- package/{create-CHTG7KO3.js → create-LO6BUYPU.js} +13 -13
- package/{deprecate-W7KQ62HF.js → deprecate-CUMWWMAF.js} +7 -7
- package/{dist-tag-66CC6HT7.js → dist-tag-DJJDBPTJ.js} +4 -4
- package/{docs-HW4U5TGD.js → docs-KDCDJRO5.js} +12 -12
- package/{exec-BVVNAGFI.js → exec-KF4ANRPM.js} +13 -13
- package/{exec-cache-L3ONPM5C.js → exec-cache-GBLLYU5O.js} +11 -11
- package/{exec-local-NR3RYQDQ.js → exec-local-VCP4KR6K.js} +10 -10
- package/{help-5YL6SUAN.js → help-MV53HEUI.js} +4 -4
- package/{init-RI2WVCGL.js → init-N3BM2FKC.js} +7 -7
- package/{install-OWAI4EOW.js → install-DDYIRJWL.js} +12 -12
- package/{list-4ZFX7ANG.js → list-VTCG6GBS.js} +12 -12
- package/{login-6TL3EE6Q.js → login-MCX6LCP5.js} +8 -8
- package/{logout-VQWHVHBE.js → logout-FPNGIQDZ.js} +4 -4
- package/{pack-Q5IRRAMU.js → pack-KCVLNNVZ.js} +9 -9
- package/package.json +1 -1
- package/{ping-2WV3V7GB.js → ping-MXTB7GFE.js} +4 -4
- package/{pkg-RXB6BRS5.js → pkg-QDEHGO34.js} +8 -8
- package/{profile-GNGWS5H2.js → profile-GQUM6NRG.js} +4 -4
- package/{publish-PI74W4GH.js → publish-UEL4KXDZ.js} +12 -12
- package/{query-NESDWXGE.js → query-MJTEJIZW.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-XDMXV744.js} +12 -12
- package/{reporter-XBHCUW7W.js → reporter-K3D4AJBF.js} +6 -6
- package/{run-7GTWIFMV.js → run-MKEP7YKW.js} +10 -10
- package/{run-exec-VLSH5SOB.js → run-exec-Q7JNLVVV.js} +10 -10
- package/security-archive-src-update-expired.js +1 -1
- package/{setup-6O7RFGU2.js → setup-DYQY6DIX.js} +10 -10
- package/{src-EJSVFFXB.js → src-3MEJQYBG.js} +21 -7
- package/{src-6E7KCC7J.js → src-BZJHOEYT.js} +9 -9
- package/{src-U4MCZFJT.js → src-ODLA6WPY.js} +2 -2
- package/{token-NZ4HODXE.js → token-RUBMQURU.js} +4 -4
- package/{uninstall-KBZ6PJBG.js → uninstall-3NJXWOKS.js} +8 -8
- package/{unpublish-JBWSIBRX.js → unpublish-3ETADFWK.js} +4 -4
- package/{update-X4EC6MPP.js → update-L6ETRX6Q.js} +11 -11
- package/{version-QEHPAFAE.js → version-RHWAFXPK.js} +7 -7
- package/{view-WGGZTYAT.js → view-ABHAULFH.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-YDR7Q4VT.js} +4 -4
- package/chunk-7JK53T6G.js +0 -75
- package/chunk-KH3ERNCA.js +0 -783
|
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
generateDefaultHelp,
|
|
14
14
|
generateFullHelp
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BCANUHR3.js";
|
|
16
16
|
import {
|
|
17
17
|
flush,
|
|
18
18
|
trackCommand,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
} from "./chunk-JIQBZ2UT.js";
|
|
39
39
|
import {
|
|
40
40
|
defaultView
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-XU5WNX4S.js";
|
|
42
42
|
import {
|
|
43
43
|
emitter
|
|
44
44
|
} from "./chunk-U7TEQCBN.js";
|
|
@@ -1383,7 +1383,9 @@ var definition = j2.heading("Configuration").description(
|
|
|
1383
1383
|
- unpack: Unpack each package tarball, skipping the
|
|
1384
1384
|
global store.
|
|
1385
1385
|
|
|
1386
|
-
|
|
1386
|
+
A package is copied right before its install
|
|
1387
|
+
scripts run, so they don't change its files in the
|
|
1388
|
+
store.
|
|
1387
1389
|
An invalid \`VLT_STORE_LINKER\` warns and uses
|
|
1388
1390
|
\`unpack\`.`,
|
|
1389
1391
|
validOptions: storeLinkers,
|
|
@@ -13,14 +13,15 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XUGOPOLF.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-ADDCQBGR.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,61 @@ var buildIdealFromStartingGraph = async (options) => {
|
|
|
14076
14174
|
return options.graph;
|
|
14077
14175
|
};
|
|
14078
14176
|
|
|
14177
|
+
// ../../src/graph/src/ideal/prefetch-resolve.ts
|
|
14178
|
+
var nothing = () => {
|
|
14179
|
+
};
|
|
14180
|
+
var prefetchResolve = (graph, packageInfo, options) => {
|
|
14181
|
+
if (options.modifiers) return nothing;
|
|
14182
|
+
const registry2 = options.registry;
|
|
14183
|
+
if (!registry2) return nothing;
|
|
14184
|
+
const scopes = Object.keys(options["scoped-registries"] ?? {});
|
|
14185
|
+
const scoped = (name) => scopes.some((scope2) => name.startsWith(`${scope2}/`));
|
|
14186
|
+
const roots = [];
|
|
14187
|
+
const seen = /* @__PURE__ */ new Set();
|
|
14188
|
+
for (const importer of graph.importers) {
|
|
14189
|
+
const manifest = importer.manifest;
|
|
14190
|
+
if (!manifest) continue;
|
|
14191
|
+
for (const field of [
|
|
14192
|
+
"dependencies",
|
|
14193
|
+
"devDependencies",
|
|
14194
|
+
"optionalDependencies"
|
|
14195
|
+
]) {
|
|
14196
|
+
const deps = manifest[field];
|
|
14197
|
+
if (!deps) continue;
|
|
14198
|
+
for (const [name, spec2] of Object.entries(deps)) {
|
|
14199
|
+
if (typeof spec2 !== "string") continue;
|
|
14200
|
+
if (spec2.includes(":") || scoped(name)) continue;
|
|
14201
|
+
const edge = importer.edgesOut.get(name);
|
|
14202
|
+
if (edge?.to && edge.spec.bareSpec === spec2 && edge.valid())
|
|
14203
|
+
continue;
|
|
14204
|
+
const key = `${name}@${spec2}`;
|
|
14205
|
+
if (seen.has(key)) continue;
|
|
14206
|
+
seen.add(key);
|
|
14207
|
+
roots.push({ name, spec: spec2 });
|
|
14208
|
+
}
|
|
14209
|
+
}
|
|
14210
|
+
}
|
|
14211
|
+
if (!roots.length) return nothing;
|
|
14212
|
+
const have = [];
|
|
14213
|
+
for (const node of graph.nodes.values()) {
|
|
14214
|
+
if (node.manifest && node.name && node.version && !scoped(node.name)) {
|
|
14215
|
+
have.push(`${node.name}@${node.version}`);
|
|
14216
|
+
}
|
|
14217
|
+
}
|
|
14218
|
+
return packageInfo.prefetchResolve(registry2, {
|
|
14219
|
+
roots,
|
|
14220
|
+
have,
|
|
14221
|
+
...scopes.length ? { stop: { scopes } } : {},
|
|
14222
|
+
platform: {
|
|
14223
|
+
os: process.platform,
|
|
14224
|
+
cpu: process.arch,
|
|
14225
|
+
node: process.versions.node,
|
|
14226
|
+
// undefined never serializes, so no libc means the field is absent
|
|
14227
|
+
libc: detectLibc()
|
|
14228
|
+
}
|
|
14229
|
+
});
|
|
14230
|
+
};
|
|
14231
|
+
|
|
14079
14232
|
// ../../src/graph/src/ideal/build.ts
|
|
14080
14233
|
var getMap2 = (m) => m ?? /* @__PURE__ */ new Map();
|
|
14081
14234
|
var validateFileDepNode = (graph, id2) => {
|
|
@@ -14112,15 +14265,21 @@ var build3 = async (options) => {
|
|
|
14112
14265
|
monorepo
|
|
14113
14266
|
});
|
|
14114
14267
|
}
|
|
14115
|
-
const
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14268
|
+
const releaseResolve = prefetchResolve(graph, packageInfo, options);
|
|
14269
|
+
let res;
|
|
14270
|
+
try {
|
|
14271
|
+
res = await buildIdealFromStartingGraph({
|
|
14272
|
+
...options,
|
|
14273
|
+
scurry,
|
|
14274
|
+
add: getMap2(options.add),
|
|
14275
|
+
graph,
|
|
14276
|
+
packageInfo,
|
|
14277
|
+
remove: getMap2(options.remove),
|
|
14278
|
+
actual: options.actual
|
|
14279
|
+
});
|
|
14280
|
+
} finally {
|
|
14281
|
+
releaseResolve();
|
|
14282
|
+
}
|
|
14124
14283
|
done();
|
|
14125
14284
|
if (options.add) {
|
|
14126
14285
|
for (const [addKey2, value] of options.add.entries()) {
|
|
@@ -14138,63 +14297,13 @@ var build3 = async (options) => {
|
|
|
14138
14297
|
// ../../src/graph/src/reify/index.ts
|
|
14139
14298
|
import { availableParallelism as availableParallelism2 } from "node:os";
|
|
14140
14299
|
|
|
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
14300
|
// ../../src/cmd-shim/src/index.ts
|
|
14192
14301
|
import {
|
|
14193
|
-
chmod as
|
|
14302
|
+
chmod as chmod4,
|
|
14194
14303
|
mkdir as mkdir2,
|
|
14195
|
-
readFile as
|
|
14304
|
+
readFile as readFile3,
|
|
14196
14305
|
stat as stat2,
|
|
14197
|
-
writeFile as
|
|
14306
|
+
writeFile as writeFile3
|
|
14198
14307
|
} from "node:fs/promises";
|
|
14199
14308
|
import { dirname as dirname5, relative as relative2 } from "node:path";
|
|
14200
14309
|
|
|
@@ -14228,7 +14337,7 @@ var replaceDollarWithPercentPair = (value) => {
|
|
|
14228
14337
|
};
|
|
14229
14338
|
|
|
14230
14339
|
// ../../src/cmd-shim/src/read.ts
|
|
14231
|
-
import { lstat, readFile, readlink } from "node:fs/promises";
|
|
14340
|
+
import { lstat, readFile as readFile2, readlink } from "node:fs/promises";
|
|
14232
14341
|
import { dirname as dirname4, resolve as resolve8 } from "node:path";
|
|
14233
14342
|
|
|
14234
14343
|
// ../../src/cmd-shim/src/paths.ts
|
|
@@ -14280,7 +14389,7 @@ var readCmdShimIfExists = async (path2) => {
|
|
|
14280
14389
|
if (st.isSymbolicLink()) {
|
|
14281
14390
|
return resolve8(dirname4(path2), await readlink(path2));
|
|
14282
14391
|
}
|
|
14283
|
-
const contents = await
|
|
14392
|
+
const contents = await readFile2(path2);
|
|
14284
14393
|
const destination = extractPath(path2, contents.toString());
|
|
14285
14394
|
if (destination) return resolve8(dirname4(path2), destination);
|
|
14286
14395
|
} catch {
|
|
@@ -14305,7 +14414,7 @@ var writeShim = async (from, to, remover) => {
|
|
|
14305
14414
|
remover.rm(to + ".pwsh")
|
|
14306
14415
|
]);
|
|
14307
14416
|
await mkdir2(dirname5(to), { recursive: true });
|
|
14308
|
-
const data = await
|
|
14417
|
+
const data = await readFile3(from, "utf8").catch(() => "");
|
|
14309
14418
|
if (!data) {
|
|
14310
14419
|
return await writeShim_(from, to);
|
|
14311
14420
|
}
|
|
@@ -14420,16 +14529,16 @@ exit $LASTEXITCODE
|
|
|
14420
14529
|
`;
|
|
14421
14530
|
}
|
|
14422
14531
|
await Promise.all([
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14532
|
+
writeFile3(to + ".cmd", cmd, "utf8"),
|
|
14533
|
+
writeFile3(to + ".ps1", pwsh, "utf8"),
|
|
14534
|
+
writeFile3(to, sh, "utf8")
|
|
14426
14535
|
]);
|
|
14427
14536
|
await chmodShim(to);
|
|
14428
14537
|
};
|
|
14429
14538
|
var chmodShim = async (to) => await Promise.all([
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14539
|
+
chmod4(to, 493),
|
|
14540
|
+
chmod4(to + ".cmd", 493),
|
|
14541
|
+
chmod4(to + ".ps1", 493)
|
|
14433
14542
|
]);
|
|
14434
14543
|
|
|
14435
14544
|
// ../../src/graph/src/reify/add-edge.ts
|
|
@@ -15034,7 +15143,7 @@ var reify_ = async (options, diff2, remover, saveImportersPackageJson) => {
|
|
|
15034
15143
|
};
|
|
15035
15144
|
|
|
15036
15145
|
// ../../src/graph/src/install.ts
|
|
15037
|
-
import { existsSync as existsSync6, rmSync as
|
|
15146
|
+
import { existsSync as existsSync6, rmSync as rmSync4 } from "node:fs";
|
|
15038
15147
|
import { resolve as resolve13 } from "node:path";
|
|
15039
15148
|
|
|
15040
15149
|
// ../../src/graph/src/lockfile/format-options-change.ts
|
|
@@ -15054,7 +15163,7 @@ var formatOptionsChange = ({
|
|
|
15054
15163
|
}) => `${section}:${key === void 0 ? "" : ` ${key}`} ` + (from === void 0 ? "(missing)" : `"${redactUserinfo(from)}"`) + ` -> ${to === void 0 ? "(removed)" : `"${redactUserinfo(to)}"`}`;
|
|
15055
15164
|
|
|
15056
15165
|
// ../../src/graph/src/uninstall.ts
|
|
15057
|
-
import { existsSync as existsSync4, rmSync } from "node:fs";
|
|
15166
|
+
import { existsSync as existsSync4, rmSync as rmSync2 } from "node:fs";
|
|
15058
15167
|
import { resolve as resolve11 } from "node:path";
|
|
15059
15168
|
var uninstall = async (options, remove) => {
|
|
15060
15169
|
const mainManifest = options.packageJson.read(options.projectRoot);
|
|
@@ -15107,7 +15216,7 @@ var uninstall = async (options, remove) => {
|
|
|
15107
15216
|
"node_modules/.vlt-lock.json"
|
|
15108
15217
|
);
|
|
15109
15218
|
if (existsSync4(hiddenLockfile)) {
|
|
15110
|
-
|
|
15219
|
+
rmSync2(hiddenLockfile, { force: true });
|
|
15111
15220
|
}
|
|
15112
15221
|
} catch {
|
|
15113
15222
|
}
|
|
@@ -15116,7 +15225,7 @@ var uninstall = async (options, remove) => {
|
|
|
15116
15225
|
};
|
|
15117
15226
|
|
|
15118
15227
|
// ../../src/graph/src/update.ts
|
|
15119
|
-
import { existsSync as existsSync5, rmSync as
|
|
15228
|
+
import { existsSync as existsSync5, rmSync as rmSync3 } from "node:fs";
|
|
15120
15229
|
import { resolve as resolve12 } from "node:path";
|
|
15121
15230
|
var update = async (options) => {
|
|
15122
15231
|
let mainManifest = void 0;
|
|
@@ -15171,7 +15280,7 @@ var update = async (options) => {
|
|
|
15171
15280
|
"node_modules/.vlt-lock.json"
|
|
15172
15281
|
);
|
|
15173
15282
|
if (existsSync5(hiddenLockfile)) {
|
|
15174
|
-
|
|
15283
|
+
rmSync3(hiddenLockfile, { force: true });
|
|
15175
15284
|
}
|
|
15176
15285
|
} catch {
|
|
15177
15286
|
}
|
|
@@ -15471,7 +15580,7 @@ var install = async (options, add) => {
|
|
|
15471
15580
|
"node_modules/.vlt-lock.json"
|
|
15472
15581
|
);
|
|
15473
15582
|
if (existsSync6(hiddenLockfile)) {
|
|
15474
|
-
|
|
15583
|
+
rmSync4(hiddenLockfile, { force: true });
|
|
15475
15584
|
}
|
|
15476
15585
|
} catch {
|
|
15477
15586
|
}
|
|
@@ -15490,12 +15599,12 @@ export {
|
|
|
15490
15599
|
execFG,
|
|
15491
15600
|
runExec,
|
|
15492
15601
|
runExecFG,
|
|
15602
|
+
callLimit,
|
|
15493
15603
|
Query,
|
|
15494
15604
|
build2 as build,
|
|
15495
15605
|
jsonOutput,
|
|
15496
15606
|
humanReadableOutput,
|
|
15497
15607
|
mermaidOutput,
|
|
15498
|
-
callLimit,
|
|
15499
15608
|
findCmdShimIfExists,
|
|
15500
15609
|
RollbackRemove,
|
|
15501
15610
|
GraphModifier,
|
|
@@ -11,20 +11,20 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
install
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-ZZFFMXI2.js";
|
|
15
|
+
import "./chunk-XUGOPOLF.js";
|
|
16
16
|
import {
|
|
17
17
|
commandUsage
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-LHIDMYN2.js";
|
|
19
|
+
import "./chunk-INEKXXUQ.js";
|
|
20
20
|
import {
|
|
21
21
|
lazyView
|
|
22
22
|
} from "./chunk-4KCU2KZL.js";
|
|
23
23
|
import "./chunk-JIQBZ2UT.js";
|
|
24
24
|
import "./chunk-64VFL4WI.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-XU5WNX4S.js";
|
|
26
26
|
import "./chunk-HTOTG4TS.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-ADDCQBGR.js";
|
|
28
28
|
import "./chunk-U7TEQCBN.js";
|
|
29
29
|
import "./chunk-XNLSTHDK.js";
|
|
30
30
|
import "./chunk-PDWPFR5T.js";
|
|
@@ -63,7 +63,7 @@ var usage = () => commandUsage({
|
|
|
63
63
|
var views = {
|
|
64
64
|
json: (i) => i.graph.toJSON(),
|
|
65
65
|
human: lazyView(
|
|
66
|
-
async () => (await import("./reporter-
|
|
66
|
+
async () => (await import("./reporter-K3D4AJBF.js")).InstallReporter
|
|
67
67
|
)
|
|
68
68
|
};
|
|
69
69
|
var command = async (conf) => {
|
package/cli-package.json
CHANGED
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
kCustomInspect,
|
|
17
17
|
pairsToRecords,
|
|
18
18
|
recordsToPairs
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-35OBZITS.js";
|
|
20
|
+
import "./chunk-7DHDJ5XY.js";
|
|
21
|
+
import "./chunk-SRWDPPLX.js";
|
|
22
|
+
import "./chunk-INEKXXUQ.js";
|
|
23
23
|
import "./chunk-JIQBZ2UT.js";
|
|
24
24
|
import "./chunk-64VFL4WI.js";
|
|
25
25
|
import {
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
definition,
|
|
28
28
|
isRecordField,
|
|
29
29
|
recordFields
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-XU5WNX4S.js";
|
|
31
31
|
import "./chunk-HTOTG4TS.js";
|
|
32
32
|
import "./chunk-PBBULTAG.js";
|
|
33
33
|
import "./chunk-U7TEQCBN.js";
|