Commit Graph

244 Commits

Author SHA1 Message Date
Ritesh Ghosh f5d74627e8 feat: add deployment env based rate limiters 2025-05-25 22:53:29 +05:30
Ritesh Ghosh bd597a6fd7 feat: add flexible ANIWATCH_API_DEPLOYMENT_ENV env and deployment envs 2025-05-25 22:52:35 +05:30
Ritesh Ghosh ce03d5939d refactor: ServerContext type import 2025-05-25 22:51:41 +05:30
Ritesh Ghosh 5118a2543d refactor: ServerContext type import 2025-05-25 22:51:12 +05:30
Ritesh Ghosh a3cd5a34aa feat: add execGracefulShutdown method & Prettify<T> type 2025-05-25 22:50:40 +05:30
Ritesh Ghosh 83035e46ce refactor: rename variables to context.ts 2025-05-25 22:49:30 +05:30
Ritesh Ghosh 536b97e549 feat: add graceful shutdown and better deployment environment logic 2025-05-25 22:49:05 +05:30
Ritesh Ghosh b19078e29c feat: add graceful shutdown and better deployment environment logic 2025-05-25 22:48:39 +05:30
Ritesh Ghosh 1017371432 refactor: add quitConnection method; update variable names, function defs & logic 2025-05-25 22:47:09 +05:30
Ritesh Ghosh 013196bd3d feat: add cache response header if caching is enabled 2025-05-25 22:46:06 +05:30
Ritesh Ghosh 74c9ffcb8f feat: update response to include status instead of success for consistency 2025-05-25 22:45:26 +05:30
Ritesh Ghosh d2812d13bf fix: update ANIWATCH_API_HOSTNAME§ env example 2025-05-12 02:38:26 +05:30
Ritesh Ghosh 1081c7b7bb fix: update ANIWATCH_API_HOSTNAME env 2025-05-12 02:37:22 +05:30
Ritesh Ghosh 36b4f8acfc refactor: rename logger to log 2025-05-11 13:31:58 +05:30
Ritesh Ghosh 83076b672b feat: integrate custom logger and envalidated envs 2025-05-11 13:08:12 +05:30
Ritesh Ghosh e098e7cfcb feat: integrate use of ebvalidated envs 2025-05-11 13:07:52 +05:30
Ritesh Ghosh 2054785565 feat: add new logging middleware that uses pino logger 2025-05-11 13:07:43 +05:30
Ritesh Ghosh b6288a02d8 feat: add custom pino logger 2025-05-11 13:07:17 +05:30
Ritesh Ghosh 5e028771f0 feat: integrate use of ebvalidated envs 2025-05-11 13:07:04 +05:30
Ritesh Ghosh 5880fe3db6 feat: add envalid for better env management 2025-05-11 13:06:04 +05:30
Ritesh Ghosh 797fc2455c style: prettier format changes 2025-05-11 13:05:23 +05:30
Ritesh Ghosh f7af9c890a style: formatting changes 2025-04-15 00:11:33 +05:30
Ritesh Ghosh f5cd3415d8 feat(getNextEpisodeSchedule): add /anime/:animeId/next-episode-schedule endpoint 2025-04-15 00:11:22 +05:30
Ritesh Ghosh cb5a4672a8 fix(ts build error): fixed ts build error due to conflicting types 2025-01-01 13:42:07 +05:30
Ritesh Ghosh f0acd89d87 feat(/qtip): add new /qtip endpoint 2024-12-25 18:13:47 +05:30
Ritesh Ghosh da6699ba22 feat: use refactored error handlers and cache middlewares 2024-12-24 17:10:14 +05:30
Ritesh Ghosh da19fb7e86 feat(errorHandling): add error handlers config file 2024-12-24 17:09:43 +05:30
Ritesh Ghosh 5f1f2167df feat(cache): add cacheConfigSetter & cacheControlMiddleware by #90 2024-12-24 17:07:35 +05:30
Abdelaziz Mahdy dfc278be08 chore: styling changes to be more consistent 2024-12-23 03:27:43 -04:00
Abdelaziz Mahdy f1f5db84f9 feat(cache): add Cache-Control middleware and update .env.example 2024-12-22 15:32:56 -04:00
Ritesh Ghosh b26a9cd9ff refactor: integrate new getOrSet method definition 2024-12-22 00:43:18 +05:30
Ritesh Ghosh 64eaa18ed9 refactor: update getOrSet method definition 2024-12-22 00:43:03 +05:30
Ritesh Ghosh 861a897999 feat(az-list): add /azlist/:sortOption endpoint for scraping hianime's az-list animes 2024-12-22 00:40:06 +05:30
Ritesh Ghosh 062e662fbc feat: add /v endpoint for identifying api repo vesion 2024-12-22 00:39:13 +05:30
Ritesh Ghosh 54fe5389e1 feat: add global constants 2024-12-17 12:49:14 +05:30
Ritesh Ghosh da83048f90 feat(cache): add middleware to insert CACHE_CONFIG variable in request context 2024-12-07 21:14:36 +05:30
Ritesh Ghosh 5cd99fcc64 feat(cache): integrated Redis caching layer for endpoint responses 2024-12-07 21:13:16 +05:30
Ritesh Ghosh b7d036dbe2 feat(cache): add AniwatchAPICache class to implement API caching layer 2024-12-07 21:12:34 +05:30
Ritesh Ghosh db022185ef feat(server): add aniwatch variables types for type-safe req context variable access 2024-12-07 21:11:44 +05:30
Ritesh Ghosh 46f688ac12 Aniwatch API Version 2 (#66)
BREAKING CHANGE:

* chore: remove files that are not necessary for api v2

* test: update existing tests to use  pkg

* feat: organized aniwatch api envs and add more info about them

* feat: update tsconfig to include strict noUnsed params

* feat(api homepage): revamp api home page

* feat: update wani kuni image

* feat: add dot img

* feat: use hono cors

* feat: use hono rate limiter

* build: remove unnecessary deps, add ones needed and update description

* feat: add hianime routes and their handlers

* feat: update vercel deployment file

* docs: update logo and scraper docs, add envs section

* feat: update main server file

* feat: update peronal deployments caution section
2024-10-06 01:13:23 +05:30
Ritesh Ghosh 21a8718f87 feat: update allowed origins to include wildcard if env not present 2024-10-04 12:24:31 +05:30
Divyansh 91fd0918c3 Enhance CORS Configuration for Production Security
📌 Removed the wildcard (*) origin and replaced it with trusted origins from .env.

📌 Introduced environment variable (CORS_ALLOWED_ORIGINS) for dynamic origin management.

📌 Improved security by blocking untrusted origins and methods.

📌 Enhanced performance with maxAge for caching preflight responses.

📌 No breaking changes, as the fallback origin is set to http://localhost:4000 for development, ensuring compatibility with local setups.
2024-10-01 04:55:14 +00:00
Ritesh Ghosh c65d786673 feat: add jname field to Anime interface 2024-07-24 20:24:18 +05:30
WBRK-dev 94664abdfd fix: added japanese anime names to all responses 2024-07-21 10:39:17 +02:00
WBRK-dev 5d929461ce feat: added mostPopular, mostFavorite and latestCompleted to the home route response 2024-07-21 10:18:05 +02:00
WBRK-dev 62fa83a56d feat: added episode count to top airing anime 2024-07-21 10:04:33 +02:00
WBRK-dev bdfebb5e32 feat: added episode number to estimated anime schedule 2024-07-21 09:58:18 +02:00
WBRK-dev bf2c69e7ab fix: fixed tests regarding episode sources 2024-07-18 19:34:09 +02:00
WBRK-dev 4437ef24cc fix: fixed using specific server for episode sources 2024-07-18 17:39:03 +02:00
Ritesh Ghosh 041c0b7098 feat: add airingTimestamp and secondsUntilAiring to /anime/schedule endpoint 2024-07-14 00:09:22 +05:30