@ahmedrowaihi/8n-starter 2.2.10 → 2.2.12
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/app/api/_dev/watch/route.js +1 -1
- package/next.config.mjs +1 -1
- package/package.json +1 -1
- package/src/components/fumadocs/mdx.jsx +1 -1
- package/src/config.js +1 -1
- package/src/features/ai/chat/tools.js +1 -1
- package/src/features/docs/section-page.jsx +1 -1
- package/src/features/marketing/components/home.jsx +1 -1
- package/src/lib/llms.js +1 -1
- package/src/lib/pages-api.js +1 -1
- package/src/lib/rss.js +1 -1
- package/src/lib/sitemap.js +1 -1
- package/src/lib/source.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{watch as e,existsSync as n}from"node:fs";import{env as t}from"@/config";export const dynamic="force-static";export function GET(){let o;if("development"!==process.env.NODE_ENV)return new Response("Not found",{status:404});let c=new TextEncoder;return new Response(new ReadableStream({start(r){r.enqueue(c.encode("data: connected\n\n")),n(t.CONTENT_DIR)&&(o=e(t.CONTENT_DIR,{recursive:!0},()=>{try{r.enqueue(c.encode("data: change\n\n"))}catch{o?.close()}}))},cancel(){o?.close()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}
|
|
1
|
+
import{watch as e,existsSync as n}from"node:fs";import{env as t}from"@/config";export const dynamic="true"===process.env.NEXT_STATIC_EXPORT?"force-static":"force-dynamic";export function GET(){let o;if("development"!==process.env.NODE_ENV)return new Response("Not found",{status:404});let c=new TextEncoder;return new Response(new ReadableStream({start(r){r.enqueue(c.encode("data: connected\n\n")),n(t.CONTENT_DIR)&&(o=e(t.CONTENT_DIR,{recursive:!0},()=>{try{r.enqueue(c.encode("data: change\n\n"))}catch{o?.close()}}))},cancel(){o?.close()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}
|
package/next.config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @type {import('next').NextConfig} */
|
|
2
2
|
const config = {
|
|
3
3
|
reactStrictMode: true,
|
|
4
|
-
adapterPath: process.env.NEXT_ADAPTER_PATH
|
|
4
|
+
adapterPath: process.env.NEXT_ADAPTER_PATH,
|
|
5
5
|
|
|
6
6
|
// Prevent heavy server-only packages from being bundled into client chunks
|
|
7
7
|
serverExternalPackages: ["twoslash", "typescript", "gray-matter"],
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{localeConfig as o}from"@/locale.config";import{FeedbackBlockMDX as t}from"@/features/feedback";import*as a from"fumadocs-twoslash/ui";import
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{localeConfig as o}from"@/locale.config";import{FeedbackBlockMDX as t}from"@/features/feedback";import*as a from"fumadocs-twoslash/ui";import r from"@fumadocs/base-ui/mdx";import*as i from"./mdx/base-ui";import*as n from"./mdx/blocks";import*as s from"./mdx/openapi";import m from"fumadocs-core/link";let c=Object.keys(o);export function getMDXComponentsForLang(t,a,r,i){let n=(o[t]??o.en).translations;return getMDXComponents({feedbackTranslations:a?{question:n.feedbackQuestion,feedbackLabel:n.feedbackLabel,good:n.feedbackGood,bad:n.feedbackBad,placeholder:n.feedbackPlaceholder,submit:n.feedbackSubmit,thankYou:n.feedbackThankYou,viewOnGitHub:n.feedbackViewOnGitHub,submitAgain:n.feedbackSubmitAgain}:void 0,feedbackPageTitle:a,githubRepo:r},{a:({href:o,children:a,...r})=>{var i,n;return e(m,{href:o?(i=o,n=t,!i.startsWith("/")||c.some(e=>i===`/${e}`||i.startsWith(`/${e}/`))?i:`/${n}${i}`):"#",...r,children:a})},...i})}export function getMDXComponents(o,m){let{feedbackTranslations:c,feedbackPageTitle:f,githubRepo:d}=o??{};return{...r,...a,...i,...s,...n,FeedbackBlock:c&&f?o=>e(t,{...o,translations:c,pageTitle:f,githubRepo:d}):()=>null,...m}}export const useMDXComponents=getMDXComponents;
|
package/src/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createEnv as e}from"@t3-oss/env-nextjs";import{z as _}from"zod";let s=_.string().default("[]").transform(e=>JSON.parse(e)),t=_.string().default("{}").transform(e=>JSON.parse(e));export const env=e({server:{SITE_URL:_.string().default("http://localhost:3000"),CONTENT_DIR:_.string().default("./content"),SECTIONS:t},client:{NEXT_PUBLIC_SITE_NAME:_.string().default("Docs"),NEXT_PUBLIC_GITHUB_REPO:_.string().optional(),NEXT_PUBLIC_NAV_LINKS:s,NEXT_PUBLIC_ANIMATIONS:_.enum(["true","false"]).default("true").transform(e=>"true"===e)},runtimeEnv:{SITE_URL:process.env.SITE_URL??(process.env.VERCEL_PROJECT_PRODUCTION_URL?`https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`:process.env.VERCEL_URL?`https://${process.env.VERCEL_URL}`:void 0),CONTENT_DIR:process.env.CONTENT_DIR,SECTIONS:process.env.SECTIONS,NEXT_PUBLIC_SITE_NAME:process.env.NEXT_PUBLIC_SITE_NAME,NEXT_PUBLIC_GITHUB_REPO:process.env.NEXT_PUBLIC_GITHUB_REPO,NEXT_PUBLIC_NAV_LINKS:process.env.NEXT_PUBLIC_NAV_LINKS,NEXT_PUBLIC_ANIMATIONS:process.env.NEXT_PUBLIC_ANIMATIONS}});export function isSectionHidden(e
|
|
1
|
+
import{createEnv as e}from"@t3-oss/env-nextjs";import{z as _}from"zod";let s=_.string().default("[]").transform(e=>JSON.parse(e)),t=_.string().default("{}").transform(e=>JSON.parse(e));export const env=e({server:{SITE_URL:_.string().default("http://localhost:3000"),CONTENT_DIR:_.string().default("./content"),SECTIONS:t},client:{NEXT_PUBLIC_SITE_NAME:_.string().default("Docs"),NEXT_PUBLIC_GITHUB_REPO:_.string().optional(),NEXT_PUBLIC_NAV_LINKS:s,NEXT_PUBLIC_ANIMATIONS:_.enum(["true","false"]).default("true").transform(e=>"true"===e)},runtimeEnv:{SITE_URL:process.env.SITE_URL??(process.env.VERCEL_PROJECT_PRODUCTION_URL?`https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`:process.env.VERCEL_URL?`https://${process.env.VERCEL_URL}`:void 0),CONTENT_DIR:process.env.CONTENT_DIR,SECTIONS:process.env.SECTIONS,NEXT_PUBLIC_SITE_NAME:process.env.NEXT_PUBLIC_SITE_NAME,NEXT_PUBLIC_GITHUB_REPO:process.env.NEXT_PUBLIC_GITHUB_REPO,NEXT_PUBLIC_NAV_LINKS:process.env.NEXT_PUBLIC_NAV_LINKS,NEXT_PUBLIC_ANIMATIONS:process.env.NEXT_PUBLIC_ANIMATIONS}});export function isSectionHidden(e){return!1===env.SECTIONS[e]}"development"===process.env.NODE_ENV&&env.NEXT_PUBLIC_GITHUB_REPO?.includes("your-org/your-repo")&&console.warn("[8n-starter] ⚠ NEXT_PUBLIC_GITHUB_REPO is still the placeholder value.\n Set github.repo in 8n.config.ts to enable Edit on GitHub links.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAllPages as t,getSources as e}from"@/lib/source";import{readFile as a}from"node:fs/promises";import
|
|
1
|
+
import{getAllPages as t,getSources as e}from"@/lib/source";import{readFile as a}from"node:fs/promises";import i from"gray-matter";import{create as r,insertMultiple as n,search as o}from"@orama/orama";import{tool as l}from"ai";import{z as c}from"zod";let s={url:"string",title:"string",description:"string",content:"string"},u=null;export const searchTool=l({description:"Search the docs content and return relevant results.",inputSchema:c.object({query:c.string(),limit:c.number().int().min(1).max(20).default(8)}),async execute({query:l,limit:c}){let d=await (!u&&(u=(async()=>{let o=r({schema:s}),{changelogSource:l}=await e(),c=[...await t(),...l.getPages()];return n(o,(await Promise.all(c.map(async t=>{if(!t.data.filePath)return null;let{content:e}=i(await a(t.data.filePath,"utf-8"));return{url:t.url,title:t.data.title,description:t.data.description??"",content:e}}))).filter(Boolean)),o})()),u);return(await o(d,{term:l,limit:c,properties:["title","description","content"]})).hits.map(t=>({url:t.document.url,title:t.document.title,description:t.document.description,content:t.document.content.slice(0,500)}))}});export const getPageTool=l({description:"Fetch the full content of a specific documentation or changelog page by its URL path.",inputSchema:c.object({url:c.string().describe("The URL path of the page, e.g. /en/docs/getting-started")}),async execute({url:r}){let{changelogSource:n}=await e(),o=[...await t(),...n.getPages()].find(t=>t.url===r);if(!o)return{error:`Page not found: ${r}`};if(!o.data.filePath)return{error:"Page has no text content"};let{content:l}=i(await a(o.data.filePath,"utf-8"));return{url:o.url,title:o.data.title,content:l}}});export const listPagesTool=l({description:"List all available documentation and changelog pages with their URLs and titles.",inputSchema:c.object({}),async execute(){let{changelogSource:a}=await e();return[...(await t()).map(t=>({url:t.url,title:t.data.title,type:"docs"})),...a.getPages().map(t=>({url:t.url,title:t.data.title,type:"changelog"}))]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createDocsPage as a}from"@/lib/create-docs-page";import{getSections as e}from"@/lib/source";import{notFound as t}from"next/navigation";export async function generateStaticParams(){return Object.entries(await e(
|
|
1
|
+
import{createDocsPage as a}from"@/lib/create-docs-page";import{getSections as e}from"@/lib/source";import{notFound as t}from"next/navigation";export async function generateStaticParams(){return Object.entries(await e()).flatMap(([a,e])=>e.generateParams().map(e=>({section:a,...e})))}export async function generateMetadata({params:t}){let{section:r,...n}=await t;return(await e())[r]?a(r).generateMetadata({params:Promise.resolve(n)}):{}}export default async function r({params:n}){let{section:i,...o}=await n;return(await e())[i]||t(),a(i,{getMarkdownUrl:a=>`/llms.mdx/${i}/${[...a,"index.mdx"].join("/")}`}).default({params:Promise.resolve(o)})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{existsSync as r}from"node:fs";import{readFile as a}from"node:fs/promises";import{join as o}from"node:path";import{Link as n}from"@/lib/navigation";import{HomeLayout as i}from"@/components/fumadocs/layout/home";import{baseOptions as l,githubRepo as s}from"@/lib/layout.shared";import{getSections as c,getSources as d}from"@/lib/source";import{env as m,isSectionHidden as p}from"@/config";import{compiler as f}from"@/lib/mdx-compiler";import{getMDXComponentsForLang as u}from"@/components/fumadocs/mdx-server";let x={docs:{en:"Docs",ar:"التوثيق"},api:{en:"API Reference",ar:"مرجع API"},ui:{en:"UI Components",ar:"مكونات UI"},changelog:{en:"Changelog",ar:"سجل التغييرات"}},h={en:{eyebrow:"Documentation",title:"Build knowledge.\nShare it well.",subtitle:"A fast, bilingual docs hub for your team — searchable, versioned, and ready to ship.",cta:"Read the docs",secondary:"View on GitHub",features:[{icon:"⚡",label:"Next.js App Router + RSC"},{icon:"🌍",label:"Arabic & English with RTL"},{icon:"🔍",label:"Offline-capable search"},{icon:"🎨",label:"Thmanyah brand fonts"}]},ar:{eyebrow:"التوثيق",title:"ابنِ المعرفة.\nوشاركها بأفضل شكل.",subtitle:"مركز توثيق ثنائي اللغة لفريقك — قابل للبحث، موثق بالإصدارات، وجاهز للنشر.",cta:"اقرأ التوثيق",secondary:"عرض على GitHub",features:[{icon:"⚡",label:"Next.js App Router + RSC"},{icon:"🌍",label:"العربية والإنجليزية مع RTL"},{icon:"🔍",label:"بحث يعمل بدون إنترنت"},{icon:"🎨",label:"خطوط ثمانية"}]}};export async function HomePage({lang:g}){let b=Object.keys(await c(
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{existsSync as r}from"node:fs";import{readFile as a}from"node:fs/promises";import{join as o}from"node:path";import{Link as n}from"@/lib/navigation";import{HomeLayout as i}from"@/components/fumadocs/layout/home";import{baseOptions as l,githubRepo as s}from"@/lib/layout.shared";import{getSections as c,getSources as d}from"@/lib/source";import{env as m,isSectionHidden as p}from"@/config";import{compiler as f}from"@/lib/mdx-compiler";import{getMDXComponentsForLang as u}from"@/components/fumadocs/mdx-server";let x={docs:{en:"Docs",ar:"التوثيق"},api:{en:"API Reference",ar:"مرجع API"},ui:{en:"UI Components",ar:"مكونات UI"},changelog:{en:"Changelog",ar:"سجل التغييرات"}},h={en:{eyebrow:"Documentation",title:"Build knowledge.\nShare it well.",subtitle:"A fast, bilingual docs hub for your team — searchable, versioned, and ready to ship.",cta:"Read the docs",secondary:"View on GitHub",features:[{icon:"⚡",label:"Next.js App Router + RSC"},{icon:"🌍",label:"Arabic & English with RTL"},{icon:"🔍",label:"Offline-capable search"},{icon:"🎨",label:"Thmanyah brand fonts"}]},ar:{eyebrow:"التوثيق",title:"ابنِ المعرفة.\nوشاركها بأفضل شكل.",subtitle:"مركز توثيق ثنائي اللغة لفريقك — قابل للبحث، موثق بالإصدارات، وجاهز للنشر.",cta:"اقرأ التوثيق",secondary:"عرض على GitHub",features:[{icon:"⚡",label:"Next.js App Router + RSC"},{icon:"🌍",label:"العربية والإنجليزية مع RTL"},{icon:"🔍",label:"بحث يعمل بدون إنترنت"},{icon:"🎨",label:"خطوط ثمانية"}]}};export async function HomePage({lang:g}){let b=Object.keys(await c()),y=l(g),w=h[g]??h.en,v=b.map(e=>({text:x[e]?.[g]??x[e]?.en??e.charAt(0).toUpperCase()+e.slice(1),url:`/${g}/${e}`,active:"nested-url"}));if(!p("changelog")){let{changelogSource:e}=await d();e.getPageTree(g).children.length>0&&v.push({text:x.changelog?.[g]??x.changelog?.en??"Changelog",url:`/${g}/changelog`,active:"nested-url"})}for(let t of[o(m.CONTENT_DIR,"home",g,"index.mdx"),o(m.CONTENT_DIR,"home","en","index.mdx")])if(r(t)){let r=await a(t,"utf-8"),{body:o}=await f.compile({source:r});return e(i,{...y,nav:{...y.nav,transparentMode:"top"},links:v,children:e(o,{components:u(g)})})}return t(i,{...y,nav:{...y.nav,transparentMode:"top"},links:v,children:[t("section",{className:"flex flex-col items-center justify-center text-center flex-1 gap-6 px-6 py-24",children:[e("span",{className:"text-xs font-medium tracking-widest uppercase text-muted-foreground",children:w.eyebrow}),e("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-bold leading-tight tracking-tight max-w-2xl whitespace-pre-line",children:w.title}),e("p",{className:"text-muted-foreground text-lg max-w-md leading-relaxed",children:w.subtitle}),t("div",{className:"flex flex-wrap gap-3 justify-center",children:[b[0]&&e(n,{href:`/${g}/${b[0]}`,className:"px-5 py-2.5 rounded-lg bg-primary text-primary-foreground font-medium text-sm hover:opacity-90 transition-opacity",children:w.cta}),s&&e("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"px-5 py-2.5 rounded-lg border border-border text-foreground font-medium text-sm hover:bg-accent transition-colors",children:w.secondary})]})]}),e("section",{className:"border-t border-border",children:e("div",{className:"flex flex-wrap justify-center gap-0 divide-x divide-border",children:w.features.map(r=>t("div",{className:"flex items-center gap-2 px-8 py-5 text-sm text-muted-foreground",children:[e("span",{"aria-hidden":"true",children:r.icon}),r.label]},r.label))})})]})}
|
package/src/lib/llms.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAllPages as t,getSections as e,getLLMText as a}from"@/lib/source";export async function getLlmsIndex(){return(await t(
|
|
1
|
+
import{getAllPages as t,getSections as e,getLLMText as a}from"@/lib/source";export async function getLlmsIndex(){return(await t()).map(t=>`- [${t.data.title}](${t.url})`).join("\n")}export async function getLlmsFullText(){let e=await t();return(await Promise.all(e.map(a))).join("\n\n")}export async function getLlmsMdxStaticParams(){return Object.entries(await e()).flatMap(([t,e])=>e.getPages().map(e=>({section:t,slug:[...e.slugs,"index.mdx"]})))}export async function getLlmsMdxPage(t,n){let l=(await e())[t];if(!l)return null;let r=[...n];r.pop();let i=l.getPage(r);return i?a(i):null}
|
package/src/lib/pages-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAllPages as t,getSources as e}from"@/lib/source";export async function getPageEntries(){let[a,{changelogSource:l}]=await Promise.all([t(
|
|
1
|
+
import{getAllPages as t,getSources as e}from"@/lib/source";export async function getPageEntries(){let[a,{changelogSource:l}]=await Promise.all([t(),e()]);return[...a.map(t=>({url:t.url,title:t.data.title,type:"docs"})),...l.getPages().map(t=>({url:t.url,title:t.data.title,type:"changelog"}))]}
|
package/src/lib/rss.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Feed as t}from"feed";import{getSections as e}from"@/lib/source";import{env as i}from"@/config";import{localeConfig as a}from"@/locale.config";export async function getRSS(o){let r=await e(
|
|
1
|
+
import{Feed as t}from"feed";import{getSections as e}from"@/lib/source";import{env as i}from"@/config";import{localeConfig as a}from"@/locale.config";export async function getRSS(o){let r=await e(),l=a[o],n=new t({title:l.siteName,description:l.siteDescription,id:`${i.SITE_URL}/${o}`,link:`${i.SITE_URL}/${o}`,language:o,favicon:`${i.SITE_URL}/thmanyah-icon.svg`,copyright:`All rights reserved ${new Date().getFullYear()}`});for(let t of Object.values(r))for(let e of t.getPages(o))e.data.lastModified&&n.addItem({id:`${i.SITE_URL}${e.url}`,title:e.data.title,description:e.data.description??"",link:`${i.SITE_URL}${e.url}`,date:new Date(e.data.lastModified)});return n.rss2()}
|
package/src/lib/sitemap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getSections as e,getSources as
|
|
1
|
+
import{getSections as e,getSources as o}from"@/lib/source";import{env as t}from"@/config";import{locales as a}from"@/locale.config";export async function buildSitemap(){let[l,{changelogSource:i}]=await Promise.all([e(),o()]),r=[];for(let e of a){for(let o of(r.push({url:`${t.SITE_URL}/${e}`}),Object.values(l)))for(let a of o.getPages(e))r.push({url:`${t.SITE_URL}${a.url}`,lastModified:a.data.lastModified?new Date(a.data.lastModified):void 0});for(let o of i.getPages(e))r.push({url:`${t.SITE_URL}${o.url}`,lastModified:new Date(o.data.date)})}return r}
|
package/src/lib/source.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{loader as e}from"fumadocs-core/source";import{lucideIconsPlugin as t}from"fumadocs-core/source/lucide-icons";import{openapiPlugin as r}from"fumadocs-openapi/server";import{createSearchAPI as a}from"fumadocs-core/search/server";import{i18n as o}from"@/lib/i18n";import{join as n}from"node:path";import{existsSync as i,watch as c}from"node:fs";import{readFile as l}from"node:fs/promises";import s from"gray-matter";import{env as f,isSectionHidden as m}from"@/config";import{createFsSource as u,discoverSections as p}from"@/lib/content-source";let g=[t(),r()];async function d(){let t=await p(f.CONTENT_DIR),r=Object.fromEntries(await Promise.all(t.map(async t=>{let r=e({source:await u(n(f.CONTENT_DIR,t)),baseUrl:`/${t}`,i18n:o,plugins:g});return[t,r]}))),i=e({source:await u(n(f.CONTENT_DIR,"changelog")),baseUrl:"/changelog",i18n:o,plugins:g}),c=a("simple",{indexes:await Promise.all(Object.entries(r).filter(([e])=>!m(e
|
|
1
|
+
import{loader as e}from"fumadocs-core/source";import{lucideIconsPlugin as t}from"fumadocs-core/source/lucide-icons";import{openapiPlugin as r}from"fumadocs-openapi/server";import{createSearchAPI as a}from"fumadocs-core/search/server";import{i18n as o}from"@/lib/i18n";import{join as n}from"node:path";import{existsSync as i,watch as c}from"node:fs";import{readFile as l}from"node:fs/promises";import s from"gray-matter";import{env as f,isSectionHidden as m}from"@/config";import{createFsSource as u,discoverSections as p}from"@/lib/content-source";let g=[t(),r()];async function d(){let t=await p(f.CONTENT_DIR),r=Object.fromEntries(await Promise.all(t.map(async t=>{let r=e({source:await u(n(f.CONTENT_DIR,t)),baseUrl:`/${t}`,i18n:o,plugins:g});return[t,r]}))),i=e({source:await u(n(f.CONTENT_DIR,"changelog")),baseUrl:"/changelog",i18n:o,plugins:g}),c=a("simple",{indexes:await Promise.all(Object.entries(r).filter(([e])=>!m(e)).flatMap(([,e])=>e.getLanguages().flatMap(({language:e,pages:t})=>t.map(async t=>{let{content:r}=s(await l(t.data.filePath,"utf-8"));return{id:t.url,url:t.url,locale:e,title:t.data.title,content:r}}))))});return{sections:r,changelogSource:i,searchServer:c}}let h=null;export function getSources(){return h||(h=d(),"development"===process.env.NODE_ENV&&h.then(()=>{i(f.CONTENT_DIR)&&c(f.CONTENT_DIR,{recursive:!0},()=>{h=null})})),h}export async function getSections(){let{sections:e}=await getSources();return Object.fromEntries(Object.entries(e).filter(([e])=>!m(e)))}export async function getAllPages(){return Object.values(await getSections()).flatMap(e=>e.getPages())}export async function getUnifiedPageTree(e){let{changelogSource:t}=await getSources(),r=await getSections(),a=[],o=r.docs;for(let[t,n]of(o&&a.push(...o.getPageTree(e).children),Object.entries(r))){if("docs"===t)continue;let r=n.getPageTree(e);0!==r.children.length&&a.push({type:"folder",name:r.name,children:r.children})}if(!m("changelog")){let r=t.getPageTree(e);r.children.length>0&&a.push({type:"folder",name:r.name,children:r.children})}return{name:"",children:a}}export async function getLLMText(e){let{content:t}=s(await l(e.data.filePath,"utf-8"));return`# ${e.data.title}
|
|
2
2
|
|
|
3
3
|
${t}`}
|