Skip to content

Handle BrowserStack MCP metadata flags#314

Open
wowsofine wants to merge 1 commit into
browserstack:mainfrom
wowsofine:codex/browserstack-mcp-metadata-flags
Open

Handle BrowserStack MCP metadata flags#314
wowsofine wants to merge 1 commit into
browserstack:mainfrom
wowsofine:codex/browserstack-mcp-metadata-flags

Conversation

@wowsofine

Copy link
Copy Markdown

Summary

  • handle --version/-v and --help/-h before credential validation
  • keep metadata flags usable without BROWSERSTACK_USERNAME or BROWSERSTACK_ACCESS_KEY
  • add a Vitest coverage path for the no-credential metadata flags

Reproduction

npm exec --yes --package=@browserstack/mcp-server@1.2.20 -- browserstack-mcp-server --version currently prints a BROWSERSTACK_USERNAME environment variable error instead of version metadata. The same credential check also blocks --help.

Validation

  • Red test first: new metadata tests failed because stdout was empty and credential validation ran first
  • npx vitest run tests/cli-metadata.test.ts
  • npm test (22 files, 184 tests)
  • npm run lint
  • npx tsc --noEmit
  • npm run build
  • local npm pack + npm exec --package=<tarball> -- browserstack-mcp-server --version prints 1.2.21
  • local npm pack + npm exec --package=<tarball> -- browserstack-mcp-server --help
  • git diff --check

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.

1 participant