@ahmedrowaihi/8n 6.0.32 → 6.0.34
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/index.mjs +4 -4
- package/package.json +1 -1
- package/starter/package.json +1 -1
- package/starter/src/components/fumadocs/mdx.jsx +1 -1
- package/starter/src/features/ai/chat/tools.js +1 -1
- package/starter/src/features/docs/components/page-content.jsx +1 -1
- package/starter/src/features/feedback/components/feedback.jsx +1 -1
- package/starter/src/lib/content-source.js +1 -1
- package/starter/src/lib/create-docs-page.jsx +1 -1
- package/starter/src/lib/pages-api.js +1 -1
- package/starter/src/lib/sitemap.js +1 -1
- package/starter/src/lib/source.js +1 -1
- package/starter/app/[lang]/changelog/[...slug]/layout.jsx +0 -1
- package/starter/app/[lang]/changelog/[...slug]/page.jsx +0 -1
- package/starter/app/[lang]/changelog/layout.jsx +0 -1
- package/starter/app/[lang]/changelog/page.jsx +0 -1
- package/starter/src/features/changelog/components/changelog-list.jsx +0 -2
- package/starter/src/features/changelog/components/entry-content.jsx +0 -2
- package/starter/src/features/changelog/index.js +0 -1
package/dist/index.mjs
CHANGED
|
@@ -3736,7 +3736,7 @@ async function checkSelfUpdate() {
|
|
|
3736
3736
|
});
|
|
3737
3737
|
if (!res.ok) return;
|
|
3738
3738
|
const { version: latest } = await res.json();
|
|
3739
|
-
const current = "6.0.
|
|
3739
|
+
const current = "6.0.34";
|
|
3740
3740
|
if (latest !== current) console.log(pc.yellow("⚠") + pc.dim(` new version available: `) + pc.cyan(latest) + pc.dim(` (current: ${current}) — run `) + pc.cyan("npm i -g @ahmedrowaihi/8n") + pc.dim(" to update"));
|
|
3741
3741
|
} catch {}
|
|
3742
3742
|
}
|
|
@@ -3846,7 +3846,7 @@ async function dev() {
|
|
|
3846
3846
|
async function build({ server = false } = {}) {
|
|
3847
3847
|
const { config, contentDir } = await resolveProject();
|
|
3848
3848
|
const projectDir = process.cwd();
|
|
3849
|
-
console.log(pc.cyan("8n") + pc.dim(` v6.0.
|
|
3849
|
+
console.log(pc.cyan("8n") + pc.dim(` v6.0.34 build → ${contentDir}`));
|
|
3850
3850
|
if (server) await runNextFlat(projectDir, "build", buildEnv({
|
|
3851
3851
|
config,
|
|
3852
3852
|
contentDir,
|
|
@@ -4164,7 +4164,7 @@ async function mcp() {
|
|
|
4164
4164
|
const mcpDir = join(getStarterDir(), "content", "mcp", "en");
|
|
4165
4165
|
const server = new McpServer({
|
|
4166
4166
|
name: "8n",
|
|
4167
|
-
version: "6.0.
|
|
4167
|
+
version: "6.0.34"
|
|
4168
4168
|
});
|
|
4169
4169
|
server.registerTool("read_me", {
|
|
4170
4170
|
description: "Returns how to use the 8n MCP tools. Call this BEFORE documenting anything with 8n.",
|
|
@@ -4305,7 +4305,7 @@ Example: get_component({ name: "components" }) returns all available MDX compone
|
|
|
4305
4305
|
|
|
4306
4306
|
//#endregion
|
|
4307
4307
|
//#region src/index.ts
|
|
4308
|
-
const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.
|
|
4308
|
+
const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.34").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
|
|
4309
4309
|
if (cmd.opts().debug) process.env.DEBUG_8N = "1";
|
|
4310
4310
|
});
|
|
4311
4311
|
program.command("init").description("Scaffold a new docs project in the current directory").action(init);
|
package/package.json
CHANGED
package/starter/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 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.js";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;
|
|
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.js";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&&d?o=>e(t,{...o,translations:c,pageTitle:f,githubRepo:d}):()=>null,...m}}export const useMDXComponents=getMDXComponents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAllPages as t
|
|
1
|
+
import{getAllPages as t}from"../../../lib/source";import{readFile as e}from"node:fs/promises";import a from"gray-matter";import{create as i,insertMultiple as r,search as n}from"@orama/orama";import{tool as o}from"ai";import{z as l}from"zod";let c={url:"string",title:"string",description:"string",content:"string"},s=null;export const searchTool=o({description:"Search the docs content and return relevant results.",inputSchema:l.object({query:l.string(),limit:l.number().int().min(1).max(20).default(8)}),async execute({query:o,limit:l}){let u=await (!s&&(s=(async()=>{let n=i({schema:c}),o=await t();return r(n,(await Promise.all(o.map(async t=>{if(!t.data.filePath)return null;let{content:i}=a(await e(t.data.filePath,"utf-8"));return{url:t.url,title:t.data.title,description:t.data.description??"",content:i}}))).filter(Boolean)),n})()),s);return(await n(u,{term:o,limit:l,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=o({description:"Fetch the full content of a specific documentation or changelog page by its URL path.",inputSchema:l.object({url:l.string().describe("The URL path of the page, e.g. /en/docs/getting-started")}),async execute({url:i}){let r=(await t()).find(t=>t.url===i);if(!r)return{error:`Page not found: ${i}`};if(!r.data.filePath)return{error:"Page has no text content"};let{content:n}=a(await e(r.data.filePath,"utf-8"));return{url:r.url,title:r.data.title,content:n}}});export const listPagesTool=o({description:"List all available documentation and changelog pages with their URLs and titles.",inputSchema:l.object({}),execute:async()=>(await t()).map(t=>({url:t.url,title:t.data.title,type:"docs"}))});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{DocsBody as t,DocsDescription as a,DocsPage as
|
|
2
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{DocsBody as t,DocsDescription as a,DocsPage as r,DocsTitle as i,EditOnGitHub as n,PageLastUpdate as l,MarkdownCopyButton as c,ViewOptionsPopover as d}from"../../../components/fumadocs/layout/docs/page";import{DocsTOC as s}from"../../../components/fumadocs/layout/docs/page/docs-toc";import{Feedback as f,createGitHubFeedbackAction as m}from"../../feedback";import{localeConfig as b}from"../../../locale.config";import{Transition as p}from"../../../components/page-transition";export function DocsPageContent({toc:u,frontmatter:k,children:h,markdownUrl:g,github:U,path:w,lang:x,lastModified:C,neighbours:y,full:O}){let j=(b[x]??b.en).translations;return e(r,{asChild:!0,toc:u,full:O,tableOfContent:{enabled:!0,component:e(s,{toc:u,style:"clerk",translations:{toc:j.toc,aiChatTrigger:j.aiChatTrigger}})},tableOfContentPopover:{style:"clerk"},footer:{items:y},children:o(p,{animationKey:w,children:[e(i,{children:k.title}),e(a,{children:k.description}),!O&&(g||U?.fileUrl)&&o("div",{className:"flex flex-row gap-2 items-center border-b -mt-4 pb-6",children:[g&&e(c,{markdownUrl:g}),g&&U?.fileUrl&&e(d,{markdownUrl:g,githubUrl:U.fileUrl}),U?.fileUrl&&e(n,{href:U.fileUrl})]}),e(t,{children:h}),!O&&C&&e(l,{date:new Date(C)}),!O&&U?.repo&&e(f,{onSendAction:m(k.title,U.repo),translations:{question:j.feedbackQuestion,feedbackLabel:j.feedbackLabel,good:j.feedbackGood,bad:j.feedbackBad,placeholder:j.feedbackPlaceholder,submit:j.feedbackSubmit,thankYou:j.feedbackThankYou,viewOnGitHub:j.feedbackViewOnGitHub,submitAgain:j.feedbackSubmitAgain}})]})})}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{cn as r}from"../../../lib/cn";import{Button as a,buttonVariants as n}from"../../../components/ui/button";import{CornerDownRightIcon as o,MessageSquare as l,ThumbsDown as s,ThumbsUp as i}from"lucide-react";import{useEffect as c,useEffectEvent as d,useState as u,useTransition as m}from"react";import{Collapsible as p,CollapsibleContent as f}from"../../../components/ui/collapsible";import{cva as g}from"class-variance-authority";import{usePathname as b}from"../../../lib/navigation";import{Popover as h,PopoverContent as x,PopoverTrigger as v}from"../../../components/ui/popover";import{actionResponse as y,blockFeedback as N,pageFeedback as k}from"../schema";import{z as w}from"zod/mini";import{Textarea as C}from"../../../components/ui/textarea";let z=g("inline-flex items-center gap-2 px-3 py-2 rounded-full font-medium border text-sm [&_svg]:size-4 disabled:cursor-not-allowed",{variants:{active:{true:"bg-accent text-accent-foreground [&_svg]:fill-current",false:"text-muted-foreground"}}}),S=w.extend(k,{response:y}),O=w.extend(N,{response:y});export function Feedback({onSendAction:o,translations:l}){let c=b(),{previous:d,setPrevious:g}=D(c,e=>{let t=S.safeParse(e);return t.success?t.data:null}),[h,x]=u(null),[v,y]=u(""),[N,k]=m();function w(e){null!=h&&(k(async()=>{let e={url:c,opinion:h,message:v};g({response:await o(e),...e}),y(""),x(null)}),e?.preventDefault())}let O=d?.opinion??h;return t(p,{open:null!==h||null!==d,onOpenChange:e=>{e||x(null)},className:"border-y py-3",children:[t("div",{className:"flex flex-row items-center gap-2",children:[e("p",{className:"text-sm font-medium pe-2",children:l.question}),t("button",{disabled:null!==d,className:r(z({active:"good"===O})),onClick:()=>{x("good")},children:[e(i,{}),l.good]}),t("button",{disabled:null!==d,className:r(z({active:"bad"===O})),onClick:()=>{x("bad")},children:[e(s,{}),l.bad]})]}),e(f,{className:"mt-3",children:d?t("div",{className:"px-3 py-6 flex flex-col items-center gap-3 bg-card text-muted-foreground text-sm text-center rounded-xl",children:[e("p",{children:l.thankYou}),t("div",{className:"flex flex-row items-center gap-2",children:[e("a",{href:d.response
|
|
2
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{cn as r}from"../../../lib/cn";import{Button as a,buttonVariants as n}from"../../../components/ui/button";import{CornerDownRightIcon as o,MessageSquare as l,ThumbsDown as s,ThumbsUp as i}from"lucide-react";import{useEffect as c,useEffectEvent as d,useState as u,useTransition as m}from"react";import{Collapsible as p,CollapsibleContent as f}from"../../../components/ui/collapsible";import{cva as g}from"class-variance-authority";import{usePathname as b}from"../../../lib/navigation";import{Popover as h,PopoverContent as x,PopoverTrigger as v}from"../../../components/ui/popover";import{actionResponse as y,blockFeedback as N,pageFeedback as k}from"../schema";import{z as w}from"zod/mini";import{Textarea as C}from"../../../components/ui/textarea";let z=g("inline-flex items-center gap-2 px-3 py-2 rounded-full font-medium border text-sm [&_svg]:size-4 disabled:cursor-not-allowed",{variants:{active:{true:"bg-accent text-accent-foreground [&_svg]:fill-current",false:"text-muted-foreground"}}}),S=w.extend(k,{response:y}),O=w.extend(N,{response:y});export function Feedback({onSendAction:o,translations:l}){let c=b(),{previous:d,setPrevious:g}=D(c,e=>{let t=S.safeParse(e);return t.success?t.data:null}),[h,x]=u(null),[v,y]=u(""),[N,k]=m();function w(e){null!=h&&(k(async()=>{let e={url:c,opinion:h,message:v};g({response:await o(e),...e}),y(""),x(null)}),e?.preventDefault())}let O=d?.opinion??h;return t(p,{open:null!==h||null!==d,onOpenChange:e=>{e||x(null)},className:"border-y py-3",children:[t("div",{className:"flex flex-row items-center gap-2",children:[e("p",{className:"text-sm font-medium pe-2",children:l.question}),t("button",{disabled:null!==d,className:r(z({active:"good"===O})),onClick:()=>{x("good")},children:[e(i,{}),l.good]}),t("button",{disabled:null!==d,className:r(z({active:"bad"===O})),onClick:()=>{x("bad")},children:[e(s,{}),l.bad]})]}),e(f,{className:"mt-3",children:d?t("div",{className:"px-3 py-6 flex flex-col items-center gap-3 bg-card text-muted-foreground text-sm text-center rounded-xl",children:[e("p",{children:l.thankYou}),t("div",{className:"flex flex-row items-center gap-2",children:[d.response?.githubUrl&&e("a",{href:d.response.githubUrl,rel:"noreferrer noopener",target:"_blank",className:r(n({variant:"default"}),"text-xs"),children:l.viewOnGitHub}),e(a,{variant:"secondary",className:"text-xs",onClick:()=>{x(d.opinion),g(null)},children:l.submitAgain})]})]}):t("form",{className:"flex flex-col gap-3",onSubmit:w,children:[e(C,{autoFocus:!0,required:!0,value:v,onChange:e=>y(e.target.value),placeholder:l.placeholder,onKeyDown:e=>{e.shiftKey||"Enter"!==e.key||w(e)}}),e(a,{type:"submit",variant:"outline",className:"w-fit px-3",disabled:N,children:l.submit})]})})]})}export function FeedbackBlock({id:s,body:i,onSendAction:c,translations:d,children:p}){let f=b(),g=`${f}-${s}`,{previous:y,setPrevious:N}=D(g,e=>{let t=O.safeParse(e);return t.success?t.data:null}),[k,w]=u(""),[z,S]=m(),[F,K]=u(!1);function P(e){S(async()=>{let e={blockId:g,blockBody:i,url:f,message:k};N({response:await c(e),...e}),w("")}),e?.preventDefault()}return t(h,{open:F,onOpenChange:K,children:[t("div",{className:"relative group/feedback",children:[e("div",{className:r("absolute -inset-1 rounded-sm pointer-events-none transition-colors duration-100 z-[-1]",F?"bg-accent":"group-hover/feedback:bg-accent group-hover/feedback:delay-100")}),t(v,{className:r(n({variant:"secondary",size:"sm"}),"absolute -top-7 inset-e-0 backdrop-blur-sm text-muted-foreground gap-1.5 transition-all duration-100 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",!F&&"opacity-0 pointer-events-none group-hover/feedback:pointer-events-auto group-hover/feedback:opacity-100 group-hover/feedback:delay-100 hover:pointer-events-auto hover:opacity-100 hover:delay-100"),onClick:e=>{K(e=>!e),e.stopPropagation(),e.preventDefault()},children:[e(l,{className:"size-3.5"}),d.feedbackLabel]}),e("div",{className:"in-[.prose-no-margin]:prose-no-margin",children:p})]}),e(x,{className:"min-w-75 bg-card text-card-foreground",children:y?t("div",{className:"flex flex-col items-center py-2 gap-2 text-muted-foreground text-sm text-center rounded-xl",children:[e("p",{children:d.thankYou}),t("div",{className:"flex flex-row items-center gap-2",children:[y.response?.githubUrl&&e("a",{href:y.response.githubUrl,rel:"noreferrer noopener",target:"_blank",className:r(n({variant:"default"}),"text-xs"),children:d.viewOnGitHub}),e(a,{variant:"secondary",className:"text-xs",onClick:()=>N(null),children:d.submitAgain})]})]}):t("form",{className:"flex flex-col gap-2",onSubmit:P,children:[e(C,{autoFocus:!0,required:!0,value:k,onChange:e=>w(e.target.value),placeholder:d.placeholder,onKeyDown:e=>{e.shiftKey||"Enter"!==e.key||P(e)}}),t(a,{type:"submit",variant:"secondary",size:"sm",className:"gap-1.5",disabled:z,children:[e(o,{className:"text-muted-foreground size-4"}),d.submit]})]})})]})}function D(e,t){let r=`docs-feedback-${e}`,[a,n]=u(null),o=d(t);return c(()=>{let e=localStorage.getItem(r);if(null===e)return;let t=o(JSON.parse(e));null!==t&&n(t)},[r]),{previous:a,setPrevious(e){e?localStorage.setItem(r,JSON.stringify(e)):localStorage.removeItem(r),n(e)}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readdir as t,readFile as e,stat as a}from"node:fs/promises";let i=new Set(["
|
|
1
|
+
import{readdir as t,readFile as e,stat as a}from"node:fs/promises";let i=new Set(["home"]);export async function discoverSections(e){let a;try{a=await t(e,{withFileTypes:!0})}catch{return[]}return a.filter(t=>t.isDirectory()&&!i.has(t.name)).map(t=>t.name)}import{join as r,relative as o,extname as n,basename as l}from"node:path";import c from"gray-matter";async function*s(e){let a;try{a=await t(e,{withFileTypes:!0})}catch{return}for(let t of a){let a=r(e,t.name);t.isDirectory()?yield*s(a):yield a}}export async function createFsSource(t){let i=[];for await(let r of s(t)){let s=o(t,r),m=n(r);if("meta.json"===l(r))try{let t=await e(r,"utf8");i.push({type:"meta",path:s,data:JSON.parse(t)})}catch{}else if(".mdx"===m||".md"===m)try{let t=await e(r,"utf8"),o=await a(r),{data:n}=c(t);i.push({type:"page",path:s,data:{...n,title:n.title??"Untitled",filePath:r,lastModified:o.mtime}})}catch{}}return{files:i}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{notFound as e,redirect as a}from"next/navigation";import{
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{notFound as e,redirect as a}from"next/navigation";import{relative as r}from"node:path";import{findNeighbour as o}from"fumadocs-core/page-tree";import{DocsPageContent as i}from"../features/docs";import{getMDXComponentsForLang as n}from"../components/fumadocs/mdx-server.js";import{getSources as l,getUnifiedPageTree as m}from"./source";import{localeConfig as s}from"../locale.config";import{env as c}from"../config";import{compiler as d}from"./mdx-compiler";import{readFile as f}from"node:fs/promises";export function createDocsPage(u,p={}){let{getMarkdownUrl:g,render:P}=p;return{generateStaticParams:async function t(){let{sections:t}=await l(),e=t[u];return e?e.generateParams():[]},generateMetadata:async function t({params:e}){let{lang:a,slug:r=[]}=await e,{sections:o}=await l(),i=o[u];if(!i)return{};let n=i.getPage(r,a);if(!n)return{};let m=s[a]?.siteName??s.en.siteName;return{title:`${n.data.title} — ${m}`,description:n.data.description}},default:async function s({params:p}){let{lang:_,slug:w=[]}=await p,{sections:U}=await l(),h=U[u];h||e();let E=h.getPage(w,_);if(!E){if(0===w.length){let t=h.getPages(_)[0];t&&a(t.url)}e()}E.data.redirect&&a(E.data.redirect);let B=await f(E.absolutePath,"utf-8"),I=await d.compile({source:B}),T=I.body,b=I.toc,x=o(await m(_),E.url);return P?P({page:E,toc:b,lang:_,MDX:T}):t(i,{toc:b,frontmatter:{title:E.data.title,description:E.data.description},github:c.NEXT_PUBLIC_GITHUB_REPO?{repo:c.NEXT_PUBLIC_GITHUB_REPO,fileUrl:`${c.NEXT_PUBLIC_GITHUB_REPO}/blob/HEAD/${r(process.cwd(),E.absolutePath)}`}:void 0,markdownUrl:g?.(E.slugs),path:E.path,lang:_,lastModified:E.data.lastModified??null,neighbours:x,full:E.data.full??!1,children:t(T,{components:n(_,E.data.title,c.NEXT_PUBLIC_GITHUB_REPO)})})}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAllPages as t
|
|
1
|
+
import{getAllPages as t}from"./source";export async function getPageEntries(){return(await t()).map(t=>({url:t.url,title:t.data.title,type:"docs"}))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getSections as
|
|
1
|
+
import{getSections as o}from"./source";import{env as t}from"../config";import{locales as e}from"../locale.config";export async function buildSitemap(){let i=await o(),r=[];for(let o of e)for(let e of(r.push({url:`${t.SITE_URL}/${o}`}),Object.values(i)))for(let i of e.getPages(o))r.push({url:`${t.SITE_URL}${i.url}`,lastModified:i.data.lastModified?new Date(i.data.lastModified):void 0});return r}
|
|
@@ -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
|
|
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"./i18n";import{join as n}from"node:path";import{existsSync as i,watch as c}from"node:fs";import{readFile as s}from"node:fs/promises";import l from"gray-matter";import{env as u,isSectionHidden as f}from"../config";import{createFsSource as m,discoverSections as p}from"./content-source.js";let g=[t(),r()];async function d(){let t=await p(u.CONTENT_DIR),r=Object.fromEntries(await Promise.all(t.map(async t=>{let r=e({source:await m(n(u.CONTENT_DIR,t)),baseUrl:`/${t}`,i18n:o,plugins:g});return[t,r]}))),i=a("simple",{indexes:await Promise.all(Object.entries(r).filter(([e])=>!f(e)).flatMap(([,e])=>e.getLanguages().flatMap(({language:e,pages:t})=>t.map(async t=>{let{content:r}=l(await s(t.data.filePath,"utf-8"));return{id:t.url,url:t.url,locale:e,title:t.data.title,content:r}}))))});return{sections:r,searchServer:i}}let T=null;export function getSources(){return T||(T=d(),"development"===process.env.NODE_ENV&&T.then(()=>{i(u.CONTENT_DIR)&&c(u.CONTENT_DIR,{recursive:!0},()=>{T=null})})),T}export async function getSections(){let{sections:e}=await getSources();return Object.fromEntries(Object.entries(e).filter(([e])=>!f(e)))}export async function getAllPages(){return Object.values(await getSections()).flatMap(e=>e.getPages())}export async function getUnifiedPageTree(e){let t=await getSections(),r=[],a=t.docs;for(let[o,n]of(a&&r.push(...a.getPageTree(e).children),Object.entries(t))){if("docs"===o)continue;let t=n.getPageTree(e);0!==t.children.length&&r.push({type:"folder",name:t.name,children:t.children})}return{name:"",children:r}}export async function getNavLinks(e){return Object.entries(await getSections()).map(([t,r])=>({text:r.getPageTree(e).name??t,url:`/${e}/${t}`,active:"nested-url"}))}export async function getLLMText(e){let{content:t}=l(await s(e.data.filePath,"utf-8"));return`# ${e.data.title}
|
|
2
2
|
|
|
3
3
|
${t}`}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createDocsLayout as o}from"../../../../src/lib/create-docs-layout";export default o();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{createDocsPage as a}from"../../../../src/lib/create-docs-page";import{ChangelogEntryContent as t}from"../../../../src/features/changelog";import{getMDXComponents as r}from"../../../../src/components/fumadocs/mdx";export const{generateStaticParams,generateMetadata,default:Page}=a("changelog",{render:({page:a,toc:o,lang:d,MDX:s})=>e(t,{toc:o,lang:d,lastModified:a.data.lastModified??null,version:a.data.version,date:a.data.date,children:e(s,{components:r()})})});export default Page;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{Transition as r}from"../../../src/components/page-transition";export default function t({children:o}){return e(r,{className:"flex flex-col flex-1",children:o})}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{getSources as e}from"../../../src/lib/source";import{localeConfig as a}from"../../../src/locale.config";import{ChangelogList as r}from"../../../src/features/changelog";export async function generateMetadata({params:t}){let{lang:e}=await t,r=a[e]?.translations??a.en.translations,n=a[e]?.siteName??a.en.siteName;return{title:`${r.changelog} — ${n}`}}export default async function n({params:a}){let{lang:i}=await a,{changelogSource:s}=await e();return t(r,{entries:s.getPages(i).map(t=>({url:t.url,title:t.data.title,summary:t.data.summary??null,version:t.data.version,date:t.data.date})).sort((t,e)=>new Date(e.date).getTime()-new Date(t.date).getTime()),lang:i})}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{jsx as e,jsxs as l}from"react/jsx-runtime";import{Link as t}from"../../../lib/navigation";import{HomeLayout as a}from"../../../components/fumadocs/layout/home";import{baseOptions as r}from"../../../lib/layout.shared";import{localeConfig as m}from"../../../locale.config";export function ChangelogList({entries:n,lang:i}){let s=m[i]?.translations??m.en.translations;return e(a,{...r(i),children:l("main",{className:"flex flex-col flex-1 max-w-3xl mx-auto w-full px-6 py-16",children:[l("div",{className:"mb-12",children:[e("p",{className:"text-xs font-medium tracking-widest uppercase text-muted-foreground mb-3",children:s.changelog}),e("h1",{className:"text-3xl font-bold tracking-tight",children:s.changelogTitle}),e("p",{className:"mt-2 text-muted-foreground",children:s.changelogDescription})]}),e("div",{className:"flex flex-col",children:n.map((a,r)=>l("div",{className:"flex gap-8 group",children:[l("div",{className:"flex flex-col items-center",children:[e("div",{className:"w-2.5 h-2.5 rounded-full bg-primary mt-1.5 shrink-0 ring-4 ring-background"}),r<n.length-1&&e("div",{className:"w-px flex-1 bg-border mt-2"})]}),l("div",{className:`pb-12 min-w-0 flex-1 ${r===n.length-1?"pb-0":""}`,children:[l("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[l("span",{className:"inline-flex items-center rounded-full bg-primary/10 text-primary px-2.5 py-0.5 text-xs font-semibold font-mono",children:["v",a.version]}),e("time",{className:"text-xs text-muted-foreground",children:new Intl.DateTimeFormat(s.dateLocale,{year:"numeric",month:"long",day:"numeric"}).format(new Date(a.date))})]}),e("h2",{className:"text-lg font-semibold mt-1 mb-2",children:a.title}),a.summary&&e("p",{className:"text-muted-foreground text-sm leading-relaxed mb-3",children:a.summary}),e(t,{href:a.url,className:"text-sm font-medium text-primary hover:underline",children:s.changelogReadMore})]})]},a.url))})]})})}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{DocsBody as n,DocsDescription as o,DocsPage as a,DocsTitle as r,PageLastUpdate as i}from"../../../components/fumadocs/layout/docs/page";import{Transition as l}from"../../../components/page-transition";import{localeConfig as m}from"../../../locale.config";export function ChangelogEntryContent({toc:s,children:c,lang:d,lastModified:p,version:f,date:h}){return e(a,{asChild:!0,toc:s,tableOfContent:{style:"clerk"},tableOfContentPopover:{style:"clerk"},children:t(l,{animationKey:f,children:[e(r,{children:e("span",{className:"inline-flex items-center gap-2",children:t("span",{className:"inline-flex items-center rounded-full bg-primary/10 text-primary px-2.5 py-0.5 text-sm font-semibold font-mono",children:["v",f]})})}),e(o,{children:e("time",{className:"text-muted-foreground text-sm",children:new Intl.DateTimeFormat(m[d]?.translations.dateLocale??m.en.translations.dateLocale,{year:"numeric",month:"long",day:"numeric"}).format(new Date(h))})}),e(n,{children:c}),p&&e(i,{date:new Date(p)})]})})}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ChangelogEntryContent}from"./components/entry-content";export{ChangelogList}from"./components/changelog-list";
|