create-website-build-kit 0.1.18 → 0.1.20
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/template/CLAUDE.md +3 -1
- package/template/docs/dependencies.md +14 -5
- package/template/package-lock.json +509 -982
- package/template/package.json +1 -0
- package/template/scripts/a11y-evidence.mjs +31 -4
- package/template/scripts/check-a11y.mjs +16 -1
- package/template/scripts/check-cms.mjs +692 -26
- package/template/scripts/check-drift.mjs +154 -8
- package/template/scripts/lib/literal-content.mjs +233 -0
- package/template/scripts/lib/literal-images.mjs +35 -0
- package/template/scripts/lib/schemes.mjs +98 -10
- package/template/scripts/md-to-pdf.mjs +19 -13
|
@@ -28,30 +28,36 @@ import { readFileSync, writeFileSync, mkdirSync, rmSync } from 'node:fs';
|
|
|
28
28
|
import { dirname, basename, resolve } from 'node:path';
|
|
29
29
|
|
|
30
30
|
/*
|
|
31
|
-
* ⚠ puppeteer
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
31
|
+
* ⚠ puppeteer USED TO BE A TRANSITIVE DEPENDENCY, AND THIS BLOCK IS WHY IT IS
|
|
32
|
+
* NOT ANY MORE. It arrived under `pa11y-ci`, so it was installed here only
|
|
33
|
+
* while pa11y-ci was a devDependency and only while it was installed rather
|
|
34
|
+
* than run as `npx --yes pa11y-ci` — which a project reasonably might do.
|
|
35
35
|
*
|
|
36
36
|
* A fork that did exactly that compensated by hunting for a puppeteer inside
|
|
37
37
|
* `~/.npm/_npx`, found a stale one whose bundled Chrome would not launch, and
|
|
38
38
|
* timed out after thirty seconds with nothing pointing at the cause.
|
|
39
39
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
40
|
+
* The note stayed here, correct and unacted on, until four scripts driving a
|
|
41
|
+
* browser got test cases and shipping them on an implicit dependency stopped
|
|
42
|
+
* being defensible. `puppeteer` is now declared in package.json. This guard
|
|
43
|
+
* stays, because a declaration is not an installation.
|
|
44
|
+
*
|
|
45
|
+
* ⚠ AND THE PACKAGE IS NOT THE BROWSER. puppeteer fetches Chrome in a
|
|
46
|
+
* postinstall, and npm 11 withholds install scripts pending approval, so a
|
|
47
|
+
* clean `npm ci` can leave the module present and the browser absent.
|
|
44
48
|
*/
|
|
45
49
|
let puppeteer;
|
|
46
50
|
try {
|
|
47
51
|
puppeteer = (await import('puppeteer')).default;
|
|
48
52
|
} catch {
|
|
49
53
|
console.error(
|
|
50
|
-
`\nmd-to-pdf needs puppeteer, which is not
|
|
51
|
-
`
|
|
52
|
-
`
|
|
53
|
-
`
|
|
54
|
-
`
|
|
54
|
+
`\nmd-to-pdf needs puppeteer, which is declared in package.json and is not\n` +
|
|
55
|
+
` installed here.\n\n` +
|
|
56
|
+
` Fix: npm install\n\n` +
|
|
57
|
+
` If it installs and Chrome still will not launch, the postinstall that\n` +
|
|
58
|
+
` fetches the browser was withheld — npm 11 holds install scripts until\n` +
|
|
59
|
+
` they are approved:\n\n` +
|
|
60
|
+
` npx puppeteer browsers install chrome\n`,
|
|
55
61
|
);
|
|
56
62
|
process.exit(1);
|
|
57
63
|
}
|