From 6fafb3d15d75209bce5f2d1f3a627f3e05123fb9 Mon Sep 17 00:00:00 2001 From: lilnasy Date: Fri, 11 Aug 2023 14:11:56 +0000 Subject: [PATCH] [ci] format --- .../integrations/netlify/builders-types.d.ts | 16 ++++++++-------- .../netlify/src/netlify-functions.ts | 8 ++++++-- .../netlify/test/functions/builders.test.js | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/integrations/netlify/builders-types.d.ts b/packages/integrations/netlify/builders-types.d.ts index 85a1374d4..7c778be4f 100644 --- a/packages/integrations/netlify/builders-types.d.ts +++ b/packages/integrations/netlify/builders-types.d.ts @@ -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 - } -} \ No newline at end of file + 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; + }; +} diff --git a/packages/integrations/netlify/src/netlify-functions.ts b/packages/integrations/netlify/src/netlify-functions.ts index 459c6b9b9..c45c1b9ef 100644 --- a/packages/integrations/netlify/src/netlify-functions.ts +++ b/packages/integrations/netlify/src/netlify-functions.ts @@ -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()); diff --git a/packages/integrations/netlify/test/functions/builders.test.js b/packages/integrations/netlify/test/functions/builders.test.js index 5043b0ce0..d47af92c0 100644 --- a/packages/integrations/netlify/test/functions/builders.test.js +++ b/packages/integrations/netlify/test/functions/builders.test.js @@ -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()],