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 { sanitizeHtml } from "@sanitization";
|
||||||
import { config } from "config-manager";
|
import { config } from "config-manager";
|
||||||
import {
|
import {
|
||||||
|
|
@ -35,7 +36,6 @@ import {
|
||||||
statusToMentions,
|
statusToMentions,
|
||||||
user,
|
user,
|
||||||
} from "~drizzle/schema";
|
} from "~drizzle/schema";
|
||||||
import { dualLogger } from "@loggers";
|
|
||||||
import { LogLevel } from "~packages/log-manager";
|
import { LogLevel } from "~packages/log-manager";
|
||||||
import type { Note } from "~types/lysand/Object";
|
import type { Note } from "~types/lysand/Object";
|
||||||
import type { Attachment as APIAttachment } from "~types/mastodon/attachment";
|
import type { Attachment as APIAttachment } from "~types/mastodon/attachment";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { getBestContentType, urlToContentFormat } from "@content_types";
|
import { getBestContentType, urlToContentFormat } from "@content_types";
|
||||||
|
import { dualLogger } from "@loggers";
|
||||||
import { addUserToMeilisearch } from "@meilisearch";
|
import { addUserToMeilisearch } from "@meilisearch";
|
||||||
import { type Config, config } from "config-manager";
|
import { type Config, config } from "config-manager";
|
||||||
import { type InferSelectModel, and, eq, sql } from "drizzle-orm";
|
import { type InferSelectModel, and, eq, sql } from "drizzle-orm";
|
||||||
|
|
@ -12,7 +13,6 @@ import {
|
||||||
relationship,
|
relationship,
|
||||||
user,
|
user,
|
||||||
} from "~drizzle/schema";
|
} from "~drizzle/schema";
|
||||||
import { dualLogger } from "@loggers";
|
|
||||||
import { LogLevel } from "~packages/log-manager";
|
import { LogLevel } from "~packages/log-manager";
|
||||||
import type { Account as APIAccount } from "~types/mastodon/account";
|
import type { Account as APIAccount } from "~types/mastodon/account";
|
||||||
import type { Source as APISource } from "~types/mastodon/source";
|
import type { Source as APISource } from "~types/mastodon/source";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { apiRoute, applyConfig } from "@api";
|
import { apiRoute, applyConfig } from "@api";
|
||||||
|
import { dualLogger } from "@loggers";
|
||||||
import { errorResponse, jsonResponse } from "@response";
|
import { errorResponse, jsonResponse } from "@response";
|
||||||
import {
|
import {
|
||||||
anyOf,
|
anyOf,
|
||||||
|
|
@ -17,7 +18,6 @@ import {
|
||||||
resolveWebFinger,
|
resolveWebFinger,
|
||||||
userToAPI,
|
userToAPI,
|
||||||
} from "~database/entities/User";
|
} from "~database/entities/User";
|
||||||
import { dualLogger } from "@loggers";
|
|
||||||
import { LogLevel } from "~packages/log-manager";
|
import { LogLevel } from "~packages/log-manager";
|
||||||
|
|
||||||
export const meta = applyConfig({
|
export const meta = applyConfig({
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { apiRoute, applyConfig } from "@api";
|
import { apiRoute, applyConfig } from "@api";
|
||||||
|
import { dualLogger } from "@loggers";
|
||||||
import { MeiliIndexType, meilisearch } from "@meilisearch";
|
import { MeiliIndexType, meilisearch } from "@meilisearch";
|
||||||
import { errorResponse, jsonResponse } from "@response";
|
import { errorResponse, jsonResponse } from "@response";
|
||||||
import { and, eq, sql } from "drizzle-orm";
|
import { and, eq, sql } from "drizzle-orm";
|
||||||
|
|
@ -12,7 +13,6 @@ import {
|
||||||
} from "~database/entities/User";
|
} from "~database/entities/User";
|
||||||
import { db } from "~drizzle/db";
|
import { db } from "~drizzle/db";
|
||||||
import { instance, user } from "~drizzle/schema";
|
import { instance, user } from "~drizzle/schema";
|
||||||
import { dualLogger } from "@loggers";
|
|
||||||
import { LogLevel } from "~packages/log-manager";
|
import { LogLevel } from "~packages/log-manager";
|
||||||
|
|
||||||
export const meta = applyConfig({
|
export const meta = applyConfig({
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { apiRoute, applyConfig } from "@api";
|
import { apiRoute, applyConfig } from "@api";
|
||||||
|
import { dualLogger } from "@loggers";
|
||||||
import { errorResponse, response } from "@response";
|
import { errorResponse, response } from "@response";
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
import type * as Lysand from "lysand-types";
|
import type * as Lysand from "lysand-types";
|
||||||
|
|
@ -11,7 +12,6 @@ import {
|
||||||
} from "~database/entities/User";
|
} from "~database/entities/User";
|
||||||
import { db } from "~drizzle/db";
|
import { db } from "~drizzle/db";
|
||||||
import { notification, relationship } from "~drizzle/schema";
|
import { notification, relationship } from "~drizzle/schema";
|
||||||
import { dualLogger } from "@loggers";
|
|
||||||
import { LogLevel } from "~packages/log-manager";
|
import { LogLevel } from "~packages/log-manager";
|
||||||
|
|
||||||
export const meta = applyConfig({
|
export const meta = applyConfig({
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,17 @@
|
||||||
import { LogManager, MultiLogManager } from "log-manager";
|
|
||||||
import { config } from "config-manager";
|
import { config } from "config-manager";
|
||||||
|
import { LogManager, MultiLogManager } from "log-manager";
|
||||||
|
|
||||||
const noColors = process.env.NO_COLORS === "true";
|
const noColors = process.env.NO_COLORS === "true";
|
||||||
const noFancyDates = process.env.NO_FANCY_DATES === "true";
|
const noFancyDates = process.env.NO_FANCY_DATES === "true";
|
||||||
|
|
||||||
const requests_log = Bun.file(config.logging.storage.requests);
|
const requests_log = Bun.file(config.logging.storage.requests);
|
||||||
|
const isEntry = true;
|
||||||
|
|
||||||
export const logger = new LogManager(
|
export const logger = new LogManager(
|
||||||
true ? requests_log : Bun.file("/dev/null"),
|
isEntry ? requests_log : Bun.file("/dev/null"),
|
||||||
);
|
);
|
||||||
export const consoleLogger = new LogManager(
|
export const consoleLogger = new LogManager(
|
||||||
true ? Bun.stdout : Bun.file("/dev/null"),
|
isEntry ? Bun.stdout : Bun.file("/dev/null"),
|
||||||
!noColors,
|
!noColors,
|
||||||
!noFancyDates,
|
!noFancyDates,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue