summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar lilnasy <lilnasy@users.noreply.github.com> 2023-08-11 14:11:56 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-08-11 14:11:56 +0000
commit6fafb3d15d75209bce5f2d1f3a627f3e05123fb9 (patch)
tree56ae11dad74e661af0cd12bf9f3c16bb2bbf661d
parentf974c95a27ccbf91adbc66f6f1433f4cf11be33e (diff)
downloadastro-6fafb3d15d75209bce5f2d1f3a627f3e05123fb9.tar.gz
astro-6fafb3d15d75209bce5f2d1f3a627f3e05123fb9.tar.zst
astro-6fafb3d15d75209bce5f2d1f3a627f3e05123fb9.zip
[ci] format
-rw-r--r--packages/integrations/netlify/builders-types.d.ts16
-rw-r--r--packages/integrations/netlify/src/netlify-functions.ts8
-rw-r--r--packages/integrations/netlify/test/functions/builders.test.js2
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()],