Skip to content

feat(pnpm): add root package.json with pnpm cockpit alias - #108

Merged
robercano-ghbot merged 2 commits into
mainfrom
feat/issue-90-pnpm-cockpit
Jul 10, 2026
Merged

feat(pnpm): add root package.json with pnpm cockpit alias#108
robercano-ghbot merged 2 commits into
mainfrom
feat/issue-90-pnpm-cockpit

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a minimal, dependency-free root package.json (private: true, no deps — cockpit uses node built-ins only) exposing a cockpit script that thinly aliases bash .claude/scripts/cockpit-serve.sh (zero logic duplication).
  • pnpm cockpit starts 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.
  • Documents the pnpm cockpit entry point in docs/ARCHITECTURE.md, right next to the existing static cockpit.sh description, since cockpit-serve.sh wasn't mentioned in any doc before.

Closes #90

Test plan

  • node -e "require('./package.json')" confirms valid JSON.
  • Runtime-verified with pnpm (via nvm node v22.13.1, since the sandbox default node v20.13.1 is below pnpm's minimum): pnpm cockpit logs cockpit serving on http://127.0.0.1:8090.
  • pnpm cockpit -- 9000 logs cockpit 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

robercano and others added 2 commits July 10, 2026 10:04
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-ghbot
robercano-ghbot merged commit dfba5bf into main Jul 10, 2026
9 checks passed
@robercano-ghbot
robercano-ghbot deleted the feat/issue-90-pnpm-cockpit branch July 10, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DX: add root package.json with a 'pnpm cockpit' script that launches cockpit-serve.sh

2 participants