nuxt-ai-ready 2.3.1 → 2.3.2
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 { resolve, isAbsolute, join, relative, sep } from 'node:path';
|
|
4
4
|
import { parseDocument } from 'yaml';
|
|
5
|
-
import { A as AGENT_SKILLS_SCHEMA } from '../shared/nuxt-ai-ready.
|
|
5
|
+
import { A as AGENT_SKILLS_SCHEMA } from '../shared/nuxt-ai-ready.wTtq73UR.mjs';
|
|
6
6
|
import 'node:module';
|
|
7
7
|
import '@nuxt/kit';
|
|
8
8
|
import 'defu';
|
|
@@ -5,7 +5,7 @@ import { colorize } from 'consola/utils';
|
|
|
5
5
|
import { resolveLocaleFromRoute } from 'nuxtseo-shared/i18n-runtime';
|
|
6
6
|
import { collectSitemap } from 'sitemapd/parse';
|
|
7
7
|
import { withLeadingSlash, joinURL, withBase } from 'ufo';
|
|
8
|
-
import { l as logger, s as supportsNativeNodeSqlite, M as MARKDOWN_LINK_AVAILABILITY_FILE } from '../shared/nuxt-ai-ready.
|
|
8
|
+
import { l as logger, s as supportsNativeNodeSqlite, M as MARKDOWN_LINK_AVAILABILITY_FILE } from '../shared/nuxt-ai-ready.wTtq73UR.mjs';
|
|
9
9
|
import { normalizePagePath, toMarkdownPath } from '../../dist/runtime/markdown-path.js';
|
|
10
10
|
import { toDeployedRoute, toLogicalRoute } from '../../dist/runtime/route-path.js';
|
|
11
11
|
import { initSchema, computeContentHash, insertPage, queryAllPages, exportDbDump } from '../../dist/runtime/server/db/shared.js';
|
|
@@ -313,6 +313,7 @@ function setupPrerenderHandler(options, dbPath, siteInfo, llmsTxtConfig, extras
|
|
|
313
313
|
extras.i18n
|
|
314
314
|
);
|
|
315
315
|
let initPromise = null;
|
|
316
|
+
const artifactRoutes = new Set(extras.artifactRoutes ?? []);
|
|
316
317
|
nitro.hooks.hook("prerender:generate", async (route) => {
|
|
317
318
|
if (route.error) {
|
|
318
319
|
const routePath = route.fileName || route.route;
|
|
@@ -323,6 +324,10 @@ function setupPrerenderHandler(options, dbPath, siteInfo, llmsTxtConfig, extras
|
|
|
323
324
|
}
|
|
324
325
|
if (route.fileName === SITEMAP_MD_ROUTE)
|
|
325
326
|
return;
|
|
327
|
+
if (artifactRoutes.has(route.route) || route.fileName && artifactRoutes.has(withLeadingSlash(route.fileName))) {
|
|
328
|
+
route.contentType = "text/markdown; charset=utf-8";
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
326
331
|
if (!route.fileName?.endsWith(".md"))
|
|
327
332
|
return;
|
|
328
333
|
let pageRoute = route.route.replace(RE_MD_EXT, "");
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import 'defu';
|
|
|
7
7
|
import 'nuxt-site-config/kit';
|
|
8
8
|
import 'nuxtseo-shared/kit';
|
|
9
9
|
import 'pkg-types';
|
|
10
|
-
export { m as default } from './shared/nuxt-ai-ready.
|
|
10
|
+
export { m as default } from './shared/nuxt-ai-ready.wTtq73UR.mjs';
|
|
11
11
|
import '../dist/runtime/markdown-path.js';
|
|
12
12
|
import '../dist/runtime/server/utils/sitemap-md.js';
|
|
13
13
|
import '../dist/runtime/server/utils/discovery-response.js';
|
|
@@ -1865,7 +1865,11 @@ export const logger = createModuleLogger('nuxt-ai-ready', ${!!config.debug})
|
|
|
1865
1865
|
name: siteConfig.name,
|
|
1866
1866
|
url: siteConfig.url ? withSiteUrl("/", { withBase: true }) : void 0,
|
|
1867
1867
|
description: siteConfig.description
|
|
1868
|
-
}, mergedLlmsTxt, {
|
|
1868
|
+
}, mergedLlmsTxt, {
|
|
1869
|
+
ftsTokenizer,
|
|
1870
|
+
i18n: i18nConfig,
|
|
1871
|
+
artifactRoutes: agentSkillsResult._tag === "Enabled" ? Object.keys(agentSkillsResult.localArtifacts) : []
|
|
1872
|
+
});
|
|
1869
1873
|
}
|
|
1870
1874
|
if (databaseEnabled)
|
|
1871
1875
|
addServerPlugin(resolve("./runtime/server/plugins/db-lifecycle"));
|