diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 98dd3c8cd..bbd012e9e 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -1675,14 +1675,6 @@ export type AstroAdapterFeatureMap = { * The adapter is able to serve SSR pages */ serverOutput?: SupportsKind; - /** - * Support for emitting a SSR file per page - */ - functionPerPage?: SupportsKind; - /** - * Support when `build.ecludeMiddleware` is enabled. - */ - edgeMiddleware?: SupportsKind; /** * The adapter can emit static assets */ diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts index 6b0ba223e..8d9a71faa 100644 --- a/packages/astro/src/integrations/index.ts +++ b/packages/astro/src/integrations/index.ts @@ -239,9 +239,7 @@ export async function runHookConfigDone({ const ALL_UNSUPPORTED: Required = { serverOutput: UNSUPPORTED, staticOutput: UNSUPPORTED, - edgeMiddleware: UNSUPPORTED, hybridOutput: UNSUPPORTED, - functionPerPage: UNSUPPORTED, assets: { supportKind: UNSUPPORTED }, }; @@ -263,29 +261,13 @@ export function validateSupportedFeatures( logging: LogOptions ): ValidationResult { const { - functionPerPage = UNSUPPORTED, - edgeMiddleware = UNSUPPORTED, assets, serverOutput = UNSUPPORTED, staticOutput = UNSUPPORTED, hybridOutput = UNSUPPORTED, } = featureMap; const validationResult: ValidationResult = {}; - validationResult.functionPerPage = validateSupportKind( - functionPerPage, - adapterName, - logging, - 'functionPerPage', - () => config?.build?.split === true && config?.output === 'server' - ); - validationResult.edgeMiddleware = validateSupportKind( - edgeMiddleware, - adapterName, - logging, - 'edgeMiddleware', - () => config?.build?.excludeMiddleware === true - ); validationResult.staticOutput = validateSupportKind( staticOutput, adapterName, diff --git a/packages/astro/test/test-adapter.js b/packages/astro/test/test-adapter.js index 66a0120ca..67058023d 100644 --- a/packages/astro/test/test-adapter.js +++ b/packages/astro/test/test-adapter.js @@ -72,8 +72,6 @@ export default function ( serverEntrypoint: '@my-ssr', exports: ['manifest', 'createApp'], supportedFeatures: { - edgeMiddleware: 'Stable', - functionPerPage: 'Stable', assets: { supportKind: 'Stable', isNodeCompatible: true, diff --git a/packages/integrations/cloudflare/src/index.ts b/packages/integrations/cloudflare/src/index.ts index 1b56c840d..e1cc3be8f 100644 --- a/packages/integrations/cloudflare/src/index.ts +++ b/packages/integrations/cloudflare/src/index.ts @@ -25,12 +25,13 @@ export function getAdapter(isModeDirectory: boolean): AstroAdapter { serverEntrypoint: '@astrojs/cloudflare/server.directory.js', exports: ['onRequest', 'manifest'], supportedFeatures: { - functionPerPage: 'Experimental', - edgeMiddleware: 'Unsupported', hybridOutput: 'Stable', staticOutput: 'Unsupported', serverOutput: 'Stable', - assets: 'Unsupported', + assets: { + supportKind: 'Unsupported', + isNodeCompatible: false, + }, }, } : { @@ -38,12 +39,13 @@ export function getAdapter(isModeDirectory: boolean): AstroAdapter { serverEntrypoint: '@astrojs/cloudflare/server.advanced.js', exports: ['default'], supportedFeatures: { - functionPerPage: 'Experimental', - edgeMiddleware: 'Unsupported', hybridOutput: 'Stable', staticOutput: 'Unsupported', serverOutput: 'Stable', - assets: 'Unsupported', + assets: { + supportKind: 'Unsupported', + isNodeCompatible: false, + }, }, }; } diff --git a/packages/integrations/deno/src/index.ts b/packages/integrations/deno/src/index.ts index 402f9166f..27bc0ddcd 100644 --- a/packages/integrations/deno/src/index.ts +++ b/packages/integrations/deno/src/index.ts @@ -90,12 +90,13 @@ export function getAdapter(args?: Options): AstroAdapter { args: args ?? {}, exports: ['stop', 'handle', 'start', 'running'], supportedFeatures: { - functionPerPage: 'Unsupported', - edgeMiddleware: 'Unsupported', hybridOutput: 'Stable', staticOutput: 'Stable', serverOutput: 'Stable', - assets: 'Unsupported', + assets: { + supportKind: 'Unsupported', + isNodeCompatible: false, + }, }, }; } diff --git a/packages/integrations/netlify/src/integration-edge-functions.ts b/packages/integrations/netlify/src/integration-edge-functions.ts index ac7c124fb..60571bd61 100644 --- a/packages/integrations/netlify/src/integration-edge-functions.ts +++ b/packages/integrations/netlify/src/integration-edge-functions.ts @@ -11,6 +11,15 @@ export function getAdapter(): AstroAdapter { name: '@astrojs/netlify/edge-functions', serverEntrypoint: '@astrojs/netlify/netlify-edge-functions.js', exports: ['default'], + supportedFeatures: { + hybridOutput: 'Stable', + staticOutput: 'Stable', + serverOutput: 'Stable', + assets: { + supportKind: 'Unsupported', + isNodeCompatible: false, + }, + }, }; } diff --git a/packages/integrations/netlify/src/integration-functions.ts b/packages/integrations/netlify/src/integration-functions.ts index 66e0c196a..58750448a 100644 --- a/packages/integrations/netlify/src/integration-functions.ts +++ b/packages/integrations/netlify/src/integration-functions.ts @@ -15,12 +15,13 @@ export function getAdapter(args: Args = {}): AstroAdapter { exports: ['handler'], args, supportedFeatures: { - functionPerPage: 'Experimental', - edgeMiddleware: 'Experimental', hybridOutput: 'Stable', staticOutput: 'Stable', serverOutput: 'Stable', - assets: 'Unsupported', + assets: { + supportKind: 'Stable', + isNodeCompatible: true, + }, }, }; } diff --git a/packages/integrations/node/src/index.ts b/packages/integrations/node/src/index.ts index eda6c1209..6327effc4 100644 --- a/packages/integrations/node/src/index.ts +++ b/packages/integrations/node/src/index.ts @@ -9,12 +9,13 @@ export function getAdapter(options: Options): AstroAdapter { exports: ['handler', 'startServer'], args: options, supportedFeatures: { - functionPerPage: 'Stable', - edgeMiddleware: 'Stable', hybridOutput: 'Stable', staticOutput: 'Stable', serverOutput: 'Stable', - assets: 'Experimental', + assets: { + supportKind: 'Stable', + isNodeCompatible: true, + }, }, }; } diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts index 486635ec3..535fa5b4a 100644 --- a/packages/integrations/vercel/src/serverless/adapter.ts +++ b/packages/integrations/vercel/src/serverless/adapter.ts @@ -35,12 +35,13 @@ function getAdapter(): AstroAdapter { serverEntrypoint: `${PACKAGE_NAME}/entrypoint`, exports: ['default'], supportedFeatures: { - functionPerPage: 'Experimental', - edgeMiddleware: 'Experimental', hybridOutput: 'Stable', staticOutput: 'Stable', serverOutput: 'Stable', - assets: 'Stable', + assets: { + supportKind: 'Unsupported', + isNodeCompatible: false, + }, }, }; }