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
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { shouldPrintVitePlusHeader, vitePlusHeader } from "../binding/index.js";
|
|
2
|
+
import { stripVTControlCharacters, styleText } from "node:util";
|
|
3
|
+
//#region src/utils/help.ts
|
|
4
|
+
const HELP_RIGHT_MARGIN = 4;
|
|
5
|
+
function toLines(value) {
|
|
6
|
+
if (!value) return [];
|
|
7
|
+
return Array.isArray(value) ? [...value] : [value];
|
|
8
|
+
}
|
|
9
|
+
function visibleLength(value) {
|
|
10
|
+
return stripVTControlCharacters(value).length;
|
|
11
|
+
}
|
|
12
|
+
function padVisible(value, width) {
|
|
13
|
+
const padding = Math.max(0, width - visibleLength(value));
|
|
14
|
+
return `${value}${" ".repeat(padding)}`;
|
|
15
|
+
}
|
|
16
|
+
function contentWidth() {
|
|
17
|
+
const terminalWidth = process.stdout.columns;
|
|
18
|
+
return Number.isFinite(terminalWidth) ? Math.max(0, terminalWidth - HELP_RIGHT_MARGIN) : Infinity;
|
|
19
|
+
}
|
|
20
|
+
function wrapLine(line, width) {
|
|
21
|
+
if (!Number.isFinite(width) || width <= 0 || visibleLength(line) <= width) return [line];
|
|
22
|
+
const content = line.trim();
|
|
23
|
+
if (!content) return [line];
|
|
24
|
+
const indent = line.slice(0, line.length - line.trimStart().length);
|
|
25
|
+
const output = [];
|
|
26
|
+
let current = indent;
|
|
27
|
+
for (const [, whitespace, word] of content.matchAll(/(\s*)(\S+)/gu)) {
|
|
28
|
+
const candidate = `${current}${current === indent ? "" : whitespace}${word}`;
|
|
29
|
+
if (current === indent || visibleLength(candidate) <= width) current = candidate;
|
|
30
|
+
else {
|
|
31
|
+
output.push(current);
|
|
32
|
+
current = `${indent}${word}`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
output.push(current);
|
|
36
|
+
return output;
|
|
37
|
+
}
|
|
38
|
+
function renderRows(rows) {
|
|
39
|
+
if (rows.length === 0) return [];
|
|
40
|
+
const labelWidth = Math.max(...rows.map((row) => visibleLength(row.label)));
|
|
41
|
+
const descriptionWidth = contentWidth() - labelWidth - 4;
|
|
42
|
+
const output = [];
|
|
43
|
+
for (const row of rows) {
|
|
44
|
+
const descriptionLines = toLines(row.description).flatMap((line) => wrapLine(line, descriptionWidth));
|
|
45
|
+
if (descriptionLines.length === 0) {
|
|
46
|
+
output.push(` ${row.label}`);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const [firstLine, ...rest] = descriptionLines;
|
|
50
|
+
output.push(` ${padVisible(row.label, labelWidth)} ${firstLine}`);
|
|
51
|
+
for (const line of rest) output.push(` ${" ".repeat(labelWidth)} ${line}`);
|
|
52
|
+
}
|
|
53
|
+
return output;
|
|
54
|
+
}
|
|
55
|
+
function heading(label, color) {
|
|
56
|
+
if (!color) return `${label}:`;
|
|
57
|
+
return label === "Usage" ? styleText("bold", `${label}:`) : styleText(["blue", "bold"], `${label}:`);
|
|
58
|
+
}
|
|
59
|
+
function renderMutedCommentSuffix(line, color) {
|
|
60
|
+
if (!color) return line;
|
|
61
|
+
const commentIndex = line.indexOf(" #");
|
|
62
|
+
if (commentIndex === -1) return line;
|
|
63
|
+
return `${line.slice(0, commentIndex)}${styleText("gray", line.slice(commentIndex))}`;
|
|
64
|
+
}
|
|
65
|
+
function renderCliDoc(doc, options = {}) {
|
|
66
|
+
const color = options.color ?? true;
|
|
67
|
+
const output = [];
|
|
68
|
+
if (doc.usage) {
|
|
69
|
+
const usage = color ? styleText("bold", doc.usage) : doc.usage;
|
|
70
|
+
output.push(`${heading("Usage", color)} ${usage}`);
|
|
71
|
+
}
|
|
72
|
+
const summaryLines = toLines(doc.summary);
|
|
73
|
+
if (summaryLines.length > 0) {
|
|
74
|
+
if (output.length > 0) output.push("");
|
|
75
|
+
output.push(...summaryLines);
|
|
76
|
+
}
|
|
77
|
+
for (const section of doc.sections) {
|
|
78
|
+
if (output.length > 0) output.push("");
|
|
79
|
+
output.push(heading(section.title, color));
|
|
80
|
+
const lines = toLines(section.lines);
|
|
81
|
+
if (lines.length > 0) output.push(...lines.flatMap((line) => wrapLine(renderMutedCommentSuffix(line, color), contentWidth())));
|
|
82
|
+
if (section.rows && section.rows.length > 0) output.push(...renderRows(section.rows));
|
|
83
|
+
}
|
|
84
|
+
if (doc.documentationUrl) {
|
|
85
|
+
if (output.length > 0) output.push("");
|
|
86
|
+
output.push(`${heading("Documentation", color)} ${doc.documentationUrl}`);
|
|
87
|
+
}
|
|
88
|
+
output.push("");
|
|
89
|
+
return output.join("\n");
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/utils/terminal.ts
|
|
93
|
+
function log(message) {
|
|
94
|
+
console.log(message);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Emit the Vite+ banner (header line + trailing blank line) to stdout.
|
|
98
|
+
* Gating (non-TTY, git hooks) lives in `shouldPrintVitePlusHeader` on the
|
|
99
|
+
* Rust side so both CLIs stay in sync.
|
|
100
|
+
*/
|
|
101
|
+
function printHeader() {
|
|
102
|
+
if (!shouldPrintVitePlusHeader()) return;
|
|
103
|
+
log(vitePlusHeader());
|
|
104
|
+
log("");
|
|
105
|
+
}
|
|
106
|
+
function accent(text) {
|
|
107
|
+
return styleText("blue", text);
|
|
108
|
+
}
|
|
109
|
+
function muted(text) {
|
|
110
|
+
return styleText("gray", text);
|
|
111
|
+
}
|
|
112
|
+
function success(text) {
|
|
113
|
+
return styleText("green", text);
|
|
114
|
+
}
|
|
115
|
+
function formatDuration(durationMs) {
|
|
116
|
+
if (durationMs < 1e3) return `${Math.max(1, durationMs)}ms`;
|
|
117
|
+
const durationSeconds = durationMs / 1e3;
|
|
118
|
+
if (durationSeconds < 10) return `${durationSeconds.toFixed(1)}s`;
|
|
119
|
+
return `${Math.round(durationSeconds)}s`;
|
|
120
|
+
}
|
|
121
|
+
function warnMsg(msg) {
|
|
122
|
+
console.error(styleText(["yellow", "bold"], "warn:"), msg);
|
|
123
|
+
}
|
|
124
|
+
function errorMsg(msg) {
|
|
125
|
+
console.error(styleText(["red", "bold"], "error:"), msg);
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { muted as a, warnMsg as c, log as i, renderCliDoc as l, errorMsg as n, printHeader as o, formatDuration as r, success as s, accent as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../../../_at-vitest-browser/context'
|
|
1
|
+
export * from '../../../_at-vitest-browser/context.js'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CustomComparatorsRegistry } from '../../_at-vitest-browser';
|
|
2
|
-
export { defineBrowserCommand } from '../../_at-vitest-browser';
|
|
1
|
+
import { CustomComparatorsRegistry } from '../../_at-vitest-browser.js';
|
|
2
|
+
export { defineBrowserCommand } from '../../_at-vitest-browser.js';
|
|
3
3
|
import { Page, Frame, FrameLocator, BrowserContext, CDPSession, Browser, LaunchOptions, ConnectOptions, BrowserContextOptions } from 'playwright';
|
|
4
|
-
import { ScreenshotMatcherOptions, ScreenshotComparatorRegistry, Locator } from '../../browser';
|
|
5
|
-
import { BrowserProvider, BrowserModuleMocker, TestProject, CDPSession as CDPSession$1, BrowserProviderOption } from '../../node';
|
|
4
|
+
import { ScreenshotMatcherOptions, ScreenshotComparatorRegistry, Locator } from '../../browser.js';
|
|
5
|
+
import { BrowserProvider, BrowserModuleMocker, TestProject, CDPSession as CDPSession$1, BrowserProviderOption } from '../../node.js';
|
|
6
6
|
|
|
7
7
|
declare const playwrightBrowsers: readonly ["firefox", "webkit", "chromium"];
|
|
8
8
|
type PlaywrightBrowser = (typeof playwrightBrowsers)[number];
|
|
@@ -82,7 +82,7 @@ declare class PlaywrightBrowserProvider implements BrowserProvider {
|
|
|
82
82
|
getCDPSession(sessionid: string): Promise<CDPSession$1>;
|
|
83
83
|
close(): Promise<void>;
|
|
84
84
|
}
|
|
85
|
-
declare module '../../node' {
|
|
85
|
+
declare module '../../node.js' {
|
|
86
86
|
interface BrowserCommandContext {
|
|
87
87
|
page: Page;
|
|
88
88
|
frame(): Promise<Frame>;
|
|
@@ -105,7 +105,7 @@ type PWDragAndDropOptions = NonNullable<Parameters<Page["dragAndDrop"]>[2]>;
|
|
|
105
105
|
type PWSetInputFiles = NonNullable<Parameters<Page["setInputFiles"]>[2]>;
|
|
106
106
|
type PWCDPSession = Pick<CDPSession, "send" | "on" | "off" | "once">;
|
|
107
107
|
|
|
108
|
-
declare module '../../browser' {
|
|
108
|
+
declare module '../../browser.js' {
|
|
109
109
|
interface UserEventHoverOptions extends PWHoverOptions {}
|
|
110
110
|
interface UserEventClickOptions extends PWClickOptions {}
|
|
111
111
|
interface UserEventDoubleClickOptions extends PWDoubleClickOptions {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../../../_at-vitest-browser/context'
|
|
1
|
+
export * from '../../../_at-vitest-browser/context.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SelectorOptions } from '../../browser';
|
|
2
|
-
import { BrowserProvider, TestProject, BrowserProviderOption } from '../../node';
|
|
3
|
-
export { defineBrowserCommand } from '../../_at-vitest-browser';
|
|
1
|
+
import { SelectorOptions } from '../../browser.js';
|
|
2
|
+
import { BrowserProvider, TestProject, BrowserProviderOption } from '../../node.js';
|
|
3
|
+
export { defineBrowserCommand } from '../../_at-vitest-browser.js';
|
|
4
4
|
|
|
5
5
|
declare function preview(): BrowserProviderOption;
|
|
6
6
|
declare class PreviewBrowserProvider implements BrowserProvider {
|
|
@@ -16,7 +16,7 @@ declare class PreviewBrowserProvider implements BrowserProvider {
|
|
|
16
16
|
openPage(_sessionId: string, url: string): Promise<void>;
|
|
17
17
|
close(): Promise<void>;
|
|
18
18
|
}
|
|
19
|
-
declare module '../../browser' {
|
|
19
|
+
declare module '../../browser.js' {
|
|
20
20
|
interface UserEventClickOptions extends SelectorOptions {}
|
|
21
21
|
interface UserEventHoverOptions extends SelectorOptions {}
|
|
22
22
|
interface UserEventFillOptions extends SelectorOptions {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../../../_at-vitest-browser/context'
|
|
1
|
+
export * from '../../../_at-vitest-browser/context.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CustomComparatorsRegistry } from '../../_at-vitest-browser';
|
|
2
|
-
export { defineBrowserCommand } from '../../_at-vitest-browser';
|
|
3
|
-
import { SelectorOptions, ScreenshotMatcherOptions, ScreenshotComparatorRegistry } from '../../browser';
|
|
4
|
-
import { BrowserProvider, TestProject, CDPSession, BrowserProviderOption } from '../../node';
|
|
1
|
+
import { CustomComparatorsRegistry } from '../../_at-vitest-browser.js';
|
|
2
|
+
export { defineBrowserCommand } from '../../_at-vitest-browser.js';
|
|
3
|
+
import { SelectorOptions, ScreenshotMatcherOptions, ScreenshotComparatorRegistry } from '../../browser.js';
|
|
4
|
+
import { BrowserProvider, TestProject, CDPSession, BrowserProviderOption } from '../../node.js';
|
|
5
5
|
import { ClickOptions, MoveToOptions, DragAndDropOptions, remote } from 'webdriverio';
|
|
6
6
|
|
|
7
7
|
declare const webdriverBrowsers: readonly ["firefox", "chrome", "edge", "safari"];
|
|
@@ -38,7 +38,7 @@ declare class WebdriverBrowserProvider implements BrowserProvider {
|
|
|
38
38
|
close(): Promise<void>;
|
|
39
39
|
getCDPSession(_sessionId: string): Promise<CDPSession>;
|
|
40
40
|
}
|
|
41
|
-
declare module '../../browser' {
|
|
41
|
+
declare module '../../browser.js' {
|
|
42
42
|
interface UserEventClickOptions extends Partial<ClickOptions>, SelectorOptions {}
|
|
43
43
|
interface UserEventHoverOptions extends MoveToOptions, SelectorOptions {}
|
|
44
44
|
interface UserEventDragAndDropOptions extends DragAndDropOptions {
|
|
@@ -61,7 +61,7 @@ interface WebdriverCDPSession {
|
|
|
61
61
|
once: (event: string, listener: (...args: unknown[]) => void) => void;
|
|
62
62
|
off: (event: string, listener: (...args: unknown[]) => void) => void;
|
|
63
63
|
}
|
|
64
|
-
declare module '../../node' {
|
|
64
|
+
declare module '../../node.js' {
|
|
65
65
|
interface BrowserCommandContext {
|
|
66
66
|
browser: WebdriverIO.Browser;
|
|
67
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../_at-vitest-browser/context'
|
|
1
|
+
export * from '../_at-vitest-browser/context.js'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CustomComparatorsRegistry } from './_at-vitest-browser';
|
|
2
|
-
export { defineBrowserCommand } from './_at-vitest-browser';
|
|
1
|
+
import { CustomComparatorsRegistry } from './_at-vitest-browser.js';
|
|
2
|
+
export { defineBrowserCommand } from './_at-vitest-browser.js';
|
|
3
3
|
import { Page, Frame, FrameLocator, BrowserContext, CDPSession, Browser, LaunchOptions, ConnectOptions, BrowserContextOptions } from 'playwright';
|
|
4
|
-
import { ScreenshotMatcherOptions, ScreenshotComparatorRegistry, Locator } from './browser';
|
|
5
|
-
import { BrowserProvider, BrowserModuleMocker, TestProject, CDPSession as CDPSession$1, BrowserProviderOption } from './node';
|
|
4
|
+
import { ScreenshotMatcherOptions, ScreenshotComparatorRegistry, Locator } from './browser.js';
|
|
5
|
+
import { BrowserProvider, BrowserModuleMocker, TestProject, CDPSession as CDPSession$1, BrowserProviderOption } from './node.js';
|
|
6
6
|
|
|
7
7
|
declare const playwrightBrowsers: readonly ["firefox", "webkit", "chromium"];
|
|
8
8
|
type PlaywrightBrowser = (typeof playwrightBrowsers)[number];
|
|
@@ -82,7 +82,7 @@ declare class PlaywrightBrowserProvider implements BrowserProvider {
|
|
|
82
82
|
getCDPSession(sessionid: string): Promise<CDPSession$1>;
|
|
83
83
|
close(): Promise<void>;
|
|
84
84
|
}
|
|
85
|
-
declare module './node' {
|
|
85
|
+
declare module './node.js' {
|
|
86
86
|
interface BrowserCommandContext {
|
|
87
87
|
page: Page;
|
|
88
88
|
frame(): Promise<Frame>;
|
|
@@ -105,7 +105,7 @@ type PWDragAndDropOptions = NonNullable<Parameters<Page["dragAndDrop"]>[2]>;
|
|
|
105
105
|
type PWSetInputFiles = NonNullable<Parameters<Page["setInputFiles"]>[2]>;
|
|
106
106
|
type PWCDPSession = Pick<CDPSession, "send" | "on" | "off" | "once">;
|
|
107
107
|
|
|
108
|
-
declare module './browser' {
|
|
108
|
+
declare module './browser.js' {
|
|
109
109
|
interface UserEventHoverOptions extends PWHoverOptions {}
|
|
110
110
|
interface UserEventClickOptions extends PWClickOptions {}
|
|
111
111
|
interface UserEventDoubleClickOptions extends PWDoubleClickOptions {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../_at-vitest-browser/context'
|
|
1
|
+
export * from '../_at-vitest-browser/context.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SelectorOptions } from './browser';
|
|
2
|
-
import { BrowserProvider, TestProject, BrowserProviderOption } from './node';
|
|
3
|
-
export { defineBrowserCommand } from './_at-vitest-browser';
|
|
1
|
+
import { SelectorOptions } from './browser.js';
|
|
2
|
+
import { BrowserProvider, TestProject, BrowserProviderOption } from './node.js';
|
|
3
|
+
export { defineBrowserCommand } from './_at-vitest-browser.js';
|
|
4
4
|
|
|
5
5
|
declare function preview(): BrowserProviderOption;
|
|
6
6
|
declare class PreviewBrowserProvider implements BrowserProvider {
|
|
@@ -16,7 +16,7 @@ declare class PreviewBrowserProvider implements BrowserProvider {
|
|
|
16
16
|
openPage(_sessionId: string, url: string): Promise<void>;
|
|
17
17
|
close(): Promise<void>;
|
|
18
18
|
}
|
|
19
|
-
declare module './browser' {
|
|
19
|
+
declare module './browser.js' {
|
|
20
20
|
interface UserEventClickOptions extends SelectorOptions {}
|
|
21
21
|
interface UserEventHoverOptions extends SelectorOptions {}
|
|
22
22
|
interface UserEventFillOptions extends SelectorOptions {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../_at-vitest-browser/context'
|
|
1
|
+
export * from '../_at-vitest-browser/context.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CustomComparatorsRegistry } from './_at-vitest-browser';
|
|
2
|
-
export { defineBrowserCommand } from './_at-vitest-browser';
|
|
3
|
-
import { SelectorOptions, ScreenshotMatcherOptions, ScreenshotComparatorRegistry } from './browser';
|
|
4
|
-
import { BrowserProvider, TestProject, CDPSession, BrowserProviderOption } from './node';
|
|
1
|
+
import { CustomComparatorsRegistry } from './_at-vitest-browser.js';
|
|
2
|
+
export { defineBrowserCommand } from './_at-vitest-browser.js';
|
|
3
|
+
import { SelectorOptions, ScreenshotMatcherOptions, ScreenshotComparatorRegistry } from './browser.js';
|
|
4
|
+
import { BrowserProvider, TestProject, CDPSession, BrowserProviderOption } from './node.js';
|
|
5
5
|
import { ClickOptions, MoveToOptions, DragAndDropOptions, remote } from 'webdriverio';
|
|
6
6
|
|
|
7
7
|
declare const webdriverBrowsers: readonly ["firefox", "chrome", "edge", "safari"];
|
|
@@ -38,7 +38,7 @@ declare class WebdriverBrowserProvider implements BrowserProvider {
|
|
|
38
38
|
close(): Promise<void>;
|
|
39
39
|
getCDPSession(_sessionId: string): Promise<CDPSession>;
|
|
40
40
|
}
|
|
41
|
-
declare module './browser' {
|
|
41
|
+
declare module './browser.js' {
|
|
42
42
|
interface UserEventClickOptions extends Partial<ClickOptions>, SelectorOptions {}
|
|
43
43
|
interface UserEventHoverOptions extends MoveToOptions, SelectorOptions {}
|
|
44
44
|
interface UserEventDragAndDropOptions extends DragAndDropOptions {
|
|
@@ -61,7 +61,7 @@ interface WebdriverCDPSession {
|
|
|
61
61
|
once: (event: string, listener: (...args: unknown[]) => void) => void;
|
|
62
62
|
off: (event: string, listener: (...args: unknown[]) => void) => void;
|
|
63
63
|
}
|
|
64
|
-
declare module './node' {
|
|
64
|
+
declare module './node.js' {
|
|
65
65
|
interface BrowserCommandContext {
|
|
66
66
|
browser: WebdriverIO.Browser;
|
|
67
67
|
}
|
package/dist/test/context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SerializedConfig } from 'vitest'
|
|
2
|
-
import { StringifyOptions, CDPSession, BrowserCommands } from './internal/browser'
|
|
2
|
+
import { StringifyOptions, CDPSession, BrowserCommands } from './internal/browser.js'
|
|
3
3
|
import { ARIARole } from './aria-role.js'
|
|
4
4
|
import {} from './matchers.js'
|
|
5
5
|
|
|
@@ -877,9 +877,9 @@ export interface BrowserLocators {
|
|
|
877
877
|
*
|
|
878
878
|
* @example
|
|
879
879
|
* ```ts
|
|
880
|
-
* import { locators } from './browser'
|
|
880
|
+
* import { locators } from './browser.js'
|
|
881
881
|
*
|
|
882
|
-
* declare module './browser' {
|
|
882
|
+
* declare module './browser.js' {
|
|
883
883
|
* interface LocatorSelectors {
|
|
884
884
|
* getByCSS(css: string): Locator
|
|
885
885
|
* }
|
package/dist/test/locators.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UserEventClickOptions, UserEventWheelOptions, UserEventClearOptions, UserEventHoverOptions, UserEventFillOptions, UserEventUploadOptions, UserEventDragAndDropOptions, UserEventSelectOptions, LocatorScreenshotOptions, MarkOptions, LocatorByRoleOptions, LocatorOptions, SelectorOptions } from './browser';
|
|
1
|
+
import { UserEventClickOptions, UserEventWheelOptions, UserEventClearOptions, UserEventHoverOptions, UserEventFillOptions, UserEventUploadOptions, UserEventDragAndDropOptions, UserEventSelectOptions, LocatorScreenshotOptions, MarkOptions, LocatorByRoleOptions, LocatorOptions, SelectorOptions } from './browser.js';
|
|
2
2
|
|
|
3
3
|
//#region src/cssParser.d.ts
|
|
4
4
|
type ClauseCombinator = '' | '>' | '+' | '~' | '>=';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ToolchainNodeKind = 'package' | 'tool' | 'engine';
|
|
2
|
+
export type ToolchainDelivery = 'dependency' | 'bundled' | 'compiled';
|
|
3
|
+
export type ToolchainRelationship = 'depends-on' | 'bundles' | 'uses' | 'compiles';
|
|
4
|
+
export interface ToolchainNode {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly version?: string;
|
|
8
|
+
readonly revision?: string;
|
|
9
|
+
readonly builtAt?: string;
|
|
10
|
+
readonly kind: ToolchainNodeKind;
|
|
11
|
+
readonly delivery: readonly ToolchainDelivery[];
|
|
12
|
+
readonly aliases: readonly string[];
|
|
13
|
+
}
|
|
14
|
+
export interface ToolchainEdge {
|
|
15
|
+
readonly from: string;
|
|
16
|
+
readonly to: string;
|
|
17
|
+
readonly relationship: ToolchainRelationship;
|
|
18
|
+
}
|
|
19
|
+
export interface ToolchainManifest {
|
|
20
|
+
readonly schemaVersion: 1;
|
|
21
|
+
readonly nodes: readonly ToolchainNode[];
|
|
22
|
+
readonly edges: readonly ToolchainEdge[];
|
|
23
|
+
}
|
|
24
|
+
export declare const toolchain: ToolchainManifest;
|
|
25
|
+
export default toolchain;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
export const toolchain = {
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"id": "vite-plus",
|
|
6
|
+
"name": "vite-plus",
|
|
7
|
+
"version": "0.2.9",
|
|
8
|
+
"kind": "package",
|
|
9
|
+
"delivery": [
|
|
10
|
+
"dependency"
|
|
11
|
+
],
|
|
12
|
+
"aliases": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "vite-plus-core",
|
|
16
|
+
"name": "@voidzero-dev/vite-plus-core",
|
|
17
|
+
"version": "0.2.9",
|
|
18
|
+
"kind": "package",
|
|
19
|
+
"delivery": [
|
|
20
|
+
"dependency"
|
|
21
|
+
],
|
|
22
|
+
"aliases": [
|
|
23
|
+
"vite-plus-core"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "vite",
|
|
28
|
+
"name": "vite",
|
|
29
|
+
"version": "8.2.1",
|
|
30
|
+
"kind": "tool",
|
|
31
|
+
"delivery": [
|
|
32
|
+
"bundled"
|
|
33
|
+
],
|
|
34
|
+
"aliases": []
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "rolldown",
|
|
38
|
+
"name": "rolldown",
|
|
39
|
+
"version": "1.2.3",
|
|
40
|
+
"kind": "tool",
|
|
41
|
+
"delivery": [
|
|
42
|
+
"bundled",
|
|
43
|
+
"compiled"
|
|
44
|
+
],
|
|
45
|
+
"aliases": []
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "vitest",
|
|
49
|
+
"name": "vitest",
|
|
50
|
+
"version": "4.1.10",
|
|
51
|
+
"kind": "tool",
|
|
52
|
+
"delivery": [
|
|
53
|
+
"dependency"
|
|
54
|
+
],
|
|
55
|
+
"aliases": []
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "oxlint",
|
|
59
|
+
"name": "oxlint",
|
|
60
|
+
"version": "1.77.0",
|
|
61
|
+
"kind": "tool",
|
|
62
|
+
"delivery": [
|
|
63
|
+
"dependency"
|
|
64
|
+
],
|
|
65
|
+
"aliases": []
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "oxfmt",
|
|
69
|
+
"name": "oxfmt",
|
|
70
|
+
"version": "0.62.0",
|
|
71
|
+
"kind": "tool",
|
|
72
|
+
"delivery": [
|
|
73
|
+
"dependency"
|
|
74
|
+
],
|
|
75
|
+
"aliases": []
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "oxlint-tsgolint",
|
|
79
|
+
"name": "oxlint-tsgolint",
|
|
80
|
+
"version": "7.0.2001",
|
|
81
|
+
"kind": "tool",
|
|
82
|
+
"delivery": [
|
|
83
|
+
"dependency"
|
|
84
|
+
],
|
|
85
|
+
"aliases": [
|
|
86
|
+
"tsgolint"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "tsdown",
|
|
91
|
+
"name": "tsdown",
|
|
92
|
+
"version": "0.22.14",
|
|
93
|
+
"kind": "tool",
|
|
94
|
+
"delivery": [
|
|
95
|
+
"bundled"
|
|
96
|
+
],
|
|
97
|
+
"aliases": []
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "vite-task",
|
|
101
|
+
"name": "vite-task",
|
|
102
|
+
"revision": "d05b1dcdbaabaa69643ee0b89cebe3cd390957e9",
|
|
103
|
+
"builtAt": "2026-08-12T02:51:52Z",
|
|
104
|
+
"kind": "tool",
|
|
105
|
+
"delivery": [
|
|
106
|
+
"compiled"
|
|
107
|
+
],
|
|
108
|
+
"aliases": []
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "oxc",
|
|
112
|
+
"name": "oxc",
|
|
113
|
+
"version": "0.143.0",
|
|
114
|
+
"kind": "engine",
|
|
115
|
+
"delivery": [
|
|
116
|
+
"compiled"
|
|
117
|
+
],
|
|
118
|
+
"aliases": []
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "oxc-resolver",
|
|
122
|
+
"name": "oxc-resolver",
|
|
123
|
+
"version": "11.24.2",
|
|
124
|
+
"kind": "engine",
|
|
125
|
+
"delivery": [
|
|
126
|
+
"compiled"
|
|
127
|
+
],
|
|
128
|
+
"aliases": []
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"edges": [
|
|
132
|
+
{
|
|
133
|
+
"from": "vite-plus",
|
|
134
|
+
"to": "vite-plus-core",
|
|
135
|
+
"relationship": "depends-on"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"from": "vite-plus-core",
|
|
139
|
+
"to": "vite",
|
|
140
|
+
"relationship": "bundles"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"from": "vite",
|
|
144
|
+
"to": "rolldown",
|
|
145
|
+
"relationship": "uses"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"from": "vite-plus-core",
|
|
149
|
+
"to": "rolldown",
|
|
150
|
+
"relationship": "bundles"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"from": "rolldown",
|
|
154
|
+
"to": "oxc",
|
|
155
|
+
"relationship": "compiles"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"from": "rolldown",
|
|
159
|
+
"to": "oxc-resolver",
|
|
160
|
+
"relationship": "compiles"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"from": "vite-plus-core",
|
|
164
|
+
"to": "tsdown",
|
|
165
|
+
"relationship": "bundles"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"from": "vite-plus",
|
|
169
|
+
"to": "vitest",
|
|
170
|
+
"relationship": "depends-on"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"from": "vite-plus",
|
|
174
|
+
"to": "oxlint",
|
|
175
|
+
"relationship": "depends-on"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"from": "vite-plus",
|
|
179
|
+
"to": "oxlint-tsgolint",
|
|
180
|
+
"relationship": "depends-on"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"from": "vite-plus",
|
|
184
|
+
"to": "oxfmt",
|
|
185
|
+
"relationship": "depends-on"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"from": "vite-plus",
|
|
189
|
+
"to": "vite-task",
|
|
190
|
+
"relationship": "compiles"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
};
|
|
194
|
+
export default toolchain;
|