@majordigital/create-acorn 1.6.4 → 1.6.6

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.
@@ -118,7 +118,7 @@ async function setupPreDeploy() {
118
118
 
119
119
  console.log('Installing pre-deploy tools (Lighthouse, Playwright, linkinator)...');
120
120
  await runCommand('npm', ['install', '--save-dev', '--legacy-peer-deps',
121
- 'lighthouse', 'chrome-launcher', 'playwright', 'linkinator'
121
+ 'lighthouse', 'chrome-launcher', 'playwright', 'linkinator@^7'
122
122
  ]);
123
123
  console.log('');
124
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majordigital/create-acorn",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "Interactive starter CLI for Acorn with Storyblok/Prismic/DatoCMS, TypeScript, and Tailwind.",
5
5
  "bin": {
6
6
  "create-acorn": "bin/create-acorn.mjs",
@@ -28,10 +28,13 @@ const concurrency = isLocalhost ? 2 : 5;
28
28
 
29
29
  // Support Netlify Basic Auth (password-protected preview deploys).
30
30
  // Set NETLIFY_AUTH=user:password in your environment before running.
31
+ // NOTE: requires linkinator >=7 (the `headers` option is applied to every
32
+ // fetch). Credentials are sent via an Authorization header, not embedded in
33
+ // the URL — Node's fetch (undici) rejects URLs that contain credentials.
31
34
  const netlifyAuth = process.env.NETLIFY_AUTH;
32
- const crawlUrl = netlifyAuth
33
- ? baseUrl.replace(/^(https?:\/\/)/, `$1${netlifyAuth}@`)
34
- : baseUrl;
35
+ const headers = netlifyAuth
36
+ ? { Authorization: `Basic ${Buffer.from(netlifyAuth).toString("base64")}` }
37
+ : {};
35
38
 
36
39
  const checker = new LinkChecker();
37
40
 
@@ -49,10 +52,11 @@ console.log(`Concurrency: ${concurrency}`);
49
52
  console.log("This may take several minutes...\n");
50
53
 
51
54
  const result = await checker.check({
52
- path: crawlUrl,
55
+ path: baseUrl,
53
56
  recurse: true,
54
57
  concurrency,
55
58
  timeout: 30000,
59
+ headers,
56
60
  linksToSkip: [
57
61
  // Skip external links to avoid false positives from rate limiting
58
62
  `^(?!(${baseUrl.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}))`,