Skip to content

Commit 53a2b12

Browse files
committed
style: replace classic imports with ts paths
1 parent 90288fb commit 53a2b12

File tree

29 files changed

+81
-85
lines changed

29 files changed

+81
-85
lines changed

src/cache/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Redis } from "ioredis";
22

3-
import config from "../config";
3+
import config from "@/config";
44

55
const { host, port, username, password } = config.redis;
66
export const cache = new Redis({

src/cache/repositories/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import config from "../../config";
1+
import config from "@/config";
22

33
export default class BaseRepository {
44
protected prefix: string;

src/cache/repositories/translation.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import config from "../../config";
2-
import { log } from "../../logging";
3-
import { GetTranslationOpts, Translation, TranslationUpdate } from "../../schemas/translation";
4-
import {
5-
TranslatedService,
6-
translatedServices,
7-
TranslationProvider,
8-
} from "../../types/translation";
9-
import { cache } from "../cache";
1+
import config from "@/config";
2+
import { GetTranslationOpts, Translation, TranslationUpdate } from "@/schemas/translation";
3+
import { TranslatedService, translatedServices, TranslationProvider } from "@/types/translation";
4+
import { cache } from "@/cache/cache";
105
import BaseRepository from "./base";
116

127
export default class TranslationRepository extends BaseRepository {

src/controllers/health/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Elysia } from "elysia";
22

3-
import config from "../../config";
3+
import config from "@/config";
44

55
export default new Elysia().group("/health", (app) =>
66
app.get(

src/controllers/video-translation/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { Elysia, t } from "elysia";
22

3-
import { videoTranslationModels } from "../../models/translation.model";
4-
import { translationQueue } from "../../worker";
5-
import TranslationFacade from "../../facades/translation";
6-
import config from "../../config";
7-
import { generatePreSigned, deleteAudio } from "../../s3/actions";
8-
import { validateAuthToken } from "../../libs/security";
9-
import { getNavigationData, validateNavigation } from "../../libs/navigation";
10-
import { isValidId } from "../../libs/utils";
11-
import { TranslationNotFound } from "../../errors";
3+
import { videoTranslationModels } from "@/models/translation.model";
4+
import { translationQueue } from "@/worker";
5+
import TranslationFacade from "@/facades/translation";
6+
import config from "@/config";
7+
import { generatePreSigned, deleteAudio } from "@/s3/actions";
8+
import { validateAuthToken } from "@/libs/security";
9+
import { getNavigationData, validateNavigation } from "@/libs/navigation";
10+
import { isValidId } from "@/libs/utils";
11+
import { TranslationNotFound } from "@/errors";
1212

1313
export default new Elysia().group("/video-translation", (app) =>
1414
app

src/database/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Pool } from "pg";
22
import { Kysely, PostgresDialect } from "kysely";
33

4-
import config from "../config";
4+
import config from "@/config";
55
import { Database } from "./schema";
6-
import { log } from "../logging";
6+
import { log } from "@/logging";
77

88
const dialect = new PostgresDialect({
99
pool: new Pool({

src/database/migrator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { promises as fs } from "fs";
33
import { Migrator, FileMigrationProvider } from "kysely";
44

55
import { db } from "./database";
6-
import { log } from "../logging";
6+
import { log } from "@/logging";
77

88
const action = Bun.env.MIGRATOR_ACTION ?? "upgrade";
99

src/database/repositories/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Database } from "../schema";
1+
import { Database } from "@/database/schema";
22

33
export default class BaseRepository {
44
constructor(protected dbName: keyof Database) {}

src/database/repositories/translation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { db } from "../database";
1+
import { db } from "@/database/database";
22
import {
33
TranslationUpdate,
44
Translation,
55
NewTranslation,
66
GetTranslationOpts,
7-
} from "../../schemas/translation";
7+
} from "@/schemas/translation";
88
import BaseRepository from "./base";
9-
import config from "../../config";
9+
import config from "@/config";
1010

1111
export default class TranslationRepository extends BaseRepository {
1212
constructor() {

src/database/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TranslationTable } from "../schemas/translation";
1+
import { TranslationTable } from "@/schemas/translation";
22

33
export interface Database {
44
vot_translations: TranslationTable;

0 commit comments

Comments
 (0)