@ahmedrowaihi/8n 6.0.2 → 6.0.3

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 (338) hide show
  1. package/dist/{cli/adapter.cjs → adapter.cjs} +1 -1
  2. package/dist/index.mjs +4100 -0
  3. package/package.json +11 -108
  4. package/starter/.github/workflows/publish.yml +66 -0
  5. package/starter/.mcp.json +8 -0
  6. package/starter/.vscode/settings.json +7 -0
  7. package/starter/biome.json +33 -0
  8. package/starter/cli.json +13 -0
  9. package/starter/components.json +25 -0
  10. package/starter/next-env.d.ts +6 -0
  11. package/starter/openapi/petstore.json +123 -0
  12. package/starter/package-lock.json +18174 -0
  13. package/starter/package.json +107 -0
  14. package/starter/scripts/build-dist.mts +73 -0
  15. package/starter/scripts/generate-docs.mts +8 -0
  16. package/starter/serve.json +3 -0
  17. package/dist/cli/index.mjs +0 -456
  18. package/src/cli/adapter.ts +0 -41
  19. package/src/cli/commands/build.ts +0 -13
  20. package/src/cli/commands/dev.ts +0 -13
  21. package/src/cli/commands/init.ts +0 -141
  22. package/src/cli/commands/mcp.ts +0 -195
  23. package/src/cli/commands/start.ts +0 -12
  24. package/src/cli/index.ts +0 -26
  25. package/src/cli/load-config.ts +0 -26
  26. package/src/cli/web-app.ts +0 -95
  27. /package/{README.md → starter/README.md} +0 -0
  28. /package/{app → starter/app}/[lang]/(docs)/[section]/[[...slug]]/page.jsx +0 -0
  29. /package/{app → starter/app}/[lang]/(docs)/error.jsx +0 -0
  30. /package/{app → starter/app}/[lang]/(docs)/layout.jsx +0 -0
  31. /package/{app → starter/app}/[lang]/(docs)/loading.jsx +0 -0
  32. /package/{app → starter/app}/[lang]/(marketing)/layout.jsx +0 -0
  33. /package/{app → starter/app}/[lang]/(marketing)/page.jsx +0 -0
  34. /package/{app → starter/app}/[lang]/changelog/[...slug]/layout.jsx +0 -0
  35. /package/{app → starter/app}/[lang]/changelog/[...slug]/page.jsx +0 -0
  36. /package/{app → starter/app}/[lang]/changelog/layout.jsx +0 -0
  37. /package/{app → starter/app}/[lang]/changelog/page.jsx +0 -0
  38. /package/{app → starter/app}/[lang]/error.jsx +0 -0
  39. /package/{app → starter/app}/[lang]/lang-setup.jsx +0 -0
  40. /package/{app → starter/app}/[lang]/layout.jsx +0 -0
  41. /package/{app → starter/app}/[lang]/loading.jsx +0 -0
  42. /package/{app → starter/app}/[lang]/playground/page.jsx +0 -0
  43. /package/{app → starter/app}/[lang]/rss.xml/route.js +0 -0
  44. /package/{app → starter/app}/api/chat/route.js +0 -0
  45. /package/{app → starter/app}/api/dev/watch/route.js +0 -0
  46. /package/{app → starter/app}/api/pages/route.js +0 -0
  47. /package/{app → starter/app}/api/search/route.js +0 -0
  48. /package/{app → starter/app}/excalidraw/layout.jsx +0 -0
  49. /package/{app → starter/app}/excalidraw/page.jsx +0 -0
  50. /package/{app → starter/app}/layout.jsx +0 -0
  51. /package/{app → starter/app}/llms-full.txt/route.js +0 -0
  52. /package/{app → starter/app}/llms.mdx/[section]/[...slug]/route.js +0 -0
  53. /package/{app → starter/app}/llms.txt/route.js +0 -0
  54. /package/{app → starter/app}/not-found.jsx +0 -0
  55. /package/{app → starter/app}/page.jsx +0 -0
  56. /package/{app → starter/app}/robots.js +0 -0
  57. /package/{app → starter/app}/sitemap.js +0 -0
  58. /package/{content → starter/content}/api/ar/meta.json +0 -0
  59. /package/{content → starter/content}/api/en/createPet.mdx +0 -0
  60. /package/{content → starter/content}/api/en/deletePet.mdx +0 -0
  61. /package/{content → starter/content}/api/en/index.mdx +0 -0
  62. /package/{content → starter/content}/api/en/listPets.mdx +0 -0
  63. /package/{content → starter/content}/api/en/meta.json +0 -0
  64. /package/{content → starter/content}/api/en/showPetById.mdx +0 -0
  65. /package/{content → starter/content}/changelog/ar/meta.json +0 -0
  66. /package/{content → starter/content}/changelog/ar/v1.0.0.mdx +0 -0
  67. /package/{content → starter/content}/changelog/en/meta.json +0 -0
  68. /package/{content → starter/content}/changelog/en/v1.0.0.mdx +0 -0
  69. /package/{content → starter/content}/docs/ar/components/accordion.mdx +0 -0
  70. /package/{content → starter/content}/docs/ar/components/audio.mdx +0 -0
  71. /package/{content → starter/content}/docs/ar/components/callout.mdx +0 -0
  72. /package/{content → starter/content}/docs/ar/components/cards.mdx +0 -0
  73. /package/{content → starter/content}/docs/ar/components/circuit-board.mdx +0 -0
  74. /package/{content → starter/content}/docs/ar/components/code-blocks.mdx +0 -0
  75. /package/{content → starter/content}/docs/ar/components/drawio.mdx +0 -0
  76. /package/{content → starter/content}/docs/ar/components/dynamic-code-block.mdx +0 -0
  77. /package/{content → starter/content}/docs/ar/components/excalidraw.mdx +0 -0
  78. /package/{content → starter/content}/docs/ar/components/figma.mdx +0 -0
  79. /package/{content → starter/content}/docs/ar/components/files.mdx +0 -0
  80. /package/{content → starter/content}/docs/ar/components/index.mdx +0 -0
  81. /package/{content → starter/content}/docs/ar/components/inline-toc.mdx +0 -0
  82. /package/{content → starter/content}/docs/ar/components/math.mdx +0 -0
  83. /package/{content → starter/content}/docs/ar/components/mermaid.mdx +0 -0
  84. /package/{content → starter/content}/docs/ar/components/meta.json +0 -0
  85. /package/{content → starter/content}/docs/ar/components/steps.mdx +0 -0
  86. /package/{content → starter/content}/docs/ar/components/tabs.mdx +0 -0
  87. /package/{content → starter/content}/docs/ar/components/tweet.mdx +0 -0
  88. /package/{content → starter/content}/docs/ar/components/twoslash.mdx +0 -0
  89. /package/{content → starter/content}/docs/ar/components/type-table.mdx +0 -0
  90. /package/{content → starter/content}/docs/ar/components/video.mdx +0 -0
  91. /package/{content → starter/content}/docs/ar/getting-started.mdx +0 -0
  92. /package/{content → starter/content}/docs/ar/index.mdx +0 -0
  93. /package/{content → starter/content}/docs/ar/meta.json +0 -0
  94. /package/{content → starter/content}/docs/en/components/accordion.mdx +0 -0
  95. /package/{content → starter/content}/docs/en/components/audio.mdx +0 -0
  96. /package/{content → starter/content}/docs/en/components/callout.mdx +0 -0
  97. /package/{content → starter/content}/docs/en/components/cards.mdx +0 -0
  98. /package/{content → starter/content}/docs/en/components/circuit-board.mdx +0 -0
  99. /package/{content → starter/content}/docs/en/components/code-blocks.mdx +0 -0
  100. /package/{content → starter/content}/docs/en/components/drawio.mdx +0 -0
  101. /package/{content → starter/content}/docs/en/components/dynamic-code-block.mdx +0 -0
  102. /package/{content → starter/content}/docs/en/components/excalidraw.mdx +0 -0
  103. /package/{content → starter/content}/docs/en/components/figma.mdx +0 -0
  104. /package/{content → starter/content}/docs/en/components/files.mdx +0 -0
  105. /package/{content → starter/content}/docs/en/components/index.mdx +0 -0
  106. /package/{content → starter/content}/docs/en/components/inline-toc.mdx +0 -0
  107. /package/{content → starter/content}/docs/en/components/math.mdx +0 -0
  108. /package/{content → starter/content}/docs/en/components/mermaid.mdx +0 -0
  109. /package/{content → starter/content}/docs/en/components/meta.json +0 -0
  110. /package/{content → starter/content}/docs/en/components/steps.mdx +0 -0
  111. /package/{content → starter/content}/docs/en/components/tabs.mdx +0 -0
  112. /package/{content → starter/content}/docs/en/components/tweet.mdx +0 -0
  113. /package/{content → starter/content}/docs/en/components/twoslash.mdx +0 -0
  114. /package/{content → starter/content}/docs/en/components/type-table.mdx +0 -0
  115. /package/{content → starter/content}/docs/en/components/video.mdx +0 -0
  116. /package/{content → starter/content}/docs/en/getting-started.mdx +0 -0
  117. /package/{content → starter/content}/docs/en/index.mdx +0 -0
  118. /package/{content → starter/content}/docs/en/meta.json +0 -0
  119. /package/{content → starter/content}/mcp/ar/meta.json +0 -0
  120. /package/{content → starter/content}/mcp/en/components.mdx +0 -0
  121. /package/{content → starter/content}/mcp/en/config.mdx +0 -0
  122. /package/{content → starter/content}/mcp/en/frontmatter.mdx +0 -0
  123. /package/{content → starter/content}/mcp/en/meta.json +0 -0
  124. /package/{content → starter/content}/mcp/en/structure.mdx +0 -0
  125. /package/{content → starter/content}/ui/ar/meta.json +0 -0
  126. /package/{content → starter/content}/ui/en/badge.mdx +0 -0
  127. /package/{content → starter/content}/ui/en/index.mdx +0 -0
  128. /package/{content → starter/content}/ui/en/meta.json +0 -0
  129. /package/{next.config.mjs → starter/next.config.mjs} +0 -0
  130. /package/{postcss.config.mjs → starter/postcss.config.mjs} +0 -0
  131. /package/{public → starter/public}/apple-touch-icon.png +0 -0
  132. /package/{public → starter/public}/fonts/ThmanyahSans/Thmanyahsans12-Black.woff2 +0 -0
  133. /package/{public → starter/public}/fonts/ThmanyahSans/Thmanyahsans12-Bold.woff2 +0 -0
  134. /package/{public → starter/public}/fonts/ThmanyahSans/Thmanyahsans12-Light.woff2 +0 -0
  135. /package/{public → starter/public}/fonts/ThmanyahSans/Thmanyahsans12-Medium.woff2 +0 -0
  136. /package/{public → starter/public}/fonts/ThmanyahSans/Thmanyahsans12-Regular.woff2 +0 -0
  137. /package/{public → starter/public}/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Black.woff2 +0 -0
  138. /package/{public → starter/public}/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Bold.woff2 +0 -0
  139. /package/{public → starter/public}/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Light.woff2 +0 -0
  140. /package/{public → starter/public}/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Medium.woff2 +0 -0
  141. /package/{public → starter/public}/fonts/ThmanyahSerifDisplay/Thmanyahserifdisplay12-Regular.woff2 +0 -0
  142. /package/{public → starter/public}/fonts/sar.woff +0 -0
  143. /package/{public → starter/public}/manifest.json +0 -0
  144. /package/{public → starter/public}/thmanyah-icon.svg +0 -0
  145. /package/{src → starter/src}/components/ai-elements/conversation.jsx +0 -0
  146. /package/{src → starter/src}/components/ai-elements/reasoning.jsx +0 -0
  147. /package/{src → starter/src}/components/ai-elements/shimmer.jsx +0 -0
  148. /package/{src → starter/src}/components/api-page.client.jsx +0 -0
  149. /package/{src → starter/src}/components/api-page.jsx +0 -0
  150. /package/{src → starter/src}/components/blocks/audio.jsx +0 -0
  151. /package/{src → starter/src}/components/blocks/circuit-board.jsx +0 -0
  152. /package/{src → starter/src}/components/blocks/drawio-block.jsx +0 -0
  153. /package/{src → starter/src}/components/blocks/excalidraw.jsx +0 -0
  154. /package/{src → starter/src}/components/blocks/figma-block.jsx +0 -0
  155. /package/{src → starter/src}/components/blocks/mermaid.jsx +0 -0
  156. /package/{src → starter/src}/components/blocks/video.jsx +0 -0
  157. /package/{src → starter/src}/components/credit-button.jsx +0 -0
  158. /package/{src → starter/src}/components/dev-refresh.jsx +0 -0
  159. /package/{src → starter/src}/components/error-state.jsx +0 -0
  160. /package/{src → starter/src}/components/feedback/client.jsx +0 -0
  161. /package/{src → starter/src}/components/feedback/github.js +0 -0
  162. /package/{src → starter/src}/components/feedback/schema.js +0 -0
  163. /package/{src → starter/src}/components/fumadocs/layout/docs/client.jsx +0 -0
  164. /package/{src → starter/src}/components/fumadocs/layout/docs/index.jsx +0 -0
  165. /package/{src → starter/src}/components/fumadocs/layout/docs/page/client.jsx +0 -0
  166. /package/{src → starter/src}/components/fumadocs/layout/docs/page/docs-toc.jsx +0 -0
  167. /package/{src → starter/src}/components/fumadocs/layout/docs/page/index.jsx +0 -0
  168. /package/{src → starter/src}/components/fumadocs/layout/docs/sidebar.jsx +0 -0
  169. /package/{src → starter/src}/components/fumadocs/layout/editor-button.jsx +0 -0
  170. /package/{src → starter/src}/components/fumadocs/layout/home/client.jsx +0 -0
  171. /package/{src → starter/src}/components/fumadocs/layout/home/index.jsx +0 -0
  172. /package/{src → starter/src}/components/fumadocs/layout/link-item.jsx +0 -0
  173. /package/{src → starter/src}/components/fumadocs/layout/page-actions.jsx +0 -0
  174. /package/{src → starter/src}/components/fumadocs/layout/search-toggle.jsx +0 -0
  175. /package/{src → starter/src}/components/fumadocs/layout/shared.jsx +0 -0
  176. /package/{src → starter/src}/components/fumadocs/layout/sidebar/base.jsx +0 -0
  177. /package/{src → starter/src}/components/fumadocs/layout/sidebar/link-item.jsx +0 -0
  178. /package/{src → starter/src}/components/fumadocs/layout/sidebar/page-tree.jsx +0 -0
  179. /package/{src → starter/src}/components/fumadocs/layout/sidebar/tabs/dropdown.jsx +0 -0
  180. /package/{src → starter/src}/components/fumadocs/layout/sidebar/tabs/index.jsx +0 -0
  181. /package/{src → starter/src}/components/fumadocs/layout/sidebar-back-button.jsx +0 -0
  182. /package/{src → starter/src}/components/fumadocs/layout/sidebar-footer.jsx +0 -0
  183. /package/{src → starter/src}/components/fumadocs/layout/theme-toggle.jsx +0 -0
  184. /package/{src → starter/src}/components/fumadocs/mdx/base-ui.jsx +0 -0
  185. /package/{src → starter/src}/components/fumadocs/mdx/blocks.jsx +0 -0
  186. /package/{src → starter/src}/components/fumadocs/mdx/openapi.js +0 -0
  187. /package/{src → starter/src}/components/fumadocs/mdx-server.js +0 -0
  188. /package/{src → starter/src}/components/fumadocs/mdx.jsx +0 -0
  189. /package/{src → starter/src}/components/fumadocs/search-toggle.jsx +0 -0
  190. /package/{src → starter/src}/components/fumadocs/search.jsx +0 -0
  191. /package/{src → starter/src}/components/fumadocs/toc/clerk.jsx +0 -0
  192. /package/{src → starter/src}/components/fumadocs/toc/default.jsx +0 -0
  193. /package/{src → starter/src}/components/fumadocs/toc/index.jsx +0 -0
  194. /package/{src → starter/src}/components/language-switcher.jsx +0 -0
  195. /package/{src → starter/src}/components/logo-loader.jsx +0 -0
  196. /package/{src → starter/src}/components/logo.jsx +0 -0
  197. /package/{src → starter/src}/components/markdown.jsx +0 -0
  198. /package/{src → starter/src}/components/not-found.jsx +0 -0
  199. /package/{src → starter/src}/components/page-transition.jsx +0 -0
  200. /package/{src → starter/src}/components/story/badge.js +0 -0
  201. /package/{src → starter/src}/components/story/button.js +0 -0
  202. /package/{src → starter/src}/components/story/index.js +0 -0
  203. /package/{src → starter/src}/components/ui/accordion.jsx +0 -0
  204. /package/{src → starter/src}/components/ui/alert-dialog.jsx +0 -0
  205. /package/{src → starter/src}/components/ui/alert.jsx +0 -0
  206. /package/{src → starter/src}/components/ui/aspect-ratio.jsx +0 -0
  207. /package/{src → starter/src}/components/ui/avatar.jsx +0 -0
  208. /package/{src → starter/src}/components/ui/badge.client.jsx +0 -0
  209. /package/{src → starter/src}/components/ui/badge.jsx +0 -0
  210. /package/{src → starter/src}/components/ui/breadcrumb.jsx +0 -0
  211. /package/{src → starter/src}/components/ui/button-group.jsx +0 -0
  212. /package/{src → starter/src}/components/ui/button.client.jsx +0 -0
  213. /package/{src → starter/src}/components/ui/button.jsx +0 -0
  214. /package/{src → starter/src}/components/ui/calendar.jsx +0 -0
  215. /package/{src → starter/src}/components/ui/card.jsx +0 -0
  216. /package/{src → starter/src}/components/ui/carousel.jsx +0 -0
  217. /package/{src → starter/src}/components/ui/chart.jsx +0 -0
  218. /package/{src → starter/src}/components/ui/checkbox.jsx +0 -0
  219. /package/{src → starter/src}/components/ui/collapsible.jsx +0 -0
  220. /package/{src → starter/src}/components/ui/combobox.jsx +0 -0
  221. /package/{src → starter/src}/components/ui/command.jsx +0 -0
  222. /package/{src → starter/src}/components/ui/context-menu.jsx +0 -0
  223. /package/{src → starter/src}/components/ui/dialog.jsx +0 -0
  224. /package/{src → starter/src}/components/ui/direction.jsx +0 -0
  225. /package/{src → starter/src}/components/ui/drawer.jsx +0 -0
  226. /package/{src → starter/src}/components/ui/dropdown-menu.jsx +0 -0
  227. /package/{src → starter/src}/components/ui/empty.jsx +0 -0
  228. /package/{src → starter/src}/components/ui/field.jsx +0 -0
  229. /package/{src → starter/src}/components/ui/hover-card.jsx +0 -0
  230. /package/{src → starter/src}/components/ui/input-group.jsx +0 -0
  231. /package/{src → starter/src}/components/ui/input-otp.jsx +0 -0
  232. /package/{src → starter/src}/components/ui/input.jsx +0 -0
  233. /package/{src → starter/src}/components/ui/item.jsx +0 -0
  234. /package/{src → starter/src}/components/ui/kbd.jsx +0 -0
  235. /package/{src → starter/src}/components/ui/label.jsx +0 -0
  236. /package/{src → starter/src}/components/ui/menubar.jsx +0 -0
  237. /package/{src → starter/src}/components/ui/native-select.jsx +0 -0
  238. /package/{src → starter/src}/components/ui/navigation-menu.jsx +0 -0
  239. /package/{src → starter/src}/components/ui/pagination.jsx +0 -0
  240. /package/{src → starter/src}/components/ui/popover.jsx +0 -0
  241. /package/{src → starter/src}/components/ui/progress.jsx +0 -0
  242. /package/{src → starter/src}/components/ui/radio-group.jsx +0 -0
  243. /package/{src → starter/src}/components/ui/resizable.jsx +0 -0
  244. /package/{src → starter/src}/components/ui/scroll-area.jsx +0 -0
  245. /package/{src → starter/src}/components/ui/select.jsx +0 -0
  246. /package/{src → starter/src}/components/ui/separator.jsx +0 -0
  247. /package/{src → starter/src}/components/ui/sheet.jsx +0 -0
  248. /package/{src → starter/src}/components/ui/sidebar.jsx +0 -0
  249. /package/{src → starter/src}/components/ui/skeleton.jsx +0 -0
  250. /package/{src → starter/src}/components/ui/slider.jsx +0 -0
  251. /package/{src → starter/src}/components/ui/sonner.jsx +0 -0
  252. /package/{src → starter/src}/components/ui/spinner.jsx +0 -0
  253. /package/{src → starter/src}/components/ui/switch.jsx +0 -0
  254. /package/{src → starter/src}/components/ui/table.jsx +0 -0
  255. /package/{src → starter/src}/components/ui/tabs.jsx +0 -0
  256. /package/{src → starter/src}/components/ui/textarea.jsx +0 -0
  257. /package/{src → starter/src}/components/ui/toggle-group.jsx +0 -0
  258. /package/{src → starter/src}/components/ui/toggle.jsx +0 -0
  259. /package/{src → starter/src}/components/ui/tooltip.jsx +0 -0
  260. /package/{src → starter/src}/config.js +0 -0
  261. /package/{src → starter/src}/features/ai/chat/agents.js +0 -0
  262. /package/{src → starter/src}/features/ai/chat/components/api-key-form.jsx +0 -0
  263. /package/{src → starter/src}/features/ai/chat/components/brand.jsx +0 -0
  264. /package/{src → starter/src}/features/ai/chat/components/content.jsx +0 -0
  265. /package/{src → starter/src}/features/ai/chat/components/layout.jsx +0 -0
  266. /package/{src → starter/src}/features/ai/chat/components/message.jsx +0 -0
  267. /package/{src → starter/src}/features/ai/chat/components/model-select.jsx +0 -0
  268. /package/{src → starter/src}/features/ai/chat/components/panels.jsx +0 -0
  269. /package/{src → starter/src}/features/ai/chat/components/prompt.jsx +0 -0
  270. /package/{src → starter/src}/features/ai/chat/components/tool-renderer.jsx +0 -0
  271. /package/{src → starter/src}/features/ai/chat/components/trigger.jsx +0 -0
  272. /package/{src → starter/src}/features/ai/chat/constants.js +0 -0
  273. /package/{src → starter/src}/features/ai/chat/handler.js +0 -0
  274. /package/{src → starter/src}/features/ai/chat/hooks/use-pages.js +0 -0
  275. /package/{src → starter/src}/features/ai/chat/index.js +0 -0
  276. /package/{src → starter/src}/features/ai/chat/panel-store.js +0 -0
  277. /package/{src → starter/src}/features/ai/chat/provider.jsx +0 -0
  278. /package/{src → starter/src}/features/ai/chat/selection-store.js +0 -0
  279. /package/{src → starter/src}/features/ai/chat/settings-store.js +0 -0
  280. /package/{src → starter/src}/features/ai/chat/store.js +0 -0
  281. /package/{src → starter/src}/features/ai/chat/tools.js +0 -0
  282. /package/{src → starter/src}/features/ai/chat/types.js +0 -0
  283. /package/{src → starter/src}/features/ai/playground/agents.js +0 -0
  284. /package/{src → starter/src}/features/ai/playground/tools.js +0 -0
  285. /package/{src → starter/src}/features/ai/shared/create-model.js +0 -0
  286. /package/{src → starter/src}/features/ai/shared/filter-reasoning.js +0 -0
  287. /package/{src → starter/src}/features/changelog/components/changelog-list.jsx +0 -0
  288. /package/{src → starter/src}/features/changelog/components/entry-content.jsx +0 -0
  289. /package/{src → starter/src}/features/changelog/index.js +0 -0
  290. /package/{src → starter/src}/features/docs/components/page-content.jsx +0 -0
  291. /package/{src → starter/src}/features/docs/index.js +0 -0
  292. /package/{src → starter/src}/features/docs/section-page.jsx +0 -0
  293. /package/{src → starter/src}/features/feedback/components/feedback-block-mdx.jsx +0 -0
  294. /package/{src → starter/src}/features/feedback/components/feedback.jsx +0 -0
  295. /package/{src → starter/src}/features/feedback/github.js +0 -0
  296. /package/{src → starter/src}/features/feedback/index.js +0 -0
  297. /package/{src → starter/src}/features/feedback/schema.js +0 -0
  298. /package/{src → starter/src}/features/marketing/components/home.jsx +0 -0
  299. /package/{src → starter/src}/features/marketing/index.js +0 -0
  300. /package/{src → starter/src}/features/mdx-playground/components/editor.jsx +0 -0
  301. /package/{src → starter/src}/features/mdx-playground/components/playground-provider.jsx +0 -0
  302. /package/{src → starter/src}/features/mdx-playground/components/playground-sidebar.jsx +0 -0
  303. /package/{src → starter/src}/features/mdx-playground/components/playground.jsx +0 -0
  304. /package/{src → starter/src}/features/mdx-playground/components/proposal-context.jsx +0 -0
  305. /package/{src → starter/src}/features/mdx-playground/components/update-content-card.jsx +0 -0
  306. /package/{src → starter/src}/features/mdx-playground/hooks/use-mdx-compiler.js +0 -0
  307. /package/{src → starter/src}/features/mdx-playground/hooks/use-playground-chat.js +0 -0
  308. /package/{src → starter/src}/features/mdx-playground/lib/compile.js +0 -0
  309. /package/{src → starter/src}/features/mdx-playground/lib/components-reference.js +0 -0
  310. /package/{src → starter/src}/features/mdx-playground/store/settings.js +0 -0
  311. /package/{src → starter/src}/hooks/use-copy-button.js +0 -0
  312. /package/{src → starter/src}/hooks/use-locale.js +0 -0
  313. /package/{src → starter/src}/hooks/use-mobile.js +0 -0
  314. /package/{src → starter/src}/i18n.d.ts +0 -0
  315. /package/{src → starter/src}/lib/cn.js +0 -0
  316. /package/{src → starter/src}/lib/content-source.js +0 -0
  317. /package/{src → starter/src}/lib/create-docs-layout.jsx +0 -0
  318. /package/{src → starter/src}/lib/create-docs-page.jsx +0 -0
  319. /package/{src → starter/src}/lib/i18n.js +0 -0
  320. /package/{src → starter/src}/lib/layout.shared.jsx +0 -0
  321. /package/{src → starter/src}/lib/llms.js +0 -0
  322. /package/{src → starter/src}/lib/mdx-compiler.js +0 -0
  323. /package/{src → starter/src}/lib/mdx-plugins.js +0 -0
  324. /package/{src → starter/src}/lib/merge-refs.js +0 -0
  325. /package/{src → starter/src}/lib/navigation.js +0 -0
  326. /package/{src → starter/src}/lib/openapi.js +0 -0
  327. /package/{src → starter/src}/lib/pages-api.js +0 -0
  328. /package/{src → starter/src}/lib/rss.js +0 -0
  329. /package/{src → starter/src}/lib/sitemap.js +0 -0
  330. /package/{src → starter/src}/lib/source.js +0 -0
  331. /package/{src → starter/src}/lib/story.js +0 -0
  332. /package/{src → starter/src}/lib/theme-transition.js +0 -0
  333. /package/{src → starter/src}/lib/urls.js +0 -0
  334. /package/{src → starter/src}/lib/utils.js +0 -0
  335. /package/{src → starter/src}/locale.config.js +0 -0
  336. /package/{src → starter/src}/styles/app.css +0 -0
  337. /package/{src → starter/src}/styles/theme.css +0 -0
  338. /package/{tsconfig.json → starter/tsconfig.json} +0 -0
