mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
chore: ⬆️ Upgrade dependencies
This commit is contained in:
parent
f67fed12e0
commit
1509786090
|
|
@ -1,10 +1,10 @@
|
||||||
import { apiRoute, applyConfig } from "@/api";
|
import { apiRoute, applyConfig } from "@/api";
|
||||||
import type { Context } from "@hono/hono";
|
|
||||||
import { setCookie } from "@hono/hono/cookie";
|
|
||||||
import { createRoute } from "@hono/zod-openapi";
|
import { createRoute } from "@hono/zod-openapi";
|
||||||
import { Application, User } from "@versia/kit/db";
|
import { Application, User } from "@versia/kit/db";
|
||||||
import { Users } from "@versia/kit/tables";
|
import { Users } from "@versia/kit/tables";
|
||||||
import { eq, or } from "drizzle-orm";
|
import { eq, or } from "drizzle-orm";
|
||||||
|
import type { Context } from "hono";
|
||||||
|
import { setCookie } from "hono/cookie";
|
||||||
import { SignJWT } from "jose";
|
import { SignJWT } from "jose";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { config } from "~/packages/config-manager";
|
import { config } from "~/packages/config-manager";
|
||||||
|
|
|
||||||
8
app.ts
8
app.ts
|
|
@ -3,15 +3,15 @@ import { handleZodError } from "@/api";
|
||||||
import { applyToHono } from "@/bull-board.ts";
|
import { applyToHono } from "@/bull-board.ts";
|
||||||
import { configureLoggers } from "@/loggers";
|
import { configureLoggers } from "@/loggers";
|
||||||
import { sentry } from "@/sentry";
|
import { sentry } from "@/sentry";
|
||||||
import { cors } from "@hono/hono/cors";
|
|
||||||
import { createMiddleware } from "@hono/hono/factory";
|
|
||||||
import { prettyJSON } from "@hono/hono/pretty-json";
|
|
||||||
import { secureHeaders } from "@hono/hono/secure-headers";
|
|
||||||
import { swaggerUI } from "@hono/swagger-ui";
|
import { swaggerUI } from "@hono/swagger-ui";
|
||||||
import { OpenAPIHono } from "@hono/zod-openapi";
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
||||||
/* import { prometheus } from "@hono/prometheus"; */
|
/* import { prometheus } from "@hono/prometheus"; */
|
||||||
import { getLogger } from "@logtape/logtape";
|
import { getLogger } from "@logtape/logtape";
|
||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
|
import { cors } from "hono/cors";
|
||||||
|
import { createMiddleware } from "hono/factory";
|
||||||
|
import { prettyJSON } from "hono/pretty-json";
|
||||||
|
import { secureHeaders } from "hono/secure-headers";
|
||||||
import pkg from "~/package.json" with { type: "application/json" };
|
import pkg from "~/package.json" with { type: "application/json" };
|
||||||
import { config } from "~/packages/config-manager/index.ts";
|
import { config } from "~/packages/config-manager/index.ts";
|
||||||
import { PluginLoader } from "./classes/plugin/loader.ts";
|
import { PluginLoader } from "./classes/plugin/loader.ts";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { createMiddleware } from "@hono/hono/factory";
|
import { createMiddleware } from "hono/factory";
|
||||||
import { config } from "~/packages/config-manager";
|
import { config } from "~/packages/config-manager";
|
||||||
|
|
||||||
export const agentBans = createMiddleware(async (context, next) => {
|
export const agentBans = createMiddleware(async (context, next) => {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { createMiddleware } from "@hono/hono/factory";
|
|
||||||
import { getLogger } from "@logtape/logtape";
|
import { getLogger } from "@logtape/logtape";
|
||||||
import type { BunFile, SocketAddress } from "bun";
|
import type { BunFile, SocketAddress } from "bun";
|
||||||
|
import { createMiddleware } from "hono/factory";
|
||||||
import { matches } from "ip-matching";
|
import { matches } from "ip-matching";
|
||||||
import { config } from "~/packages/config-manager";
|
import { config } from "~/packages/config-manager";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { createMiddleware } from "@hono/hono/factory";
|
import { createMiddleware } from "hono/factory";
|
||||||
|
|
||||||
export const boundaryCheck = createMiddleware(async (context, next) => {
|
export const boundaryCheck = createMiddleware(async (context, next) => {
|
||||||
// Checks that FormData boundary is present
|
// Checks that FormData boundary is present
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { sentry } from "@/sentry";
|
import { sentry } from "@/sentry";
|
||||||
import { createMiddleware } from "@hono/hono/factory";
|
|
||||||
import { getLogger } from "@logtape/logtape";
|
import { getLogger } from "@logtape/logtape";
|
||||||
import type { SocketAddress } from "bun";
|
import type { SocketAddress } from "bun";
|
||||||
|
import { createMiddleware } from "hono/factory";
|
||||||
import { matches } from "ip-matching";
|
import { matches } from "ip-matching";
|
||||||
import { config } from "~/packages/config-manager";
|
import { config } from "~/packages/config-manager";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { createMiddleware } from "@hono/hono/factory";
|
|
||||||
import { getLogger } from "@logtape/logtape";
|
import { getLogger } from "@logtape/logtape";
|
||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
|
import { createMiddleware } from "hono/factory";
|
||||||
import { config } from "~/packages/config-manager";
|
import { config } from "~/packages/config-manager";
|
||||||
|
|
||||||
export const logger = createMiddleware(async (context, next) => {
|
export const logger = createMiddleware(async (context, next) => {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { createMiddleware } from "@hono/hono/factory";
|
import { createMiddleware } from "hono/factory";
|
||||||
import { config } from "~/packages/config-manager";
|
import { config } from "~/packages/config-manager";
|
||||||
|
|
||||||
export const urlCheck = createMiddleware(async (context, next) => {
|
export const urlCheck = createMiddleware(async (context, next) => {
|
||||||
|
|
|
||||||
28
package.json
28
package.json
|
|
@ -91,17 +91,17 @@
|
||||||
"@types/mime-types": "^2.1.4",
|
"@types/mime-types": "^2.1.4",
|
||||||
"@types/pg": "^8.11.10",
|
"@types/pg": "^8.11.10",
|
||||||
"@types/qs": "^6.9.17",
|
"@types/qs": "^6.9.17",
|
||||||
"drizzle-kit": "^0.29.1",
|
"drizzle-kit": "^0.30.1",
|
||||||
"markdown-it-image-figures": "^2.1.1",
|
"markdown-it-image-figures": "^2.1.1",
|
||||||
"markdown-it-mathjax3": "^4.3.2",
|
"markdown-it-mathjax3": "^4.3.2",
|
||||||
"oclif": "^4.16.0",
|
"oclif": "^4.17.0",
|
||||||
"ts-prune": "^0.10.3",
|
"ts-prune": "^0.10.3",
|
||||||
"typescript": "^5.7.2",
|
"typescript": "^5.7.2",
|
||||||
"vitepress": "^1.5.0",
|
"vitepress": "^1.5.0",
|
||||||
"vitepress-plugin-tabs": "^0.5.0",
|
"vitepress-plugin-tabs": "^0.5.0",
|
||||||
"vitepress-sidebar": "^1.30.2",
|
"vitepress-sidebar": "^1.30.2",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"zod-to-json-schema": "^3.23.5"
|
"zod-to-json-schema": "^3.24.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "^5.3.2"
|
"typescript": "^5.3.2"
|
||||||
|
|
@ -111,31 +111,30 @@
|
||||||
"@bull-board/api": "^6.5.3",
|
"@bull-board/api": "^6.5.3",
|
||||||
"@bull-board/hono": "^6.5.3",
|
"@bull-board/hono": "^6.5.3",
|
||||||
"@hackmd/markdown-it-task-lists": "^2.1.4",
|
"@hackmd/markdown-it-task-lists": "^2.1.4",
|
||||||
"@hono/hono": "npm:@jsr/hono__hono@4.6.13",
|
|
||||||
"@hono/prometheus": "^1.0.1",
|
"@hono/prometheus": "^1.0.1",
|
||||||
"@hono/swagger-ui": "^0.5.0",
|
"@hono/swagger-ui": "^0.5.0",
|
||||||
"@hono/zod-openapi": "^0.16.4",
|
"@hono/zod-openapi": "0.16.3",
|
||||||
"@inquirer/confirm": "^5.1.0",
|
"@inquirer/confirm": "^5.1.0",
|
||||||
"@inquirer/input": "^4.1.0",
|
"@inquirer/input": "^4.1.0",
|
||||||
"@json2csv/plainjs": "^7.0.6",
|
"@json2csv/plainjs": "^7.0.6",
|
||||||
"@logtape/logtape": "npm:@jsr/logtape__logtape@0.9.0-dev.114+327c9473",
|
"@logtape/logtape": "npm:@jsr/logtape__logtape@0.9.0-dev.114+327c9473",
|
||||||
"@oclif/core": "^4.0.36",
|
"@oclif/core": "^4.1.0",
|
||||||
"@sentry/bun": "^8.42.0",
|
"@sentry/bun": "^8.47.0",
|
||||||
"@tufjs/canonical-json": "^2.0.0",
|
"@tufjs/canonical-json": "^2.0.0",
|
||||||
"@versia/client": "^0.1.4",
|
"@versia/client": "^0.1.4",
|
||||||
"@versia/federation": "^0.1.4",
|
"@versia/federation": "^0.1.4",
|
||||||
"@versia/kit": "workspace:*",
|
"@versia/kit": "workspace:*",
|
||||||
"altcha-lib": "^1.1.1",
|
"altcha-lib": "^1.1.1",
|
||||||
"blurhash": "^2.0.5",
|
"blurhash": "^2.0.5",
|
||||||
"bullmq": "^5.33.0",
|
"bullmq": "^5.34.3",
|
||||||
"c12": "^2.0.1",
|
"c12": "^2.0.1",
|
||||||
"chalk": "^5.3.0",
|
"chalk": "^5.4.0",
|
||||||
"cli-progress": "^3.12.0",
|
"cli-progress": "^3.12.0",
|
||||||
"cli-table": "^0.3.11",
|
"cli-table": "^0.3.11",
|
||||||
"confbox": "^0.1.8",
|
"confbox": "^0.1.8",
|
||||||
"drizzle-orm": "^0.37.0",
|
"drizzle-orm": "^0.38.2",
|
||||||
"extract-zip": "^2.0.1",
|
"extract-zip": "^2.0.1",
|
||||||
"hono": "npm:@jsr/hono__hono@4.6.13",
|
"hono": "^4.6.14",
|
||||||
"html-to-text": "^9.0.5",
|
"html-to-text": "^9.0.5",
|
||||||
"ioredis": "^5.4.1",
|
"ioredis": "^5.4.1",
|
||||||
"ip-matching": "^2.1.2",
|
"ip-matching": "^2.1.2",
|
||||||
|
|
@ -150,7 +149,7 @@
|
||||||
"markdown-it-container": "^4.0.0",
|
"markdown-it-container": "^4.0.0",
|
||||||
"markdown-it-toc-done-right": "^4.2.0",
|
"markdown-it-toc-done-right": "^4.2.0",
|
||||||
"mime-types": "^2.1.35",
|
"mime-types": "^2.1.35",
|
||||||
"mitata": "^1.0.20",
|
"mitata": "^1.0.21",
|
||||||
"oauth4webapi": "^3.1.4",
|
"oauth4webapi": "^3.1.4",
|
||||||
"ora": "^8.1.1",
|
"ora": "^8.1.1",
|
||||||
"pg": "^8.13.1",
|
"pg": "^8.13.1",
|
||||||
|
|
@ -165,9 +164,12 @@
|
||||||
"unzipit": "^1.4.3",
|
"unzipit": "^1.4.3",
|
||||||
"uqr": "^0.1.2",
|
"uqr": "^0.1.2",
|
||||||
"xss": "^1.0.15",
|
"xss": "^1.0.15",
|
||||||
"zod": "^3.23.8",
|
"zod": "^3.24.1",
|
||||||
"zod-validation-error": "^3.4.0"
|
"zod-validation-error": "^3.4.0"
|
||||||
},
|
},
|
||||||
|
"overrides": {
|
||||||
|
"zod": "^3.24.1"
|
||||||
|
},
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"@bull-board/api@6.5.3": "patches/@bull-board%2Fapi@6.5.3.patch"
|
"@bull-board/api@6.5.3": "patches/@bull-board%2Fapi@6.5.3.patch"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { createMiddleware } from "@hono/hono/factory";
|
|
||||||
import type { OpenAPIHono } from "@hono/zod-openapi";
|
import type { OpenAPIHono } from "@hono/zod-openapi";
|
||||||
import type { MiddlewareHandler } from "hono";
|
import type { MiddlewareHandler } from "hono";
|
||||||
|
import { createMiddleware } from "hono/factory";
|
||||||
import type { z } from "zod";
|
import type { z } from "zod";
|
||||||
import { type ZodError, fromZodError } from "zod-validation-error";
|
import { type ZodError, fromZodError } from "zod-validation-error";
|
||||||
import type { HonoEnv } from "~/types/api";
|
import type { HonoEnv } from "~/types/api";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { getCookie } from "@hono/hono/cookie";
|
|
||||||
import { Hooks, Plugin } from "@versia/kit";
|
import { Hooks, Plugin } from "@versia/kit";
|
||||||
import { User } from "@versia/kit/db";
|
import { User } from "@versia/kit/db";
|
||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
|
import { getCookie } from "hono/cookie";
|
||||||
import { jwtVerify } from "jose";
|
import { jwtVerify } from "jose";
|
||||||
import { JOSEError, JWTExpired } from "jose/errors";
|
import { JOSEError, JWTExpired } from "jose/errors";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { mimeLookup } from "@/content_types.ts";
|
import { mimeLookup } from "@/content_types.ts";
|
||||||
import { randomString } from "@/math.ts";
|
import { randomString } from "@/math.ts";
|
||||||
import { setCookie } from "@hono/hono/cookie";
|
|
||||||
import { createRoute, z } from "@hono/zod-openapi";
|
import { createRoute, z } from "@hono/zod-openapi";
|
||||||
import { Token, User, db } from "@versia/kit/db";
|
import { Token, User, db } from "@versia/kit/db";
|
||||||
import { type SQL, and, eq, isNull } from "@versia/kit/drizzle";
|
import { type SQL, and, eq, isNull } from "@versia/kit/drizzle";
|
||||||
import { OpenIdAccounts, RolePermissions, Users } from "@versia/kit/tables";
|
import { OpenIdAccounts, RolePermissions, Users } from "@versia/kit/tables";
|
||||||
|
import { setCookie } from "hono/cookie";
|
||||||
import { SignJWT } from "jose";
|
import { SignJWT } from "jose";
|
||||||
import type { PluginType } from "../../index.ts";
|
import type { PluginType } from "../../index.ts";
|
||||||
import { automaticOidcFlow } from "../../utils.ts";
|
import { automaticOidcFlow } from "../../utils.ts";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import type { RouterRoute } from "@hono/hono/types";
|
|
||||||
import type { OpenAPIHono } from "@hono/zod-openapi";
|
import type { OpenAPIHono } from "@hono/zod-openapi";
|
||||||
import type {
|
import type {
|
||||||
Delete,
|
Delete,
|
||||||
|
|
@ -13,6 +12,7 @@ import type {
|
||||||
} from "@versia/federation/types";
|
} from "@versia/federation/types";
|
||||||
import type { RolePermissions } from "@versia/kit/tables";
|
import type { RolePermissions } from "@versia/kit/tables";
|
||||||
import type { SocketAddress } from "bun";
|
import type { SocketAddress } from "bun";
|
||||||
|
import type { RouterRoute } from "hono/types";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import type { AuthData } from "~/classes/functions/user";
|
import type { AuthData } from "~/classes/functions/user";
|
||||||
import type { Config } from "~/packages/config-manager";
|
import type { Config } from "~/packages/config-manager";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import type { Context, MiddlewareHandler } from "@hono/hono";
|
|
||||||
import { createMiddleware } from "@hono/hono/factory";
|
|
||||||
import type { OpenAPIHono } from "@hono/zod-openapi";
|
import type { OpenAPIHono } from "@hono/zod-openapi";
|
||||||
import { getLogger } from "@logtape/logtape";
|
import { getLogger } from "@logtape/logtape";
|
||||||
import { Application, Token, db } from "@versia/kit/db";
|
import { Application, Token, db } from "@versia/kit/db";
|
||||||
|
|
@ -7,6 +5,8 @@ import { Challenges } from "@versia/kit/tables";
|
||||||
import { extractParams, verifySolution } from "altcha-lib";
|
import { extractParams, verifySolution } from "altcha-lib";
|
||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
import { type SQL, eq } from "drizzle-orm";
|
import { type SQL, eq } from "drizzle-orm";
|
||||||
|
import type { Context, MiddlewareHandler } from "hono";
|
||||||
|
import { createMiddleware } from "hono/factory";
|
||||||
import {
|
import {
|
||||||
anyOf,
|
anyOf,
|
||||||
caseInsensitive,
|
caseInsensitive,
|
||||||
|
|
@ -429,7 +429,7 @@ export const setContextFormDataToObject = (
|
||||||
* Add it to random Hono routes and hope it works
|
* Add it to random Hono routes and hope it works
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const jsonOrForm = (): MiddlewareHandler => {
|
export const jsonOrForm = (): MiddlewareHandler<HonoEnv> => {
|
||||||
return createMiddleware(async (context, next) => {
|
return createMiddleware(async (context, next) => {
|
||||||
const contentType = context.req.header("content-type");
|
const contentType = context.req.header("content-type");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { createBullBoard } from "@bull-board/api";
|
import { createBullBoard } from "@bull-board/api";
|
||||||
import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
|
import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
|
||||||
import { HonoAdapter } from "@bull-board/hono";
|
import { HonoAdapter } from "@bull-board/hono";
|
||||||
import { serveStatic } from "@hono/hono/bun";
|
|
||||||
import type { OpenAPIHono } from "@hono/zod-openapi";
|
import type { OpenAPIHono } from "@hono/zod-openapi";
|
||||||
|
import { serveStatic } from "hono/bun";
|
||||||
import { deliveryQueue } from "~/classes/queues/delivery";
|
import { deliveryQueue } from "~/classes/queues/delivery";
|
||||||
import { fetchQueue } from "~/classes/queues/fetch";
|
import { fetchQueue } from "~/classes/queues/fetch";
|
||||||
import { inboxQueue } from "~/classes/queues/inbox";
|
import { inboxQueue } from "~/classes/queues/inbox";
|
||||||
|
|
@ -37,6 +37,5 @@ export const applyToHono = (app: OpenAPIHono<HonoEnv>): void => {
|
||||||
});
|
});
|
||||||
|
|
||||||
serverAdapter.setBasePath("/admin/queues");
|
serverAdapter.setBasePath("/admin/queues");
|
||||||
// @ts-expect-error idk why this is not working
|
|
||||||
app.route("/admin/queues", serverAdapter.registerPlugin());
|
app.route("/admin/queues", serverAdapter.registerPlugin());
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue