nuxt-ai-ready 0.7.4 → 0.7.5
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/dist/module.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSiteConfig } from "#site-config/server/composables";
|
|
2
2
|
import { eventHandler, sendIterable, setHeader, setResponseHeader } from "h3";
|
|
3
3
|
import { useRuntimeConfig } from "nitropack/runtime";
|
|
4
4
|
import { countPages, streamPages } from "../db/queries.js";
|
|
@@ -9,7 +9,7 @@ export default eventHandler(async (event) => {
|
|
|
9
9
|
return "# llms-full.txt\n\nThis file is generated during prerender.";
|
|
10
10
|
}
|
|
11
11
|
const config = useRuntimeConfig()["nuxt-ai-ready"];
|
|
12
|
-
const siteConfig =
|
|
12
|
+
const siteConfig = getSiteConfig(event);
|
|
13
13
|
const header = buildLlmsFullTxtHeader(
|
|
14
14
|
{
|
|
15
15
|
name: siteConfig.name,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getSiteConfig } from "#site-config/server/composables";
|
|
2
2
|
import { useRuntimeConfig } from "nitropack/runtime";
|
|
3
3
|
import {
|
|
4
4
|
countPagesNeedingIndexNowSync,
|
|
@@ -37,7 +37,7 @@ export async function submitToIndexNow(routes, config, siteUrl) {
|
|
|
37
37
|
}
|
|
38
38
|
export async function syncToIndexNow(event, limit = 100) {
|
|
39
39
|
const config = useRuntimeConfig(event)["nuxt-ai-ready"];
|
|
40
|
-
const siteConfig =
|
|
40
|
+
const siteConfig = getSiteConfig(event);
|
|
41
41
|
if (!config.indexNowKey) {
|
|
42
42
|
return { success: false, submitted: 0, remaining: 0, error: "IndexNow not configured" };
|
|
43
43
|
}
|
|
@@ -3,6 +3,8 @@ import { cleanupOldCronRuns, completeCronRun, startCronRun } from "../db/queries
|
|
|
3
3
|
import { batchIndexPages } from "./batchIndex.js";
|
|
4
4
|
import { syncToIndexNow } from "./indexnow.js";
|
|
5
5
|
export async function runCron(event, options) {
|
|
6
|
+
if (import.meta.dev)
|
|
7
|
+
return {};
|
|
6
8
|
const config = useRuntimeConfig()["nuxt-ai-ready"];
|
|
7
9
|
const results = {};
|
|
8
10
|
const allErrors = [];
|