mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
Fix errors flagged by Biome
This commit is contained in:
parent
27354f2d74
commit
e67dc07473
|
|
@ -1,3 +1,4 @@
|
|||
import { dualLogger } from "@loggers";
|
||||
import { sanitizeHtml } from "@sanitization";
|
||||
import { config } from "config-manager";
|
||||
import {
|
||||
|
|
@ -35,7 +36,6 @@ import {
|
|||
statusToMentions,
|
||||
user,
|
||||
} from "~drizzle/schema";
|
||||
import { dualLogger } from "@loggers";
|
||||
import { LogLevel } from "~packages/log-manager";
|
||||
import type { Note } from "~types/lysand/Object";
|
||||
import type { Attachment as APIAttachment } from "~types/mastodon/attachment";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { getBestContentType, urlToContentFormat } from "@content_types";
|
||||
import { dualLogger } from "@loggers";
|
||||
import { addUserToMeilisearch } from "@meilisearch";
|
||||
import { type Config, config } from "config-manager";
|
||||
import { type InferSelectModel, and, eq, sql } from "drizzle-orm";
|
||||
|
|
@ -12,7 +13,6 @@ import {
|
|||
relationship,
|
||||
user,
|
||||
} from "~drizzle/schema";
|
||||
import { dualLogger } from "@loggers";
|
||||
import { LogLevel } from "~packages/log-manager";
|
||||
import type { Account as APIAccount } from "~types/mastodon/account";
|
||||
import type { Source as APISource } from "~types/mastodon/source";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { apiRoute, applyConfig } from "@api";
|
||||
import { dualLogger } from "@loggers";
|
||||
import { errorResponse, jsonResponse } from "@response";
|
||||
import {
|
||||
anyOf,
|
||||
|
|
@ -17,7 +18,6 @@ import {
|
|||
resolveWebFinger,
|
||||
userToAPI,
|
||||
} from "~database/entities/User";
|
||||
import { dualLogger } from "@loggers";
|
||||
import { LogLevel } from "~packages/log-manager";
|
||||
|
||||
export const meta = applyConfig({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { apiRoute, applyConfig } from "@api";
|
||||
import { dualLogger } from "@loggers";
|
||||
import { MeiliIndexType, meilisearch } from "@meilisearch";
|
||||
import { errorResponse, jsonResponse } from "@response";
|
||||
import { and, eq, sql } from "drizzle-orm";
|
||||
|
|
@ -12,7 +13,6 @@ import {
|
|||
} from "~database/entities/User";
|
||||
import { db } from "~drizzle/db";
|
||||
import { instance, user } from "~drizzle/schema";
|
||||
import { dualLogger } from "@loggers";
|
||||
import { LogLevel } from "~packages/log-manager";
|
||||
|
||||
export const meta = applyConfig({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { apiRoute, applyConfig } from "@api";
|
||||
import { dualLogger } from "@loggers";
|
||||
import { errorResponse, response } from "@response";
|
||||
import { eq } from "drizzle-orm";
|
||||
import type * as Lysand from "lysand-types";
|
||||
|
|
@ -11,7 +12,6 @@ import {
|
|||
} from "~database/entities/User";
|
||||
import { db } from "~drizzle/db";
|
||||
import { notification, relationship } from "~drizzle/schema";
|
||||
import { dualLogger } from "@loggers";
|
||||
import { LogLevel } from "~packages/log-manager";
|
||||
|
||||
export const meta = applyConfig({
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
import { LogManager, MultiLogManager } from "log-manager";
|
||||
import { config } from "config-manager";
|
||||
import { LogManager, MultiLogManager } from "log-manager";
|
||||
|
||||
const noColors = process.env.NO_COLORS === "true";
|
||||
const noFancyDates = process.env.NO_FANCY_DATES === "true";
|
||||
|
||||
const requests_log = Bun.file(config.logging.storage.requests);
|
||||
const isEntry = true;
|
||||
|
||||
export const logger = new LogManager(
|
||||
true ? requests_log : Bun.file("/dev/null"),
|
||||
isEntry ? requests_log : Bun.file("/dev/null"),
|
||||
);
|
||||
export const consoleLogger = new LogManager(
|
||||
true ? Bun.stdout : Bun.file("/dev/null"),
|
||||
isEntry ? Bun.stdout : Bun.file("/dev/null"),
|
||||
!noColors,
|
||||
!noFancyDates,
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue