apex-auditor 0.2.9 → 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 +49 -99
- package/dist/accessibility-types.js +1 -0
- package/dist/accessibility.js +152 -0
- package/dist/axe-script.js +26 -0
- package/dist/bin.js +185 -9
- package/dist/cdp-client.js +264 -0
- package/dist/cli.js +1608 -75
- package/dist/config.js +11 -0
- package/dist/lighthouse-runner.js +580 -54
- package/dist/lighthouse-worker.js +248 -0
- package/dist/measure-cli.js +139 -0
- package/dist/measure-runner.js +447 -0
- package/dist/measure-types.js +1 -0
- package/dist/shell-cli.js +566 -0
- package/dist/spinner.js +37 -0
- package/dist/ui/render-panel.js +46 -0
- package/dist/ui/render-table.js +61 -0
- package/dist/ui/ui-theme.js +47 -0
- package/dist/url.js +6 -0
- package/dist/webhooks.js +29 -0
- package/dist/wizard-cli.js +15 -22
- package/package.json +4 -2
package/dist/config.js
CHANGED
|
@@ -25,8 +25,15 @@ function normaliseConfig(input, absolutePath) {
|
|
|
25
25
|
const pages = pagesInput.map((page, index) => normalisePage(page, index, absolutePath));
|
|
26
26
|
const baseUrl = maybeConfig.baseUrl.replace(/\/$/, "");
|
|
27
27
|
const query = typeof maybeConfig.query === "string" ? maybeConfig.query : undefined;
|
|
28
|
+
const buildId = typeof maybeConfig.buildId === "string" && maybeConfig.buildId.length > 0 ? maybeConfig.buildId : undefined;
|
|
28
29
|
const chromePort = typeof maybeConfig.chromePort === "number" ? maybeConfig.chromePort : undefined;
|
|
29
30
|
const runs = typeof maybeConfig.runs === "number" && maybeConfig.runs > 0 ? maybeConfig.runs : undefined;
|
|
31
|
+
if (runs !== undefined && runs !== 1) {
|
|
32
|
+
throw new Error(`Invalid config at ${absolutePath}: runs must be 1 (multi-run mode is no longer supported)`);
|
|
33
|
+
}
|
|
34
|
+
const auditTimeoutMs = typeof maybeConfig.auditTimeoutMs === "number" && maybeConfig.auditTimeoutMs > 0
|
|
35
|
+
? maybeConfig.auditTimeoutMs
|
|
36
|
+
: undefined;
|
|
30
37
|
const rawLogLevel = maybeConfig.logLevel;
|
|
31
38
|
const logLevel = rawLogLevel === "silent" || rawLogLevel === "error" || rawLogLevel === "info" || rawLogLevel === "verbose"
|
|
32
39
|
? rawLogLevel
|
|
@@ -44,17 +51,21 @@ function normaliseConfig(input, absolutePath) {
|
|
|
44
51
|
? rawParallel
|
|
45
52
|
: undefined;
|
|
46
53
|
const warmUp = typeof maybeConfig.warmUp === "boolean" ? maybeConfig.warmUp : undefined;
|
|
54
|
+
const incremental = typeof maybeConfig.incremental === "boolean" ? maybeConfig.incremental : undefined;
|
|
47
55
|
const budgets = normaliseBudgets(maybeConfig.budgets, absolutePath);
|
|
48
56
|
return {
|
|
49
57
|
baseUrl,
|
|
50
58
|
query,
|
|
59
|
+
buildId,
|
|
51
60
|
chromePort,
|
|
52
61
|
runs,
|
|
62
|
+
auditTimeoutMs,
|
|
53
63
|
logLevel,
|
|
54
64
|
throttlingMethod,
|
|
55
65
|
cpuSlowdownMultiplier,
|
|
56
66
|
parallel,
|
|
57
67
|
warmUp,
|
|
68
|
+
incremental,
|
|
58
69
|
pages,
|
|
59
70
|
budgets,
|
|
60
71
|
};
|