@wcag-audit/cli 1.0.0-alpha.3 → 1.0.0-alpha.5
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/package.json +1 -1
- package/src/cli.js +1 -1
- package/src/commands/doctor.js +1 -1
- package/src/commands/init.js +1 -1
- package/src/commands/scan.js +2 -2
- package/src/license/log-usage.js +1 -1
- package/src/license/validate.js +1 -1
- package/src/output/agents-md.js +1 -1
- package/src/output/cursor-rules.js +1 -1
- package/src/output/markdown.test.js +2 -2
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ const program = new Command();
|
|
|
18
18
|
program
|
|
19
19
|
.name("wcag-audit")
|
|
20
20
|
.description("WCAG 2.1/2.2 auditor for web projects — with AI-ready fixes for Cursor / Claude Code / Windsurf.")
|
|
21
|
-
.version("1.0.0-alpha.
|
|
21
|
+
.version("1.0.0-alpha.5");
|
|
22
22
|
|
|
23
23
|
// ── init ─────────────────────────────────────────────────────────
|
|
24
24
|
program
|
package/src/commands/doctor.js
CHANGED
|
@@ -5,7 +5,7 @@ import { readGlobalConfig } from "../config/global.js";
|
|
|
5
5
|
import { validateLicense } from "../license/validate.js";
|
|
6
6
|
import { detectFramework } from "../discovery/registry.js";
|
|
7
7
|
|
|
8
|
-
const CLI_VERSION = "1.0.0-alpha.
|
|
8
|
+
const CLI_VERSION = "1.0.0-alpha.5";
|
|
9
9
|
|
|
10
10
|
export async function runDoctor({ cwd = process.cwd(), log = console.log } = {}) {
|
|
11
11
|
const checks = [];
|
package/src/commands/init.js
CHANGED
|
@@ -3,7 +3,7 @@ import { randomUUID } from "crypto";
|
|
|
3
3
|
import { validateLicense } from "../license/validate.js";
|
|
4
4
|
import { writeGlobalConfig } from "../config/global.js";
|
|
5
5
|
|
|
6
|
-
const CLI_VERSION = "1.0.0-alpha.
|
|
6
|
+
const CLI_VERSION = "1.0.0-alpha.5";
|
|
7
7
|
|
|
8
8
|
// runInit can be called two ways:
|
|
9
9
|
// 1. Interactive (no answers) — uses enquirer to prompt
|
package/src/commands/scan.js
CHANGED
|
@@ -17,7 +17,7 @@ import { renderCursorRules } from "../output/cursor-rules.js";
|
|
|
17
17
|
import { upsertAgentsMd } from "../output/agents-md.js";
|
|
18
18
|
import { hashContent, readCacheEntry, writeCacheEntry } from "../cache/route-cache.js";
|
|
19
19
|
|
|
20
|
-
const CLI_VERSION = "1.0.0-alpha.
|
|
20
|
+
const CLI_VERSION = "1.0.0-alpha.5";
|
|
21
21
|
|
|
22
22
|
export async function runScan({
|
|
23
23
|
cwd = process.cwd(),
|
|
@@ -230,7 +230,7 @@ export async function runScan({
|
|
|
230
230
|
if (outputs.has("markdown")) {
|
|
231
231
|
const md = renderFindingsMarkdown({
|
|
232
232
|
projectName,
|
|
233
|
-
generator: `@
|
|
233
|
+
generator: `@wcag-audit/cli v${CLI_VERSION}`,
|
|
234
234
|
totalPages: routes.length,
|
|
235
235
|
wcagVersion: globalCfg.defaults.wcagVersion,
|
|
236
236
|
levels: globalCfg.defaults.conformanceLevel,
|
package/src/license/log-usage.js
CHANGED
package/src/license/validate.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const LICENSE_KEY_RE = /^WCAG-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}$/;
|
|
2
2
|
|
|
3
|
-
const DEFAULT_API_URL = "https://
|
|
3
|
+
const DEFAULT_API_URL = "https://wcagaudit.io/api/v1/license/validate";
|
|
4
4
|
|
|
5
5
|
export function isValidLicenseFormat(key) {
|
|
6
6
|
return typeof key === "string" && LICENSE_KEY_RE.test(key);
|
package/src/output/agents-md.js
CHANGED
|
@@ -11,7 +11,7 @@ function buildSection(body) {
|
|
|
11
11
|
WCAG_SECTION_START,
|
|
12
12
|
"## WCAG Accessibility Fixes",
|
|
13
13
|
"",
|
|
14
|
-
"The latest @
|
|
14
|
+
"The latest @wcag-audit/cli scan produced the fixes below.",
|
|
15
15
|
"Apply them when editing the affected files.",
|
|
16
16
|
"",
|
|
17
17
|
body.trimEnd(),
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export function renderCursorRules({ findings, projectName }) {
|
|
7
7
|
const frontMatter = [
|
|
8
8
|
"---",
|
|
9
|
-
"description: WCAG accessibility fixes generated by @
|
|
9
|
+
"description: WCAG accessibility fixes generated by @wcag-audit/cli",
|
|
10
10
|
`globs: ${JSON.stringify(["src/app/**/*.tsx", "src/app/**/*.ts", "src/components/**/*.tsx"])}`,
|
|
11
11
|
"alwaysApply: false",
|
|
12
12
|
"---",
|
|
@@ -18,14 +18,14 @@ describe("renderFindingsMarkdown", () => {
|
|
|
18
18
|
it("includes a header with project + generator metadata", () => {
|
|
19
19
|
const md = renderFindingsMarkdown({
|
|
20
20
|
projectName: "my-nextjs-app",
|
|
21
|
-
generator: "@
|
|
21
|
+
generator: "@wcag-audit/cli v1.0.0-alpha.1",
|
|
22
22
|
totalPages: 47,
|
|
23
23
|
wcagVersion: "2.2",
|
|
24
24
|
levels: ["A", "AA"],
|
|
25
25
|
findings: [],
|
|
26
26
|
});
|
|
27
27
|
expect(md).toMatch(/# WCAG Audit Findings — my-nextjs-app/);
|
|
28
|
-
expect(md).toMatch(/@
|
|
28
|
+
expect(md).toMatch(/@wcag-audit\/cli v1\.0\.0-alpha\.1/);
|
|
29
29
|
expect(md).toMatch(/Total pages audited: 47/);
|
|
30
30
|
expect(md).toMatch(/WCAG 2\.2 Level A \+ AA/);
|
|
31
31
|
expect(md).toMatch(/No issues found!/);
|