@ahmedrowaihi/8n 6.0.27 → 6.0.29
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 +13 -20
- package/package.json +1 -1
- package/starter/next.config.mjs +1 -5
- package/starter/package.json +1 -1
- package/dist/adapter.cjs +0 -6
package/dist/index.mjs
CHANGED
|
@@ -3674,7 +3674,7 @@ async function checkSelfUpdate() {
|
|
|
3674
3674
|
});
|
|
3675
3675
|
if (!res.ok) return;
|
|
3676
3676
|
const { version: latest } = await res.json();
|
|
3677
|
-
const current = "6.0.
|
|
3677
|
+
const current = "6.0.29";
|
|
3678
3678
|
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"));
|
|
3679
3679
|
} catch {}
|
|
3680
3680
|
}
|
|
@@ -3732,8 +3732,7 @@ async function runNext(cmd, env, flags = []) {
|
|
|
3732
3732
|
env
|
|
3733
3733
|
} });
|
|
3734
3734
|
}
|
|
3735
|
-
|
|
3736
|
-
function buildEnv({ config, contentDir, staticExport = false, adapter = true }) {
|
|
3735
|
+
function buildEnv({ config, contentDir, staticExport = false }) {
|
|
3737
3736
|
const ghRepo = process.env.GITHUB_REPOSITORY;
|
|
3738
3737
|
const ghServer = process.env.GITHUB_SERVER_URL ?? "https://github.com";
|
|
3739
3738
|
const ghPagesUrl = ghRepo ? `${ghServer}/${ghRepo}` : void 0;
|
|
@@ -3748,11 +3747,7 @@ function buildEnv({ config, contentDir, staticExport = false, adapter = true })
|
|
|
3748
3747
|
NEXT_PUBLIC_NAV_LINKS: JSON.stringify(config.nav?.links ?? []),
|
|
3749
3748
|
NEXT_PUBLIC_ANIMATIONS: config.animations === false ? "false" : "true",
|
|
3750
3749
|
NEXT_BASE_PATH: config.basePath ?? ghPagesBasePath ?? "",
|
|
3751
|
-
NEXT_STATIC_EXPORT: staticExport ? "true" : "false"
|
|
3752
|
-
...adapter ? {
|
|
3753
|
-
NEXT_ADAPTER_PATH: adapterPath,
|
|
3754
|
-
DOCS_PROJECT_DIR: process.cwd()
|
|
3755
|
-
} : {}
|
|
3750
|
+
NEXT_STATIC_EXPORT: staticExport ? "true" : "false"
|
|
3756
3751
|
};
|
|
3757
3752
|
}
|
|
3758
3753
|
async function runNextFlat(projectDir, cmd, env) {
|
|
@@ -3783,12 +3778,11 @@ async function dev() {
|
|
|
3783
3778
|
async function build({ server = false } = {}) {
|
|
3784
3779
|
const { config, contentDir } = await resolveProject();
|
|
3785
3780
|
const projectDir = process.cwd();
|
|
3786
|
-
console.log(pc.cyan("8n") + pc.dim(` v6.0.
|
|
3781
|
+
console.log(pc.cyan("8n") + pc.dim(` v6.0.29 build → ${contentDir}`));
|
|
3787
3782
|
if (server) await runNextFlat(projectDir, "build", buildEnv({
|
|
3788
3783
|
config,
|
|
3789
3784
|
contentDir,
|
|
3790
|
-
staticExport: false
|
|
3791
|
-
adapter: false
|
|
3785
|
+
staticExport: false
|
|
3792
3786
|
}));
|
|
3793
3787
|
else {
|
|
3794
3788
|
await ensureDepsInstalled();
|
|
@@ -3796,8 +3790,7 @@ async function build({ server = false } = {}) {
|
|
|
3796
3790
|
await runNext("build", buildEnv({
|
|
3797
3791
|
config,
|
|
3798
3792
|
contentDir,
|
|
3799
|
-
staticExport: true
|
|
3800
|
-
adapter: false
|
|
3793
|
+
staticExport: true
|
|
3801
3794
|
}));
|
|
3802
3795
|
moveOutput(join(getStarterDir(), "out"), join(projectDir, "out"));
|
|
3803
3796
|
}
|
|
@@ -3939,7 +3932,7 @@ function scaffold(targetDir) {
|
|
|
3939
3932
|
"next.config.mjs": `// Required for Vercel to detect the Next.js framework.\n// The actual Next.js app is built by the 8n CLI internally.\nexport default {};\n`,
|
|
3940
3933
|
"vercel.json": JSON.stringify({
|
|
3941
3934
|
framework: "nextjs",
|
|
3942
|
-
installCommand: "npm install && ./node_modules/.bin/8n
|
|
3935
|
+
installCommand: "npm install && ./node_modules/.bin/8n eject",
|
|
3943
3936
|
buildCommand: "8n build --server"
|
|
3944
3937
|
}, null, 2) + "\n"
|
|
3945
3938
|
};
|
|
@@ -3988,11 +3981,11 @@ async function init() {
|
|
|
3988
3981
|
}
|
|
3989
3982
|
|
|
3990
3983
|
//#endregion
|
|
3991
|
-
//#region src/commands/
|
|
3992
|
-
async function
|
|
3984
|
+
//#region src/commands/eject.ts
|
|
3985
|
+
async function eject() {
|
|
3993
3986
|
const starterDir = getStarterDir();
|
|
3994
3987
|
const projectDir = process.cwd();
|
|
3995
|
-
console.log(pc.cyan("8n") + pc.dim("
|
|
3988
|
+
console.log(pc.cyan("8n") + pc.dim(" eject"));
|
|
3996
3989
|
process.stdout.write(pc.dim(" copying starter files...\n"));
|
|
3997
3990
|
cpSync(starterDir, projectDir, {
|
|
3998
3991
|
recursive: true,
|
|
@@ -4043,7 +4036,7 @@ async function mcp() {
|
|
|
4043
4036
|
const mcpDir = join(getStarterDir(), "content", "mcp", "en");
|
|
4044
4037
|
const server = new McpServer({
|
|
4045
4038
|
name: "8n",
|
|
4046
|
-
version: "6.0.
|
|
4039
|
+
version: "6.0.29"
|
|
4047
4040
|
});
|
|
4048
4041
|
server.registerTool("read_me", {
|
|
4049
4042
|
description: "Returns how to use the 8n MCP tools. Call this BEFORE documenting anything with 8n.",
|
|
@@ -4184,14 +4177,14 @@ Example: get_component({ name: "components" }) returns all available MDX compone
|
|
|
4184
4177
|
|
|
4185
4178
|
//#endregion
|
|
4186
4179
|
//#region src/index.ts
|
|
4187
|
-
const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.
|
|
4180
|
+
const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.29").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
|
|
4188
4181
|
if (cmd.opts().debug) process.env.DEBUG_8N = "1";
|
|
4189
4182
|
});
|
|
4190
4183
|
program.command("init").description("Scaffold a new docs project in the current directory").action(init);
|
|
4191
4184
|
program.command("dev").description("Start the dev server").action(dev);
|
|
4192
4185
|
program.command("build").description("Build for production").option("--server", "Build for server deployment (SSR) instead of static export").action((opts) => build(opts));
|
|
4193
4186
|
program.command("start").description("Start the production server").action(start);
|
|
4194
|
-
program.command("
|
|
4187
|
+
program.command("eject").description("Unpack starter into the project root for CI/Vercel builds").action(eject);
|
|
4195
4188
|
program.command("mcp").description("Start the MCP server for AI-assisted docs authoring").action(mcp);
|
|
4196
4189
|
program.parse();
|
|
4197
4190
|
|
package/package.json
CHANGED
package/starter/next.config.mjs
CHANGED
|
@@ -7,15 +7,11 @@ const config = {
|
|
|
7
7
|
root: import.meta.dirname,
|
|
8
8
|
},
|
|
9
9
|
reactStrictMode: true,
|
|
10
|
-
adapterPath: process.env.NEXT_ADAPTER_PATH,
|
|
11
|
-
|
|
12
10
|
serverExternalPackages: ["twoslash", "typescript", "gray-matter"],
|
|
13
|
-
|
|
14
11
|
images: {
|
|
15
12
|
unoptimized: true,
|
|
16
13
|
},
|
|
17
|
-
|
|
18
|
-
...(staticExport ? { output: "export", trailingSlash: true } : {}),
|
|
14
|
+
...(staticExport ? { output: "export", trailingSlash: true } : {}),
|
|
19
15
|
...(basePath ? { basePath, assetPrefix: basePath } : {}),
|
|
20
16
|
};
|
|
21
17
|
|
package/starter/package.json
CHANGED