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
+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();