summaryrefslogtreecommitdiff
path: root/packages/integrations/netlify/src
diff options
context:
space:
mode:
authorGravatar Alexander Niebuhr <alexander@nbhr.io> 2024-09-16 19:31:49 +0200
committerGravatar GitHub <noreply@github.com> 2024-09-16 13:31:49 -0400
commitd9619eef3a62c841b9408d23032dd19e8caaed60 (patch)
treed0f0617ef03f9775669a69b21bcef3c55363c781 /packages/integrations/netlify/src
parent132b66147faf50dffe977224786f04a16e75b9e7 (diff)
downloadastro-d9619eef3a62c841b9408d23032dd19e8caaed60.tar.gz
astro-d9619eef3a62c841b9408d23032dd19e8caaed60.tar.zst
astro-d9619eef3a62c841b9408d23032dd19e8caaed60.zip
Adapter related changes for IntegrationData (#377)
* chore: port adapter related changes from astro #11864 * chore: bump version * chore: bump * fix: types * fix * fix: tests * fix: locals * Update expected image endpoint --------- Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Diffstat (limited to 'packages/integrations/netlify/src')
-rw-r--r--packages/integrations/netlify/src/index.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/integrations/netlify/src/index.ts b/packages/integrations/netlify/src/index.ts
index 061a8b2e9..9b7208f1c 100644
--- a/packages/integrations/netlify/src/index.ts
+++ b/packages/integrations/netlify/src/index.ts
@@ -10,7 +10,7 @@ import type {
AstroIntegration,
AstroIntegrationLogger,
HookParameters,
- RouteData,
+ IntegrationRouteData,
} from 'astro';
import { build } from 'esbuild';
import { copyDependenciesToFunction } from './lib/nft.js';
@@ -26,7 +26,7 @@ export interface NetlifyLocals {
};
}
-const isStaticRedirect = (route: RouteData) =>
+const isStaticRedirect = (route: IntegrationRouteData) =>
route.type === 'redirect' && (route.redirect || route.redirectRoute);
type RemotePattern = AstroConfig['image']['remotePatterns'][number];
@@ -212,7 +212,7 @@ export default function netlifyIntegration(
emptyDir(ssrBuildDir()),
]);
- async function writeRedirects(routes: RouteData[], dir: URL) {
+ async function writeRedirects(routes: IntegrationRouteData[], dir: URL) {
const fallback = finalBuildOutput === 'static' ? '/.netlify/static' : '/.netlify/functions/ssr';
const redirects = createRedirectsFromAstroRoutes({
config: _config,