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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/cac@7.1.0/node_modules/cac/dist/index.js
|
|
2
2
|
function toArr(any) {
|
|
3
3
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
|
4
4
|
}
|
|
@@ -147,7 +147,7 @@ function setDotProp(obj, keys, val) {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
function setByType(obj, transforms) {
|
|
150
|
-
for (const [key, transform] of Object.entries(transforms)) if (transform.shouldTransform) {
|
|
150
|
+
for (const [key, transform] of Object.entries(transforms)) if (transform.shouldTransform && key in obj) {
|
|
151
151
|
obj[key] = [obj[key]].flat();
|
|
152
152
|
if (typeof transform.transformFunction === "function") obj[key] = obj[key].map(transform.transformFunction);
|
|
153
153
|
}
|
|
@@ -200,7 +200,6 @@ var Option = class {
|
|
|
200
200
|
else this.isBoolean = true;
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
|
-
let runtimeProcessArgs;
|
|
204
203
|
let runtimeInfo;
|
|
205
204
|
if (typeof process !== "undefined") {
|
|
206
205
|
let runtimeName;
|
|
@@ -208,9 +207,16 @@ if (typeof process !== "undefined") {
|
|
|
208
207
|
else if (typeof Bun !== "undefined" && typeof Bun.version === "string") runtimeName = "bun";
|
|
209
208
|
else runtimeName = "node";
|
|
210
209
|
runtimeInfo = `${process.platform}-${process.arch} ${runtimeName}-${process.version}`;
|
|
211
|
-
runtimeProcessArgs = process.argv;
|
|
212
210
|
} else if (typeof navigator === "undefined") runtimeInfo = `unknown`;
|
|
213
211
|
else runtimeInfo = `${navigator.platform} ${navigator.userAgent}`;
|
|
212
|
+
/**
|
|
213
|
+
* `process.argv` at call time. It must not be captured when this module is
|
|
214
|
+
* imported: a runner may load cac before it rewrites `process.argv` for the
|
|
215
|
+
* script it is about to run.
|
|
216
|
+
*/
|
|
217
|
+
function getRuntimeProcessArgs() {
|
|
218
|
+
return typeof process === "undefined" ? void 0 : process.argv;
|
|
219
|
+
}
|
|
214
220
|
var Command = class {
|
|
215
221
|
rawName;
|
|
216
222
|
description;
|
|
@@ -512,6 +518,7 @@ var CAC = class extends EventTarget {
|
|
|
512
518
|
*/
|
|
513
519
|
parse(argv, { run = true } = {}) {
|
|
514
520
|
if (!argv) {
|
|
521
|
+
const runtimeProcessArgs = getRuntimeProcessArgs();
|
|
515
522
|
if (!runtimeProcessArgs) throw new Error("No argv provided and runtime process argv is not available.");
|
|
516
523
|
argv = runtimeProcessArgs;
|
|
517
524
|
}
|
|
@@ -618,5 +625,4 @@ var CAC = class extends EventTarget {
|
|
|
618
625
|
* @param name The program name to display in help and version message
|
|
619
626
|
*/
|
|
620
627
|
const cac = (name = "") => new CAC(name);
|
|
621
|
-
//#endregion
|
|
622
628
|
export { cac as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { documentationUrl } from "../binding/index.js";
|
|
2
|
-
|
|
2
|
+
// src/utils/documentation.ts
|
|
3
3
|
function documentationUrl$1(path) {
|
|
4
4
|
return documentationUrl(path);
|
|
5
5
|
}
|
|
@@ -7,5 +7,4 @@ function documentationUrl$1(path) {
|
|
|
7
7
|
function rewriteDocumentationLinks(content) {
|
|
8
8
|
return content.replaceAll("https://viteplus.dev/guide/", documentationUrl$1("/guide/"));
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { rewriteDocumentationLinks as n, documentationUrl$1 as t };
|