nuxt-ai-ready 3.0.2 → 3.0.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.
@@ -2,7 +2,7 @@ import { createHash } from 'node:crypto';
2
2
  import { realpath, readFile, readdir } from 'node:fs/promises';
3
3
  import { join, resolve, isAbsolute, relative, sep } from 'node:path';
4
4
  import { parseDocument } from 'yaml';
5
- import { A as AGENT_SKILLS_SCHEMA } from '../shared/nuxt-ai-ready.Deh7Mj_G.mjs';
5
+ import { A as AGENT_SKILLS_SCHEMA } from '../shared/nuxt-ai-ready.CsGXtlrU.mjs';
6
6
  import 'node:module';
7
7
  import 'node:url';
8
8
  import '@nuxt/kit';
@@ -6,7 +6,7 @@ import { resolveLocaleFromRoute } from 'nuxtseo-shared/i18n-runtime';
6
6
  import { createPrerenderFetch } from 'nuxtseo-shared/prerender';
7
7
  import { collectSitemap } from 'sitemapd/parse';
8
8
  import { withLeadingSlash, joinURL, withBase } from 'ufo';
9
- import { l as logger, M as MARKDOWN_LINK_AVAILABILITY_FILE } from '../shared/nuxt-ai-ready.Deh7Mj_G.mjs';
9
+ import { l as logger, M as MARKDOWN_LINK_AVAILABILITY_FILE } from '../shared/nuxt-ai-ready.CsGXtlrU.mjs';
10
10
  import { normalizePagePath, toMarkdownPath } from '../../dist/runtime/markdown-path.js';
11
11
  import { toDeployedRoute, toLogicalRoute } from '../../dist/runtime/route-path.js';
12
12
  import { initSchema, computeContentHash, insertPage, queryAllPages, exportDbDump } from '../../dist/runtime/server/db/shared.js';
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "nuxt": "^4.6.0 || ^5.0.0-0"
5
5
  },
6
6
  "configKey": "aiReady",
7
- "version": "3.0.2",
7
+ "version": "3.0.3",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.3",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -7,7 +7,7 @@ import '@nuxt/kit';
7
7
  import 'defu';
8
8
  import 'nuxt-site-config/kit';
9
9
  import 'nuxtseo-shared/kit';
10
- export { m as default } from './shared/nuxt-ai-ready.Deh7Mj_G.mjs';
10
+ export { m as default } from './shared/nuxt-ai-ready.CsGXtlrU.mjs';
11
11
  import './shared/nuxt-ai-ready.B3hAuOLQ.mjs';
12
12
  import '../dist/runtime/markdown-path.js';
13
13
  import '../dist/runtime/route-path.js';
@@ -2390,6 +2390,13 @@ export function trackDrizzleWork(event, work) { return work }
2390
2390
  }
2391
2391
  });
2392
2392
  }
2393
+ let sharedMarkdownRuleNoted = false;
2394
+ const noteSharedMarkdownRule = (total, dropped) => {
2395
+ if (sharedMarkdownRuleNoted)
2396
+ return;
2397
+ sharedMarkdownRuleNoted = true;
2398
+ logger.info(`Cloudflare allows ${CLOUDFLARE_STATIC_HEADER_RULE_LIMIT} _headers rules. One rule per Markdown page would make ${total}. The ${dropped} Markdown pages share the /*.md rule, which sends no per-page canonical Link header.`);
2399
+ };
2393
2400
  nuxt.hooks.hook("nitro:build:before", (nitro) => {
2394
2401
  const isCloudflarePreset = String(nitro.options.preset || "").startsWith("cloudflare");
2395
2402
  nitro.hooks.hook("prerender:done", async () => {
@@ -2421,7 +2428,7 @@ export function trackDrizzleWork(event, work) { return work }
2421
2428
  );
2422
2429
  if (plan._tag === "skip") {
2423
2430
  applyStaticMarkdownHeaderPlan(nitro.options.routeRules, plan);
2424
- logger.warn(`_headers would hold ${plan.total} rules and Cloudflare allows ${CLOUDFLARE_STATIC_HEADER_RULE_LIMIT}. Skipped the ${plan.dropped} per-page .md rules; the /*.md glob still sets the charset and describedby entries, but static markdown does not send a per-page canonical Link.`);
2431
+ noteSharedMarkdownRule(plan.total, plan.dropped);
2425
2432
  return;
2426
2433
  }
2427
2434
  applyStaticMarkdownHeaderPlan(nitro.options.routeRules, plan);
@@ -2490,7 +2497,7 @@ export function trackDrizzleWork(event, work) { return work }
2490
2497
  const budget = enforceStaticHeaderBudget(mergedHeaders, CLOUDFLARE_STATIC_HEADER_RULE_LIMIT);
2491
2498
  if (budget.dropped > 0) {
2492
2499
  mergedHeaders = budget.contents;
2493
- logger.warn(`_headers had ${budget.total + budget.dropped} rules and Cloudflare allows ${CLOUDFLARE_STATIC_HEADER_RULE_LIMIT}. Dropped the ${budget.dropped} per-page .md rules; the /*.md glob still sets the charset and describedby entries, but static markdown no longer sends a per-page canonical Link.`);
2500
+ noteSharedMarkdownRule(budget.total + budget.dropped, budget.dropped);
2494
2501
  }
2495
2502
  if (budget.total > CLOUDFLARE_STATIC_HEADER_RULE_LIMIT)
2496
2503
  logger.warn(`_headers still has ${budget.total} rules after dropping the .md rules. Cloudflare will reject the deploy until the other rules fit under ${CLOUDFLARE_STATIC_HEADER_RULE_LIMIT}.`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-ai-ready",
3
3
  "type": "module",
4
- "version": "3.0.2",
4
+ "version": "3.0.3",
5
5
  "description": "Best practice AI & LLM discoverability for Nuxt sites.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",