@vltpkg/cli-js 1.0.9 → 1.1.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-5DJJIIGD.js → access-GLWBGQLN.js} +41 -10
- package/{bugs-NRHU4ENC.js → bugs-OCQYFWFE.js} +18 -18
- package/{build-5VZJTEBD.js → build-CPWGNTCM.js} +7 -8
- package/{cache-QZ5XII4U.js → cache-SL7DQMY2.js} +20 -14
- package/chunk-2IMBYPYC.js +190 -0
- package/{chunk-5JFRXIK2.js → chunk-2PWSMJD7.js} +20 -1
- package/{chunk-LHMEJF6J.js → chunk-47M7IZ5P.js} +94 -39
- package/{chunk-6NQBG3ZR.js → chunk-6LEMBT22.js} +30 -5
- package/chunk-A75UYRJC.js +75 -0
- package/{chunk-HAYXR3MW.js → chunk-APMYKJI2.js} +1 -1
- package/{chunk-A6TBJ4AB.js → chunk-BUXPKRYB.js} +4 -4
- package/{chunk-PTR5IGFQ.js → chunk-CBASIDQH.js} +1 -1
- package/{chunk-XISRK3R5.js → chunk-CEHPRPGQ.js} +38 -0
- package/{chunk-KCXN2GTX.js → chunk-CF5EGH4W.js} +12 -2
- package/{chunk-HRY5MJCA.js → chunk-CTQSUNNE.js} +35 -19
- package/{chunk-ATYE2HQV.js → chunk-GJGQTRAT.js} +165 -30
- package/{chunk-YAIKXFLN.js → chunk-HYCYL4RX.js} +1 -1
- package/{chunk-EBXBZ2Y5.js → chunk-J2XWQVDK.js} +98 -6
- package/{chunk-SBEZ7RUC.js → chunk-JSQUYHU7.js} +5 -5
- package/{chunk-GKCU7R4B.js → chunk-S6Y57MUS.js} +4 -4
- package/chunk-SNOBGFNM.js +129 -0
- package/{chunk-MXCWH7WC.js → chunk-TNEMFBP5.js} +41 -10
- package/{chunk-USRMYD4F.js → chunk-TUXWDPCQ.js} +1 -1
- package/{chunk-2HDWM6AD.js → chunk-TXTK2PKN.js} +2 -2
- package/{chunk-LPIBYUMT.js → chunk-U7TEQCBN.js} +27 -1
- package/{chunk-XFI4THXZ.js → chunk-WE2TQN32.js} +1 -1
- package/{chunk-USTJECVS.js → chunk-X2AWQGYG.js} +1 -1
- package/{chunk-6WMR7BLF.js → chunk-YKCGWKUE.js} +3 -3
- package/{chunk-2YJ5MESP.js → chunk-ZDQJWRCU.js} +1 -1
- package/{ci-MBYD4AGJ.js → ci-O2RSLTBX.js} +9 -10
- package/cli-package.json +1 -1
- package/{config-DTZ7EWQF.js → config-ZBIF32GS.js} +11 -11
- package/{config-RQKPUW5B.js → config-ZPH7V77F.js} +8 -6
- package/{create-CYTNZ66Z.js → create-2JX4RV5U.js} +17 -17
- package/{deprecate-H3L4MPZS.js → deprecate-XJLP2TUW.js} +21 -18
- package/{dist-tag-CZHTW7C6.js → dist-tag-F6ZFWGQU.js} +23 -25
- package/{docs-Z76UCNLH.js → docs-IJCZZ4V6.js} +18 -18
- package/{exec-PGPFYCAM.js → exec-IWSS2LUA.js} +17 -17
- package/{exec-cache-HPILZWUY.js → exec-cache-AG77OOEE.js} +15 -15
- package/{exec-local-VKDC6XAQ.js → exec-local-QXPWC4QG.js} +13 -14
- package/{help-QPZESL4Y.js → help-TGNDNWLP.js} +4 -4
- package/{init-MMQV6UC5.js → init-WU7BRPKR.js} +7 -8
- package/{install-KZPDV66V.js → install-74XKB5N7.js} +37 -14
- package/{list-PJ2U4FE7.js → list-TOEC6Q3A.js} +41 -29
- package/{login-L3D5FQGT.js → login-WJYMAFSL.js} +11 -11
- package/{logout-SRZ574SQ.js → logout-MTRQWI3L.js} +7 -7
- package/{pack-OI5JLA3R.js → pack-FFWGLSNC.js} +11 -12
- package/package.json +1 -1
- package/{ping-VQ662NAP.js → ping-DWUVTCJB.js} +7 -7
- package/{pkg-HNPRMTWV.js → pkg-KNZW5FIA.js} +10 -11
- package/{profile-Z7IOODZ4.js → profile-6W2ABNXL.js} +20 -7
- package/{publish-KTUUX25U.js → publish-HGNUONU3.js} +35 -65
- package/{query-MV5HKRIT.js → query-FSCYPETX.js} +35 -23
- package/{registry-BMWXMQS4.js → registry-YTJZ3AQD.js} +3 -3
- package/registry-client-package.json +6 -1
- package/registry-client-src-revalidate.js +241 -43
- package/{repo-ZBCD65WE.js → repo-OVIKYYWA.js} +18 -18
- package/{reporter-SDMDYYMJ.js → reporter-ZW7OMRZT.js} +23 -1
- package/{run-QJK5LA6Q.js → run-UPV3RPQJ.js} +13 -14
- package/{run-exec-EAASMT5O.js → run-exec-YJSMWMMP.js} +13 -14
- package/{setup-Q7NTAV26.js → setup-7DPMAPUY.js} +20 -19
- package/{src-YVODDQYK.js → src-BNCFK4FH.js} +15 -15
- package/{src-MEEFRFWA.js → src-XJT4IJSV.js} +11 -4
- package/{token-NQRHTTKG.js → token-GA73ER5V.js} +8 -8
- package/{uninstall-E2SVGYI3.js → uninstall-E3VKSC3B.js} +11 -11
- package/{unpublish-IE4KYVM4.js → unpublish-Q6MQHBPQ.js} +43 -40
- package/{update-KZOWARII.js → update-4CC44TR5.js} +34 -12
- package/{version-T6PTPZPR.js → version-CRZBXNDG.js} +23 -18
- package/{view-MVYV7YZ2.js → view-ILUULGSO.js} +9 -9
- 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-A5RM2Z7Z.js → whoami-Z4TSLYTR.js} +28 -12
- package/chunk-UBLFPJHV.js +0 -40
- package/chunk-XEPCV7DP.js +0 -75
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZDQJWRCU.js";
|
|
17
17
|
import {
|
|
18
18
|
Monorepo,
|
|
19
19
|
PackageJson,
|
|
20
20
|
getUser,
|
|
21
21
|
minimatch,
|
|
22
22
|
platformCheck
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-X2AWQGYG.js";
|
|
24
24
|
import {
|
|
25
25
|
asDepID,
|
|
26
26
|
baseDepID,
|
|
@@ -44,11 +44,9 @@ import {
|
|
|
44
44
|
walkUp
|
|
45
45
|
} from "./chunk-HTOTG4TS.js";
|
|
46
46
|
import {
|
|
47
|
+
graphStep,
|
|
47
48
|
promiseSpawn
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import {
|
|
50
|
-
graphStep
|
|
51
|
-
} from "./chunk-UBLFPJHV.js";
|
|
49
|
+
} from "./chunk-U7TEQCBN.js";
|
|
52
50
|
import {
|
|
53
51
|
Spec,
|
|
54
52
|
Version,
|
|
@@ -5388,7 +5386,7 @@ var runImpl = async (options, execImpl, empty2) => {
|
|
|
5388
5386
|
...execArgs
|
|
5389
5387
|
} = options;
|
|
5390
5388
|
const pjPath = resolve2(options.cwd, "package.json");
|
|
5391
|
-
const untrustworthy = !!(manifest
|
|
5389
|
+
const untrustworthy = !!manifest && (manifest.gypfile === true && arg0 === "install" && manifest.scripts?.install === "node-gyp rebuild" || manifest.hasInstallScript === true && !manifest.scripts);
|
|
5392
5390
|
const pj = (untrustworthy ? void 0 : manifest) ?? packageJson.read(options.cwd);
|
|
5393
5391
|
const { scripts: scripts2 } = pj;
|
|
5394
5392
|
const command = scripts2?.[arg0] ?? // npm's implicit install behavior: "If there is a binding.gyp file in the
|
|
@@ -5740,6 +5738,39 @@ var parse2 = (query) => {
|
|
|
5740
5738
|
return (0, import_postcss_selector_parser.default)(transformAst).astSync(escapedQuery);
|
|
5741
5739
|
};
|
|
5742
5740
|
|
|
5741
|
+
// ../../src/query/src/error.ts
|
|
5742
|
+
var selectorText = (node) => {
|
|
5743
|
+
const text = node.toString === Object.prototype.toString ? "" : String(node).trim().replace(/\\(.)/g, "$1");
|
|
5744
|
+
return text || (node.value ?? node.type);
|
|
5745
|
+
};
|
|
5746
|
+
var queryError = (message, node, extra) => error(message, {
|
|
5747
|
+
code: "EQUERY",
|
|
5748
|
+
found: selectorText(node),
|
|
5749
|
+
...extra
|
|
5750
|
+
});
|
|
5751
|
+
var distance = (a, b, max) => {
|
|
5752
|
+
if (Math.abs(a.length - b.length) > max) return max + 1;
|
|
5753
|
+
let prev = Array.from({ length: b.length + 1 }, (_, i) => i);
|
|
5754
|
+
for (let i = 1; i <= a.length; i++) {
|
|
5755
|
+
const row = [i];
|
|
5756
|
+
let best = i;
|
|
5757
|
+
for (let j = 1; j <= b.length; j++) {
|
|
5758
|
+
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
|
|
5759
|
+
const d = Math.min(
|
|
5760
|
+
(row[j - 1] ?? 0) + 1,
|
|
5761
|
+
(prev[j] ?? 0) + 1,
|
|
5762
|
+
(prev[j - 1] ?? 0) + cost
|
|
5763
|
+
);
|
|
5764
|
+
row.push(d);
|
|
5765
|
+
if (d < best) best = d;
|
|
5766
|
+
}
|
|
5767
|
+
if (best > max) return max + 1;
|
|
5768
|
+
prev = row;
|
|
5769
|
+
}
|
|
5770
|
+
return prev[b.length] ?? max + 1;
|
|
5771
|
+
};
|
|
5772
|
+
var didYouMean = (value, candidates, max = 2) => [...candidates].map((c) => [c, distance(value, c, max)]).filter(([, d]) => d <= max).sort(([a, x], [b, y]) => x - y || a.localeCompare(b, "en")).map(([c]) => c);
|
|
5773
|
+
|
|
5743
5774
|
// ../../src/query/src/pseudo/helpers.ts
|
|
5744
5775
|
var removeNode = (state, node) => {
|
|
5745
5776
|
for (const edge of node.edgesIn) {
|
|
@@ -5898,9 +5929,11 @@ var attribute = async (state) => {
|
|
|
5898
5929
|
if (state.loose) {
|
|
5899
5930
|
return state;
|
|
5900
5931
|
}
|
|
5901
|
-
throw
|
|
5902
|
-
|
|
5903
|
-
|
|
5932
|
+
throw queryError(
|
|
5933
|
+
`Unsupported attribute operator: ${curr.operator}`,
|
|
5934
|
+
state.current,
|
|
5935
|
+
{ validOptions: [...attributeSelectorsMap.keys()] }
|
|
5936
|
+
);
|
|
5904
5937
|
}
|
|
5905
5938
|
const value = curr.value || "";
|
|
5906
5939
|
const propertyName = curr.attribute;
|
|
@@ -5985,9 +6018,11 @@ var combinator = async (state) => {
|
|
|
5985
6018
|
if (state.loose) {
|
|
5986
6019
|
return state;
|
|
5987
6020
|
}
|
|
5988
|
-
throw
|
|
5989
|
-
|
|
5990
|
-
|
|
6021
|
+
throw queryError(
|
|
6022
|
+
`Unsupported combinator: ${state.current.value}`,
|
|
6023
|
+
state.current,
|
|
6024
|
+
{ validOptions: [...combinatorSelectorsMap.keys()] }
|
|
6025
|
+
);
|
|
5991
6026
|
}
|
|
5992
6027
|
return parserFn(state);
|
|
5993
6028
|
};
|
|
@@ -7442,6 +7477,7 @@ var score = async (state) => {
|
|
|
7442
7477
|
var nodeNeedsBuild = (node) => {
|
|
7443
7478
|
const { manifest } = node;
|
|
7444
7479
|
if (!manifest) return false;
|
|
7480
|
+
if (manifest.hasInstallScript) return true;
|
|
7445
7481
|
const { scripts: scripts2 = {} } = manifest;
|
|
7446
7482
|
const runInstall = !!(scripts2.install || scripts2.preinstall || scripts2.postinstall);
|
|
7447
7483
|
if (runInstall) return true;
|
|
@@ -8432,6 +8468,9 @@ var pseudoSelectors = new Map(
|
|
|
8432
8468
|
workspace
|
|
8433
8469
|
})
|
|
8434
8470
|
);
|
|
8471
|
+
var pseudoSelectorNames = new Set(
|
|
8472
|
+
pseudoSelectors.keys()
|
|
8473
|
+
);
|
|
8435
8474
|
var pseudo = async (state) => {
|
|
8436
8475
|
await state.cancellable();
|
|
8437
8476
|
const curr = asPseudoNode(state.current);
|
|
@@ -8442,9 +8481,15 @@ var pseudo = async (state) => {
|
|
|
8442
8481
|
state.partial.nodes.clear();
|
|
8443
8482
|
return state;
|
|
8444
8483
|
}
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8484
|
+
const name = selectorText(state.current).replace(/^:/, "").replace(/\(.*$/s, "");
|
|
8485
|
+
const suggestions = didYouMean(name, pseudoSelectorNames).map(
|
|
8486
|
+
(n) => `:${n}`
|
|
8487
|
+
);
|
|
8488
|
+
throw queryError(
|
|
8489
|
+
`Unsupported pseudo-class: ${state.current.value}`,
|
|
8490
|
+
state.current,
|
|
8491
|
+
suggestions.length > 1 ? { validOptions: suggestions } : { wanted: suggestions[0] }
|
|
8492
|
+
);
|
|
8448
8493
|
}
|
|
8449
8494
|
const result = await parserFn(state);
|
|
8450
8495
|
const pseudoValue = curr.value.slice(1);
|
|
@@ -8456,11 +8501,18 @@ var pseudo = async (state) => {
|
|
|
8456
8501
|
|
|
8457
8502
|
// ../../src/query/src/index.ts
|
|
8458
8503
|
var noopFn = async (state) => state;
|
|
8504
|
+
var unsupportedName = (state) => {
|
|
8505
|
+
const text = selectorText(state.current);
|
|
8506
|
+
const name = text.replace(/^[.#]/, "");
|
|
8507
|
+
return queryError("Unsupported selector", state.current, {
|
|
8508
|
+
wanted: pseudoSelectorNames.has(name) ? `:${name}` : name ? `#${name}` : void 0
|
|
8509
|
+
});
|
|
8510
|
+
};
|
|
8459
8511
|
var selectors = {
|
|
8460
8512
|
attribute,
|
|
8461
|
-
/* c8 ignore start */
|
|
8513
|
+
/* c8 ignore start -- dss-parser reports `.foo` as an escaped tag */
|
|
8462
8514
|
class: async (state) => {
|
|
8463
|
-
throw
|
|
8515
|
+
throw unsupportedName(state);
|
|
8464
8516
|
},
|
|
8465
8517
|
/* c8 ignore end */
|
|
8466
8518
|
combinator,
|
|
@@ -8482,11 +8534,11 @@ var selectors = {
|
|
|
8482
8534
|
return state;
|
|
8483
8535
|
},
|
|
8484
8536
|
string: async (state) => {
|
|
8485
|
-
throw
|
|
8537
|
+
throw queryError("Unsupported selector", state.current);
|
|
8486
8538
|
},
|
|
8487
8539
|
tag: async (state) => {
|
|
8488
8540
|
if (state.current.value !== "{" && state.current.value !== "}") {
|
|
8489
|
-
throw
|
|
8541
|
+
throw unsupportedName(state);
|
|
8490
8542
|
}
|
|
8491
8543
|
return state;
|
|
8492
8544
|
},
|
|
@@ -8502,11 +8554,9 @@ var walk = async (state) => {
|
|
|
8502
8554
|
if (state.loose) {
|
|
8503
8555
|
return state;
|
|
8504
8556
|
}
|
|
8505
|
-
throw
|
|
8557
|
+
throw queryError(
|
|
8506
8558
|
`Missing parser for query node: ${state.current.type}`,
|
|
8507
|
-
|
|
8508
|
-
found: state.current
|
|
8509
|
-
}
|
|
8559
|
+
state.current
|
|
8510
8560
|
);
|
|
8511
8561
|
}
|
|
8512
8562
|
state = await parserFn(state);
|
|
@@ -10434,7 +10484,7 @@ var load4 = (options) => {
|
|
|
10434
10484
|
);
|
|
10435
10485
|
}
|
|
10436
10486
|
modifiers?.rollbackActiveEntries();
|
|
10437
|
-
if (scurry.cwd.resolve("node_modules").lstatSync()?.isDirectory()) {
|
|
10487
|
+
if (scurry.cwd.resolve("node_modules/.vlt").lstatSync()?.isDirectory()) {
|
|
10438
10488
|
saveHidden({
|
|
10439
10489
|
...options,
|
|
10440
10490
|
graph
|
|
@@ -10518,6 +10568,9 @@ var makeExecutable = async (path2) => {
|
|
|
10518
10568
|
await chmod2(path2, execMode);
|
|
10519
10569
|
};
|
|
10520
10570
|
|
|
10571
|
+
// ../../src/graph/src/reify/scripts-manifest.ts
|
|
10572
|
+
var scriptsManifest = (manifest, dir, packageJson) => manifest.hasInstallScript && !manifest.scripts ? packageJson.read(dir) : manifest;
|
|
10573
|
+
|
|
10521
10574
|
// ../../src/graph/src/reify/build.ts
|
|
10522
10575
|
var build = async (diff2, packageJson, scurry, allowScriptsNodes) => {
|
|
10523
10576
|
const graph = diff2.to;
|
|
@@ -10557,8 +10610,9 @@ var build = async (diff2, packageJson, scurry, allowScriptsNodes) => {
|
|
|
10557
10610
|
return res;
|
|
10558
10611
|
};
|
|
10559
10612
|
var visit = async (packageJson, scurry, node, signal, _path) => {
|
|
10560
|
-
|
|
10561
|
-
|
|
10613
|
+
const dir = node.resolvedLocation(scurry);
|
|
10614
|
+
node.manifest ??= packageJson.read(dir);
|
|
10615
|
+
const manifest = scriptsManifest(node.manifest, dir, packageJson);
|
|
10562
10616
|
const { scripts: scripts2 = {} } = manifest;
|
|
10563
10617
|
const {
|
|
10564
10618
|
install: install2,
|
|
@@ -10781,10 +10835,12 @@ var build2 = async (options) => {
|
|
|
10781
10835
|
scurry,
|
|
10782
10836
|
targetFilteredNodes
|
|
10783
10837
|
);
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10838
|
+
if (scurry.lstatSync(scurry.resolve(projectRoot, "node_modules/.vlt"))?.isDirectory()) {
|
|
10839
|
+
saveHidden({
|
|
10840
|
+
...options,
|
|
10841
|
+
graph: actualGraph
|
|
10842
|
+
});
|
|
10843
|
+
}
|
|
10788
10844
|
return buildResult;
|
|
10789
10845
|
};
|
|
10790
10846
|
|
|
@@ -14404,14 +14460,13 @@ var deleteEdges = (diff2, scurry, remover) => {
|
|
|
14404
14460
|
import { join as join3 } from "node:path";
|
|
14405
14461
|
var nodeNeedsBuild2 = (node, scurry, packageJson) => {
|
|
14406
14462
|
if (node.built) return false;
|
|
14407
|
-
let manifest
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
}
|
|
14463
|
+
let manifest;
|
|
14464
|
+
try {
|
|
14465
|
+
const dir = node.resolvedLocation(scurry);
|
|
14466
|
+
node.manifest ??= packageJson.read(dir);
|
|
14467
|
+
manifest = scriptsManifest(node.manifest, dir, packageJson);
|
|
14468
|
+
} catch {
|
|
14469
|
+
return false;
|
|
14415
14470
|
}
|
|
14416
14471
|
const { scripts: scripts2 = {} } = manifest;
|
|
14417
14472
|
const runInstall = !!(scripts2.install || scripts2.preinstall || scripts2.postinstall);
|
|
@@ -13,14 +13,39 @@ import {
|
|
|
13
13
|
actual,
|
|
14
14
|
callLimit,
|
|
15
15
|
createVirtualRoot
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-47M7IZ5P.js";
|
|
17
17
|
import {
|
|
18
18
|
SecurityArchive
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZDQJWRCU.js";
|
|
20
20
|
import {
|
|
21
21
|
error
|
|
22
22
|
} from "./chunk-WZWDS3W4.js";
|
|
23
23
|
|
|
24
|
+
// ../../src/cli-sdk/src/is-vlt-installed.ts
|
|
25
|
+
import { lstatSync } from "node:fs";
|
|
26
|
+
import { resolve } from "node:path";
|
|
27
|
+
var lstat = (path) => {
|
|
28
|
+
try {
|
|
29
|
+
return lstatSync(path, { throwIfNoEntry: false });
|
|
30
|
+
} catch {
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var isDir = (path) => !!lstat(path)?.isDirectory();
|
|
35
|
+
var isFile = (path) => !!lstat(path)?.isFile();
|
|
36
|
+
var isVltInstalled = (projectRoot) => isDir(resolve(projectRoot, "node_modules/.vlt")) || isFile(resolve(projectRoot, "node_modules/.vlt-lock.json"));
|
|
37
|
+
var assertVltInstalled = (projectRoot, command) => {
|
|
38
|
+
if (isVltInstalled(projectRoot)) return;
|
|
39
|
+
const nodeModules = resolve(projectRoot, "node_modules");
|
|
40
|
+
const hint = isDir(nodeModules) ? `run \`vlt install\` to rebuild it before running \`vlt ${command}\`` : `run \`vlt install\` before running \`vlt ${command}\``;
|
|
41
|
+
throw error(`No vlt install found in ${nodeModules}
|
|
42
|
+
|
|
43
|
+
${hint}`, {
|
|
44
|
+
code: "EQUERY",
|
|
45
|
+
path: nodeModules
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
24
49
|
// ../../src/cli-sdk/src/query-host-contexts.ts
|
|
25
50
|
import { homedir as homedir2 } from "node:os";
|
|
26
51
|
import { parse, posix } from "node:path";
|
|
@@ -115,7 +140,7 @@ var reloadConfig = async (folder) => {
|
|
|
115
140
|
unload("project");
|
|
116
141
|
} catch {
|
|
117
142
|
}
|
|
118
|
-
const { Config } = await import("./config-
|
|
143
|
+
const { Config } = await import("./config-ZPH7V77F.js");
|
|
119
144
|
return Config.load(folder, process.argv, true);
|
|
120
145
|
};
|
|
121
146
|
|
|
@@ -126,7 +151,6 @@ try {
|
|
|
126
151
|
} catch {
|
|
127
152
|
}
|
|
128
153
|
var home2 = foundHome ?? posix.dirname(posix.format(parse(process.cwd())));
|
|
129
|
-
var isVltInstalled = (folder) => !!folder.resolve("node_modules/.vlt").lstatSync()?.isDirectory() || !!folder.resolve("node_modules/.vlt-lock.json").lstatSync()?.isFile();
|
|
130
154
|
var getPossibleProjectKeys = (folder, scurry) => {
|
|
131
155
|
const relativePath = posix.relative(
|
|
132
156
|
scurry.cwd.fullpathPosix(),
|
|
@@ -196,7 +220,7 @@ var createHostContextsMap = async (conf) => {
|
|
|
196
220
|
for (const folder of projectFolders) {
|
|
197
221
|
try {
|
|
198
222
|
const config = await reloadConfig(folder.fullpath());
|
|
199
|
-
if (!isVltInstalled(folder)) {
|
|
223
|
+
if (!isVltInstalled(folder.fullpath())) {
|
|
200
224
|
continue;
|
|
201
225
|
}
|
|
202
226
|
const graph = actual.load({
|
|
@@ -234,5 +258,6 @@ var createHostContextsMap = async (conf) => {
|
|
|
234
258
|
};
|
|
235
259
|
|
|
236
260
|
export {
|
|
261
|
+
assertVltInstalled,
|
|
237
262
|
createHostContextsMap
|
|
238
263
|
};
|
|
@@ -0,0 +1,75 @@
|
|
|
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/access.ts": () => import("./access-GLWBGQLN.js"),
|
|
22
|
+
"./commands/bugs.ts": () => import("./bugs-OCQYFWFE.js"),
|
|
23
|
+
"./commands/build.ts": () => import("./build-CPWGNTCM.js"),
|
|
24
|
+
"./commands/cache.ts": () => import("./cache-SL7DQMY2.js"),
|
|
25
|
+
"./commands/ci.ts": () => import("./ci-O2RSLTBX.js"),
|
|
26
|
+
"./commands/config.ts": () => import("./config-ZBIF32GS.js"),
|
|
27
|
+
"./commands/create.ts": () => import("./create-2JX4RV5U.js"),
|
|
28
|
+
"./commands/deprecate.ts": () => import("./deprecate-XJLP2TUW.js"),
|
|
29
|
+
"./commands/dist-tag.ts": () => import("./dist-tag-F6ZFWGQU.js"),
|
|
30
|
+
"./commands/docs.ts": () => import("./docs-IJCZZ4V6.js"),
|
|
31
|
+
"./commands/exec-cache.ts": () => import("./exec-cache-AG77OOEE.js"),
|
|
32
|
+
"./commands/exec-local.ts": () => import("./exec-local-QXPWC4QG.js"),
|
|
33
|
+
"./commands/exec.ts": () => import("./exec-IWSS2LUA.js"),
|
|
34
|
+
"./commands/help.ts": () => import("./help-TGNDNWLP.js"),
|
|
35
|
+
"./commands/init.ts": () => import("./init-WU7BRPKR.js"),
|
|
36
|
+
"./commands/install.ts": () => import("./install-74XKB5N7.js"),
|
|
37
|
+
"./commands/install/reporter.ts": () => import("./reporter-ZW7OMRZT.js"),
|
|
38
|
+
"./commands/list.ts": () => import("./list-TOEC6Q3A.js"),
|
|
39
|
+
"./commands/login.ts": () => import("./login-WJYMAFSL.js"),
|
|
40
|
+
"./commands/logout.ts": () => import("./logout-MTRQWI3L.js"),
|
|
41
|
+
"./commands/pack.ts": () => import("./pack-FFWGLSNC.js"),
|
|
42
|
+
"./commands/ping.ts": () => import("./ping-DWUVTCJB.js"),
|
|
43
|
+
"./commands/pkg.ts": () => import("./pkg-KNZW5FIA.js"),
|
|
44
|
+
"./commands/profile.ts": () => import("./profile-6W2ABNXL.js"),
|
|
45
|
+
"./commands/publish.ts": () => import("./publish-HGNUONU3.js"),
|
|
46
|
+
"./commands/query.ts": () => import("./query-FSCYPETX.js"),
|
|
47
|
+
"./commands/registry.ts": () => import("./registry-YTJZ3AQD.js"),
|
|
48
|
+
"./commands/repo.ts": () => import("./repo-OVIKYYWA.js"),
|
|
49
|
+
"./commands/run-exec.ts": () => import("./run-exec-YJSMWMMP.js"),
|
|
50
|
+
"./commands/run.ts": () => import("./run-UPV3RPQJ.js"),
|
|
51
|
+
"./commands/setup.ts": () => import("./setup-7DPMAPUY.js"),
|
|
52
|
+
"./commands/token.ts": () => import("./token-GA73ER5V.js"),
|
|
53
|
+
"./commands/uninstall.ts": () => import("./uninstall-E3VKSC3B.js"),
|
|
54
|
+
"./commands/unpublish.ts": () => import("./unpublish-Q6MQHBPQ.js"),
|
|
55
|
+
"./commands/update.ts": () => import("./update-4CC44TR5.js"),
|
|
56
|
+
"./commands/version.ts": () => import("./version-CRZBXNDG.js"),
|
|
57
|
+
"./commands/view.ts": () => import("./view-ILUULGSO.js"),
|
|
58
|
+
"./commands/whoami.ts": () => import("./whoami-Z4TSLYTR.js")
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// ../../src/cli-sdk/src/load-command.ts
|
|
62
|
+
var loadCommand = async (command) => {
|
|
63
|
+
try {
|
|
64
|
+
return await globImport_commands_ts(`./commands/${command}.ts`);
|
|
65
|
+
} catch (e) {
|
|
66
|
+
throw error("Could not load command", {
|
|
67
|
+
found: command,
|
|
68
|
+
cause: e
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
loadCommand
|
|
75
|
+
};
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
} from "./chunk-RIYFGX27.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6LEMBT22.js";
|
|
18
18
|
import {
|
|
19
19
|
stderr,
|
|
20
20
|
stdout,
|
|
21
21
|
styleTextStdout
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TNEMFBP5.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-47M7IZ5P.js";
|
|
31
31
|
import {
|
|
32
32
|
Monorepo
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-X2AWQGYG.js";
|
|
34
34
|
import {
|
|
35
35
|
isErrorWithCause
|
|
36
36
|
} from "./chunk-VFBCWAOC.js";
|
|
@@ -1203,6 +1203,10 @@ var definition = j2.heading("Configuration").description(
|
|
|
1203
1203
|
|
|
1204
1204
|
Command-specific fields may be set in a nested \`command\` object that
|
|
1205
1205
|
overrides any options defined at the top level.
|
|
1206
|
+
|
|
1207
|
+
Object type values given in the environment or on the command line
|
|
1208
|
+
are merged key by key over the config files (command line wins over
|
|
1209
|
+
environment); other values replace them.
|
|
1206
1210
|
`
|
|
1207
1211
|
).flag({
|
|
1208
1212
|
color: {
|
|
@@ -1266,6 +1270,12 @@ var definition = j2.heading("Configuration").description(
|
|
|
1266
1270
|
alias must be configured (e.g. via \`vlt setup\`) before it
|
|
1267
1271
|
can be used. The \`gh\` and \`jsr\` aliases have built-in
|
|
1268
1272
|
defaults that can be overridden here.
|
|
1273
|
+
|
|
1274
|
+
Aliases given on the command line or in
|
|
1275
|
+
\`VLT_REGISTRIES\` (newline-delimited) merge with the
|
|
1276
|
+
configured ones, later sources winning per key. Pass
|
|
1277
|
+
\`--save-config\` to \`install\`, \`add\` or
|
|
1278
|
+
\`update\` to save them to \`vlt.json\`.
|
|
1269
1279
|
`
|
|
1270
1280
|
},
|
|
1271
1281
|
"scoped-registries": {
|
|
@@ -1689,6 +1699,17 @@ var definition = j2.heading("Configuration").description(
|
|
|
1689
1699
|
This is useful if a package already exists in
|
|
1690
1700
|
devDependencies or optionalDependencies, but you want to
|
|
1691
1701
|
move it to be a non-optional production dependency.`
|
|
1702
|
+
},
|
|
1703
|
+
"save-config": {
|
|
1704
|
+
description: `Save the registry and git host options given on the
|
|
1705
|
+
command line or via \`VLT_*\` env (\`--registry\`,
|
|
1706
|
+
\`--registries\`, \`--default-registry-alias\`,
|
|
1707
|
+
\`--scoped-registries\`, \`--jsr-registries\`,
|
|
1708
|
+
\`--git-hosts\`, \`--git-host-archives\`) to the
|
|
1709
|
+
project \`vlt.json\` (or the user one with
|
|
1710
|
+
\`--config=user\`) after a successful \`install\`,
|
|
1711
|
+
\`add\` or \`update\`. Values a config file already
|
|
1712
|
+
has are left alone.`
|
|
1692
1713
|
}
|
|
1693
1714
|
}).opt({
|
|
1694
1715
|
"save-prefix": {
|
|
@@ -1745,6 +1766,23 @@ var definition = j2.heading("Configuration").description(
|
|
|
1745
1766
|
description: "Set the access level of the package",
|
|
1746
1767
|
validOptions: ["public", "restricted"]
|
|
1747
1768
|
}
|
|
1769
|
+
}).flag({
|
|
1770
|
+
"git-tag-version": {
|
|
1771
|
+
description: `Commit and tag the version change made by \`vlt version\`.
|
|
1772
|
+
|
|
1773
|
+
Set \`--no-git-tag-version\` to bump the version in
|
|
1774
|
+
\`package.json\` without touching git at all, so that a
|
|
1775
|
+
series of bumps can be committed together.`,
|
|
1776
|
+
default: true
|
|
1777
|
+
},
|
|
1778
|
+
commit: {
|
|
1779
|
+
description: `Create the version commit in \`vlt version\`.
|
|
1780
|
+
|
|
1781
|
+
Set \`--no-commit\` to leave the bumped \`package.json\`
|
|
1782
|
+
uncommitted while still creating the git tag. Implied by
|
|
1783
|
+
\`--no-git-tag-version\`.`,
|
|
1784
|
+
default: true
|
|
1785
|
+
}
|
|
1748
1786
|
}).opt({
|
|
1749
1787
|
otp: {
|
|
1750
1788
|
description: `Provide an OTP to use when publishing a package.`
|
|
@@ -9,10 +9,13 @@ 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
|
+
asUnknownSpecPrefix
|
|
14
|
+
} from "./chunk-2PWSMJD7.js";
|
|
12
15
|
import {
|
|
13
16
|
addKey,
|
|
14
17
|
asDependency
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-47M7IZ5P.js";
|
|
16
19
|
import {
|
|
17
20
|
joinDepIDTuple,
|
|
18
21
|
splitDepID
|
|
@@ -65,6 +68,13 @@ var rebaseFileSpec = (spec, importerPath, scurryCwd, specOptions, monorepo) => {
|
|
|
65
68
|
if (rebasedPath === spec.file) return spec;
|
|
66
69
|
return Spec.parseArgs(rebasedPath, specOptions);
|
|
67
70
|
};
|
|
71
|
+
var parseArg = (item, options) => {
|
|
72
|
+
try {
|
|
73
|
+
return Spec.parseArgs(item, options);
|
|
74
|
+
} catch (er) {
|
|
75
|
+
throw asUnknownSpecPrefix(er);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
68
78
|
var parseAddArgs = (config, scurry, monorepo) => {
|
|
69
79
|
const add = new AddImportersDependenciesMapImpl();
|
|
70
80
|
const items = config.positionals;
|
|
@@ -74,7 +84,7 @@ var parseAddArgs = (config, scurry, monorepo) => {
|
|
|
74
84
|
const parsedItems = [];
|
|
75
85
|
let hasFileSpecs = false;
|
|
76
86
|
for (const item of items) {
|
|
77
|
-
const spec =
|
|
87
|
+
const spec = parseArg(item, specOptions);
|
|
78
88
|
parsedItems.push({ spec, type });
|
|
79
89
|
if (spec.type === "file") hasFileSpecs = true;
|
|
80
90
|
add.modifiedDependencies = true;
|