vite-plus 1.3.0 → 1.4.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/AGENTS.md +4 -0
- package/LICENSE +1 -878
- package/README.md +1 -1
- package/bin/vpx +9 -0
- package/binding/index.cjs +59 -54
- package/binding/index.d.cts +128 -2
- package/dist/{agent-97KmGCyL.js → agent-D8oxxhVR.js} +5 -7
- package/dist/bin.js +25 -32
- package/dist/{cli-parse-DHE8NrBU.js → cli-parse-aeUeFDlC.js} +2 -3
- package/dist/command-TjS_6y9O.js +1 -0
- package/dist/{command-CdMBoZFD.js → command-rY79K5NI.js} +28 -30
- package/dist/{comparison-CmVirWIW-DUGaiYqF.js → comparison-CmVirWIW-UlEf2maz.js} +1 -2
- package/dist/config/bin.js +8 -10
- package/dist/{constants-DR55DpRm.js → constants-DRUnJ_Dz.js} +3 -5
- package/dist/create/bin.d.ts +4 -8
- package/dist/create/bin.js +46 -65
- package/dist/{define-config-CvE5pHqB.js → define-config-ChwJcu5e.js} +6 -9
- package/dist/{define-config-BxDc_9BK.cjs → define-config-Cv2P6NT2.cjs} +7 -12
- package/dist/{define-config-Bexdd6RZ.d.ts → define-config-rPhYIFSn.d.ts} +1 -11
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.d.ts +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{dist-DIpm7mot.js → dist-Bs0SObNC.js} +73 -145
- package/dist/{dist-Cqz8OtiO.js → dist-CdkMvIiQ.js} +11 -5
- package/dist/dist-zDZV5eEc.js +3 -0
- package/dist/{documentation-DqcZSthV.js → documentation-cv_y0Auv.js} +1 -2
- package/dist/{editor-CtJGQP7C.js → editor-ClL78D8u.js} +1490 -4209
- package/dist/{help-BmKpeOP9.js → help-B03t_iQ4.js} +1 -2
- package/dist/hooks/bin.js +4 -5
- package/dist/{hooks-DhwsWb46.js → hooks-xRcJPc-O.js} +5 -4
- package/dist/index.cjs +2 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-JP24qHUF.js → json-kl84kDyH.js} +9 -18
- package/dist/lint-plugins.cjs +1 -1
- package/dist/migration/bin.js +719 -184
- package/dist/migration/compat/worker.js +4 -6
- package/dist/{oxlint-plugin-config-BIzrO2y2.js → oxlint-plugin-config-BVpqYdcC.js} +3 -4
- package/dist/oxlint-plugin.d.ts +0 -2
- package/dist/oxlint-plugin.js +6 -7
- package/dist/{pack-BK38MLVZ.d.ts → pack-ARPFMefW.d.ts} +0 -2
- package/dist/pack-bin.d.ts +1 -3
- package/dist/pack-bin.js +3 -4
- package/dist/pack.d.ts +1 -1
- package/dist/{package-CQDXTm6j.js → package-DzsomcUD.js} +10 -95
- package/dist/{package-overrides-D1RcXSFl.js → package-overrides-Ci8GXouY.js} +5 -8
- package/dist/picomatch-DEUoj81q.js +1916 -0
- package/dist/{prompts-1xNz_ne0.js → prompts-GL1vj0wk.js} +30 -50
- package/dist/{protocol-D99W10Qi.js → protocol-CkNmY-Mr.js} +1 -2
- package/dist/{report-NhQk8VHb.js → report-DLHO30yZ.js} +2 -2
- package/dist/{resolve-vite-config-BVr1SUNg.js → resolve-vite-config-Dn5896A4.js} +9 -25
- package/dist/resolve-vite-config-QO6cC0SP.js +1 -0
- package/dist/{rolldown-runtime-kJ_i4yPo.js → rolldown-runtime-DegdyBIC.js} +1 -2
- package/dist/script-esm-hooks.d.ts +8 -0
- package/dist/script-esm-hooks.js +24 -0
- package/dist/script-hooks-9Fof5UMY.js +176 -0
- package/dist/script-preload.cjs +468 -0
- package/dist/script-register.d.ts +1 -0
- package/dist/script-register.js +22 -0
- package/dist/script-watch.d.ts +1 -0
- package/dist/script-watch.js +1908 -0
- package/dist/staged/bin.js +53 -2011
- package/dist/sync-versions/bin.js +26 -48
- package/dist/sync-versions/bin.mjs +109 -217
- package/dist/{terminal-MKGAuy-p.js → terminal-BcuPUy-j.js} +1 -2
- package/dist/toolchain.js +35 -9
- package/dist/toolchain.json +35 -9
- package/dist/{tsconfig-zWgHiQ3X.js → tsconfig-Do6MAG_f.js} +1 -1
- package/dist/{tsconfig-BZu7kl-x.js → tsconfig-LE_mAwe_.js} +8 -10
- package/dist/version.d.ts +1 -3
- package/dist/version.js +5 -6
- package/dist/versions.js +4 -4
- package/dist/{vitest-ecosystem-BU0AqZq-.js → vitest-ecosystem-BeEYz-qF.js} +1 -2
- package/dist/{vitest-v5-entry-points-DthU1e_O.js → vitest-v5-entry-points-NyJsFeux.js} +1 -2
- package/dist/vpx-bin.d.ts +1 -0
- package/dist/vpx-bin.js +232 -0
- package/dist/vpx-script-EXgV5QOf.js +434 -0
- package/docs/config/run.md +4 -0
- package/docs/guide/check.md +1 -0
- package/docs/guide/ci.md +13 -3
- package/docs/guide/env.md +11 -4
- package/docs/guide/global-cli.md +52 -0
- package/docs/guide/migrate-rules.md +48 -5
- package/docs/guide/migrate.md +5 -5
- package/docs/guide/package-management.md +1 -1
- package/docs/guide/vpx.md +170 -9
- package/package.json +20 -17
- package/dist/command-DVTILtS-.js +0 -1
- package/dist/dist-Dhu07wmN.js +0 -3
- package/dist/resolve-vite-config-7WDtXO4G.js +0 -1
package/dist/bin.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { t as documentationUrl$1 } from "./documentation-
|
|
2
|
-
import { t as renderCliDoc } from "./help-
|
|
3
|
-
import { c as warnMsg, i as log, n as errorMsg, o as printHeader, t as accent } from "./terminal-
|
|
4
|
-
import { g as resolveBundled, h as resolve$1, i as DEFAULT_ENVS, l as VITE_CONFIG_FILES, n as BASEURL_TSCONFIG_WARNING, r as CONFIG_METADATA_ENV, u as VITE_PLUS_NAME } from "./constants-
|
|
5
|
-
import {
|
|
6
|
-
import { o as readNearestPackageJson } from "./package-
|
|
7
|
-
import { t as cac } from "./dist-
|
|
1
|
+
import { t as documentationUrl$1 } from "./documentation-cv_y0Auv.js";
|
|
2
|
+
import { t as renderCliDoc } from "./help-B03t_iQ4.js";
|
|
3
|
+
import { c as warnMsg, i as log, n as errorMsg, o as printHeader, t as accent } from "./terminal-BcuPUy-j.js";
|
|
4
|
+
import { g as resolveBundled, h as resolve$1, i as DEFAULT_ENVS, l as VITE_CONFIG_FILES, n as BASEURL_TSCONFIG_WARNING, r as CONFIG_METADATA_ENV, u as VITE_PLUS_NAME } from "./constants-DRUnJ_Dz.js";
|
|
5
|
+
import { i as createDefaultVitePlusLintConfig } from "./oxlint-plugin-config-BVpqYdcC.js";
|
|
6
|
+
import { o as readNearestPackageJson } from "./package-DzsomcUD.js";
|
|
7
|
+
import { t as cac } from "./dist-CdkMvIiQ.js";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import path, { dirname, join, resolve } from "node:path";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
import { ensureBlockingStdio, hasConfigKey, mergeJsonConfig, run } from "../binding/index.js";
|
|
12
12
|
import fs, { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
13
|
-
|
|
13
|
+
// src/help.ts
|
|
14
14
|
const commandHelpDocs = {
|
|
15
15
|
dev: {
|
|
16
16
|
usage: "vp dev [ROOT] [OPTIONS]",
|
|
@@ -950,6 +950,10 @@ const commandHelpDocs = {
|
|
|
950
950
|
label: "--quiet",
|
|
951
951
|
description: "Disable reporting on warnings, only errors are reported"
|
|
952
952
|
},
|
|
953
|
+
{
|
|
954
|
+
label: "--deny-warnings",
|
|
955
|
+
description: "Treat lint warnings as errors"
|
|
956
|
+
},
|
|
953
957
|
{
|
|
954
958
|
label: "--no-fmt",
|
|
955
959
|
description: "Skip format check"
|
|
@@ -1362,8 +1366,7 @@ function maybePrintCommandHelp(args) {
|
|
|
1362
1366
|
log(renderCliDoc(doc));
|
|
1363
1367
|
return true;
|
|
1364
1368
|
}
|
|
1365
|
-
|
|
1366
|
-
//#region src/resolve-fmt.ts
|
|
1369
|
+
// src/resolve-fmt.ts
|
|
1367
1370
|
/**
|
|
1368
1371
|
* Oxfmt tool resolver for the vite-plus CLI.
|
|
1369
1372
|
*
|
|
@@ -1396,8 +1399,7 @@ async function fmt() {
|
|
|
1396
1399
|
}
|
|
1397
1400
|
};
|
|
1398
1401
|
}
|
|
1399
|
-
|
|
1400
|
-
//#region src/init-config.ts
|
|
1402
|
+
// src/init-config.ts
|
|
1401
1403
|
const INIT_COMMAND_SPECS = {
|
|
1402
1404
|
lint: {
|
|
1403
1405
|
configKey: "lint",
|
|
@@ -1468,7 +1470,7 @@ export default defineConfig({});
|
|
|
1468
1470
|
return viteConfigPath;
|
|
1469
1471
|
}
|
|
1470
1472
|
async function vpFmt(cwd, filePath) {
|
|
1471
|
-
const { runCommandSilently } = await import("./command-
|
|
1473
|
+
const { runCommandSilently } = await import("./command-TjS_6y9O.js");
|
|
1472
1474
|
const { binPath, envs } = await fmt();
|
|
1473
1475
|
const result = await runCommandSilently({
|
|
1474
1476
|
command: binPath,
|
|
@@ -1527,7 +1529,7 @@ async function applyToolInitConfigToViteConfig(command, args, projectPath = proc
|
|
|
1527
1529
|
}
|
|
1528
1530
|
if (spec.configKey === "lint" && hasTriggerFlag(args, ["--init"])) {
|
|
1529
1531
|
const lintInitConfigPath = path.join(projectPath, ".vite-plus-lint-init.oxlintrc.json");
|
|
1530
|
-
const { fixBaseUrlInTsconfig, hasBaseUrlInTsconfig } = await import("./tsconfig-
|
|
1532
|
+
const { fixBaseUrlInTsconfig, hasBaseUrlInTsconfig } = await import("./tsconfig-Do6MAG_f.js");
|
|
1531
1533
|
await fixBaseUrlInTsconfig(projectPath);
|
|
1532
1534
|
const hasBaseUrl = hasBaseUrlInTsconfig(projectPath);
|
|
1533
1535
|
const initConfig = createDefaultVitePlusLintConfig({ includeTypeAwareDefaults: !hasBaseUrl });
|
|
@@ -1564,8 +1566,7 @@ async function applyToolInitConfigToViteConfig(command, args, projectPath = proc
|
|
|
1564
1566
|
viteConfigPath
|
|
1565
1567
|
};
|
|
1566
1568
|
}
|
|
1567
|
-
|
|
1568
|
-
//#region src/resolve-doc.ts
|
|
1569
|
+
// src/resolve-doc.ts
|
|
1569
1570
|
/**
|
|
1570
1571
|
* VitePress tool resolver for the vite-plus CLI.
|
|
1571
1572
|
*
|
|
@@ -1591,8 +1592,7 @@ async function doc() {
|
|
|
1591
1592
|
envs: { ...DEFAULT_ENVS }
|
|
1592
1593
|
};
|
|
1593
1594
|
}
|
|
1594
|
-
|
|
1595
|
-
//#region src/utils/tsgolint-path.ts
|
|
1595
|
+
// src/utils/tsgolint-path.ts
|
|
1596
1596
|
function resolveWindowsTsgolintExecutable(pathCandidates, options) {
|
|
1597
1597
|
let oxlintTsgolintPath = pathCandidates.find((p) => options.exists(p)) ?? "";
|
|
1598
1598
|
if (!oxlintTsgolintPath && options.getRealpathCandidates) try {
|
|
@@ -1621,8 +1621,7 @@ function resolveTsgolintExecutable(tsgolintBinPath, scriptUrl) {
|
|
|
1621
1621
|
}
|
|
1622
1622
|
});
|
|
1623
1623
|
}
|
|
1624
|
-
|
|
1625
|
-
//#region src/resolve-lint.ts
|
|
1624
|
+
// src/resolve-lint.ts
|
|
1626
1625
|
/**
|
|
1627
1626
|
* Oxlint tool resolver for the vite-plus CLI.
|
|
1628
1627
|
*
|
|
@@ -1659,8 +1658,7 @@ async function lint() {
|
|
|
1659
1658
|
}
|
|
1660
1659
|
};
|
|
1661
1660
|
}
|
|
1662
|
-
|
|
1663
|
-
//#region src/resolve-core.ts
|
|
1661
|
+
// src/resolve-core.ts
|
|
1664
1662
|
const CORE_PACKAGE_NAME = "@voidzero-dev/vite-plus-core";
|
|
1665
1663
|
function checkCoreVersion(packageJsonPath, expectedVersion) {
|
|
1666
1664
|
const pkg = JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
@@ -1697,8 +1695,7 @@ function resolveCore(subpath = "", cwd = process.cwd(), modulePath = import.meta
|
|
|
1697
1695
|
checkProjectCoreVersion(cwd, corePackageJsonPath, expectedVersion);
|
|
1698
1696
|
return cliRequire.resolve(`vite${subpath}`);
|
|
1699
1697
|
}
|
|
1700
|
-
|
|
1701
|
-
//#region src/resolve-pack.ts
|
|
1698
|
+
// src/resolve-pack.ts
|
|
1702
1699
|
/** Validate the target project's core alias before starting the bundled pack entry. */
|
|
1703
1700
|
async function pack(err, { cwd }) {
|
|
1704
1701
|
if (err) throw err;
|
|
@@ -1708,8 +1705,7 @@ async function pack(err, { cwd }) {
|
|
|
1708
1705
|
envs: { ...DEFAULT_ENVS }
|
|
1709
1706
|
};
|
|
1710
1707
|
}
|
|
1711
|
-
|
|
1712
|
-
//#region src/resolve-test.ts
|
|
1708
|
+
// src/resolve-test.ts
|
|
1713
1709
|
/**
|
|
1714
1710
|
* Vitest tool resolver for the vite-plus CLI.
|
|
1715
1711
|
*
|
|
@@ -1750,8 +1746,7 @@ async function test() {
|
|
|
1750
1746
|
} : { ...DEFAULT_ENVS }
|
|
1751
1747
|
};
|
|
1752
1748
|
}
|
|
1753
|
-
|
|
1754
|
-
//#region src/resolve-vite.ts
|
|
1749
|
+
// src/resolve-vite.ts
|
|
1755
1750
|
function resolveViteRoot({ cwd, args }) {
|
|
1756
1751
|
const cli = cac();
|
|
1757
1752
|
const command = cli.command("[root]").allowUnknownOptions();
|
|
@@ -1787,8 +1782,7 @@ async function vite(err, context) {
|
|
|
1787
1782
|
envs
|
|
1788
1783
|
};
|
|
1789
1784
|
}
|
|
1790
|
-
|
|
1791
|
-
//#region src/bin.ts
|
|
1785
|
+
// src/bin.ts
|
|
1792
1786
|
/**
|
|
1793
1787
|
* Unified entry point for both the local CLI (via bin/vp) and the global CLI (via Rust vp binary).
|
|
1794
1788
|
*
|
|
@@ -1873,7 +1867,7 @@ else try {
|
|
|
1873
1867
|
toolchainManifestPath: path.join(cliDistDir, "toolchain.json"),
|
|
1874
1868
|
vitePlusPackagePath,
|
|
1875
1869
|
resolveUniversalViteConfig: async (err, cwd) => {
|
|
1876
|
-
const { resolveUniversalViteConfig } = await import("./resolve-vite-config-
|
|
1870
|
+
const { resolveUniversalViteConfig } = await import("./resolve-vite-config-QO6cC0SP.js");
|
|
1877
1871
|
return resolveUniversalViteConfig(err, cwd);
|
|
1878
1872
|
},
|
|
1879
1873
|
nodeVersion: process.version,
|
|
@@ -1894,5 +1888,4 @@ else try {
|
|
|
1894
1888
|
errorMsg(getErrorMessage(err));
|
|
1895
1889
|
process.exit(1);
|
|
1896
1890
|
}
|
|
1897
|
-
//#endregion
|
|
1898
1891
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as errorMsg, o as printHeader } from "./terminal-
|
|
2
|
-
|
|
1
|
+
import { n as errorMsg, o as printHeader } from "./terminal-BcuPUy-j.js";
|
|
2
|
+
// src/utils/cli-parse.ts
|
|
3
3
|
function unwrapCliParseOutcome(outcome) {
|
|
4
4
|
if (outcome.status === "exit") process.exit(outcome.code);
|
|
5
5
|
if (outcome.status === "error") {
|
|
@@ -9,5 +9,4 @@ function unwrapCliParseOutcome(outcome) {
|
|
|
9
9
|
}
|
|
10
10
|
return outcome.value;
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { unwrapCliParseOutcome as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { i as runCommandSilently } from "./command-rY79K5NI.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { n as __require, r as __toESM, t as __commonJSMin } from "./rolldown-runtime-
|
|
1
|
+
import { n as __require, r as __toESM, t as __commonJSMin } from "./rolldown-runtime-DegdyBIC.js";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
2
3
|
import { constants } from "node:os";
|
|
3
|
-
|
|
4
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
4
5
|
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
6
|
module.exports = isexe;
|
|
6
7
|
isexe.sync = sync;
|
|
@@ -29,8 +30,7 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
29
30
|
return checkStat(fs.statSync(path), path, options);
|
|
30
31
|
}
|
|
31
32
|
}));
|
|
32
|
-
|
|
33
|
-
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
33
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
34
34
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
35
35
|
module.exports = isexe;
|
|
36
36
|
isexe.sync = sync;
|
|
@@ -59,8 +59,7 @@ var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59
59
|
return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
60
60
|
}
|
|
61
61
|
}));
|
|
62
|
-
|
|
63
|
-
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
62
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
64
63
|
var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
65
64
|
__require("fs");
|
|
66
65
|
var core;
|
|
@@ -101,8 +100,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
}));
|
|
104
|
-
|
|
105
|
-
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
103
|
+
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
106
104
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
107
105
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
108
106
|
const path = __require("path");
|
|
@@ -179,8 +177,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
179
177
|
module.exports = which;
|
|
180
178
|
which.sync = whichSync;
|
|
181
179
|
}));
|
|
182
|
-
|
|
183
|
-
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
180
|
+
// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
184
181
|
var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
185
182
|
const pathKey = (options = {}) => {
|
|
186
183
|
const environment = options.env || process.env;
|
|
@@ -190,8 +187,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
190
187
|
module.exports = pathKey;
|
|
191
188
|
module.exports.default = pathKey;
|
|
192
189
|
}));
|
|
193
|
-
|
|
194
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
190
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
195
191
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
196
192
|
const path = __require("path");
|
|
197
193
|
const which = require_which();
|
|
@@ -221,8 +217,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
221
217
|
}
|
|
222
218
|
module.exports = resolveCommand;
|
|
223
219
|
}));
|
|
224
|
-
|
|
225
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
220
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
226
221
|
var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
227
222
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
228
223
|
function escapeCommand(arg) {
|
|
@@ -241,13 +236,11 @@ var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
241
236
|
module.exports.command = escapeCommand;
|
|
242
237
|
module.exports.argument = escapeArgument;
|
|
243
238
|
}));
|
|
244
|
-
|
|
245
|
-
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
239
|
+
// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
246
240
|
var require_shebang_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
247
241
|
module.exports = /^#!(.*)/;
|
|
248
242
|
}));
|
|
249
|
-
|
|
250
|
-
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
243
|
+
// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
251
244
|
var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
252
245
|
const shebangRegex = require_shebang_regex();
|
|
253
246
|
module.exports = (string = "") => {
|
|
@@ -259,8 +252,7 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
259
252
|
return argument ? `${binary} ${argument}` : binary;
|
|
260
253
|
};
|
|
261
254
|
}));
|
|
262
|
-
|
|
263
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
255
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
264
256
|
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
265
257
|
const fs = __require("fs");
|
|
266
258
|
const shebangCommand = require_shebang_command();
|
|
@@ -277,8 +269,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
277
269
|
}
|
|
278
270
|
module.exports = readShebang;
|
|
279
271
|
}));
|
|
280
|
-
|
|
281
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
272
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
282
273
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
283
274
|
const path = __require("path");
|
|
284
275
|
const resolveCommand = require_resolveCommand();
|
|
@@ -338,8 +329,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
338
329
|
}
|
|
339
330
|
module.exports = parse;
|
|
340
331
|
}));
|
|
341
|
-
|
|
342
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
332
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
343
333
|
var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
344
334
|
const isWin = process.platform === "win32";
|
|
345
335
|
function notFoundError(original, syscall) {
|
|
@@ -377,8 +367,7 @@ var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
377
367
|
notFoundError
|
|
378
368
|
};
|
|
379
369
|
}));
|
|
380
|
-
|
|
381
|
-
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
|
370
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
|
382
371
|
var require_cross_spawn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
383
372
|
const cp = __require("child_process");
|
|
384
373
|
const parse = require_parse();
|
|
@@ -401,9 +390,19 @@ var require_cross_spawn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
401
390
|
module.exports._parse = parse;
|
|
402
391
|
module.exports._enoent = enoent;
|
|
403
392
|
}));
|
|
404
|
-
|
|
405
|
-
//#region src/utils/command.ts
|
|
393
|
+
// src/utils/command.ts
|
|
406
394
|
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
395
|
+
/** Run this CLI version even when a package-manager launcher does not expose `vp` on PATH. */
|
|
396
|
+
function getVpCommand(args, command = process.env.VP_CLI_BIN) {
|
|
397
|
+
if (command !== void 0) return {
|
|
398
|
+
command,
|
|
399
|
+
args
|
|
400
|
+
};
|
|
401
|
+
return {
|
|
402
|
+
command: process.execPath,
|
|
403
|
+
args: [fileURLToPath(import.meta.resolve("vite-plus/bin")), ...args]
|
|
404
|
+
};
|
|
405
|
+
}
|
|
407
406
|
function exitCodeFromClose(code, signal) {
|
|
408
407
|
if (code !== null) return code;
|
|
409
408
|
const signalNumber = signal && constants.signals[signal];
|
|
@@ -467,5 +466,4 @@ async function runCommand(options) {
|
|
|
467
466
|
});
|
|
468
467
|
});
|
|
469
468
|
}
|
|
470
|
-
|
|
471
|
-
export { runCommandSilently as n, require_cross_spawn as r, runCommand as t };
|
|
469
|
+
export { require_cross_spawn as a, runCommandSilently as i, getVpCommand as n, runCommand as r, exitCodeFromClose as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/comparison-CmVirWIW.js
|
|
2
2
|
const LETTER_DASH_NUMBER = "[a-zA-Z0-9-]";
|
|
3
3
|
const NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`;
|
|
4
4
|
const NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`;
|
|
@@ -117,5 +117,4 @@ function isGreaterThanOrEqual(left, right, options = {}) {
|
|
|
117
117
|
function isLessThanOrEqual(left, right, options = {}) {
|
|
118
118
|
return compare(left, right, options) <= 0;
|
|
119
119
|
}
|
|
120
|
-
//#endregion
|
|
121
120
|
export { isGreaterThanOrEqual as _, GREATER_LESS_THAN as a, safeRegex as b, LOOSE_PLAIN as c, XRANGE_PLAIN as d, XRANGE_PLAIN_LOOSE as f, formatComparableVersion as g, compareReversed as h, FULL_PLAIN as i, PRERELEASE as l, compareParsed as m, COERCE as n, LONE_CARET as o, compare as p, COERCE_FULL as r, LONE_TILDE as s, BUILD as t, PRERELEASE_LOOSE as u, isLessThanOrEqual as v, tryParse as x, parse as y };
|
package/dist/config/bin.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { i as log, n as errorMsg } from "../terminal-
|
|
2
|
-
import { i as promptGitHooks, n as defaultInteractive } from "../prompts-
|
|
3
|
-
import { o as updateExistingAgentInstructions } from "../agent-
|
|
4
|
-
import { t as require_dist } from "../dist-
|
|
5
|
-
import {
|
|
6
|
-
import { t as unwrapCliParseOutcome } from "../cli-parse-
|
|
1
|
+
import { i as log, n as errorMsg } from "../terminal-BcuPUy-j.js";
|
|
2
|
+
import { i as promptGitHooks, n as defaultInteractive } from "../prompts-GL1vj0wk.js";
|
|
3
|
+
import { o as updateExistingAgentInstructions } from "../agent-D8oxxhVR.js";
|
|
4
|
+
import { t as require_dist } from "../dist-Bs0SObNC.js";
|
|
5
|
+
import { c as isGitHooksEnvDisabled, l as isHooksUserDisabled, s as install, u as resolveHooksLocation } from "../hooks-xRcJPc-O.js";
|
|
6
|
+
import { t as unwrapCliParseOutcome } from "../cli-parse-aeUeFDlC.js";
|
|
7
7
|
import path, { join, relative } from "node:path";
|
|
8
8
|
import { parseConfigArgs } from "../../binding/index.js";
|
|
9
9
|
import fs, { existsSync } from "node:fs";
|
|
10
|
-
|
|
10
|
+
// src/utils/legacy-vitest-alias.ts
|
|
11
11
|
var import_dist = require_dist();
|
|
12
12
|
const LEGACY_VITEST_ALIAS = "npm:@voidzero-dev/vite-plus-test";
|
|
13
13
|
function containsLegacyVitestAlias(value, visited = /* @__PURE__ */ new Set()) {
|
|
@@ -72,8 +72,7 @@ function findLegacyVitestAliasConfig(startDir) {
|
|
|
72
72
|
currentDir = parentDir;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
//#region src/config/bin.ts
|
|
75
|
+
// src/config/bin.ts
|
|
77
76
|
async function main() {
|
|
78
77
|
const args = unwrapCliParseOutcome(parseConfigArgs(process.argv.slice(3)));
|
|
79
78
|
const dir = args.hooksDir;
|
|
@@ -117,5 +116,4 @@ async function main() {
|
|
|
117
116
|
if (!skipAgent) updateExistingAgentInstructions(root);
|
|
118
117
|
}
|
|
119
118
|
main();
|
|
120
|
-
//#endregion
|
|
121
119
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
|
-
var version = "1.
|
|
2
|
+
// package.json
|
|
3
|
+
var version = "1.4.0";
|
|
4
4
|
var exports = {
|
|
5
5
|
".": {
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -277,8 +277,7 @@ var exports = {
|
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
279
|
var engines = { "node": "^22.18.0 || ^24.11.0 || >=26.0.0" };
|
|
280
|
-
|
|
281
|
-
//#region src/utils/constants.ts
|
|
280
|
+
// src/utils/constants.ts
|
|
282
281
|
const VITE_PLUS_NAME = "vite-plus";
|
|
283
282
|
const VITE_PLUS_VERSION = process.env.VP_VERSION || version;
|
|
284
283
|
const VITE_CONFIG_FILES = [
|
|
@@ -352,5 +351,4 @@ const DEFAULT_ENVS = {
|
|
|
352
351
|
NODE_PACKAGE_MANAGER: "vite-plus"
|
|
353
352
|
};
|
|
354
353
|
const CONFIG_METADATA_ENV = "VP_RESOLVING_CONFIG_METADATA";
|
|
355
|
-
//#endregion
|
|
356
354
|
export { engines as _, SETUP_VP_VERSION as a, VITEST_VERSION as c, VITE_PLUS_OVERRIDE_PACKAGES as d, VITE_PLUS_VERSION as f, resolveBundled as g, resolve as h, DEFAULT_ENVS as i, VITE_CONFIG_FILES as l, isForceOverrideMode as m, BASEURL_TSCONFIG_WARNING as n, TSDOWN_MIGRATION_SKILL_URL as o, createBaseUrlTsconfigFixArgs as p, CONFIG_METADATA_ENV as r, VITEST_AGE_GATE_EXEMPT_PACKAGES as s, BASEURL_TSCONFIG_FIX_PACKAGE as t, VITE_PLUS_NAME as u, exports as v, version as y };
|
package/dist/create/bin.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import "../../binding/index.js";
|
|
2
|
-
//#region src/types/package.d.ts
|
|
3
2
|
declare const PackageManager: {
|
|
4
|
-
readonly pnpm:
|
|
5
|
-
readonly npm:
|
|
6
|
-
readonly yarn:
|
|
7
|
-
readonly bun:
|
|
3
|
+
readonly pnpm: 'pnpm';
|
|
4
|
+
readonly npm: 'npm';
|
|
5
|
+
readonly yarn: 'yarn';
|
|
6
|
+
readonly bun: 'bun';
|
|
8
7
|
};
|
|
9
8
|
type PackageManager = (typeof PackageManager)[keyof typeof PackageManager];
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/create/bin.d.ts
|
|
12
9
|
export interface Options {
|
|
13
10
|
directory?: string;
|
|
14
11
|
interactive: boolean;
|
|
@@ -25,5 +22,4 @@ export interface Options {
|
|
|
25
22
|
*/
|
|
26
23
|
approveBuilds?: boolean;
|
|
27
24
|
}
|
|
28
|
-
//#endregion
|
|
29
25
|
export {};
|