@ahmedrowaihi/8n-starter 2.2.6 → 2.2.8
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/next.config.mjs +3 -2
- package/package.json +1 -1
- package/src/config.js +1 -1
- package/src/features/feedback/github.js +2 -2
package/next.config.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/** @type {import('next').NextConfig} */
|
|
2
2
|
const basePath = process.env.NEXT_BASE_PATH || "";
|
|
3
3
|
|
|
4
|
+
const isStaticExport = process.env.NEXT_STATIC_EXPORT === "true";
|
|
5
|
+
|
|
4
6
|
const config = {
|
|
5
7
|
reactStrictMode: true,
|
|
6
|
-
output: "export",
|
|
7
|
-
trailingSlash: true,
|
|
8
|
+
...(isStaticExport ? { output: "export", trailingSlash: true } : {}),
|
|
8
9
|
...(basePath ? { basePath, assetPrefix: basePath } : {}),
|
|
9
10
|
|
|
10
11
|
// Prevent heavy server-only packages from being bundled into client chunks
|
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createEnv as e}from"@t3-oss/env-nextjs";import{z as
|
|
1
|
+
import{createEnv as e}from"@t3-oss/env-nextjs";import{z as _}from"zod";let s=_.string().default("[]").transform(e=>JSON.parse(e)),t=_.string().default("{}").transform(e=>JSON.parse(e));export const env=e({server:{SITE_URL:_.string().default("http://localhost:3000"),CONTENT_DIR:_.string().default("./content"),SECTIONS:t},client:{NEXT_PUBLIC_SITE_NAME:_.string().default("Docs"),NEXT_PUBLIC_GITHUB_REPO:_.string().optional(),NEXT_PUBLIC_NAV_LINKS:s,NEXT_PUBLIC_ANIMATIONS:_.enum(["true","false"]).default("true").transform(e=>"true"===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,SECTIONS:process.env.SECTIONS,NEXT_PUBLIC_SITE_NAME:process.env.NEXT_PUBLIC_SITE_NAME,NEXT_PUBLIC_GITHUB_REPO:process.env.NEXT_PUBLIC_GITHUB_REPO,NEXT_PUBLIC_NAV_LINKS:process.env.NEXT_PUBLIC_NAV_LINKS,NEXT_PUBLIC_ANIMATIONS:process.env.NEXT_PUBLIC_ANIMATIONS}});export function isSectionHidden(e,_){let s=env.SECTIONS[e];return!1===s||void 0!==s&&!1===s[_]}"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 github.repo in 8n.config.ts to enable Edit on GitHub links.");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function createGitHubFeedbackAction(e,o){return async n=>{let r="good"===n.opinion?"👍 Good":"👎 Bad",a=`Feedback: ${e}`,c=new URLSearchParams({title:a,body:[`**Page:** ${n.url}`,`**Rating:** ${r}`,n.message?`
|
|
1
|
+
export function createGitHubFeedbackAction(e,o){return async n=>{if(!o)return{};let r="good"===n.opinion?"👍 Good":"👎 Bad",a=`Feedback: ${e}`,c=new URLSearchParams({title:a,body:[`**Page:** ${n.url}`,`**Rating:** ${r}`,n.message?`
|
|
2
2
|
**Comment:**
|
|
3
|
-
${n.message}`:""].filter(Boolean).join("\n")}),
|
|
3
|
+
${n.message}`:""].filter(Boolean).join("\n")}),t=`${o}/discussions/new?category=docs-feedback&${c}`;return window.open(t,"_blank","noopener,noreferrer"),{githubUrl:t}}}export function createGitHubBlockFeedbackAction(e,o){return async n=>{if(!o)return{};let r=`Block Feedback: ${e}`,a=new URLSearchParams({title:r,body:[`**Page:** ${n.url}`,n.blockBody?`**Block:**
|
|
4
4
|
> ${n.blockBody.slice(0,300)}`:"",n.message?`
|
|
5
5
|
**Comment:**
|
|
6
6
|
${n.message}`:""].filter(Boolean).join("\n")}),c=`${o}/discussions/new?category=docs-feedback&${a}`;return window.open(c,"_blank","noopener,noreferrer"),{githubUrl:c}}}
|