Skip to content

feat(vercel-basic-auth): add only-preview value to vercelEnvTarget#114

Merged
amotarao merged 2 commits into
mainfrom
feature/pc-274
Jul 22, 2026
Merged

feat(vercel-basic-auth): add only-preview value to vercelEnvTarget#114
amotarao merged 2 commits into
mainfrom
feature/pc-274

Conversation

@amotarao

Copy link
Copy Markdown
Member

Summary

@plainbrew/vercel-basic-authvercelEnvTargetonly-preview を追加しました。Vercel の preview 環境のみ Basic 認証を適用したいケースで使えます。

Value Behavior
only-production Vercel production のみ
only-preview Vercel preview のみ (new)
all Vercel の全環境
disabled Vercel 全環境で無効

Closes PC-274

Test plan

  • pnpm --filter @plainbrew/vercel-basic-auth test:run (27 passed)
  • pnpm --filter @plainbrew/vercel-basic-auth type-check

Applies Basic Auth only on Vercel preview deployments. Useful for
protecting preview URLs while keeping production open.

Refs PC-274
@amotarao
amotarao requested review from akameco and removed request for akameco July 22, 2026 00:57
).toBeNull();
});

test("vercelEnvTarget=only-preview で VERCEL_ENV=preview のとき username が undefined でも null を返す", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

テスト名が VERCEL_ENV=preview と書かれているが、テスト本体ではVERCEL_ENV=production をセットしてるっぽい

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

直した!ありがとう!

@akameco akameco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1件コメントしました。タイポなので再レビュー不要です。
既存の"only-production"と対称になってるしいいと思いますLGTM

@amotarao
amotarao merged commit 3988932 into main Jul 22, 2026
1 check passed
@amotarao
amotarao deleted the feature/pc-274 branch July 22, 2026 04:25
@github-actions github-actions Bot mentioned this pull request Jul 22, 2026
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