fix: validate CLI port argument - #194
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
d304057 to
d35506d
Compare
|
Refreshed this onto current |
50c51f3 to
d35506d
Compare
|
Scope note: while checking the related issues, I found that #90 and #117 are already covered by the earlier contribution #144. I removed my overlapping test commit and the closing claims for those issues so that #144 retains its scope and attribution. This PR is back to the small, assigned #37 change only. Because #37 and #90 describe the same underlying validation, I will leave the preferred merge path to the maintainers and will not add further overlapping scope here. |
Summary
--portas an integer before starting the dashboardCloses #37.
Validation
npm run buildnpm test— 8 test files, 120 tests passednpx tsx src/cli.ts --port 0exits 1 with the expected errornpx tsx src/cli.ts --port -1exits 1 with the expected errornpx tsx src/cli.ts --port 99999exits 1 with the expected errornpx tsx src/cli.ts --port abcexits 1 with the expected errornpx tsx src/cli.ts --port 3000.5exits 1 with the expected errornpx tsx src/cli.ts --port 65535starts successfullygit diff --checkRevalidated after refreshing the branch onto current
mainwith Node.js 24.14.0.