nuxt-ai-ready 0.7.3 → 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
@@ -4,7 +4,7 @@
4
4
  "nuxt": ">=4.0.0"
5
5
  },
6
6
  "configKey": "aiReady",
7
- "version": "0.7.3",
7
+ "version": "0.7.5",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -542,7 +542,7 @@ const module$1 = defineNuxtModule({
542
542
  nuxt.hooks.hook("nitro:config", (nitroConfig) => {
543
543
  nitroConfig.experimental = nitroConfig.experimental || {};
544
544
  nitroConfig.experimental.asyncContext = true;
545
- if (config.cron) {
545
+ if (config.cron && !nuxt.options.dev) {
546
546
  const cronSchedule = "* * * * *";
547
547
  const isVercel = nitroConfig.preset === "vercel" || nitroConfig.preset === "vercel-edge";
548
548
  if (isVercel) {
@@ -663,7 +663,7 @@ export const errorRoutes = []`;
663
663
  addServerHandler({ route: "/__ai-ready/status", handler: resolve("./runtime/server/routes/__ai-ready/status.get") });
664
664
  }
665
665
  }
666
- if (config.cron) {
666
+ if (config.cron && !nuxt.options.dev) {
667
667
  addServerHandler({ route: "/__ai-ready/cron", handler: resolve("./runtime/server/routes/__ai-ready/cron.get") });
668
668
  }
669
669
  const isStatic = nuxt.options.nitro.static || nuxt.options._generate || false;
@@ -1,4 +1,4 @@
1
- import { useSiteConfig } from "#imports";
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 = useSiteConfig();
12
+ const siteConfig = getSiteConfig(event);
13
13
  const header = buildLlmsFullTxtHeader(
14
14
  {
15
15
  name: siteConfig.name,
@@ -6,6 +6,8 @@ export default defineTask({
6
6
  description: "Scheduled task for AI Ready - runs indexing and IndexNow sync"
7
7
  },
8
8
  async run({ payload }) {
9
+ if (import.meta.dev)
10
+ return { result: {} };
9
11
  const mockEvent = {
10
12
  $fetch: globalThis.$fetch
11
13
  };
@@ -1,4 +1,4 @@
1
- import { useSiteConfig } from "#imports";
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 = useSiteConfig();
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 = [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-ai-ready",
3
3
  "type": "module",
4
- "version": "0.7.3",
4
+ "version": "0.7.5",
5
5
  "description": "Best practice AI & LLM discoverability for Nuxt sites.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -74,11 +74,11 @@
74
74
  "@nuxtjs/robots": "^5.6.7",
75
75
  "@nuxtjs/sitemap": "^7.5.2",
76
76
  "@types/better-sqlite3": "^7.6.13",
77
- "@vitest/coverage-v8": "^4.0.16",
77
+ "@vitest/coverage-v8": "^4.0.17",
78
78
  "@vue/test-utils": "^2.4.6",
79
79
  "@vueuse/nuxt": "^14.1.0",
80
80
  "agents": "^0.3.4",
81
- "ai": "^6.0.27",
81
+ "ai": "^6.0.30",
82
82
  "better-sqlite3": "^12.6.0",
83
83
  "bumpp": "^10.3.2",
84
84
  "eslint": "^9.39.2",
@@ -90,7 +90,7 @@
90
90
  "playwright-core": "^1.57.0",
91
91
  "postgres": "^3.4.8",
92
92
  "typescript": "^5.9.3",
93
- "vitest": "^4.0.16",
93
+ "vitest": "^4.0.17",
94
94
  "vue": "^3.5.26",
95
95
  "vue-router": "^4.6.4",
96
96
  "vue-tsc": "^3.2.2",