@ahmedrowaihi/8n 6.0.45 → 6.0.47

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.
Files changed (36) hide show
  1. package/dist/index.mjs +4 -4
  2. package/package.json +1 -1
  3. package/starter/content/api/ar/index.mdx +4 -0
  4. package/starter/content/changelog/ar/index.mdx +3 -0
  5. package/starter/content/changelog/en/index.mdx +3 -0
  6. package/starter/content/docs/ar/index.mdx +1 -0
  7. package/starter/content/docs/en/index.mdx +1 -0
  8. package/starter/content/mcp/ar/index.mdx +4 -0
  9. package/starter/content/mcp/en/index.mdx +4 -0
  10. package/starter/content/ui/ar/index.mdx +4 -0
  11. package/starter/package.json +1 -1
  12. package/starter/src/features/docs/section-page.jsx +2 -1
  13. package/starter/src/lib/content-source.js +1 -1
  14. package/starter/src/lib/docs-page.js +1 -0
  15. package/starter/content/api/ar/meta.json +0 -1
  16. package/starter/content/api/en/meta.json +0 -5
  17. package/starter/content/changelog/ar/meta.json +0 -3
  18. package/starter/content/changelog/en/meta.json +0 -3
  19. package/starter/content/docs/ar/components/meta.json +0 -27
  20. package/starter/content/docs/ar/meta.json +0 -4
  21. package/starter/content/docs/en/components/meta.json +0 -27
  22. package/starter/content/docs/en/meta.json +0 -4
  23. package/starter/content/mcp/ar/meta.json +0 -1
  24. package/starter/content/mcp/en/meta.json +0 -5
  25. package/starter/content/ui/ar/meta.json +0 -1
  26. package/starter/content/ui/en/meta.json +0 -5
  27. /package/starter/content/api/en/{listPets.mdx → 01-listPets.mdx} +0 -0
  28. /package/starter/content/api/en/{showPetById.mdx → 02-showPetById.mdx} +0 -0
  29. /package/starter/content/api/en/{createPet.mdx → 03-createPet.mdx} +0 -0
  30. /package/starter/content/api/en/{deletePet.mdx → 04-deletePet.mdx} +0 -0
  31. /package/starter/content/docs/ar/{getting-started.mdx → 01-getting-started.mdx} +0 -0
  32. /package/starter/content/docs/en/{getting-started.mdx → 01-getting-started.mdx} +0 -0
  33. /package/starter/content/mcp/en/{config.mdx → 01-config.mdx} +0 -0
  34. /package/starter/content/mcp/en/{structure.mdx → 02-structure.mdx} +0 -0
  35. /package/starter/content/mcp/en/{frontmatter.mdx → 03-frontmatter.mdx} +0 -0
  36. /package/starter/content/mcp/en/{components.mdx → 04-components.mdx} +0 -0
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.45";
3739
+ const current = "6.0.47";
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
  }
@@ -3849,7 +3849,7 @@ async function dev() {
3849
3849
  async function build({ server = false } = {}) {
3850
3850
  const { config, contentDir } = await resolveProject();
3851
3851
  const projectDir = process.cwd();
3852
- console.log(pc.cyan("8n") + pc.dim(` v6.0.45 build → ${contentDir}`));
3852
+ console.log(pc.cyan("8n") + pc.dim(` v6.0.47 build → ${contentDir}`));
3853
3853
  if (server) await runNextFlat(projectDir, "build", buildEnv({
3854
3854
  config,
3855
3855
  contentDir,
@@ -4167,7 +4167,7 @@ async function mcp() {
4167
4167
  const mcpDir = join(getStarterDir(), "content", "mcp", "en");
4168
4168
  const server = new McpServer({
4169
4169
  name: "8n",
4170
- version: "6.0.45"
4170
+ version: "6.0.47"
4171
4171
  });
4172
4172
  server.registerTool("read_me", {
4173
4173
  description: "Returns how to use the 8n MCP tools. Call this BEFORE documenting anything with 8n.",
@@ -4308,7 +4308,7 @@ Example: get_component({ name: "components" }) returns all available MDX compone
4308
4308
 
4309
4309
  //#endregion
4310
4310
  //#region src/index.ts
4311
- const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.45").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
4311
+ const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.47").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
4312
4312
  if (cmd.opts().debug) process.env.DEBUG_8N = "1";
4313
4313
  });
4314
4314
  program.command("init").description("Scaffold a new docs project in the current directory").action(init);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahmedrowaihi/8n",
3
- "version": "6.0.45",
3
+ "version": "6.0.47",
4
4
  "description": "8n docs — run your docs site from your content directory",
5
5
  "bin": {
6
6
  "8n": "./dist/index.mjs"
@@ -0,0 +1,4 @@
1
+ ---
2
+ label: مرجع API
3
+ icon: PlugZap
4
+ ---
@@ -0,0 +1,3 @@
1
+ ---
2
+ label: سجل التغييرات
3
+ ---
@@ -0,0 +1,3 @@
1
+ ---
2
+ label: Changelog
3
+ ---
@@ -1,4 +1,5 @@
1
1
  ---
2
+ label: التوثيق
2
3
  title: مقدمة
3
4
  description: مرحباً بك في قالب التوثيق — مبني بـ Fumadocs و Next.js وخطوط ثمانية.
4
5
  icon: BookOpen
@@ -1,4 +1,5 @@
1
1
  ---
2
+ label: Documentation
2
3
  title: Introduction
3
4
  description: Welcome to the docs starter — built with Fumadocs, Next.js, and Thmanyah fonts.
4
5
  icon: BookOpen
@@ -0,0 +1,4 @@
1
+ ---
2
+ label: معرفة MCP
3
+ icon: Bot
4
+ ---
@@ -0,0 +1,4 @@
1
+ ---
2
+ label: MCP Knowledge
3
+ icon: Bot
4
+ ---
@@ -0,0 +1,4 @@
1
+ ---
2
+ label: مكونات UI
3
+ icon: Palette
4
+ ---
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahmedrowaihi/8n-starter",
3
- "version": "6.0.45",
3
+ "version": "6.0.47",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1 +1,2 @@
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 i}from"fumadocs-core/page-tree";import{DocsPageContent as o}from".";import{getMDXComponentsForLang as n}from"../../components/fumadocs/mdx-server.js";import{getSections as l}from"../../lib/source";import{localeConfig as m}from"../../locale.config";import{env as d}from"../../config";import{compiler as s}from"../../lib/mdx-compiler";import{readFile as f}from"node:fs/promises";export async function generateStaticParams(){return Object.entries(await l()).flatMap(([t,e])=>e.generateParams().map(e=>({section:t,...e})))}export async function generateMetadata({params:t}){let{lang:e,section:a,slug:r=[]}=await t,i=(await l())[a];if(!i)return{};let o=i.getPage(r,e);if(!o)return{};let n=m[e]?.siteName??m.en.siteName;return{title:`${o.data.title} — ${n}`,description:o.data.description}}export default async function c({params:m}){let{lang:p,section:u,slug:g=[]}=await m,P=(await l())[u];P||e();let _=P.getPage(g,p);if(!_){if(0===g.length){let t=P.getPages(p)[0];t&&a(t.url)}e()}_.data.redirect&&a(_.data.redirect);let x=await f(_.data.filePath,"utf-8"),U=await s.compile({source:x}),h=U.body,w=U.toc,E=i(P.getPageTree(p),_.url),T=`/llms.mdx/${u}/${[..._.slugs,"index.mdx"].join("/")}`;return t(o,{toc:w,frontmatter:{title:_.data.title,description:_.data.description},github:d.NEXT_PUBLIC_GITHUB_REPO?{repo:d.NEXT_PUBLIC_GITHUB_REPO,fileUrl:`${d.NEXT_PUBLIC_GITHUB_REPO}/blob/HEAD/${r(process.cwd(),_.data.filePath)}`}:void 0,markdownUrl:T,path:_.path,lang:p,lastModified:_.data.lastModified??null,neighbours:E,full:_.data.full??!1,children:t(h,{components:n(p,_.data.title,d.NEXT_PUBLIC_GITHUB_REPO)})})}
1
+ "use server";
2
+ import{jsx as t}from"react/jsx-runtime";import{notFound as e,redirect as r}from"next/navigation";import{relative as i}from"node:path";import{DocsPageContent as o}from".";import{getMDXComponentsForLang as a}from"../../components/fumadocs/mdx-server.js";import{getSections as n}from"../../lib/source";import{getDocsPageMeta as m,resolveDocsPage as c}from"../../lib/docs-page";import{localeConfig as l}from"../../locale.config";import{env as s}from"../../config";export async function generateStaticParams(){return Object.entries(await n()).flatMap(([t,e])=>e.generateParams().map(e=>({section:t,...e})))}export async function generateMetadata({params:t}){let{lang:e,section:r,slug:i=[]}=await t,o=await m(r,i,e);if(!o||"redirect"===o.type)return{};let a=l[e]?.siteName??l.en.siteName;return{title:`${o.title} — ${a}`,description:o.description}}export default async function p({params:n}){let{lang:m,section:l,slug:f=[]}=await n,d=await c(l,f,m);return d||e(),"redirect"===d.type&&r(d.url),t(o,{toc:d.toc,frontmatter:{title:d.title,description:d.description},github:s.NEXT_PUBLIC_GITHUB_REPO?{repo:s.NEXT_PUBLIC_GITHUB_REPO,fileUrl:`${s.NEXT_PUBLIC_GITHUB_REPO}/blob/HEAD/${i(process.cwd(),d.filePath)}`}:void 0,markdownUrl:d.markdownUrl,path:d.path,lang:m,lastModified:d.lastModified,neighbours:d.neighbours,full:d.full,children:t(d.MDX,{components:a(m,d.title,s.NEXT_PUBLIC_GITHUB_REPO)})})}
@@ -1 +1 @@
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
+ import{readdir as t,readFile as e,stat as a}from"node:fs/promises";import{join as i,relative as n}from"node:path";import r from"gray-matter";let l=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()&&!l.has(t.name)).map(t=>t.name)}let m=/^(\d+)-(.+)$/;function o(t){let e=t.match(m);return e?[parseInt(e[1],10),e[2]]:[1/0,t]}function c(t){return[...t].sort((t,e)=>{let[a,i]=o(t.name),[n,r]=o(e.name);return a!==n?a-n:i.localeCompare(r)})}async function d(l,o,f){let s;try{s=await t(l,{withFileTypes:!0})}catch{return}let p=s.filter(t=>t.isFile()&&(t.name.endsWith(".mdx")||t.name.endsWith(".md"))),h=s.filter(t=>t.isDirectory()),u=p.find(t=>"index.mdx"===t.name||"index.md"===t.name),y=c(p.filter(t=>"index.mdx"!==t.name&&"index.md"!==t.name)),w=c(h);if(u){let t=i(l,u.name),m=n(o,l);try{let l=await e(t,"utf8"),c=await a(t),{data:d,content:s}=r(l),p=d.label??d.title??void 0,h={};p&&(h.title=p),d.icon&&(h.icon=d.icon);let u=m?i(m,"meta.json"):"meta.json";if(f.push({type:"meta",path:u,data:h}),s.trim().length>0){let e=n(o,t);f.push({type:"page",path:e,data:{...d,title:d.title??"Untitled",filePath:t,lastModified:c.mtime}})}}catch{}}for(let t of y){let c=i(l,t.name),d=n(o,i(l,t.name.replace(m,"$2")));try{let t=await e(c,"utf8"),i=await a(c),{data:n}=r(t);f.push({type:"page",path:d,data:{...n,title:n.title??"Untitled",filePath:c,lastModified:i.mtime}})}catch{}}for(let t of w)await d(i(l,t.name),o,f)}export async function createFsSource(t){let e=[];return await d(t,t,e),{files:e}}
@@ -0,0 +1 @@
1
+ import{findNeighbour as e}from"fumadocs-core/page-tree";import{readFile as t}from"node:fs/promises";import{getSections as r}from"./source";import{compiler as a}from"./mdx-compiler";export async function getDocsPageMeta(e,t,a){let i=(await r())[e];if(!i)return null;let l=i.getPage(t,a);if(!l){if(0===t.length){let e=i.getPages(a)[0];if(e)return{type:"redirect",url:e.url}}return null}return l.data.redirect?{type:"redirect",url:l.data.redirect}:{type:"meta",title:l.data.title,description:l.data.description}}export async function resolveDocsPage(i,l,d){let o=(await r())[i];if(!o)return null;let n=o.getPage(l,d);if(!n){if(0===l.length){let e=o.getPages(d)[0];if(e)return{type:"redirect",url:e.url}}return null}if(n.data.redirect)return{type:"redirect",url:n.data.redirect};let u=await t(n.data.filePath,"utf-8"),c=await a.compile({source:u});return{type:"page",title:n.data.title,description:n.data.description,filePath:n.data.filePath,lastModified:n.data.lastModified??null,full:n.data.full??!1,path:n.path,toc:c.toc,MDX:c.body,neighbours:e(o.getPageTree(d),n.url),markdownUrl:`/llms.mdx/${i}/${[...n.slugs,"index.mdx"].join("/")}`}}
@@ -1 +0,0 @@
1
- { "title": "مرجع API", "icon": "PlugZap" }
@@ -1,5 +0,0 @@
1
- {
2
- "title": "API Reference",
3
- "icon": "PlugZap",
4
- "pages": ["index", "listPets", "showPetById", "createPet", "deletePet"]
5
- }
@@ -1,3 +0,0 @@
1
- {
2
- "title": "سجل التغييرات"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "title": "Changelog"
3
- }
@@ -1,27 +0,0 @@
1
- {
2
- "title": "المكونات",
3
- "icon": "Layers",
4
- "pages": [
5
- "index",
6
- "callout",
7
- "cards",
8
- "tabs",
9
- "steps",
10
- "accordion",
11
- "code-blocks",
12
- "inline-toc",
13
- "dynamic-code-block",
14
- "mermaid",
15
- "files",
16
- "type-table",
17
- "twoslash",
18
- "math",
19
- "video",
20
- "audio",
21
- "excalidraw",
22
- "tweet",
23
- "drawio",
24
- "figma",
25
- "circuit-board"
26
- ]
27
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "التوثيق",
3
- "pages": ["index", "getting-started", "components"]
4
- }
@@ -1,27 +0,0 @@
1
- {
2
- "title": "Components",
3
- "icon": "Layers",
4
- "pages": [
5
- "index",
6
- "callout",
7
- "cards",
8
- "tabs",
9
- "steps",
10
- "accordion",
11
- "code-blocks",
12
- "inline-toc",
13
- "dynamic-code-block",
14
- "mermaid",
15
- "files",
16
- "type-table",
17
- "twoslash",
18
- "math",
19
- "video",
20
- "audio",
21
- "excalidraw",
22
- "tweet",
23
- "drawio",
24
- "figma",
25
- "circuit-board"
26
- ]
27
- }
@@ -1,4 +0,0 @@
1
- {
2
- "title": "Documentation",
3
- "pages": ["index", "getting-started", "components"]
4
- }
@@ -1 +0,0 @@
1
- { "title": "معرفة MCP", "icon": "Bot" }
@@ -1,5 +0,0 @@
1
- {
2
- "title": "MCP Knowledge",
3
- "icon": "Bot",
4
- "pages": ["config", "structure", "frontmatter", "components"]
5
- }
@@ -1 +0,0 @@
1
- { "title": "مكونات UI", "icon": "Palette" }
@@ -1,5 +0,0 @@
1
- {
2
- "title": "UI Components",
3
- "icon": "Palette",
4
- "pages": ["index", "badge"]
5
- }