chore: remove features and update adapters
This commit is contained in:
parent
dd54199d7c
commit
8d9f9a49f4
9 changed files with 33 additions and 46 deletions
|
@ -1675,14 +1675,6 @@ export type AstroAdapterFeatureMap = {
|
||||||
* The adapter is able to serve SSR pages
|
* The adapter is able to serve SSR pages
|
||||||
*/
|
*/
|
||||||
serverOutput?: SupportsKind;
|
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
|
* The adapter can emit static assets
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -239,9 +239,7 @@ export async function runHookConfigDone({
|
||||||
const ALL_UNSUPPORTED: Required<AstroAdapterFeatureMap> = {
|
const ALL_UNSUPPORTED: Required<AstroAdapterFeatureMap> = {
|
||||||
serverOutput: UNSUPPORTED,
|
serverOutput: UNSUPPORTED,
|
||||||
staticOutput: UNSUPPORTED,
|
staticOutput: UNSUPPORTED,
|
||||||
edgeMiddleware: UNSUPPORTED,
|
|
||||||
hybridOutput: UNSUPPORTED,
|
hybridOutput: UNSUPPORTED,
|
||||||
functionPerPage: UNSUPPORTED,
|
|
||||||
assets: { supportKind: UNSUPPORTED },
|
assets: { supportKind: UNSUPPORTED },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -263,29 +261,13 @@ export function validateSupportedFeatures(
|
||||||
logging: LogOptions
|
logging: LogOptions
|
||||||
): ValidationResult {
|
): ValidationResult {
|
||||||
const {
|
const {
|
||||||
functionPerPage = UNSUPPORTED,
|
|
||||||
edgeMiddleware = UNSUPPORTED,
|
|
||||||
assets,
|
assets,
|
||||||
serverOutput = UNSUPPORTED,
|
serverOutput = UNSUPPORTED,
|
||||||
staticOutput = UNSUPPORTED,
|
staticOutput = UNSUPPORTED,
|
||||||
hybridOutput = UNSUPPORTED,
|
hybridOutput = UNSUPPORTED,
|
||||||
} = featureMap;
|
} = featureMap;
|
||||||
const validationResult: ValidationResult = {};
|
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(
|
validationResult.staticOutput = validateSupportKind(
|
||||||
staticOutput,
|
staticOutput,
|
||||||
adapterName,
|
adapterName,
|
||||||
|
|
|
@ -72,8 +72,6 @@ export default function (
|
||||||
serverEntrypoint: '@my-ssr',
|
serverEntrypoint: '@my-ssr',
|
||||||
exports: ['manifest', 'createApp'],
|
exports: ['manifest', 'createApp'],
|
||||||
supportedFeatures: {
|
supportedFeatures: {
|
||||||
edgeMiddleware: 'Stable',
|
|
||||||
functionPerPage: 'Stable',
|
|
||||||
assets: {
|
assets: {
|
||||||
supportKind: 'Stable',
|
supportKind: 'Stable',
|
||||||
isNodeCompatible: true,
|
isNodeCompatible: true,
|
||||||
|
|
|
@ -25,12 +25,13 @@ export function getAdapter(isModeDirectory: boolean): AstroAdapter {
|
||||||
serverEntrypoint: '@astrojs/cloudflare/server.directory.js',
|
serverEntrypoint: '@astrojs/cloudflare/server.directory.js',
|
||||||
exports: ['onRequest', 'manifest'],
|
exports: ['onRequest', 'manifest'],
|
||||||
supportedFeatures: {
|
supportedFeatures: {
|
||||||
functionPerPage: 'Experimental',
|
|
||||||
edgeMiddleware: 'Unsupported',
|
|
||||||
hybridOutput: 'Stable',
|
hybridOutput: 'Stable',
|
||||||
staticOutput: 'Unsupported',
|
staticOutput: 'Unsupported',
|
||||||
serverOutput: 'Stable',
|
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',
|
serverEntrypoint: '@astrojs/cloudflare/server.advanced.js',
|
||||||
exports: ['default'],
|
exports: ['default'],
|
||||||
supportedFeatures: {
|
supportedFeatures: {
|
||||||
functionPerPage: 'Experimental',
|
|
||||||
edgeMiddleware: 'Unsupported',
|
|
||||||
hybridOutput: 'Stable',
|
hybridOutput: 'Stable',
|
||||||
staticOutput: 'Unsupported',
|
staticOutput: 'Unsupported',
|
||||||
serverOutput: 'Stable',
|
serverOutput: 'Stable',
|
||||||
assets: 'Unsupported',
|
assets: {
|
||||||
|
supportKind: 'Unsupported',
|
||||||
|
isNodeCompatible: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,12 +90,13 @@ export function getAdapter(args?: Options): AstroAdapter {
|
||||||
args: args ?? {},
|
args: args ?? {},
|
||||||
exports: ['stop', 'handle', 'start', 'running'],
|
exports: ['stop', 'handle', 'start', 'running'],
|
||||||
supportedFeatures: {
|
supportedFeatures: {
|
||||||
functionPerPage: 'Unsupported',
|
|
||||||
edgeMiddleware: 'Unsupported',
|
|
||||||
hybridOutput: 'Stable',
|
hybridOutput: 'Stable',
|
||||||
staticOutput: 'Stable',
|
staticOutput: 'Stable',
|
||||||
serverOutput: 'Stable',
|
serverOutput: 'Stable',
|
||||||
assets: 'Unsupported',
|
assets: {
|
||||||
|
supportKind: 'Unsupported',
|
||||||
|
isNodeCompatible: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,15 @@ export function getAdapter(): AstroAdapter {
|
||||||
name: '@astrojs/netlify/edge-functions',
|
name: '@astrojs/netlify/edge-functions',
|
||||||
serverEntrypoint: '@astrojs/netlify/netlify-edge-functions.js',
|
serverEntrypoint: '@astrojs/netlify/netlify-edge-functions.js',
|
||||||
exports: ['default'],
|
exports: ['default'],
|
||||||
|
supportedFeatures: {
|
||||||
|
hybridOutput: 'Stable',
|
||||||
|
staticOutput: 'Stable',
|
||||||
|
serverOutput: 'Stable',
|
||||||
|
assets: {
|
||||||
|
supportKind: 'Unsupported',
|
||||||
|
isNodeCompatible: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,13 @@ export function getAdapter(args: Args = {}): AstroAdapter {
|
||||||
exports: ['handler'],
|
exports: ['handler'],
|
||||||
args,
|
args,
|
||||||
supportedFeatures: {
|
supportedFeatures: {
|
||||||
functionPerPage: 'Experimental',
|
|
||||||
edgeMiddleware: 'Experimental',
|
|
||||||
hybridOutput: 'Stable',
|
hybridOutput: 'Stable',
|
||||||
staticOutput: 'Stable',
|
staticOutput: 'Stable',
|
||||||
serverOutput: 'Stable',
|
serverOutput: 'Stable',
|
||||||
assets: 'Unsupported',
|
assets: {
|
||||||
|
supportKind: 'Stable',
|
||||||
|
isNodeCompatible: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,12 +9,13 @@ export function getAdapter(options: Options): AstroAdapter {
|
||||||
exports: ['handler', 'startServer'],
|
exports: ['handler', 'startServer'],
|
||||||
args: options,
|
args: options,
|
||||||
supportedFeatures: {
|
supportedFeatures: {
|
||||||
functionPerPage: 'Stable',
|
|
||||||
edgeMiddleware: 'Stable',
|
|
||||||
hybridOutput: 'Stable',
|
hybridOutput: 'Stable',
|
||||||
staticOutput: 'Stable',
|
staticOutput: 'Stable',
|
||||||
serverOutput: 'Stable',
|
serverOutput: 'Stable',
|
||||||
assets: 'Experimental',
|
assets: {
|
||||||
|
supportKind: 'Stable',
|
||||||
|
isNodeCompatible: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,12 +35,13 @@ function getAdapter(): AstroAdapter {
|
||||||
serverEntrypoint: `${PACKAGE_NAME}/entrypoint`,
|
serverEntrypoint: `${PACKAGE_NAME}/entrypoint`,
|
||||||
exports: ['default'],
|
exports: ['default'],
|
||||||
supportedFeatures: {
|
supportedFeatures: {
|
||||||
functionPerPage: 'Experimental',
|
|
||||||
edgeMiddleware: 'Experimental',
|
|
||||||
hybridOutput: 'Stable',
|
hybridOutput: 'Stable',
|
||||||
staticOutput: 'Stable',
|
staticOutput: 'Stable',
|
||||||
serverOutput: 'Stable',
|
serverOutput: 'Stable',
|
||||||
assets: 'Stable',
|
assets: {
|
||||||
|
supportKind: 'Unsupported',
|
||||||
|
isNodeCompatible: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue