feat(pnpm): add root package.json with pnpm cockpit alias - #108
Merged
Conversation
Add a minimal, dependency-free root package.json exposing `pnpm cockpit` as a thin alias for .claude/scripts/cockpit-serve.sh (default port 8090, override via `pnpm cockpit -- <port>`). Document the entry point in docs/ARCHITECTURE.md alongside the existing static cockpit description. Closes #90 Co-Authored-By: Claude Sonnet 5 <[email protected]>
…s smoke test CI (.github/actions/setup/action.yml) runs Node 20 + `corepack enable` with no packageManager pin, so corepack was resolving an unpinned pnpm (11.x, requires Node >=22.13) and crashing before `pnpm cockpit` ever ran. Pin packageManager to [email protected] (supports Node >=18.12) and add a minimal engines.node >=20, verified locally under Node 20.13.1: `pnpm cockpit` and `pnpm cockpit -- 9000` both start serving correctly. Also add a smoke case to cockpit.test.sh exercising the scripts.cockpit alias itself via `npm run cockpit` (no corepack/pnpm dependency in CI, same scripts.cockpit entry pnpm resolves) — starts the server bound to 127.0.0.1, asserts a 200 GET of the dashboard, then tears it down by PID (npm wraps the real node server behind npm -> sh -> node, so cleanup targets the actual listening PID via lsof/ss, not just npm's own PID). Co-Authored-By: Claude Sonnet 5 <[email protected]>
robercano
approved these changes
Jul 10, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
package.json(private: true, no deps — cockpit uses node built-ins only) exposing acockpitscript that thinly aliasesbash .claude/scripts/cockpit-serve.sh(zero logic duplication).pnpm cockpitstarts the live-serve cockpit on the default port 8090;pnpm cockpit -- <port>overrides the port, since pnpm forwards args after--straight through to the script's existing[port]positional arg.pnpm cockpitentry point indocs/ARCHITECTURE.md, right next to the existing staticcockpit.shdescription, sincecockpit-serve.shwasn't mentioned in any doc before.Closes #90
Test plan
node -e "require('./package.json')"confirms valid JSON.pnpm cockpitlogscockpit serving on http://127.0.0.1:8090.pnpm cockpit -- 9000logscockpit serving on http://127.0.0.1:9000, confirming the port-override wiring.GATES_FILE=.claude/self/gates.json bash .claude/scripts/gate.sh build— pass.GATES_FILE=.claude/self/gates.json bash .claude/scripts/gate.sh lint— pass.GATES_FILE=.claude/self/gates.json bash .claude/scripts/gate.sh test_affected— pass.🤖 Generated with Claude Code