Skip to content

Conversation

@romradchenko
Copy link
Owner

Adds Playwright-style env overrides for the auth CLI webServer process.

  • webServer.env typed + validated
  • Spawn merges { ...process.env, ...webServer.env }
  • Docs updated + unit test added

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for environment variable overrides in the webServer configuration, following Playwright's design pattern. Users can now specify custom environment variables for their web server process through the webServer.env configuration option.

Key Changes:

  • Added env?: Record<string, string> field to webServer configuration with validation
  • Updated web server spawning logic to merge custom env with process.env
  • Added comprehensive test coverage and documentation

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/auth/src/config/types.ts Added optional env field to AuthWebServerConfig interface with documentation
packages/auth/src/config/loadAuthConfig.ts Added validation to ensure webServer.env values are strings
packages/auth/src/cli/webServer.ts Updated spawn logic to merge webServer.env with process.env
packages/auth/src/cli/args.ts Added env field to WebServerArgs interface for consistency
packages/auth/src/cli/main.ts Refactored webServer resolution logic to properly pass through env from config
packages/auth/src/tests/configFindAndLoad.test.ts Added test cases for valid env usage and rejection of non-string values
packages/auth/README.md Added documentation example showing env usage
README.md Added documentation example showing env usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@romradchenko romradchenko merged commit 60531bd into main Jan 4, 2026
9 checks passed
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.

2 participants