🐛 fix(cli): robust npx entry point, Node 20 requirement, setup hardening (#8)

- Use fs.realpathSync for entry point detection to fix npx symlink failures
- Add --help and --version CLI flags with explicit process.exit(0)
- Add TTY detection in setup wizard to prevent non-interactive hangs
- Wrap JSON.parse in mergeJsonConfig with try/catch for malformed configs
- Update engines.node to >=20.0.0 to match better-sqlite3 requirements
- Update Dockerfiles from node:18-slim to node:20-slim
- Remove error-swallowing || true from postinstall script
- Replace deprecated windows-build-tools with VS Build Tools link
This commit is contained in:
Sanjib Devnath
2026-03-13 18:21:19 +05:30
committed by GitHub
parent 6a69ac6761
commit 97d816df4a
7 changed files with 65 additions and 20 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
# Builds the MCP server with SQLite persistence
# Stage 1: Build backend (TypeScript compilation + native modules)
FROM node:18-slim AS builder
FROM node:20-slim AS builder
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
@@ -16,7 +16,7 @@ COPY tsconfig.json ./
RUN npm run build:server
# Stage 2: Production MCP Server
FROM node:18-slim AS production
FROM node:20-slim AS production
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*