@ahmedrowaihi/8n 6.0.62 → 6.0.63
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
|
@@ -590,7 +590,6 @@ const string$1 = (params) => {
|
|
|
590
590
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
591
591
|
return new RegExp(`^${regex}$`);
|
|
592
592
|
};
|
|
593
|
-
const boolean$1 = /^(?:true|false)$/i;
|
|
594
593
|
const lowercase = /^[^A-Z]*$/;
|
|
595
594
|
const uppercase = /^[^a-z]*$/;
|
|
596
595
|
|
|
@@ -1206,24 +1205,6 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
|
|
|
1206
1205
|
});
|
|
1207
1206
|
};
|
|
1208
1207
|
});
|
|
1209
|
-
const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
1210
|
-
$ZodType.init(inst, def);
|
|
1211
|
-
inst._zod.pattern = boolean$1;
|
|
1212
|
-
inst._zod.parse = (payload, _ctx) => {
|
|
1213
|
-
if (def.coerce) try {
|
|
1214
|
-
payload.value = Boolean(payload.value);
|
|
1215
|
-
} catch (_) {}
|
|
1216
|
-
const input = payload.value;
|
|
1217
|
-
if (typeof input === "boolean") return payload;
|
|
1218
|
-
payload.issues.push({
|
|
1219
|
-
expected: "boolean",
|
|
1220
|
-
code: "invalid_type",
|
|
1221
|
-
input,
|
|
1222
|
-
inst
|
|
1223
|
-
});
|
|
1224
|
-
return payload;
|
|
1225
|
-
};
|
|
1226
|
-
});
|
|
1227
1208
|
const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
|
|
1228
1209
|
$ZodType.init(inst, def);
|
|
1229
1210
|
inst._zod.parse = (payload) => payload;
|
|
@@ -2189,13 +2170,6 @@ function _isoDuration(Class, params) {
|
|
|
2189
2170
|
});
|
|
2190
2171
|
}
|
|
2191
2172
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2192
|
-
function _boolean(Class, params) {
|
|
2193
|
-
return new Class({
|
|
2194
|
-
type: "boolean",
|
|
2195
|
-
...normalizeParams(params)
|
|
2196
|
-
});
|
|
2197
|
-
}
|
|
2198
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
2199
2173
|
function _unknown(Class) {
|
|
2200
2174
|
return new Class({ type: "unknown" });
|
|
2201
2175
|
}
|
|
@@ -2697,9 +2671,6 @@ const stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
2697
2671
|
}))];
|
|
2698
2672
|
}
|
|
2699
2673
|
};
|
|
2700
|
-
const booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
2701
|
-
json.type = "boolean";
|
|
2702
|
-
};
|
|
2703
2674
|
const neverProcessor = (_schema, _ctx, json, _params) => {
|
|
2704
2675
|
json.not = {};
|
|
2705
2676
|
};
|
|
@@ -3143,14 +3114,6 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
|
|
|
3143
3114
|
$ZodJWT.init(inst, def);
|
|
3144
3115
|
ZodStringFormat.init(inst, def);
|
|
3145
3116
|
});
|
|
3146
|
-
const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
3147
|
-
$ZodBoolean.init(inst, def);
|
|
3148
|
-
ZodType.init(inst, def);
|
|
3149
|
-
inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
|
|
3150
|
-
});
|
|
3151
|
-
function boolean(params) {
|
|
3152
|
-
return _boolean(ZodBoolean, params);
|
|
3153
|
-
}
|
|
3154
3117
|
const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
3155
3118
|
$ZodUnknown.init(inst, def);
|
|
3156
3119
|
ZodType.init(inst, def);
|
|
@@ -3461,9 +3424,7 @@ const meta = meta$1;
|
|
|
3461
3424
|
const configSchema = object({
|
|
3462
3425
|
content: string().default("./content"),
|
|
3463
3426
|
locales: array(string()).min(1).default(["en"]),
|
|
3464
|
-
github: string().optional(),
|
|
3465
3427
|
siteName: string().optional(),
|
|
3466
|
-
auth: union([boolean(), array(string())]).optional(),
|
|
3467
3428
|
upstream: array(object({
|
|
3468
3429
|
url: string(),
|
|
3469
3430
|
label: string()
|
|
@@ -3533,7 +3494,7 @@ async function checkSelfUpdate() {
|
|
|
3533
3494
|
});
|
|
3534
3495
|
if (!res.ok) return;
|
|
3535
3496
|
const { version: latest } = await res.json();
|
|
3536
|
-
const current = "6.0.
|
|
3497
|
+
const current = "6.0.63";
|
|
3537
3498
|
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"));
|
|
3538
3499
|
} catch {}
|
|
3539
3500
|
}
|
|
@@ -3604,15 +3565,10 @@ function buildEnv({ config, contentDir, staticExport = false }) {
|
|
|
3604
3565
|
CONTENT_DIR: contentDir,
|
|
3605
3566
|
LOCALES: (config.locales ?? ["en"]).join(","),
|
|
3606
3567
|
NEXT_PUBLIC_SITE_NAME: config.siteName ?? "Docs",
|
|
3607
|
-
NEXT_PUBLIC_GITHUB_REPO:
|
|
3568
|
+
NEXT_PUBLIC_GITHUB_REPO: process.env.NEXT_PUBLIC_GITHUB_REPO ?? ghPagesUrl ?? vercelGithubUrl,
|
|
3608
3569
|
NEXT_PUBLIC_UPSTREAM_SOURCES: JSON.stringify(config.upstream ?? []),
|
|
3609
3570
|
NEXT_BASE_PATH: ghPagesBasePath ?? "",
|
|
3610
|
-
NEXT_STATIC_EXPORT: staticExport ? "true" : "false"
|
|
3611
|
-
...config.auth !== void 0 ? {
|
|
3612
|
-
AUTH_ENABLED: "true",
|
|
3613
|
-
AUTH_REPO: config.github ?? ghPagesUrl,
|
|
3614
|
-
AUTH_PROTECT: JSON.stringify(config.auth)
|
|
3615
|
-
} : {}
|
|
3571
|
+
NEXT_STATIC_EXPORT: staticExport ? "true" : "false"
|
|
3616
3572
|
};
|
|
3617
3573
|
}
|
|
3618
3574
|
async function runNextFlat(projectDir, cmd, env) {
|
|
@@ -3643,7 +3599,7 @@ async function dev() {
|
|
|
3643
3599
|
async function build({ server = false } = {}) {
|
|
3644
3600
|
const { config, contentDir } = await resolveProject();
|
|
3645
3601
|
const projectDir = process.cwd();
|
|
3646
|
-
console.log(pc.cyan("8n") + pc.dim(` v6.0.
|
|
3602
|
+
console.log(pc.cyan("8n") + pc.dim(` v6.0.63 build → ${contentDir}`));
|
|
3647
3603
|
if (server) await runNextFlat(projectDir, "build", buildEnv({
|
|
3648
3604
|
config,
|
|
3649
3605
|
contentDir,
|
|
@@ -4018,7 +3974,7 @@ async function mcp() {
|
|
|
4018
3974
|
const mcpDir = join(getStarterDir(), "content", "mcp");
|
|
4019
3975
|
const server = new McpServer({
|
|
4020
3976
|
name: "8n",
|
|
4021
|
-
version: "6.0.
|
|
3977
|
+
version: "6.0.63"
|
|
4022
3978
|
});
|
|
4023
3979
|
server.registerTool("read_me", {
|
|
4024
3980
|
description: "Returns how to use the 8n MCP tools. Call this BEFORE documenting anything with 8n.",
|
|
@@ -4136,7 +4092,7 @@ async function generateApi({ input, output }) {
|
|
|
4136
4092
|
|
|
4137
4093
|
//#endregion
|
|
4138
4094
|
//#region src/index.ts
|
|
4139
|
-
const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.
|
|
4095
|
+
const program = new Command().name("8n").description("Run your 8n docs site").version("6.0.63").addOption(new Option("--debug").hideHelp()).hook("preAction", (cmd) => {
|
|
4140
4096
|
if (cmd.opts().debug) process.env.DEBUG_8N = "1";
|
|
4141
4097
|
});
|
|
4142
4098
|
program.command("init").description("Scaffold a new docs project in the current directory").action(init);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{redirect as t}from"next/navigation";import{exchangeCode as r,getGitHubUser as
|
|
1
|
+
import{redirect as t}from"next/navigation";import{exchangeCode as r,getGitHubUser as e,hasRepoAccess as a,parseState as i,setSession as o}from"../../../../src/features/auth";import{env as n}from"../../../../src/config";export async function GET(s){if(!n.AUTH_ENABLED)return new Response("Auth not enabled",{status:404});let c=new URL(s.url),g=c.searchParams.get("code"),{returnTo:l}=i(c.searchParams.get("state")??"");g||t("/login?error=missing_code");try{let i=await r(g),s=await e(i),c=n.NEXT_PUBLIC_GITHUB_REPO?.replace("https://github.com/","");c&&(await a(i,c)||t("/login?error=access_denied")),await o({sub:String(s.id),login:s.login})}catch{t("/login?error=auth_failed")}t(l.startsWith("/")?l:"/")}
|
package/starter/package.json
CHANGED
package/starter/src/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createEnv as E}from"@t3-oss/env-nextjs";import{z as _}from"zod";export const env=E({server:{SITE_URL:_.string().default("http://localhost:3000"),CONTENT_DIR:_.string().default("./content"),AUTH_ENABLED:_.enum(["true"]).optional(),
|
|
1
|
+
import{createEnv as E}from"@t3-oss/env-nextjs";import{z as _}from"zod";export const env=E({server:{SITE_URL:_.string().default("http://localhost:3000"),CONTENT_DIR:_.string().default("./content"),AUTH_ENABLED:_.enum(["true"]).optional(),AUTH_PROTECT:_.string().default("true"),GITHUB_CLIENT_ID:_.string().optional(),GITHUB_CLIENT_SECRET:_.string().optional(),AUTH_SECRET:_.string().optional()},client:{NEXT_PUBLIC_SITE_NAME:_.string().default("Docs"),NEXT_PUBLIC_GITHUB_REPO:_.string().optional(),NEXT_PUBLIC_UPSTREAM_SOURCES:_.string().default("[]").transform(E=>JSON.parse(E))},runtimeEnv:{SITE_URL:process.env.SITE_URL??(process.env.VERCEL_PROJECT_PRODUCTION_URL?`https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`:process.env.VERCEL_URL?`https://${process.env.VERCEL_URL}`:void 0),CONTENT_DIR:process.env.CONTENT_DIR,AUTH_ENABLED:process.env.AUTH_ENABLED,AUTH_PROTECT:process.env.AUTH_PROTECT,GITHUB_CLIENT_ID:process.env.GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET:process.env.GITHUB_CLIENT_SECRET,AUTH_SECRET:process.env.AUTH_SECRET,NEXT_PUBLIC_SITE_NAME:process.env.NEXT_PUBLIC_SITE_NAME,NEXT_PUBLIC_GITHUB_REPO:process.env.NEXT_PUBLIC_GITHUB_REPO,NEXT_PUBLIC_UPSTREAM_SOURCES:process.env.NEXT_PUBLIC_UPSTREAM_SOURCES}});"development"===process.env.NODE_ENV&&env.NEXT_PUBLIC_GITHUB_REPO?.includes("your-org/your-repo")&&console.warn("[8n-starter] ⚠ NEXT_PUBLIC_GITHUB_REPO is still the placeholder value.\n Set NEXT_PUBLIC_GITHUB_REPO in your environment to enable Edit on GitHub links.");
|