vite-plus 0.3.1 → 0.3.3
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/README.md +1 -1
- package/bin/vp +1 -1
- package/binding/index.cjs +137 -56
- package/binding/index.d.cts +52 -0
- package/dist/{agent-C5jMYVfB.js → agent-Cu6-tXIP.js} +2 -2
- package/dist/bin.js +6 -5
- package/dist/config/bin.js +2 -2
- package/dist/{constants-0IAVgpox.js → constants-C2dTOTe-.js} +2 -2
- package/dist/create/bin.js +97 -68
- package/dist/{define-config-DIE9de46.cjs → define-config-D0mevyb3.cjs} +1 -1
- package/dist/{define-config-U3_xg7i-.js → define-config-IgzmnvvV.js} +2 -2
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{editor-B5-lvRaU.js → editor-4sjlHmUh.js} +154 -36
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/lint-plugins-dev.d.ts +3 -0
- package/dist/lint-plugins-dev.js +2 -0
- package/dist/lint-plugins.cjs +21 -0
- package/dist/lint-plugins.d.ts +3 -0
- package/dist/lint-plugins.js +2 -0
- package/dist/migration/bin.js +7 -7
- package/dist/{oxlint-plugin-config-Drdl67Xp.js → oxlint-plugin-config-BVqEe9KY.js} +1 -1
- package/dist/oxlint-plugin.js +93 -32
- package/dist/pack-bin.js +1 -1
- package/dist/{package-BZz2Ij68.js → package-CHH8jWan.js} +1 -1
- package/dist/{prompts-CtzEgFY-.js → prompts-k14KgthC.js} +1 -1
- package/dist/{resolve-vite-config-CGks1xR7.js → resolve-vite-config-BqvS2P98.js} +2 -2
- package/dist/{resolve-vite-config-Dnmc-lBc.js → resolve-vite-config-CTOTuqTi.js} +1 -1
- package/dist/staged/bin.js +1 -1
- package/dist/toolchain.js +8 -8
- package/dist/toolchain.json +8 -8
- package/dist/{tsconfig-CUggNuJR.js → tsconfig-C3h9CVTA.js} +2 -2
- package/dist/{tsconfig-VAbm4ZzJ.js → tsconfig-euB-GmIE.js} +1 -1
- package/dist/version.js +2 -2
- package/dist/versions.js +4 -4
- package/docs/config/fmt.md +4 -2
- package/docs/config/lint.md +4 -2
- package/docs/config/staged.md +1 -2
- package/docs/guide/ci.md +28 -31
- package/docs/guide/commit-hooks.md +11 -34
- package/docs/guide/create.md +1 -2
- package/docs/guide/docker.md +20 -68
- package/docs/guide/env.md +56 -22
- package/docs/guide/fmt.md +3 -1
- package/docs/guide/global-cli.md +426 -0
- package/docs/guide/ide-integration.md +1 -2
- package/docs/guide/implode.md +14 -1
- package/docs/guide/index.md +37 -34
- package/docs/guide/install.md +18 -19
- package/docs/guide/lint.md +52 -1
- package/docs/guide/local-cli.md +123 -0
- package/docs/guide/migrate-rules.md +108 -267
- package/docs/guide/migrate.md +6 -49
- package/docs/guide/monorepo.md +2 -0
- package/docs/guide/run.md +1 -1
- package/docs/guide/troubleshooting.md +17 -8
- package/docs/guide/upgrade-project.md +61 -0
- package/docs/guide/upgrade.md +17 -62
- package/package.json +26 -17
- package/templates/generator/README.md +14 -0
- package/templates/generator/bin/index.ts +54 -5
- package/docs/guide/installer-env-vars.md +0 -252
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
# Installer Environment Variables
|
|
2
|
-
|
|
3
|
-
The Vite+ installers (`vp-setup.exe`, `install.ps1`, and `install.sh`) and the installed `vp` CLI read the environment variables on this page.
|
|
4
|
-
|
|
5
|
-
## Installation Variables
|
|
6
|
-
|
|
7
|
-
These variables control the installer scripts and the standalone Windows installer (`vp-setup.exe`).
|
|
8
|
-
|
|
9
|
-
### `VP_VERSION`
|
|
10
|
-
|
|
11
|
-
- **Purpose**: Version to install
|
|
12
|
-
- **Default**: `latest`
|
|
13
|
-
- **CLI equivalent**: `--version`
|
|
14
|
-
- **Note**: Vite+ 0.2.x and earlier do not support the split directory layout.
|
|
15
|
-
The installer always puts these releases in the monolithic root (`VP_HOME` or
|
|
16
|
-
`~/.vite-plus`). This rule also applies to a fresh machine. The installer
|
|
17
|
-
checks the downloaded binary and prints a notice.
|
|
18
|
-
- **Example**:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# Unix
|
|
22
|
-
curl -fsSL https://vite.plus | VP_VERSION=1.2.3 bash
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
```powershell
|
|
26
|
-
# PowerShell
|
|
27
|
-
$env:VP_VERSION = "1.2.3"; irm https://vite.plus/ps1 | iex
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### `VP_HOME`
|
|
31
|
-
|
|
32
|
-
- **Purpose**: Optional pin for the single-root layout. Set it to an absolute
|
|
33
|
-
path. Vite+ then puts bin, data, cache, config, and state under that directory.
|
|
34
|
-
The installed CLI reads the same variable. See [Environment](/guide/env).
|
|
35
|
-
- **Default**: unset. Vite+ reuses an existing install in `~/.vite-plus` on
|
|
36
|
-
Unix or `%USERPROFILE%\.vite-plus` on Windows. The directory must contain a
|
|
37
|
-
`current` link. Otherwise, a fresh install uses the split platform layout. On
|
|
38
|
-
Unix, it uses `~/.local/share/vite-plus` and its Vite+-owned `bin`
|
|
39
|
-
subdirectory. On Windows, it uses `%LOCALAPPDATA%\vite-plus\data` and
|
|
40
|
-
`%LOCALAPPDATA%\vite-plus\bin`.
|
|
41
|
-
- **Example**:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Unix
|
|
45
|
-
curl -fsSL https://vite.plus | VP_HOME=/opt/vite-plus bash
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
```powershell
|
|
49
|
-
# PowerShell
|
|
50
|
-
$env:VP_HOME = "D:\vite-plus"; irm https://vite.plus/ps1 | iex
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### `VP_BIN_DIR` / `VP_DATA_DIR` / `VP_CACHE_DIR`
|
|
54
|
-
|
|
55
|
-
- **Purpose**: Internal absolute directory overrides for integrations that
|
|
56
|
-
must pin a split install. Set all three variables together. The installer
|
|
57
|
-
rejects an incomplete group. Vite+ ignores the group when `VP_HOME` is set
|
|
58
|
-
or when it reuses an existing `~/.vite-plus` install.
|
|
59
|
-
- **Default**: unset (XDG / platform defaults)
|
|
60
|
-
- **Persistence**: The generated environment file does not export these
|
|
61
|
-
variables. An integration that uses them must provide the complete group to
|
|
62
|
-
each Vite+ process.
|
|
63
|
-
- **Example**:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
export VP_DATA_DIR=$HOME/vite-plus-data
|
|
67
|
-
export VP_BIN_DIR=$VP_DATA_DIR/bin
|
|
68
|
-
export VP_CACHE_DIR=$HOME/.cache/vite-plus
|
|
69
|
-
curl -fsSL https://vite.plus | bash
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### `NPM_CONFIG_REGISTRY`
|
|
73
|
-
|
|
74
|
-
- **Purpose**: Custom npm registry URL
|
|
75
|
-
- **Default**: `https://registry.npmjs.org`
|
|
76
|
-
- **CLI equivalent**: `--registry`
|
|
77
|
-
- **Example**:
|
|
78
|
-
```bash
|
|
79
|
-
curl -fsSL https://vite.plus | NPM_CONFIG_REGISTRY=https://registry.npmmirror.com bash
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### `VP_NODE_MANAGER`
|
|
83
|
-
|
|
84
|
-
- **Purpose**: Control Node.js version manager setup during installation
|
|
85
|
-
- **Values**: `yes` or `no`
|
|
86
|
-
- **Default**: Auto-detected
|
|
87
|
-
- **CLI equivalent**: `--no-node-manager` (inverted)
|
|
88
|
-
- **Example**:
|
|
89
|
-
```bash
|
|
90
|
-
# Skip Node.js manager setup in CI
|
|
91
|
-
curl -fsSL https://vite.plus | VP_NODE_MANAGER=no bash
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### `VP_PR_VERSION`
|
|
95
|
-
|
|
96
|
-
- **Purpose**: Install a preview build from a pull request or commit SHA
|
|
97
|
-
- **Values**: PR number or commit SHA
|
|
98
|
-
- **Default**: None
|
|
99
|
-
- **Details**: [Global `vp` Preview](/guide/upgrade#global-vp-preview)
|
|
100
|
-
|
|
101
|
-
### Development variables
|
|
102
|
-
|
|
103
|
-
Use `VP_LOCAL_TGZ` and `VP_LOCAL_BINARY` when you develop Vite+ itself.
|
|
104
|
-
`VP_LOCAL_TGZ` specifies a local `vite-plus.tgz` file. `VP_LOCAL_BINARY`
|
|
105
|
-
specifies a local `vp` binary. The installers use these files for the local
|
|
106
|
-
build. They use `VP_DUMP_DIRS=1` to get the layout mode and all five `EnvConfig`
|
|
107
|
-
category roots from the selected binary. They do not resolve the directory
|
|
108
|
-
variables. The installers set `VP_INSTALL_STOP`; do not set it manually.
|
|
109
|
-
|
|
110
|
-
## Runtime Variables
|
|
111
|
-
|
|
112
|
-
These variables configure the installed Vite+ CLI. `VP_HOME` (above) also applies at runtime.
|
|
113
|
-
|
|
114
|
-
### `VP_NODE_DIST_MIRROR`
|
|
115
|
-
|
|
116
|
-
- **Purpose**: Node.js distribution mirror URL
|
|
117
|
-
- **Default**: `https://nodejs.org/dist`
|
|
118
|
-
- **Details**: [Custom Node.js Mirror](/guide/env#custom-node-js-mirror)
|
|
119
|
-
|
|
120
|
-
### `VP_NODE_VERSION`
|
|
121
|
-
|
|
122
|
-
- **Purpose**: Override Node.js version
|
|
123
|
-
- **Default**: None (auto-detected)
|
|
124
|
-
- **Example**:
|
|
125
|
-
```bash
|
|
126
|
-
# Run a command with a specific Node.js version
|
|
127
|
-
VP_NODE_VERSION=22 vp env exec node -v
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### `VP_PACKAGE_MANAGER`
|
|
131
|
-
|
|
132
|
-
- **Purpose**: Override the selected package manager and version
|
|
133
|
-
- **Default**: None (resolved from the project or global default)
|
|
134
|
-
- **Format**: `npm|pnpm|yarn|bun@<version>`
|
|
135
|
-
- **Example**:
|
|
136
|
-
```bash
|
|
137
|
-
VP_PACKAGE_MANAGER=pnpm@10.18.0 vp install
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### `VP_NODE_SKIP_SIGNATURE_VERIFY`
|
|
141
|
-
|
|
142
|
-
- **Purpose**: Skip PGP signature verification of Node.js downloads
|
|
143
|
-
- **Values**: Any non-empty value
|
|
144
|
-
- **Default**: None (verification enabled)
|
|
145
|
-
- **Details**: [Node.js Signature Verification](/guide/env#node-js-signature-verification)
|
|
146
|
-
|
|
147
|
-
### `VP_DOWNLOAD_TIMEOUT`
|
|
148
|
-
|
|
149
|
-
- **Purpose**: Per-request timeout, in seconds, for large downloads such as Node.js runtimes and package-manager tarballs
|
|
150
|
-
- **Values**: Positive integer, at most `86400` (24 hours); invalid values are ignored with a warning
|
|
151
|
-
- **Default**: `600` (10 minutes)
|
|
152
|
-
- **Example**:
|
|
153
|
-
```bash
|
|
154
|
-
# Allow up to 30 minutes per download on a slow connection
|
|
155
|
-
VP_DOWNLOAD_TIMEOUT=1800 vp env install 22
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### `VP_SHELL`
|
|
159
|
-
|
|
160
|
-
- **Purpose**: Specify the current shell
|
|
161
|
-
- **Default**: Auto-detected
|
|
162
|
-
- **Example**:
|
|
163
|
-
```bash
|
|
164
|
-
VP_SHELL=bash vp env print
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### `VP_BYPASS`
|
|
168
|
-
|
|
169
|
-
- **Purpose**: Bypass the Vite+ shim and use the system tool
|
|
170
|
-
- **Values**: `PATH`-style list of directories to bypass
|
|
171
|
-
- **Default**: None
|
|
172
|
-
- **Example**:
|
|
173
|
-
```bash
|
|
174
|
-
VP_BYPASS=/usr/local/bin node -v
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Internal variables
|
|
178
|
-
|
|
179
|
-
Vite+ sets additional `VP_*` variables during shim dispatch and shell integration (recursion guards, active-version records, wrapper flags); do not set them manually.
|
|
180
|
-
|
|
181
|
-
## TLS/CA Configuration
|
|
182
|
-
|
|
183
|
-
### `SSL_CERT_FILE` / `NODE_EXTRA_CA_CERTS`
|
|
184
|
-
|
|
185
|
-
- **Purpose**: Path to PEM bundle of extra CA certificates (`NODE_EXTRA_CA_CERTS` is the Node.js convention)
|
|
186
|
-
- **Default**: System trust store
|
|
187
|
-
- **Example**:
|
|
188
|
-
```bash
|
|
189
|
-
export SSL_CERT_FILE=/path/to/custom-ca.pem
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
### `VP_INSECURE_TLS`
|
|
193
|
-
|
|
194
|
-
- **Purpose**: Disable HTTPS certificate verification
|
|
195
|
-
- **Values**: Any non-empty value (`1`, `true`, `yes`)
|
|
196
|
-
- **Default**: None (verification enabled)
|
|
197
|
-
- **Warning**: Diagnostic escape hatch only; do not use in production
|
|
198
|
-
- **Example**:
|
|
199
|
-
```bash
|
|
200
|
-
VP_INSECURE_TLS=1 vp env install 22
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
## Logging and Debugging
|
|
204
|
-
|
|
205
|
-
### `VP_LOG`
|
|
206
|
-
|
|
207
|
-
- **Purpose**: Log filter string for `tracing_subscriber`
|
|
208
|
-
- **Installer behavior**: When `CI=true`, `install.sh` hides shell file errors.
|
|
209
|
-
Set `VP_LOG=trace` to show these errors.
|
|
210
|
-
- **Default**: None
|
|
211
|
-
- **Example**:
|
|
212
|
-
```bash
|
|
213
|
-
VP_LOG=debug vp dev
|
|
214
|
-
VP_LOG=vt=trace vp build
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### `VP_DEBUG_SHIM`
|
|
218
|
-
|
|
219
|
-
- **Purpose**: Enable debug output for shim dispatch
|
|
220
|
-
- **Values**: Any non-empty value
|
|
221
|
-
- **Default**: None
|
|
222
|
-
- **Example**:
|
|
223
|
-
```bash
|
|
224
|
-
VP_DEBUG_SHIM=1 node -v
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## Standard Environment Variables
|
|
228
|
-
|
|
229
|
-
Vite+ also respects these standard environment variables:
|
|
230
|
-
|
|
231
|
-
### `CI`
|
|
232
|
-
|
|
233
|
-
- **Purpose**: Indicates running in CI environment
|
|
234
|
-
- **Effect**: Enables silent mode (`--yes`) for installers
|
|
235
|
-
|
|
236
|
-
### `NO_COLOR`
|
|
237
|
-
|
|
238
|
-
- **Purpose**: Disable colored output
|
|
239
|
-
- **Effect**: Disables ANSI color codes
|
|
240
|
-
|
|
241
|
-
### `HOME` / `USERPROFILE`
|
|
242
|
-
|
|
243
|
-
- **Purpose**: User home directory
|
|
244
|
-
- **Effect**: Base for the existing-install probe (`~/.vite-plus`) and for split platform defaults
|
|
245
|
-
|
|
246
|
-
## Precedence
|
|
247
|
-
|
|
248
|
-
1. CLI flags (highest priority)
|
|
249
|
-
2. Environment variables
|
|
250
|
-
3. Default values (lowest priority)
|
|
251
|
-
|
|
252
|
-
For example, `VP_VERSION=1.0.0 vp-setup.exe --version 2.0.0` installs version 2.0.0.
|