Appearance
2026-03-11 docs server bin deletion bugfix
Symptom
After publishing version 0.0.10, running npx -y -p @ray-js/robot-map-sdk@latest robot-map-docs failed with command not found.
Reproducible steps
- Run
npm run mcp:build. - Observe that
bin/docs-server.jsis removed. - Publish package with
package.jsonstill declaring"robot-map-docs": "./bin/docs-server.js". - Execute
npx ... robot-map-docsfrom a clean environment.
Root cause
tsup.mcp.config.ts used:
outDir: 'bin'clean: true
mcp:build therefore cleaned the entire bin/ folder and rebuilt only mcp-server, deleting docs-server.js.
Patch summary
- Restored
bin/docs-server.js. - Changed MCP tsup config to
clean: falsesomcp:buildno longer wipes otherbinscripts. - Hardened publish guard in
prepublishOnly: fail fast ifbin/docs-server.jsis missing before publish.
Risk assessment
- Low runtime risk.
- Main tradeoff: with
clean: false, stale MCP artifacts could remain inbin/if filenames change in the future.
Regression checklist
- [x]
bin/docs-server.jsexists afternpm run mcp:build. - [x]
npm run lintpasses. - [x]
npx tsc --noEmitpasses. - [x]
npm pack --dry-run --jsonincludesbin/docs-server.js.