nuxt-llms 0.1.1 → 0.1.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.
package/dist/module.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
- "name": "Nuxt LLMS",
2
+ "name": "nuxt-llms",
3
3
  "configKey": "llms",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
+ "docs": "https://github.com/nuxtlabs/nuxt-llms",
5
6
  "builder": {
6
7
  "@nuxt/module-builder": "0.8.4",
7
8
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -1,9 +1,13 @@
1
1
  import { defineNuxtModule, useLogger, createResolver, addServerImports, addServerHandler, addPrerenderRoutes } from '@nuxt/kit';
2
2
 
3
+ const version = "0.1.3";
4
+
3
5
  const module = defineNuxtModule({
4
6
  meta: {
5
- name: "Nuxt LLMS",
6
- configKey: "llms"
7
+ name: "nuxt-llms",
8
+ configKey: "llms",
9
+ version,
10
+ docs: "https://github.com/nuxtlabs/nuxt-llms"
7
11
  },
8
12
  defaults: {},
9
13
  setup(options, nuxt) {
@@ -10,7 +10,7 @@ export default eventHandler(async (event) => {
10
10
  `# ${llms.title || "Documentation"}`
11
11
  ];
12
12
  if (llms.description) {
13
- document.push(`> ${options.description}`);
13
+ document.push(`> ${llms.description}`);
14
14
  }
15
15
  for (const section of llms.sections) {
16
16
  document.push(`## ${section.title}`);
@@ -19,7 +19,7 @@ export default eventHandler(async (event) => {
19
19
  }
20
20
  document.push(
21
21
  section.links?.map((link) => {
22
- return `- [${link.title}](${link.href}): ${link.description}`;
22
+ return link.description ? `- [${link.title}](${link.href}): ${link.description}` : `- [${link.title}](${link.href})`;
23
23
  }).join("\n") || ""
24
24
  );
25
25
  }
@@ -1,6 +1,6 @@
1
1
  import type { H3Event } from 'h3';
2
- import type { ModuleOptions } from 'nuxt-llms';
3
2
  import type { NitroRuntimeHooks } from 'nitropack/types';
3
+ import type { ModuleOptions } from 'nuxt-llms';
4
4
  /**
5
5
  * @deprecated Custom hooks are deprecated in favor of NitroRuntimeHooks.
6
6
  */
@@ -2,7 +2,11 @@ import { createHooks } from "hookable";
2
2
  import { useNitroApp } from "#imports";
3
3
  export const llmsHooks = createHooks();
4
4
  llmsHooks.beforeEach(() => {
5
- console.warn("[nuxt-llms] `llmsHooks` are deprecated and will be removed in future versions. Use `useNitroApp().hooks.hook('llms:generate', (event, options) => {})` instead");
5
+ const hooks = Object.values(llmsHooks._hooks || {});
6
+ const hasRegisteredHook = hooks.some((hooksList) => Array.isArray(hooksList) && hooksList.length > 0);
7
+ if (hasRegisteredHook) {
8
+ console.warn("[nuxt-llms] `llmsHooks` are deprecated and will be removed in future versions. Use `useNitroApp().hooks.hook('llms:generate', (event, options) => {})` instead");
9
+ }
6
10
  });
7
11
  export function onLLMsGenerate(cb) {
8
12
  return useNitroApp().hooks.hook("llms:generate", cb);
package/package.json CHANGED
@@ -1,11 +1,18 @@
1
1
  {
2
2
  "name": "nuxt-llms",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Generate llms.txt documentation for your Nuxt application",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/nuxtlabs/nuxt-llms.git"
8
8
  },
9
+ "keywords": [
10
+ "nuxt",
11
+ "llms",
12
+ "documentation",
13
+ "generator",
14
+ "nuxt-module"
15
+ ],
9
16
  "license": "MIT",
10
17
  "type": "module",
11
18
  "exports": {
@@ -39,22 +46,22 @@
39
46
  "verify": "npm run dev:prepare && npm run lint && npm run test && npm run typecheck"
40
47
  },
41
48
  "dependencies": {
42
- "@nuxt/kit": "^3.16.1"
49
+ "@nuxt/kit": "^3.17.5"
43
50
  },
44
51
  "devDependencies": {
45
- "nuxt-llms": "link:.",
46
- "@nuxt/devtools": "^2.3.1",
47
- "@nuxt/eslint-config": "^1.2.0",
52
+ "@nuxt/devtools": "^2.5.0",
53
+ "@nuxt/eslint-config": "^1.4.1",
48
54
  "@nuxt/module-builder": "^0.8.4",
49
- "@nuxt/schema": "^3.16.1",
50
- "@nuxt/test-utils": "^3.17.2",
51
- "@types/node": "latest",
55
+ "@nuxt/schema": "^3.17.5",
56
+ "@nuxt/test-utils": "^3.19.1",
57
+ "@types/node": "^22.15.30",
52
58
  "changelogen": "^0.6.1",
53
- "eslint": "^9.23.0",
54
- "nuxt": "^3.16.1",
55
- "typescript": "~5.6.0",
56
- "vitest": "^3.0.9",
57
- "vue-tsc": "^2.2.2"
59
+ "eslint": "^9.28.0",
60
+ "nuxt": "^3.17.5",
61
+ "nuxt-llms": "link:",
62
+ "typescript": "~5.6.3",
63
+ "vitest": "^3.2.2",
64
+ "vue-tsc": "^2.2.10"
58
65
  },
59
66
  "packageManager": "pnpm@10.6.5"
60
67
  }