@nuasite/llm-enhancements 0.63.2 → 0.64.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/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "directory": "packages/llm-enhancements"
15
15
  },
16
16
  "license": "Apache-2.0",
17
- "version": "0.63.2",
17
+ "version": "0.64.2",
18
18
  "module": "src/index.ts",
19
19
  "types": "src/index.ts",
20
20
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "@nuasite/cms-core": "0.63.2",
29
+ "@nuasite/cms-core": "0.64.2",
30
30
  "node-html-parser": "^7.1.0",
31
31
  "remark-directive": "^3.0.1",
32
32
  "remark-mdx": "^3.1.0",
@@ -35,12 +35,13 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/bun": "1.3.11",
38
- "astro": "6.1.4"
38
+ "astro": "7.4.2"
39
39
  },
40
40
  "peerDependencies": {
41
+ "astro": "^7.0.0",
41
42
  "typescript": "^6.0.2",
42
- "vite": "^7.0.0",
43
- "@nuasite/cms": "0.63.2"
43
+ "vite": "^8.3.4",
44
+ "@nuasite/cms": "0.64.2"
44
45
  },
45
46
  "peerDependenciesMeta": {
46
47
  "@nuasite/cms": {
package/src/mdx.ts CHANGED
@@ -18,10 +18,13 @@ export interface MarkdownSyntax {
18
18
  /**
19
19
  * The syntax of the site's markdown pipeline, which `@astrojs/mdx` extends by default: directives when a
20
20
  * remark-directive plugin is in it (`@nuasite/nua` adds the CMS's). Plugins given to `mdx()` alone are not
21
- * visible here.
21
+ * visible here. Since Astro 7 the plugins sit on the `unified()` processor; the deprecated top-level
22
+ * `markdown.remarkPlugins` is read too.
22
23
  */
23
24
  export function markdownSyntaxOf(config: AstroConfig): MarkdownSyntax {
24
- const plugins = config.markdown?.remarkPlugins ?? []
25
+ const processor = config.markdown?.processor
26
+ const processorPlugins = processor?.name === 'unified' ? (processor.options as { remarkPlugins?: unknown[] }).remarkPlugins : undefined
27
+ const plugins = [...(config.markdown?.remarkPlugins ?? []), ...(processorPlugins ?? [])]
25
28
  const directives = plugins.some(entry => {
26
29
  const plugin = Array.isArray(entry) ? entry[0] : entry
27
30
  return plugin === 'remark-directive' || (typeof plugin === 'function' && plugin.name === 'remarkDirective')