Skip to content

Commit

Permalink
Merge pull request #115 from koikiss-dev/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
koikiss-dev authored Nov 24, 2023
2 parents 8869eef + 086a1b6 commit bc47589
Show file tree
Hide file tree
Showing 19 changed files with 316 additions and 207 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/*.js
src/types/**
src/utils/**
src/test/**
22 changes: 22 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"env": {
"browser": true,
"es2021": true
},
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"plugins": [
"@typescript-eslint"
],
"root": true,
"rules": {
}
}
1 change: 1 addition & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- main
- dev


jobs:
Expand Down
96 changes: 51 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"start:vercel": "node build/index.js",
"format": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\"",
"linter": "npx eslint src/scraper/* src/routes/*",
"linter:win": "npx eslint src/scraper/** src/routes/**",
"build": "tsc",
"format": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\"",
"zoro": "ts-node src/scraper/sites/anime/zoro/Zoro.ts",
"lint": "eslint --ignore-path .eslintignore --ext .js,.ts .",
"heroku-postbuild": "npm run build",
"start:dev": "nodemon src/index.ts",
"test": "jest --coverage"
Expand Down Expand Up @@ -49,7 +48,8 @@
"morgan": "^1.10.0",
"puppeteer": "^19.4.1",
"ts-node": "^10.9.1",
"underscore": "^1.13.6"
"underscore": "^1.13.6",
"unpacker": "^1.0.1"
},
"devDependencies": {
"@commitlint/config-conventional": "^17.4.4",
Expand All @@ -58,8 +58,8 @@
"@types/jest": "^29.5.0",
"@types/morgan": "^1.9.4",
"@types/node": "^18.15.8",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"commitlint": "^17.5.1",
"dotenv": "^16.0.3",
"eslint": "^8.50.0",
Expand Down
14 changes: 7 additions & 7 deletions src/routes/v1/anime/animelatinohd/AnimeLatinoHDRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ const router = Router();

// Filter
router.get("/anime/animelatinohd/filter", async (req, res) => {
let { search, type, page, year, genre } = req.query
const { search, type, page, year, genre } = req.query

let data = await Anime.GetAnimeByFilter(search as string, type as unknown as number, page as unknown as number, year as string, genre as string)
const data = await Anime.GetAnimeByFilter(search as string, type as unknown as number, page as unknown as number, year as string, genre as string)
res.send(data)
});

// Anime Info +(Episodes list)
router.get("/anime/animelatinohd/name/:name", async (req, res) => {

let { name } = req.params
let data = await Anime.GetAnimeInfo(name)
const { name } = req.params
const data = await Anime.GetAnimeInfo(name)
res.send(data)

});

// Episode Info +(Video Servers)
router.get("/anime/animelatinohd/episode/:episode", async (req, res) => {
let { lang } = req.query
let { episode } = req.params
let data = await Anime.GetEpisodeServers(episode,lang as string)
const { lang } = req.query
const { episode } = req.params
const data = await Anime.GetEpisodeServers(episode, lang as string)
res.send(data)

});
Expand Down
27 changes: 18 additions & 9 deletions src/routes/v1/anime/wcostream/wcostreamRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,35 @@ const Anime = new WcoStream();
const router = Router();

router.get("/anime/wcostream/name/:name", async (req, res) => {
let { name } = req.params
let data = await Anime.GetAnimeInfo(name)
const { name } = req.params
const data = await Anime.GetAnimeInfo(name)

res.send(data)
})

router.get("/anime/wcostream/episode/:episode", async (req, res) => {
let { episode } = req.params
let { season } = req.query
let data = await Anime.GetEpisodeServers(episode, season)
const { episode } = req.params
const { season } = req.query
const data = await Anime.GetEpisodeServers(episode, season as unknown as number)

res.send(data)
})

router.get("/anime/wcostream/filter", async (req, res) => {
let { search,page } = req.query
let data = await Anime.GetAnimeByFilter(search as string,page as unknown as number)
const { search, page } = req.query
const data = await Anime.GetAnimeByFilter(search as string, page as unknown as number)

res.send(data)
})

/*
Global API
*/

router.post("/runtime/unpacked", async (req,res) => {
const {base64} = req.body
const data = await Anime.RuntimeUnpacked(base64)
return res.send(data)
})

export default router
22 changes: 11 additions & 11 deletions src/routes/v1/manga/comick/ComickRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ const router = Router();


router.get("/manga/comick/filter", async (req, res) => {
let { search,type,year,genre } = req.query;
const { search, type, year, genre } = req.query;

let data = await Manga.GetMangaByFilter(search as string, type as unknown as number,year as string, genre as string)
const data = await Manga.GetMangaByFilter(search as string, type as unknown as number, year as string, genre as string)

res.send(data)
});


router.get("/manga/comick/title/:manga", async (req, res) => {
let { manga } = req.params;
let { lang } = req.query;
let data = await Manga.GetMangaInfo(manga, lang as string)
const { manga } = req.params;
const { lang } = req.query;

const data = await Manga.GetMangaInfo(manga, lang as string)

res.send(data)
});

router.get("/manga/comick/chapter/:chapter", async (req, res) => {
let { chapter } = req.params
let { lang } = req.query;
const { chapter } = req.params
const { lang } = req.query;

const data = await Manga.GetChapterInfo(chapter, lang as string)

let data = await Manga.GetChapterInfo(chapter, lang as string)

res.send(data)
});
export default router
Loading

2 comments on commit bc47589

@vercel
Copy link

@vercel vercel bot commented on bc47589 Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on bc47589 Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.