feat(framework): partition error pages in route scanner and codegen#145
Merged
Conversation
|
CI failed for this pull request. |
|
CI failed for this pull request. |
… and codegen
scanRoutes now returns { routes, errorPages } where error pages are files
whose basename is a 3-digit 4xx/5xx HTTP status code. generateRouteManifest
emits a separate errorPages export with lazy imports keyed by status code.
generateRouteMap excludes error pages from the RouteMap type interface.
All callers updated to handle the new return shape.
Closes #104
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use .at(1) instead of match[1] to satisfy custom/no-bracket-access ESLint rule, with proper undefined check to avoid non-null assertion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d104a04 to
80d1c53
Compare
Closed
qantrepreneur
added a commit
that referenced
this pull request
May 21, 2026
…145) * feat(framework): partition error pages from regular routes in scanner and codegen scanRoutes now returns { routes, errorPages } where error pages are files whose basename is a 3-digit 4xx/5xx HTTP status code. generateRouteManifest emits a separate errorPages export with lazy imports keyed by status code. generateRouteMap excludes error pages from the RouteMap type interface. All callers updated to handle the new return shape. Closes #104 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(framework): replace bracket notation with .at() in route-scanner Use .at(1) instead of match[1] to satisfy custom/no-bracket-access ESLint rule, with proper undefined check to avoid non-null assertion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style(framework): fix prettier formatting in generate-route-manifest Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Lorenzo <lorenzofkramer@gmail.com> Co-authored-by: Claude Opus 4.6 <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.
Summary
scanRoutesnow returns{ routes, errorPages }instead of a flat array404.tsx,500.tsx)generateRouteManifestemits separateerrorPagesexport with lazy imports keyed by status codegenerateRouteMapexcludes error pages from theRouteMapTypeScript interface200.tsx,42.tsx) remain regular routesCloses #104
Test plan
scanRoutesexcludes error page files from regular routes array{ status, filePath }entrieserrorPagesexport in manifest🤖 Generated with Claude Code