diff --git a/packages/astro/src/core/app/index.ts b/packages/astro/src/core/app/index.ts index 02b38bfa6..03b73f53a 100644 --- a/packages/astro/src/core/app/index.ts +++ b/packages/astro/src/core/app/index.ts @@ -12,6 +12,7 @@ import { consoleLogDestination } from '../logger/console.js'; import { error, type LogOptions } from '../logger/core.js'; import { prependForwardSlash, removeTrailingForwardSlash } from '../path.js'; import { RedirectSinglePageBuiltModule } from '../redirects/index.js'; +import { isResponse } from '../render/core'; import { createEnvironment, createRenderContext, @@ -27,7 +28,6 @@ import { } from '../render/ssr-element.js'; import { matchRoute } from '../routing/match.js'; import type { RouteInfo } from './types'; -import { isResponse } from '../render/core'; export { deserializeManifest } from './common.js'; const clientLocalsSymbol = Symbol.for('astro.locals'); diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index e4a8a0d2f..32c76cb08 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -38,6 +38,7 @@ import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from '../../vite-plugin-sc import { AstroError, AstroErrorData } from '../errors/index.js'; import { debug, info } from '../logger/core.js'; import { getRedirectLocationOrThrow, RedirectSinglePageBuiltModule } from '../redirects/index.js'; +import { isEndpointResult } from '../render/core.js'; import { createEnvironment, createRenderContext, tryRenderRoute } from '../render/index.js'; import { callGetStaticPaths } from '../render/route-cache.js'; import { @@ -62,7 +63,6 @@ import type { StylesheetAsset, } from './types'; import { getTimeStat } from './util.js'; -import { isEndpointResult } from '../render/core.js'; function createEntryURL(filePath: string, outFolder: URL) { return new URL('./' + filePath + `?time=${Date.now()}`, outFolder); diff --git a/packages/astro/src/core/render/core.ts b/packages/astro/src/core/render/core.ts index efd546231..d6228fbbe 100644 --- a/packages/astro/src/core/render/core.ts +++ b/packages/astro/src/core/render/core.ts @@ -1,6 +1,7 @@ import type { AstroCookies, ComponentInstance, + EndpointHandler, MiddlewareHandler, MiddlewareResponseHandler, RouteType, @@ -13,7 +14,6 @@ import { redirectRouteGenerate, redirectRouteStatus, routeIsRedirect } from '../ import type { RenderContext } from './context.js'; import type { Environment } from './environment.js'; import { createResult } from './result.js'; -import type { EndpointHandler } from '../../@types/astro'; export type RenderPage = { mod: ComponentInstance; diff --git a/packages/astro/src/vite-plugin-astro-server/route.ts b/packages/astro/src/vite-plugin-astro-server/route.ts index c4aff9d2b..61c85d692 100644 --- a/packages/astro/src/vite-plugin-astro-server/route.ts +++ b/packages/astro/src/vite-plugin-astro-server/route.ts @@ -12,20 +12,20 @@ import { attachToResponse } from '../core/cookies/index.js'; import { AstroErrorData, isAstroError } from '../core/errors/index.js'; import { warn } from '../core/logger/core.js'; import { loadMiddleware } from '../core/middleware/loadMiddleware.js'; +import { getStylesForURL } from '../core/render/dev/css.js'; import type { DevelopmentEnvironment, SSROptions } from '../core/render/dev/index'; import { preload } from '../core/render/dev/index.js'; +import { getComponentMetadata } from '../core/render/dev/metadata.js'; +import { getScriptsForURL } from '../core/render/dev/scripts.js'; import { createRenderContext, getParamsAndProps, tryRenderRoute } from '../core/render/index.js'; import { createRequest } from '../core/request.js'; import { matchAllRoutes } from '../core/routing/index.js'; +import { isPage, resolveIdToUrl, viteID } from '../core/util.js'; import { getSortedPreloadedMatches } from '../prerender/routing.js'; import { isServerLikeOutput } from '../prerender/utils.js'; +import { PAGE_SCRIPT_ID } from '../vite-plugin-scripts/index.js'; import { log404 } from './common.js'; import { handle404Response, writeSSRResult, writeWebResponse } from './response.js'; -import { getScriptsForURL } from '../core/render/dev/scripts.js'; -import { isPage, resolveIdToUrl, viteID } from '../core/util.js'; -import { PAGE_SCRIPT_ID } from '../vite-plugin-scripts/index.js'; -import { getStylesForURL } from '../core/render/dev/css.js'; -import { getComponentMetadata } from '../core/render/dev/metadata.js'; const clientLocalsSymbol = Symbol.for('astro.locals');