diff options
author | 2025-02-07 08:59:05 +0000 | |
---|---|---|
committer | 2025-02-07 08:59:05 +0000 | |
commit | 9b8042a1ed2068c398d77a73503b82d3e68424d1 (patch) | |
tree | 960627bc09d455e04fcf75b11d0452349b35e6d4 /packages/integrations/cloudflare/src/utils/generate-routes-json.ts | |
parent | a7776b8036155143ca99790233800667dc1b6abc (diff) | |
download | astro-9b8042a1ed2068c398d77a73503b82d3e68424d1.tar.gz astro-9b8042a1ed2068c398d77a73503b82d3e68424d1.tar.zst astro-9b8042a1ed2068c398d77a73503b82d3e68424d1.zip |
chore: move cloudflare adapter to core monorepo
Diffstat (limited to 'packages/integrations/cloudflare/src/utils/generate-routes-json.ts')
-rw-r--r-- | packages/integrations/cloudflare/src/utils/generate-routes-json.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/integrations/cloudflare/src/utils/generate-routes-json.ts b/packages/integrations/cloudflare/src/utils/generate-routes-json.ts index 8828fd52f..f12782b7b 100644 --- a/packages/integrations/cloudflare/src/utils/generate-routes-json.ts +++ b/packages/integrations/cloudflare/src/utils/generate-routes-json.ts @@ -47,7 +47,7 @@ async function writeRoutesFileToOutDir( _config: AstroConfig, logger: AstroIntegrationLogger, include: string[], - exclude: string[] + exclude: string[], ) { try { await writeFile( @@ -59,9 +59,9 @@ async function writeRoutesFileToOutDir( exclude: exclude, }, null, - 2 + 2, ), - 'utf-8' + 'utf-8', ); } catch (error) { logger.error("There was an error writing the '_routes.json' file to the output directory."); @@ -182,7 +182,7 @@ export async function createRoutesFile( | { pattern: string; }[] - | undefined + | undefined, ) { const includePaths: string[][] = []; const excludePaths: string[][] = []; @@ -197,7 +197,7 @@ export async function createRoutesFile( [{ content: _config.build.assets, dynamic: false, spread: false }], [{ content: '', dynamic: true, spread: false }], ], - _config + _config, ); excludePaths.push(assetsPath); @@ -328,9 +328,9 @@ export async function createRoutesFile( CLOUDFLARE_COMBINED_LIMIT - EXTENDED_INCLUDE_RULES_COUNT - EXTENDED_EXCLUDE_RULES_COUNT - - 1 + 1, ) - .concat(excludeExtends?.map((entry) => entry.pattern) ?? []) + .concat(excludeExtends?.map((entry) => entry.pattern) ?? []), ); } else { await writeRoutesFileToOutDir( @@ -343,7 +343,7 @@ export async function createRoutesFile( ? deduplicatedExcludePaths .map((path) => `${prependForwardSlash(path.join('/'))}`) .concat(excludeExtends?.map((entry) => entry.pattern) ?? []) - : [] + : [], ); } } |