vite-plus 0.2.7 → 0.2.9
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 +7 -0
- package/LICENSE +5 -1
- package/README.md +9 -3
- package/bin/vpr +3 -2
- package/binding/index.cjs +193 -80
- package/binding/index.d.cts +106 -11
- package/dist/agent-DQU8uS6P.js +416 -0
- package/dist/bin.js +1388 -23
- package/dist/{cli-truncate-BVOlIIPy.js → cli-truncate-Bg3RDXpi.js} +0 -2
- package/dist/client/bundledDevClient.mjs +1 -0
- package/dist/config/bin.js +32 -133
- package/dist/{constants-BsuzPowC.js → constants-CG513DRa.js} +10 -2
- package/dist/create/bin.js +255 -268
- package/dist/{define-config-C2KfLHpC.js → define-config-CV4bQG_8.js} +3 -3
- package/dist/{define-config-eLQH9us2.d.ts → define-config-DWoAkNdp.d.ts} +16 -0
- package/dist/{define-config-DLh9fE95.cjs → define-config-DyNLA_f0.cjs} +1 -1
- 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-CKz3vcoG.js → dist-BDYZP12R.js} +196 -157
- package/dist/dist-Dqv1-Clg.js +3 -0
- package/dist/{agent-CPwWJ4qf.js → editor-g4PosU99.js} +819 -628
- package/dist/hooks/bin.d.ts +1 -0
- package/dist/hooks/bin.js +130 -0
- package/dist/hooks-pNCBWtFT.js +570 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-DiRs8ceZ.js → json-qlK6UH0r.js} +40 -38
- package/dist/migration/bin.js +65 -58
- package/dist/{oxlint-plugin-config-Bxgc4cwF.js → oxlint-plugin-config-BEZ9IUf7.js} +1 -1
- package/dist/oxlint-plugin.js +1 -1
- package/dist/pack-bin.js +1 -1
- package/dist/{package-Ds3uThLb.js → package-B4T8RGMG.js} +2 -2
- package/dist/{tsconfig-Jia2vgMG.js → prompts-CHz_98bJ.js} +169 -219
- package/dist/{resolve-vite-config-BiuLZnn8.js → resolve-vite-config-Dmeyeyj-.js} +2 -9
- package/dist/{rolldown-runtime-C7HZzL1F.js → rolldown-runtime-CMFfr-1z.js} +1 -1
- package/dist/staged/bin.js +241 -226
- package/dist/terminal-Bz-ps6rJ.js +128 -0
- package/dist/test/browser/providers/playwright/context.d.ts +1 -1
- package/dist/test/browser/providers/playwright.d.ts +6 -6
- package/dist/test/browser/providers/preview/context.d.ts +1 -1
- package/dist/test/browser/providers/preview.d.ts +4 -4
- package/dist/test/browser/providers/webdriverio/context.d.ts +1 -1
- package/dist/test/browser/providers/webdriverio.d.ts +6 -6
- package/dist/test/browser-playwright/context.d.ts +1 -1
- package/dist/test/browser-playwright.d.ts +6 -6
- package/dist/test/browser-preview/context.d.ts +1 -1
- package/dist/test/browser-preview.d.ts +4 -4
- package/dist/test/browser-webdriverio/context.d.ts +1 -1
- package/dist/test/browser-webdriverio.d.ts +6 -6
- package/dist/test/context.d.ts +3 -3
- package/dist/test/locators.d.ts +1 -1
- package/dist/toolchain.d.ts +25 -0
- package/dist/toolchain.js +194 -0
- package/dist/toolchain.json +193 -0
- package/dist/tsconfig-7v_BHagU.js +151 -0
- package/dist/{tsgolint-path-B-yOos8p.js → tsgolint-path-CbDReEOx.js} +5 -3
- package/dist/tsgolint-path.js +1 -1
- package/dist/version.js +6 -6
- package/dist/versions.d.ts +3 -3
- package/dist/versions.js +6 -6
- package/docs/config/index.md +13 -0
- package/docs/config/staged.md +2 -1
- package/docs/guide/ci.md +37 -4
- package/docs/guide/commit-hooks.md +112 -21
- package/docs/guide/create.md +7 -4
- package/docs/guide/env.md +8 -4
- package/docs/guide/fmt.md +2 -2
- package/docs/guide/github-actions-cache.md +5 -1
- package/docs/guide/ide-integration.md +61 -2
- package/docs/guide/index.md +4 -2
- package/docs/guide/install.md +27 -0
- package/docs/guide/installer-env-vars.md +14 -3
- package/docs/guide/lint.md +3 -1
- package/docs/guide/migrate.md +49 -4
- package/docs/guide/monorepo.md +98 -10
- package/docs/guide/troubleshooting.md +12 -3
- package/docs/guide/upgrade.md +27 -4
- package/docs/package.json +1 -1
- package/docs/pnpm-workspace.yaml +7 -0
- package/docs/vite.config.ts +3 -0
- package/package.json +21 -23
- package/rules/vite-tools.yml +0 -7
- package/dist/dist-CtM2JRbM.js +0 -3
- package/dist/editor-BbT1lTNc.js +0 -675
- package/dist/help-YP84FSEz.js +0 -61
- package/dist/terminal-uTv0ZaMr.js +0 -33
- package/dist/{log-update-DHZRyJ2m.js → log-update-CoW8Z4Dl.js} +1 -1
package/dist/help-YP84FSEz.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { stripVTControlCharacters, styleText } from "node:util";
|
|
2
|
-
//#region src/utils/help.ts
|
|
3
|
-
function toLines(value) {
|
|
4
|
-
if (!value) return [];
|
|
5
|
-
return Array.isArray(value) ? [...value] : [value];
|
|
6
|
-
}
|
|
7
|
-
function visibleLength(value) {
|
|
8
|
-
return stripVTControlCharacters(value).length;
|
|
9
|
-
}
|
|
10
|
-
function padVisible(value, width) {
|
|
11
|
-
const padding = Math.max(0, width - visibleLength(value));
|
|
12
|
-
return `${value}${" ".repeat(padding)}`;
|
|
13
|
-
}
|
|
14
|
-
function renderRows(rows) {
|
|
15
|
-
if (rows.length === 0) return [];
|
|
16
|
-
const labelWidth = Math.max(...rows.map((row) => visibleLength(row.label)));
|
|
17
|
-
const output = [];
|
|
18
|
-
for (const row of rows) {
|
|
19
|
-
const descriptionLines = toLines(row.description);
|
|
20
|
-
if (descriptionLines.length === 0) {
|
|
21
|
-
output.push(` ${row.label}`);
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
const [firstLine, ...rest] = descriptionLines;
|
|
25
|
-
output.push(` ${padVisible(row.label, labelWidth)} ${firstLine}`);
|
|
26
|
-
for (const line of rest) output.push(` ${" ".repeat(labelWidth)} ${line}`);
|
|
27
|
-
}
|
|
28
|
-
return output;
|
|
29
|
-
}
|
|
30
|
-
function heading(label, color) {
|
|
31
|
-
if (!color) return `${label}:`;
|
|
32
|
-
return label === "Usage" ? styleText("bold", `${label}:`) : styleText(["blue", "bold"], `${label}:`);
|
|
33
|
-
}
|
|
34
|
-
function renderCliDoc(doc, options = {}) {
|
|
35
|
-
const color = options.color ?? true;
|
|
36
|
-
const output = [];
|
|
37
|
-
if (doc.usage) {
|
|
38
|
-
const usage = color ? styleText("bold", doc.usage) : doc.usage;
|
|
39
|
-
output.push(`${heading("Usage", color)} ${usage}`);
|
|
40
|
-
}
|
|
41
|
-
const summaryLines = toLines(doc.summary);
|
|
42
|
-
if (summaryLines.length > 0) {
|
|
43
|
-
if (output.length > 0) output.push("");
|
|
44
|
-
output.push(...summaryLines);
|
|
45
|
-
}
|
|
46
|
-
for (const section of doc.sections) {
|
|
47
|
-
if (output.length > 0) output.push("");
|
|
48
|
-
output.push(heading(section.title, color));
|
|
49
|
-
const lines = toLines(section.lines);
|
|
50
|
-
if (lines.length > 0) output.push(...lines);
|
|
51
|
-
if (section.rows && section.rows.length > 0) output.push(...renderRows(section.rows));
|
|
52
|
-
}
|
|
53
|
-
if (doc.documentationUrl) {
|
|
54
|
-
if (output.length > 0) output.push("");
|
|
55
|
-
output.push(`${heading("Documentation", color)} ${doc.documentationUrl}`);
|
|
56
|
-
}
|
|
57
|
-
output.push("");
|
|
58
|
-
return output.join("\n");
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
|
-
export { renderCliDoc as t };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { shouldPrintVitePlusHeader, vitePlusHeader } from "../binding/index.js";
|
|
2
|
-
import { styleText } from "node:util";
|
|
3
|
-
//#region src/utils/terminal.ts
|
|
4
|
-
function log(message) {
|
|
5
|
-
console.log(message);
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Emit the Vite+ banner (header line + trailing blank line) to stdout.
|
|
9
|
-
* Gating (non-TTY, git hooks) lives in `shouldPrintVitePlusHeader` on the
|
|
10
|
-
* Rust side so both CLIs stay in sync.
|
|
11
|
-
*/
|
|
12
|
-
function printHeader() {
|
|
13
|
-
if (!shouldPrintVitePlusHeader()) return;
|
|
14
|
-
log(vitePlusHeader());
|
|
15
|
-
log("");
|
|
16
|
-
}
|
|
17
|
-
function accent(text) {
|
|
18
|
-
return styleText("blue", text);
|
|
19
|
-
}
|
|
20
|
-
function muted(text) {
|
|
21
|
-
return styleText("gray", text);
|
|
22
|
-
}
|
|
23
|
-
function success(text) {
|
|
24
|
-
return styleText("green", text);
|
|
25
|
-
}
|
|
26
|
-
function warnMsg(msg) {
|
|
27
|
-
console.error(styleText(["yellow", "bold"], "warn:"), msg);
|
|
28
|
-
}
|
|
29
|
-
function errorMsg(msg) {
|
|
30
|
-
console.error(styleText(["red", "bold"], "error:"), msg);
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
export { printHeader as a, muted as i, errorMsg as n, success as o, log as r, warnMsg as s, accent as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as ansiStyles, t as stripAnsi } from "./strip-ansi-C3wrWz9t.js";
|
|
2
2
|
import { t as isFullwidthCodePoint } from "./is-fullwidth-code-point-BUNlIICg.js";
|
|
3
3
|
import { t as wrapAnsi } from "./wrap-ansi-DNjkuBEp.js";
|
|
4
|
-
import process$1 from "node:process";
|
|
5
4
|
import os from "node:os";
|
|
5
|
+
import process$1 from "node:process";
|
|
6
6
|
//#region ../../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js
|
|
7
7
|
const isBrowser = globalThis.window?.document !== void 0;
|
|
8
8
|
globalThis.process?.versions?.node;
|