vite-plus 0.1.21 → 0.1.23
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 +1 -0
- package/binding/index.cjs +120 -52
- package/binding/index.d.cts +3232 -2
- package/dist/agent-aSGY0osq.js +2461 -0
- package/dist/bin.js +9 -14
- package/dist/cli-truncate-CWsmbK3p.js +867 -0
- package/dist/{compat-DdC7fHjB.js → compat-DXZgnEyq.js} +1 -1
- package/dist/config/bin.js +18 -5
- package/dist/constants-DCBWlNrn.js +33 -0
- package/dist/create/bin.js +215 -77
- package/dist/{define-config-cWg3Z2bC.d.ts → define-config-COdn-tsn.d.ts} +7 -5
- 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-Bapm49IR.js +3 -0
- package/dist/{dist-DjG9AYbK.js → dist-BgQuvbtq.js} +136 -110
- package/dist/fmt.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/is-fullwidth-code-point-BUNlIICg.js +8 -0
- package/dist/lint.d.ts +1 -1
- package/dist/{log-update-CLxR0iRf.js → log-update-lyIiuflf.js} +111 -24
- package/dist/{main-A6UrSTYb.js → main-DpJl3LoU.js} +1 -28
- package/dist/migration/bin.js +71 -30
- package/dist/oxlint-plugin-config-B89iKTKN.js +37 -0
- package/dist/oxlint-plugin.d.ts +6 -0
- package/dist/oxlint-plugin.js +91 -0
- package/dist/pack-bin.js +1 -1
- package/dist/pack.d.ts +1 -1
- package/dist/{package-CrKanQYM.js → package-PmBUZ-ve.js} +2 -1
- package/dist/staged/bin.js +10 -10
- package/dist/strip-ansi-C3wrWz9t.js +853 -0
- package/dist/{agent-D2ocSU01.js → tsconfig-DlUVXT3J.js} +666 -2090
- package/dist/version.js +5 -5
- package/dist/versions.js +6 -6
- package/dist/{workspace-QXeJWs3P.js → workspace-DElv730L.js} +15 -15
- package/dist/wrap-ansi-CeQuiQ31.js +2 -0
- package/dist/{wrap-ansi-Dy0LjO7Q.js → wrap-ansi-k7Dn4VtV.js} +1 -1
- package/docs/config/run.md +39 -4
- package/docs/guide/cache.md +10 -1
- package/docs/guide/create.md +3 -1
- package/docs/guide/env.md +26 -1
- package/docs/guide/ide-integration.md +2 -2
- package/docs/guide/install.md +6 -0
- package/docs/guide/run.md +2 -0
- package/docs/guide/troubleshooting.md +5 -2
- package/docs/package.json +3 -1
- package/docs/pnpm-lock.yaml +798 -62
- package/package.json +27 -19
- package/templates/monorepo/_gitignore +1 -0
- package/dist/cli-truncate-DJcN4dJ8.js +0 -138
- package/dist/dist-D2_BiE1V.js +0 -3
- package/dist/slice-ansi-CwJYd1aw.js +0 -113
- package/dist/strip-ansi-D86nYqKl.js +0 -198
- package/dist/tsconfig-lBAWm4sf.js +0 -517
- package/dist/wrap-ansi-DbY7Idw_.js +0 -2
- /package/dist/{chunk-q7NCDQ7-.js → chunk-DnnnRqeS.js} +0 -0
- /package/dist/{define-config-GqLoRwH9.cjs → define-config-BR1Y88zz.cjs} +0 -0
- /package/dist/{define-config-B62DkkqH.js → define-config-BRC7qPNE.js} +0 -0
- /package/dist/{help-BtkjXtRM.js → help-YP84FSEz.js} +0 -0
- /package/dist/{lib-BamM40b7.js → lib-L3DWSRQp.js} +0 -0
- /package/dist/{pack-BcBvbQgt.d.ts → pack-Ciiho0Tq.d.ts} +0 -0
- /package/dist/{report-DbrfjWiP.js → report-DgSBQUdz.js} +0 -0
- /package/dist/{resolve-vite-config-C1KX9CZU.js → resolve-vite-config-TTvhycU1.js} +0 -0
- /package/dist/{terminal-CxTMfsxZ.js → terminal-uTv0ZaMr.js} +0 -0
package/dist/config/bin.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as lib_default } from "../lib-
|
|
4
|
-
import {
|
|
1
|
+
import { c as defaultInteractive, d as promptGitHooks } from "../tsconfig-DlUVXT3J.js";
|
|
2
|
+
import { a as printHeader, r as log } from "../terminal-uTv0ZaMr.js";
|
|
3
|
+
import { t as lib_default } from "../lib-L3DWSRQp.js";
|
|
4
|
+
import { o as updateExistingAgentInstructions, x as hasStagedConfigInViteConfig, y as ensurePreCommitHook } from "../agent-aSGY0osq.js";
|
|
5
|
+
import { t as renderCliDoc } from "../help-YP84FSEz.js";
|
|
5
6
|
import { join } from "node:path";
|
|
6
7
|
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
7
8
|
import { spawnSync } from "node:child_process";
|
|
@@ -42,8 +43,20 @@ i="\${XDG_CONFIG_HOME:-$HOME/.config}/vite-plus/hooks-init.sh"
|
|
|
42
43
|
{ [ "\${HUSKY-}" = "0" ] || [ "\${VITE_GIT_HOOKS-}" = "0" ]; } && exit 0
|
|
43
44
|
|
|
44
45
|
d=${nestedDirname(dir.split("/").filter((s) => s !== "" && s !== ".").length + 2)}
|
|
46
|
+
__vp_shell=/bin/sh
|
|
47
|
+
[ -x "$__vp_shell" ] || __vp_shell=$(command -v sh)
|
|
48
|
+
|
|
49
|
+
if [ -n "\${VP_HOME-}" ]; then
|
|
50
|
+
__vp_bin="$VP_HOME/bin"
|
|
51
|
+
elif [ -n "\${HOME-}" ]; then
|
|
52
|
+
__vp_bin="$HOME/.vite-plus/bin"
|
|
53
|
+
else
|
|
54
|
+
__vp_bin=""
|
|
55
|
+
fi
|
|
56
|
+
[ -n "$__vp_bin" ] && [ -d "$__vp_bin" ] && export PATH="$PATH:$__vp_bin"
|
|
57
|
+
|
|
45
58
|
export PATH="$d/node_modules/.bin:$PATH"
|
|
46
|
-
|
|
59
|
+
"$__vp_shell" -e "$s" "$@"
|
|
47
60
|
c=$?
|
|
48
61
|
|
|
49
62
|
[ $c != 0 ] && echo "VITE+ - $n script failed (code $c)"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
//#region src/utils/constants.ts
|
|
3
|
+
const VITE_PLUS_NAME = "vite-plus";
|
|
4
|
+
const VITE_PLUS_VERSION = process.env.VP_VERSION || "latest";
|
|
5
|
+
const VITE_PLUS_OVERRIDE_PACKAGES = process.env.VP_OVERRIDE_PACKAGES ? JSON.parse(process.env.VP_OVERRIDE_PACKAGES) : {
|
|
6
|
+
vite: "npm:@voidzero-dev/vite-plus-core@latest",
|
|
7
|
+
vitest: "npm:@voidzero-dev/vite-plus-test@latest"
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* When VP_FORCE_MIGRATE is set, force full dependency rewriting
|
|
11
|
+
* even for projects already using vite-plus. Used by ecosystem CI to
|
|
12
|
+
* override dependencies with locally built tgz packages.
|
|
13
|
+
*/
|
|
14
|
+
function isForceOverrideMode() {
|
|
15
|
+
return process.env.VP_FORCE_MIGRATE === "1";
|
|
16
|
+
}
|
|
17
|
+
const require = createRequire(import.meta.url);
|
|
18
|
+
function resolve(path) {
|
|
19
|
+
return require.resolve(path, { paths: [process.cwd(), import.meta.dirname] });
|
|
20
|
+
}
|
|
21
|
+
const BASEURL_TSCONFIG_WARNING = "Skipped typeAware/typeCheck: a tsconfig file contains baseUrl which is not yet supported by the oxlint type checker.\n Run `vp dlx @andrewbranch/ts5to6 --fixBaseUrl <tsconfig path>` to remove baseUrl from your tsconfig.";
|
|
22
|
+
const BASEURL_TSCONFIG_FIX_PACKAGE = "@andrewbranch/ts5to6";
|
|
23
|
+
const BASEURL_TSCONFIG_FIX_FLAG = "--fixBaseUrl";
|
|
24
|
+
function createBaseUrlTsconfigFixArgs(target = ".") {
|
|
25
|
+
return [BASEURL_TSCONFIG_FIX_FLAG, target];
|
|
26
|
+
}
|
|
27
|
+
const DEFAULT_ENVS = {
|
|
28
|
+
JS_RUNTIME_VERSION: process.versions.node,
|
|
29
|
+
JS_RUNTIME_NAME: process.release.name,
|
|
30
|
+
NODE_PACKAGE_MANAGER: "vite-plus"
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { VITE_PLUS_OVERRIDE_PACKAGES as a, isForceOverrideMode as c, VITE_PLUS_NAME as i, resolve as l, BASEURL_TSCONFIG_WARNING as n, VITE_PLUS_VERSION as o, DEFAULT_ENVS as r, createBaseUrlTsconfigFixArgs as s, BASEURL_TSCONFIG_FIX_PACKAGE as t };
|