From aa88745ad17816db225729edc005669e123c5f25 Mon Sep 17 00:00:00 2001 From: Luke Schlangen Date: Thu, 7 Mar 2024 20:12:31 -0600 Subject: [PATCH 1/7] feat: add cloud run to auto adapter --- packages/adapter-auto/adapters.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/adapter-auto/adapters.js b/packages/adapter-auto/adapters.js index 07a996ff7168..8b757c4e4137 100644 --- a/packages/adapter-auto/adapters.js +++ b/packages/adapter-auto/adapters.js @@ -30,5 +30,11 @@ export const adapters = [ test: () => !!process.env.SST, module: 'svelte-kit-sst', version: '2' + }, + { + name: 'Google Cloud Run', + test: () => process.env.CLOUD_RUN_TIMEOUT_SECONDS, + module: '@sveltejs/adapter-node', + version: '4' } ]; From dabc39b8ce45d1ef5886603f4eae73d2cad2293f Mon Sep 17 00:00:00 2001 From: Luke Schlangen Date: Fri, 8 Mar 2024 05:20:21 -0600 Subject: [PATCH 2/7] feat: add node adapter to adapter-auto --- packages/adapter-auto/adapters.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/adapter-auto/adapters.js b/packages/adapter-auto/adapters.js index 8b757c4e4137..29f8599b2874 100644 --- a/packages/adapter-auto/adapters.js +++ b/packages/adapter-auto/adapters.js @@ -31,9 +31,10 @@ export const adapters = [ module: 'svelte-kit-sst', version: '2' }, + // Add Node last since it might be present in other environments { - name: 'Google Cloud Run', - test: () => process.env.CLOUD_RUN_TIMEOUT_SECONDS, + name: 'Node', + test: () => !!process.env.NODE_ENV, module: '@sveltejs/adapter-node', version: '4' } From ec857ec5ec0c0d490a558bce1fc8f24494f6945f Mon Sep 17 00:00:00 2001 From: Luke Schlangen Date: Thu, 21 Mar 2024 14:20:39 -0500 Subject: [PATCH 3/7] add GCP_BUILDPACKS environment variable test --- packages/adapter-auto/adapters.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/adapter-auto/adapters.js b/packages/adapter-auto/adapters.js index 29f8599b2874..c51db85b31be 100644 --- a/packages/adapter-auto/adapters.js +++ b/packages/adapter-auto/adapters.js @@ -31,11 +31,10 @@ export const adapters = [ module: 'svelte-kit-sst', version: '2' }, - // Add Node last since it might be present in other environments { - name: 'Node', - test: () => !!process.env.NODE_ENV, + name: 'Google Cloud Buildpacks', + test: () => !!process.env.GCP_BUILDPACKS, module: '@sveltejs/adapter-node', - version: '4' + version: '5' } ]; From 6a8e6b9016198ccc3a9fb3141e649e26b12ba9d6 Mon Sep 17 00:00:00 2001 From: Luke Schlangen Date: Thu, 21 Mar 2024 14:34:42 -0500 Subject: [PATCH 4/7] docs: add adapter-node for Google Cloud Run to list of adapters --- documentation/docs/25-build-and-deploy/30-adapter-auto.md | 1 + packages/adapter-auto/adapters.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation/docs/25-build-and-deploy/30-adapter-auto.md b/documentation/docs/25-build-and-deploy/30-adapter-auto.md index 78f3ab5225f4..9c94b40e5cc2 100644 --- a/documentation/docs/25-build-and-deploy/30-adapter-auto.md +++ b/documentation/docs/25-build-and-deploy/30-adapter-auto.md @@ -9,6 +9,7 @@ When you create a new SvelteKit project with `npm create svelte@latest`, it inst - [`@sveltejs/adapter-vercel`](adapter-vercel) for [Vercel](https://vercel.com/) - [`svelte-adapter-azure-swa`](https://github.com/geoffrich/svelte-adapter-azure-swa) for [Azure Static Web Apps](https://docs.microsoft.com/en-us/azure/static-web-apps/) - [`svelte-kit-sst`](https://github.com/sst/sst/tree/master/packages/svelte-kit-sst) for [AWS via SST](https://docs.sst.dev/start/svelte) +- [`@sveltejs/adapter-node`](https://kit.svelte.dev/docs/adapter-node) for [Google Cloud Run](https://cloud.google.com/run) It's recommended to install the appropriate adapter to your `devDependencies` once you've settled on a target environment, since this will add the adapter to your lockfile and slightly improve install times on CI. diff --git a/packages/adapter-auto/adapters.js b/packages/adapter-auto/adapters.js index c51db85b31be..040876900506 100644 --- a/packages/adapter-auto/adapters.js +++ b/packages/adapter-auto/adapters.js @@ -32,7 +32,7 @@ export const adapters = [ version: '2' }, { - name: 'Google Cloud Buildpacks', + name: 'Google Cloud Run', test: () => !!process.env.GCP_BUILDPACKS, module: '@sveltejs/adapter-node', version: '5' From 73d8ddd5d74eaa2dcc37bfe085504469889cbcc7 Mon Sep 17 00:00:00 2001 From: Luke Schlangen Date: Fri, 22 Mar 2024 08:56:15 -0500 Subject: [PATCH 5/7] chore: add changeset --- .changeset/young-dolls-exist.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/young-dolls-exist.md diff --git a/.changeset/young-dolls-exist.md b/.changeset/young-dolls-exist.md new file mode 100644 index 000000000000..add694d4dc10 --- /dev/null +++ b/.changeset/young-dolls-exist.md @@ -0,0 +1,5 @@ +--- +"@sveltejs/adapter-auto": minor +--- + +add Google Cloud Run to adapter-auto From a149faeb88dd3c11bf05d3244f8c1b47c6ee5a71 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Mon, 25 Mar 2024 22:19:02 +0800 Subject: [PATCH 6/7] Update young-dolls-exist.md --- .changeset/young-dolls-exist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/young-dolls-exist.md b/.changeset/young-dolls-exist.md index add694d4dc10..4b29ee3e30ff 100644 --- a/.changeset/young-dolls-exist.md +++ b/.changeset/young-dolls-exist.md @@ -2,4 +2,4 @@ "@sveltejs/adapter-auto": minor --- -add Google Cloud Run to adapter-auto +feat: add support for Google Cloud Run to adapter-auto From bc2bc17a125fff8d06136f0a7ef45e5051ad3fd7 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Mon, 25 Mar 2024 22:20:05 +0800 Subject: [PATCH 7/7] Update young-dolls-exist.md --- .changeset/young-dolls-exist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/young-dolls-exist.md b/.changeset/young-dolls-exist.md index 4b29ee3e30ff..2a13d0b8cc46 100644 --- a/.changeset/young-dolls-exist.md +++ b/.changeset/young-dolls-exist.md @@ -2,4 +2,4 @@ "@sveltejs/adapter-auto": minor --- -feat: add support for Google Cloud Run to adapter-auto +feat: add support for Google Cloud Run