@ahmedrowaihi/8n 6.0.57 → 6.0.59
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
CHANGED
|
@@ -3463,8 +3463,6 @@ const configSchema = object({
|
|
|
3463
3463
|
locales: array(string()).min(1).default(["en"]),
|
|
3464
3464
|
github: string().optional(),
|
|
3465
3465
|
siteName: string().optional(),
|
|
3466
|
-
version: string().optional(),
|
|
3467
|
-
basePath: string().optional(),
|
|
3468
3466
|
auth: union([boolean(), array(string())]).optional(),
|
|
3469
3467
|
upstream: array(object({
|
|
3470
3468
|
url: string(),
|
|
@@ -3535,7 +3533,7 @@ async function checkSelfUpdate() {
|
|
|
3535
3533
|
});
|
|
3536
3534
|
if (!res.ok) return;
|
|
3537
3535
|
const { version: latest } = await res.json();
|
|
3538
|
-
const current = "6.0.
|
|
3536
|
+
const current = "6.0.59";
|
|
3539
3537
|
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"));
|
|
3540
3538
|
} catch {}
|
|
3541
3539
|
}
|
|
@@ -3608,7 +3606,7 @@ function buildEnv({ config, contentDir, staticExport = false }) {
|
|
|
3608
3606
|
NEXT_PUBLIC_SITE_NAME: config.siteName ?? "Docs",
|
|
3609
3607
|
NEXT_PUBLIC_GITHUB_REPO: config.github ?? process.env.NEXT_PUBLIC_GITHUB_REPO ?? ghPagesUrl ?? vercelGithubUrl,
|
|
3610
3608
|
NEXT_PUBLIC_UPSTREAM_SOURCES: JSON.stringify(config.upstream ?? []),
|
|
3611
|
-
NEXT_BASE_PATH:
|
|
3609
|
+
NEXT_BASE_PATH: ghPagesBasePath ?? "",
|
|
3612
3610
|
NEXT_STATIC_EXPORT: staticExport ? "true" : "false",
|
|
3613
3611
|
...config.auth !== void 0 ? {
|
|
3614
3612
|
AUTH_ENABLED: "true",
|
|
@@ -3645,7 +3643,7 @@ async function dev() {
|
|
|
3645
3643
|
async function build({ server = false } = {}) {
|
|
3646
3644
|
const { config, contentDir } = await resolveProject();
|
|
3647
3645
|
const projectDir = process.cwd();
|
|
3648
|
-
console.log(pc.cyan("8n") + pc.dim(` v6.0.
|
|
3646
|
+
console.log(pc.cyan("8n") + pc.dim(` v6.0.59 build → ${contentDir}`));
|
|
3649
3647
|
if (server) await runNextFlat(projectDir, "build", buildEnv({
|
|
3650
3648
|
config,
|
|
3651
3649
|
contentDir,
|
|
@@ -3706,16 +3704,6 @@ const SCAFFOLD = {
|
|
|
3706
3704
|
locales: ["en"],
|
|
3707
3705
|
siteName: "Docs",
|
|
3708
3706
|
|
|
3709
|
-
// Pin to a specific starter version (git tag or commit SHA).
|
|
3710
|
-
// Remove this line to always track the latest release.
|
|
3711
|
-
// version: "v1.0.0",
|
|
3712
|
-
|
|
3713
|
-
// Sections auto-show when content exists, auto-hide when empty.
|
|
3714
|
-
// Set a section to false to hide it even if content is present.
|
|
3715
|
-
// sections: { api: false },
|
|
3716
|
-
|
|
3717
|
-
// Add links to the top navigation bar.
|
|
3718
|
-
// nav: [{ text: "Blog", url: "https://example.com/blog" }],
|
|
3719
3707
|
};
|
|
3720
3708
|
`,
|
|
3721
3709
|
["content/docs/index.mdx"]: `---
|
|
@@ -4030,7 +4018,7 @@ async function mcp() {
|
|
|
4030
4018
|
const mcpDir = join(getStarterDir(), "content", "mcp");
|
|
4031
4019
|
const server = new McpServer({
|
|
4032
4020
|
name: "8n",
|
|
4033
|
-
version: "6.0.
|
|
4021
|
+
version: "6.0.59"
|
|
4034
4022
|
});
|
|
4035
4023
|
server.registerTool("read_me", {
|
|
4036
4024
|
description: "Returns how to use the 8n MCP tools. Call this BEFORE documenting anything with 8n.",
|
|
@@ -4148,7 +4136,7 @@ async function generateApi({ input, output }) {
|
|
|
4148
4136
|
|
|
4149
4137
|
//#endregion
|
|
4150
4138
|
//#region src/index.ts
|
|
4151
|
-
const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.
|
|
4139
|
+
const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.59").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
|
|
4152
4140
|
if (cmd.opts().debug) process.env.DEBUG_8N = "1";
|
|
4153
4141
|
});
|
|
4154
4142
|
program.command("init").description("Scaffold a new docs project in the current directory").action(init);
|
package/package.json
CHANGED
|
@@ -10,7 +10,6 @@ export default {
|
|
|
10
10
|
content: "./content", // content directory (default: "./content")
|
|
11
11
|
locales: ["en"], // supported locales — first entry is the default
|
|
12
12
|
siteName: "Docs", // site name shown in the header
|
|
13
|
-
version: "v1.0.0", // pin a specific starter version — omit to track latest
|
|
14
13
|
github: "org/repo", // enables "Edit on GitHub" links on every page
|
|
15
14
|
sections: {
|
|
16
15
|
api: false, // false hides a section even when content exists
|
package/starter/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){if(!e)return null;let t=new Date(e.trim());return isNaN(t.getTime())?null:t}export async function fetchFeed(
|
|
1
|
+
function e(e){return new DOMParser().parseFromString(e,"text/html").body.textContent?.trim()??""}function t(e){if(!e)return null;let t=new Date(e.trim());return isNaN(t.getTime())?null:t}export async function fetchFeed(r,n){try{var o,l;let u=await fetch(r),i=await u.text(),c=new DOMParser().parseFromString(i,"text/xml");if(c.querySelector("parsererror"))return{status:"error",source:n,message:"Invalid XML"};return{status:"ok",items:(o=c,l=n,null!==o.querySelector("feed")?Array.from(o.querySelectorAll("entry")).map(r=>({title:r.querySelector("title")?.textContent?.trim()??"(no title)",url:r.querySelector("link[rel='alternate']")?.getAttribute("href")??r.querySelector("link")?.getAttribute("href")??"",date:t(r.querySelector("published")?.textContent??r.querySelector("updated")?.textContent),summary:e(r.querySelector("summary")?.textContent??r.querySelector("content")?.textContent??"").slice(0,200),source:l})):Array.from(o.querySelectorAll("item")).map(r=>({title:r.querySelector("title")?.textContent?.trim()??"(no title)",url:r.querySelector("link")?.textContent?.trim()??r.querySelector("guid")?.textContent?.trim()??"",date:t(r.querySelector("pubDate")?.textContent),summary:e(r.querySelector("description")?.textContent??"").slice(0,200),source:l})))}}catch(t){let e=t instanceof TypeError?t.message:String(t);if(e.includes("Failed to fetch")||e.includes("NetworkError")||e.includes("CORS"))return{status:"cors",source:n};return{status:"error",source:n,message:e}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as e,jsxs as r
|
|
2
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{env as t}from"../../config";import{localeConfig as a,defaultLocale as s}from"../../locale.config";import{LogoLoader as l}from"../../components/logo-loader";import{useUpstreamFeeds as n}from"./use-upstream-feeds";import{ExternalLink as i,AlertTriangle as m,Rss as o}from"lucide-react";export function UpstreamPage({lang:d}){var c;let p=(c=d,a[c]?.translations??a[s].translations),u=t.NEXT_PUBLIC_UPSTREAM_SOURCES,{loading:g,results:x,items:h}=n(u),f=x.filter(e=>"ok"!==e.status),N=a[d]?.translations.dateLocale??"en-US";return r("div",{className:"container max-w-6xl py-12 px-4",children:[r("div",{className:"flex items-center gap-3 mb-10",children:[e("div",{className:"flex size-9 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e(o,{className:"size-4"})}),r("div",{children:[e("h1",{className:"text-xl font-semibold leading-tight",children:p.upstream}),!g&&h.length>0&&r("p",{className:"text-xs text-muted-foreground mt-0.5",children:[h.length," articles · ",u.length," sources"]})]})]}),g&&e("div",{className:"flex justify-center py-24",children:e(l,{className:"size-10"})}),!g&&f.length>0&&e("div",{className:"mb-8 flex flex-col gap-2",children:f.map((t,a)=>r("div",{className:"flex gap-3 rounded-lg border border-amber-500/20 bg-amber-500/5 px-4 py-3 text-sm text-amber-700 dark:text-amber-400",children:[e(m,{className:"mt-0.5 size-4 shrink-0"}),r("span",{children:[e("span",{className:"font-medium",children:t.source})," — ","cors"===t.status?p.upstreamCorsHint:p.upstreamError]})]},a))}),!g&&0===h.length&&0===f.length&&e("p",{className:"text-muted-foreground",children:p.upstreamEmpty}),!g&&h.length>0&&e("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:h.map((t,a)=>r("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"group relative flex flex-col gap-2 rounded-xl border border-border/60 bg-card px-5 py-4 shadow-sm transition-all hover:border-border hover:shadow-md",children:[r("div",{className:"flex items-start justify-between gap-4",children:[e("span",{className:"font-medium leading-snug group-hover:text-primary transition-colors line-clamp-2",children:t.title}),e(i,{className:"mt-0.5 size-3.5 shrink-0 text-muted-foreground/40 group-hover:text-primary/60 transition-colors"})]}),t.summary&&e("p",{className:"text-sm text-muted-foreground line-clamp-2 leading-relaxed",children:t.summary}),r("div",{className:"flex items-center gap-2 mt-1",children:[e("span",{className:"inline-flex items-center rounded-md bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground",children:t.source}),t.date&&e("span",{className:"text-[11px] text-muted-foreground/60",children:t.date.toLocaleDateString(N,{year:"numeric",month:"short",day:"numeric"})})]})]},a))})]})}
|