From ba428d04452c5f48c35112d6a1174204e6632ef0 Mon Sep 17 00:00:00 2001 From: Aggre Date: Fri, 13 Dec 2024 13:48:23 +0900 Subject: [PATCH 1/8] create vercel.json to set timeout for AchievementsSBT --- vercel.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..7a70d0db --- /dev/null +++ b/vercel.json @@ -0,0 +1,7 @@ +{ + "functions": { + "api/send-transactions/AchievementsSBT/*": { + "maxDuration": 300 + } + } +} From 3f2aaeacbc386dc63b25c76e49672610c119886c Mon Sep 17 00:00:00 2001 From: Aggre Date: Fri, 13 Dec 2024 13:50:07 +0900 Subject: [PATCH 2/8] fix the wrong path --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 7a70d0db..8b1b8cab 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,6 @@ { "functions": { - "api/send-transactions/AchievementsSBT/*": { + "src/pages/api/send-transactions/AchievementsSBT/*": { "maxDuration": 300 } } From 2f0da559cd2787aad3ae085a38f6a12bcc36cab1 Mon Sep 17 00:00:00 2001 From: Shubham Kukreti <57281769+KukretiShubham@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:32:23 +0530 Subject: [PATCH 3/8] allowed vercel function pattern --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 8b1b8cab..57f3ffab 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,6 @@ { "functions": { - "src/pages/api/send-transactions/AchievementsSBT/*": { + "src/pages/api/send-transactions/**/*.ts": { "maxDuration": 300 } } From 3bd548486adca1113d0efa5ed87b22c7346b36c2 Mon Sep 17 00:00:00 2001 From: Shubham Kukreti <57281769+KukretiShubham@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:39:36 +0530 Subject: [PATCH 4/8] updated path --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 57f3ffab..548cec05 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,6 @@ { "functions": { - "src/pages/api/send-transactions/**/*.ts": { + "pages/api/send-transactions/**/*.ts": { "maxDuration": 300 } } From 48e637d080dca93ff517a229e7c6d8a42568ab96 Mon Sep 17 00:00:00 2001 From: Shubham Kukreti <57281769+KukretiShubham@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:51:13 +0530 Subject: [PATCH 5/8] updated path --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 548cec05..fcf96775 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,6 @@ { "functions": { - "pages/api/send-transactions/**/*.ts": { + "api/send-transactions/**/*.ts": { "maxDuration": 300 } } From b8df4242b599a7b94bfde84d2c2e319b054ebcc3 Mon Sep 17 00:00:00 2001 From: Shubham Kukreti <57281769+KukretiShubham@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:55:52 +0530 Subject: [PATCH 6/8] bring api/ to root --- .../api => api}/send-transactions/AchievementsSBT/[contract].ts | 0 {src/pages/api => api}/send-transactions/AchievementsSBT/abi.ts | 0 .../api => api}/send-transactions/SwapTokensAndStakeDev/abi.ts | 0 .../api => api}/send-transactions/SwapTokensAndStakeDev/index.ts | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {src/pages/api => api}/send-transactions/AchievementsSBT/[contract].ts (100%) rename {src/pages/api => api}/send-transactions/AchievementsSBT/abi.ts (100%) rename {src/pages/api => api}/send-transactions/SwapTokensAndStakeDev/abi.ts (100%) rename {src/pages/api => api}/send-transactions/SwapTokensAndStakeDev/index.ts (100%) diff --git a/src/pages/api/send-transactions/AchievementsSBT/[contract].ts b/api/send-transactions/AchievementsSBT/[contract].ts similarity index 100% rename from src/pages/api/send-transactions/AchievementsSBT/[contract].ts rename to api/send-transactions/AchievementsSBT/[contract].ts diff --git a/src/pages/api/send-transactions/AchievementsSBT/abi.ts b/api/send-transactions/AchievementsSBT/abi.ts similarity index 100% rename from src/pages/api/send-transactions/AchievementsSBT/abi.ts rename to api/send-transactions/AchievementsSBT/abi.ts diff --git a/src/pages/api/send-transactions/SwapTokensAndStakeDev/abi.ts b/api/send-transactions/SwapTokensAndStakeDev/abi.ts similarity index 100% rename from src/pages/api/send-transactions/SwapTokensAndStakeDev/abi.ts rename to api/send-transactions/SwapTokensAndStakeDev/abi.ts diff --git a/src/pages/api/send-transactions/SwapTokensAndStakeDev/index.ts b/api/send-transactions/SwapTokensAndStakeDev/index.ts similarity index 100% rename from src/pages/api/send-transactions/SwapTokensAndStakeDev/index.ts rename to api/send-transactions/SwapTokensAndStakeDev/index.ts From 0fbb21b9d772a4f44f9099c440f63d69db5b37f2 Mon Sep 17 00:00:00 2001 From: Aggre Date: Fri, 13 Dec 2024 14:29:14 +0900 Subject: [PATCH 7/8] using astro config --- astro.config.mjs | 5 ++++- vercel.json | 7 ------- 2 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 vercel.json diff --git a/astro.config.mjs b/astro.config.mjs index 3eebe7ef..c378b01f 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,6 +2,7 @@ import { config } from 'dotenv' import { defineConfig } from 'astro/config' import vercel from '@astrojs/vercel/serverless' +// eslint-disable-next-line functional/no-expression-statements config() export default defineConfig({ @@ -9,5 +10,7 @@ export default defineConfig({ port: 3000, }, output: 'server', - adapter: vercel(), + adapter: vercel({ + maxDuration: 300, + }), }) diff --git a/vercel.json b/vercel.json deleted file mode 100644 index 8b1b8cab..00000000 --- a/vercel.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "functions": { - "src/pages/api/send-transactions/AchievementsSBT/*": { - "maxDuration": 300 - } - } -} From 3374282877b8cfebea7c801757b7f3bfb7bc5603 Mon Sep 17 00:00:00 2001 From: Aggre Date: Fri, 13 Dec 2024 14:32:56 +0900 Subject: [PATCH 8/8] Revert "using astro config" This reverts commit 0fbb21b9d772a4f44f9099c440f63d69db5b37f2. --- astro.config.mjs | 5 +---- vercel.json | 7 +++++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 vercel.json diff --git a/astro.config.mjs b/astro.config.mjs index c378b01f..3eebe7ef 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,7 +2,6 @@ import { config } from 'dotenv' import { defineConfig } from 'astro/config' import vercel from '@astrojs/vercel/serverless' -// eslint-disable-next-line functional/no-expression-statements config() export default defineConfig({ @@ -10,7 +9,5 @@ export default defineConfig({ port: 3000, }, output: 'server', - adapter: vercel({ - maxDuration: 300, - }), + adapter: vercel(), }) diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..8b1b8cab --- /dev/null +++ b/vercel.json @@ -0,0 +1,7 @@ +{ + "functions": { + "src/pages/api/send-transactions/AchievementsSBT/*": { + "maxDuration": 300 + } + } +}