diff --git a/packages/astro/src/actions/runtime/virtual/get-action.ts b/packages/astro/src/actions/runtime/virtual/get-action.ts index a0906732b16a..b547b57c10c5 100644 --- a/packages/astro/src/actions/runtime/virtual/get-action.ts +++ b/packages/astro/src/actions/runtime/virtual/get-action.ts @@ -1,7 +1,7 @@ import type { ZodType } from 'zod'; -import type { ActionAccept, ActionClient } from './server.js'; import { ActionNotFoundError } from '../../../core/errors/errors-data.js'; import { AstroError } from '../../../core/errors/errors.js'; +import type { ActionAccept, ActionClient } from './server.js'; /** * Get server-side action based on the route path. diff --git a/packages/astro/src/actions/utils.ts b/packages/astro/src/actions/utils.ts index e9673d618c99..0e7c6fb62190 100644 --- a/packages/astro/src/actions/utils.ts +++ b/packages/astro/src/actions/utils.ts @@ -1,5 +1,5 @@ -import * as eslexer from 'es-module-lexer'; import type fsMod from 'node:fs'; +import * as eslexer from 'es-module-lexer'; import type { APIContext } from '../@types/astro.js'; import type { Locals } from './runtime/middleware.js'; import type { ActionAPIContext } from './runtime/utils.js'; diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 28ce9810aab3..f3174b5d325c 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -4,6 +4,7 @@ import glob from 'fast-glob'; import * as vite from 'vite'; import { crawlFrameworkPkgs } from 'vitefu'; import type { AstroSettings } from '../@types/astro.js'; +import { vitePluginActions, vitePluginUserActions } from '../actions/plugins.js'; import { getAssetsPrefix } from '../assets/utils/getAssetsPrefix.js'; import astroAssetsPlugin from '../assets/vite-plugin-assets.js'; import astroContainer from '../container/vite-plugin-container.js'; @@ -39,7 +40,6 @@ import { vitePluginMiddleware } from './middleware/vite-plugin.js'; import { joinPaths } from './path.js'; import { vitePluginServerIslands } from './server-islands/vite-plugin-server-islands.js'; import { isObject } from './util.js'; -import { vitePluginActions, vitePluginUserActions } from '../actions/plugins.js'; interface CreateViteOptions { settings: AstroSettings; diff --git a/packages/astro/src/integrations/hooks.ts b/packages/astro/src/integrations/hooks.ts index a8f1293835d5..d7e37b5fc560 100644 --- a/packages/astro/src/integrations/hooks.ts +++ b/packages/astro/src/integrations/hooks.ts @@ -15,6 +15,8 @@ import type { RouteData, RouteOptions, } from '../@types/astro.js'; +import astroIntegrationActionsRouteHandler from '../actions/integration.js'; +import { isActionsFilePresent } from '../actions/utils.js'; import type { SerializedSSRManifest } from '../core/app/types.js'; import type { PageBuildData } from '../core/build/types.js'; import { buildClientDirectiveEntrypoint } from '../core/client-directive/index.js'; @@ -22,8 +24,6 @@ import { mergeConfig } from '../core/config/index.js'; import type { AstroIntegrationLogger, Logger } from '../core/logger/core.js'; import { isServerLikeOutput } from '../core/util.js'; import { validateSupportedFeatures } from './features-validation.js'; -import { isActionsFilePresent } from '../actions/utils.js'; -import astroIntegrationActionsRouteHandler from '../actions/integration.js'; async function withTakingALongTimeMsg({ name,