chore: ⬆️ Upgrade dependencies

This commit is contained in:
Jesse Wierzbinski 2025-11-21 08:31:02 +01:00
parent f260064083
commit f00ac1a590
No known key found for this signature in database
173 changed files with 665 additions and 752 deletions

2
api.ts
View file

@ -2,7 +2,7 @@ import process from "node:process";
import { appFactory } from "@versia-server/api"; import { appFactory } from "@versia-server/api";
import { config } from "@versia-server/config"; import { config } from "@versia-server/config";
import { Youch } from "youch"; import { Youch } from "youch";
import { createServer } from "@/server"; import { createServer } from "@/server.ts";
process.on("SIGINT", () => { process.on("SIGINT", () => {
process.exit(); process.exit();

View file

@ -5,7 +5,7 @@ import {
getTestUsers, getTestUsers,
} from "@versia-server/tests"; } from "@versia-server/tests";
import { bench, run } from "mitata"; import { bench, run } from "mitata";
import type { z } from "zod/v4"; import type { z } from "zod";
const { users, tokens, deleteUsers } = await getTestUsers(5); const { users, tokens, deleteUsers } = await getTestUsers(5);
await getTestStatuses(40, users[0]); await getTestStatuses(40, users[0]);

View file

@ -1,5 +1,5 @@
{ {
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json", "$schema": "https://biomejs.dev/schemas/2.3.4/schema.json",
"assist": { "assist": {
"actions": { "actions": {
"source": { "source": {
@ -119,23 +119,11 @@
"noUnusedPrivateClassMembers": "error" "noUnusedPrivateClassMembers": "error"
}, },
"nursery": { "nursery": {
"noBitwiseOperators": "error", "noFloatingPromises": "error"
"noConstantBinaryExpression": "error",
"noFloatingPromises": "error",
"noGlobalDirnameFilename": "error",
"noProcessGlobal": "warn",
"noTsIgnore": "warn",
"useReadonlyClassProperties": "error",
"useConsistentObjectDefinition": {
"level": "warn",
"options": {
"syntax": "shorthand"
}
},
"useParseIntRadix": "warn"
}, },
"complexity": { "complexity": {
"noForEach": "error", "noForEach": "error",
"noImportantStyles": "off",
"noUselessStringConcat": "error", "noUselessStringConcat": "error",
"useDateNow": "error", "useDateNow": "error",
"noUselessStringRaw": "warn", "noUselessStringRaw": "warn",

852
bun.lock

File diff suppressed because it is too large Load diff

View file

@ -16,7 +16,7 @@ describe("BlurhashPreprocessor", () => {
.png() .png()
.toBuffer(); .toBuffer();
const inputFile = new File([inputBuffer], "test.png", { const inputFile = new File([inputBuffer as BlobPart], "test.png", {
type: "image/png", type: "image/png",
}); });
const result = await calculateBlurhash(inputFile); const result = await calculateBlurhash(inputFile);
@ -46,7 +46,7 @@ describe("BlurhashPreprocessor", () => {
.png() .png()
.toBuffer(); .toBuffer();
const inputFile = new File([inputBuffer], "test.png", { const inputFile = new File([inputBuffer as BlobPart], "test.png", {
type: "image/png", type: "image/png",
}); });

View file

@ -15,7 +15,7 @@ describe("ImageConversionPreprocessor", () => {
.jpeg() .jpeg()
.toBuffer(); .toBuffer();
const inputFile = new File([inputBuffer], "test.jpg", { const inputFile = new File([inputBuffer as BlobPart], "test.jpg", {
type: "image/jpeg", type: "image/jpeg",
}); });
const result = await convertImage(inputFile, "image/webp"); const result = await convertImage(inputFile, "image/webp");
@ -74,7 +74,7 @@ describe("ImageConversionPreprocessor", () => {
.png() .png()
.toBuffer(); .toBuffer();
const inputFile = new File([inputBuffer], "test.png", { const inputFile = new File([inputBuffer as BlobPart], "test.png", {
type: "image/png", type: "image/png",
}); });
@ -96,7 +96,7 @@ describe("ImageConversionPreprocessor", () => {
.gif() .gif()
.toBuffer(); .toBuffer();
const inputFile = new File([inputBuffer], "animated.gif", { const inputFile = new File([inputBuffer as BlobPart], "animated.gif", {
type: "image/gif", type: "image/gif",
}); });
const result = await convertImage(inputFile, "image/webp"); const result = await convertImage(inputFile, "image/webp");
@ -122,7 +122,7 @@ describe("ImageConversionPreprocessor", () => {
.toBuffer(); .toBuffer();
const inputFile = new File( const inputFile = new File(
[inputBuffer], [inputBuffer as BlobPart],
"test image with spaces.png", "test image with spaces.png",
{ type: "image/png" }, { type: "image/png" },
); );

View file

@ -99,7 +99,7 @@ export const convertImage = async (
const convertedBuffer = await sharpCommand[commandName]().toBuffer(); const convertedBuffer = await sharpCommand[commandName]().toBuffer();
return new File( return new File(
[convertedBuffer], [convertedBuffer as BlobPart],
getReplacedFileName(file.name, commandName), getReplacedFileName(file.name, commandName),
{ {
type: targetFormat, type: targetFormat,

View file

@ -54,7 +54,7 @@ in
# Required else we get errors that our fixed-output derivation references store paths # Required else we get errors that our fixed-output derivation references store paths
dontFixup = true; dontFixup = true;
outputHash = "sha256-geahFpkyWgHXKMxLp46AJW3TVWFm6jM4QZO0Z10mBWY="; outputHash = "sha256-U1bCDAFWmA4kJw9LODdhP0bKIZ4pxAscS6aVLNV9lkI=";
outputHashAlgo = "sha256"; outputHashAlgo = "sha256";
outputHashMode = "recursive"; outputHashMode = "recursive";
}; };

View file

@ -20,99 +20,6 @@
"activitypub", "activitypub",
"bun" "bun"
], ],
"workspaces": {
"packages": [
"packages/*"
],
"catalog": {
"@biomejs/biome": "^2.0.6",
"@types/bun": "^1.2.18",
"@types/html-to-text": "^9.0.4",
"@types/markdown-it-container": "^2.0.10",
"@types/mime-types": "^3.0.1",
"@types/qs": "^6.14.0",
"@types/web-push": "^3.6.4",
"bun-bagel": "^1.2.0",
"drizzle-kit": "^0.31.4",
"mitt": "^3.0.1",
"markdown-it-image-figures": "^2.1.1",
"ts-prune": "^0.10.3",
"typescript": "^5.8.3",
"vitepress": "^1.6.3",
"vitepress-plugin-tabs": "^0.7.1",
"vitepress-sidebar": "^1.32.1",
"vue": "^3.5.17",
"@bull-board/api": "^6.11.0",
"@bull-board/hono": "^6.11.0",
"@clerc/plugin-completions": "^0.44.0",
"@clerc/plugin-friendly-error": "^0.44.0",
"@clerc/plugin-help": "^0.44.0",
"@clerc/plugin-not-found": "^0.44.0",
"@clerc/plugin-version": "^0.44.0",
"@hackmd/markdown-it-task-lists": "^2.1.4",
"@hono/standard-validator": "^0.1.2",
"@inquirer/confirm": "^5.1.13",
"@logtape/file": "^1.0.0",
"@logtape/logtape": "^1.0.0",
"@logtape/sentry": "^1.0.0",
"@logtape/otel": "^1.0.0",
"@scalar/hono-api-reference": "^0.9.7",
"@sentry/bun": "^9.35.0",
"openid-client": "^6.6.3",
"altcha-lib": "^1.3.0",
"blurhash": "^2.0.5",
"bullmq": "^5.56.1",
"chalk": "^5.4.1",
"clerc": "^0.44.0",
"confbox": "^0.2.2",
"drizzle-orm": "^0.44.2",
"feed": "^5.1.0",
"hono": "^4.8.4",
"hono-openapi": "npm:@cpluspatch/hono-openapi@0.5.1",
"hono-rate-limiter": "^0.4.2",
"html-to-text": "^9.0.5",
"ioredis": "^5.6.1",
"ip-matching": "^2.1.2",
"iso-639-1": "^3.1.5",
"linkify-html": "^4.3.1",
"linkify-string": "^4.3.1",
"linkifyjs": "^4.3.1",
"magic-regexp": "^0.10.0",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.2.0",
"markdown-it-container": "^4.0.0",
"markdown-it-mathjax3": "^4.3.2",
"markdown-it-toc-done-right": "^4.2.0",
"mime-types": "^3.0.1",
"mitata": "^1.0.34",
"ora": "^8.2.0",
"qs": "^6.14.0",
"sharp": "^0.34.2",
"sonic-channel": "^1.3.1",
"string-comparison": "^1.3.0",
"stringify-entities": "^4.0.4",
"unicode-emoji-json": "^0.8.0",
"uqr": "^0.1.2",
"web-push": "^3.6.7",
"xss": "^1.0.15",
"youch": "^4.1.0-beta.7",
"zod": "^3.25.74",
"zod-openapi": "^5.0.0",
"zod-validation-error": "^4.0.0-beta.1"
}
},
"maintainers": [
{
"email": "contact@cpluspatch.com",
"name": "Jesse Wierzbinski",
"url": "https://cpluspatch.com"
}
],
"repository": {
"type": "git",
"url": "git+https://github.com/versia-pub/server.git"
},
"private": true,
"scripts": { "scripts": {
"lint": "biome check .", "lint": "biome check .",
"cloc": "cloc . --exclude-dir node_modules,dist,.output,.nuxt,meta,logs --exclude-ext sql,log,pem", "cloc": "cloc . --exclude-dir node_modules,dist,.output,.nuxt,meta,logs --exclude-ext sql,log,pem",
@ -128,6 +35,99 @@
"dev": "bun run --hot api.ts", "dev": "bun run --hot api.ts",
"worker:dev": "bun run --hot worker.ts" "worker:dev": "bun run --hot worker.ts"
}, },
"workspaces": {
"packages": [
"packages/*"
],
"catalog": {
"@biomejs/biome": "2.3.4",
"@types/bun": "~1.2.18",
"@types/html-to-text": "~9.0.4",
"@types/markdown-it-container": "~2.0.10",
"@types/mime-types": "~3.0.1",
"@types/qs": "~6.14.0",
"@types/web-push": "~3.6.4",
"bun-bagel": "~1.2.0",
"drizzle-kit": "~0.31.7",
"mitt": "~3.0.1",
"markdown-it-image-figures": "~2.1.1",
"ts-prune": "~0.10.3",
"typescript": "~5.9.3",
"vitepress": "~1.6.4",
"vitepress-plugin-tabs": "~0.7.3",
"vitepress-sidebar": "~1.33.0",
"vue": "~3.5.24",
"@bull-board/api": "~6.14.2",
"@bull-board/hono": "~6.14.2",
"@clerc/plugin-completions": "~0.44.0",
"@clerc/plugin-friendly-error": "~0.44.0",
"@clerc/plugin-help": "~0.44.0",
"@clerc/plugin-not-found": "~0.44.0",
"@clerc/plugin-version": "~0.44.0",
"@hackmd/markdown-it-task-lists": "~2.1.4",
"@hono/standard-validator": "~0.2.0",
"@inquirer/confirm": "~6.0.1",
"@logtape/file": "~1.0.0",
"@logtape/logtape": "~1.0.0",
"@logtape/sentry": "~1.0.0",
"@logtape/otel": "~1.0.0",
"@scalar/hono-api-reference": "~0.9.25",
"@sentry/bun": "~10.26.0",
"openid-client": "~6.6.3",
"altcha-lib": "~1.3.0",
"blurhash": "~2.0.5",
"bullmq": "~5.64.1",
"chalk": "~5.6.2",
"clerc": "~0.44.0",
"confbox": "~0.2.2",
"drizzle-orm": "~0.44.7",
"feed": "~5.1.0",
"hono": "~4.10.6",
"hono-openapi": "~1.1.1",
"hono-rate-limiter": "~0.4.2",
"html-to-text": "~9.0.5",
"ioredis": "~5.8.2",
"ip-matching": "~2.1.2",
"iso-639-1": "~3.1.5",
"linkify-html": "~4.3.2",
"linkify-string": "~4.3.2",
"linkifyjs": "~4.3.2",
"magic-regexp": "~0.10.0",
"markdown-it": "~14.1.0",
"markdown-it-anchor": "~9.2.0",
"markdown-it-container": "~4.0.0",
"markdown-it-mathjax3": "~5.2.0",
"markdown-it-toc-done-right": "~4.2.0",
"mime-types": "~3.0.2",
"mitata": "~1.0.34",
"ora": "~9.0.0",
"qs": "~6.14.0",
"sharp": "~0.34.5",
"sonic-channel": "~1.3.1",
"string-comparison": "~1.3.0",
"stringify-entities": "~4.0.4",
"unicode-emoji-json": "~0.8.0",
"uqr": "~0.1.2",
"web-push": "~3.6.7",
"xss": "~1.0.15",
"youch": "~4.1.0-beta.13",
"zod": "~4.1.12",
"zod-openapi": "~5.4.3",
"zod-validation-error": "~5.0.0"
}
},
"maintainers": [
{
"email": "contact@cpluspatch.com",
"name": "Jesse Wierzbinski",
"url": "https://cpluspatch.com"
}
],
"repository": {
"type": "git",
"url": "git+https://github.com/versia-pub/server.git"
},
"private": true,
"trustedDependencies": [ "trustedDependencies": [
"@biomejs/biome", "@biomejs/biome",
"es5-ext", "es5-ext",

View file

@ -2,7 +2,7 @@ import type { ApiError } from "@versia-server/kit";
import { env } from "bun"; import { env } from "bun";
import type { MiddlewareHandler } from "hono"; import type { MiddlewareHandler } from "hono";
import { rateLimiter } from "hono-rate-limiter"; import { rateLimiter } from "hono-rate-limiter";
import type { z } from "zod/v4"; import type { z } from "zod";
import type { HonoEnv } from "~/types/api"; import type { HonoEnv } from "~/types/api";
// Not exported by hono-rate-limiter // Not exported by hono-rate-limiter

View file

@ -7,7 +7,7 @@ import {
withUserParam, withUserParam,
} from "@versia-server/kit/api"; } from "@versia-server/kit/api";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { getFeed } from "@/rss"; import { getFeed } from "@/rss";
export default apiRoute((app) => export default apiRoute((app) =>

View file

@ -7,7 +7,7 @@ import {
withUserParam, withUserParam,
} from "@versia-server/kit/api"; } from "@versia-server/kit/api";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { getFeed } from "@/rss"; import { getFeed } from "@/rss";
export default apiRoute((app) => export default apiRoute((app) =>

View file

@ -12,7 +12,7 @@ import {
} from "@versia-server/kit/api"; } from "@versia-server/kit/api";
import { Relationship } from "@versia-server/kit/db"; import { Relationship } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -13,7 +13,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, gt, gte, lt, sql } from "drizzle-orm"; import { and, gt, gte, lt, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -13,7 +13,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, gt, gte, lt, sql } from "drizzle-orm"; import { and, gt, gte, lt, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -15,7 +15,7 @@ import {
relationshipQueue, relationshipQueue,
} from "@versia-server/kit/queues/relationships"; } from "@versia-server/kit/queues/relationships";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -11,7 +11,7 @@ import {
} from "@versia-server/kit/api"; } from "@versia-server/kit/api";
import { Relationship } from "@versia-server/kit/db"; import { Relationship } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -12,7 +12,7 @@ import {
} from "@versia-server/kit/api"; } from "@versia-server/kit/api";
import { Role } from "@versia-server/kit/db"; import { Role } from "@versia-server/kit/db";
import { describeRoute, validator } from "hono-openapi"; import { describeRoute, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.post( app.post(

View file

@ -2,7 +2,7 @@ import { Role as RoleSchema } from "@versia/client/schemas";
import { apiRoute, auth, withUserParam } from "@versia-server/kit/api"; import { apiRoute, auth, withUserParam } from "@versia-server/kit/api";
import { Role } from "@versia-server/kit/db"; import { Role } from "@versia-server/kit/db";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.get( app.get(

View file

@ -14,7 +14,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, eq, gt, gte, inArray, isNull, lt, or, sql } from "drizzle-orm"; import { and, eq, gt, gte, inArray, isNull, lt, or, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -14,7 +14,7 @@ import { db, User } from "@versia-server/kit/db";
import type { Users } from "@versia-server/kit/tables"; import type { Users } from "@versia-server/kit/tables";
import { type InferSelectModel, sql } from "drizzle-orm"; import { type InferSelectModel, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { rateLimit } from "../../../../../middlewares/rate-limit.ts"; import { rateLimit } from "../../../../../middlewares/rate-limit.ts";
export default apiRoute((app) => export default apiRoute((app) =>

View file

@ -14,7 +14,7 @@ import { Users } from "@versia-server/kit/tables";
import { and, eq, isNull } from "drizzle-orm"; import { and, eq, isNull } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import ISO6391 from "iso-639-1"; import ISO6391 from "iso-639-1";
import { z } from "zod/v4"; import { z } from "zod";
import { tempmailDomains } from "@/tempmail"; import { tempmailDomains } from "@/tempmail";
import { rateLimit } from "../../../../middlewares/rate-limit.ts"; import { rateLimit } from "../../../../middlewares/rate-limit.ts";

View file

@ -10,7 +10,7 @@ import { parseUserAddress } from "@versia-server/kit/parsers";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, eq, isNull } from "drizzle-orm"; import { and, eq, isNull } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { rateLimit } from "../../../../../middlewares/rate-limit.ts"; import { rateLimit } from "../../../../../middlewares/rate-limit.ts";
export default apiRoute((app) => export default apiRoute((app) =>

View file

@ -13,7 +13,7 @@ import {
} from "@versia-server/kit/api"; } from "@versia-server/kit/api";
import { Relationship } from "@versia-server/kit/db"; import { Relationship } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { rateLimit } from "../../../../../middlewares/rate-limit.ts"; import { rateLimit } from "../../../../../middlewares/rate-limit.ts";
export default apiRoute((app) => export default apiRoute((app) =>

View file

@ -11,7 +11,7 @@ import { Users } from "@versia-server/kit/tables";
import { eq, ilike, not, or, sql } from "drizzle-orm"; import { eq, ilike, not, or, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import stringComparison from "string-comparison"; import stringComparison from "string-comparison";
import { z } from "zod/v4"; import { z } from "zod";
import { rateLimit } from "../../../../../middlewares/rate-limit.ts"; import { rateLimit } from "../../../../../middlewares/rate-limit.ts";
export default apiRoute((app) => export default apiRoute((app) =>

View file

@ -17,7 +17,7 @@ import { versiaTextToHtml } from "@versia-server/kit/parsers";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, eq, isNull } from "drizzle-orm"; import { and, eq, isNull } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { mergeAndDeduplicate } from "@/lib"; import { mergeAndDeduplicate } from "@/lib";
import { sanitizedHtmlStrip } from "@/sanitization"; import { sanitizedHtmlStrip } from "@/sanitization";
import { rateLimit } from "../../../../../middlewares/rate-limit.ts"; import { rateLimit } from "../../../../../middlewares/rate-limit.ts";

View file

@ -6,7 +6,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, handleZodError, jsonOrForm } from "@versia-server/kit/api"; import { apiRoute, handleZodError, jsonOrForm } from "@versia-server/kit/api";
import { Client } from "@versia-server/kit/db"; import { Client } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { randomString } from "@/math"; import { randomString } from "@/math";
import { rateLimit } from "../../../../middlewares/rate-limit.ts"; import { rateLimit } from "../../../../middlewares/rate-limit.ts";

View file

@ -8,7 +8,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, gt, gte, lt, sql } from "drizzle-orm"; import { and, gt, gte, lt, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -8,7 +8,7 @@ import { Emoji } from "@versia-server/kit/db";
import { Emojis } from "@versia-server/kit/tables"; import { Emojis } from "@versia-server/kit/tables";
import { and, eq, isNull, or } from "drizzle-orm"; import { and, eq, isNull, or } from "drizzle-orm";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -12,7 +12,7 @@ import {
withEmojiParam, withEmojiParam,
} from "@versia-server/kit/api"; } from "@versia-server/kit/api";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { mimeLookup } from "@/content_types"; import { mimeLookup } from "@/content_types";
export default apiRoute((app) => { export default apiRoute((app) => {

View file

@ -32,7 +32,7 @@ const createImage = async (name: string): Promise<File> => {
.png() .png()
.toBuffer(); .toBuffer();
return new File([inputBuffer], name, { return new File([inputBuffer as BlobPart], name, {
type: "image/png", type: "image/png",
}); });
}; };

View file

@ -15,7 +15,7 @@ import { Emojis } from "@versia-server/kit/tables";
import { randomUUIDv7 } from "bun"; import { randomUUIDv7 } from "bun";
import { and, eq, isNull, or } from "drizzle-orm"; import { and, eq, isNull, or } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { mimeLookup } from "@/content_types"; import { mimeLookup } from "@/content_types";
export default apiRoute((app) => export default apiRoute((app) =>

View file

@ -5,7 +5,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, gt, gte, lt, sql } from "drizzle-orm"; import { and, gt, gte, lt, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -7,7 +7,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, auth, handleZodError } from "@versia-server/kit/api"; import { apiRoute, auth, handleZodError } from "@versia-server/kit/api";
import { Relationship, User } from "@versia-server/kit/db"; import { Relationship, User } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -7,7 +7,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, auth, handleZodError } from "@versia-server/kit/api"; import { apiRoute, auth, handleZodError } from "@versia-server/kit/api";
import { Relationship, User } from "@versia-server/kit/db"; import { Relationship, User } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -8,7 +8,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, gt, gte, lt, sql } from "drizzle-orm"; import { and, gt, gte, lt, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -1,7 +1,7 @@
import { config } from "@versia-server/config"; import { config } from "@versia-server/config";
import { apiRoute } from "@versia-server/kit/api"; import { apiRoute } from "@versia-server/kit/api";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -6,7 +6,7 @@ import { markdownToHtml } from "@versia-server/kit/markdown";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, eq, isNull } from "drizzle-orm"; import { and, eq, isNull } from "drizzle-orm";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import type { z } from "zod/v4"; import type { z } from "zod";
import manifest from "../../../../../../package.json" with { type: "json" }; import manifest from "../../../../../../package.json" with { type: "json" };
export default apiRoute((app) => export default apiRoute((app) =>

View file

@ -2,7 +2,7 @@ import { Rule as RuleSchema } from "@versia/client/schemas";
import { config } from "@versia-server/config"; import { config } from "@versia-server/config";
import { apiRoute } from "@versia-server/kit/api"; import { apiRoute } from "@versia-server/kit/api";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -11,7 +11,7 @@ import { Markers } from "@versia-server/kit/tables";
import { randomUUIDv7 } from "bun"; import { randomUUIDv7 } from "bun";
import { and, eq, type SQL } from "drizzle-orm"; import { and, eq, type SQL } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
const MarkerResponseSchema = z.object({ const MarkerResponseSchema = z.object({
notifications: MarkerSchema.optional(), notifications: MarkerSchema.optional(),

View file

@ -7,7 +7,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, auth, handleZodError } from "@versia-server/kit/api"; import { apiRoute, auth, handleZodError } from "@versia-server/kit/api";
import { Media } from "@versia-server/kit/db"; import { Media } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.get( app.get(

View file

@ -7,7 +7,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, auth, handleZodError } from "@versia-server/kit/api"; import { apiRoute, auth, handleZodError } from "@versia-server/kit/api";
import { Media } from "@versia-server/kit/db"; import { Media } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -8,7 +8,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, gt, gte, lt, sql } from "drizzle-orm"; import { and, gt, gte, lt, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test"; import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Notification } from "@versia/client/schemas"; import type { Notification } from "@versia/client/schemas";
import { generateClient, getTestUsers } from "@versia-server/tests"; import { generateClient, getTestUsers } from "@versia-server/tests";
import type { z } from "zod/v4"; import type { z } from "zod";
const { users, deleteUsers } = await getTestUsers(2); const { users, deleteUsers } = await getTestUsers(2);
let notifications: z.infer<typeof Notification>[] = []; let notifications: z.infer<typeof Notification>[] = [];

View file

@ -6,7 +6,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, auth, handleZodError } from "@versia-server/kit/api"; import { apiRoute, auth, handleZodError } from "@versia-server/kit/api";
import { Notification } from "@versia-server/kit/db"; import { Notification } from "@versia-server/kit/db";
import { describeRoute, validator } from "hono-openapi"; import { describeRoute, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test"; import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import type { Notification } from "@versia/client/schemas"; import type { Notification } from "@versia/client/schemas";
import { generateClient, getTestUsers } from "@versia-server/tests"; import { generateClient, getTestUsers } from "@versia-server/tests";
import type { z } from "zod/v4"; import type { z } from "zod";
const { users, deleteUsers } = await getTestUsers(2); const { users, deleteUsers } = await getTestUsers(2);
let notifications: z.infer<typeof Notification>[] = []; let notifications: z.infer<typeof Notification>[] = [];

View file

@ -6,7 +6,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, auth, handleZodError } from "@versia-server/kit/api"; import { apiRoute, auth, handleZodError } from "@versia-server/kit/api";
import { Notification } from "@versia-server/kit/db"; import { Notification } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -5,7 +5,7 @@ import {
getTestStatuses, getTestStatuses,
getTestUsers, getTestUsers,
} from "@versia-server/tests"; } from "@versia-server/tests";
import type { z } from "zod/v4"; import type { z } from "zod";
const { users, deleteUsers } = await getTestUsers(2); const { users, deleteUsers } = await getTestUsers(2);
const statuses = await getTestStatuses(5, users[0]); const statuses = await getTestStatuses(5, users[0]);

View file

@ -7,7 +7,7 @@ import {
qsQuery, qsQuery,
} from "@versia-server/kit/api"; } from "@versia-server/kit/api";
import { describeRoute, validator } from "hono-openapi"; import { describeRoute, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.delete( app.delete(

View file

@ -10,7 +10,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Notifications } from "@versia-server/kit/tables"; import { Notifications } from "@versia-server/kit/tables";
import { and, eq, gt, gte, inArray, lt, not, sql } from "drizzle-orm"; import { and, eq, gt, gte, inArray, lt, not, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -3,7 +3,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, auth } from "@versia-server/kit/api"; import { apiRoute, auth } from "@versia-server/kit/api";
import { PushSubscription } from "@versia-server/kit/db"; import { PushSubscription } from "@versia-server/kit/db";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.delete( app.delete(

View file

@ -3,7 +3,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, auth, handleZodError } from "@versia-server/kit/api"; import { apiRoute, auth, handleZodError } from "@versia-server/kit/api";
import { Role } from "@versia-server/kit/db"; import { Role } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.get( app.get(

View file

@ -4,7 +4,7 @@ import { apiRoute, auth, handleZodError } from "@versia-server/kit/api";
import { Role } from "@versia-server/kit/db"; import { Role } from "@versia-server/kit/db";
import { randomUUIDv7 } from "bun"; import { randomUUIDv7 } from "bun";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.get( app.get(

View file

@ -6,7 +6,7 @@ import { db } from "@versia-server/kit/db";
import { OpenIdAccounts } from "@versia-server/kit/tables"; import { OpenIdAccounts } from "@versia-server/kit/tables";
import { and, eq, type SQL } from "drizzle-orm"; import { and, eq, type SQL } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.get( app.get(

View file

@ -7,7 +7,7 @@ import { OpenIdLoginFlows } from "@versia-server/kit/tables";
import { randomUUIDv7 } from "bun"; import { randomUUIDv7 } from "bun";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import * as client from "openid-client"; import * as client from "openid-client";
import { z } from "zod/v4"; import { z } from "zod";
import { oauthRedirectUri } from "@/lib"; import { oauthRedirectUri } from "@/lib";
export default apiRoute((app) => { export default apiRoute((app) => {

View file

@ -13,7 +13,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, gt, gte, lt, sql } from "drizzle-orm"; import { and, gt, gte, lt, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -22,7 +22,7 @@ import {
versiaTextToHtml, versiaTextToHtml,
} from "@versia-server/kit/parsers"; } from "@versia-server/kit/parsers";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { sanitizedHtmlStrip } from "@/sanitization"; import { sanitizedHtmlStrip } from "@/sanitization";
const schema = z const schema = z

View file

@ -13,7 +13,7 @@ import { describeRoute, resolver, validator } from "hono-openapi";
import emojis from "unicode-emoji-json/data-ordered-emoji.json" with { import emojis from "unicode-emoji-json/data-ordered-emoji.json" with {
type: "json", type: "json",
}; };
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.put( app.put(

View file

@ -5,7 +5,7 @@ import {
import { ApiError } from "@versia-server/kit"; import { ApiError } from "@versia-server/kit";
import { apiRoute, auth, withNoteParam } from "@versia-server/kit/api"; import { apiRoute, auth, withNoteParam } from "@versia-server/kit/api";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -7,7 +7,7 @@ import {
withNoteParam, withNoteParam,
} from "@versia-server/kit/api"; } from "@versia-server/kit/api";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -13,7 +13,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Users } from "@versia-server/kit/tables"; import { Users } from "@versia-server/kit/tables";
import { and, gt, gte, lt, sql } from "drizzle-orm"; import { and, gt, gte, lt, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -6,7 +6,7 @@ import { Emojis } from "@versia-server/kit/tables";
import { generateClient, getTestUsers } from "@versia-server/tests"; import { generateClient, getTestUsers } from "@versia-server/tests";
import { randomUUIDv7 } from "bun"; import { randomUUIDv7 } from "bun";
import { eq } from "drizzle-orm"; import { eq } from "drizzle-orm";
import type { z } from "zod/v4"; import type { z } from "zod";
const { users, deleteUsers } = await getTestUsers(5); const { users, deleteUsers } = await getTestUsers(5);
let media: Media; let media: Media;

View file

@ -22,7 +22,7 @@ import {
} from "@versia-server/kit/parsers"; } from "@versia-server/kit/parsers";
import { randomUUIDv7 } from "bun"; import { randomUUIDv7 } from "bun";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { sanitizedHtmlStrip } from "@/sanitization"; import { sanitizedHtmlStrip } from "@/sanitization";
const schema = z const schema = z

View file

@ -5,7 +5,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, eq, gt, gte, inArray, lt, or, sql } from "drizzle-orm"; import { and, eq, gt, gte, inArray, lt, or, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -9,7 +9,7 @@ import { Timeline } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, eq, gt, gte, inArray, lt, or, sql } from "drizzle-orm"; import { and, eq, gt, gte, inArray, lt, or, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -15,7 +15,7 @@ import { db } from "@versia-server/kit/db";
import { FilterKeywords, Filters } from "@versia-server/kit/tables"; import { FilterKeywords, Filters } from "@versia-server/kit/tables";
import { and, eq, inArray, type SQL } from "drizzle-orm"; import { and, eq, inArray, type SQL } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.get( app.get(

View file

@ -15,7 +15,7 @@ import { FilterKeywords, Filters } from "@versia-server/kit/tables";
import { randomUUIDv7 } from "bun"; import { randomUUIDv7 } from "bun";
import { eq, type SQL } from "drizzle-orm"; import { eq, type SQL } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.get( app.get(

View file

@ -7,7 +7,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, auth, handleZodError } from "@versia-server/kit/api"; import { apiRoute, auth, handleZodError } from "@versia-server/kit/api";
import { Media } from "@versia-server/kit/db"; import { Media } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -15,7 +15,7 @@ import { searchManager } from "@versia-server/kit/search";
import { Instances, Notes, Users } from "@versia-server/kit/tables"; import { Instances, Notes, Users } from "@versia-server/kit/tables";
import { and, eq, inArray, isNull, sql } from "drizzle-orm"; import { and, eq, inArray, isNull, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -1,7 +1,7 @@
import { apiRoute, handleZodError } from "@versia-server/kit/api"; import { apiRoute, handleZodError } from "@versia-server/kit/api";
import { InboxJobType, inboxQueue } from "@versia-server/kit/queues/inbox"; import { InboxJobType, inboxQueue } from "@versia-server/kit/queues/inbox";
import { describeRoute, validator } from "hono-openapi"; import { describeRoute, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -7,7 +7,7 @@ import { Like, User } from "@versia-server/kit/db";
import { Likes } from "@versia-server/kit/tables"; import { Likes } from "@versia-server/kit/tables";
import { and, eq, sql } from "drizzle-orm"; import { and, eq, sql } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -2,7 +2,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, handleZodError } from "@versia-server/kit/api"; import { apiRoute, handleZodError } from "@versia-server/kit/api";
import { file as bunFile } from "bun"; import { file as bunFile } from "bun";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -4,7 +4,7 @@ import { apiRoute, handleZodError } from "@versia-server/kit/api";
import { proxy } from "hono/proxy"; import { proxy } from "hono/proxy";
import type { ContentfulStatusCode, StatusCode } from "hono/utils/http-status"; import type { ContentfulStatusCode, StatusCode } from "hono/utils/http-status";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -7,7 +7,7 @@ import { Note } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, eq, inArray } from "drizzle-orm"; import { and, eq, inArray } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -8,7 +8,7 @@ import { db, Note } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, eq, inArray } from "drizzle-orm"; import { and, eq, inArray } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -8,7 +8,7 @@ import { db, Note } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, eq, inArray } from "drizzle-orm"; import { and, eq, inArray } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -8,7 +8,7 @@ import { db, Note } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, eq, inArray } from "drizzle-orm"; import { and, eq, inArray } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -3,7 +3,7 @@ import { db, Token } from "@versia-server/kit/db";
import { Tokens } from "@versia-server/kit/tables"; import { Tokens } from "@versia-server/kit/tables";
import { and, eq } from "drizzle-orm"; import { and, eq } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => { export default apiRoute((app) => {
app.post( app.post(

View file

@ -19,7 +19,7 @@ import { setCookie } from "hono/cookie";
import { sign } from "hono/jwt"; import { sign } from "hono/jwt";
import { describeRoute, validator } from "hono-openapi"; import { describeRoute, validator } from "hono-openapi";
import * as client from "openid-client"; import * as client from "openid-client";
import { z } from "zod/v4"; import { z } from "zod";
import { randomString } from "@/math.ts"; import { randomString } from "@/math.ts";
export default apiRoute((app) => { export default apiRoute((app) => {

View file

@ -6,7 +6,7 @@ import { OpenIdLoginFlows } from "@versia-server/kit/tables";
import { randomUUIDv7 } from "bun"; import { randomUUIDv7 } from "bun";
import { describeRoute, validator } from "hono-openapi"; import { describeRoute, validator } from "hono-openapi";
import * as client from "openid-client"; import * as client from "openid-client";
import { z } from "zod/v4"; import { z } from "zod";
import { oauthRedirectUri } from "@/lib"; import { oauthRedirectUri } from "@/lib";
export default apiRoute((app) => { export default apiRoute((app) => {

View file

@ -76,7 +76,9 @@ describe("/oauth/token", () => {
expect(response.status).toBe(422); expect(response.status).toBe(422);
const body = await response.json(); const body = await response.json();
expect(body.error).toInclude(`Expected string at "code"`); expect(body.error).toInclude(
`expected string, received undefined at "code"`,
);
}); });
test("should return error for missing redirect_uri", async () => { test("should return error for missing redirect_uri", async () => {
@ -95,7 +97,9 @@ describe("/oauth/token", () => {
expect(response.status).toBe(422); expect(response.status).toBe(422);
const body = await response.json(); const body = await response.json();
expect(body.error).toInclude(`Expected string at "redirect_uri"`); expect(body.error).toInclude(
`expected string, received undefined at "redirect_uri"`,
);
}); });
test("should return error for missing client_id", async () => { test("should return error for missing client_id", async () => {
@ -114,7 +118,9 @@ describe("/oauth/token", () => {
expect(response.status).toBe(422); expect(response.status).toBe(422);
const body = await response.json(); const body = await response.json();
expect(body.error).toInclude(`Expected string at "client_id"`); expect(body.error).toInclude(
`expected string, received undefined at "client_id"`,
);
}); });
test("should return error for invalid client credentials", async () => { test("should return error for invalid client credentials", async () => {

View file

@ -5,7 +5,7 @@ import { AuthorizationCodes } from "@versia-server/kit/tables";
import { randomUUIDv7 } from "bun"; import { randomUUIDv7 } from "bun";
import { and, eq } from "drizzle-orm"; import { and, eq } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import { randomString } from "@/math"; import { randomString } from "@/math";
export default apiRoute((app) => { export default apiRoute((app) => {

View file

@ -7,7 +7,7 @@ import { Note } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, eq, inArray } from "drizzle-orm"; import { and, eq, inArray } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -2,7 +2,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, handleZodError } from "@versia-server/kit/api"; import { apiRoute, handleZodError } from "@versia-server/kit/api";
import { InboxJobType, inboxQueue } from "@versia-server/kit/queues/inbox"; import { InboxJobType, inboxQueue } from "@versia-server/kit/queues/inbox";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.post( app.post(

View file

@ -3,7 +3,7 @@ import { ApiError } from "@versia-server/kit";
import { apiRoute, handleZodError } from "@versia-server/kit/api"; import { apiRoute, handleZodError } from "@versia-server/kit/api";
import { User } from "@versia-server/kit/db"; import { User } from "@versia-server/kit/db";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -7,7 +7,7 @@ import { db, Note, User } from "@versia-server/kit/db";
import { Notes } from "@versia-server/kit/tables"; import { Notes } from "@versia-server/kit/tables";
import { and, eq, inArray } from "drizzle-orm"; import { and, eq, inArray } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
const NOTES_PER_PAGE = 20; const NOTES_PER_PAGE = 20;

View file

@ -1,7 +1,7 @@
import { config } from "@versia-server/config"; import { config } from "@versia-server/config";
import { apiRoute } from "@versia-server/kit/api"; import { apiRoute } from "@versia-server/kit/api";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -2,7 +2,7 @@ import { config } from "@versia-server/config";
import { apiRoute } from "@versia-server/kit/api"; import { apiRoute } from "@versia-server/kit/api";
import { Note, User } from "@versia-server/kit/db"; import { Note, User } from "@versia-server/kit/db";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
import manifest from "../../../../../../package.json" with { type: "json" }; import manifest from "../../../../../../package.json" with { type: "json" };
export default apiRoute((app) => export default apiRoute((app) =>

View file

@ -1,7 +1,7 @@
import { config } from "@versia-server/config"; import { config } from "@versia-server/config";
import { apiRoute } from "@versia-server/kit/api"; import { apiRoute } from "@versia-server/kit/api";
import { describeRoute, resolver } from "hono-openapi"; import { describeRoute, resolver } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -10,7 +10,7 @@ import { Users } from "@versia-server/kit/tables";
import { federationBridgeLogger } from "@versia-server/logging"; import { federationBridgeLogger } from "@versia-server/logging";
import { and, eq, isNull } from "drizzle-orm"; import { and, eq, isNull } from "drizzle-orm";
import { describeRoute, resolver, validator } from "hono-openapi"; import { describeRoute, resolver, validator } from "hono-openapi";
import { z } from "zod/v4"; import { z } from "zod";
export default apiRoute((app) => export default apiRoute((app) =>
app.get( app.get(

View file

@ -1,4 +1,4 @@
import { z } from "zod/v4"; import { z } from "zod";
import { Account } from "./account.ts"; import { Account } from "./account.ts";
import { Appeal } from "./appeal.ts"; import { Appeal } from "./appeal.ts";
import { Id } from "./common.ts"; import { Id } from "./common.ts";

View file

@ -1,4 +1,4 @@
import { z } from "zod/v4"; import { z } from "zod";
import { userAddressRegex } from "../regex.ts"; import { userAddressRegex } from "../regex.ts";
import { iso631, zBoolean } from "./common.ts"; import { iso631, zBoolean } from "./common.ts";
import { CustomEmoji } from "./emoji.ts"; import { CustomEmoji } from "./emoji.ts";

View file

@ -1,4 +1,4 @@
import { z } from "zod/v4"; import { z } from "zod";
export const Appeal = z export const Appeal = z
.object({ .object({

View file

@ -1,4 +1,4 @@
import { z } from "zod/v4"; import { z } from "zod";
export const Application = z export const Application = z
.object({ .object({

View file

@ -1,4 +1,4 @@
import { z } from "zod/v4"; import { z } from "zod";
import { Id } from "./common.ts"; import { Id } from "./common.ts";
export const Attachment = z export const Attachment = z

View file

@ -1,4 +1,4 @@
import { z } from "zod/v4"; import { z } from "zod";
import { Account } from "./account.ts"; import { Account } from "./account.ts";
export const PreviewCardAuthor = z export const PreviewCardAuthor = z

View file

@ -1,5 +1,5 @@
import ISO6391 from "iso-639-1"; import ISO6391 from "iso-639-1";
import { z } from "zod/v4"; import { z } from "zod";
export const Id = z.uuid(); export const Id = z.uuid();

View file

@ -1,4 +1,4 @@
import { z } from "zod/v4"; import { z } from "zod";
import { Status } from "./status.ts"; import { Status } from "./status.ts";
export const Context = z export const Context = z

View file

@ -1,4 +1,4 @@
import { z } from "zod/v4"; import { z } from "zod";
import { emojiRegex } from "../regex.ts"; import { emojiRegex } from "../regex.ts";
import { Id, zBoolean } from "./common.ts"; import { Id, zBoolean } from "./common.ts";

View file

@ -1,4 +1,4 @@
import { z } from "zod/v4"; import { z } from "zod";
export const ExtendedDescription = z export const ExtendedDescription = z
.object({ .object({

Some files were not shown because too many files have changed in this diff Show more