diff --git a/CHANGELOG.md b/CHANGELOG.md index e73ff1d..41736ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# v0.4.38 (2026-05-13) + +## Features +- Add DeepSeek TUI as CLI tool in dashboard (#1088) + +## Fixes +- Fix broken Docker image in v0.4.36/v0.4.37 (#1096, #1097) + +## Improvements +- Clean Docker tags + clearer pulls badge + # v0.4.37 (2026-05-13) ## Improvements diff --git a/Dockerfile b/Dockerfile index 8e282a9..576176a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,8 @@ COPY --from=builder /app/open-sse ./open-sse COPY --from=builder /app/src/mitm ./src/mitm # Standalone node_modules may omit deps only required by the MITM child process. COPY --from=builder /app/node_modules/node-forge ./node_modules/node-forge +# Ensure `next` is available at runtime in case tracing did not include it. +COPY --from=builder /app/node_modules/next ./node_modules/next RUN mkdir -p /app/data && chown -R node:node /app && \ mkdir -p /app/data-home && chown node:node /app/data-home && \ diff --git a/cli/package.json b/cli/package.json index dcc1bde..7aca98d 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "9router", - "version": "0.4.37", + "version": "0.4.38", "description": "9Router CLI - Start and manage 9Router server", "bin": { "9router": "./cli.js" diff --git a/cli/scripts/build-cli.js b/cli/scripts/build-cli.js index 980f1bf..52f45a4 100644 --- a/cli/scripts/build-cli.js +++ b/cli/scripts/build-cli.js @@ -111,23 +111,15 @@ if (fs.existsSync(cliAppDir)) { console.log("✅ Cleaned\n"); // Step 3: Copy Next.js standalone build to app/cli/app. -// With outputFileTracingRoot = workspace root, Next places app files under -// .next/standalone/app/ and traced node_modules under .next/standalone/node_modules/. +// With outputFileTracingRoot = projectRoot, server.js + node_modules live flat under .next/standalone/. console.log("3️⃣ Copying Next.js standalone build to app/cli/app..."); const standaloneRoot = path.join(appDir, ".next", "standalone"); -const standaloneApp = path.join(standaloneRoot, "app"); -if (!fs.existsSync(standaloneApp)) { - console.error("❌ Next.js standalone build not found at .next/standalone/app"); +if (!fs.existsSync(path.join(standaloneRoot, "server.js"))) { + console.error("❌ Next.js standalone build not found at .next/standalone/server.js"); console.error("Make sure output: 'standalone' is set in next.config.js"); process.exit(1); } -copyRecursive(standaloneApp, cliAppDir); - -// Copy traced node_modules from standalone root into CLI bundle -const standaloneNodeModules = path.join(standaloneRoot, "node_modules"); -if (fs.existsSync(standaloneNodeModules)) { - copyRecursive(standaloneNodeModules, path.join(cliAppDir, "node_modules")); -} +copyRecursive(standaloneRoot, cliAppDir); console.log("✅ Copied standalone build\n"); // Step 3b: Ensure sql.js (pure JS fallback) bundled in app/cli/app/node_modules. diff --git a/next.config.mjs b/next.config.mjs index 495f58f..98e2e52 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,19 +1,16 @@ import { fileURLToPath } from "node:url"; -import { dirname, join } from "node:path"; +import { dirname } from "node:path"; const projectRoot = dirname(fileURLToPath(import.meta.url)); -// Workspace root (one level up from app/) — where npm hoists deps. -// Next.js tracing must scan from here to find "next", "react", etc. -const workspaceRoot = join(projectRoot, ".."); /** @type {import('next').NextConfig} */ const nextConfig = { output: "standalone", serverExternalPackages: ["better-sqlite3", "sql.js", "node:sqlite", "bun:sqlite"], turbopack: { - root: workspaceRoot + root: projectRoot }, - outputFileTracingRoot: workspaceRoot, + outputFileTracingRoot: projectRoot, outputFileTracingExcludes: { "*": ["./gitbook/**/*"] }, diff --git a/package.json b/package.json index 1715414..62596dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "9router-app", - "version": "0.4.37", + "version": "0.4.38", "description": "9Router web dashboard", "private": true, "scripts": {