nuxt-llms 0.1.1 → 0.1.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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "Nuxt LLMS",
3
3
  "configKey": "llms",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -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
  }
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-llms",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Generate llms.txt documentation for your Nuxt application",
5
5
  "repository": {
6
6
  "type": "git",