From 3dd888f470fd06bb9ca2c679cfdca9e845dd8816 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Sat, 16 Dec 2023 15:32:57 -0500 Subject: [PATCH] patch adapters clean up --- ...eenwood+plugin-adapter-vercel+0.29.0.patch | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/patches/@greenwood+plugin-adapter-vercel+0.29.0.patch b/patches/@greenwood+plugin-adapter-vercel+0.29.0.patch index c21b033..09a9a2a 100644 --- a/patches/@greenwood+plugin-adapter-vercel+0.29.0.patch +++ b/patches/@greenwood+plugin-adapter-vercel+0.29.0.patch @@ -1,8 +1,16 @@ diff --git a/node_modules/@greenwood/plugin-adapter-vercel/src/index.js b/node_modules/@greenwood/plugin-adapter-vercel/src/index.js -index 77602ae..cb59799 100644 +index 77602ae..5250fbf 100644 --- a/node_modules/@greenwood/plugin-adapter-vercel/src/index.js +++ b/node_modules/@greenwood/plugin-adapter-vercel/src/index.js -@@ -103,32 +103,6 @@ async function vercelAdapter(compilation) { +@@ -83,7 +83,6 @@ async function vercelAdapter(compilation) { + })); + + const files = await fs.readdir(outputDir); +- const isExecuteRouteModule = files.find(file => file.startsWith('execute-route-module')); + + for (const page of ssrPages) { + const outputType = 'page'; +@@ -103,32 +102,6 @@ async function vercelAdapter(compilation) { new URL(`./__${id}.js`, outputRoot), { recursive: true } ); @@ -35,7 +43,7 @@ index 77602ae..cb59799 100644 } for (const [key] of apiRoutes) { -@@ -138,32 +112,11 @@ async function vercelAdapter(compilation) { +@@ -138,22 +111,13 @@ async function vercelAdapter(compilation) { await setupFunctionBuildFolder(id, outputType, outputRoot); @@ -46,7 +54,7 @@ index 77602ae..cb59799 100644 new URL(`./${id}.js`, outputRoot), { recursive: true } ); -- + - if (await checkResourceExists(new URL('./api/assets/', outputDir))) { - await fs.cp( - new URL('./api/assets/', outputDir), @@ -55,16 +63,7 @@ index 77602ae..cb59799 100644 - ); - } - -- const ssrApiAssets = (await fs.readdir(new URL('./api/', outputDir))) -- .filter(file => new RegExp(/^[\w][\w-]*\.[a-zA-Z0-9]{4,20}\.[\w]{2,4}$/).test(path.basename(file))); -- -- for (const asset of ssrApiAssets) { -- await fs.cp( -- new URL(`./${asset}`, new URL('./api/', outputDir)), -- new URL(`./${asset}`, outputRoot), -- { recursive: true } -- ); -- } - } ++ // need this for URL referenced chunks + const ssrApiAssets = (await fs.readdir(new URL('./api/', outputDir))) + .filter(file => new RegExp(/^[\w][\w-]*\.[a-zA-Z0-9]{4,20}\.[\w]{2,4}$/).test(path.basename(file))); - // static assets / build