diff --git a/api/jsonify.js b/api/jsonify.js deleted file mode 100644 index f952d686..00000000 --- a/api/jsonify.js +++ /dev/null @@ -1,38 +0,0 @@ -// api/convert.js -import { Editor } from '@tiptap/core' -import { base, custom } from 'src/lib/editorOptions' - -// Добавьте другие расширения при необходимости - -export default function handler(req, res) { - // Разрешаем только метод POST - if (req.method !== 'POST') { - res.status(405).json({ error: 'Method not allowed' }) - return - } - - // Получаем HTML из тела запроса - const { html } = req.body - - if (!html) { - res.status(400).json({ error: 'No HTML content provided' }) - return - } - - try { - const editor = new Editor({ extensions: [...base, ...custom] }) - - editor.commands.setContent(html, false, { - parseOptions: { - preserveWhitespace: 'full' - } - }) - - const jsonOutput = editor.getJSON() - - res.status(200).json(jsonOutput) - } catch (error) { - console.error('Ошибка при конвертации:', error) - res.status(500).json({ error: 'Internal Server Error' }) - } -} diff --git a/biome.json b/biome.json index 7d8cf99f..38b8b97e 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.9.0/schema.json", + "$schema": "https://biomejs.dev/schemas/1.9.1/schema.json", "files": { "include": ["*.tsx", "*.ts", "*.js", "*.json"], "ignore": ["./dist", "./node_modules", ".husky", "docs", "gen", "*.gen.ts", "*.d.ts"] diff --git a/package.json b/package.json index 2eb3dc14..d700def2 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "prosemirror-trailing-node": "^2.0.9", "prosemirror-view": "^1.34.2", "rollup-plugin-visualizer": "^5.12.0", - "sass": "1.76.0", + "sass": "^1.78.0", "solid-js": "^1.8.22", "solid-popper": "^0.3.0", "solid-tiptap": "^0.7.0", @@ -145,6 +145,7 @@ }, "trustedDependencies": ["@biomejs/biome", "esbuild", "protobufjs"], "dependencies": { + "@vercel/functions": "^1.4.1", "form-data": "^4.0.0", "idb": "^8.0.0", "mailgun.js": "^10.2.3"