@@ -0,0 +1,107 @@
1
+ {
2
+ "name": "@ahmedrowaihi/8n-starter",
3
+ "type": "module",
4
+ "sideEffects": false,
5
+ "exports": {
6
+ "./package.json": "./package.json"
7
+ },
8
+ "scripts": {
9
+ "dev": "next dev",
10
+ "build": "next build",
11
+ "start": "next start",
12
+ "generate:api": "tsx scripts/generate-docs.mts",
13
+ "types:check": "tsc --noEmit",
14
+ "lint": "biome check",
15
+ "format": "biome format --write"
16
+ },
17
+ "dependencies": {
18
+ "@ai-sdk/anthropic": "^3.0.58",
19
+ "@ai-sdk/openai-compatible": "^2.0.35",
20
+ "@ai-sdk/react": "^3.0.118",
21
+ "@base-ui/react": "^1.3.0",
22
+ "@codemirror/lang-javascript": "^6.2.5",
23
+ "@codemirror/lang-markdown": "^6.5.0",
24
+ "@codemirror/language": "^6.12.2",
25
+ "@codemirror/language-data": "^6.5.2",
26
+ "@codemirror/merge": "^6.12.1",
27
+ "@codemirror/state": "^6.6.0",
28
+ "@codemirror/theme-one-dark": "^6.1.3",
29
+ "@codemirror/view": "^6.40.0",
30
+ "@excalidraw/excalidraw": "^0.18.0",
31
+ "@fontsource-variable/geist": "^5.2.8",
32
+ "@fumadocs/base-ui": "^16.6.17",
33
+ "@fumadocs/mdx-remote": "^1.4.6",
34
+ "@fumadocs/story": "^0.0.11",
35
+ "@lezer/highlight": "^1.2.3",
36
+ "@mdx-js/mdx": "^3.1.1",
37
+ "@openrouter/ai-sdk-provider": "^2.3.1",
38
+ "@orama/orama": "^3.1.18",
39
+ "@radix-ui/react-use-controllable-state": "^1.2.2",
40
+ "@streamdown/cjk": "^1.0.2",
41
+ "@streamdown/code": "^1.1.0",
42
+ "@streamdown/math": "^1.0.2",
43
+ "@streamdown/mermaid": "^1.0.2",
44
+ "@t3-oss/env-nextjs": "^0.13.10",
45
+ "@vidstack/react": "^1.12.13",
46
+ "ai": "^6.0.116",
47
+ "class-variance-authority": "^0.7.1",
48
+ "clsx": "^2.1.1",
49
+ "cmdk": "^1.1.1",
50
+ "codemirror": "^6.0.2",
51
+ "date-fns": "^4.1.0",
52
+ "embla-carousel-react": "^8.6.0",
53
+ "feed": "^5.2.0",
54
+ "flexsearch": "^0.8.212",
55
+ "fumadocs-core": "16.6.17",
56
+ "fumadocs-openapi": "^10.3.18",
57
+ "fumadocs-twoslash": "^3.1.14",
58
+ "fumadocs-ui": "^16.6.17",
59
+ "gray-matter": "^4.0.3",
60
+ "hast-util-to-jsx-runtime": "^2.3.6",
61
+ "input-otp": "^1.4.2",
62
+ "katex": "^0.16.38",
63
+ "lucide-react": "^0.577.0",
64
+ "mermaid": "^11.13.0",
65
+ "motion": "^12.36.0",
66
+ "next": "^16.2.0",
67
+ "next-themes": "^0.4.6",
68
+ "react": "^19.2.4",
69
+ "react-day-picker": "^9.14.0",
70
+ "react-dom": "^19.2.4",
71
+ "react-resizable-panels": "^4.7.3",
72
+ "react-tweet": "^3.3.0",
73
+ "recharts": "2.15.4",
74
+ "rehype-katex": "^7.0.1",
75
+ "remark": "^15.0.1",
76
+ "remark-frontmatter": "^5.0.0",
77
+ "remark-gfm": "^4.0.1",
78
+ "remark-math": "^6.0.0",
79
+ "remark-rehype": "^11.1.2",
80
+ "scroll-into-view-if-needed": "^3.1.0",
81
+ "shadcn": "^4.0.8",
82
+ "sonner": "^2.0.7",
83
+ "streamdown": "^2.4.0",
84
+ "tailwind-merge": "^3.5.0",
85
+ "tw-animate-css": "^1.4.0",
86
+ "twoslash": "^0.3.6",
87
+ "unist-util-visit": "^5.1.0",
88
+ "use-stick-to-bottom": "^1.1.3",
89
+ "vaul": "^1.1.2",
90
+ "zod": "^4.3.6",
91
+ "zustand": "^5.0.11"
92
+ },
93
+ "devDependencies": {
94
+ "@biomejs/biome": "^2.4.6",
95
+ "@swc/core": "^1.15.18",
96
+ "@tailwindcss/postcss": "^4.2.1",
97
+ "@types/hast": "^3.0.4",
98
+ "@types/mdx": "^2.0.13",
99
+ "@types/node": "^25.5.0",
100
+ "@types/react": "^19.2.14",
101
+ "@types/react-dom": "^19.2.3",
102
+ "tailwindcss": "^4.2.1",
103
+ "tsx": "^4.21.0",
104
+ "typescript": "^5.9.3"
105
+ },
106
+ "version": "6.0.3"
107
+ }
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env tsx
2
+ /**
3
+ * Transforms all TypeScript/TSX source files to JavaScript/JSX in-place.
4
+ * Run this before publishing the starter as an npm package.
5
+ * Strips types, transforms JSX, mangles locals, removes comments.
6
+ * Exported names are preserved so cross-file imports stay intact.
7
+ */
8
+ import { transformFile } from "@swc/core";
9
+ import { readdir, readFile, writeFile, unlink } from "node:fs/promises";
10
+ import { join, extname } from "node:path";
11
+
12
+ const ROOT = new URL("..", import.meta.url).pathname;
13
+
14
+ const SKIP_DIRS = new Set(["node_modules", ".next", ".git", "scripts", "content", ".source", "cli"]);
15
+
16
+ // Matches "use client" or "use server" directive at the top of a file
17
+ const DIRECTIVE_RE = /^(['"])use (?:client|server)\1;?\n/;
18
+
19
+ async function* walk(dir: string): AsyncGenerator<string> {
20
+ const entries = await readdir(dir, { withFileTypes: true });
21
+ for (const entry of entries) {
22
+ const full = join(dir, entry.name);
23
+ if (entry.isDirectory()) {
24
+ if (SKIP_DIRS.has(entry.name)) continue;
25
+ yield* walk(full);
26
+ } else if (entry.isFile()) {
27
+ const ext = extname(entry.name);
28
+ if ((ext === ".ts" || ext === ".tsx") && !entry.name.endsWith(".d.ts")) {
29
+ yield full;
30
+ }
31
+ }
32
+ }
33
+ }
34
+
35
+ function swcConfig(isTsx: boolean) {
36
+ return {
37
+ jsc: {
38
+ parser: { syntax: "typescript" as const, tsx: isTsx, decorators: false },
39
+ transform: { react: { runtime: "automatic" as const } },
40
+ target: "es2022" as const,
41
+ minify: {
42
+ compress: {
43
+ passes: 1,
44
+ sequences: true,
45
+ conditionals: true,
46
+ booleans: true,
47
+ },
48
+ mangle: true,
49
+ format: { comments: false as const },
50
+ },
51
+ },
52
+ minify: true,
53
+ module: { type: "es6" as const },
54
+ sourceMaps: false,
55
+ };
56
+ }
57
+
58
+ let count = 0;
59
+ for await (const file of walk(ROOT)) {
60
+ const isTsx = file.endsWith(".tsx");
61
+
62
+ // Extract directive before SWC — compress may drop it as "unused expression"
63
+ const source = await readFile(file, "utf8");
64
+ const directive = source.match(DIRECTIVE_RE)?.[0] ?? "";
65
+
66
+ const result = await transformFile(file, swcConfig(isTsx));
67
+ const outFile = file.replace(/\.tsx?$/, isTsx ? ".jsx" : ".js");
68
+ await writeFile(outFile, directive + result.code, "utf8");
69
+ await unlink(file);
70
+ count++;
71
+ }
72
+
73
+ console.log(`Transformed ${count} files TS→JS`);
@@ -0,0 +1,8 @@
1
+ import { generateFiles } from "fumadocs-openapi";
2
+ import { openapi } from "../src/lib/openapi";
3
+
4
+ void generateFiles({
5
+ input: openapi,
6
+ output: "./content/api/en",
7
+ includeDescription: true,
8
+ });
@@ -0,0 +1,3 @@
1
+ {
2
+ "rewrites": [{ "source": "/**", "destination": "/_shell.html" }]
3
+ }
@@ -1,456 +0,0 @@
1
- #!/usr/bin/env node
2
- import { Command, Option } from "commander";
3
- import pc from "picocolors";
4
- import { basename, dirname, extname, join, relative, resolve } from "node:path";
5
- import { fileURLToPath } from "node:url";
6
- import { appendFileSync, cpSync, existsSync, mkdirSync, readFileSync, readdirSync, watch, writeFileSync } from "node:fs";
7
- import { x } from "tinyexec";
8
- import { loadConfig } from "c12";
9
- import { z } from "zod";
10
- import { createInterface } from "node:readline/promises";
11
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
12
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
13
- import { readFile, readdir } from "node:fs/promises";
14
-
15
- //#region src/cli/load-config.ts
16
- const configSchema = z.object({
17
- content: z.string().default("./content"),
18
- locales: z.array(z.string()).min(1).default(["en"]),
19
- github: z.object({ repo: z.string() }).optional(),
20
- siteName: z.string().optional(),
21
- version: z.string().optional(),
22
- sections: z.record(z.string(), z.boolean()).optional(),
23
- nav: z.object({ links: z.array(z.object({
24
- text: z.string(),
25
- url: z.string()
26
- })).default([]) }).default({ links: [] }),
27
- animations: z.boolean().default(true),
28
- basePath: z.string().optional()
29
- });
30
- async function resolveConfig() {
31
- const { config } = await loadConfig({
32
- name: "8n",
33
- defaults: configSchema.parse({})
34
- });
35
- return configSchema.parse(config);
36
- }
37
-
38
- //#endregion
39
- //#region src/cli/web-app.ts
40
- function getPackageRoot() {
41
- return join(dirname(fileURLToPath(import.meta.url)), "..", "..");
42
- }
43
- async function checkSelfUpdate() {
44
- try {
45
- const res = await fetch("https://registry.npmjs.org/@ahmedrowaihi/8n/latest", {
46
- headers: { Accept: "application/json" },
47
- signal: AbortSignal.timeout(3e3)
48
- });
49
- if (!res.ok) return;
50
- const { version: latest } = await res.json();
51
- const current = "6.0.2";
52
- 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"));
53
- } catch {}
54
- }
55
- function syncPublicDir(projectDir) {
56
- const src = join(projectDir, "public");
57
- if (!existsSync(src)) return;
58
- cpSync(src, join(getPackageRoot(), "public", "_assets"), {
59
- recursive: true,
60
- force: true
61
- });
62
- }
63
- function watchPublicDir(projectDir) {
64
- const src = join(projectDir, "public");
65
- if (!existsSync(src)) return;
66
- watch(src, { recursive: true }, () => {
67
- cpSync(src, join(getPackageRoot(), "public", "_assets"), {
68
- recursive: true,
69
- force: true
70
- });
71
- });
72
- }
73
- function getNextBin() {
74
- return join(getPackageRoot(), "node_modules", ".bin", "next");
75
- }
76
- async function resolveProject() {
77
- const config = await resolveConfig();
78
- return {
79
- config,
80
- contentDir: resolve(process.cwd(), config.content ?? "./content")
81
- };
82
- }
83
- async function runNext(cmd, env) {
84
- await x(getNextBin(), [cmd], { nodeOptions: {
85
- cwd: getPackageRoot(),
86
- stdio: "inherit",
87
- env
88
- } });
89
- }
90
- const adapterPath = join(dirname(fileURLToPath(import.meta.url)), "adapter.cjs");
91
- function buildEnv({ config, contentDir, staticExport = false }) {
92
- const ghRepo = process.env.GITHUB_REPOSITORY;
93
- const ghServer = process.env.GITHUB_SERVER_URL ?? "https://github.com";
94
- const ghPagesUrl = ghRepo ? `${ghServer}/${ghRepo}` : void 0;
95
- const ghPagesBasePath = ghRepo ? `/${ghRepo.split("/")[1]}` : void 0;
96
- return {
97
- ...process.env,
98
- CONTENT_DIR: contentDir,
99
- LOCALES: (config.locales ?? ["en"]).join(","),
100
- NEXT_PUBLIC_SITE_NAME: config.siteName ?? "Docs",
101
- NEXT_PUBLIC_GITHUB_REPO: config.github?.repo ?? ghPagesUrl,
102
- SECTIONS: JSON.stringify(config.sections ?? {}),
103
- NEXT_PUBLIC_NAV_LINKS: JSON.stringify(config.nav?.links ?? []),
104
- NEXT_PUBLIC_ANIMATIONS: config.animations === false ? "false" : "true",
105
- NEXT_BASE_PATH: config.basePath ?? ghPagesBasePath ?? "",
106
- NEXT_STATIC_EXPORT: staticExport ? "true" : "false",
107
- NEXT_ADAPTER_PATH: adapterPath,
108
- DOCS_PROJECT_DIR: process.cwd()
109
- };
110
- }
111
-
112
- //#endregion
113
- //#region src/cli/commands/dev.ts
114
- async function dev() {
115
- const { config, contentDir } = await resolveProject();
116
- console.log(pc.cyan("8n") + pc.dim(` dev → ${contentDir}`));
117
- checkSelfUpdate();
118
- syncPublicDir(process.cwd());
119
- watchPublicDir(process.cwd());
120
- await runNext("dev", buildEnv({
121
- config,
122
- contentDir
123
- }));
124
- }
125
-
126
- //#endregion
127
- //#region src/cli/commands/build.ts
128
- async function build() {
129
- const { config, contentDir } = await resolveProject();
130
- console.log(pc.cyan("8n") + pc.dim(` build → ${contentDir}`));
131
- syncPublicDir(process.cwd());
132
- await runNext("build", buildEnv({
133
- config,
134
- contentDir,
135
- staticExport: true
136
- }));
137
- console.log(pc.green("✓") + pc.dim(` build complete → out/`));
138
- }
139
-
140
- //#endregion
141
- //#region src/cli/commands/start.ts
142
- async function start() {
143
- const { config, contentDir } = await resolveProject();
144
- console.log(pc.cyan("8n") + pc.dim(` start → ${contentDir}`));
145
- syncPublicDir(process.cwd());
146
- await runNext("build", buildEnv({
147
- config,
148
- contentDir
149
- }));
150
- await runNext("start", buildEnv({
151
- config,
152
- contentDir
153
- }));
154
- }
155
-
156
- //#endregion
157
- //#region src/cli/commands/init.ts
158
- const SCAFFOLD = {
159
- ["8n.config.ts"]: `export default {
160
- content: "./content",
161
- locales: ["en"],
162
- siteName: "Docs",
163
-
164
- // Pin to a specific starter version (git tag or commit SHA).
165
- // Remove this line to always track the latest release.
166
- // version: "v1.0.0",
167
-
168
- // Sections auto-show when content exists, auto-hide when empty.
169
- // Set a section to false to hide it even if content is present.
170
- // sections: { api: false },
171
-
172
- // Add links to the top navigation bar.
173
- // nav: { links: [{ text: "Blog", url: "https://example.com/blog" }] },
174
- };
175
- `,
176
- ["content/docs/en/meta.json"]: JSON.stringify({
177
- title: "Documentation",
178
- pages: ["index", "getting-started"]
179
- }, null, 2) + "\n",
180
- ["content/docs/en/index.mdx"]: `---
181
- title: Introduction
182
- description: Welcome to the docs.
183
- ---
184
-
185
- Welcome to your documentation. Edit files in \`content/\` and run \`8n dev\` to start.
186
- `,
187
- ["content/docs/en/getting-started/meta.json"]: JSON.stringify({
188
- title: "Getting Started",
189
- pages: ["installation"]
190
- }, null, 2) + "\n",
191
- ["content/docs/en/getting-started/installation.mdx"]: `---
192
- title: Installation
193
- description: How to install and set up the project.
194
- ---
195
-
196
- ## Installation
197
-
198
- Add your installation steps here.
199
- `,
200
- ["content/home/en/index.mdx"]: `---
201
- title: Home
202
- ---
203
-
204
- <div className="flex flex-col items-center justify-center text-center flex-1 gap-6 px-6 py-24">
205
- <h1 className="text-4xl sm:text-5xl md:text-6xl font-bold leading-tight tracking-tight max-w-2xl">
206
- Welcome to your docs.
207
- </h1>
208
- <div className="text-muted-foreground text-lg max-w-md leading-relaxed">
209
- Edit \`content/home/en/index.mdx\` to customize this page.
210
- </div>
211
- </div>
212
- `,
213
- ["content/changelog/en/meta.json"]: JSON.stringify({ title: "Changelog" }, null, 2) + "\n",
214
- ["content/changelog/en/v1.0.0.mdx"]: `---
215
- title: Version 1.0.0
216
- version: 1.0.0
217
- date: "${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}"
218
- summary: Initial release.
219
- ---
220
-
221
- ## Initial Release
222
-
223
- First version of the docs.
224
- `
225
- };
226
- const GITIGNORE_ENTRIES = ["out"];
227
- function isDirEmpty(dir) {
228
- if (!existsSync(dir)) return true;
229
- return readdirSync(dir).filter((f) => !f.startsWith(".")).length === 0;
230
- }
231
- function scaffold(targetDir) {
232
- let created = 0;
233
- const files = {
234
- ...SCAFFOLD,
235
- "package.json": JSON.stringify({
236
- name: basename(targetDir),
237
- private: true,
238
- scripts: {
239
- dev: "8n dev",
240
- build: "8n build",
241
- start: "8n start"
242
- }
243
- }, null, 2) + "\n"
244
- };
245
- for (const [rel, content] of Object.entries(files)) {
246
- const abs = resolve(targetDir, rel);
247
- if (existsSync(abs)) {
248
- console.log(pc.dim(` skip ${rel}`));
249
- continue;
250
- }
251
- mkdirSync(join(abs, ".."), { recursive: true });
252
- writeFileSync(abs, content);
253
- console.log(pc.green(" create") + pc.dim(` ${rel}`));
254
- created++;
255
- }
256
- const gitignorePath = resolve(targetDir, ".gitignore");
257
- const existing = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf-8") : "";
258
- const missing = GITIGNORE_ENTRIES.filter((e) => !existing.split("\n").includes(e));
259
- if (missing.length > 0) {
260
- appendFileSync(gitignorePath, (existing.length > 0 && !existing.endsWith("\n") ? "\n" : "") + missing.join("\n") + "\n");
261
- for (const e of missing) console.log(pc.green(" gitignore") + pc.dim(` ${e}`));
262
- created += missing.length;
263
- }
264
- if (created > 0) console.log(pc.green("\n✓") + ` ready — run ${pc.cyan("pnpm dev")} to start`);
265
- else console.log(pc.dim("\n already initialized"));
266
- }
267
- async function init() {
268
- const cwd = process.cwd();
269
- console.log(pc.cyan("8n") + pc.dim(" init"));
270
- if (isDirEmpty(cwd)) {
271
- scaffold(cwd);
272
- return;
273
- }
274
- const rl = createInterface({
275
- input: process.stdin,
276
- output: process.stdout
277
- });
278
- const name = (await rl.question(pc.dim(" directory name: "))).trim();
279
- rl.close();
280
- if (!name) {
281
- console.log(pc.red(" aborted"));
282
- return;
283
- }
284
- const targetDir = resolve(cwd, name);
285
- mkdirSync(targetDir, { recursive: true });
286
- scaffold(targetDir);
287
- }
288
-
289
- //#endregion
290
- //#region src/cli/commands/mcp.ts
291
- async function listMdFiles(dir) {
292
- let entries;
293
- try {
294
- entries = await readdir(dir, { withFileTypes: true });
295
- } catch {
296
- return [];
297
- }
298
- return entries.filter((e) => !e.isDirectory() && (e.name.endsWith(".mdx") || e.name.endsWith(".md"))).map((e) => e.name);
299
- }
300
- async function mcp() {
301
- const mcpDir = join(getPackageRoot(), "content", "mcp", "en");
302
- const server = new McpServer({
303
- name: "8n",
304
- version: "6.0.2"
305
- });
306
- server.registerTool("read_me", {
307
- description: "Returns how to use the 8n MCP tools. Call this BEFORE documenting anything with 8n.",
308
- inputSchema: {}
309
- }, async () => ({ content: [{
310
- type: "text",
311
- text: `# 8n MCP
312
-
313
- Use these tools to learn how to write documentation for an 8n project before creating any content.
314
-
315
- ## Tools
316
-
317
- ### list_components
318
- Lists all available reference topics (config, structure, frontmatter, components).
319
- Call this first to discover what topics are available.
320
-
321
- ### get_component
322
- Reads a specific topic by name (without extension).
323
- Example: get_component({ name: "components" }) returns all available MDX components with usage examples.
324
-
325
- ## Workflow
326
- 1. Call list_components to see available topics
327
- 2. Call get_component for the topics relevant to your task
328
- 3. Use that knowledge to write correct MDX content for the user's project
329
- `
330
- }] }));
331
- server.registerTool("list_components", {
332
- description: "Lists all available 8n reference topics (config, structure, frontmatter, MDX components).",
333
- inputSchema: {}
334
- }, async () => {
335
- if (!existsSync(mcpDir)) return { content: [{
336
- type: "text",
337
- text: "8n MCP knowledge not found. Reinstall @ahmedrowaihi/8n."
338
- }] };
339
- return { content: [{
340
- type: "text",
341
- text: (await listMdFiles(mcpDir)).map((f) => basename(f, extname(f))).join("\n")
342
- }] };
343
- });
344
- server.registerTool("get_component", {
345
- description: "Reads a specific 8n reference topic by name. Use list_components first to discover available names.",
346
- inputSchema: { name: z.string().describe("Topic name without extension, e.g. components, config, structure, frontmatter") }
347
- }, async ({ name }) => {
348
- if (!existsSync(mcpDir)) return { content: [{
349
- type: "text",
350
- text: "8n MCP knowledge not found. Reinstall @ahmedrowaihi/8n."
351
- }] };
352
- for (const ext of [".mdx", ".md"]) {
353
- const file = join(mcpDir, `${name}${ext}`);
354
- if (existsSync(file)) return { content: [{
355
- type: "text",
356
- text: await readFile(file, "utf-8")
357
- }] };
358
- }
359
- return { content: [{
360
- type: "text",
361
- text: `Unknown topic: ${name}. Call list_components to see available topics.`
362
- }] };
363
- });
364
- server.registerTool("analyze", {
365
- description: "Runs static analysis on the user's content directory and reports issues that may break the documentation site.",
366
- inputSchema: {}
367
- }, async () => {
368
- let contentDir = join(process.cwd(), "content");
369
- let locales = ["en"];
370
- try {
371
- const project = await resolveProject();
372
- contentDir = project.contentDir;
373
- locales = project.config.locales ?? ["en"];
374
- } catch {}
375
- const issues = [];
376
- async function walkAll(dir) {
377
- const results = [];
378
- let entries;
379
- try {
380
- entries = await readdir(dir, { withFileTypes: true });
381
- } catch {
382
- return results;
383
- }
384
- for (const e of entries) {
385
- const full = join(dir, e.name);
386
- if (e.isDirectory()) results.push(...await walkAll(full));
387
- else results.push(full);
388
- }
389
- return results;
390
- }
391
- const allFiles = await walkAll(contentDir);
392
- const mdxFiles = allFiles.filter((f) => f.endsWith(".mdx") || f.endsWith(".md"));
393
- const metaFiles = allFiles.filter((f) => f.endsWith("meta.json"));
394
- for (const file of mdxFiles) {
395
- const raw = await readFile(file, "utf-8").catch(() => "");
396
- const rel = relative(contentDir, file);
397
- if (!raw.match(/^---[\s\S]*?\ntitle:/m)) issues.push(`Missing title in frontmatter: ${rel}`);
398
- if (rel.startsWith("changelog/")) {
399
- if (!raw.match(/\nversion:/)) issues.push(`Changelog page missing version: ${rel}`);
400
- if (!raw.match(/\ndate:/)) issues.push(`Changelog page missing date: ${rel}`);
401
- }
402
- const bodyMatch = raw.match(/^---[\s\S]*?---\s*([\s\S]*)$/m);
403
- if (bodyMatch && bodyMatch[1].trim() === "") issues.push(`Empty page body: ${rel}`);
404
- }
405
- for (const file of metaFiles) {
406
- const rel = relative(contentDir, file);
407
- const raw = await readFile(file, "utf-8").catch(() => "");
408
- let meta;
409
- try {
410
- meta = JSON.parse(raw);
411
- } catch {
412
- issues.push(`Malformed JSON: ${rel}`);
413
- continue;
414
- }
415
- if (meta.pages) {
416
- const dir = join(file, "..");
417
- for (const page of meta.pages) {
418
- if (page.startsWith("...") || page === "---" || page.startsWith("[")) continue;
419
- if (existsSync(join(dir, page)) && !existsSync(join(dir, `${page}.mdx`)) && !existsSync(join(dir, `${page}.md`))) continue;
420
- if (![".mdx", ".md"].some((ext) => existsSync(join(dir, `${page}${ext}`)))) issues.push(`meta.json references missing page "${page}": ${rel}`);
421
- }
422
- }
423
- }
424
- const defaultLocale = locales[0];
425
- const otherLocales = locales.slice(1);
426
- for (const locale of otherLocales) {
427
- const defaultFiles = mdxFiles.filter((f) => f.includes(`/${defaultLocale}/`)).map((f) => relative(contentDir, f).replace(`${defaultLocale}/`, `${locale}/`));
428
- for (const expected of defaultFiles) if (!existsSync(join(contentDir, expected))) issues.push(`Missing ${locale} translation: ${expected}`);
429
- }
430
- if (issues.length === 0) return { content: [{
431
- type: "text",
432
- text: "✓ No issues found."
433
- }] };
434
- return { content: [{
435
- type: "text",
436
- text: `Found ${issues.length} issue${issues.length === 1 ? "" : "s"}:\n\n${issues.map((i) => `- ${i}`).join("\n")}`
437
- }] };
438
- });
439
- const transport = new StdioServerTransport();
440
- await server.connect(transport);
441
- }
442
-
443
- //#endregion
444
- //#region src/cli/index.ts
445
- const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.2").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
446
- if (cmd.opts().debug) process.env.DEBUG_8N = "1";
447
- });
448
- program.command("init").description("Scaffold a new docs project in the current directory").action(init);
449
- program.command("dev").description("Start the dev server").action(dev);
450
- program.command("build").description("Build for production").action(build);
451
- program.command("start").description("Start the production server").action(start);
452
- program.command("mcp").description("Start the MCP server for AI-assisted docs authoring").action(mcp);
453
- program.parse();
454
-
455
- //#endregion
456
- export { };
@@ -1,41 +0,0 @@
1
- import { renameSync, rmSync, existsSync, cpSync } from "node:fs";
2
- import { join } from "node:path";
3
- import type { NextAdapter } from "next";
4
-
5
- const adapter: NextAdapter = {
6
- name: "8n",
7
- modifyConfig(config, { phase }) {
8
- if (phase !== "phase-production-build") return config;
9
-
10
- const basePath = process.env.NEXT_BASE_PATH || "";
11
- const staticExport = process.env.NEXT_STATIC_EXPORT === "true";
12
-
13
- return {
14
- ...config,
15
- ...(staticExport ? { output: "export", trailingSlash: true } : {}),
16
- ...(basePath ? { basePath, assetPrefix: basePath } : {}),
17
- };
18
- },
19
-
20
- async onBuildComplete({ projectDir }) {
21
- const docsProjectDir = process.env.DOCS_PROJECT_DIR;
22
- const staticExport = process.env.NEXT_STATIC_EXPORT === "true";
23
-
24
- if (!docsProjectDir || !staticExport) return;
25
-
26
- const src = join(projectDir, "out");
27
- const dest = join(docsProjectDir, "out");
28
-
29
- if (existsSync(dest)) rmSync(dest, { recursive: true, force: true });
30
-
31
- try {
32
- renameSync(src, dest);
33
- } catch (err: any) {
34
- if (err.code !== "EXDEV") throw err;
35
- cpSync(src, dest, { recursive: true });
36
- rmSync(src, { recursive: true, force: true });
37
- }
38
- },
39
- };
40
-
41
- module.exports = adapter;