-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
refactor: entrypoint DX #14563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ematipico
merged 11 commits into
feat/environment-api
from
refactor/improve-entrypoint-dx
Oct 20, 2025
+379
−520
Merged
refactor: entrypoint DX #14563
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
74340d4
refactor: entrypoint DX
ematipico 1abd199
Update packages/integrations/cloudflare/src/entrypoints/server.ts
ematipico 328a256
Update packages/integrations/cloudflare/test/fixtures/vite-plugin/src…
ematipico 71d7ca1
Update packages/integrations/cloudflare/src/entrypoints/server.ts
ematipico 3cc220b
fix binding and format
ematipico 2b085fb
Update packages/astro/src/core/app/entrypoint.ts
ematipico b2669e4
Update packages/astro/src/manifest/serialized.ts
ematipico 1ded870
chore: fix issues with Node.js code
ematipico ae8ff46
chore: fix linting
ematipico 6673f51
fix server actions types
ematipico a1b6f16
chore: improve even further!
ematipico File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { renderers } from 'virtual:astro:renderers'; | ||
import { routes } from 'virtual:astro:routes'; | ||
import { manifest as serializedManifest } from 'virtual:astro:serialized-manifest'; | ||
import { App } from './app.js'; | ||
import type { BaseApp } from './base.js'; | ||
import { DevApp } from './dev/app.js'; | ||
import { createConsoleLogger } from './logging.js'; | ||
|
||
const actions = async () => { | ||
return await import('virtual:astro:actions/entrypoint'); | ||
}; | ||
const manifest = Object.assign(serializedManifest, { renderers, actions }); | ||
|
||
export function getApp(dev = import.meta.env.DEV): BaseApp { | ||
if (dev) { | ||
const logger = createConsoleLogger('debug'); | ||
return new DevApp(manifest, true, logger, { routes: routes.map((r) => r.routeData) }); | ||
} else { | ||
return new App(manifest); | ||
} | ||
} |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.