Cleaned up custom-redirects types.ts#28822
Draft
allouis wants to merge 1 commit into
Draft
Conversation
- types.ts was an ownership-free dumping ground accidentally committed during the recent service refactor; it gave the two types no clear owner - moved RedirectConfig into its own redirect-config.ts: it is the shared domain type (parser produces it, validation checks it, the service orchestrates it, adapters persist it) with no single consumer, so it gets a dedicated, named home rather than a peer's file - moved the RedirectsStore port into redirects-service.ts next to the existing RedirectManagerLike: its sole consumer is RedirectsService, so the consumer owns the contract and adapters implement it (correct ports-and-adapters direction) - type-only change: every other edit just repoints an import; no runtime behaviour changed
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Summary
Cleans up a
types.tsfile that was accidentally committed during the recentcustom-redirectsservice refactor.types.tsis an ownership-free dumping ground — it gave its two types no clear owner. This gives each type a home based on who owns it.Changes
RedirectConfig→ newredirect-config.ts. It's the shared domain type — the parser produces it, validation checks it, the service orchestrates it, and the store adapters persist it. No single consumer owns it, so it gets a dedicated, named home rather than living in one peer's file.RedirectsStore→ moved intoredirects-service.ts. Its sole consumer isRedirectsService, sitting right next to the existingRedirectManagerLikeinterface. The consumer owns the contract; the store adapters (FileStore,S3RedirectsStore) implement it — the correct ports-and-adapters dependency direction.types.tsdeleted. Remaining edits just repoint imports.Risk
Type-only change — every edit is an
import typerepoint or a verbatim move of an interface declaration. No runtime behaviour changed.Testing
All touched suites pass (79 tests):
redirects-service,redirect-config-parser,validation,file-store,s3-redirects-store,in-memory-store.eslint/tscclean on the changed files.🤖 Generated with Claude Code