Fix lints

This commit is contained in:
Jordan Eldredge 2025-12-15 22:01:13 -08:00
parent 1f875a6155
commit fe1e03836b
5 changed files with 15 additions and 11 deletions

View file

@ -7,4 +7,3 @@ export type Ctx = Express.Request;
export function getUserContext(ctx: Ctx): UserContext {
return ctx.ctx;
}

View file

@ -1,7 +1,6 @@
import { ISkin } from "./CommonSkinResolver";
import { NodeResolver, toId } from "./NodeResolver";
import ReviewResolver from "./ReviewResolver";
import path from "path";
import { ID, Int } from "grats";
import SkinModel from "../../../data/SkinModel";

View file

@ -225,7 +225,9 @@ async function main(): Promise<void> {
// Wait for the service to start
log("→ Waiting for service to be ready...", "cyan");
await new Promise((resolve) => setTimeout(resolve, 5000));
await new Promise((resolve) => {
setTimeout(resolve, 5000);
});
// Check if the service is running
const pm2List = execSilent("pm2 list");

View file

@ -22,7 +22,7 @@ export async function fetchMetadata(identifier: string): Promise<any> {
}
export async function fetchTasks(identifier: string): Promise<any> {
const result = await execFile(IA_COMMAND, ['tasks', identifier], {
const result = await execFile(IA_COMMAND, ["tasks", identifier], {
env: getVenvEnv(),
});
return result.stdout
@ -35,7 +35,7 @@ export async function uploadFile(
identifier: string,
filepath: string
): Promise<any> {
await execFile(IA_COMMAND, ['upload', identifier, filepath], {
await execFile(IA_COMMAND, ["upload", identifier, filepath], {
env: getVenvEnv(),
});
}
@ -45,19 +45,19 @@ export async function uploadFiles(
filepaths: string[],
metadata?: { [key: string]: string }
): Promise<any> {
const args = ['upload', identifier, ...filepaths];
const args = ["upload", identifier, ...filepaths];
if (metadata) {
Object.entries(metadata).forEach(([key, value]) => {
args.push(`--metadata=${key}:${value}`);
});
}
await execFile(IA_COMMAND, args, { env: getVenvEnv() });
}
export async function identifierExists(identifier: string): Promise<boolean> {
const result = await execFile(IA_COMMAND, ['metadata', identifier], {
const result = await execFile(IA_COMMAND, ["metadata", identifier], {
env: getVenvEnv(),
});
const data = JSON.parse(result.stdout);
@ -69,6 +69,10 @@ export async function setMetadata(
data: { [key: string]: string }
) {
const pairs = Object.entries(data).map(([key, value]) => `${key}:${value}`);
const args = ['metadata', identifier, ...pairs.map((pair) => `--modify=${pair}`)];
const args = [
"metadata",
identifier,
...pairs.map((pair) => `--modify=${pair}`),
];
await execFile(IA_COMMAND, args, { env: getVenvEnv() });
}

View file

@ -8,7 +8,7 @@ import SkinModel from "../data/SkinModel";
import * as Parallel from "async-parallel";
import IaItemModel from "../data/IaItemModel";
import DiscordEventHandler from "../api/DiscordEventHandler";
import { exec, execFile } from "../utils";
import { execFile } from "../utils";
import * as IAService from "../services/internetArchive";
export async function findItemsMissingImages(): Promise<string[]> {