diff --git a/apps/api/bin/clearDatabase.ts b/apps/api/bin/clearDatabase.ts index c445210f..0641be96 100644 --- a/apps/api/bin/clearDatabase.ts +++ b/apps/api/bin/clearDatabase.ts @@ -1,3 +1,3 @@ -import { clearDatabase } from '@/test/clearDatabase' +import { clearDatabase } from '#/test/clearDatabase' await clearDatabase() diff --git a/apps/api/bin/kyselyCodegen.ts b/apps/api/bin/kyselyCodegen.ts index 246fcd9e..7c0063ac 100644 --- a/apps/api/bin/kyselyCodegen.ts +++ b/apps/api/bin/kyselyCodegen.ts @@ -3,7 +3,7 @@ import { fileURLToPath } from 'node:url' import { DialectManager, Generator } from 'kysely-codegen' -import { db } from '@/lib/db' +import { db } from '#/lib/db' const __dirname = fileURLToPath(new URL('.', import.meta.url)) diff --git a/apps/api/src/__tests__/schema.test.ts b/apps/api/src/__tests__/schema.test.ts index dd01470c..5db1c7cc 100644 --- a/apps/api/src/__tests__/schema.test.ts +++ b/apps/api/src/__tests__/schema.test.ts @@ -1,5 +1,5 @@ -import { graphql } from '@/generated/gql/index' -import { executeOperation } from '@/test/testUtils' +import { graphql } from '#/generated/gql/index' +import { executeOperation } from '#/test/testUtils' describe('schema', () => { it('returns a hello world', async () => { diff --git a/apps/api/src/bin/migrate.ts b/apps/api/src/bin/migrate.ts index 1560a99f..a7b32d82 100644 --- a/apps/api/src/bin/migrate.ts +++ b/apps/api/src/bin/migrate.ts @@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url' import { FileMigrationProvider, Migrator } from 'kysely' -import { db } from '@/lib/db' +import { db } from '#/lib/db' const __dirname = fileURLToPath(new URL('.', import.meta.url)) const migrator = new Migrator({ diff --git a/apps/api/src/features/auth/__tests__/auth.schema.test.ts b/apps/api/src/features/auth/__tests__/auth.schema.test.ts index 8c2f3f2f..16852aa8 100644 --- a/apps/api/src/features/auth/__tests__/auth.schema.test.ts +++ b/apps/api/src/features/auth/__tests__/auth.schema.test.ts @@ -1,12 +1,12 @@ import { type Selectable } from 'kysely' import { nanoid } from 'nanoid' -import { userFactory } from '@/features/users' -import { type User } from '@/generated/db' -import { type LoginInput, type RegisterInput } from '@/generated/gql/graphql' -import { graphql } from '@/generated/gql/index' -import { db } from '@/lib/db' -import { checkErrors, executeOperation, expectErrors } from '@/test/testUtils' +import { userFactory } from '#/features/users' +import { type User } from '#/generated/db' +import { type LoginInput, type RegisterInput } from '#/generated/gql/graphql' +import { graphql } from '#/generated/gql/index' +import { db } from '#/lib/db' +import { checkErrors, executeOperation, expectErrors } from '#/test/testUtils' import { hashPassword } from '../auth.service' diff --git a/apps/api/src/features/auth/auth.schema.ts b/apps/api/src/features/auth/auth.schema.ts index 772c64f0..016cb240 100644 --- a/apps/api/src/features/auth/auth.schema.ts +++ b/apps/api/src/features/auth/auth.schema.ts @@ -1,8 +1,8 @@ import { ZodError } from 'zod' -import { UserRef } from '@/features/users' -import { UnauthorizedError } from '@/lib/errors' -import { builder } from '@/schemaBuilder' +import { UserRef } from '#/features/users' +import { UnauthorizedError } from '#/lib/errors' +import { builder } from '#/schemaBuilder' import * as authService from './auth.service' diff --git a/apps/api/src/features/auth/auth.service.ts b/apps/api/src/features/auth/auth.service.ts index 8f3de0a3..4e0cbb61 100644 --- a/apps/api/src/features/auth/auth.service.ts +++ b/apps/api/src/features/auth/auth.service.ts @@ -4,10 +4,10 @@ import bcrypt from 'bcryptjs' import jwt from 'jsonwebtoken' import { ZodError } from 'zod' -import { config } from '@/config' -import { usersService } from '@/features/users' -import { type LoginInput, type RegisterInput } from '@/generated/gql/graphql' -import { type Context } from '@/types/context' +import { config } from '#/config' +import { usersService } from '#/features/users' +import { type LoginInput, type RegisterInput } from '#/generated/gql/graphql' +import { type Context } from '#/types/context' import { ACCESS_TOKEN_COOKIE, REFRESH_TOKEN_COOKIE } from './constants' import * as sessionRepository from './session.repository' diff --git a/apps/api/src/features/auth/session.repository.ts b/apps/api/src/features/auth/session.repository.ts index 5487aad3..5525d585 100644 --- a/apps/api/src/features/auth/session.repository.ts +++ b/apps/api/src/features/auth/session.repository.ts @@ -1,7 +1,7 @@ import { type InsertObject } from 'kysely' -import { type DB } from '@/generated/db' -import { type Context } from '@/types/context' +import { type DB } from '#/generated/db' +import { type Context } from '#/types/context' export const findOne = ({ ctx, diff --git a/apps/api/src/features/series/__tests__/scopes.ts b/apps/api/src/features/series/__tests__/scopes.ts index c1a045e9..f6e2c21a 100644 --- a/apps/api/src/features/series/__tests__/scopes.ts +++ b/apps/api/src/features/series/__tests__/scopes.ts @@ -1,11 +1,11 @@ import nock from 'nock' -import { config } from '@/config' +import { config } from '#/config' import { type TMDbSearchResponse, type TMDbSeriesResponse, type TMDbSeasonResponse, -} from '@/features/tmdb' +} from '#/features/tmdb' export const mockTMDbSearchRequest = ( keyword: string, diff --git a/apps/api/src/features/series/__tests__/series.schema.test.ts b/apps/api/src/features/series/__tests__/series.schema.test.ts index d83b71da..894841d0 100644 --- a/apps/api/src/features/series/__tests__/series.schema.test.ts +++ b/apps/api/src/features/series/__tests__/series.schema.test.ts @@ -7,18 +7,18 @@ import { tmdbEpisodeFactory, tmdbSeasonFactory, tmdbSeriesDetailsFactory, -} from '@/features/tmdb' -import { userFactory } from '@/features/users' -import { type User } from '@/generated/db' -import { graphql } from '@/generated/gql' -import { type SeriesUpdateStatusInput } from '@/generated/gql/graphql' -import { db } from '@/lib/db' +} from '#/features/tmdb' +import { userFactory } from '#/features/users' +import { type User } from '#/generated/db' +import { graphql } from '#/generated/gql' +import { type SeriesUpdateStatusInput } from '#/generated/gql/graphql' +import { db } from '#/lib/db' import { checkErrors, createSeriesWithEpisodesAndSeasons, executeOperation, expectErrors, -} from '@/test/testUtils' +} from '#/test/testUtils' import { UserSeriesStatus } from '../constants' import { episodeFactory } from '../episode.factory' diff --git a/apps/api/src/features/series/__tests__/series.service.test.ts b/apps/api/src/features/series/__tests__/series.service.test.ts index e9939acc..ca9f7349 100644 --- a/apps/api/src/features/series/__tests__/series.service.test.ts +++ b/apps/api/src/features/series/__tests__/series.service.test.ts @@ -1,20 +1,20 @@ import { type LiterallyAnything } from '@serieslist/type-utils' import { format, subDays } from 'date-fns' -import { seriesProgressFactory } from '@/features/seriesProgress' +import { seriesProgressFactory } from '#/features/seriesProgress' import { tmdbEpisodeFactory, tmdbNotFoundResponseFactory, tmdbSeasonFactory, tmdbSeriesDetailsFactory, -} from '@/features/tmdb' -import { userFactory } from '@/features/users' -import { db } from '@/lib/db' +} from '#/features/tmdb' +import { userFactory } from '#/features/users' +import { db } from '#/lib/db' import { createContext, createSeenEpisodesForUser, createSeriesWithEpisodesAndSeasons, -} from '@/test/testUtils' +} from '#/test/testUtils' import { episodeFactory } from '../episode.factory' import { seasonFactory } from '../season.factory' diff --git a/apps/api/src/features/series/episode.factory.ts b/apps/api/src/features/series/episode.factory.ts index f9a0f12f..b7ae7ab7 100644 --- a/apps/api/src/features/series/episode.factory.ts +++ b/apps/api/src/features/series/episode.factory.ts @@ -2,9 +2,9 @@ import { Factory } from 'fishery' import { type Selectable } from 'kysely' import { nanoid } from 'nanoid' -import { type Episode } from '@/generated/db' -import { db } from '@/lib/db' -import { generateRandomInt } from '@/utils/generateRandomInt' +import { type Episode } from '#/generated/db' +import { db } from '#/lib/db' +import { generateRandomInt } from '#/utils/generateRandomInt' import { seasonFactory } from './season.factory' diff --git a/apps/api/src/features/series/episode.repository.ts b/apps/api/src/features/series/episode.repository.ts index 91d9cdee..cfb87980 100644 --- a/apps/api/src/features/series/episode.repository.ts +++ b/apps/api/src/features/series/episode.repository.ts @@ -1,7 +1,7 @@ import { type InsertObject } from 'kysely' -import { type DB } from '@/generated/db' -import { type DBContext, type Context } from '@/types/context' +import { type DB } from '#/generated/db' +import { type DBContext, type Context } from '#/types/context' /** * Return the episode TMDB IDs and season IDs ordered by the season and diff --git a/apps/api/src/features/series/episodes.service.ts b/apps/api/src/features/series/episodes.service.ts index 6aa8e03f..34811c39 100644 --- a/apps/api/src/features/series/episodes.service.ts +++ b/apps/api/src/features/series/episodes.service.ts @@ -1,9 +1,9 @@ import index from 'just-index' import { type Selectable } from 'kysely' -import { type Episode } from '@/generated/db' -import { type DBContext, type Context } from '@/types/context' -import { groupEntitiesByKeyToNestedArray } from '@/utils/groupEntitiesByKeyToNestedArray' +import { type Episode } from '#/generated/db' +import { type DBContext, type Context } from '#/types/context' +import { groupEntitiesByKeyToNestedArray } from '#/utils/groupEntitiesByKeyToNestedArray' import * as episodeRepository from './episode.repository' diff --git a/apps/api/src/features/series/season.factory.ts b/apps/api/src/features/series/season.factory.ts index 33242bb7..92df757f 100644 --- a/apps/api/src/features/series/season.factory.ts +++ b/apps/api/src/features/series/season.factory.ts @@ -1,9 +1,9 @@ import { Factory } from 'fishery' import { type Selectable } from 'kysely' -import { type Season } from '@/generated/db' -import { db } from '@/lib/db' -import { generateRandomInt } from '@/utils/generateRandomInt' +import { type Season } from '#/generated/db' +import { db } from '#/lib/db' +import { generateRandomInt } from '#/utils/generateRandomInt' import { seriesFactory } from './series.factory' diff --git a/apps/api/src/features/series/season.repository.ts b/apps/api/src/features/series/season.repository.ts index c3e578a6..cfc0b538 100644 --- a/apps/api/src/features/series/season.repository.ts +++ b/apps/api/src/features/series/season.repository.ts @@ -1,7 +1,7 @@ import { type InsertObject } from 'kysely' -import { type DB } from '@/generated/db' -import { type DBContext, type Context } from '@/types/context' +import { type DB } from '#/generated/db' +import { type DBContext, type Context } from '#/types/context' export const findOne = ({ ctx, diff --git a/apps/api/src/features/series/season.service.ts b/apps/api/src/features/series/season.service.ts index 0c76e2e5..f9483ddd 100644 --- a/apps/api/src/features/series/season.service.ts +++ b/apps/api/src/features/series/season.service.ts @@ -1,5 +1,5 @@ -import { type DBContext, type Context } from '@/types/context' -import { groupEntitiesByKeyToNestedArray } from '@/utils/groupEntitiesByKeyToNestedArray' +import { type DBContext, type Context } from '#/types/context' +import { groupEntitiesByKeyToNestedArray } from '#/utils/groupEntitiesByKeyToNestedArray' import * as seasonRepository from './season.repository' diff --git a/apps/api/src/features/series/series.factory.ts b/apps/api/src/features/series/series.factory.ts index ce1858a5..7f39bad9 100644 --- a/apps/api/src/features/series/series.factory.ts +++ b/apps/api/src/features/series/series.factory.ts @@ -2,9 +2,9 @@ import { Factory } from 'fishery' import { type Selectable } from 'kysely' import { nanoid } from 'nanoid' -import { type Series } from '@/generated/db' -import { db } from '@/lib/db' -import { generateRandomInt } from '@/utils/generateRandomInt' +import { type Series } from '#/generated/db' +import { db } from '#/lib/db' +import { generateRandomInt } from '#/utils/generateRandomInt' export const seriesFactory = Factory.define>( ({ sequence, onCreate }) => { diff --git a/apps/api/src/features/series/series.repository.ts b/apps/api/src/features/series/series.repository.ts index 59f25813..96afe5d4 100644 --- a/apps/api/src/features/series/series.repository.ts +++ b/apps/api/src/features/series/series.repository.ts @@ -1,8 +1,8 @@ import { type UpdateObject } from 'kysely' import { type InsertObject } from 'kysely/dist/cjs/parser/insert-values-parser' -import { type DB } from '@/generated/db' -import { type DBContext, type Context } from '@/types/context' +import { type DB } from '#/generated/db' +import { type DBContext, type Context } from '#/types/context' import { type UserSeriesStatus } from './constants' diff --git a/apps/api/src/features/series/series.schema.ts b/apps/api/src/features/series/series.schema.ts index 8ab31892..649fe831 100644 --- a/apps/api/src/features/series/series.schema.ts +++ b/apps/api/src/features/series/series.schema.ts @@ -1,11 +1,11 @@ import { type Selectable } from 'kysely' import { ZodError } from 'zod' -import { type Episode } from '@/generated/db' -import { NotFoundError, UnauthorizedError } from '@/lib/errors' -import { builder } from '@/schemaBuilder' -import { type Context } from '@/types/context' -import { exposeDate } from '@/utils/exposeDate' +import { type Episode } from '#/generated/db' +import { NotFoundError, UnauthorizedError } from '#/lib/errors' +import { builder } from '#/schemaBuilder' +import { type Context } from '#/types/context' +import { exposeDate } from '#/utils/exposeDate' import { UserSeriesStatus } from './constants' import * as episodesService from './episodes.service' diff --git a/apps/api/src/features/series/series.service.ts b/apps/api/src/features/series/series.service.ts index 440ec965..4cf503ec 100644 --- a/apps/api/src/features/series/series.service.ts +++ b/apps/api/src/features/series/series.service.ts @@ -3,21 +3,21 @@ import index from 'just-index' import unique from 'just-unique' import { type Insertable } from 'kysely' -import { seriesProgressService } from '@/features/seriesProgress' -import { tmdbService } from '@/features/tmdb' -import { type Season } from '@/generated/db' +import { seriesProgressService } from '#/features/seriesProgress' +import { tmdbService } from '#/features/tmdb' +import { type Season } from '#/generated/db' import { type SeriesUpdateStatusInput, type SeriesSearchInput, -} from '@/generated/gql/graphql' -import { NotFoundError } from '@/lib/errors' -import { log } from '@/lib/logger' +} from '#/generated/gql/graphql' +import { NotFoundError } from '#/lib/errors' +import { log } from '#/lib/logger' import { type DBContext, type AuthenticatedContext, type Context, -} from '@/types/context' -import { isTruthy } from '@/utils/isTruthy' +} from '#/types/context' +import { isTruthy } from '#/utils/isTruthy' import { UserSeriesStatus } from './constants' import * as episodeRepository from './episode.repository' diff --git a/apps/api/src/features/series/seriesSync.job.ts b/apps/api/src/features/series/seriesSync.job.ts index 732a87b1..d6ff4c36 100644 --- a/apps/api/src/features/series/seriesSync.job.ts +++ b/apps/api/src/features/series/seriesSync.job.ts @@ -1,5 +1,5 @@ -import { createQueue, createWorker } from '@/lib/bullMq' -import { db } from '@/lib/db' +import { createQueue, createWorker } from '#/lib/bullMq' +import { db } from '#/lib/db' export const seriesSyncQueue = createQueue('seriesSync') diff --git a/apps/api/src/features/series/userSeriesStatus.factory.ts b/apps/api/src/features/series/userSeriesStatus.factory.ts index 18d9f499..f599a3d0 100644 --- a/apps/api/src/features/series/userSeriesStatus.factory.ts +++ b/apps/api/src/features/series/userSeriesStatus.factory.ts @@ -1,8 +1,8 @@ import { Factory } from 'fishery' import { type Selectable } from 'kysely' -import { type UserSeriesStatus } from '@/generated/db' -import { db } from '@/lib/db' +import { type UserSeriesStatus } from '#/generated/db' +import { db } from '#/lib/db' import { userFactory } from '../users' diff --git a/apps/api/src/features/series/userSeriesStatus.repository.ts b/apps/api/src/features/series/userSeriesStatus.repository.ts index 87864a49..684861cc 100644 --- a/apps/api/src/features/series/userSeriesStatus.repository.ts +++ b/apps/api/src/features/series/userSeriesStatus.repository.ts @@ -1,7 +1,7 @@ import { type InsertObject } from 'kysely' -import { type DB } from '@/generated/db' -import { type Context } from '@/types/context' +import { type DB } from '#/generated/db' +import { type Context } from '#/types/context' export const findMany = ({ ctx, diff --git a/apps/api/src/features/seriesProgress/__tests__/seriesProgress.schema.test.ts b/apps/api/src/features/seriesProgress/__tests__/seriesProgress.schema.test.ts index 5c759b82..6ff92c54 100644 --- a/apps/api/src/features/seriesProgress/__tests__/seriesProgress.schema.test.ts +++ b/apps/api/src/features/seriesProgress/__tests__/seriesProgress.schema.test.ts @@ -5,22 +5,22 @@ import { episodeFactory, UserSeriesStatus, userSeriesStatusFactory, -} from '@/features/series' -import { userFactory } from '@/features/users' -import { type User } from '@/generated/db' -import { graphql } from '@/generated/gql' +} from '#/features/series' +import { userFactory } from '#/features/users' +import { type User } from '#/generated/db' +import { graphql } from '#/generated/gql' import { type MarkSeriesEpisodesAsSeenInput, type MarkSeasonEpisodesAsSeenInput, type ToggleEpisodeSeenInput, -} from '@/generated/gql/graphql' -import { db } from '@/lib/db' +} from '#/generated/gql/graphql' +import { db } from '#/lib/db' import { checkErrors, createSeenEpisodesForUser, createSeriesWithEpisodesAndSeasons, executeOperation, -} from '@/test/testUtils' +} from '#/test/testUtils' import { seenEpisodeFactory } from '../seenEpisode.factory' import { seriesProgressFactory } from '../seriesProgress.factory' diff --git a/apps/api/src/features/seriesProgress/__tests__/seriesProgress.service.test.ts b/apps/api/src/features/seriesProgress/__tests__/seriesProgress.service.test.ts index a5cc49d6..d59554b7 100644 --- a/apps/api/src/features/seriesProgress/__tests__/seriesProgress.service.test.ts +++ b/apps/api/src/features/seriesProgress/__tests__/seriesProgress.service.test.ts @@ -1,10 +1,10 @@ -import { seriesFactory } from '@/features/series' -import { db } from '@/lib/db' +import { seriesFactory } from '#/features/series' +import { db } from '#/lib/db' import { createContext, createSeenEpisodesForUser, createSeriesWithEpisodesAndSeasons, -} from '@/test/testUtils' +} from '#/test/testUtils' import { seriesProgressFactory } from '../seriesProgress.factory' import { diff --git a/apps/api/src/features/seriesProgress/seenEpisode.factory.ts b/apps/api/src/features/seriesProgress/seenEpisode.factory.ts index 8aae47b4..29e713ec 100644 --- a/apps/api/src/features/seriesProgress/seenEpisode.factory.ts +++ b/apps/api/src/features/seriesProgress/seenEpisode.factory.ts @@ -1,10 +1,10 @@ import { Factory } from 'fishery' import { type Selectable } from 'kysely' -import { episodeFactory } from '@/features/series' -import { userFactory } from '@/features/users' -import { type SeenEpisode } from '@/generated/db' -import { db } from '@/lib/db' +import { episodeFactory } from '#/features/series' +import { userFactory } from '#/features/users' +import { type SeenEpisode } from '#/generated/db' +import { db } from '#/lib/db' export const seenEpisodeFactory = Factory.define>( ({ onCreate, params }) => { diff --git a/apps/api/src/features/seriesProgress/seenEpisode.repository.ts b/apps/api/src/features/seriesProgress/seenEpisode.repository.ts index cc0805f2..66dcf692 100644 --- a/apps/api/src/features/seriesProgress/seenEpisode.repository.ts +++ b/apps/api/src/features/seriesProgress/seenEpisode.repository.ts @@ -1,7 +1,7 @@ import { type InsertObject } from 'kysely' -import { type DB } from '@/generated/db' -import { type Context } from '@/types/context' +import { type DB } from '#/generated/db' +import { type Context } from '#/types/context' export const findOne = ({ ctx, diff --git a/apps/api/src/features/seriesProgress/seriesProgress.factory.ts b/apps/api/src/features/seriesProgress/seriesProgress.factory.ts index 3f950e82..9883ed19 100644 --- a/apps/api/src/features/seriesProgress/seriesProgress.factory.ts +++ b/apps/api/src/features/seriesProgress/seriesProgress.factory.ts @@ -1,10 +1,10 @@ import { Factory } from 'fishery' import { type Selectable } from 'kysely' -import { episodeFactory, seriesFactory } from '@/features/series' -import { userFactory } from '@/features/users' -import { type SeriesProgress } from '@/generated/db' -import { db } from '@/lib/db' +import { episodeFactory, seriesFactory } from '#/features/series' +import { userFactory } from '#/features/users' +import { type SeriesProgress } from '#/generated/db' +import { db } from '#/lib/db' export const seriesProgressFactory = Factory.define>( ({ params, onCreate }) => { diff --git a/apps/api/src/features/seriesProgress/seriesProgress.repository.ts b/apps/api/src/features/seriesProgress/seriesProgress.repository.ts index 8945c000..364988f7 100644 --- a/apps/api/src/features/seriesProgress/seriesProgress.repository.ts +++ b/apps/api/src/features/seriesProgress/seriesProgress.repository.ts @@ -1,7 +1,7 @@ import { type UpdateObject, type InsertObject } from 'kysely' -import { type DB } from '@/generated/db' -import { type DBContext, type Context } from '@/types/context' +import { type DB } from '#/generated/db' +import { type DBContext, type Context } from '#/types/context' export const findMany = ({ ctx, diff --git a/apps/api/src/features/seriesProgress/seriesProgress.schema.ts b/apps/api/src/features/seriesProgress/seriesProgress.schema.ts index f4a7aec6..10e2c7b7 100644 --- a/apps/api/src/features/seriesProgress/seriesProgress.schema.ts +++ b/apps/api/src/features/seriesProgress/seriesProgress.schema.ts @@ -1,6 +1,6 @@ -import { EpisodeRef, SeasonRef, SeriesRef } from '@/features/series' -import { NotFoundError, UnauthorizedError } from '@/lib/errors' -import { builder } from '@/schemaBuilder' +import { EpisodeRef, SeasonRef, SeriesRef } from '#/features/series' +import { NotFoundError, UnauthorizedError } from '#/lib/errors' +import { builder } from '#/schemaBuilder' import * as seriesProgressService from './seriesProgress.service' diff --git a/apps/api/src/features/seriesProgress/seriesProgress.service.ts b/apps/api/src/features/seriesProgress/seriesProgress.service.ts index 9c1507dd..4ff22134 100644 --- a/apps/api/src/features/seriesProgress/seriesProgress.service.ts +++ b/apps/api/src/features/seriesProgress/seriesProgress.service.ts @@ -2,15 +2,15 @@ import { type NonNullableFields } from '@serieslist/type-utils' import index from 'just-index' import { type UpdateObject } from 'kysely' -import { episodesService, seasonService } from '@/features/series' -import { type DB } from '@/generated/db' -import { NotFoundError } from '@/lib/errors' +import { episodesService, seasonService } from '#/features/series' +import { type DB } from '#/generated/db' +import { NotFoundError } from '#/lib/errors' import { type Context, type AuthenticatedContext, type DBContext, -} from '@/types/context' -import { isTruthy } from '@/utils/isTruthy' +} from '#/types/context' +import { isTruthy } from '#/utils/isTruthy' import * as seenEpisodeRepository from './seenEpisode.repository' import * as seriesProgressRepository from './seriesProgress.repository' diff --git a/apps/api/src/features/tmdb/tmdb.service.ts b/apps/api/src/features/tmdb/tmdb.service.ts index ade2b38d..c153abd3 100644 --- a/apps/api/src/features/tmdb/tmdb.service.ts +++ b/apps/api/src/features/tmdb/tmdb.service.ts @@ -2,9 +2,9 @@ import { type Insertable } from 'kysely' import fetch from 'node-fetch' import { type z } from 'zod' -import { config } from '@/config' -import { type Season, type Series } from '@/generated/db' -import { log } from '@/lib/logger' +import { config } from '#/config' +import { type Season, type Series } from '#/generated/db' +import { log } from '#/lib/logger' import { tmdbSeasonResponseSchema, diff --git a/apps/api/src/features/tmdb/tmdbSeriesDetails.factory.ts b/apps/api/src/features/tmdb/tmdbSeriesDetails.factory.ts index 971199a1..8f0402f4 100644 --- a/apps/api/src/features/tmdb/tmdbSeriesDetails.factory.ts +++ b/apps/api/src/features/tmdb/tmdbSeriesDetails.factory.ts @@ -3,8 +3,8 @@ import { type Selectable } from 'kysely' import { nanoid } from 'nanoid' import { type z } from 'zod' -import { type Series, type Episode } from '@/generated/db' -import { generateRandomInt } from '@/utils/generateRandomInt' +import { type Series, type Episode } from '#/generated/db' +import { generateRandomInt } from '#/utils/generateRandomInt' import { type tmdbNotFoundSchema } from './tmdb.schemas' import { type TMDbSeason, type TMDbEpisode, type TMDbSeries } from './types' diff --git a/apps/api/src/features/users/user.factory.ts b/apps/api/src/features/users/user.factory.ts index 5b7d8d2d..d67c271e 100644 --- a/apps/api/src/features/users/user.factory.ts +++ b/apps/api/src/features/users/user.factory.ts @@ -2,8 +2,8 @@ import { Factory } from 'fishery' import { type Selectable } from 'kysely' import { nanoid } from 'nanoid' -import { type User } from '@/generated/db' -import { db } from '@/lib/db' +import { type User } from '#/generated/db' +import { db } from '#/lib/db' export const userFactory = Factory.define>( ({ sequence, onCreate }) => { diff --git a/apps/api/src/features/users/user.repository.ts b/apps/api/src/features/users/user.repository.ts index 04680d2c..908bf64b 100644 --- a/apps/api/src/features/users/user.repository.ts +++ b/apps/api/src/features/users/user.repository.ts @@ -1,7 +1,7 @@ import { type InsertObject } from 'kysely' -import { type DB } from '@/generated/db' -import { type Context } from '@/types/context' +import { type DB } from '#/generated/db' +import { type Context } from '#/types/context' export const findOne = ({ ctx, diff --git a/apps/api/src/features/users/users.schema.ts b/apps/api/src/features/users/users.schema.ts index 3d20fc92..ff4baef5 100644 --- a/apps/api/src/features/users/users.schema.ts +++ b/apps/api/src/features/users/users.schema.ts @@ -1,7 +1,7 @@ import { type Selectable } from 'kysely' -import type { User } from '@/generated/db' -import { builder } from '@/schemaBuilder' +import type { User } from '#/generated/db' +import { builder } from '#/schemaBuilder' export type UserType = Selectable diff --git a/apps/api/src/features/users/users.service.ts b/apps/api/src/features/users/users.service.ts index 9dc19fed..8b7df312 100644 --- a/apps/api/src/features/users/users.service.ts +++ b/apps/api/src/features/users/users.service.ts @@ -1,7 +1,7 @@ import { type InsertObject } from 'kysely' -import { type DB } from '@/generated/db' -import { type Context } from '@/types/context' +import { type DB } from '#/generated/db' +import { type Context } from '#/types/context' import * as usersRepository from './user.repository' diff --git a/apps/api/src/lib/bullBoard.ts b/apps/api/src/lib/bullBoard.ts index 73ed8c67..22b89039 100644 --- a/apps/api/src/lib/bullBoard.ts +++ b/apps/api/src/lib/bullBoard.ts @@ -2,7 +2,7 @@ import { createBullBoard as createBullBoardBase } from '@bull-board/api' import { BullMQAdapter } from '@bull-board/api/bullMQAdapter' import { FastifyAdapter } from '@bull-board/fastify' -import { seriesSyncQueue } from '@/features/series/jobs' +import { seriesSyncQueue } from '#/features/series/jobs' export const createBullBoard = () => { const bullBoardServerAdapter = new FastifyAdapter() diff --git a/apps/api/src/lib/bullMq.ts b/apps/api/src/lib/bullMq.ts index 481c0d95..baf6d003 100644 --- a/apps/api/src/lib/bullMq.ts +++ b/apps/api/src/lib/bullMq.ts @@ -7,7 +7,7 @@ import { type QueueOptions, } from 'bullmq' -import { config } from '@/config' +import { config } from '#/config' const redisConnection: RedisOptions = { host: config.redis.host, diff --git a/apps/api/src/lib/db.ts b/apps/api/src/lib/db.ts index 6fe76019..cee6fa74 100644 --- a/apps/api/src/lib/db.ts +++ b/apps/api/src/lib/db.ts @@ -1,8 +1,8 @@ import { CamelCasePlugin, Kysely, PostgresDialect } from 'kysely' import pg from 'pg' -import { config } from '@/config' -import { type DB } from '@/generated/db' +import { config } from '#/config' +import { type DB } from '#/generated/db' import { log } from './logger' diff --git a/apps/api/src/lib/fastify.ts b/apps/api/src/lib/fastify.ts index 3ac15c1e..86b892ff 100644 --- a/apps/api/src/lib/fastify.ts +++ b/apps/api/src/lib/fastify.ts @@ -3,7 +3,7 @@ import cors from '@fastify/cors' import rateLimit from '@fastify/rate-limit' import fastify, { type FastifyServerOptions } from 'fastify' -import { config } from '@/config' +import { config } from '#/config' import { log } from './logger' diff --git a/apps/api/src/lib/initSentry.ts b/apps/api/src/lib/initSentry.ts index ddc2fec8..10bd9653 100644 --- a/apps/api/src/lib/initSentry.ts +++ b/apps/api/src/lib/initSentry.ts @@ -1,6 +1,6 @@ import * as Sentry from '@sentry/node' -import { config } from '@/config' +import { config } from '#/config' Sentry.init({ enabled: config.sentry.enabled, diff --git a/apps/api/src/lib/logger.ts b/apps/api/src/lib/logger.ts index 3cce969d..b10c7551 100644 --- a/apps/api/src/lib/logger.ts +++ b/apps/api/src/lib/logger.ts @@ -1,6 +1,6 @@ import pino from 'pino' -import { config } from '@/config' +import { config } from '#/config' export const log = pino({ level: 'info', diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 06f7c6ec..8e721a8f 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -1,4 +1,4 @@ -import { config } from '@/config' +import { config } from '#/config' import { app } from './server' diff --git a/apps/api/src/mainJobs.ts b/apps/api/src/mainJobs.ts index 670bfe03..059b0c09 100644 --- a/apps/api/src/mainJobs.ts +++ b/apps/api/src/mainJobs.ts @@ -1,4 +1,4 @@ -import { seriesSyncWorker } from '@/features/series/jobs' +import { seriesSyncWorker } from '#/features/series/jobs' import { log } from './lib/logger' diff --git a/apps/api/src/migrations/2023-05-17T20:21:44-createSeason.ts b/apps/api/src/migrations/2023-05-17T20:21:44-createSeason.ts index 57b7bb16..0cf9366c 100644 --- a/apps/api/src/migrations/2023-05-17T20:21:44-createSeason.ts +++ b/apps/api/src/migrations/2023-05-17T20:21:44-createSeason.ts @@ -1,6 +1,6 @@ import { type Kysely } from 'kysely' -import { type DB } from '@/generated/db' +import { type DB } from '#/generated/db' export async function up(db: Kysely): Promise { await db.schema diff --git a/apps/api/src/migrations/2023-05-26T17:29:29-createUserSeriesStatus.ts b/apps/api/src/migrations/2023-05-26T17:29:29-createUserSeriesStatus.ts index 7d2ae1a7..b174dbf6 100644 --- a/apps/api/src/migrations/2023-05-26T17:29:29-createUserSeriesStatus.ts +++ b/apps/api/src/migrations/2023-05-26T17:29:29-createUserSeriesStatus.ts @@ -1,7 +1,7 @@ import { type NotWorthIt } from '@serieslist/type-utils' import { sql, type Kysely } from 'kysely' -import { UserSeriesStatus } from '@/features/series' +import { UserSeriesStatus } from '#/features/series' export async function up(db: Kysely): Promise { await db.schema diff --git a/apps/api/src/schema.ts b/apps/api/src/schema.ts index 14dd26f3..cc441c2d 100644 --- a/apps/api/src/schema.ts +++ b/apps/api/src/schema.ts @@ -1,11 +1,11 @@ import { builder } from './schemaBuilder' -import '@/features/auth/auth.schema' -import '@/features/users/users.schema' -import '@/features/series/series.schema' -import '@/features/seriesProgress/seriesProgress.schema' -import '@/schema/errors.schema' -import '@/schema/scalars.schema' +import '#/features/auth/auth.schema' +import '#/features/users/users.schema' +import '#/features/series/series.schema' +import '#/features/seriesProgress/seriesProgress.schema' +import '#/schema/errors.schema' +import '#/schema/scalars.schema' builder.queryType({ fields: (t) => ({ diff --git a/apps/api/src/schema/errors.schema.ts b/apps/api/src/schema/errors.schema.ts index 50a2c9c6..447281a7 100644 --- a/apps/api/src/schema/errors.schema.ts +++ b/apps/api/src/schema/errors.schema.ts @@ -1,6 +1,6 @@ import { ZodError, type ZodFormattedError } from 'zod' -import { NotFoundError, UnauthorizedError } from '@/lib/errors' +import { NotFoundError, UnauthorizedError } from '#/lib/errors' import { builder } from '../schemaBuilder' diff --git a/apps/api/src/schema/scalars.schema.ts b/apps/api/src/schema/scalars.schema.ts index 68af8b2a..ddee159e 100644 --- a/apps/api/src/schema/scalars.schema.ts +++ b/apps/api/src/schema/scalars.schema.ts @@ -1,5 +1,5 @@ import { LocalDateResolver } from 'graphql-scalars' -import { builder } from '@/schemaBuilder' +import { builder } from '#/schemaBuilder' builder.addScalarType('Date', LocalDateResolver, {}) diff --git a/apps/api/src/server.ts b/apps/api/src/server.ts index 3cfaea7f..99f4e25a 100644 --- a/apps/api/src/server.ts +++ b/apps/api/src/server.ts @@ -11,7 +11,7 @@ import { log } from './lib/logger' import { schema } from './schema' import { type Context } from './types/context' -import '@/lib/initSentry' +import '#/lib/initSentry' export const yoga = createYoga<{ req: FastifyRequest diff --git a/apps/api/src/test/clearDatabase.ts b/apps/api/src/test/clearDatabase.ts index 828fbbae..0bcf5159 100644 --- a/apps/api/src/test/clearDatabase.ts +++ b/apps/api/src/test/clearDatabase.ts @@ -1,6 +1,6 @@ import { sql } from 'kysely' -import { db } from '@/lib/db' +import { db } from '#/lib/db' export const clearDatabase = async () => { const tables = await sql<{ diff --git a/apps/api/src/test/mockTMDBServer.ts b/apps/api/src/test/mockTMDBServer.ts index 1440ae52..c4928a03 100644 --- a/apps/api/src/test/mockTMDBServer.ts +++ b/apps/api/src/test/mockTMDBServer.ts @@ -20,8 +20,8 @@ import { type TMDbSeason, type TMDbEpisode, type TMDbSearchResponse, -} from '@/features/tmdb' -import { createArrayOfLength } from '@/lib/createArrayOfLength' +} from '#/features/tmdb' +import { createArrayOfLength } from '#/lib/createArrayOfLength' const app = fastify({ logger: true, diff --git a/apps/api/src/test/testUtils.ts b/apps/api/src/test/testUtils.ts index f5700860..290505c0 100644 --- a/apps/api/src/test/testUtils.ts +++ b/apps/api/src/test/testUtils.ts @@ -4,19 +4,19 @@ import { type ExecutionResult, print } from 'graphql' import { createYoga, type YogaInitialContext } from 'graphql-yoga' import { type Selectable } from 'kysely' -import { episodeFactory, seasonFactory, seriesFactory } from '@/features/series' -import { seenEpisodeFactory } from '@/features/seriesProgress' -import { userFactory } from '@/features/users' +import { episodeFactory, seasonFactory, seriesFactory } from '#/features/series' +import { seenEpisodeFactory } from '#/features/seriesProgress' +import { userFactory } from '#/features/users' import { type User, type Episode, type Season, type Series, -} from '@/generated/db' -import { createArrayOfLength } from '@/lib/createArrayOfLength' -import { db } from '@/lib/db' -import { schema } from '@/schema' -import { type AuthenticatedContext, type Context } from '@/types/context' +} from '#/generated/db' +import { createArrayOfLength } from '#/lib/createArrayOfLength' +import { db } from '#/lib/db' +import { schema } from '#/schema' +import { type AuthenticatedContext, type Context } from '#/types/context' export const createContext = ({ ctx = {}, diff --git a/apps/api/src/types/context.ts b/apps/api/src/types/context.ts index e77c2a64..f9880c7a 100644 --- a/apps/api/src/types/context.ts +++ b/apps/api/src/types/context.ts @@ -2,8 +2,8 @@ import { type FastifyReply, type FastifyRequest } from 'fastify' import { type YogaInitialContext } from 'graphql-yoga' import { type Selectable } from 'kysely' -import { type User } from '@/generated/db' -import { type db } from '@/lib/db' +import { type User } from '#/generated/db' +import { type db } from '#/lib/db' export type Context = Omit & { db: typeof db diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index 2c22f0ea..5f3b1d46 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -3,9 +3,6 @@ "compilerOptions": { "baseUrl": ".", "outDir": "dist", - "paths": { - "@/*": ["./src/*"] - }, "types": ["vitest/globals"] } } diff --git a/packages/eslint-config-base/eslint-config-base.js b/packages/eslint-config-base/eslint-config-base.js index cca8d015..8286afcd 100644 --- a/packages/eslint-config-base/eslint-config-base.js +++ b/packages/eslint-config-base/eslint-config-base.js @@ -63,7 +63,7 @@ module.exports = { 'no-restricted-imports': [ 'error', { - patterns: ['@/features/*/*', '!@/features/*/jobs'], + patterns: ['#/features/*/*', '!#/features/*/jobs'], }, ], },