mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59: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
|
|
@ -2,15 +2,15 @@ import type {
|
|||
Application as ApplicationSchema,
|
||||
CredentialApplication,
|
||||
} from "@versia/client/schemas";
|
||||
import { Token, db } from "@versia/kit/db";
|
||||
import { db, Token } from "@versia/kit/db";
|
||||
import { Applications } from "@versia/kit/tables";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import type { z } from "zod";
|
||||
import { BaseInterface } from "./base.ts";
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { emojiValidatorWithColons, emojiValidatorWithIdentifiers } from "@/api";
|
||||
import type { CustomEmoji } from "@versia/client/schemas";
|
||||
import { type Instance, Media, db } from "@versia/kit/db";
|
||||
import { db, type Instance, Media } from "@versia/kit/db";
|
||||
import { Emojis, type Instances, type Medias } from "@versia/kit/tables";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
and,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
isNull,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import type { z } from "zod";
|
||||
import { emojiValidatorWithColons, emojiValidatorWithIdentifiers } from "@/api";
|
||||
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";
|
||||
import type { ImageContentFormatSchema } from "~/packages/sdk/schemas/index.ts";
|
||||
import { BaseInterface } from "./base.ts";
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import { Instances } from "@versia/kit/tables";
|
|||
import { randomUUIDv7 } from "bun";
|
||||
import chalk from "chalk";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import { config } from "~/config.ts";
|
||||
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ import {
|
|||
type Users,
|
||||
} from "@versia/kit/tables";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
and,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import { config } from "~/config.ts";
|
||||
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { join } from "node:path";
|
||||
import { mimeLookup } from "@/content_types.ts";
|
||||
import type { Attachment as AttachmentSchema } from "@versia/client/schemas";
|
||||
import { db } from "@versia/kit/db";
|
||||
import { Medias } from "@versia/kit/tables";
|
||||
import { S3Client, SHA256, randomUUIDv7, write } from "bun";
|
||||
import { randomUUIDv7, S3Client, SHA256, write } from "bun";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import sharp from "sharp";
|
||||
import type { z } from "zod";
|
||||
import { mimeLookup } from "@/content_types.ts";
|
||||
import { MediaBackendType } from "~/classes/config/schema.ts";
|
||||
import { config } from "~/config.ts";
|
||||
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
import { idValidator } from "@/api";
|
||||
import { mergeAndDeduplicate } from "@/lib.ts";
|
||||
import { sanitizedHtmlStrip } from "@/sanitization";
|
||||
import type { Status } from "@versia/client/schemas";
|
||||
import { Instance, db } from "@versia/kit/db";
|
||||
import { db, Instance } from "@versia/kit/db";
|
||||
import {
|
||||
EmojiToNote,
|
||||
MediasToNotes,
|
||||
NoteToMentions,
|
||||
Notes,
|
||||
NoteToMentions,
|
||||
Users,
|
||||
} from "@versia/kit/tables";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
and,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
isNotNull,
|
||||
type SQL,
|
||||
sql,
|
||||
} from "drizzle-orm";
|
||||
import { htmlToText } from "html-to-text";
|
||||
import { createRegExp, exactly, global } from "magic-regexp";
|
||||
import type { z } from "zod";
|
||||
import { idValidator } from "@/api";
|
||||
import { mergeAndDeduplicate } from "@/lib.ts";
|
||||
import { sanitizedHtmlStrip } from "@/sanitization";
|
||||
import { contentToHtml, findManyNotes } from "~/classes/functions/status";
|
||||
import { config } from "~/config.ts";
|
||||
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import type { Notification as NotificationSchema } from "@versia/client/schemas";
|
||||
import { Note, User, db } from "@versia/kit/db";
|
||||
import { db, Note, User } from "@versia/kit/db";
|
||||
import { Notifications } from "@versia/kit/tables";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import type { z } from "zod";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import type { WebPushSubscription as WebPushSubscriptionSchema } from "@versia/client/schemas";
|
||||
import { type Token, type User, db } from "@versia/kit/db";
|
||||
import { db, type Token, type User } from "@versia/kit/db";
|
||||
import { PushSubscriptions, Tokens } from "@versia/kit/tables";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import type { z } from "zod";
|
||||
import { BaseInterface } from "./base.ts";
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { Emoji, Instance, type Note, User, db } from "@versia/kit/db";
|
||||
import { db, Emoji, Instance, type Note, User } from "@versia/kit/db";
|
||||
import { type Notes, Reactions, type Users } from "@versia/kit/tables";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import { config } from "~/config.ts";
|
||||
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ import { db } from "@versia/kit/db";
|
|||
import { Relationships } from "@versia/kit/tables";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
and,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import { z } from "zod";
|
||||
import { BaseInterface } from "./base.ts";
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
import type { Role as RoleSchema } from "@versia/client/schemas";
|
||||
import type { RolePermission } from "@versia/client/schemas";
|
||||
import { db } from "@versia/kit/db";
|
||||
import { RoleToUsers, Roles } from "@versia/kit/tables";
|
||||
import { Roles, RoleToUsers } from "@versia/kit/tables";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
and,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import type { z } from "zod";
|
||||
import { config } from "~/config.ts";
|
||||
import { ProxiableUrl } from "../media/url.ts";
|
||||
import { BaseInterface } from "./base.ts";
|
||||
|
||||
type RoleType = InferSelectModel<typeof Roles>;
|
||||
|
||||
export class Role extends BaseInterface<typeof Roles> {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Notes, Notifications, Users } from "@versia/kit/tables";
|
||||
import { type SQL, gt } from "drizzle-orm";
|
||||
import { gt, type SQL } from "drizzle-orm";
|
||||
import { config } from "~/config.ts";
|
||||
import { Note } from "./note.ts";
|
||||
import { Notification } from "./notification.ts";
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import type { Token as TokenSchema } from "@versia/client/schemas";
|
||||
import { type Application, User, db } from "@versia/kit/db";
|
||||
import { type Application, db, User } from "@versia/kit/db";
|
||||
import { Tokens } from "@versia/kit/tables";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
desc,
|
||||
eq,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
type SQL,
|
||||
} from "drizzle-orm";
|
||||
import type { z } from "zod";
|
||||
import { BaseInterface } from "./base.ts";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
import { idValidator } from "@/api";
|
||||
import { getBestContentType } from "@/content_types";
|
||||
import { randomString } from "@/math";
|
||||
import { sentry } from "@/sentry";
|
||||
import { getLogger } from "@logtape/logtape";
|
||||
import type {
|
||||
Account,
|
||||
|
|
@ -9,35 +5,39 @@ import type {
|
|||
Source,
|
||||
} from "@versia/client/schemas";
|
||||
import type { RolePermission } from "@versia/client/schemas";
|
||||
import { Media, Notification, PushSubscription, db } from "@versia/kit/db";
|
||||
import { db, Media, Notification, PushSubscription } from "@versia/kit/db";
|
||||
import {
|
||||
EmojiToUser,
|
||||
Likes,
|
||||
NoteToMentions,
|
||||
Notes,
|
||||
NoteToMentions,
|
||||
Notifications,
|
||||
UserToPinnedNotes,
|
||||
Users,
|
||||
UserToPinnedNotes,
|
||||
} from "@versia/kit/tables";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
import { password as bunPassword } from "bun";
|
||||
import chalk from "chalk";
|
||||
import {
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
type SQL,
|
||||
and,
|
||||
countDistinct,
|
||||
desc,
|
||||
eq,
|
||||
gte,
|
||||
type InferInsertModel,
|
||||
type InferSelectModel,
|
||||
inArray,
|
||||
isNotNull,
|
||||
isNull,
|
||||
type SQL,
|
||||
sql,
|
||||
} from "drizzle-orm";
|
||||
import { htmlToText } from "html-to-text";
|
||||
import type { z } from "zod";
|
||||
import { idValidator } from "@/api";
|
||||
import { getBestContentType } from "@/content_types";
|
||||
import { randomString } from "@/math";
|
||||
import { sentry } from "@/sentry";
|
||||
import { findManyUsers } from "~/classes/functions/user";
|
||||
import { searchManager } from "~/classes/search/search-manager";
|
||||
import { config } from "~/config.ts";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue