From b89bee365227a57e177ac5080a6d07e3ddfbe737 Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Sat, 23 Nov 2024 02:04:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Fix=20vercel=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/commit-msg | 1 + .husky/pre-commit | 1 + api/edge-speech.ts | 4 ++-- api/microsoft-speech.ts | 7 +++++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index 6ef9628..7878d79 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,2 +1,3 @@ +#!/usr/bin/env sh npx --no -- commitlint --edit ${1} diff --git a/.husky/pre-commit b/.husky/pre-commit index e5f7d54..7e617c2 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1,3 @@ +#!/usr/bin/env sh npx --no-install lint-staged diff --git a/api/edge-speech.ts b/api/edge-speech.ts index 8751336..cb3f48c 100644 --- a/api/edge-speech.ts +++ b/api/edge-speech.ts @@ -1,5 +1,5 @@ import cors from '../lib/cors'; -import { EdgeSpeechPayload, EdgeSpeechTTS } from '../src/core'; +import { EdgeSpeechPayload, createEdgeSpeech } from '../src/core/EdgeSpeechTTS/createEdgeSpeech'; export const config = { runtime: 'edge', @@ -9,7 +9,7 @@ export default async (req: Request) => { if (req.method !== 'POST') return new Response('Method Not Allowed', { status: 405 }); const payload = (await req.json()) as EdgeSpeechPayload; - const res = await EdgeSpeechTTS.createRequest({ payload }); + const res = await createEdgeSpeech({ payload }); return cors(req, res); }; diff --git a/api/microsoft-speech.ts b/api/microsoft-speech.ts index 4f3d2a1..3f3e893 100644 --- a/api/microsoft-speech.ts +++ b/api/microsoft-speech.ts @@ -1,5 +1,8 @@ import cors from '../lib/cors'; -import { MicrosoftSpeechPayload, MicrosoftSpeechTTS } from '../src/core'; +import { + MicrosoftSpeechPayload, + createMicrosoftSpeech, +} from '../src/core/MicrosoftSpeechTTS/createMicrosoftSpeech'; export const config = { runtime: 'edge', @@ -9,7 +12,7 @@ export default async (req: Request) => { if (req.method !== 'POST') return new Response('Method Not Allowed', { status: 405 }); const payload = (await req.json()) as MicrosoftSpeechPayload; - const res = await MicrosoftSpeechTTS.createRequest({ payload }); + const res = await createMicrosoftSpeech({ payload }); return cors(req, res); };