Repository navigation
refactor: v2移行準備 - #109
Merged
Merged
refactor: v2移行準備#109
Conversation
テストから main.ts を import するとサーバーが起動してしまうため。 prisma / nanoid / cookieOptions も db.ts / lib/id.ts / config.ts に移し、main.ts への循環 import をなくす。 config.ts がモジュールの評価時に環境変数を読むので、main.ts の先頭で dotenv/config を読み込む。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- テスト用の DB は compose の Postgres 上の itsuhima_test (TEST_DATABASE_URL で上書き可)。 globalSetup で migrate deploy し、各テストの前に全テーブルを TRUNCATE する - browserId のテストと、routes/projects.ts の挙動を固定するテストを追加 - tsconfig を型チェック用 (テストを含む) とビルド用 (tsconfig.build.json) に分け、CI で typecheck する - vitest 5 が Node 22 以上を要求するので、CI と Dockerfile を Node 24 に上げる - DB を使うテストはローカルで回し、CI では実行しない Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nakaterm
marked this pull request as draft
October 22, 2026 11:02
Hono ハンドラに埋まっていた権限判定と Prisma 呼び出しを server/src/services/ に切り出す。振る舞いは変えない (f270885 の Slot バリデーション・Actor・updatedAt などは入れない)。 - サービスは HTTP を知らない。ServiceError は業務上の理由を持ち、 onError で HTTP ステータスに変換する - エラーレスポンスが RPC の型に乗らなくなるため、クライアントの エラーメッセージの読み出しを readErrorMessage にまとめる Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
API を直接呼ぶと、イベントの期間・時間帯の外や、15 分単位でない Slot、別のイベントの参加形態を使った Slot を保存できた (#91)。 保存前に検証し、違反は 400 にする。存在しないイベントへの提出は 500 ではなく 404 にする。 時間帯が未設定のイベントでは、Web UI が 23:45〜24:00 の Slot の 終わりを翌日の 0:00 として送るので、日をまたいだとは見なさない。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.