From 9c37cb0cad906b4b269ddf00ac12f958623e4a11 Mon Sep 17 00:00:00 2001 From: Ritesh Ghosh Date: Fri, 19 Jan 2024 19:55:31 +0530 Subject: [PATCH] refactor: `types` dir import --- src/parsers/animeAboutInfo.ts | 2 +- src/parsers/animeCategory.ts | 4 ++-- src/parsers/animeEpisodeSrcs.ts | 4 ++-- src/parsers/animeEpisodes.ts | 2 +- src/parsers/animeGenre.ts | 2 +- src/parsers/animeProducer.ts | 2 +- src/parsers/animeSearch.ts | 2 +- src/parsers/animeSearchSuggestion.ts | 2 +- src/parsers/episodeServers.ts | 2 +- src/parsers/estimatedSchedule.ts | 2 +- src/parsers/homePage.ts | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/parsers/animeAboutInfo.ts b/src/parsers/animeAboutInfo.ts index 3f89ed5..cc3f936 100644 --- a/src/parsers/animeAboutInfo.ts +++ b/src/parsers/animeAboutInfo.ts @@ -9,7 +9,7 @@ import { import axios, { AxiosError } from "axios"; import createHttpError, { type HttpError } from "http-errors"; import { load, type CheerioAPI, type SelectorType } from "cheerio"; -import { type ScrapedAnimeAboutInfo } from "../models/parsers/index.js"; +import { type ScrapedAnimeAboutInfo } from "../types/parsers/index.js"; // /anime/info?id=${anime-id} async function scrapeAnimeAboutInfo( diff --git a/src/parsers/animeCategory.ts b/src/parsers/animeCategory.ts index 809d978..c79fcc7 100644 --- a/src/parsers/animeCategory.ts +++ b/src/parsers/animeCategory.ts @@ -7,10 +7,10 @@ import { ACCEPT_ENCODING_HEADER, } from "../utils/index.js"; import axios, { AxiosError } from "axios"; -import { type AnimeCategories } from "../models/anime.js"; +import { type AnimeCategories } from "../types/anime.js"; import createHttpError, { type HttpError } from "http-errors"; import { load, type CheerioAPI, type SelectorType } from "cheerio"; -import { type ScrapedAnimeCategory } from "../models/parsers/index.js"; +import { type ScrapedAnimeCategory } from "../types/parsers/index.js"; // /anime/:category?page=${page} async function scrapeAnimeCategory( diff --git a/src/parsers/animeEpisodeSrcs.ts b/src/parsers/animeEpisodeSrcs.ts index 14cdd7c..d604ef0 100644 --- a/src/parsers/animeEpisodeSrcs.ts +++ b/src/parsers/animeEpisodeSrcs.ts @@ -7,9 +7,9 @@ import { import axios, { AxiosError } from "axios"; import { load, type CheerioAPI } from "cheerio"; import createHttpError, { type HttpError } from "http-errors"; -import { type AnimeServers, Servers } from "../models/anime.js"; +import { type AnimeServers, Servers } from "../types/anime.js"; import { RapidCloud, StreamSB, StreamTape } from "../extractors/index.js"; -import { type ScrapedAnimeEpisodesSources } from "../models/parsers/index.js"; +import { type ScrapedAnimeEpisodesSources } from "../types/parsers/index.js"; // vidtreaming -> 4 // rapidcloud -> 1 diff --git a/src/parsers/animeEpisodes.ts b/src/parsers/animeEpisodes.ts index 8e624b4..41ac942 100644 --- a/src/parsers/animeEpisodes.ts +++ b/src/parsers/animeEpisodes.ts @@ -8,7 +8,7 @@ import { import axios, { AxiosError } from "axios"; import { load, type CheerioAPI } from "cheerio"; import createHttpError, { type HttpError } from "http-errors"; -import { type ScrapedAnimeEpisodes } from "../models/parsers/index.js"; +import { type ScrapedAnimeEpisodes } from "../types/parsers/index.js"; // /anime/episodes/${anime-id} async function scrapeAnimeEpisodes( diff --git a/src/parsers/animeGenre.ts b/src/parsers/animeGenre.ts index e5efa1a..110398d 100644 --- a/src/parsers/animeGenre.ts +++ b/src/parsers/animeGenre.ts @@ -9,7 +9,7 @@ import { import axios, { AxiosError } from "axios"; import createHttpError, { type HttpError } from "http-errors"; import { load, type CheerioAPI, type SelectorType } from "cheerio"; -import type { ScrapedGenreAnime } from "../models/parsers/index.js"; +import type { ScrapedGenreAnime } from "../types/parsers/index.js"; // /anime/genre/${name}?page=${page} async function scrapeGenreAnime( diff --git a/src/parsers/animeProducer.ts b/src/parsers/animeProducer.ts index 2918936..2862852 100644 --- a/src/parsers/animeProducer.ts +++ b/src/parsers/animeProducer.ts @@ -10,7 +10,7 @@ import { import axios, { AxiosError } from "axios"; import createHttpError, { type HttpError } from "http-errors"; import { load, type CheerioAPI, type SelectorType } from "cheerio"; -import type { ScrapedProducerAnime } from "../models/parsers/index.js"; +import type { ScrapedProducerAnime } from "../types/parsers/index.js"; // /anime/producer/${name}?page=${page} async function scrapeProducerAnimes( diff --git a/src/parsers/animeSearch.ts b/src/parsers/animeSearch.ts index 3118150..43a9fdd 100644 --- a/src/parsers/animeSearch.ts +++ b/src/parsers/animeSearch.ts @@ -9,7 +9,7 @@ import { import axios, { AxiosError } from "axios"; import createHttpError, { type HttpError } from "http-errors"; import { load, type CheerioAPI, type SelectorType } from "cheerio"; -import type { ScrapedAnimeSearchResult } from "../models/parsers/index.js"; +import type { ScrapedAnimeSearchResult } from "../types/parsers/index.js"; // /anime/search?q=${query}&page=${page} async function scrapeAnimeSearch( diff --git a/src/parsers/animeSearchSuggestion.ts b/src/parsers/animeSearchSuggestion.ts index cc518ca..acef2a4 100644 --- a/src/parsers/animeSearchSuggestion.ts +++ b/src/parsers/animeSearchSuggestion.ts @@ -7,7 +7,7 @@ import { import axios, { AxiosError } from "axios"; import createHttpError, { type HttpError } from "http-errors"; import { load, type CheerioAPI, type SelectorType } from "cheerio"; -import type { ScrapedAnimeSearchSuggestion } from "../models/parsers/index.js"; +import type { ScrapedAnimeSearchSuggestion } from "../types/parsers/index.js"; // /anime/search/suggest?q=${query} async function scrapeAnimeSearchSuggestion( diff --git a/src/parsers/episodeServers.ts b/src/parsers/episodeServers.ts index b96ff18..97b4237 100644 --- a/src/parsers/episodeServers.ts +++ b/src/parsers/episodeServers.ts @@ -8,7 +8,7 @@ import { import axios, { AxiosError } from "axios"; import createHttpError, { type HttpError } from "http-errors"; import { load, type CheerioAPI, type SelectorType } from "cheerio"; -import type { ScrapedEpisodeServers } from "../models/parsers/index.js"; +import type { ScrapedEpisodeServers } from "../types/parsers/index.js"; // /anime/servers?episodeId=${id} async function scrapeEpisodeServers( diff --git a/src/parsers/estimatedSchedule.ts b/src/parsers/estimatedSchedule.ts index b700054..6fc3d1a 100644 --- a/src/parsers/estimatedSchedule.ts +++ b/src/parsers/estimatedSchedule.ts @@ -7,7 +7,7 @@ import { import axios, { AxiosError } from "axios"; import createHttpError, { type HttpError } from "http-errors"; import { load, type CheerioAPI, type SelectorType } from "cheerio"; -import { type ScrapedEstimatedSchedule } from "../models/parsers/index.js"; +import { type ScrapedEstimatedSchedule } from "../types/parsers/index.js"; // /anime/schedule?date=${date} async function scrapeEstimatedSchedule( diff --git a/src/parsers/homePage.ts b/src/parsers/homePage.ts index 53cf721..979e7e9 100644 --- a/src/parsers/homePage.ts +++ b/src/parsers/homePage.ts @@ -8,7 +8,7 @@ import { } from "../utils/index.js"; import axios, { AxiosError } from "axios"; import createHttpError, { type HttpError } from "http-errors"; -import type { ScrapedHomePage } from "../models/parsers/index.js"; +import type { ScrapedHomePage } from "../types/parsers/index.js"; import { load, type CheerioAPI, type SelectorType } from "cheerio"; // /anime/home