feat: additional $app/manifest goodies, better route typings - #16594
feat: additional $app/manifest goodies, better route typings#16594elliott-with-the-longest-name-on-github wants to merge 3 commits into
$app/manifest goodies, better route typings#16594Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/ed237b6803ecf7aa7b6cc8f4c7d0e7e9497679b6Open in |
🦋 Changeset detectedLatest commit: ed237b6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
$app/manifest goodies, better route typings
d922ce4 to
d0208ec
Compare
|
Bikeshedding time! Is it |
|
Good question... I went with |
|
I think |
|
We do — e.g. in https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Request we say
'endpoint', to me, includes things like |
|
That example you mention can also mean |
Based on #16580. Adds a few goodies:
PageRouteIdandEndpointRouteId, which combine to make upRouteId— these make the internal types a bit cleaner and allow you to discriminate between which routes do what if neededpageandendpointbooleans on each entry in$app/manifest.routes, allowing routes to be filtered by capability; routes containing both+pageand+serverhave both set totrueManifestRoutediscriminated union that narrowsidto the corresponding page-only, endpoint-only, or combined route IDsLayoutParamsIdalias for the IDs accepted byLayoutParams, which now correspond specifically to directories containing layoutsevent.route.idvalues, since endpoint requests do not execute layoutsLayouts only run for page routes, not endpoints. Previously, a directory with both
+layoutand+serverincorrectly included its endpoint-only ID in the layout’s possibleevent.route.idtype, even though that value can never occur at runtime. The change restricts it to page IDs that can actually execute the layout.