mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
chore: ⬆️ Upgrade to Biome 2.0
This commit is contained in:
parent
e7aec8752c
commit
963173cdae
174 changed files with 412 additions and 379 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import { afterAll, describe, expect, test } from "bun:test";
|
||||
import { randomString } from "@/math";
|
||||
import { RolePermission } from "@versia/client/schemas";
|
||||
import { Application } from "@versia/kit/db";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
import { SignJWT } from "jose";
|
||||
import { randomString } from "@/math";
|
||||
import { config } from "~/config.ts";
|
||||
import { fakeRequest, getTestUsers } from "~/tests/utils";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { auth, handleZodError, jsonOrForm } from "@/api";
|
||||
import { randomString } from "@/math";
|
||||
import { RolePermission } from "@versia/client/schemas";
|
||||
import { Application, Token, User } from "@versia/kit/db";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
import { describeRoute } from "hono-openapi";
|
||||
import { validator } from "hono-openapi/zod";
|
||||
import { type JWTPayload, SignJWT, jwtVerify } from "jose";
|
||||
import { type JWTPayload, jwtVerify, SignJWT } from "jose";
|
||||
import { JOSEError } from "jose/errors";
|
||||
import { z } from "zod";
|
||||
import { auth, handleZodError, jsonOrForm } from "@/api";
|
||||
import { randomString } from "@/math";
|
||||
import { errorRedirect, errors } from "../errors.ts";
|
||||
import type { PluginType } from "../index.ts";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { auth } from "@/api";
|
||||
import { describeRoute } from "hono-openapi";
|
||||
import { resolver } from "hono-openapi/zod";
|
||||
import { exportJWK } from "jose";
|
||||
import { z } from "zod";
|
||||
import { auth } from "@/api";
|
||||
import type { PluginType } from "../index.ts";
|
||||
|
||||
export default (plugin: PluginType): void => {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import { handleZodError } from "@/api";
|
||||
import { randomString } from "@/math.ts";
|
||||
import { Account as AccountSchema } from "@versia/client/schemas";
|
||||
import { RolePermission } from "@versia/client/schemas";
|
||||
import { Media, Token, User, db } from "@versia/kit/db";
|
||||
import { type SQL, and, eq, isNull } from "@versia/kit/drizzle";
|
||||
import { db, Media, Token, User } from "@versia/kit/db";
|
||||
import { and, eq, isNull, type SQL } from "@versia/kit/drizzle";
|
||||
import { OpenIdAccounts, Users } from "@versia/kit/tables";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
import { setCookie } from "hono/cookie";
|
||||
import { describeRoute } from "hono-openapi";
|
||||
import { validator } from "hono-openapi/zod";
|
||||
import { setCookie } from "hono/cookie";
|
||||
import { SignJWT } from "jose";
|
||||
import { z } from "zod";
|
||||
import { handleZodError } from "@/api";
|
||||
import { randomString } from "@/math.ts";
|
||||
import { ApiError } from "~/classes/errors/api-error.ts";
|
||||
import type { PluginType } from "../../index.ts";
|
||||
import { automaticOidcFlow } from "../../utils.ts";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { handleZodError, jsonOrForm } from "@/api";
|
||||
import { Token, db } from "@versia/kit/db";
|
||||
import { db, Token } from "@versia/kit/db";
|
||||
import { and, eq } from "@versia/kit/drizzle";
|
||||
import { Tokens } from "@versia/kit/tables";
|
||||
import { describeRoute } from "hono-openapi";
|
||||
import { resolver, validator } from "hono-openapi/zod";
|
||||
import { z } from "zod";
|
||||
import { handleZodError, jsonOrForm } from "@/api";
|
||||
import type { PluginType } from "../../index.ts";
|
||||
|
||||
export default (plugin: PluginType): void => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { handleZodError } from "@/api.ts";
|
||||
import { Application, db } from "@versia/kit/db";
|
||||
import { OpenIdLoginFlows } from "@versia/kit/tables";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
|
|
@ -11,6 +10,7 @@ import {
|
|||
processDiscoveryResponse,
|
||||
} from "oauth4webapi";
|
||||
import { z } from "zod";
|
||||
import { handleZodError } from "@/api.ts";
|
||||
import type { PluginType } from "../../index.ts";
|
||||
import { oauthRedirectUri } from "../../utils.ts";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { handleZodError, jsonOrForm } from "@/api";
|
||||
import { Application, Token } from "@versia/kit/db";
|
||||
import { and, eq } from "@versia/kit/drizzle";
|
||||
import { Tokens } from "@versia/kit/tables";
|
||||
import { describeRoute } from "hono-openapi";
|
||||
import { resolver, validator } from "hono-openapi/zod";
|
||||
import { z } from "zod";
|
||||
import { handleZodError, jsonOrForm } from "@/api";
|
||||
import type { PluginType } from "../../index.ts";
|
||||
|
||||
export default (plugin: PluginType): void => {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { auth, handleZodError } from "@/api";
|
||||
import { RolePermission } from "@versia/client/schemas";
|
||||
import { db } from "@versia/kit/db";
|
||||
import { type SQL, eq } from "@versia/kit/drizzle";
|
||||
import { eq, type SQL } from "@versia/kit/drizzle";
|
||||
import { OpenIdAccounts } from "@versia/kit/tables";
|
||||
import { describeRoute } from "hono-openapi";
|
||||
import { resolver, validator } from "hono-openapi/zod";
|
||||
import { z } from "zod";
|
||||
import { auth, handleZodError } from "@/api";
|
||||
import { ApiError } from "~/classes/errors/api-error";
|
||||
import type { PluginType } from "~/plugins/openid";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { auth, handleZodError } from "@/api";
|
||||
import { RolePermission } from "@versia/client/schemas";
|
||||
import { Application, db } from "@versia/kit/db";
|
||||
import { OpenIdLoginFlows } from "@versia/kit/tables";
|
||||
|
|
@ -10,6 +9,7 @@ import {
|
|||
generateRandomCodeVerifier,
|
||||
} from "oauth4webapi";
|
||||
import { z } from "zod";
|
||||
import { auth, handleZodError } from "@/api";
|
||||
import { ApiError } from "~/classes/errors/api-error.ts";
|
||||
import type { PluginType } from "../../index.ts";
|
||||
import { oauthDiscoveryRequest, oauthRedirectUri } from "../../utils.ts";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue