vortix-cli 0.1.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/LICENSE +21 -0
- package/README.md +80 -0
- package/dist/adapters/index.d.ts +5 -0
- package/dist/adapters/types.d.ts +13 -0
- package/dist/checks/accessibility/axe.d.ts +2 -0
- package/dist/checks/accessibility/color-contrast.d.ts +2 -0
- package/dist/checks/accessibility/run-axe.d.ts +6 -0
- package/dist/checks/bugs/anchor-links.d.ts +2 -0
- package/dist/checks/bugs/broken-links.d.ts +2 -0
- package/dist/checks/bugs/console-errors.d.ts +2 -0
- package/dist/checks/bugs/nested-block-elements.d.ts +2 -0
- package/dist/checks/bugs/viewport-meta.d.ts +2 -0
- package/dist/checks/index.d.ts +2 -0
- package/dist/checks/maintainability/dead-css.d.ts +2 -0
- package/dist/checks/maintainability/duplication.d.ts +2 -0
- package/dist/checks/maintainability/license-check.d.ts +2 -0
- package/dist/checks/maintainability/outdated-dependencies.d.ts +2 -0
- package/dist/checks/performance/asset-weight.d.ts +2 -0
- package/dist/checks/performance/core-web-vitals.d.ts +2 -0
- package/dist/checks/performance/image-format.d.ts +2 -0
- package/dist/checks/performance/lazy-loading.d.ts +2 -0
- package/dist/checks/performance/third-party-impact.d.ts +2 -0
- package/dist/checks/privacy/external-fonts.d.ts +2 -0
- package/dist/checks/privacy/fingerprinting.d.ts +2 -0
- package/dist/checks/privacy/match-domains.d.ts +2 -0
- package/dist/checks/privacy/tracker-requests.d.ts +2 -0
- package/dist/checks/security/cookie-security.d.ts +2 -0
- package/dist/checks/security/dependency-vulnerabilities.d.ts +2 -0
- package/dist/checks/security/https-enforced.d.ts +2 -0
- package/dist/checks/security/mixed-content.d.ts +2 -0
- package/dist/checks/security/security-headers.d.ts +2 -0
- package/dist/checks/security/server-info-disclosure.d.ts +2 -0
- package/dist/checks/seo/canonical-url.d.ts +2 -0
- package/dist/checks/seo/meta-tags.d.ts +2 -0
- package/dist/checks/seo/og-images.d.ts +2 -0
- package/dist/checks/seo/robots-sitemap.d.ts +2 -0
- package/dist/checks/seo/structured-data.d.ts +2 -0
- package/dist/chunk-KNVCFVGJ.js +183 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +3112 -0
- package/dist/commands/check.d.ts +5 -0
- package/dist/commands/ci.d.ts +5 -0
- package/dist/commands/config.d.ts +1 -0
- package/dist/commands/detail-ui.d.ts +2 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/progress-ui.d.ts +3 -0
- package/dist/core/config.d.ts +6 -0
- package/dist/core/define-check.d.ts +2 -0
- package/dist/core/detail.d.ts +2 -0
- package/dist/core/finding.d.ts +2 -0
- package/dist/core/load-checks.d.ts +10 -0
- package/dist/core/messages.d.ts +3 -0
- package/dist/core/report.d.ts +15 -0
- package/dist/core/runner.d.ts +64 -0
- package/dist/core/score.d.ts +9 -0
- package/dist/core/types.d.ts +162 -0
- package/dist/dynamic/serve.d.ts +5 -0
- package/dist/dynamic/session.d.ts +8 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -0
- package/dist/utils/box.d.ts +19 -0
- package/dist/utils/budget.d.ts +2 -0
- package/dist/utils/clipboard.d.ts +1 -0
- package/dist/utils/exec.d.ts +18 -0
- package/dist/utils/github-workflow.d.ts +9 -0
- package/dist/utils/glob.d.ts +3 -0
- package/dist/utils/html.d.ts +2 -0
- package/dist/utils/humanize.d.ts +1 -0
- package/dist/utils/package-manager.d.ts +3 -0
- package/dist/utils/pages.d.ts +2 -0
- package/dist/utils/resolve-bin.d.ts +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function configCommand(): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ResolvedConfig, VortixConfig } from "./types.js";
|
|
2
|
+
export declare const CONFIG_DIR = ".vortix";
|
|
3
|
+
export declare const CONFIG_FILE = "config.json";
|
|
4
|
+
export declare function defineConfig(config: VortixConfig): VortixConfig;
|
|
5
|
+
export declare function getConfigPath(cwd: string): string;
|
|
6
|
+
export declare function loadConfig(cwd: string): ResolvedConfig;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CheckDefinition, ResolvedConfig } from "./types.js";
|
|
2
|
+
export interface LoadChecksResult {
|
|
3
|
+
checks: CheckDefinition[];
|
|
4
|
+
/** Custom check modules that failed to load. Surfaced as run-level findings, never as a crash. */
|
|
5
|
+
loadErrors: {
|
|
6
|
+
specifier: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
export declare function loadChecks(config: ResolvedConfig): Promise<LoadChecksResult>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RunResult } from "./runner.js";
|
|
2
|
+
import type { CheckDetail, CheckSummary, Finding } from "./types.js";
|
|
3
|
+
export declare function printReport(result: RunResult): void;
|
|
4
|
+
/**
|
|
5
|
+
* Renders the score summary as a bordered box with a block-letter grade badge. Printed as soon
|
|
6
|
+
* as the checks finish, rather than behind the interactive "Done" step.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildScoreCard(result: RunResult, color?: boolean): string;
|
|
9
|
+
export declare function checkOptionLabel(check: CheckSummary, findings: Finding[], skipReason?: string): {
|
|
10
|
+
label: string;
|
|
11
|
+
hint: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function buildFullReport(result: RunResult): string;
|
|
14
|
+
export declare function buildHeader(result: RunResult): string;
|
|
15
|
+
export declare function buildCheckDetail(check: CheckSummary, findings: Finding[], details: CheckDetail[], skipReason?: string): string;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { CheckDetail, CheckSummary, Finding, PageInfo, ResolvedConfig } from "./types.js";
|
|
2
|
+
export interface RunResult {
|
|
3
|
+
findings: Finding[];
|
|
4
|
+
details: CheckDetail[];
|
|
5
|
+
checks: CheckSummary[];
|
|
6
|
+
skipped: Record<string, string>;
|
|
7
|
+
adapterName: string;
|
|
8
|
+
outputDir: string;
|
|
9
|
+
pagesChecked: number;
|
|
10
|
+
totalPages: number;
|
|
11
|
+
liveUrl?: string;
|
|
12
|
+
exitCode: number;
|
|
13
|
+
/** Custom check modules from config.checks[] that failed to load. Never fatal to the run. */
|
|
14
|
+
configErrors: string[];
|
|
15
|
+
}
|
|
16
|
+
export type ProgressEvent = {
|
|
17
|
+
type: "build-start";
|
|
18
|
+
} | {
|
|
19
|
+
type: "build-done";
|
|
20
|
+
} | {
|
|
21
|
+
type: "static-start";
|
|
22
|
+
index: number;
|
|
23
|
+
total: number;
|
|
24
|
+
} | {
|
|
25
|
+
type: "static-check";
|
|
26
|
+
check: CheckSummary;
|
|
27
|
+
index: number;
|
|
28
|
+
total: number;
|
|
29
|
+
} | {
|
|
30
|
+
type: "static-done";
|
|
31
|
+
total: number;
|
|
32
|
+
} | {
|
|
33
|
+
type: "dynamic-start";
|
|
34
|
+
index: number;
|
|
35
|
+
total: number;
|
|
36
|
+
} | {
|
|
37
|
+
type: "dynamic-page-start";
|
|
38
|
+
pageInfo: PageInfo;
|
|
39
|
+
index: number;
|
|
40
|
+
total: number;
|
|
41
|
+
} | {
|
|
42
|
+
type: "dynamic-page-done";
|
|
43
|
+
pageInfo: PageInfo;
|
|
44
|
+
index: number;
|
|
45
|
+
total: number;
|
|
46
|
+
} | {
|
|
47
|
+
type: "dynamic-done";
|
|
48
|
+
total: number;
|
|
49
|
+
} | {
|
|
50
|
+
type: "live-start";
|
|
51
|
+
url: string;
|
|
52
|
+
index: number;
|
|
53
|
+
total: number;
|
|
54
|
+
} | {
|
|
55
|
+
type: "live-check";
|
|
56
|
+
check: CheckSummary;
|
|
57
|
+
index: number;
|
|
58
|
+
total: number;
|
|
59
|
+
} | {
|
|
60
|
+
type: "live-done";
|
|
61
|
+
total: number;
|
|
62
|
+
};
|
|
63
|
+
export type OnProgress = (event: ProgressEvent) => void;
|
|
64
|
+
export declare function runVortix(config: ResolvedConfig, onProgress?: OnProgress, liveUrl?: string): Promise<RunResult>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CheckSummary, Finding, Severity } from "./types.js";
|
|
2
|
+
export type Grade = "A" | "B" | "C" | "D" | "F";
|
|
3
|
+
export interface Score {
|
|
4
|
+
value: number;
|
|
5
|
+
grade: Grade;
|
|
6
|
+
cappedByError: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const SEVERITY_RANK: Record<Severity, number>;
|
|
9
|
+
export declare function computeScore(checks: CheckSummary[], findings: Finding[], skippedCheckIds?: ReadonlySet<string>): Score;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import type { Page } from "playwright";
|
|
2
|
+
export type Category = "performance" | "security" | "accessibility" | "bugs" | "seo" | "maintainability" | "privacy";
|
|
3
|
+
export declare const CATEGORIES: Category[];
|
|
4
|
+
export type Severity = "error" | "warn" | "info";
|
|
5
|
+
export interface Finding {
|
|
6
|
+
checkId: string;
|
|
7
|
+
category: Category;
|
|
8
|
+
severity: Severity;
|
|
9
|
+
message: string;
|
|
10
|
+
file?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface FindingInput {
|
|
14
|
+
message: string;
|
|
15
|
+
file?: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
severity?: Severity;
|
|
18
|
+
}
|
|
19
|
+
export type CheckMode = "static" | "dynamic" | "live";
|
|
20
|
+
export interface DetailInput {
|
|
21
|
+
label: string;
|
|
22
|
+
value: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface CheckDetail extends DetailInput {
|
|
26
|
+
checkId: string;
|
|
27
|
+
category: Category;
|
|
28
|
+
}
|
|
29
|
+
export interface PageInfo {
|
|
30
|
+
file: string;
|
|
31
|
+
relativeFile: string;
|
|
32
|
+
urlPath: string;
|
|
33
|
+
}
|
|
34
|
+
export interface CapturedConsoleMessage {
|
|
35
|
+
type: string;
|
|
36
|
+
text: string;
|
|
37
|
+
}
|
|
38
|
+
export interface CapturedNetworkRequest {
|
|
39
|
+
url: string;
|
|
40
|
+
status: number;
|
|
41
|
+
contentType: string | null;
|
|
42
|
+
bodySize: number;
|
|
43
|
+
isMainFrame: boolean;
|
|
44
|
+
resourceType: string;
|
|
45
|
+
}
|
|
46
|
+
export interface LiveCheckContext {
|
|
47
|
+
url: string;
|
|
48
|
+
parsedUrl: URL;
|
|
49
|
+
headers: Record<string, string>;
|
|
50
|
+
setCookieHeaders: string[];
|
|
51
|
+
status: number;
|
|
52
|
+
redirected: boolean;
|
|
53
|
+
finalUrl: string;
|
|
54
|
+
isHttps: boolean;
|
|
55
|
+
html: string;
|
|
56
|
+
config: ResolvedConfig;
|
|
57
|
+
finding(input: FindingInput): Finding;
|
|
58
|
+
detail(input: DetailInput): void;
|
|
59
|
+
skip(reason: string): never;
|
|
60
|
+
}
|
|
61
|
+
export interface VortixConfig {
|
|
62
|
+
target?: {
|
|
63
|
+
adapter?: string;
|
|
64
|
+
outputDir?: string;
|
|
65
|
+
buildCommand?: string;
|
|
66
|
+
};
|
|
67
|
+
build?: boolean;
|
|
68
|
+
categories?: Partial<Record<Category, boolean>>;
|
|
69
|
+
checks?: string[];
|
|
70
|
+
disabledChecks?: string[];
|
|
71
|
+
severity?: Record<string, Severity>;
|
|
72
|
+
failOn?: Severity;
|
|
73
|
+
performance?: {
|
|
74
|
+
budgets?: {
|
|
75
|
+
lcpMs?: number;
|
|
76
|
+
cls?: number;
|
|
77
|
+
maxPageWeightKb?: number;
|
|
78
|
+
maxImageKb?: number;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
privacy?: {
|
|
82
|
+
trackerDomains?: string[];
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export interface ResolvedConfig {
|
|
86
|
+
cwd: string;
|
|
87
|
+
build: boolean;
|
|
88
|
+
failOn: Severity;
|
|
89
|
+
target: NonNullable<VortixConfig["target"]>;
|
|
90
|
+
categories: Record<Category, boolean>;
|
|
91
|
+
checks: string[];
|
|
92
|
+
disabledChecks: string[];
|
|
93
|
+
severity: Record<string, Severity>;
|
|
94
|
+
performance: {
|
|
95
|
+
budgets: {
|
|
96
|
+
lcpMs: number;
|
|
97
|
+
cls: number;
|
|
98
|
+
maxPageWeightKb: number;
|
|
99
|
+
maxImageKb: number;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
privacy: {
|
|
103
|
+
trackerDomains: string[];
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export interface BaseCheckContext {
|
|
107
|
+
siteRoot: string;
|
|
108
|
+
outputDir: string;
|
|
109
|
+
config: ResolvedConfig;
|
|
110
|
+
exec(command: string): Promise<string>;
|
|
111
|
+
glob(pattern: string, options?: {
|
|
112
|
+
cwd?: string;
|
|
113
|
+
}): Promise<string[]>;
|
|
114
|
+
readFile(filePath: string): string;
|
|
115
|
+
fileExists(filePath: string): boolean;
|
|
116
|
+
finding(input: FindingInput): Finding;
|
|
117
|
+
detail(input: DetailInput): void;
|
|
118
|
+
skip(reason: string): never;
|
|
119
|
+
}
|
|
120
|
+
export interface StaticCheckContext extends BaseCheckContext {
|
|
121
|
+
mode: "static";
|
|
122
|
+
pages: PageInfo[];
|
|
123
|
+
}
|
|
124
|
+
export interface DynamicCheckContext extends BaseCheckContext {
|
|
125
|
+
mode: "dynamic";
|
|
126
|
+
page: Page;
|
|
127
|
+
pageInfo: PageInfo;
|
|
128
|
+
consoleMessages: CapturedConsoleMessage[];
|
|
129
|
+
networkRequests: CapturedNetworkRequest[];
|
|
130
|
+
}
|
|
131
|
+
export type CheckDefinition = {
|
|
132
|
+
id: string;
|
|
133
|
+
name?: string;
|
|
134
|
+
category: Category;
|
|
135
|
+
mode: "static";
|
|
136
|
+
severity?: Severity;
|
|
137
|
+
description?: string;
|
|
138
|
+
run(ctx: StaticCheckContext): Promise<Finding[] | undefined> | Finding[] | undefined;
|
|
139
|
+
} | {
|
|
140
|
+
id: string;
|
|
141
|
+
name?: string;
|
|
142
|
+
category: Category;
|
|
143
|
+
mode: "dynamic";
|
|
144
|
+
severity?: Severity;
|
|
145
|
+
description?: string;
|
|
146
|
+
run(ctx: DynamicCheckContext): Promise<Finding[] | undefined> | Finding[] | undefined;
|
|
147
|
+
} | {
|
|
148
|
+
id: string;
|
|
149
|
+
name?: string;
|
|
150
|
+
category: Category;
|
|
151
|
+
mode: "live";
|
|
152
|
+
severity?: Severity;
|
|
153
|
+
description?: string;
|
|
154
|
+
run(ctx: LiveCheckContext): Promise<Finding[] | undefined> | Finding[] | undefined;
|
|
155
|
+
};
|
|
156
|
+
export interface CheckSummary {
|
|
157
|
+
id: string;
|
|
158
|
+
name: string;
|
|
159
|
+
category: Category;
|
|
160
|
+
mode: CheckMode;
|
|
161
|
+
description?: string;
|
|
162
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CapturedConsoleMessage, CapturedNetworkRequest } from "@core/types.js";
|
|
2
|
+
import type { Page } from "playwright";
|
|
3
|
+
export interface Capture {
|
|
4
|
+
consoleMessages: CapturedConsoleMessage[];
|
|
5
|
+
networkRequests: CapturedNetworkRequest[];
|
|
6
|
+
detach(): void;
|
|
7
|
+
}
|
|
8
|
+
export declare function attachCapture(page: Page): Capture;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { defineConfig } from "./core/config.js";
|
|
2
|
+
export { defineCheck } from "./core/define-check.js";
|
|
3
|
+
export type { Category, CheckDefinition, CheckMode, DynamicCheckContext, Finding, FindingInput, LiveCheckContext, PageInfo, Severity, StaticCheckContext, VortixConfig, } from "./core/types.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function visibleLength(str: string): number;
|
|
2
|
+
/** Right-pads pre-formatted (possibly ANSI-colored) text with spaces to a minimum visible width, for aligning grid columns. */
|
|
3
|
+
export declare function padVisible(str: string, width: number): string;
|
|
4
|
+
/** Word-wraps plain, uncolored text to a maximum visible width. Callers color the result. */
|
|
5
|
+
export declare function wrapPlainText(text: string, maxWidth: number): string[];
|
|
6
|
+
/**
|
|
7
|
+
* Packs pre-formatted, indivisible chunks (e.g. a colored "✔ category" badge) onto as few
|
|
8
|
+
* lines as fit within `maxWidth`, never splitting a chunk's own text across lines.
|
|
9
|
+
*/
|
|
10
|
+
export declare function packChunks(chunks: string[], maxWidth: number, separator?: string): string[];
|
|
11
|
+
export interface RenderBoxOptions {
|
|
12
|
+
title?: string;
|
|
13
|
+
padding?: number;
|
|
14
|
+
minWidth?: number;
|
|
15
|
+
}
|
|
16
|
+
/** Draws a box-drawing border around pre-formatted, possibly ANSI-colored, lines. */
|
|
17
|
+
export declare function renderBox(lines: string[], options?: RenderBoxOptions): string;
|
|
18
|
+
/** Renders a horizontal rule for sectioning long text, such as a check's detail view. */
|
|
19
|
+
export declare function divider(width?: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copyToClipboard(text: string): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ExecOptions {
|
|
2
|
+
cwd: string;
|
|
3
|
+
/** Kill the process and reject if it runs longer than this. Default: 5 minutes. */
|
|
4
|
+
timeoutMs?: number;
|
|
5
|
+
/**
|
|
6
|
+
* Some CLIs (npm audit, npm outdated, jscpd) use a non-zero exit code to report "found
|
|
7
|
+
* something" rather than "crashed". When enabled, such an exit resolves with stdout or
|
|
8
|
+
* stderr instead of rejecting. Disabled by default so that genuine failures, such as a
|
|
9
|
+
* site's build command, surface as errors instead of being silently swallowed.
|
|
10
|
+
*/
|
|
11
|
+
allowNonZeroExit?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ExecError extends Error {
|
|
14
|
+
stdout: string;
|
|
15
|
+
stderr: string;
|
|
16
|
+
code: number | string | null;
|
|
17
|
+
}
|
|
18
|
+
export declare function exec(command: string, options: ExecOptions): Promise<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PackageManager } from "./package-manager.js";
|
|
2
|
+
export declare const GITHUB_WORKFLOW_PATH = ".github/workflows/vortix.yml";
|
|
3
|
+
export declare function getGithubWorkflowPath(cwd: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Builds a GitHub Actions workflow that installs dependencies with the given package manager and
|
|
6
|
+
* runs `vortix ci` on every push and pull request. `vortix ci` builds the site itself (per the
|
|
7
|
+
* project's `.vortix/config.json`), so no separate build step is needed here.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildGithubWorkflowYaml(pm: PackageManager): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function humanizeCheckId(id: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolvePackageBin(pkgName: string, binRelativePath: string): string;
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vortix-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Vortix — Swiss-army-knife CLI for static site quality checks — performance, security, accessibility, bugs, maintainability & privacy.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cli",
|
|
7
|
+
"static-site",
|
|
8
|
+
"performance",
|
|
9
|
+
"accessibility",
|
|
10
|
+
"a11y",
|
|
11
|
+
"seo",
|
|
12
|
+
"security",
|
|
13
|
+
"lighthouse",
|
|
14
|
+
"audit",
|
|
15
|
+
"quality",
|
|
16
|
+
"ci"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://github.com/jannikmenzel/vortix-cli#readme",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/jannikmenzel/vortix-cli/issues"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/jannikmenzel/vortix-cli.git"
|
|
25
|
+
},
|
|
26
|
+
"author": "Jannik Menzel",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"type": "module",
|
|
29
|
+
"bin": {
|
|
30
|
+
"vortix": "dist/cli.js"
|
|
31
|
+
},
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"import": "./dist/index.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist"
|
|
42
|
+
],
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsup && tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
46
|
+
"dev": "tsup --watch",
|
|
47
|
+
"typecheck": "tsc --noEmit",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"test:watch": "vitest",
|
|
50
|
+
"lint": "biome lint .",
|
|
51
|
+
"lint:fix": "biome lint --write .",
|
|
52
|
+
"format": "biome format .",
|
|
53
|
+
"format:fix": "biome format --write .",
|
|
54
|
+
"check": "biome check .",
|
|
55
|
+
"check:fix": "biome check --write .",
|
|
56
|
+
"prepare": "husky",
|
|
57
|
+
"prepublishOnly": "npm run check && npm run typecheck && npm run test && npm run build"
|
|
58
|
+
},
|
|
59
|
+
"lint-staged": {
|
|
60
|
+
"*.{ts,tsx,js,jsx,mjs,cjs,json}": [
|
|
61
|
+
"biome check --write --no-errors-on-unmatched"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=20"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@axe-core/playwright": "^4.13.0",
|
|
69
|
+
"@clack/prompts": "^1.7.0",
|
|
70
|
+
"@playwright/browser-chromium": "^1.62.0",
|
|
71
|
+
"commander": "^15.0.0",
|
|
72
|
+
"jscpd": "^5.0.16",
|
|
73
|
+
"node-html-parser": "^9.0.1",
|
|
74
|
+
"picocolors": "^1.1.1",
|
|
75
|
+
"playwright": "^1.62.1",
|
|
76
|
+
"tinyglobby": "^0.2.17"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@biomejs/biome": "2.5.12",
|
|
80
|
+
"@types/node": "^26.2.0",
|
|
81
|
+
"husky": "^9.1.7",
|
|
82
|
+
"lint-staged": "^17.5.0",
|
|
83
|
+
"tsup": "^8.5.1",
|
|
84
|
+
"typescript": "^7.0.2",
|
|
85
|
+
"vitest": "^4.1.11"
|
|
86
|
+
}
|
|
87
|
+
}
|