Update code for biome v2

This commit is contained in:
Zoe Roux
2025-07-14 01:10:18 +02:00
parent bbe1ad4ef1
commit 7b3f3cc1c1
90 changed files with 605 additions and 325 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
import { type SQL, and, desc, eq, isNotNull, ne, sql } from "drizzle-orm";
import { and, desc, eq, isNotNull, ne, type SQL, sql } from "drizzle-orm";
import { Elysia, t } from "elysia";
import { auth } from "~/auth";
import { db } from "~/db";
@@ -31,14 +31,14 @@ import { KError } from "~/models/error";
import { madeInAbyss } from "~/models/examples";
import {
AcceptLanguage,
createPage,
Filter,
type FilterDef,
Page,
Sort,
createPage,
isUuid,
keysetPaginate,
Page,
processLanguages,
Sort,
sortToSql,
} from "~/models/utils";
import { desc as description } from "~/models/utils/descriptions";
+2 -2
View File
@@ -11,10 +11,10 @@ import { KError } from "~/models/error";
import { SeedHistory } from "~/models/history";
import {
AcceptLanguage,
Filter,
Page,
createPage,
Filter,
isUuid,
Page,
processLanguages,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+3 -3
View File
@@ -8,13 +8,13 @@ import { getColumns, sqlarr } from "~/db/utils";
import { Entry } from "~/models/entry";
import {
AcceptLanguage,
createPage,
Filter,
type FilterDef,
Page,
Sort,
createPage,
keysetPaginate,
Page,
processLanguages,
Sort,
sortToSql,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+2 -2
View File
@@ -18,11 +18,11 @@ import { Movie } from "~/models/movie";
import { Serie } from "~/models/serie";
import {
AcceptLanguage,
createPage,
DbMetadata,
Filter,
Page,
createPage,
isUuid,
Page,
processLanguages,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+4 -4
View File
@@ -1,20 +1,20 @@
import { and, eq, sql } from "drizzle-orm";
import { Elysia, t } from "elysia";
import { db } from "~/db";
import { seasonTranslations, seasons, shows } from "~/db/schema";
import { seasons, seasonTranslations, shows } from "~/db/schema";
import { getColumns, sqlarr } from "~/db/utils";
import { KError } from "~/models/error";
import { madeInAbyss } from "~/models/examples";
import {
AcceptLanguage,
createPage,
Filter,
type FilterDef,
Page,
Sort,
createPage,
isUuid,
keysetPaginate,
Page,
processLanguages,
Sort,
sortToSql,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+2 -2
View File
@@ -1,11 +1,11 @@
import path from "node:path";
import { encode } from "blurhash";
import { type SQL, and, eq, is, lt, sql } from "drizzle-orm";
import { and, eq, is, lt, type SQL, sql } from "drizzle-orm";
import { PgColumn, type PgTable } from "drizzle-orm/pg-core";
import { version } from "package.json";
import type { PoolClient } from "pg";
import sharp from "sharp";
import { type Transaction, db } from "~/db";
import { db, type Transaction } from "~/db";
import { mqueue } from "~/db/schema/mqueue";
import type { Image } from "~/models/utils";
import { getFile } from "~/utils";
@@ -1,6 +1,6 @@
import { sql } from "drizzle-orm";
import { db } from "~/db";
import { showTranslations, shows } from "~/db/schema";
import { shows, showTranslations } from "~/db/schema";
import { conflictUpdateAllExcept } from "~/db/utils";
import type { SeedCollection } from "~/models/collections";
import type { SeedMovie } from "~/models/movie";
+1 -1
View File
@@ -1,4 +1,4 @@
import { type Column, type SQL, eq, sql } from "drizzle-orm";
import { type Column, eq, type SQL, sql } from "drizzle-orm";
import { db } from "~/db";
import {
entries,
+1 -1
View File
@@ -1,5 +1,5 @@
import { db } from "~/db";
import { seasonTranslations, seasons } from "~/db/schema";
import { seasons, seasonTranslations } from "~/db/schema";
import { conflictUpdateAllExcept } from "~/db/utils";
import type { SeedSeason } from "~/models/season";
import { enqueueOptImage } from "../images";
+3 -3
View File
@@ -1,15 +1,15 @@
import {
type SQLWrapper,
and,
count,
eq,
exists,
isNull,
ne,
type SQLWrapper,
sql,
} from "drizzle-orm";
import { type Transaction, db } from "~/db";
import { entries, entryVideoJoin, showTranslations, shows } from "~/db/schema";
import { db, type Transaction } from "~/db";
import { entries, entryVideoJoin, shows, showTranslations } from "~/db/schema";
import { conflictUpdateAllExcept, sqlarr } from "~/db/utils";
import type { SeedCollection } from "~/models/collections";
import type { SeedMovie } from "~/models/movie";
+1 -1
View File
@@ -1,5 +1,5 @@
import { db } from "~/db";
import { showStudioJoin, studioTranslations, studios } from "~/db/schema";
import { showStudioJoin, studios, studioTranslations } from "~/db/schema";
import { conflictUpdateAllExcept } from "~/db/utils";
import type { SeedStudio } from "~/models/studio";
import { enqueueOptImage } from "../images";
+1 -1
View File
@@ -1,7 +1,7 @@
// oh i hate js dates so much.
export const guessNextRefresh = (airDate: Date | string) => {
if (typeof airDate === "string") airDate = new Date(airDate);
const diff = new Date().getTime() - airDate.getTime();
const diff = Date.now() - airDate.getTime();
const days = diff / (24 * 60 * 60 * 1000);
const ret = new Date();
+2 -2
View File
@@ -16,10 +16,10 @@ import { Serie } from "~/models/serie";
import { Show } from "~/models/show";
import {
AcceptLanguage,
Filter,
Page,
createPage,
Filter,
isUuid,
Page,
processLanguages,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+1 -1
View File
@@ -1,4 +1,4 @@
import { and, eq, exists, gt, ne, type SQL, sql } from "drizzle-orm";
import { and, eq, exists, ne, type SQL, sql } from "drizzle-orm";
import { db } from "~/db";
import {
entries,
+2 -2
View File
@@ -9,10 +9,10 @@ import { bubble } from "~/models/examples";
import { FullMovie, Movie, MovieTranslation } from "~/models/movie";
import {
AcceptLanguage,
Filter,
Page,
createPage,
Filter,
isUuid,
Page,
processLanguages,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+2 -2
View File
@@ -9,10 +9,10 @@ import { madeInAbyss } from "~/models/examples";
import { FullSerie, Serie, SerieTranslation } from "~/models/serie";
import {
AcceptLanguage,
Filter,
Page,
createPage,
Filter,
isUuid,
Page,
processLanguages,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+1 -1
View File
@@ -8,9 +8,9 @@ import { KError } from "~/models/error";
import { Show } from "~/models/show";
import {
AcceptLanguage,
createPage,
Filter,
Page,
createPage,
processLanguages,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+5 -5
View File
@@ -1,9 +1,9 @@
import { type SQL, and, eq, sql } from "drizzle-orm";
import { and, eq, type SQL, sql } from "drizzle-orm";
import Elysia, { t } from "elysia";
import { auth } from "~/auth";
import { prefix } from "~/base";
import { db } from "~/db";
import { profiles, showTranslations, shows } from "~/db/schema";
import { profiles, shows, showTranslations } from "~/db/schema";
import { roles, staff } from "~/db/schema/staff";
import { watchlist } from "~/db/schema/watchlist";
import { getColumns, jsonbBuildObject, sqlarr } from "~/db/utils";
@@ -13,15 +13,15 @@ import { Role, Staff } from "~/models/staff";
import { RoleWShow, RoleWStaff } from "~/models/staff-roles";
import {
AcceptLanguage,
createPage,
Filter,
type FilterDef,
type Image,
Page,
Sort,
createPage,
isUuid,
keysetPaginate,
Page,
processLanguages,
Sort,
sortToSql,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+5 -5
View File
@@ -1,4 +1,4 @@
import { type SQL, and, eq, exists, sql } from "drizzle-orm";
import { and, eq, exists, type SQL, sql } from "drizzle-orm";
import Elysia, { t } from "elysia";
import { auth } from "~/auth";
import { prefix } from "~/base";
@@ -6,8 +6,8 @@ import { db } from "~/db";
import {
showStudioJoin,
shows,
studioTranslations,
studios,
studioTranslations,
} from "~/db/schema";
import {
getColumns,
@@ -22,14 +22,14 @@ import { Show } from "~/models/show";
import { Studio, StudioTranslation } from "~/models/studio";
import {
AcceptLanguage,
Filter,
Page,
Sort,
buildRelations,
createPage,
Filter,
isUuid,
keysetPaginate,
Page,
processLanguages,
Sort,
sortToSql,
} from "~/models/utils";
import { desc } from "~/models/utils/descriptions";
+4 -4
View File
@@ -1,6 +1,6 @@
import { and, eq, notExists, or, sql } from "drizzle-orm";
import { Elysia, t } from "elysia";
import { type Transaction, db } from "~/db";
import { db, type Transaction } from "~/db";
import { entries, entryVideoJoin, shows, videos } from "~/db/schema";
import {
conflictUpdateAllExcept,
@@ -13,12 +13,12 @@ import {
import { KError } from "~/models/error";
import { bubbleVideo } from "~/models/examples";
import {
Page,
type Resource,
Sort,
createPage,
isUuid,
keysetPaginate,
Page,
type Resource,
Sort,
sortToSql,
} from "~/models/utils";
import { desc as description } from "~/models/utils/descriptions";