Skip to content

Commit a9a205e

Browse files
committed
Merge branch 'main' of github.com:MCPJam/inspector
2 parents 221b254 + 6f0cb93 commit a9a205e

File tree

7 files changed

+2748
-431
lines changed

7 files changed

+2748
-431
lines changed

.github/workflows/docker-build-deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,5 @@ jobs:
4949
cache-from: type=gha
5050
cache-to: type=gha,mode=max
5151
platforms: linux/amd64
52+
build-args: |
53+
BUILDKIT_INLINE_CACHE=1

.github/workflows/npm-publish.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,24 @@ jobs:
2727
node-version: ${{ env.NODE_VERSION }}
2828
registry-url: "https://registry.npmjs.org"
2929

30-
- name: Install dependencies
30+
- name: Clear npm cache and rebuild native modules
3131
run: |
32-
npm install
32+
npm cache clean --force
33+
rm -rf ~/.npm
34+
rm -rf node_modules package-lock.json
35+
rm -rf client/node_modules client/package-lock.json
36+
rm -rf server/node_modules server/package-lock.json
37+
38+
- name: Install dependencies with fresh state
39+
run: |
40+
npm install --legacy-peer-deps --no-optional
3341
npm run install:deps
3442
43+
- name: Rebuild native dependencies
44+
run: |
45+
cd server && npm rebuild esbuild
46+
cd ../client && npm rebuild
47+
3548
- name: Build for npm
3649
run: npm run build
3750

.github/workflows/windows-release.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,34 @@ jobs:
3333
with:
3434
node-version: 20
3535

36-
- name: Install dependencies
36+
- name: Clean dependencies
3737
run: |
38-
npm install
38+
npm cache clean --force
39+
if (Test-Path "node_modules") { Remove-Item "node_modules" -Force -Recurse -ErrorAction SilentlyContinue }
40+
if (Test-Path "package-lock.json") { Remove-Item "package-lock.json" -Force -ErrorAction SilentlyContinue }
41+
if (Test-Path "client/node_modules") { Remove-Item "client/node_modules" -Force -Recurse -ErrorAction SilentlyContinue }
42+
if (Test-Path "client/package-lock.json") { Remove-Item "client/package-lock.json" -Force -ErrorAction SilentlyContinue }
43+
if (Test-Path "server/node_modules") { Remove-Item "server/node_modules" -Force -Recurse -ErrorAction SilentlyContinue }
44+
if (Test-Path "server/package-lock.json") { Remove-Item "server/package-lock.json" -Force -ErrorAction SilentlyContinue }
45+
shell: powershell
46+
47+
- name: Install dependencies fresh
48+
run: |
49+
npm install --legacy-peer-deps --no-optional
3950
npm run install:deps
51+
shell: powershell
4052

41-
- name: Workaround npm optional deps bug (rollup prebuilt)
42-
if: runner.os == 'Windows'
53+
- name: Rebuild native modules for Windows
4354
run: |
55+
# Rebuild esbuild specifically to fix version mismatch
56+
cd server
57+
npm rebuild esbuild --verbose
58+
cd ..
59+
# Install Windows-specific binaries
4460
npm i -D @rollup/rollup-win32-x64-msvc@^4
61+
cd client
62+
npm i lightningcss@^1 --save-dev
63+
shell: powershell
4564

4665
- name: Restore code signing cert
4766
if: env.WINDOWS_PFX_BASE64 != ''
@@ -52,12 +71,14 @@ jobs:
5271
5372
- name: Build
5473
run: npm run build
74+
shell: powershell
5575

5676
- name: Make (Windows)
5777
env:
5878
WINDOWS_PFX_FILE: ${{ runner.temp }}\\codesign.pfx
5979
WINDOWS_PFX_PASSWORD: ${{ secrets.WINDOWS_PFX_PASSWORD }}
6080
run: npm run electron:make
81+
shell: powershell
6182

6283
- name: Rename installer to consistent name
6384
run: |

Dockerfile

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22
# Multi-stage build for client and server
33

44
# Stage 1: Dependencies base (shared)
5-
FROM node:20-alpine AS deps-base
5+
FROM node:20-slim AS deps-base
66
WORKDIR /app
7-
COPY package.json package-lock.json ./
8-
COPY client/package*.json ./client/
9-
COPY server/package*.json ./server/
10-
RUN npm install --include=dev
11-
RUN cd client && npm install --include=dev
12-
RUN cd server && npm install --include=dev
7+
8+
# Clear npm cache and remove any existing lock files to avoid conflicts
9+
RUN npm cache clean --force
10+
11+
COPY package.json ./
12+
COPY client/package.json ./client/
13+
COPY server/package.json ./server/
14+
15+
# Install dependencies with clean slate approach (no lock files)
16+
17+
RUN npm install --no-package-lock --include=dev
18+
RUN cd client && npm install --no-package-lock --include=dev
19+
RUN cd server && npm install --no-package-lock --include=dev
1320

1421
# Stage 2: Build client
1522
FROM deps-base AS client-builder
@@ -26,10 +33,10 @@ COPY client/ ./client/
2633
RUN cd server && npm run build
2734

2835
# Stage 4: Production image - extend existing or create new
29-
FROM node:20-alpine AS production
36+
FROM node:20-slim AS production
3037

3138
# Install dumb-init for proper signal handling
32-
RUN apk add --no-cache dumb-init
39+
RUN apt-get update && apt-get install -y --no-install-recommends dumb-init && rm -rf /var/lib/apt/lists/*
3340

3441
# Create app directory
3542
WORKDIR /app
@@ -55,8 +62,8 @@ COPY shared/ ./shared/
5562
COPY bin/ ./bin/
5663

5764
# Create non-root user
58-
RUN addgroup -g 1001 -S nodejs && \
59-
adduser -S mcpjam -u 1001
65+
RUN groupadd --gid 1001 nodejs && \
66+
useradd --uid 1001 --gid nodejs --shell /bin/bash --create-home mcpjam
6067

6168
# Change ownership of the app directory
6269
RUN chown -R mcpjam:nodejs /app

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,12 @@ This project is licensed under the **Apache License 2.0** - see the [LICENSE](LI
230230

231231
</div>
232232

233-
234233
# ⭐ Star History
234+
235235
<a href="https://star-history.com/#MCPJam/inspector&Date">
236236
<picture>
237237
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=MCPJam/inspector&type=Date&theme=dark" />
238238
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=MCPJam/inspector&type=Date" />
239239
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=MCPJam/inspector&type=Date" />
240240
</picture>
241-
</a>
241+
</a>

0 commit comments

Comments
 (0)