mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
f974c95a27
commit
6fafb3d15d
3 changed files with 15 additions and 11 deletions
|
@ -1,9 +1,9 @@
|
|||
interface NetlifyLocals {
|
||||
runtime: {
|
||||
/**
|
||||
* On-demand Builders support an optional time to live (TTL) pattern that allows you to set a fixed duration of time after which a cached builder response is invalidated. This allows you to force a refresh of a builder-generated response without a new deploy.
|
||||
* @param ttl time to live, in seconds
|
||||
*/
|
||||
setBuildersTtl(ttl: number): void
|
||||
}
|
||||
}
|
||||
runtime: {
|
||||
/**
|
||||
* On-demand Builders support an optional time to live (TTL) pattern that allows you to set a fixed duration of time after which a cached builder response is invalidated. This allows you to force a refresh of a builder-generated response without a new deploy.
|
||||
* @param ttl time to live, in seconds
|
||||
*/
|
||||
setBuildersTtl(ttl: number): void;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -87,8 +87,12 @@ export const createExports = (manifest: SSRManifest, args: Args) => {
|
|||
let responseTtl = undefined;
|
||||
|
||||
locals.runtime = builders
|
||||
? { setBuildersTtl(ttl: number) { responseTtl = ttl } }
|
||||
: {}
|
||||
? {
|
||||
setBuildersTtl(ttl: number) {
|
||||
responseTtl = ttl;
|
||||
},
|
||||
}
|
||||
: {};
|
||||
|
||||
const response: Response = await app.render(request, routeData, locals);
|
||||
const responseHeaders = Object.fromEntries(response.headers.entries());
|
||||
|
|
|
@ -12,7 +12,7 @@ describe('Builders', () => {
|
|||
output: 'server',
|
||||
adapter: netlifyAdapter({
|
||||
dist: new URL('./fixtures/builders/dist/', import.meta.url),
|
||||
builders: true
|
||||
builders: true,
|
||||
}),
|
||||
site: `http://example.com`,
|
||||
integrations: [testIntegration()],
|
||||
|
|
Loading…
Reference in a new issue