From a10bafb263d053320e80c88f0bd49e4031000924 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 4 Mar 2024 00:46:26 +0800 Subject: [PATCH] fix: __dirname --- lib/routes/12306/index.ts | 3 +++ lib/routes/141jav/index.ts | 3 +++ lib/routes/141ppv/index.ts | 3 +++ lib/routes/163/ds.ts | 3 +++ lib/routes/163/exclusive.ts | 3 +++ lib/routes/163/music/artist-songs.ts | 3 +++ lib/routes/163/music/artist.ts | 3 +++ lib/routes/163/music/djradio.ts | 3 +++ lib/routes/163/music/playlist.ts | 3 +++ lib/routes/163/music/userevents.ts | 3 +++ lib/routes/163/music/userplaylist.ts | 3 +++ lib/routes/163/music/userplayrecords.ts | 3 +++ lib/routes/163/open/vip.ts | 3 +++ lib/routes/163/utils.ts | 3 +++ lib/routes/18comic/utils.ts | 3 +++ lib/routes/1point3acres/offer.ts | 3 +++ lib/routes/1point3acres/utils.ts | 3 +++ lib/routes/2048/index.ts | 3 +++ lib/routes/4gamers/utils.ts | 3 +++ lib/routes/4ksj/forum.ts | 3 +++ lib/routes/500px/tribe-set.ts | 3 +++ lib/routes/500px/user.ts | 3 +++ lib/routes/56kog/util.ts | 3 +++ lib/routes/591/list.ts | 3 +++ lib/routes/78dm/index.ts | 3 +++ lib/routes/7mmtv/index.ts | 3 +++ lib/routes/8264/list.ts | 3 +++ lib/routes/91porn/author.ts | 3 +++ lib/routes/91porn/index.ts | 3 +++ lib/routes/95mm/utils.ts | 3 +++ lib/routes/abc/index.ts | 3 +++ lib/routes/acs/journal.ts | 3 +++ lib/routes/aeaweb/index.ts | 3 +++ lib/routes/aeon/utils.ts | 3 +++ lib/routes/aicaijing/index.ts | 3 +++ lib/routes/aip/utils.ts | 3 +++ lib/routes/aljazeera/index.ts | 3 +++ lib/routes/amazon/kindle-software-updates.ts | 3 +++ lib/routes/app-center/release.ts | 3 +++ lib/routes/aqara/post.ts | 3 +++ lib/routes/arcteryx/new-arrivals.ts | 3 +++ lib/routes/arcteryx/outlet.ts | 3 +++ lib/routes/arcteryx/regear-new-arrivals.ts | 3 +++ lib/routes/artstation/user.ts | 3 +++ lib/routes/asiantolick/index.ts | 3 +++ lib/routes/asus/bios.ts | 3 +++ lib/routes/baidu/gushitong/index.ts | 3 +++ lib/routes/baidu/search.ts | 3 +++ lib/routes/baidu/tieba/forum.ts | 3 +++ lib/routes/baidu/tieba/post.ts | 3 +++ lib/routes/baidu/tieba/search.ts | 3 +++ lib/routes/baidu/top.ts | 3 +++ lib/routes/bandcamp/weekly.ts | 3 +++ lib/routes/bangumi/online/online.ts | 3 +++ lib/routes/bangumi/tv/calendar/today.ts | 3 +++ lib/routes/bangumi/tv/subject/ep.ts | 3 +++ lib/routes/baozimh/index.ts | 3 +++ lib/routes/bdys/index.ts | 3 +++ lib/routes/bgmlist/onair.ts | 3 +++ lib/routes/bloomberg/utils.ts | 3 +++ lib/routes/bsky/posts.ts | 3 +++ lib/routes/btzj/index.ts | 3 +++ lib/routes/caai/utils.ts | 3 +++ lib/routes/caareviews/utils.ts | 3 +++ lib/routes/cahkms/index.ts | 3 +++ lib/routes/caixin/database.ts | 3 +++ lib/routes/caixin/latest.ts | 3 +++ lib/routes/caixin/utils.ts | 3 +++ lib/routes/cankaoxiaoxi/index.ts | 3 +++ lib/routes/cartoonmad/comic.ts | 3 +++ lib/routes/cbaigui/index.ts | 3 +++ lib/routes/ccf/ccfcv/index.ts | 3 +++ lib/routes/ccf/tfbd/utils.ts | 3 +++ lib/routes/cde/xxgk.ts | 3 +++ lib/routes/cdzjryb/project-list.ts | 3 +++ lib/routes/cebbank/all.ts | 3 +++ lib/routes/cebbank/history.ts | 3 +++ lib/routes/chaincatcher/home.ts | 3 +++ lib/routes/changba/user.ts | 3 +++ lib/routes/chaoxing/qk.ts | 3 +++ lib/routes/chinadegrees/province.ts | 3 +++ lib/routes/chuanliu/nice.ts | 3 +++ lib/routes/cls/depth.ts | 3 +++ lib/routes/cls/hot.ts | 3 +++ lib/routes/cls/telegraph.ts | 3 +++ lib/routes/cma/channel.ts | 3 +++ lib/routes/cngal/entry.ts | 3 +++ lib/routes/cngal/weekly.ts | 3 +++ lib/routes/cnjxol/index.ts | 3 +++ lib/routes/cnki/debut.ts | 3 +++ lib/routes/cnki/utils.ts | 3 +++ lib/routes/cntheory/paper.ts | 3 +++ lib/routes/cntv/column.ts | 3 +++ lib/routes/codeforces/contests.ts | 3 +++ lib/routes/comicskingdom/index.ts | 3 +++ lib/routes/copymanga/comic.ts | 3 +++ lib/routes/creative-comic/book.ts | 3 +++ lib/routes/curius/links.ts | 3 +++ lib/routes/cztv/daily.ts | 3 +++ lib/routes/cztv/zjxwlb.ts | 3 +++ lib/routes/damai/activity.ts | 3 +++ lib/routes/dcfever/utils.ts | 3 +++ lib/routes/deadline/posts.ts | 3 +++ lib/routes/dedao/knowledge.ts | 3 +++ lib/routes/dedao/user.ts | 3 +++ lib/routes/diershoubing/news.ts | 3 +++ lib/routes/discord/channel.ts | 3 +++ lib/routes/dlnews/category.ts | 3 +++ lib/routes/dlsite/utils.ts | 3 +++ lib/routes/dn/news.ts | 3 +++ lib/routes/douban/other/explore.ts | 3 +++ lib/routes/douban/other/list.ts | 3 +++ lib/routes/douban/other/recommended.ts | 3 +++ lib/routes/douban/other/weekly-best.ts | 3 +++ lib/routes/douyin/utils.ts | 3 +++ lib/routes/douyu/group.ts | 3 +++ lib/routes/douyu/post.ts | 3 +++ lib/routes/dribbble/utils.ts | 3 +++ lib/routes/duozhuayu/search.ts | 3 +++ lib/routes/dushu/fuzhou/index.ts | 3 +++ lib/routes/e-hentai/index.ts | 3 +++ lib/routes/ecnu/contest.ts | 3 +++ lib/routes/elsevier/issue.ts | 3 +++ lib/routes/elsevier/journal.ts | 3 +++ lib/routes/epicgames/index.ts | 3 +++ lib/routes/eprice/rss.ts | 3 +++ lib/routes/fansly/utils.ts | 3 +++ lib/routes/farmatters/index.ts | 3 +++ lib/routes/fastbull/news.ts | 3 +++ lib/routes/feng/forum.ts | 3 +++ lib/routes/ff14/ff14-global.ts | 3 +++ lib/routes/ff14/ff14-zh.ts | 3 +++ lib/routes/fffdm/manhua/manhua.ts | 3 +++ lib/routes/fisher-spb/news.ts | 3 +++ lib/routes/focustaiwan/index.ts | 3 +++ lib/routes/followin/utils.ts | 3 +++ lib/routes/foresightnews/util.ts | 3 +++ lib/routes/fosshub/index.ts | 3 +++ lib/routes/freecomputerbooks/index.ts | 3 +++ lib/routes/furstar/utils.ts | 3 +++ lib/routes/futunn/main.ts | 3 +++ lib/routes/gameapps/index.ts | 3 +++ lib/routes/gcores/radio.ts | 3 +++ lib/routes/gelonghui/live.ts | 3 +++ lib/routes/gettr/user.ts | 3 +++ lib/routes/github/pulse.ts | 3 +++ lib/routes/github/trending.ts | 3 +++ lib/routes/gitpod/blog.ts | 3 +++ lib/routes/gofans/index.ts | 3 +++ lib/routes/google/fonts.ts | 3 +++ lib/routes/google/news.ts | 3 +++ lib/routes/google/search.ts | 3 +++ lib/routes/gov/caac/cjwt.ts | 3 +++ lib/routes/gov/cmse/fxrw.ts | 3 +++ lib/routes/gov/cmse/index.ts | 3 +++ lib/routes/gov/csrc/news.ts | 3 +++ lib/routes/gov/forestry/gjlckjdjt.ts | 3 +++ lib/routes/gov/general/general.ts | 3 +++ lib/routes/gov/guangdong/tqyb/sncsyjxh.ts | 3 +++ lib/routes/gov/guangdong/tqyb/tfxtq.ts | 3 +++ lib/routes/gov/safe/util.ts | 3 +++ lib/routes/gov/samr/xgzlyhd.ts | 3 +++ lib/routes/gov/shanghai/rsj/ksxm.ts | 3 +++ lib/routes/gov/shanghai/wgj/wgj.ts | 3 +++ lib/routes/gov/sichuan/deyang/govpublicinfo.ts | 3 +++ lib/routes/gov/sichuan/deyang/mztoday.ts | 3 +++ lib/routes/gov/stats/index.ts | 3 +++ lib/routes/guduodata/daily.ts | 3 +++ lib/routes/gumroad/index.ts | 3 +++ lib/routes/gzdaily/app.ts | 3 +++ lib/routes/hafu/utils.ts | 3 +++ lib/routes/hashnode/blog.ts | 3 +++ lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts | 3 +++ lib/routes/hellogithub/index.ts | 3 +++ lib/routes/hellogithub/report.ts | 3 +++ lib/routes/hellogithub/volume.ts | 3 +++ lib/routes/hk01/utils.ts | 3 +++ lib/routes/hkej/index.ts | 3 +++ lib/routes/hket/index.ts | 3 +++ lib/routes/hostmonit/cloudflareyes.ts | 3 +++ lib/routes/houxu/events.ts | 3 +++ lib/routes/houxu/index.ts | 3 +++ lib/routes/houxu/memory.ts | 3 +++ lib/routes/hoyolab/news.ts | 3 +++ lib/routes/hrbust/utils.ts | 3 +++ lib/routes/hupu/all.ts | 3 +++ lib/routes/hupu/bbs.ts | 3 +++ lib/routes/huxiu/util.ts | 3 +++ lib/routes/ianspriggs/index.ts | 3 +++ lib/routes/ieee/earlyaccess.ts | 3 +++ lib/routes/ieee/journal.ts | 3 +++ lib/routes/ieee/recent.ts | 3 +++ lib/routes/ifeng/news.ts | 3 +++ lib/routes/ifeng/utils.ts | 3 +++ lib/routes/ikea/cn/utils.ts | 3 +++ lib/routes/ikea/gb/new.ts | 3 +++ lib/routes/ikea/gb/offer.ts | 3 +++ lib/routes/imiker/jinghua.ts | 3 +++ lib/routes/informs/index.ts | 3 +++ lib/routes/instagram/common-utils.ts | 3 +++ lib/routes/instagram/web-api/utils.ts | 3 +++ lib/routes/iqilu/program.ts | 3 +++ lib/routes/iqiyi/album.ts | 3 +++ lib/routes/iresearch/report.ts | 3 +++ lib/routes/iresearch/weekly.ts | 3 +++ lib/routes/itch/devlog.ts | 3 +++ lib/routes/itch/index.ts | 3 +++ lib/routes/iwara/subscriptions.ts | 3 +++ lib/routes/ixigua/user-video.ts | 3 +++ lib/routes/japanpost/track.ts | 3 +++ lib/routes/javbus/index.ts | 3 +++ lib/routes/javlibrary/utils.ts | 3 +++ lib/routes/jd/price.ts | 3 +++ lib/routes/jiemian/lists.ts | 3 +++ lib/routes/jin10/index.ts | 3 +++ lib/routes/jinse/catalogue.ts | 3 +++ lib/routes/jinse/lives.ts | 3 +++ lib/routes/jinse/timeline.ts | 3 +++ lib/routes/jjwxc/author.ts | 3 +++ lib/routes/jjwxc/book.ts | 3 +++ lib/routes/jump/discount.ts | 3 +++ lib/routes/kamen-rider-official/news.ts | 3 +++ lib/routes/kantarworldpanel/index.ts | 3 +++ lib/routes/kcna/news.ts | 3 +++ lib/routes/keep/user.ts | 3 +++ lib/routes/kemono/index.ts | 3 +++ lib/routes/kepu/live.ts | 3 +++ lib/routes/kyodonews/index.ts | 3 +++ lib/routes/lang/room.ts | 3 +++ lib/routes/lanqiao/utils.ts | 3 +++ lib/routes/learnku/topic.ts | 3 +++ lib/routes/leetcode/dailyquestion-cn.ts | 3 +++ lib/routes/leetcode/dailyquestion-en.ts | 3 +++ lib/routes/lfsyd/utils.ts | 3 +++ lib/routes/linkedin/cn/utils.ts | 3 +++ lib/routes/lkong/forum.ts | 3 +++ lib/routes/lkong/thread.ts | 3 +++ lib/routes/logclub/index.ts | 3 +++ lib/routes/logclub/report.ts | 3 +++ lib/routes/logonews/index.ts | 3 +++ lib/routes/loltw/news.ts | 3 +++ lib/routes/lovelive-anime/news.ts | 3 +++ lib/routes/lovelive-anime/schedules.ts | 3 +++ lib/routes/lovelive-anime/topics.ts | 3 +++ lib/routes/lvv2/news.ts | 3 +++ lib/routes/lvv2/top.ts | 3 +++ lib/routes/lxixsxa/discography.ts | 3 +++ lib/routes/lxixsxa/information.ts | 3 +++ lib/routes/m4/index.ts | 3 +++ lib/routes/magazinelib/latest-magazine.ts | 3 +++ lib/routes/manhuagui/subscribe.ts | 3 +++ lib/routes/mdpi/journal.ts | 3 +++ lib/routes/metacritic/index.ts | 3 +++ lib/routes/meteor/utils.ts | 3 +++ lib/routes/mihoyo/bbs/follow-list.ts | 3 +++ lib/routes/mihoyo/bbs/utils.ts | 3 +++ lib/routes/mihoyo/ys/news.ts | 3 +++ lib/routes/mindmeister/example.ts | 3 +++ lib/routes/mingpao/index.ts | 3 +++ lib/routes/missav/new.ts | 3 +++ lib/routes/misskey/utils.ts | 3 +++ lib/routes/mittrchina/index.ts | 3 +++ lib/routes/modelscope/community.ts | 3 +++ lib/routes/modelscope/datasets.ts | 3 +++ lib/routes/modelscope/studios.ts | 3 +++ lib/routes/modrinth/versions.ts | 3 +++ lib/routes/mydrivers/index.ts | 3 +++ lib/routes/myfigurecollection/activity.ts | 3 +++ lib/routes/myfigurecollection/index.ts | 3 +++ lib/routes/mymusicsheet/usersheets.ts | 3 +++ lib/routes/natgeo/dailyphoto.ts | 3 +++ lib/routes/nationalgeographic/latest-stories.ts | 3 +++ lib/routes/nautil/topics.ts | 3 +++ lib/routes/nber/index.ts | 3 +++ lib/routes/ncc-cma/cmdp.ts | 3 +++ lib/routes/netflav/index.ts | 3 +++ lib/routes/news/xhsxw.ts | 3 +++ lib/routes/newzmz/util.ts | 3 +++ lib/routes/nhentai/util.ts | 3 +++ lib/routes/nhk/news-web-easy.ts | 3 +++ lib/routes/nhk/news.ts | 3 +++ lib/routes/nikkei/news.ts | 3 +++ lib/routes/nintendo/direct.ts | 3 +++ lib/routes/nintendo/eshop-hk.ts | 3 +++ lib/routes/nintendo/eshop-jp.ts | 3 +++ lib/routes/nintendo/eshop-us.ts | 3 +++ lib/routes/nintendo/utils.ts | 3 +++ lib/routes/nmtv/column.ts | 3 +++ lib/routes/notefolio/search.ts | 3 +++ lib/routes/npm/package.ts | 3 +++ lib/routes/nytimes/daily-briefing-chinese.ts | 3 +++ lib/routes/oceanengine/arithmetic-index.ts | 3 +++ lib/routes/oeeee/app/channel.ts | 3 +++ lib/routes/oeeee/app/reporter.ts | 3 +++ lib/routes/oeeee/web.ts | 3 +++ lib/routes/oncc/index.ts | 3 +++ lib/routes/oncc/money18.ts | 3 +++ lib/routes/onet/news.ts | 3 +++ lib/routes/onet/utils.ts | 3 +++ lib/routes/openai/common.ts | 3 +++ lib/routes/orcid/index.ts | 3 +++ lib/routes/oreno3d/main.ts | 3 +++ lib/routes/oshwhub/explore.ts | 3 +++ lib/routes/otobanana/utils.ts | 3 +++ lib/routes/oup/index.ts | 3 +++ lib/routes/papers/index.ts | 3 +++ lib/routes/patagonia/new-arrivals.ts | 3 +++ lib/routes/penguin-random-house/utils.ts | 3 +++ lib/routes/picnob/user.ts | 3 +++ lib/routes/picuki/profile.ts | 3 +++ lib/routes/pikabu/utils.ts | 3 +++ lib/routes/pixabay/search.ts | 3 +++ lib/routes/pnas/index.ts | 3 +++ lib/routes/pornhub/utils.ts | 3 +++ lib/routes/producthunt/today.ts | 3 +++ lib/routes/ps/monthly-games.ts | 3 +++ lib/routes/pts/curations.ts | 3 +++ lib/routes/pts/index.ts | 3 +++ lib/routes/pts/live.ts | 3 +++ lib/routes/pts/projects.ts | 3 +++ lib/routes/pubmed/trending.ts | 3 +++ lib/routes/qidian/author.ts | 3 +++ lib/routes/qoo-app/apps/comment.ts | 3 +++ lib/routes/qoo-app/notes/note.ts | 3 +++ lib/routes/qoo-app/user/app-comment.ts | 3 +++ lib/routes/qq/ac/utils.ts | 3 +++ lib/routes/qq/fact/index.ts | 3 +++ lib/routes/questmobile/report.ts | 3 +++ lib/routes/qweather/3days.ts | 3 +++ lib/routes/qweather/now.ts | 3 +++ lib/routes/radio/album.ts | 3 +++ lib/routes/radio/index.ts | 3 +++ lib/routes/radio/zhibo.ts | 3 +++ lib/routes/rawkuma/manga.ts | 3 +++ lib/routes/readhub/index.ts | 3 +++ lib/routes/readhub/util.ts | 3 +++ lib/routes/reuters/common.ts | 3 +++ lib/routes/routledge/book-series.ts | 3 +++ lib/routes/rsc/journal.ts | 3 +++ lib/routes/saraba1st/digest.ts | 3 +++ lib/routes/science/cover.ts | 3 +++ lib/routes/science/utils.ts | 3 +++ lib/routes/sctv/programme.ts | 3 +++ lib/routes/sensortower/blog.ts | 3 +++ lib/routes/shcstheatre/programs.ts | 3 +++ lib/routes/shiep/index.ts | 3 +++ lib/routes/shmtu/portal.ts | 3 +++ lib/routes/shoac/recent-show.ts | 3 +++ lib/routes/shuiguopai/index.ts | 3 +++ lib/routes/simpleinfo/index.ts | 3 +++ lib/routes/sina/utils.ts | 3 +++ lib/routes/sinchew/index.ts | 3 +++ lib/routes/sjtu/tongqu/activity.ts | 3 +++ lib/routes/snowpeak/us-new-arrivals.ts | 3 +++ lib/routes/sogou/search.ts | 3 +++ lib/routes/sohu/mp.ts | 3 +++ lib/routes/southcn/nfapp/column.ts | 3 +++ lib/routes/southcn/nfapp/reporter.ts | 3 +++ lib/routes/springer/journal.ts | 3 +++ lib/routes/sse/inquire.ts | 3 +++ lib/routes/sse/renewal.ts | 3 +++ lib/routes/ssm/news.ts | 3 +++ lib/routes/stdaily/digitalpaper.ts | 3 +++ lib/routes/storyfm/episodes.ts | 3 +++ lib/routes/surfshark/blog.ts | 3 +++ lib/routes/swjtu/utils.ts | 3 +++ lib/routes/szse/inquire.ts | 3 +++ lib/routes/szse/projectdynamic.ts | 3 +++ lib/routes/taobao/zhongchou.ts | 3 +++ lib/routes/taptap/utils.ts | 3 +++ lib/routes/telegram/channel.ts | 3 +++ lib/routes/tencent/news/author.ts | 3 +++ lib/routes/tencent/news/coronavirus/data.ts | 3 +++ lib/routes/tencent/news/coronavirus/total.ts | 3 +++ lib/routes/tesla/cx.ts | 3 +++ lib/routes/tfc-taiwan/utils.ts | 3 +++ lib/routes/theatlantic/utils.ts | 3 +++ lib/routes/themoviedb/utils.ts | 3 +++ lib/routes/thenewslens/index.ts | 3 +++ lib/routes/thepaper/factpaper.ts | 3 +++ lib/routes/thepaper/utils.ts | 3 +++ lib/routes/thoughtco/index.ts | 3 +++ lib/routes/tiktok/user.ts | 3 +++ lib/routes/tingshuitz/shenzhen.ts | 3 +++ lib/routes/tingtingfm/program.ts | 3 +++ lib/routes/tophub/list.ts | 3 +++ lib/routes/tradingview/blog.ts | 3 +++ lib/routes/transcriptforest/index.ts | 3 +++ lib/routes/trending/all-trending.ts | 3 +++ lib/routes/tribalfootball/latest.ts | 3 +++ lib/routes/tvb/news.ts | 3 +++ lib/routes/tvtropes/featured.ts | 3 +++ lib/routes/txrjy/fornumtopic.ts | 3 +++ lib/routes/udn/breaking-news.ts | 3 +++ lib/routes/uptimerobot/rss.ts | 3 +++ lib/routes/urbandictionary/random.ts | 3 +++ lib/routes/utgd/category.ts | 3 +++ lib/routes/utgd/timeline.ts | 3 +++ lib/routes/utgd/topic.ts | 3 +++ lib/routes/vcb-s/category.ts | 3 +++ lib/routes/vcb-s/index.ts | 3 +++ lib/routes/vimeo/category.ts | 3 +++ lib/routes/vimeo/channel.ts | 3 +++ lib/routes/vimeo/usr-videos.ts | 3 +++ lib/routes/wallpaperhub/index.ts | 3 +++ lib/routes/wallstreetcn/live.ts | 3 +++ lib/routes/warthunder/news.ts | 3 +++ lib/routes/weibo/search/hot.ts | 3 +++ lib/routes/whu/news.ts | 3 +++ lib/routes/whu/util.ts | 3 +++ lib/routes/winstall/update.ts | 3 +++ lib/routes/wise/pair.ts | 3 +++ lib/routes/wmc-bj/publish.ts | 3 +++ lib/routes/wnacg/index.ts | 3 +++ lib/routes/wsj/utils.ts | 3 +++ lib/routes/x-mol/news.ts | 3 +++ lib/routes/xiaomiyoupin/crowdfunding.ts | 3 +++ lib/routes/xiaomiyoupin/utils.ts | 3 +++ lib/routes/xinpianchang/util.ts | 3 +++ lib/routes/xjtu/job.ts | 3 +++ lib/routes/xjtu/std.ts | 3 +++ lib/routes/xkb/index.ts | 3 +++ lib/routes/xueqiu/stock-comments.ts | 3 +++ lib/routes/xys/new.ts | 3 +++ lib/routes/xyzrank/index.ts | 3 +++ lib/routes/yahoo/news/tw/utils.ts | 3 +++ lib/routes/ycwb/index.ts | 3 +++ lib/routes/yicai/dt.ts | 3 +++ lib/routes/yicai/utils.ts | 3 +++ lib/routes/ymgal/game.ts | 3 +++ lib/routes/yoasobi-music/info.ts | 3 +++ lib/routes/yoasobi-music/live.ts | 3 +++ lib/routes/yoasobi-music/media.ts | 3 +++ lib/routes/youku/channel.ts | 3 +++ lib/routes/youtube/community.ts | 3 +++ lib/routes/youtube/utils.ts | 3 +++ lib/routes/yxdzqb/index.ts | 3 +++ lib/routes/zagg/new-arrivals.ts | 3 +++ lib/routes/zaobao/util.ts | 3 +++ lib/routes/zcool/discover.ts | 3 +++ lib/routes/zcool/utils.ts | 3 +++ lib/routes/zhangyoubao/index.ts | 3 +++ lib/routes/zhitongcaijing/index.ts | 3 +++ lib/routes/zhiy/post.ts | 3 +++ lib/routes/zhubai/top20.ts | 3 +++ lib/routes/zodgame/forum.ts | 3 +++ lib/routes/zuvio/utils.ts | 3 +++ lib/routes/zyshow/index.ts | 3 +++ 448 files changed, 1344 insertions(+) diff --git a/lib/routes/12306/index.ts b/lib/routes/12306/index.ts index 06593d8560..aeb16624f8 100644 --- a/lib/routes/12306/index.ts +++ b/lib/routes/12306/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/141jav/index.ts b/lib/routes/141jav/index.ts index 1beb58cc2e..35e6a05403 100644 --- a/lib/routes/141jav/index.ts +++ b/lib/routes/141jav/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/141ppv/index.ts b/lib/routes/141ppv/index.ts index 5271e9f1ee..92450620f5 100644 --- a/lib/routes/141ppv/index.ts +++ b/lib/routes/141ppv/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/163/ds.ts b/lib/routes/163/ds.ts index 7afcf869cc..2324d16592 100644 --- a/lib/routes/163/ds.ts +++ b/lib/routes/163/ds.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/163/exclusive.ts b/lib/routes/163/exclusive.ts index 255cf72013..e51c23879a 100644 --- a/lib/routes/163/exclusive.ts +++ b/lib/routes/163/exclusive.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/163/music/artist-songs.ts b/lib/routes/163/music/artist-songs.ts index 784d89b8eb..16828324cf 100644 --- a/lib/routes/163/music/artist-songs.ts +++ b/lib/routes/163/music/artist-songs.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/163/music/artist.ts b/lib/routes/163/music/artist.ts index 69bdc58701..03765becc4 100644 --- a/lib/routes/163/music/artist.ts +++ b/lib/routes/163/music/artist.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/163/music/djradio.ts b/lib/routes/163/music/djradio.ts index 4a7cd1c483..74f368fc3c 100644 --- a/lib/routes/163/music/djradio.ts +++ b/lib/routes/163/music/djradio.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/163/music/playlist.ts b/lib/routes/163/music/playlist.ts index ac15c80f4a..f5361e02a9 100644 --- a/lib/routes/163/music/playlist.ts +++ b/lib/routes/163/music/playlist.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { config } from '@/config'; import { art } from '@/utils/render'; diff --git a/lib/routes/163/music/userevents.ts b/lib/routes/163/music/userevents.ts index 67f5e4d338..2b0d05050e 100644 --- a/lib/routes/163/music/userevents.ts +++ b/lib/routes/163/music/userevents.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import * as path from 'node:path'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/163/music/userplaylist.ts b/lib/routes/163/music/userplaylist.ts index cbc18db475..306eea12e7 100644 --- a/lib/routes/163/music/userplaylist.ts +++ b/lib/routes/163/music/userplaylist.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/163/music/userplayrecords.ts b/lib/routes/163/music/userplayrecords.ts index 60fcb5cd70..4148fccb9a 100644 --- a/lib/routes/163/music/userplayrecords.ts +++ b/lib/routes/163/music/userplayrecords.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { config } from '@/config'; import { art } from '@/utils/render'; diff --git a/lib/routes/163/open/vip.ts b/lib/routes/163/open/vip.ts index 2b2f8f647f..8583af400c 100644 --- a/lib/routes/163/open/vip.ts +++ b/lib/routes/163/open/vip.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/163/utils.ts b/lib/routes/163/utils.ts index 9094dad5a7..9c85180255 100644 --- a/lib/routes/163/utils.ts +++ b/lib/routes/163/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; const iconv = require('iconv-lite'); diff --git a/lib/routes/18comic/utils.ts b/lib/routes/18comic/utils.ts index cbb81e1d6c..64e79820ed 100644 --- a/lib/routes/18comic/utils.ts +++ b/lib/routes/18comic/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/1point3acres/offer.ts b/lib/routes/1point3acres/offer.ts index 3acc46fb42..139f09e817 100644 --- a/lib/routes/1point3acres/offer.ts +++ b/lib/routes/1point3acres/offer.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/1point3acres/utils.ts b/lib/routes/1point3acres/utils.ts index 2a5f0737ea..f762336e1b 100644 --- a/lib/routes/1point3acres/utils.ts +++ b/lib/routes/1point3acres/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/2048/index.ts b/lib/routes/2048/index.ts index ab171addbc..ddbbabd67e 100644 --- a/lib/routes/2048/index.ts +++ b/lib/routes/2048/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/4gamers/utils.ts b/lib/routes/4gamers/utils.ts index 0743be8926..22f2191680 100644 --- a/lib/routes/4gamers/utils.ts +++ b/lib/routes/4gamers/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import * as path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/4ksj/forum.ts b/lib/routes/4ksj/forum.ts index 638126d458..7b8849e4bb 100644 --- a/lib/routes/4ksj/forum.ts +++ b/lib/routes/4ksj/forum.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/500px/tribe-set.ts b/lib/routes/500px/tribe-set.ts index 7cd66a8ff2..65587f1347 100644 --- a/lib/routes/500px/tribe-set.ts +++ b/lib/routes/500px/tribe-set.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/500px/user.ts b/lib/routes/500px/user.ts index 48a064aeaf..67c8aee0fc 100644 --- a/lib/routes/500px/user.ts +++ b/lib/routes/500px/user.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/56kog/util.ts b/lib/routes/56kog/util.ts index 38a0d0754c..5277a53631 100644 --- a/lib/routes/56kog/util.ts +++ b/lib/routes/56kog/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; const iconv = require('iconv-lite'); diff --git a/lib/routes/591/list.ts b/lib/routes/591/list.ts index 27f42775ce..9f16174443 100644 --- a/lib/routes/591/list.ts +++ b/lib/routes/591/list.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import * as path from 'node:path'; const { CookieJar } = require('tough-cookie'); diff --git a/lib/routes/78dm/index.ts b/lib/routes/78dm/index.ts index deef948212..cede1d65d2 100644 --- a/lib/routes/78dm/index.ts +++ b/lib/routes/78dm/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/7mmtv/index.ts b/lib/routes/7mmtv/index.ts index 6fa2b3312e..fd4a334435 100644 --- a/lib/routes/7mmtv/index.ts +++ b/lib/routes/7mmtv/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/8264/list.ts b/lib/routes/8264/list.ts index eff6bceb15..27a2dfaf76 100644 --- a/lib/routes/8264/list.ts +++ b/lib/routes/8264/list.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/91porn/author.ts b/lib/routes/91porn/author.ts index 10021ccacc..3d43c98c5c 100644 --- a/lib/routes/91porn/author.ts +++ b/lib/routes/91porn/author.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/91porn/index.ts b/lib/routes/91porn/index.ts index d8ad86ce9c..2adc296683 100644 --- a/lib/routes/91porn/index.ts +++ b/lib/routes/91porn/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/95mm/utils.ts b/lib/routes/95mm/utils.ts index 3de89a4b77..88d302b677 100644 --- a/lib/routes/95mm/utils.ts +++ b/lib/routes/95mm/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/abc/index.ts b/lib/routes/abc/index.ts index 2cdca94649..129afedce1 100644 --- a/lib/routes/abc/index.ts +++ b/lib/routes/abc/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/acs/journal.ts b/lib/routes/acs/journal.ts index 131a79df2a..9184463109 100644 --- a/lib/routes/acs/journal.ts +++ b/lib/routes/acs/journal.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/aeaweb/index.ts b/lib/routes/aeaweb/index.ts index 331b60db92..967ed030e4 100644 --- a/lib/routes/aeaweb/index.ts +++ b/lib/routes/aeaweb/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/aeon/utils.ts b/lib/routes/aeon/utils.ts index 5a8a87a305..9381a56ca7 100644 --- a/lib/routes/aeon/utils.ts +++ b/lib/routes/aeon/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/aicaijing/index.ts b/lib/routes/aicaijing/index.ts index 4ba0d4cfc0..b068e2063f 100644 --- a/lib/routes/aicaijing/index.ts +++ b/lib/routes/aicaijing/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/aip/utils.ts b/lib/routes/aip/utils.ts index 65d5386617..a7ba208ec4 100644 --- a/lib/routes/aip/utils.ts +++ b/lib/routes/aip/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import * as path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/aljazeera/index.ts b/lib/routes/aljazeera/index.ts index 20320d664b..9f94e3ca0f 100644 --- a/lib/routes/aljazeera/index.ts +++ b/lib/routes/aljazeera/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/amazon/kindle-software-updates.ts b/lib/routes/amazon/kindle-software-updates.ts index ad2eb986c5..9529eff90d 100644 --- a/lib/routes/amazon/kindle-software-updates.ts +++ b/lib/routes/amazon/kindle-software-updates.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/app-center/release.ts b/lib/routes/app-center/release.ts index e0bb406c41..e4f2c36394 100644 --- a/lib/routes/app-center/release.ts +++ b/lib/routes/app-center/release.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/aqara/post.ts b/lib/routes/aqara/post.ts index 176b036722..a7753c0545 100644 --- a/lib/routes/aqara/post.ts +++ b/lib/routes/aqara/post.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/arcteryx/new-arrivals.ts b/lib/routes/arcteryx/new-arrivals.ts index c0fb177d77..a910f78070 100644 --- a/lib/routes/arcteryx/new-arrivals.ts +++ b/lib/routes/arcteryx/new-arrivals.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/arcteryx/outlet.ts b/lib/routes/arcteryx/outlet.ts index a2c9bd1467..b98e337f67 100644 --- a/lib/routes/arcteryx/outlet.ts +++ b/lib/routes/arcteryx/outlet.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/arcteryx/regear-new-arrivals.ts b/lib/routes/arcteryx/regear-new-arrivals.ts index 1ce7963af3..1ef9370aff 100644 --- a/lib/routes/arcteryx/regear-new-arrivals.ts +++ b/lib/routes/arcteryx/regear-new-arrivals.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/artstation/user.ts b/lib/routes/artstation/user.ts index 50c66be086..229daff22e 100644 --- a/lib/routes/artstation/user.ts +++ b/lib/routes/artstation/user.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/asiantolick/index.ts b/lib/routes/asiantolick/index.ts index a686aee146..166dbe2b38 100644 --- a/lib/routes/asiantolick/index.ts +++ b/lib/routes/asiantolick/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/asus/bios.ts b/lib/routes/asus/bios.ts index 4d3a8adc76..dcc6c28c7d 100644 --- a/lib/routes/asus/bios.ts +++ b/lib/routes/asus/bios.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/baidu/gushitong/index.ts b/lib/routes/baidu/gushitong/index.ts index 6117199d2c..addc98310c 100644 --- a/lib/routes/baidu/gushitong/index.ts +++ b/lib/routes/baidu/gushitong/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/baidu/search.ts b/lib/routes/baidu/search.ts index c402e66c18..2eb24540a1 100644 --- a/lib/routes/baidu/search.ts +++ b/lib/routes/baidu/search.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/baidu/tieba/forum.ts b/lib/routes/baidu/tieba/forum.ts index 17ab1c239e..27f81aca55 100644 --- a/lib/routes/baidu/tieba/forum.ts +++ b/lib/routes/baidu/tieba/forum.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/baidu/tieba/post.ts b/lib/routes/baidu/tieba/post.ts index d088e6217d..9e5080e916 100644 --- a/lib/routes/baidu/tieba/post.ts +++ b/lib/routes/baidu/tieba/post.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/baidu/tieba/search.ts b/lib/routes/baidu/tieba/search.ts index 4f81d4ba4f..c0d89d54a5 100644 --- a/lib/routes/baidu/tieba/search.ts +++ b/lib/routes/baidu/tieba/search.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; const iconv = require('iconv-lite'); diff --git a/lib/routes/baidu/top.ts b/lib/routes/baidu/top.ts index e61d9172c1..3fe352bd61 100644 --- a/lib/routes/baidu/top.ts +++ b/lib/routes/baidu/top.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/bandcamp/weekly.ts b/lib/routes/bandcamp/weekly.ts index 55b39fb931..a24fb8bf98 100644 --- a/lib/routes/bandcamp/weekly.ts +++ b/lib/routes/bandcamp/weekly.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/bangumi/online/online.ts b/lib/routes/bangumi/online/online.ts index 391ce8518f..344dda43ac 100644 --- a/lib/routes/bangumi/online/online.ts +++ b/lib/routes/bangumi/online/online.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/bangumi/tv/calendar/today.ts b/lib/routes/bangumi/tv/calendar/today.ts index f205ac3f06..0872af7e80 100644 --- a/lib/routes/bangumi/tv/calendar/today.ts +++ b/lib/routes/bangumi/tv/calendar/today.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; const getData = require('./_base'); import { art } from '@/utils/render'; diff --git a/lib/routes/bangumi/tv/subject/ep.ts b/lib/routes/bangumi/tv/subject/ep.ts index e0ee772ff1..5b84a68de7 100644 --- a/lib/routes/bangumi/tv/subject/ep.ts +++ b/lib/routes/bangumi/tv/subject/ep.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/baozimh/index.ts b/lib/routes/baozimh/index.ts index c86a6dabf8..1674989173 100644 --- a/lib/routes/baozimh/index.ts +++ b/lib/routes/baozimh/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/bdys/index.ts b/lib/routes/bdys/index.ts index 983cfbddb8..ad280ad39e 100644 --- a/lib/routes/bdys/index.ts +++ b/lib/routes/bdys/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/bgmlist/onair.ts b/lib/routes/bgmlist/onair.ts index d05eede2a5..7028fa29df 100644 --- a/lib/routes/bgmlist/onair.ts +++ b/lib/routes/bgmlist/onair.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/bloomberg/utils.ts b/lib/routes/bloomberg/utils.ts index e694a42034..a9cbd10214 100644 --- a/lib/routes/bloomberg/utils.ts +++ b/lib/routes/bloomberg/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import * as path from 'node:path'; diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 034999b43f..7591f2a68a 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; const { resolveHandle, getProfile, getAuthorFeed } = require('./utils'); diff --git a/lib/routes/btzj/index.ts b/lib/routes/btzj/index.ts index 9e5494eb90..5657bb1fa3 100644 --- a/lib/routes/btzj/index.ts +++ b/lib/routes/btzj/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/caai/utils.ts b/lib/routes/caai/utils.ts index 0517b7a800..8538f81e88 100644 --- a/lib/routes/caai/utils.ts +++ b/lib/routes/caai/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/caareviews/utils.ts b/lib/routes/caareviews/utils.ts index 7b50451e89..224b11cc29 100644 --- a/lib/routes/caareviews/utils.ts +++ b/lib/routes/caareviews/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cahkms/index.ts b/lib/routes/cahkms/index.ts index c4616ae630..a2293979d7 100644 --- a/lib/routes/cahkms/index.ts +++ b/lib/routes/cahkms/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/caixin/database.ts b/lib/routes/caixin/database.ts index cd342745a5..2a77846338 100644 --- a/lib/routes/caixin/database.ts +++ b/lib/routes/caixin/database.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/caixin/latest.ts b/lib/routes/caixin/latest.ts index 5801781bcf..7fe94db82e 100644 --- a/lib/routes/caixin/latest.ts +++ b/lib/routes/caixin/latest.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/caixin/utils.ts b/lib/routes/caixin/utils.ts index a8dce00b77..b97a413e4a 100644 --- a/lib/routes/caixin/utils.ts +++ b/lib/routes/caixin/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/cankaoxiaoxi/index.ts b/lib/routes/cankaoxiaoxi/index.ts index e9d8ba809b..4bd41b7821 100644 --- a/lib/routes/cankaoxiaoxi/index.ts +++ b/lib/routes/cankaoxiaoxi/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/cartoonmad/comic.ts b/lib/routes/cartoonmad/comic.ts index a5ccd7c9d2..3fbbdd0e6a 100644 --- a/lib/routes/cartoonmad/comic.ts +++ b/lib/routes/cartoonmad/comic.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/cbaigui/index.ts b/lib/routes/cbaigui/index.ts index b066d76c29..703c458bbc 100644 --- a/lib/routes/cbaigui/index.ts +++ b/lib/routes/cbaigui/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/ccf/ccfcv/index.ts b/lib/routes/ccf/ccfcv/index.ts index b405dad8ed..04562483bf 100644 --- a/lib/routes/ccf/ccfcv/index.ts +++ b/lib/routes/ccf/ccfcv/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/ccf/tfbd/utils.ts b/lib/routes/ccf/tfbd/utils.ts index b62965df3a..676c200a01 100644 --- a/lib/routes/ccf/tfbd/utils.ts +++ b/lib/routes/ccf/tfbd/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/cde/xxgk.ts b/lib/routes/cde/xxgk.ts index dcf1d740b5..41ee2197bb 100644 --- a/lib/routes/cde/xxgk.ts +++ b/lib/routes/cde/xxgk.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/cdzjryb/project-list.ts b/lib/routes/cdzjryb/project-list.ts index c6eb2430e7..cde30a7ed1 100644 --- a/lib/routes/cdzjryb/project-list.ts +++ b/lib/routes/cdzjryb/project-list.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cebbank/all.ts b/lib/routes/cebbank/all.ts index c5ba15200b..5a3629fd99 100644 --- a/lib/routes/cebbank/all.ts +++ b/lib/routes/cebbank/all.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import * as path from 'node:path'; diff --git a/lib/routes/cebbank/history.ts b/lib/routes/cebbank/history.ts index 30ec6cfc61..d71310cd9f 100644 --- a/lib/routes/cebbank/history.ts +++ b/lib/routes/cebbank/history.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import * as path from 'node:path'; diff --git a/lib/routes/chaincatcher/home.ts b/lib/routes/chaincatcher/home.ts index 90c4a1b46f..9abb8ebba5 100644 --- a/lib/routes/chaincatcher/home.ts +++ b/lib/routes/chaincatcher/home.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/changba/user.ts b/lib/routes/changba/user.ts index c12247d61a..a14cde0e4a 100644 --- a/lib/routes/changba/user.ts +++ b/lib/routes/changba/user.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/chaoxing/qk.ts b/lib/routes/chaoxing/qk.ts index 9a75665bb1..039326ac49 100644 --- a/lib/routes/chaoxing/qk.ts +++ b/lib/routes/chaoxing/qk.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/chinadegrees/province.ts b/lib/routes/chinadegrees/province.ts index 1946bdae11..bbc603c5a5 100644 --- a/lib/routes/chinadegrees/province.ts +++ b/lib/routes/chinadegrees/province.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/chuanliu/nice.ts b/lib/routes/chuanliu/nice.ts index eaff5ef614..5caf24d059 100644 --- a/lib/routes/chuanliu/nice.ts +++ b/lib/routes/chuanliu/nice.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/cls/depth.ts b/lib/routes/cls/depth.ts index 8308583aa1..484b7c053d 100644 --- a/lib/routes/cls/depth.ts +++ b/lib/routes/cls/depth.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cls/hot.ts b/lib/routes/cls/hot.ts index dc058afb18..176c7dca87 100644 --- a/lib/routes/cls/hot.ts +++ b/lib/routes/cls/hot.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cls/telegraph.ts b/lib/routes/cls/telegraph.ts index 7bedaae861..a67277ba3a 100644 --- a/lib/routes/cls/telegraph.ts +++ b/lib/routes/cls/telegraph.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/cma/channel.ts b/lib/routes/cma/channel.ts index b3c5e5b3c6..e70a4bd417 100644 --- a/lib/routes/cma/channel.ts +++ b/lib/routes/cma/channel.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/cngal/entry.ts b/lib/routes/cngal/entry.ts index 3bbcf4095a..5439800fc1 100644 --- a/lib/routes/cngal/entry.ts +++ b/lib/routes/cngal/entry.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/cngal/weekly.ts b/lib/routes/cngal/weekly.ts index 1598d0048b..76353ae18c 100644 --- a/lib/routes/cngal/weekly.ts +++ b/lib/routes/cngal/weekly.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/cnjxol/index.ts b/lib/routes/cnjxol/index.ts index f557c56798..bee7049eb1 100644 --- a/lib/routes/cnjxol/index.ts +++ b/lib/routes/cnjxol/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cnki/debut.ts b/lib/routes/cnki/debut.ts index b7ba8cb016..b8d8c5882e 100644 --- a/lib/routes/cnki/debut.ts +++ b/lib/routes/cnki/debut.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cnki/utils.ts b/lib/routes/cnki/utils.ts index 575e6893f7..18afa9e5d0 100644 --- a/lib/routes/cnki/utils.ts +++ b/lib/routes/cnki/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/cntheory/paper.ts b/lib/routes/cntheory/paper.ts index 29596745f8..d340712700 100644 --- a/lib/routes/cntheory/paper.ts +++ b/lib/routes/cntheory/paper.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/cntv/column.ts b/lib/routes/cntv/column.ts index 850e7d9e3f..15e259543b 100644 --- a/lib/routes/cntv/column.ts +++ b/lib/routes/cntv/column.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/codeforces/contests.ts b/lib/routes/codeforces/contests.ts index 379c367908..3dab52a896 100644 --- a/lib/routes/codeforces/contests.ts +++ b/lib/routes/codeforces/contests.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import * as path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/comicskingdom/index.ts b/lib/routes/comicskingdom/index.ts index a3e27109de..9c8e85c482 100644 --- a/lib/routes/comicskingdom/index.ts +++ b/lib/routes/comicskingdom/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/copymanga/comic.ts b/lib/routes/copymanga/comic.ts index ad0bcccb1c..62788351e2 100644 --- a/lib/routes/copymanga/comic.ts +++ b/lib/routes/copymanga/comic.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/creative-comic/book.ts b/lib/routes/creative-comic/book.ts index f67e860360..2a48aaa866 100644 --- a/lib/routes/creative-comic/book.ts +++ b/lib/routes/creative-comic/book.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/curius/links.ts b/lib/routes/curius/links.ts index 911e98fd58..b2b2fe6a39 100644 --- a/lib/routes/curius/links.ts +++ b/lib/routes/curius/links.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/cztv/daily.ts b/lib/routes/cztv/daily.ts index f5d5884606..4c7f595f84 100644 --- a/lib/routes/cztv/daily.ts +++ b/lib/routes/cztv/daily.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/cztv/zjxwlb.ts b/lib/routes/cztv/zjxwlb.ts index d229991886..d80798f454 100644 --- a/lib/routes/cztv/zjxwlb.ts +++ b/lib/routes/cztv/zjxwlb.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/damai/activity.ts b/lib/routes/damai/activity.ts index 8b38283210..60dfc5e8a2 100644 --- a/lib/routes/damai/activity.ts +++ b/lib/routes/damai/activity.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/dcfever/utils.ts b/lib/routes/dcfever/utils.ts index facf53eec7..52897f4b8b 100644 --- a/lib/routes/dcfever/utils.ts +++ b/lib/routes/dcfever/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/deadline/posts.ts b/lib/routes/deadline/posts.ts index fd01a84130..c49d472016 100644 --- a/lib/routes/deadline/posts.ts +++ b/lib/routes/deadline/posts.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/dedao/knowledge.ts b/lib/routes/dedao/knowledge.ts index 1ef9da8af7..bb66217ea7 100644 --- a/lib/routes/dedao/knowledge.ts +++ b/lib/routes/dedao/knowledge.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/dedao/user.ts b/lib/routes/dedao/user.ts index 8ff4daacc8..538ab45f0d 100644 --- a/lib/routes/dedao/user.ts +++ b/lib/routes/dedao/user.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/diershoubing/news.ts b/lib/routes/diershoubing/news.ts index edec953601..ace6144875 100644 --- a/lib/routes/diershoubing/news.ts +++ b/lib/routes/diershoubing/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/discord/channel.ts b/lib/routes/discord/channel.ts index 7f08cfb2b6..d97386d855 100644 --- a/lib/routes/discord/channel.ts +++ b/lib/routes/discord/channel.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/dlnews/category.ts b/lib/routes/dlnews/category.ts index 635a784653..36ea545edf 100644 --- a/lib/routes/dlnews/category.ts +++ b/lib/routes/dlnews/category.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/dlsite/utils.ts b/lib/routes/dlsite/utils.ts index 117a65ace7..4220112b24 100644 --- a/lib/routes/dlsite/utils.ts +++ b/lib/routes/dlsite/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/dn/news.ts b/lib/routes/dn/news.ts index 334696944f..cda4f5e387 100644 --- a/lib/routes/dn/news.ts +++ b/lib/routes/dn/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/douban/other/explore.ts b/lib/routes/douban/other/explore.ts index 8341744e30..1b204c6366 100644 --- a/lib/routes/douban/other/explore.ts +++ b/lib/routes/douban/other/explore.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/douban/other/list.ts b/lib/routes/douban/other/list.ts index 848127567b..62685d65da 100644 --- a/lib/routes/douban/other/list.ts +++ b/lib/routes/douban/other/list.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import * as path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/douban/other/recommended.ts b/lib/routes/douban/other/recommended.ts index 7ac842dbc3..82a373b3cc 100644 --- a/lib/routes/douban/other/recommended.ts +++ b/lib/routes/douban/other/recommended.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import * as path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/douban/other/weekly-best.ts b/lib/routes/douban/other/weekly-best.ts index 984f75aed7..5ddd3d313a 100644 --- a/lib/routes/douban/other/weekly-best.ts +++ b/lib/routes/douban/other/weekly-best.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/douyin/utils.ts b/lib/routes/douyin/utils.ts index ea1c1ba2e0..3c41692d2e 100644 --- a/lib/routes/douyin/utils.ts +++ b/lib/routes/douyin/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import * as path from 'node:path'; import got from '@/utils/got'; diff --git a/lib/routes/douyu/group.ts b/lib/routes/douyu/group.ts index 17fa52e147..a7553d21b7 100644 --- a/lib/routes/douyu/group.ts +++ b/lib/routes/douyu/group.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/douyu/post.ts b/lib/routes/douyu/post.ts index 501a541343..160cc5b3c6 100644 --- a/lib/routes/douyu/post.ts +++ b/lib/routes/douyu/post.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/dribbble/utils.ts b/lib/routes/dribbble/utils.ts index 8ef4760c47..c5a4c1d032 100644 --- a/lib/routes/dribbble/utils.ts +++ b/lib/routes/dribbble/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/duozhuayu/search.ts b/lib/routes/duozhuayu/search.ts index ef349acfc7..3eef2e9edd 100644 --- a/lib/routes/duozhuayu/search.ts +++ b/lib/routes/duozhuayu/search.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; const aesjs = require('aes-js'); import { art } from '@/utils/render'; diff --git a/lib/routes/dushu/fuzhou/index.ts b/lib/routes/dushu/fuzhou/index.ts index a4ee750768..20acd4dfb3 100644 --- a/lib/routes/dushu/fuzhou/index.ts +++ b/lib/routes/dushu/fuzhou/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/e-hentai/index.ts b/lib/routes/e-hentai/index.ts index b3a668aac8..8880844638 100644 --- a/lib/routes/e-hentai/index.ts +++ b/lib/routes/e-hentai/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/ecnu/contest.ts b/lib/routes/ecnu/contest.ts index 299a0bb3e5..d98c9cec07 100644 --- a/lib/routes/ecnu/contest.ts +++ b/lib/routes/ecnu/contest.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/elsevier/issue.ts b/lib/routes/elsevier/issue.ts index f1c491367e..06eaacf39a 100644 --- a/lib/routes/elsevier/issue.ts +++ b/lib/routes/elsevier/issue.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/elsevier/journal.ts b/lib/routes/elsevier/journal.ts index e5ce74c8be..0150b1600e 100644 --- a/lib/routes/elsevier/journal.ts +++ b/lib/routes/elsevier/journal.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/epicgames/index.ts b/lib/routes/epicgames/index.ts index 68707d07a4..3e54fe64dd 100644 --- a/lib/routes/epicgames/index.ts +++ b/lib/routes/epicgames/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/eprice/rss.ts b/lib/routes/eprice/rss.ts index daacbbb142..59830ed9f3 100644 --- a/lib/routes/eprice/rss.ts +++ b/lib/routes/eprice/rss.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import parser from '@/utils/rss-parser'; diff --git a/lib/routes/fansly/utils.ts b/lib/routes/fansly/utils.ts index b749ea471b..ed37149703 100644 --- a/lib/routes/fansly/utils.ts +++ b/lib/routes/fansly/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import * as path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/farmatters/index.ts b/lib/routes/farmatters/index.ts index 4112cb4608..dcda8bf61d 100644 --- a/lib/routes/farmatters/index.ts +++ b/lib/routes/farmatters/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/fastbull/news.ts b/lib/routes/fastbull/news.ts index 4c3f7591ac..8dfc4e0b3d 100644 --- a/lib/routes/fastbull/news.ts +++ b/lib/routes/fastbull/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/feng/forum.ts b/lib/routes/feng/forum.ts index 6a7a8544d9..7cf981177a 100644 --- a/lib/routes/feng/forum.ts +++ b/lib/routes/feng/forum.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { parseDate } from '@/utils/parse-date'; const { baseUrl, getForumMeta, getThreads, getThread } = require('./utils'); import { art } from '@/utils/render'; diff --git a/lib/routes/ff14/ff14-global.ts b/lib/routes/ff14/ff14-global.ts index eafc405022..c6f5b74098 100644 --- a/lib/routes/ff14/ff14-global.ts +++ b/lib/routes/ff14/ff14-global.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/ff14/ff14-zh.ts b/lib/routes/ff14/ff14-zh.ts index 9b27034147..4179ad2784 100644 --- a/lib/routes/ff14/ff14-zh.ts +++ b/lib/routes/ff14/ff14-zh.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/fffdm/manhua/manhua.ts b/lib/routes/fffdm/manhua/manhua.ts index 01a33053b5..83ec4e1984 100644 --- a/lib/routes/fffdm/manhua/manhua.ts +++ b/lib/routes/fffdm/manhua/manhua.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; const domain = 'manhua.fffdm.com'; diff --git a/lib/routes/fisher-spb/news.ts b/lib/routes/fisher-spb/news.ts index 54e71d16de..7aa626bafe 100644 --- a/lib/routes/fisher-spb/news.ts +++ b/lib/routes/fisher-spb/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/focustaiwan/index.ts b/lib/routes/focustaiwan/index.ts index 17e0fc9b11..3e64e8331c 100644 --- a/lib/routes/focustaiwan/index.ts +++ b/lib/routes/focustaiwan/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/followin/utils.ts b/lib/routes/followin/utils.ts index b99894b608..8421e79c94 100644 --- a/lib/routes/followin/utils.ts +++ b/lib/routes/followin/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/foresightnews/util.ts b/lib/routes/foresightnews/util.ts index 7318e27d68..09e56603b9 100644 --- a/lib/routes/foresightnews/util.ts +++ b/lib/routes/foresightnews/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/fosshub/index.ts b/lib/routes/fosshub/index.ts index 388a136b9e..4cf568174f 100644 --- a/lib/routes/fosshub/index.ts +++ b/lib/routes/fosshub/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/freecomputerbooks/index.ts b/lib/routes/freecomputerbooks/index.ts index fccc008ccb..f9457b867e 100644 --- a/lib/routes/freecomputerbooks/index.ts +++ b/lib/routes/freecomputerbooks/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import * as path from 'node:path'; diff --git a/lib/routes/furstar/utils.ts b/lib/routes/furstar/utils.ts index 5db2fe029e..60308c28c6 100644 --- a/lib/routes/furstar/utils.ts +++ b/lib/routes/furstar/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/futunn/main.ts b/lib/routes/futunn/main.ts index df26adcc3f..08769d6137 100644 --- a/lib/routes/futunn/main.ts +++ b/lib/routes/futunn/main.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gameapps/index.ts b/lib/routes/gameapps/index.ts index b30e916d0d..db76bd95d9 100644 --- a/lib/routes/gameapps/index.ts +++ b/lib/routes/gameapps/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import parser from '@/utils/rss-parser'; diff --git a/lib/routes/gcores/radio.ts b/lib/routes/gcores/radio.ts index 7242eac788..d2e9773a95 100644 --- a/lib/routes/gcores/radio.ts +++ b/lib/routes/gcores/radio.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; diff --git a/lib/routes/gelonghui/live.ts b/lib/routes/gelonghui/live.ts index 901020b4db..3cd5b432b1 100644 --- a/lib/routes/gelonghui/live.ts +++ b/lib/routes/gelonghui/live.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/gettr/user.ts b/lib/routes/gettr/user.ts index 0e5486d877..c4366f273b 100644 --- a/lib/routes/gettr/user.ts +++ b/lib/routes/gettr/user.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/github/pulse.ts b/lib/routes/github/pulse.ts index b01a76eb88..e95efbbb39 100644 --- a/lib/routes/github/pulse.ts +++ b/lib/routes/github/pulse.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import * as path from 'node:path'; import got from '@/utils/got'; diff --git a/lib/routes/github/trending.ts b/lib/routes/github/trending.ts index 83372f3609..9f11c761bb 100644 --- a/lib/routes/github/trending.ts +++ b/lib/routes/github/trending.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { config } from '@/config'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/gitpod/blog.ts b/lib/routes/gitpod/blog.ts index 2a953dbb7f..a4225fdc94 100644 --- a/lib/routes/gitpod/blog.ts +++ b/lib/routes/gitpod/blog.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gofans/index.ts b/lib/routes/gofans/index.ts index 24ee797763..33f18c5766 100644 --- a/lib/routes/gofans/index.ts +++ b/lib/routes/gofans/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/google/fonts.ts b/lib/routes/google/fonts.ts index 5818317787..70c1784fe8 100644 --- a/lib/routes/google/fonts.ts +++ b/lib/routes/google/fonts.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { config } from '@/config'; import { art } from '@/utils/render'; diff --git a/lib/routes/google/news.ts b/lib/routes/google/news.ts index 6cdcc4e8bf..52e9af2959 100644 --- a/lib/routes/google/news.ts +++ b/lib/routes/google/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/google/search.ts b/lib/routes/google/search.ts index 1d311b3c0a..b6073817eb 100644 --- a/lib/routes/google/search.ts +++ b/lib/routes/google/search.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gov/caac/cjwt.ts b/lib/routes/gov/caac/cjwt.ts index 154e8e77fc..a342cec57c 100644 --- a/lib/routes/gov/caac/cjwt.ts +++ b/lib/routes/gov/caac/cjwt.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/gov/cmse/fxrw.ts b/lib/routes/gov/cmse/fxrw.ts index 0b5430a750..03eeb25c87 100644 --- a/lib/routes/gov/cmse/fxrw.ts +++ b/lib/routes/gov/cmse/fxrw.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/gov/cmse/index.ts b/lib/routes/gov/cmse/index.ts index 2eb4e5941c..32e08f5b3b 100644 --- a/lib/routes/gov/cmse/index.ts +++ b/lib/routes/gov/cmse/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/gov/csrc/news.ts b/lib/routes/gov/csrc/news.ts index acb64a75cc..e8f4afc325 100644 --- a/lib/routes/gov/csrc/news.ts +++ b/lib/routes/gov/csrc/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/gov/forestry/gjlckjdjt.ts b/lib/routes/gov/forestry/gjlckjdjt.ts index 6a7b9a18fd..0e5d9d8856 100644 --- a/lib/routes/gov/forestry/gjlckjdjt.ts +++ b/lib/routes/gov/forestry/gjlckjdjt.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gov/general/general.ts b/lib/routes/gov/general/general.ts index 25cbe3323f..0b2df856ec 100644 --- a/lib/routes/gov/general/general.ts +++ b/lib/routes/gov/general/general.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; // 来人拯救一下啊( >﹏<。) diff --git a/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts b/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts index b020c30bd1..682ead1e95 100644 --- a/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts +++ b/lib/routes/gov/guangdong/tqyb/sncsyjxh.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/gov/guangdong/tqyb/tfxtq.ts b/lib/routes/gov/guangdong/tqyb/tfxtq.ts index f21c6aa4d3..a74e68c133 100644 --- a/lib/routes/gov/guangdong/tqyb/tfxtq.ts +++ b/lib/routes/gov/guangdong/tqyb/tfxtq.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/gov/safe/util.ts b/lib/routes/gov/safe/util.ts index 823e090705..d6c969227e 100644 --- a/lib/routes/gov/safe/util.ts +++ b/lib/routes/gov/safe/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/gov/samr/xgzlyhd.ts b/lib/routes/gov/samr/xgzlyhd.ts index ee00a16d8d..29c6264f69 100644 --- a/lib/routes/gov/samr/xgzlyhd.ts +++ b/lib/routes/gov/samr/xgzlyhd.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/gov/shanghai/rsj/ksxm.ts b/lib/routes/gov/shanghai/rsj/ksxm.ts index cb52f85948..2d4e2d84bb 100644 --- a/lib/routes/gov/shanghai/rsj/ksxm.ts +++ b/lib/routes/gov/shanghai/rsj/ksxm.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; const iconv = require('iconv-lite'); diff --git a/lib/routes/gov/shanghai/wgj/wgj.ts b/lib/routes/gov/shanghai/wgj/wgj.ts index 8e9ad42c0f..4047a05581 100644 --- a/lib/routes/gov/shanghai/wgj/wgj.ts +++ b/lib/routes/gov/shanghai/wgj/wgj.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts b/lib/routes/gov/sichuan/deyang/govpublicinfo.ts index 89554670c4..86e4cf77e5 100644 --- a/lib/routes/gov/sichuan/deyang/govpublicinfo.ts +++ b/lib/routes/gov/sichuan/deyang/govpublicinfo.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gov/sichuan/deyang/mztoday.ts b/lib/routes/gov/sichuan/deyang/mztoday.ts index 132a65872c..7507bbf98c 100644 --- a/lib/routes/gov/sichuan/deyang/mztoday.ts +++ b/lib/routes/gov/sichuan/deyang/mztoday.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/gov/stats/index.ts b/lib/routes/gov/stats/index.ts index 42a6020a74..96a2f079e0 100644 --- a/lib/routes/gov/stats/index.ts +++ b/lib/routes/gov/stats/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/guduodata/daily.ts b/lib/routes/guduodata/daily.ts index 22c7feb7b3..ba7e4a2a8a 100644 --- a/lib/routes/guduodata/daily.ts +++ b/lib/routes/guduodata/daily.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; const dayjs = require('dayjs'); diff --git a/lib/routes/gumroad/index.ts b/lib/routes/gumroad/index.ts index d7ec1112ed..270d775d07 100644 --- a/lib/routes/gumroad/index.ts +++ b/lib/routes/gumroad/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/gzdaily/app.ts b/lib/routes/gzdaily/app.ts index 773b0c871c..db75c8896d 100644 --- a/lib/routes/gzdaily/app.ts +++ b/lib/routes/gzdaily/app.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/hafu/utils.ts b/lib/routes/hafu/utils.ts index df4f28d33c..7360e1d0e1 100644 --- a/lib/routes/hafu/utils.ts +++ b/lib/routes/hafu/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/hashnode/blog.ts b/lib/routes/hashnode/blog.ts index 8eb945e2d7..8f49652b24 100644 --- a/lib/routes/hashnode/blog.ts +++ b/lib/routes/hashnode/blog.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts b/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts index 5298c35958..2c3f19b455 100644 --- a/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts +++ b/lib/routes/hebtv/nong-bo-shi-zai-xing-dong.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/hellogithub/index.ts b/lib/routes/hellogithub/index.ts index e31d9f47b2..da3b14fe2c 100644 --- a/lib/routes/hellogithub/index.ts +++ b/lib/routes/hellogithub/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/hellogithub/report.ts b/lib/routes/hellogithub/report.ts index 38957a94fc..9ade61adae 100644 --- a/lib/routes/hellogithub/report.ts +++ b/lib/routes/hellogithub/report.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/hellogithub/volume.ts b/lib/routes/hellogithub/volume.ts index 7a8ea13e46..9e36999352 100644 --- a/lib/routes/hellogithub/volume.ts +++ b/lib/routes/hellogithub/volume.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/hk01/utils.ts b/lib/routes/hk01/utils.ts index 98e2f3fc27..671e691630 100644 --- a/lib/routes/hk01/utils.ts +++ b/lib/routes/hk01/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/hkej/index.ts b/lib/routes/hkej/index.ts index 05bb8b9b78..b871cd3549 100644 --- a/lib/routes/hkej/index.ts +++ b/lib/routes/hkej/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/hket/index.ts b/lib/routes/hket/index.ts index 2eb00d11d4..e309da57d8 100644 --- a/lib/routes/hket/index.ts +++ b/lib/routes/hket/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/hostmonit/cloudflareyes.ts b/lib/routes/hostmonit/cloudflareyes.ts index 49d5a5e89e..03d0a0834f 100644 --- a/lib/routes/hostmonit/cloudflareyes.ts +++ b/lib/routes/hostmonit/cloudflareyes.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/houxu/events.ts b/lib/routes/houxu/events.ts index 25c6f25d67..63fd2f47e7 100644 --- a/lib/routes/houxu/events.ts +++ b/lib/routes/houxu/events.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/houxu/index.ts b/lib/routes/houxu/index.ts index f400ec42ef..ad2b5df798 100644 --- a/lib/routes/houxu/index.ts +++ b/lib/routes/houxu/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/houxu/memory.ts b/lib/routes/houxu/memory.ts index 621f775b3f..43cfd71198 100644 --- a/lib/routes/houxu/memory.ts +++ b/lib/routes/houxu/memory.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/hoyolab/news.ts b/lib/routes/hoyolab/news.ts index 84020a4de4..80e4714bd9 100644 --- a/lib/routes/hoyolab/news.ts +++ b/lib/routes/hoyolab/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import logger from '@/utils/logger'; diff --git a/lib/routes/hrbust/utils.ts b/lib/routes/hrbust/utils.ts index 800c331535..ffd0126529 100644 --- a/lib/routes/hrbust/utils.ts +++ b/lib/routes/hrbust/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/hupu/all.ts b/lib/routes/hupu/all.ts index 6bd3217a78..b6e2bf79e7 100644 --- a/lib/routes/hupu/all.ts +++ b/lib/routes/hupu/all.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/hupu/bbs.ts b/lib/routes/hupu/bbs.ts index 2e02d9a7dd..45a9626cf2 100644 --- a/lib/routes/hupu/bbs.ts +++ b/lib/routes/hupu/bbs.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/huxiu/util.ts b/lib/routes/huxiu/util.ts index a85c8bb432..9bf23aae2c 100644 --- a/lib/routes/huxiu/util.ts +++ b/lib/routes/huxiu/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/ianspriggs/index.ts b/lib/routes/ianspriggs/index.ts index b1138c4853..94bbbdf68c 100644 --- a/lib/routes/ianspriggs/index.ts +++ b/lib/routes/ianspriggs/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/ieee/earlyaccess.ts b/lib/routes/ieee/earlyaccess.ts index 80ca78588b..944b8cb13e 100644 --- a/lib/routes/ieee/earlyaccess.ts +++ b/lib/routes/ieee/earlyaccess.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/ieee/journal.ts b/lib/routes/ieee/journal.ts index 5fee0f8832..1b2809bbe3 100644 --- a/lib/routes/ieee/journal.ts +++ b/lib/routes/ieee/journal.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/ieee/recent.ts b/lib/routes/ieee/recent.ts index 4a3e7a83d0..95adbcb1f8 100644 --- a/lib/routes/ieee/recent.ts +++ b/lib/routes/ieee/recent.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/ifeng/news.ts b/lib/routes/ifeng/news.ts index 275f0a744a..e4ca6a1b99 100644 --- a/lib/routes/ifeng/news.ts +++ b/lib/routes/ifeng/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/ifeng/utils.ts b/lib/routes/ifeng/utils.ts index d4da6d0c5b..f7297935e6 100644 --- a/lib/routes/ifeng/utils.ts +++ b/lib/routes/ifeng/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/ikea/cn/utils.ts b/lib/routes/ikea/cn/utils.ts index 8c8f90ad43..6fb7049cbe 100644 --- a/lib/routes/ikea/cn/utils.ts +++ b/lib/routes/ikea/cn/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import md5 from '@/utils/md5'; import * as path from 'node:path'; diff --git a/lib/routes/ikea/gb/new.ts b/lib/routes/ikea/gb/new.ts index ca8ce93ffd..185b618e34 100644 --- a/lib/routes/ikea/gb/new.ts +++ b/lib/routes/ikea/gb/new.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/ikea/gb/offer.ts b/lib/routes/ikea/gb/offer.ts index 55c10923cd..46fcf909c4 100644 --- a/lib/routes/ikea/gb/offer.ts +++ b/lib/routes/ikea/gb/offer.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/imiker/jinghua.ts b/lib/routes/imiker/jinghua.ts index a4328aaed1..3afcd1fcd5 100644 --- a/lib/routes/imiker/jinghua.ts +++ b/lib/routes/imiker/jinghua.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/informs/index.ts b/lib/routes/informs/index.ts index 82b8265dde..ae4cb6419f 100644 --- a/lib/routes/informs/index.ts +++ b/lib/routes/informs/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { config } from '@/config'; import got from '@/utils/got'; diff --git a/lib/routes/instagram/common-utils.ts b/lib/routes/instagram/common-utils.ts index 624c2a6b2e..e4e7955e62 100644 --- a/lib/routes/instagram/common-utils.ts +++ b/lib/routes/instagram/common-utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/instagram/web-api/utils.ts b/lib/routes/instagram/web-api/utils.ts index 7cf80d338c..95a5c2b93f 100644 --- a/lib/routes/instagram/web-api/utils.ts +++ b/lib/routes/instagram/web-api/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; diff --git a/lib/routes/iqilu/program.ts b/lib/routes/iqilu/program.ts index 38f98046ae..a0a59d6dbc 100644 --- a/lib/routes/iqilu/program.ts +++ b/lib/routes/iqilu/program.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/iqiyi/album.ts b/lib/routes/iqiyi/album.ts index cd5f7ee0ca..1c428ebce1 100644 --- a/lib/routes/iqiyi/album.ts +++ b/lib/routes/iqiyi/album.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/iresearch/report.ts b/lib/routes/iresearch/report.ts index 4417aa4173..26d68a25b3 100644 --- a/lib/routes/iresearch/report.ts +++ b/lib/routes/iresearch/report.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/iresearch/weekly.ts b/lib/routes/iresearch/weekly.ts index 0375d52e45..631a88eadc 100644 --- a/lib/routes/iresearch/weekly.ts +++ b/lib/routes/iresearch/weekly.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/itch/devlog.ts b/lib/routes/itch/devlog.ts index 23750fa1e4..d3050c93a0 100644 --- a/lib/routes/itch/devlog.ts +++ b/lib/routes/itch/devlog.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/itch/index.ts b/lib/routes/itch/index.ts index 9917b863d9..e376d69256 100644 --- a/lib/routes/itch/index.ts +++ b/lib/routes/itch/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/iwara/subscriptions.ts b/lib/routes/iwara/subscriptions.ts index 4482d56b13..4ba1c54b49 100644 --- a/lib/routes/iwara/subscriptions.ts +++ b/lib/routes/iwara/subscriptions.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/ixigua/user-video.ts b/lib/routes/ixigua/user-video.ts index eca1b9dea3..a4cb798823 100644 --- a/lib/routes/ixigua/user-video.ts +++ b/lib/routes/ixigua/user-video.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/japanpost/track.ts b/lib/routes/japanpost/track.ts index 73d4fa8408..ada761a529 100644 --- a/lib/routes/japanpost/track.ts +++ b/lib/routes/japanpost/track.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import { load } from 'cheerio'; diff --git a/lib/routes/javbus/index.ts b/lib/routes/javbus/index.ts index d694fac513..982dcf2380 100644 --- a/lib/routes/javbus/index.ts +++ b/lib/routes/javbus/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/javlibrary/utils.ts b/lib/routes/javlibrary/utils.ts index 4c60278c1d..19d6e03e29 100644 --- a/lib/routes/javlibrary/utils.ts +++ b/lib/routes/javlibrary/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/jd/price.ts b/lib/routes/jd/price.ts index 57aa379b7f..f1c4e36dde 100644 --- a/lib/routes/jd/price.ts +++ b/lib/routes/jd/price.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/jiemian/lists.ts b/lib/routes/jiemian/lists.ts index 8989cfc18e..6ecb9e46ad 100644 --- a/lib/routes/jiemian/lists.ts +++ b/lib/routes/jiemian/lists.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/jin10/index.ts b/lib/routes/jin10/index.ts index 333565ca19..1ffdd59e47 100644 --- a/lib/routes/jin10/index.ts +++ b/lib/routes/jin10/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/jinse/catalogue.ts b/lib/routes/jinse/catalogue.ts index 261fa25e1c..804fe2e695 100644 --- a/lib/routes/jinse/catalogue.ts +++ b/lib/routes/jinse/catalogue.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/jinse/lives.ts b/lib/routes/jinse/lives.ts index dbea50035e..5243d0bb45 100644 --- a/lib/routes/jinse/lives.ts +++ b/lib/routes/jinse/lives.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/jinse/timeline.ts b/lib/routes/jinse/timeline.ts index 18132dea8a..35b3d33237 100644 --- a/lib/routes/jinse/timeline.ts +++ b/lib/routes/jinse/timeline.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/jjwxc/author.ts b/lib/routes/jjwxc/author.ts index 4e4913db0c..47e370a5ee 100644 --- a/lib/routes/jjwxc/author.ts +++ b/lib/routes/jjwxc/author.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; const iconv = require('iconv-lite'); diff --git a/lib/routes/jjwxc/book.ts b/lib/routes/jjwxc/book.ts index 48ef822624..6504db20c5 100644 --- a/lib/routes/jjwxc/book.ts +++ b/lib/routes/jjwxc/book.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/jump/discount.ts b/lib/routes/jump/discount.ts index 1090f1e30d..4513011d24 100644 --- a/lib/routes/jump/discount.ts +++ b/lib/routes/jump/discount.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/kamen-rider-official/news.ts b/lib/routes/kamen-rider-official/news.ts index f006728c99..607c7ca1de 100644 --- a/lib/routes/kamen-rider-official/news.ts +++ b/lib/routes/kamen-rider-official/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/kantarworldpanel/index.ts b/lib/routes/kantarworldpanel/index.ts index 6501a1c027..307e50ac55 100644 --- a/lib/routes/kantarworldpanel/index.ts +++ b/lib/routes/kantarworldpanel/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/kcna/news.ts b/lib/routes/kcna/news.ts index 0461200170..308a17d292 100644 --- a/lib/routes/kcna/news.ts +++ b/lib/routes/kcna/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/keep/user.ts b/lib/routes/keep/user.ts index 7c3adc0d83..8c5c9cbc82 100644 --- a/lib/routes/keep/user.ts +++ b/lib/routes/keep/user.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/kemono/index.ts b/lib/routes/kemono/index.ts index 247e6a13d0..0d5a04e9e4 100644 --- a/lib/routes/kemono/index.ts +++ b/lib/routes/kemono/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/kepu/live.ts b/lib/routes/kepu/live.ts index b6eb87c600..305e60f0dd 100644 --- a/lib/routes/kepu/live.ts +++ b/lib/routes/kepu/live.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/kyodonews/index.ts b/lib/routes/kyodonews/index.ts index c0fa4a6888..370e65c43e 100644 --- a/lib/routes/kyodonews/index.ts +++ b/lib/routes/kyodonews/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/lang/room.ts b/lib/routes/lang/room.ts index e128790a3e..9d2f01ddce 100644 --- a/lib/routes/lang/room.ts +++ b/lib/routes/lang/room.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/lanqiao/utils.ts b/lib/routes/lanqiao/utils.ts index 190541f308..bad47eb688 100644 --- a/lib/routes/lanqiao/utils.ts +++ b/lib/routes/lanqiao/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/learnku/topic.ts b/lib/routes/learnku/topic.ts index 8341eb791e..61d959ef18 100644 --- a/lib/routes/learnku/topic.ts +++ b/lib/routes/learnku/topic.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/leetcode/dailyquestion-cn.ts b/lib/routes/leetcode/dailyquestion-cn.ts index d619b4bedd..5734c96e11 100644 --- a/lib/routes/leetcode/dailyquestion-cn.ts +++ b/lib/routes/leetcode/dailyquestion-cn.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/leetcode/dailyquestion-en.ts b/lib/routes/leetcode/dailyquestion-en.ts index 965ee2eb2b..467d1e3283 100644 --- a/lib/routes/leetcode/dailyquestion-en.ts +++ b/lib/routes/leetcode/dailyquestion-en.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/lfsyd/utils.ts b/lib/routes/lfsyd/utils.ts index 985b396150..442a2eaab8 100644 --- a/lib/routes/lfsyd/utils.ts +++ b/lib/routes/lfsyd/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import md5 from '@/utils/md5'; diff --git a/lib/routes/linkedin/cn/utils.ts b/lib/routes/linkedin/cn/utils.ts index 3d76999dd5..4002deeb5b 100644 --- a/lib/routes/linkedin/cn/utils.ts +++ b/lib/routes/linkedin/cn/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; const crypto = require('crypto'); import * as path from 'node:path'; diff --git a/lib/routes/lkong/forum.ts b/lib/routes/lkong/forum.ts index 02e7b7688f..b43f25ecdb 100644 --- a/lib/routes/lkong/forum.ts +++ b/lib/routes/lkong/forum.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/lkong/thread.ts b/lib/routes/lkong/thread.ts index 2ca15c60eb..cfc0e471cc 100644 --- a/lib/routes/lkong/thread.ts +++ b/lib/routes/lkong/thread.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/logclub/index.ts b/lib/routes/logclub/index.ts index f20ccc7cb8..ce314d47a0 100644 --- a/lib/routes/logclub/index.ts +++ b/lib/routes/logclub/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/logclub/report.ts b/lib/routes/logclub/report.ts index bdb1d3cb3d..71ea99829c 100644 --- a/lib/routes/logclub/report.ts +++ b/lib/routes/logclub/report.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/logonews/index.ts b/lib/routes/logonews/index.ts index 55e1a11474..4fa978d91a 100644 --- a/lib/routes/logonews/index.ts +++ b/lib/routes/logonews/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/loltw/news.ts b/lib/routes/loltw/news.ts index fdf5ef1f6a..607ca7ec8c 100644 --- a/lib/routes/loltw/news.ts +++ b/lib/routes/loltw/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/lovelive-anime/news.ts b/lib/routes/lovelive-anime/news.ts index 94e28b1b2e..01d326d042 100644 --- a/lib/routes/lovelive-anime/news.ts +++ b/lib/routes/lovelive-anime/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/lovelive-anime/schedules.ts b/lib/routes/lovelive-anime/schedules.ts index 9afc63590c..5696c6df3e 100644 --- a/lib/routes/lovelive-anime/schedules.ts +++ b/lib/routes/lovelive-anime/schedules.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import * as path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/lovelive-anime/topics.ts b/lib/routes/lovelive-anime/topics.ts index 156ea668e4..6ec9020716 100644 --- a/lib/routes/lovelive-anime/topics.ts +++ b/lib/routes/lovelive-anime/topics.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/lvv2/news.ts b/lib/routes/lvv2/news.ts index 0f2378cd5a..e25333f033 100644 --- a/lib/routes/lvv2/news.ts +++ b/lib/routes/lvv2/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/lvv2/top.ts b/lib/routes/lvv2/top.ts index 9d32c667bb..291879e424 100644 --- a/lib/routes/lvv2/top.ts +++ b/lib/routes/lvv2/top.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/lxixsxa/discography.ts b/lib/routes/lxixsxa/discography.ts index 84756f1b5f..6745556c38 100644 --- a/lib/routes/lxixsxa/discography.ts +++ b/lib/routes/lxixsxa/discography.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const { parseJSONP } = require('./jsonp-helper'); diff --git a/lib/routes/lxixsxa/information.ts b/lib/routes/lxixsxa/information.ts index 891f6173cb..d815811d66 100644 --- a/lib/routes/lxixsxa/information.ts +++ b/lib/routes/lxixsxa/information.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const { parseJSONP } = require('./jsonp-helper'); diff --git a/lib/routes/m4/index.ts b/lib/routes/m4/index.ts index a8e27f6604..8e48ebcc40 100644 --- a/lib/routes/m4/index.ts +++ b/lib/routes/m4/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/magazinelib/latest-magazine.ts b/lib/routes/magazinelib/latest-magazine.ts index c2dc5d429b..e65796f850 100644 --- a/lib/routes/magazinelib/latest-magazine.ts +++ b/lib/routes/magazinelib/latest-magazine.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/manhuagui/subscribe.ts b/lib/routes/manhuagui/subscribe.ts index a42837b6ab..b86b2f85cc 100644 --- a/lib/routes/manhuagui/subscribe.ts +++ b/lib/routes/manhuagui/subscribe.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseRelativeDate } from '@/utils/parse-date'; import { load } from 'cheerio'; diff --git a/lib/routes/mdpi/journal.ts b/lib/routes/mdpi/journal.ts index 9f8545db18..b0e43ad45f 100644 --- a/lib/routes/mdpi/journal.ts +++ b/lib/routes/mdpi/journal.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import * as path from 'node:path'; diff --git a/lib/routes/metacritic/index.ts b/lib/routes/metacritic/index.ts index 3b36fc6cd2..76b5874c3f 100644 --- a/lib/routes/metacritic/index.ts +++ b/lib/routes/metacritic/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/meteor/utils.ts b/lib/routes/meteor/utils.ts index b9cac9489d..9fbfb07788 100644 --- a/lib/routes/meteor/utils.ts +++ b/lib/routes/meteor/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/mihoyo/bbs/follow-list.ts b/lib/routes/mihoyo/bbs/follow-list.ts index aedc0d93bb..d43f62101c 100644 --- a/lib/routes/mihoyo/bbs/follow-list.ts +++ b/lib/routes/mihoyo/bbs/follow-list.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/mihoyo/bbs/utils.ts b/lib/routes/mihoyo/bbs/utils.ts index 4f299b2e30..ddac77782f 100644 --- a/lib/routes/mihoyo/bbs/utils.ts +++ b/lib/routes/mihoyo/bbs/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import * as path from 'node:path'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/mihoyo/ys/news.ts b/lib/routes/mihoyo/ys/news.ts index 18261e8fd0..59f5cee200 100644 --- a/lib/routes/mihoyo/ys/news.ts +++ b/lib/routes/mihoyo/ys/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/mindmeister/example.ts b/lib/routes/mindmeister/example.ts index b322c66633..adf590b755 100644 --- a/lib/routes/mindmeister/example.ts +++ b/lib/routes/mindmeister/example.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/mingpao/index.ts b/lib/routes/mingpao/index.ts index 74519a69e2..9fb9c39dac 100644 --- a/lib/routes/mingpao/index.ts +++ b/lib/routes/mingpao/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import parser from '@/utils/rss-parser'; diff --git a/lib/routes/missav/new.ts b/lib/routes/missav/new.ts index c2aeb5aac1..00a8c4ebd6 100644 --- a/lib/routes/missav/new.ts +++ b/lib/routes/missav/new.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/misskey/utils.ts b/lib/routes/misskey/utils.ts index 1322eb5097..c33e1ce814 100644 --- a/lib/routes/misskey/utils.ts +++ b/lib/routes/misskey/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; import * as path from 'node:path'; diff --git a/lib/routes/mittrchina/index.ts b/lib/routes/mittrchina/index.ts index 0e004e916a..2b511e2449 100644 --- a/lib/routes/mittrchina/index.ts +++ b/lib/routes/mittrchina/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/modelscope/community.ts b/lib/routes/modelscope/community.ts index fb686729bf..f1ad13fe9b 100644 --- a/lib/routes/modelscope/community.ts +++ b/lib/routes/modelscope/community.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/modelscope/datasets.ts b/lib/routes/modelscope/datasets.ts index 90daaced85..c20cf27925 100644 --- a/lib/routes/modelscope/datasets.ts +++ b/lib/routes/modelscope/datasets.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; const md = require('markdown-it')({ diff --git a/lib/routes/modelscope/studios.ts b/lib/routes/modelscope/studios.ts index baefb8d24f..3f27cbedb9 100644 --- a/lib/routes/modelscope/studios.ts +++ b/lib/routes/modelscope/studios.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; const md = require('markdown-it')({ diff --git a/lib/routes/modrinth/versions.ts b/lib/routes/modrinth/versions.ts index cacf8a160a..87723b98e3 100644 --- a/lib/routes/modrinth/versions.ts +++ b/lib/routes/modrinth/versions.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/mydrivers/index.ts b/lib/routes/mydrivers/index.ts index ab5f35076a..4ab8736f67 100644 --- a/lib/routes/mydrivers/index.ts +++ b/lib/routes/mydrivers/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/myfigurecollection/activity.ts b/lib/routes/myfigurecollection/activity.ts index 7783f11027..5471170f0d 100644 --- a/lib/routes/myfigurecollection/activity.ts +++ b/lib/routes/myfigurecollection/activity.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/myfigurecollection/index.ts b/lib/routes/myfigurecollection/index.ts index 2b3b904501..969ed3ef58 100644 --- a/lib/routes/myfigurecollection/index.ts +++ b/lib/routes/myfigurecollection/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/mymusicsheet/usersheets.ts b/lib/routes/mymusicsheet/usersheets.ts index 5783f69d99..e4582979ef 100644 --- a/lib/routes/mymusicsheet/usersheets.ts +++ b/lib/routes/mymusicsheet/usersheets.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/natgeo/dailyphoto.ts b/lib/routes/natgeo/dailyphoto.ts index f10ec18811..bbc6ab4ff2 100644 --- a/lib/routes/natgeo/dailyphoto.ts +++ b/lib/routes/natgeo/dailyphoto.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/nationalgeographic/latest-stories.ts b/lib/routes/nationalgeographic/latest-stories.ts index 338ab50e4d..3cb4050baa 100644 --- a/lib/routes/nationalgeographic/latest-stories.ts +++ b/lib/routes/nationalgeographic/latest-stories.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/nautil/topics.ts b/lib/routes/nautil/topics.ts index 841a87779e..c7415347b4 100644 --- a/lib/routes/nautil/topics.ts +++ b/lib/routes/nautil/topics.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/nber/index.ts b/lib/routes/nber/index.ts index 836f3feb76..bc740bac54 100644 --- a/lib/routes/nber/index.ts +++ b/lib/routes/nber/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/ncc-cma/cmdp.ts b/lib/routes/ncc-cma/cmdp.ts index 696aadae5c..6470af7a52 100644 --- a/lib/routes/ncc-cma/cmdp.ts +++ b/lib/routes/ncc-cma/cmdp.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/netflav/index.ts b/lib/routes/netflav/index.ts index 32e0a91e1f..b4b96ef5aa 100644 --- a/lib/routes/netflav/index.ts +++ b/lib/routes/netflav/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/news/xhsxw.ts b/lib/routes/news/xhsxw.ts index 5f5d348f03..b308d071b8 100644 --- a/lib/routes/news/xhsxw.ts +++ b/lib/routes/news/xhsxw.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/newzmz/util.ts b/lib/routes/newzmz/util.ts index e150e984cc..2acf3933db 100644 --- a/lib/routes/newzmz/util.ts +++ b/lib/routes/newzmz/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/nhentai/util.ts b/lib/routes/nhentai/util.ts index e746724544..2ead7b983e 100644 --- a/lib/routes/nhentai/util.ts +++ b/lib/routes/nhentai/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/nhk/news-web-easy.ts b/lib/routes/nhk/news-web-easy.ts index f78d208289..c8d28dfcc0 100644 --- a/lib/routes/nhk/news-web-easy.ts +++ b/lib/routes/nhk/news-web-easy.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/nhk/news.ts b/lib/routes/nhk/news.ts index fc65adbdbc..05cecd1526 100644 --- a/lib/routes/nhk/news.ts +++ b/lib/routes/nhk/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/nikkei/news.ts b/lib/routes/nikkei/news.ts index 71fa66c82d..5b601871de 100644 --- a/lib/routes/nikkei/news.ts +++ b/lib/routes/nikkei/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/nintendo/direct.ts b/lib/routes/nintendo/direct.ts index db9855c93b..60cbfee45f 100644 --- a/lib/routes/nintendo/direct.ts +++ b/lib/routes/nintendo/direct.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/nintendo/eshop-hk.ts b/lib/routes/nintendo/eshop-hk.ts index 67d90f4075..e378489fd3 100644 --- a/lib/routes/nintendo/eshop-hk.ts +++ b/lib/routes/nintendo/eshop-hk.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/nintendo/eshop-jp.ts b/lib/routes/nintendo/eshop-jp.ts index 5db143d5df..3826457804 100644 --- a/lib/routes/nintendo/eshop-jp.ts +++ b/lib/routes/nintendo/eshop-jp.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/nintendo/eshop-us.ts b/lib/routes/nintendo/eshop-us.ts index f5c51dc1d2..11c76860de 100644 --- a/lib/routes/nintendo/eshop-us.ts +++ b/lib/routes/nintendo/eshop-us.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import got from '@/utils/got'; import * as path from 'node:path'; diff --git a/lib/routes/nintendo/utils.ts b/lib/routes/nintendo/utils.ts index 8943358c2e..edeed1d91c 100644 --- a/lib/routes/nintendo/utils.ts +++ b/lib/routes/nintendo/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; const { JSDOM } = require('jsdom'); diff --git a/lib/routes/nmtv/column.ts b/lib/routes/nmtv/column.ts index e91c827321..536c1dd773 100644 --- a/lib/routes/nmtv/column.ts +++ b/lib/routes/nmtv/column.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/notefolio/search.ts b/lib/routes/notefolio/search.ts index da4ed4d682..06d7c70902 100644 --- a/lib/routes/notefolio/search.ts +++ b/lib/routes/notefolio/search.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + // 导入所需模组 import got from '@/utils/got'; // 自订的 got import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/npm/package.ts b/lib/routes/npm/package.ts index 56d5a19c69..58ab3ebf12 100644 --- a/lib/routes/npm/package.ts +++ b/lib/routes/npm/package.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/nytimes/daily-briefing-chinese.ts b/lib/routes/nytimes/daily-briefing-chinese.ts index ba943e092e..5fde2cace4 100644 --- a/lib/routes/nytimes/daily-briefing-chinese.ts +++ b/lib/routes/nytimes/daily-briefing-chinese.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/oceanengine/arithmetic-index.ts b/lib/routes/oceanengine/arithmetic-index.ts index e32ba36592..4e05e9c8eb 100644 --- a/lib/routes/oceanengine/arithmetic-index.ts +++ b/lib/routes/oceanengine/arithmetic-index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; const dayjs = require('dayjs'); import { art } from '@/utils/render'; diff --git a/lib/routes/oeeee/app/channel.ts b/lib/routes/oeeee/app/channel.ts index 539e7a897b..dcb8be4e1b 100644 --- a/lib/routes/oeeee/app/channel.ts +++ b/lib/routes/oeeee/app/channel.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/oeeee/app/reporter.ts b/lib/routes/oeeee/app/reporter.ts index 7a7082cd81..c9133cc088 100644 --- a/lib/routes/oeeee/app/reporter.ts +++ b/lib/routes/oeeee/app/reporter.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; const { parseArticle } = require('../utils'); diff --git a/lib/routes/oeeee/web.ts b/lib/routes/oeeee/web.ts index fb4b49c6d0..eae9c95527 100644 --- a/lib/routes/oeeee/web.ts +++ b/lib/routes/oeeee/web.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/oncc/index.ts b/lib/routes/oncc/index.ts index 798e76aa72..7ae69877cf 100644 --- a/lib/routes/oncc/index.ts +++ b/lib/routes/oncc/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/oncc/money18.ts b/lib/routes/oncc/money18.ts index da821a9f71..53afad618b 100644 --- a/lib/routes/oncc/money18.ts +++ b/lib/routes/oncc/money18.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/onet/news.ts b/lib/routes/onet/news.ts index 85bf0f2fe4..2de08a4dd0 100644 --- a/lib/routes/onet/news.ts +++ b/lib/routes/onet/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import parser from '@/utils/rss-parser'; import got from '@/utils/got'; diff --git a/lib/routes/onet/utils.ts b/lib/routes/onet/utils.ts index 4ea7cff4f3..f239b6fb89 100644 --- a/lib/routes/onet/utils.ts +++ b/lib/routes/onet/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/openai/common.ts b/lib/routes/openai/common.ts index 3168b5e4c5..84901f2e01 100644 --- a/lib/routes/openai/common.ts +++ b/lib/routes/openai/common.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/orcid/index.ts b/lib/routes/orcid/index.ts index e50197c17e..68d6002273 100644 --- a/lib/routes/orcid/index.ts +++ b/lib/routes/orcid/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/oreno3d/main.ts b/lib/routes/oreno3d/main.ts index b3edce71d7..512f8bc1ac 100644 --- a/lib/routes/oreno3d/main.ts +++ b/lib/routes/oreno3d/main.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/oshwhub/explore.ts b/lib/routes/oshwhub/explore.ts index 7839cb19df..6ebad71cb6 100644 --- a/lib/routes/oshwhub/explore.ts +++ b/lib/routes/oshwhub/explore.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/otobanana/utils.ts b/lib/routes/otobanana/utils.ts index 7bebad8b3d..2b56a17392 100644 --- a/lib/routes/otobanana/utils.ts +++ b/lib/routes/otobanana/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/oup/index.ts b/lib/routes/oup/index.ts index 82612b16a3..8912525c91 100644 --- a/lib/routes/oup/index.ts +++ b/lib/routes/oup/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/papers/index.ts b/lib/routes/papers/index.ts index 4d3af4840c..04008126f1 100644 --- a/lib/routes/papers/index.ts +++ b/lib/routes/papers/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/patagonia/new-arrivals.ts b/lib/routes/patagonia/new-arrivals.ts index 9b98f58c38..f9160538e6 100644 --- a/lib/routes/patagonia/new-arrivals.ts +++ b/lib/routes/patagonia/new-arrivals.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/penguin-random-house/utils.ts b/lib/routes/penguin-random-house/utils.ts index 41bcdd49e7..738d718d75 100644 --- a/lib/routes/penguin-random-house/utils.ts +++ b/lib/routes/penguin-random-house/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/picnob/user.ts b/lib/routes/picnob/user.ts index 3203d6f439..faefab2286 100644 --- a/lib/routes/picnob/user.ts +++ b/lib/routes/picnob/user.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/picuki/profile.ts b/lib/routes/picuki/profile.ts index 58ad4499e2..8718aec360 100644 --- a/lib/routes/picuki/profile.ts +++ b/lib/routes/picuki/profile.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; const chrono = require('chrono-node'); diff --git a/lib/routes/pikabu/utils.ts b/lib/routes/pikabu/utils.ts index aa2aa78cbb..19e3092c14 100644 --- a/lib/routes/pikabu/utils.ts +++ b/lib/routes/pikabu/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/pixabay/search.ts b/lib/routes/pixabay/search.ts index a16e4b4b40..c102bdd78b 100644 --- a/lib/routes/pixabay/search.ts +++ b/lib/routes/pixabay/search.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/pnas/index.ts b/lib/routes/pnas/index.ts index 5b3c20bd6b..2bc370887c 100644 --- a/lib/routes/pnas/index.ts +++ b/lib/routes/pnas/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/pornhub/utils.ts b/lib/routes/pornhub/utils.ts index de04d99f3f..538a9bee94 100644 --- a/lib/routes/pornhub/utils.ts +++ b/lib/routes/pornhub/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import * as path from 'node:path'; import { parseRelativeDate } from '@/utils/parse-date'; diff --git a/lib/routes/producthunt/today.ts b/lib/routes/producthunt/today.ts index 2a18f8da7d..e869455c5e 100644 --- a/lib/routes/producthunt/today.ts +++ b/lib/routes/producthunt/today.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/ps/monthly-games.ts b/lib/routes/ps/monthly-games.ts index 9dbb1e2e76..7f5beebc54 100644 --- a/lib/routes/ps/monthly-games.ts +++ b/lib/routes/ps/monthly-games.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import * as path from 'node:path'; diff --git a/lib/routes/pts/curations.ts b/lib/routes/pts/curations.ts index 4925cd1e47..773bfbf9e3 100644 --- a/lib/routes/pts/curations.ts +++ b/lib/routes/pts/curations.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/pts/index.ts b/lib/routes/pts/index.ts index 61811ee076..af853cd2c0 100644 --- a/lib/routes/pts/index.ts +++ b/lib/routes/pts/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/pts/live.ts b/lib/routes/pts/live.ts index e39198ec4f..5f85314607 100644 --- a/lib/routes/pts/live.ts +++ b/lib/routes/pts/live.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/pts/projects.ts b/lib/routes/pts/projects.ts index ef98cff4b1..fad0911954 100644 --- a/lib/routes/pts/projects.ts +++ b/lib/routes/pts/projects.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/pubmed/trending.ts b/lib/routes/pubmed/trending.ts index bf5f9462ec..36ccaffd1b 100644 --- a/lib/routes/pubmed/trending.ts +++ b/lib/routes/pubmed/trending.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/qidian/author.ts b/lib/routes/qidian/author.ts index 6c4e1c11ec..8bbba628f8 100644 --- a/lib/routes/qidian/author.ts +++ b/lib/routes/qidian/author.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; diff --git a/lib/routes/qoo-app/apps/comment.ts b/lib/routes/qoo-app/apps/comment.ts index 04ae011e8a..bf408f2b23 100644 --- a/lib/routes/qoo-app/apps/comment.ts +++ b/lib/routes/qoo-app/apps/comment.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/qoo-app/notes/note.ts b/lib/routes/qoo-app/notes/note.ts index db9afbdb35..e2620358ed 100644 --- a/lib/routes/qoo-app/notes/note.ts +++ b/lib/routes/qoo-app/notes/note.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/qoo-app/user/app-comment.ts b/lib/routes/qoo-app/user/app-comment.ts index 9e7610a4c3..557b14d1de 100644 --- a/lib/routes/qoo-app/user/app-comment.ts +++ b/lib/routes/qoo-app/user/app-comment.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/qq/ac/utils.ts b/lib/routes/qq/ac/utils.ts index b9bdf28613..8fede55135 100644 --- a/lib/routes/qq/ac/utils.ts +++ b/lib/routes/qq/ac/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/qq/fact/index.ts b/lib/routes/qq/fact/index.ts index 1b75c7a0d9..5880b45ae8 100644 --- a/lib/routes/qq/fact/index.ts +++ b/lib/routes/qq/fact/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/questmobile/report.ts b/lib/routes/questmobile/report.ts index c7500b2384..8c29b62146 100644 --- a/lib/routes/questmobile/report.ts +++ b/lib/routes/questmobile/report.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/qweather/3days.ts b/lib/routes/qweather/3days.ts index e7b651f8b1..5e36c0a270 100644 --- a/lib/routes/qweather/3days.ts +++ b/lib/routes/qweather/3days.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/qweather/now.ts b/lib/routes/qweather/now.ts index f1a8618820..9960c2e4a2 100644 --- a/lib/routes/qweather/now.ts +++ b/lib/routes/qweather/now.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/radio/album.ts b/lib/routes/radio/album.ts index 9a431a4942..4047bf9a6d 100644 --- a/lib/routes/radio/album.ts +++ b/lib/routes/radio/album.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/radio/index.ts b/lib/routes/radio/index.ts index 47f93a5219..1928ce2d79 100644 --- a/lib/routes/radio/index.ts +++ b/lib/routes/radio/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/radio/zhibo.ts b/lib/routes/radio/zhibo.ts index 378f0b29d6..a5b844688d 100644 --- a/lib/routes/radio/zhibo.ts +++ b/lib/routes/radio/zhibo.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/rawkuma/manga.ts b/lib/routes/rawkuma/manga.ts index aaa0932db8..f85b774d9c 100644 --- a/lib/routes/rawkuma/manga.ts +++ b/lib/routes/rawkuma/manga.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/readhub/index.ts b/lib/routes/readhub/index.ts index 2c576762b9..c188ed47f1 100644 --- a/lib/routes/readhub/index.ts +++ b/lib/routes/readhub/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/readhub/util.ts b/lib/routes/readhub/util.ts index 603996a381..dec16c0741 100644 --- a/lib/routes/readhub/util.ts +++ b/lib/routes/readhub/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/reuters/common.ts b/lib/routes/reuters/common.ts index dc9584c999..e68f838de9 100644 --- a/lib/routes/reuters/common.ts +++ b/lib/routes/reuters/common.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/routledge/book-series.ts b/lib/routes/routledge/book-series.ts index e09bfd9724..2a8915a4cb 100644 --- a/lib/routes/routledge/book-series.ts +++ b/lib/routes/routledge/book-series.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/rsc/journal.ts b/lib/routes/rsc/journal.ts index b348f8bbd3..b15305a8db 100644 --- a/lib/routes/rsc/journal.ts +++ b/lib/routes/rsc/journal.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/saraba1st/digest.ts b/lib/routes/saraba1st/digest.ts index f28b9987e0..fb2e37309b 100644 --- a/lib/routes/saraba1st/digest.ts +++ b/lib/routes/saraba1st/digest.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/science/cover.ts b/lib/routes/science/cover.ts index e75cb9d424..43be61b0e0 100644 --- a/lib/routes/science/cover.ts +++ b/lib/routes/science/cover.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + // journals form AAAS publishing group // // science: Science diff --git a/lib/routes/science/utils.ts b/lib/routes/science/utils.ts index c666279781..c842b5ea3e 100644 --- a/lib/routes/science/utils.ts +++ b/lib/routes/science/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { load } from 'cheerio'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/sctv/programme.ts b/lib/routes/sctv/programme.ts index be2e8106c1..73ada50fba 100644 --- a/lib/routes/sctv/programme.ts +++ b/lib/routes/sctv/programme.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/sensortower/blog.ts b/lib/routes/sensortower/blog.ts index e06b00214d..6c2a52c1e1 100644 --- a/lib/routes/sensortower/blog.ts +++ b/lib/routes/sensortower/blog.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/shcstheatre/programs.ts b/lib/routes/shcstheatre/programs.ts index 579584c914..86df2debec 100644 --- a/lib/routes/shcstheatre/programs.ts +++ b/lib/routes/shcstheatre/programs.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/shiep/index.ts b/lib/routes/shiep/index.ts index 7e7a2806cb..b679d315a7 100644 --- a/lib/routes/shiep/index.ts +++ b/lib/routes/shiep/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/shmtu/portal.ts b/lib/routes/shmtu/portal.ts index 2a79098a3f..b52084a68e 100644 --- a/lib/routes/shmtu/portal.ts +++ b/lib/routes/shmtu/portal.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/shoac/recent-show.ts b/lib/routes/shoac/recent-show.ts index 9604e87580..18f8009aca 100644 --- a/lib/routes/shoac/recent-show.ts +++ b/lib/routes/shoac/recent-show.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import * as path from 'node:path'; diff --git a/lib/routes/shuiguopai/index.ts b/lib/routes/shuiguopai/index.ts index ff379c7ba6..7ee7280912 100644 --- a/lib/routes/shuiguopai/index.ts +++ b/lib/routes/shuiguopai/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/simpleinfo/index.ts b/lib/routes/simpleinfo/index.ts index b5244ff136..f56fdc7722 100644 --- a/lib/routes/simpleinfo/index.ts +++ b/lib/routes/simpleinfo/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/sina/utils.ts b/lib/routes/sina/utils.ts index 38cf0a03a9..d35fa1a726 100644 --- a/lib/routes/sina/utils.ts +++ b/lib/routes/sina/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/sinchew/index.ts b/lib/routes/sinchew/index.ts index 9ded660218..50f5f51228 100644 --- a/lib/routes/sinchew/index.ts +++ b/lib/routes/sinchew/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/sjtu/tongqu/activity.ts b/lib/routes/sjtu/tongqu/activity.ts index 3f0cdcb62f..260c190c45 100644 --- a/lib/routes/sjtu/tongqu/activity.ts +++ b/lib/routes/sjtu/tongqu/activity.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/snowpeak/us-new-arrivals.ts b/lib/routes/snowpeak/us-new-arrivals.ts index d1e071a767..786259e7c2 100644 --- a/lib/routes/snowpeak/us-new-arrivals.ts +++ b/lib/routes/snowpeak/us-new-arrivals.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/sogou/search.ts b/lib/routes/sogou/search.ts index 1ed9bd8815..eb4a4f45ee 100644 --- a/lib/routes/sogou/search.ts +++ b/lib/routes/sogou/search.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/sohu/mp.ts b/lib/routes/sohu/mp.ts index 66cf435d5c..5bcbf7ba42 100644 --- a/lib/routes/sohu/mp.ts +++ b/lib/routes/sohu/mp.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/southcn/nfapp/column.ts b/lib/routes/southcn/nfapp/column.ts index 2264f22db4..f749f174a8 100644 --- a/lib/routes/southcn/nfapp/column.ts +++ b/lib/routes/southcn/nfapp/column.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/southcn/nfapp/reporter.ts b/lib/routes/southcn/nfapp/reporter.ts index 22c4dc28e4..a25c60764c 100644 --- a/lib/routes/southcn/nfapp/reporter.ts +++ b/lib/routes/southcn/nfapp/reporter.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/springer/journal.ts b/lib/routes/springer/journal.ts index 15670d564a..c9d27243be 100644 --- a/lib/routes/springer/journal.ts +++ b/lib/routes/springer/journal.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/sse/inquire.ts b/lib/routes/sse/inquire.ts index 2fa286d3be..f540f9583f 100644 --- a/lib/routes/sse/inquire.ts +++ b/lib/routes/sse/inquire.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/sse/renewal.ts b/lib/routes/sse/renewal.ts index 3e44256ca0..78e7d36231 100644 --- a/lib/routes/sse/renewal.ts +++ b/lib/routes/sse/renewal.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/ssm/news.ts b/lib/routes/ssm/news.ts index ad04af412d..ca4907ec0c 100644 --- a/lib/routes/ssm/news.ts +++ b/lib/routes/ssm/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/stdaily/digitalpaper.ts b/lib/routes/stdaily/digitalpaper.ts index 035377b39d..b2404f9c9d 100644 --- a/lib/routes/stdaily/digitalpaper.ts +++ b/lib/routes/stdaily/digitalpaper.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import * as path from 'node:path'; import { art } from '@/utils/render'; diff --git a/lib/routes/storyfm/episodes.ts b/lib/routes/storyfm/episodes.ts index 1e312926f9..f363eb5096 100644 --- a/lib/routes/storyfm/episodes.ts +++ b/lib/routes/storyfm/episodes.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/surfshark/blog.ts b/lib/routes/surfshark/blog.ts index 6d4ff148e3..3012af7391 100644 --- a/lib/routes/surfshark/blog.ts +++ b/lib/routes/surfshark/blog.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/swjtu/utils.ts b/lib/routes/swjtu/utils.ts index 730adee9c9..4baa9537a0 100644 --- a/lib/routes/swjtu/utils.ts +++ b/lib/routes/swjtu/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/szse/inquire.ts b/lib/routes/szse/inquire.ts index ca5378e468..1d73a63d27 100644 --- a/lib/routes/szse/inquire.ts +++ b/lib/routes/szse/inquire.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/szse/projectdynamic.ts b/lib/routes/szse/projectdynamic.ts index a4795818dd..c1e5fe622e 100644 --- a/lib/routes/szse/projectdynamic.ts +++ b/lib/routes/szse/projectdynamic.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/taobao/zhongchou.ts b/lib/routes/taobao/zhongchou.ts index 718e1056d3..8f4e6e1038 100644 --- a/lib/routes/taobao/zhongchou.ts +++ b/lib/routes/taobao/zhongchou.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/taptap/utils.ts b/lib/routes/taptap/utils.ts index b92db5f19e..1e4d37d75b 100644 --- a/lib/routes/taptap/utils.ts +++ b/lib/routes/taptap/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import * as path from 'node:path'; diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index da6da85e40..919c67c80b 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { config } from '@/config'; import got from '@/utils/got'; diff --git a/lib/routes/tencent/news/author.ts b/lib/routes/tencent/news/author.ts index eeceae43d2..02f137a262 100644 --- a/lib/routes/tencent/news/author.ts +++ b/lib/routes/tencent/news/author.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/tencent/news/coronavirus/data.ts b/lib/routes/tencent/news/coronavirus/data.ts index 10a87b0127..4f122448ec 100644 --- a/lib/routes/tencent/news/coronavirus/data.ts +++ b/lib/routes/tencent/news/coronavirus/data.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + const { getData } = require('./utils'); import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/tencent/news/coronavirus/total.ts b/lib/routes/tencent/news/coronavirus/total.ts index d8b28f63d2..0af26d9caa 100644 --- a/lib/routes/tencent/news/coronavirus/total.ts +++ b/lib/routes/tencent/news/coronavirus/total.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + const { getData } = require('./utils'); import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/tesla/cx.ts b/lib/routes/tesla/cx.ts index 65ca288bfc..1267fda5f5 100644 --- a/lib/routes/tesla/cx.ts +++ b/lib/routes/tesla/cx.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/tfc-taiwan/utils.ts b/lib/routes/tfc-taiwan/utils.ts index c25fd493d5..9a24cdc6b9 100644 --- a/lib/routes/tfc-taiwan/utils.ts +++ b/lib/routes/tfc-taiwan/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import * as path from 'node:path'; diff --git a/lib/routes/theatlantic/utils.ts b/lib/routes/theatlantic/utils.ts index 4b1b7ccd12..c859253e93 100644 --- a/lib/routes/theatlantic/utils.ts +++ b/lib/routes/theatlantic/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; diff --git a/lib/routes/themoviedb/utils.ts b/lib/routes/themoviedb/utils.ts index 42fd4d38d7..2bf3caebfe 100644 --- a/lib/routes/themoviedb/utils.ts +++ b/lib/routes/themoviedb/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import * as path from 'node:path'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/thenewslens/index.ts b/lib/routes/thenewslens/index.ts index 8245a6677c..df61ffb07d 100644 --- a/lib/routes/thenewslens/index.ts +++ b/lib/routes/thenewslens/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import cache from '@/utils/cache'; import got from '@/utils/got'; diff --git a/lib/routes/thepaper/factpaper.ts b/lib/routes/thepaper/factpaper.ts index 5108dc532f..220387a68c 100644 --- a/lib/routes/thepaper/factpaper.ts +++ b/lib/routes/thepaper/factpaper.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/thepaper/utils.ts b/lib/routes/thepaper/utils.ts index a3565018ad..20b9ca79a2 100644 --- a/lib/routes/thepaper/utils.ts +++ b/lib/routes/thepaper/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/thoughtco/index.ts b/lib/routes/thoughtco/index.ts index e8e99d4498..923e5cf7b3 100644 --- a/lib/routes/thoughtco/index.ts +++ b/lib/routes/thoughtco/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/tiktok/user.ts b/lib/routes/tiktok/user.ts index d3ba312511..eda17eb115 100644 --- a/lib/routes/tiktok/user.ts +++ b/lib/routes/tiktok/user.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/tingshuitz/shenzhen.ts b/lib/routes/tingshuitz/shenzhen.ts index 2d0b52126f..a2298dfbb9 100644 --- a/lib/routes/tingshuitz/shenzhen.ts +++ b/lib/routes/tingshuitz/shenzhen.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/tingtingfm/program.ts b/lib/routes/tingtingfm/program.ts index 1ca92a9470..c17130d865 100644 --- a/lib/routes/tingtingfm/program.ts +++ b/lib/routes/tingtingfm/program.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/tophub/list.ts b/lib/routes/tophub/list.ts index e46aaa8fa2..4c4dce716a 100644 --- a/lib/routes/tophub/list.ts +++ b/lib/routes/tophub/list.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { config } from '@/config'; diff --git a/lib/routes/tradingview/blog.ts b/lib/routes/tradingview/blog.ts index 8f4d52cdf1..36bfba7aa7 100644 --- a/lib/routes/tradingview/blog.ts +++ b/lib/routes/tradingview/blog.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/transcriptforest/index.ts b/lib/routes/transcriptforest/index.ts index 46a9b20fd7..76f583a84c 100644 --- a/lib/routes/transcriptforest/index.ts +++ b/lib/routes/transcriptforest/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/trending/all-trending.ts b/lib/routes/trending/all-trending.ts index e3509eed2c..4c444bc451 100644 --- a/lib/routes/trending/all-trending.ts +++ b/lib/routes/trending/all-trending.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; const dayjs = require('dayjs'); dayjs.extend(require('dayjs/plugin/utc')); diff --git a/lib/routes/tribalfootball/latest.ts b/lib/routes/tribalfootball/latest.ts index 22456d5c64..9dc456bda9 100644 --- a/lib/routes/tribalfootball/latest.ts +++ b/lib/routes/tribalfootball/latest.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { art } from '@/utils/render'; diff --git a/lib/routes/tvb/news.ts b/lib/routes/tvb/news.ts index db60835bfb..2b52e3a2f1 100644 --- a/lib/routes/tvb/news.ts +++ b/lib/routes/tvb/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/tvtropes/featured.ts b/lib/routes/tvtropes/featured.ts index 60589a96a8..84b60a2703 100644 --- a/lib/routes/tvtropes/featured.ts +++ b/lib/routes/tvtropes/featured.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/txrjy/fornumtopic.ts b/lib/routes/txrjy/fornumtopic.ts index d7b36f36ca..3098ca9aa2 100644 --- a/lib/routes/txrjy/fornumtopic.ts +++ b/lib/routes/txrjy/fornumtopic.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/udn/breaking-news.ts b/lib/routes/udn/breaking-news.ts index e01bcbe656..ebe1c44a79 100644 --- a/lib/routes/udn/breaking-news.ts +++ b/lib/routes/udn/breaking-news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/uptimerobot/rss.ts b/lib/routes/uptimerobot/rss.ts index f029b8773e..68217f0ba1 100644 --- a/lib/routes/uptimerobot/rss.ts +++ b/lib/routes/uptimerobot/rss.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + const Parser = require('rss-parser'); import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/urbandictionary/random.ts b/lib/routes/urbandictionary/random.ts index 222de4f190..fd4cebb3ab 100644 --- a/lib/routes/urbandictionary/random.ts +++ b/lib/routes/urbandictionary/random.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/utgd/category.ts b/lib/routes/utgd/category.ts index 3f7a078fd1..ddcb773813 100644 --- a/lib/routes/utgd/category.ts +++ b/lib/routes/utgd/category.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/utgd/timeline.ts b/lib/routes/utgd/timeline.ts index d155132248..9bbd1ecae5 100644 --- a/lib/routes/utgd/timeline.ts +++ b/lib/routes/utgd/timeline.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/utgd/topic.ts b/lib/routes/utgd/topic.ts index dd0618ea7f..b6f89f6088 100644 --- a/lib/routes/utgd/topic.ts +++ b/lib/routes/utgd/topic.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/vcb-s/category.ts b/lib/routes/vcb-s/category.ts index bad8c87583..bc1ab7ace0 100644 --- a/lib/routes/vcb-s/category.ts +++ b/lib/routes/vcb-s/category.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/vcb-s/index.ts b/lib/routes/vcb-s/index.ts index 41ca5cc79f..7c0342deb8 100644 --- a/lib/routes/vcb-s/index.ts +++ b/lib/routes/vcb-s/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/vimeo/category.ts b/lib/routes/vimeo/category.ts index 0caa529b34..18ec6d94ea 100644 --- a/lib/routes/vimeo/category.ts +++ b/lib/routes/vimeo/category.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/vimeo/channel.ts b/lib/routes/vimeo/channel.ts index 9fd4a5445f..9f1679f8ed 100644 --- a/lib/routes/vimeo/channel.ts +++ b/lib/routes/vimeo/channel.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/vimeo/usr-videos.ts b/lib/routes/vimeo/usr-videos.ts index 40112c658b..6ee7bf1f08 100644 --- a/lib/routes/vimeo/usr-videos.ts +++ b/lib/routes/vimeo/usr-videos.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/wallpaperhub/index.ts b/lib/routes/wallpaperhub/index.ts index 316fe7f566..1925a59c8c 100644 --- a/lib/routes/wallpaperhub/index.ts +++ b/lib/routes/wallpaperhub/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/wallstreetcn/live.ts b/lib/routes/wallstreetcn/live.ts index 07b1f7ee9a..41156fcab1 100644 --- a/lib/routes/wallstreetcn/live.ts +++ b/lib/routes/wallstreetcn/live.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/warthunder/news.ts b/lib/routes/warthunder/news.ts index 86bdbb4337..448882c77d 100644 --- a/lib/routes/warthunder/news.ts +++ b/lib/routes/warthunder/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import * as path from 'node:path'; diff --git a/lib/routes/weibo/search/hot.ts b/lib/routes/weibo/search/hot.ts index e2527689c3..4dabc10432 100644 --- a/lib/routes/weibo/search/hot.ts +++ b/lib/routes/weibo/search/hot.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/whu/news.ts b/lib/routes/whu/news.ts index e787fd935e..2c3d9578cb 100644 --- a/lib/routes/whu/news.ts +++ b/lib/routes/whu/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/whu/util.ts b/lib/routes/whu/util.ts index 244a9cf48d..5dc4b152c2 100644 --- a/lib/routes/whu/util.ts +++ b/lib/routes/whu/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/winstall/update.ts b/lib/routes/winstall/update.ts index b068972416..926b073b64 100644 --- a/lib/routes/winstall/update.ts +++ b/lib/routes/winstall/update.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/wise/pair.ts b/lib/routes/wise/pair.ts index f8aae137fe..cca605b9e5 100644 --- a/lib/routes/wise/pair.ts +++ b/lib/routes/wise/pair.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/wmc-bj/publish.ts b/lib/routes/wmc-bj/publish.ts index ce11a49f7c..602af08457 100644 --- a/lib/routes/wmc-bj/publish.ts +++ b/lib/routes/wmc-bj/publish.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/wnacg/index.ts b/lib/routes/wnacg/index.ts index 38a93d4537..42131a2ee1 100644 --- a/lib/routes/wnacg/index.ts +++ b/lib/routes/wnacg/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/wsj/utils.ts b/lib/routes/wsj/utils.ts index 458994c0fa..bc52a613ab 100644 --- a/lib/routes/wsj/utils.ts +++ b/lib/routes/wsj/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; const asyncPool = require('tiny-async-pool'); import { load } from 'cheerio'; diff --git a/lib/routes/x-mol/news.ts b/lib/routes/x-mol/news.ts index bd1a0f5add..809ae3f7c5 100644 --- a/lib/routes/x-mol/news.ts +++ b/lib/routes/x-mol/news.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/xiaomiyoupin/crowdfunding.ts b/lib/routes/xiaomiyoupin/crowdfunding.ts index 088c4ccd6a..a7ed8d007c 100644 --- a/lib/routes/xiaomiyoupin/crowdfunding.ts +++ b/lib/routes/xiaomiyoupin/crowdfunding.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/xiaomiyoupin/utils.ts b/lib/routes/xiaomiyoupin/utils.ts index f82f17e77d..8c6efe645e 100644 --- a/lib/routes/xiaomiyoupin/utils.ts +++ b/lib/routes/xiaomiyoupin/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/xinpianchang/util.ts b/lib/routes/xinpianchang/util.ts index b52a680c48..ea1511dfb0 100644 --- a/lib/routes/xinpianchang/util.ts +++ b/lib/routes/xinpianchang/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/xjtu/job.ts b/lib/routes/xjtu/job.ts index d86ccc5165..37e4ae985e 100644 --- a/lib/routes/xjtu/job.ts +++ b/lib/routes/xjtu/job.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/xjtu/std.ts b/lib/routes/xjtu/std.ts index 2c6da383f8..d574a2556c 100644 --- a/lib/routes/xjtu/std.ts +++ b/lib/routes/xjtu/std.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/xkb/index.ts b/lib/routes/xkb/index.ts index 6a92a2291c..9a4cfe0570 100644 --- a/lib/routes/xkb/index.ts +++ b/lib/routes/xkb/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/xueqiu/stock-comments.ts b/lib/routes/xueqiu/stock-comments.ts index bba490e1d2..84164a4e09 100644 --- a/lib/routes/xueqiu/stock-comments.ts +++ b/lib/routes/xueqiu/stock-comments.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/xys/new.ts b/lib/routes/xys/new.ts index d7e66b954d..4a3a091a26 100644 --- a/lib/routes/xys/new.ts +++ b/lib/routes/xys/new.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/xyzrank/index.ts b/lib/routes/xyzrank/index.ts index b9754fd431..98a53ae06e 100644 --- a/lib/routes/xyzrank/index.ts +++ b/lib/routes/xyzrank/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/yahoo/news/tw/utils.ts b/lib/routes/yahoo/news/tw/utils.ts index a932472ad3..a8cba73a9b 100644 --- a/lib/routes/yahoo/news/tw/utils.ts +++ b/lib/routes/yahoo/news/tw/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/ycwb/index.ts b/lib/routes/ycwb/index.ts index 08f9d1aa15..66127f292e 100644 --- a/lib/routes/ycwb/index.ts +++ b/lib/routes/ycwb/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/yicai/dt.ts b/lib/routes/yicai/dt.ts index 9893f9f333..17287165aa 100644 --- a/lib/routes/yicai/dt.ts +++ b/lib/routes/yicai/dt.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/yicai/utils.ts b/lib/routes/yicai/utils.ts index 577a62a922..b6112dce69 100644 --- a/lib/routes/yicai/utils.ts +++ b/lib/routes/yicai/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; diff --git a/lib/routes/ymgal/game.ts b/lib/routes/ymgal/game.ts index 6abc4c8146..4a8d767d80 100644 --- a/lib/routes/ymgal/game.ts +++ b/lib/routes/ymgal/game.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/yoasobi-music/info.ts b/lib/routes/yoasobi-music/info.ts index 21ba1443ea..02d8d65583 100644 --- a/lib/routes/yoasobi-music/info.ts +++ b/lib/routes/yoasobi-music/info.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const { parseJSONP } = require('./jsonp-helper'); diff --git a/lib/routes/yoasobi-music/live.ts b/lib/routes/yoasobi-music/live.ts index 12a926b14d..a1808c5a28 100644 --- a/lib/routes/yoasobi-music/live.ts +++ b/lib/routes/yoasobi-music/live.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; const { parseJSONP } = require('./jsonp-helper'); import { art } from '@/utils/render'; diff --git a/lib/routes/yoasobi-music/media.ts b/lib/routes/yoasobi-music/media.ts index caf665bf70..9305454276 100644 --- a/lib/routes/yoasobi-music/media.ts +++ b/lib/routes/yoasobi-music/media.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; const { parseJSONP } = require('./jsonp-helper'); import { art } from '@/utils/render'; diff --git a/lib/routes/youku/channel.ts b/lib/routes/youku/channel.ts index 2c6e6c86bf..f5cd91d7ec 100644 --- a/lib/routes/youku/channel.ts +++ b/lib/routes/youku/channel.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/youtube/community.ts b/lib/routes/youtube/community.ts index 55c3ac61a5..fc538f6eab 100644 --- a/lib/routes/youtube/community.ts +++ b/lib/routes/youtube/community.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { parseRelativeDate } from '@/utils/parse-date'; diff --git a/lib/routes/youtube/utils.ts b/lib/routes/youtube/utils.ts index 5b8c594185..755603b2f8 100644 --- a/lib/routes/youtube/utils.ts +++ b/lib/routes/youtube/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + const { google } = require('googleapis'); const { OAuth2 } = google.auth; import { art } from '@/utils/render'; diff --git a/lib/routes/yxdzqb/index.ts b/lib/routes/yxdzqb/index.ts index 6c8791d426..d8d96c2a40 100644 --- a/lib/routes/yxdzqb/index.ts +++ b/lib/routes/yxdzqb/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; diff --git a/lib/routes/zagg/new-arrivals.ts b/lib/routes/zagg/new-arrivals.ts index d4c5b52f99..5151370d87 100644 --- a/lib/routes/zagg/new-arrivals.ts +++ b/lib/routes/zagg/new-arrivals.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/zaobao/util.ts b/lib/routes/zaobao/util.ts index 2e75b321a9..91f7aa7e26 100644 --- a/lib/routes/zaobao/util.ts +++ b/lib/routes/zaobao/util.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/zcool/discover.ts b/lib/routes/zcool/discover.ts index c877e348fa..30eebdf6cb 100644 --- a/lib/routes/zcool/discover.ts +++ b/lib/routes/zcool/discover.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/zcool/utils.ts b/lib/routes/zcool/utils.ts index d88cd28d6f..467c489b5a 100644 --- a/lib/routes/zcool/utils.ts +++ b/lib/routes/zcool/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import * as path from 'node:path'; diff --git a/lib/routes/zhangyoubao/index.ts b/lib/routes/zhangyoubao/index.ts index 08463cab4f..a8a0ba3d3b 100644 --- a/lib/routes/zhangyoubao/index.ts +++ b/lib/routes/zhangyoubao/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; diff --git a/lib/routes/zhitongcaijing/index.ts b/lib/routes/zhitongcaijing/index.ts index 96f9a7e6d8..b9cba8a7f7 100644 --- a/lib/routes/zhitongcaijing/index.ts +++ b/lib/routes/zhitongcaijing/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/zhiy/post.ts b/lib/routes/zhiy/post.ts index 7ee2fbaa6b..e9f40ebd3a 100644 --- a/lib/routes/zhiy/post.ts +++ b/lib/routes/zhiy/post.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; diff --git a/lib/routes/zhubai/top20.ts b/lib/routes/zhubai/top20.ts index 9985ea5138..699ae1a057 100644 --- a/lib/routes/zhubai/top20.ts +++ b/lib/routes/zhubai/top20.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; diff --git a/lib/routes/zodgame/forum.ts b/lib/routes/zodgame/forum.ts index ac521d7355..55ef6a4718 100644 --- a/lib/routes/zodgame/forum.ts +++ b/lib/routes/zodgame/forum.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import cache from '@/utils/cache'; import got from '@/utils/got'; import { config } from '@/config'; diff --git a/lib/routes/zuvio/utils.ts b/lib/routes/zuvio/utils.ts index 740a783afd..83173db30d 100644 --- a/lib/routes/zuvio/utils.ts +++ b/lib/routes/zuvio/utils.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { art } from '@/utils/render'; import * as path from 'node:path'; import got from '@/utils/got'; diff --git a/lib/routes/zyshow/index.ts b/lib/routes/zyshow/index.ts index f6bddd87b2..5472a61572 100644 --- a/lib/routes/zyshow/index.ts +++ b/lib/routes/zyshow/index.ts @@ -1,4 +1,7 @@ // @ts-nocheck +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { load } from 'cheerio';