fix(inspector): run bundle:sandbox-proxies in predev#1973
fix(inspector): run bundle:sandbox-proxies in predev#1973abedawi wants to merge 1 commit intoMCPJam:mainfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
WalkthroughThe Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
mcpjam-inspector/package.json (1)
48-57: Optional hardening: consider directdev:serverinvocation.Right now, the bundling guarantee is tied to
npm run dev(viapredev). If someone runsnpm run dev:serverdirectly on a clean clone,predevwon’t run and they may still hit missing generated-artifact issues.Suggested tweak (optional)
"scripts": { "predev": "npm run sdk:build && npm run bundle:sandbox-proxies", + "predev:server": "npm run bundle:sandbox-proxies", "dev": "run-script-os", "dev:default": "concurrently \"npm run dev:server\" \"npm run dev:client\"",This keeps the “generated file exists” contract consistent across entrypoints.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@mcpjam-inspector/package.json` around lines 48 - 57, Ensure the "generated file exists" prestep runs when starting the server directly by invoking the predev step from the dev:server entrypoint: update the dev:server script to run npm run predev (or equivalent setup task) before its existing command so running npm run dev:server on a fresh clone always performs the same generation as npm run dev; reference the predev step and the dev:server script in your change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@mcpjam-inspector/package.json`:
- Around line 48-57: Ensure the "generated file exists" prestep runs when
starting the server directly by invoking the predev step from the dev:server
entrypoint: update the dev:server script to run npm run predev (or equivalent
setup task) before its existing command so running npm run dev:server on a fresh
clone always performs the same generation as npm run dev; reference the predev
step and the dev:server script in your change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 03098d04-d837-4679-884a-a077250e089c
📒 Files selected for processing (1)
mcpjam-inspector/package.json
Problem
npm run devloads server routes that importSandboxProxyHtml.bundled.ts. That file is generated byscripts/bundle-sandbox-proxy-html.js(npm run bundle:sandbox-proxies) and is gitignored, so it is missing after a fresh clone.predevpreviously only ransdk:build, so dev could fail immediately withERR_MODULE_NOT_FOUNDfor that import.Change
Run
npm run bundle:sandbox-proxiesinpredevaftersdk:build, consistent withpretestand the fullbuildpipeline, which already ensure this artifact exists.Result
npm run dev -w @mcpjam/inspectorworks on a clean tree without a separate manual bundling step. Each dev start runs one short HTML-bundling step after the SDK build.