From 676d79cc2597718cec6b0046226279dcc63d7105 Mon Sep 17 00:00:00 2001 From: Yuanlin Lin Date: Wed, 20 Dec 2023 12:31:18 +0800 Subject: [PATCH 1/2] fix(zeabur): Add `zeabur` to `autodetectableProviders` --- src/presets/index.ts | 2 +- src/presets/zeabur.ts | 12 ++++++++++++ src/utils/index.ts | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/presets/index.ts b/src/presets/index.ts index 89345ad910..7403663e3a 100644 --- a/src/presets/index.ts +++ b/src/presets/index.ts @@ -31,4 +31,4 @@ export { iis, iisHandler, iisNode } from "./iis"; export { _static as static } from "./static"; export { githubPages } from "./github-pages"; export { winterjs } from "./winterjs"; -export { zeabur } from "./zeabur"; +export { zeabur, zeaburStatic } from "./zeabur"; diff --git a/src/presets/zeabur.ts b/src/presets/zeabur.ts index 9b237ef68b..9257a75e4a 100644 --- a/src/presets/zeabur.ts +++ b/src/presets/zeabur.ts @@ -47,3 +47,15 @@ export const zeabur = defineNitroPreset({ }, }, }); + + +export const zeaburStatic = defineNitroPreset({ + extends: "static", + output: { + dir: "{{ rootDir }}/.zeabur/output", + publicDir: "{{ output.dir }}/static", + }, + commands: { + preview: "npx serve ./static", + } +}); diff --git a/src/utils/index.ts b/src/utils/index.ts index 07105cd54b..050186ae4a 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -111,6 +111,7 @@ const autodetectableProviders: Partial< stormkit: "stormkit", vercel: "vercel", cleavr: "cleavr", + zeabur: "zeabur", }; const autodetectableStaticProviders: Partial< @@ -119,6 +120,7 @@ const autodetectableStaticProviders: Partial< netlify: "netlify-static", vercel: "vercel-static", cloudflare_pages: "cloudflare-pages-static", + zeabur: "zeabur-static", }; export function detectTarget(options: { static?: boolean } = {}) { From c201bc013b5383a5efe2aca7ee61cc01ba87ef12 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 04:35:03 +0000 Subject: [PATCH 2/2] chore: apply automated fixes --- src/presets/zeabur.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/presets/zeabur.ts b/src/presets/zeabur.ts index 9257a75e4a..7232a48ebc 100644 --- a/src/presets/zeabur.ts +++ b/src/presets/zeabur.ts @@ -48,7 +48,6 @@ export const zeabur = defineNitroPreset({ }, }); - export const zeaburStatic = defineNitroPreset({ extends: "static", output: { @@ -57,5 +56,5 @@ export const zeaburStatic = defineNitroPreset({ }, commands: { preview: "npx serve ./static", - } + }, });