@ttkit/daily-hot-api 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +77 -0
- package/LICENSE +21 -0
- package/README.md +315 -2
- package/bin/daily-hot-api.js +25 -0
- package/dist/app.controller.d.ts +41 -0
- package/dist/app.controller.js +91 -0
- package/dist/app.controller.js.map +1 -0
- package/dist/app.module.d.ts +4 -0
- package/dist/app.module.js +44 -0
- package/dist/app.module.js.map +1 -0
- package/dist/app.service.d.ts +19 -0
- package/dist/app.service.js +57 -0
- package/dist/app.service.js.map +1 -0
- package/dist/cache/cache.module.d.ts +2 -0
- package/dist/cache/cache.module.js +52 -0
- package/dist/cache/cache.module.js.map +1 -0
- package/dist/cache/cache.service.d.ts +26 -0
- package/dist/cache/cache.service.js +163 -0
- package/dist/cache/cache.service.js.map +1 -0
- package/dist/cli/args.d.ts +24 -0
- package/dist/cli/args.js +261 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/commands/logs.d.ts +3 -0
- package/dist/cli/commands/logs.js +55 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/commands/restart.d.ts +3 -0
- package/dist/cli/commands/restart.js +62 -0
- package/dist/cli/commands/restart.js.map +1 -0
- package/dist/cli/commands/start.d.ts +3 -0
- package/dist/cli/commands/start.js +280 -0
- package/dist/cli/commands/start.js.map +1 -0
- package/dist/cli/commands/status.d.ts +3 -0
- package/dist/cli/commands/status.js +78 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/stop.d.ts +12 -0
- package/dist/cli/commands/stop.js +135 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/context.d.ts +4 -0
- package/dist/cli/context.js +3 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/env.d.ts +2 -0
- package/dist/cli/env.js +80 -0
- package/dist/cli/env.js.map +1 -0
- package/dist/cli/errors.d.ts +14 -0
- package/dist/cli/errors.js +25 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/health.d.ts +2 -0
- package/dist/cli/health.js +44 -0
- package/dist/cli/health.js.map +1 -0
- package/dist/cli/help.d.ts +3 -0
- package/dist/cli/help.js +158 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +94 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/log-file.d.ts +8 -0
- package/dist/cli/log-file.js +58 -0
- package/dist/cli/log-file.js.map +1 -0
- package/dist/cli/output.d.ts +7 -0
- package/dist/cli/output.js +46 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/paths.d.ts +33 -0
- package/dist/cli/paths.js +76 -0
- package/dist/cli/paths.js.map +1 -0
- package/dist/cli/run-state.d.ts +25 -0
- package/dist/cli/run-state.js +159 -0
- package/dist/cli/run-state.js.map +1 -0
- package/dist/common/middlewares/logger.middleware.d.ts +7 -0
- package/dist/common/middlewares/logger.middleware.js +29 -0
- package/dist/common/middlewares/logger.middleware.js.map +1 -0
- package/dist/config/config.module.d.ts +2 -0
- package/dist/config/config.module.js +47 -0
- package/dist/config/config.module.js.map +1 -0
- package/dist/config/configuration.d.ts +3 -0
- package/dist/config/configuration.js +5 -0
- package/dist/config/configuration.js.map +1 -0
- package/dist/config/validation.schema.d.ts +114 -0
- package/dist/config/validation.schema.js +69 -0
- package/dist/config/validation.schema.js.map +1 -0
- package/dist/daily-brief/clients/ai-analysis.client.d.ts +20 -0
- package/dist/daily-brief/clients/ai-analysis.client.js +217 -0
- package/dist/daily-brief/clients/ai-analysis.client.js.map +1 -0
- package/dist/daily-brief/clients/brief-search.service.d.ts +11 -0
- package/dist/daily-brief/clients/brief-search.service.js +52 -0
- package/dist/daily-brief/clients/brief-search.service.js.map +1 -0
- package/dist/daily-brief/clients/deepseek-search.client.d.ts +11 -0
- package/dist/daily-brief/clients/deepseek-search.client.js +70 -0
- package/dist/daily-brief/clients/deepseek-search.client.js.map +1 -0
- package/dist/daily-brief/clients/tavily-search.client.d.ts +11 -0
- package/dist/daily-brief/clients/tavily-search.client.js +72 -0
- package/dist/daily-brief/clients/tavily-search.client.js.map +1 -0
- package/dist/daily-brief/daily-brief.config.d.ts +31 -0
- package/dist/daily-brief/daily-brief.config.js +108 -0
- package/dist/daily-brief/daily-brief.config.js.map +1 -0
- package/dist/daily-brief/daily-brief.controller.d.ts +72 -0
- package/dist/daily-brief/daily-brief.controller.js +169 -0
- package/dist/daily-brief/daily-brief.controller.js.map +1 -0
- package/dist/daily-brief/daily-brief.module.d.ts +2 -0
- package/dist/daily-brief/daily-brief.module.js +49 -0
- package/dist/daily-brief/daily-brief.module.js.map +1 -0
- package/dist/daily-brief/daily-brief.scheduler.d.ts +30 -0
- package/dist/daily-brief/daily-brief.scheduler.js +113 -0
- package/dist/daily-brief/daily-brief.scheduler.js.map +1 -0
- package/dist/daily-brief/daily-brief.service.d.ts +101 -0
- package/dist/daily-brief/daily-brief.service.js +412 -0
- package/dist/daily-brief/daily-brief.service.js.map +1 -0
- package/dist/daily-brief/dto/brief-date-param.dto.d.ts +3 -0
- package/dist/daily-brief/dto/brief-date-param.dto.js +23 -0
- package/dist/daily-brief/dto/brief-date-param.dto.js.map +1 -0
- package/dist/daily-brief/dto/generate-brief.dto.d.ts +6 -0
- package/dist/daily-brief/dto/generate-brief.dto.js +39 -0
- package/dist/daily-brief/dto/generate-brief.dto.js.map +1 -0
- package/dist/daily-brief/dto/list-briefs-query.dto.d.ts +6 -0
- package/dist/daily-brief/dto/list-briefs-query.dto.js +42 -0
- package/dist/daily-brief/dto/list-briefs-query.dto.js.map +1 -0
- package/dist/daily-brief/dto/stock-ranking-query.dto.d.ts +6 -0
- package/dist/daily-brief/dto/stock-ranking-query.dto.js +46 -0
- package/dist/daily-brief/dto/stock-ranking-query.dto.js.map +1 -0
- package/dist/daily-brief/interfaces/daily-brief.interface.d.ts +59 -0
- package/dist/daily-brief/interfaces/daily-brief.interface.js +3 -0
- package/dist/daily-brief/interfaces/daily-brief.interface.js.map +1 -0
- package/dist/daily-brief/interfaces/search-provider.interface.d.ts +11 -0
- package/dist/daily-brief/interfaces/search-provider.interface.js +3 -0
- package/dist/daily-brief/interfaces/search-provider.interface.js.map +1 -0
- package/dist/daily-brief/utils/brief-date.d.ts +2 -0
- package/dist/daily-brief/utils/brief-date.js +16 -0
- package/dist/daily-brief/utils/brief-date.js.map +1 -0
- package/dist/daily-brief/utils/concurrency.d.ts +1 -0
- package/dist/daily-brief/utils/concurrency.js +20 -0
- package/dist/daily-brief/utils/concurrency.js.map +1 -0
- package/dist/database/database.module.d.ts +2 -0
- package/dist/database/database.module.js +57 -0
- package/dist/database/database.module.js.map +1 -0
- package/dist/database/repositories/daily-brief.repository.d.ts +96 -0
- package/dist/database/repositories/daily-brief.repository.js +457 -0
- package/dist/database/repositories/daily-brief.repository.js.map +1 -0
- package/dist/database/repositories/hot-item.repository.d.ts +52 -0
- package/dist/database/repositories/hot-item.repository.js +255 -0
- package/dist/database/repositories/hot-item.repository.js.map +1 -0
- package/dist/database/repositories/source-config.repository.d.ts +15 -0
- package/dist/database/repositories/source-config.repository.js +77 -0
- package/dist/database/repositories/source-config.repository.js.map +1 -0
- package/dist/database/schemas/daily-brief.schema.d.ts +30 -0
- package/dist/database/schemas/daily-brief.schema.js +103 -0
- package/dist/database/schemas/daily-brief.schema.js.map +1 -0
- package/dist/database/schemas/hot-item.schema.d.ts +20 -0
- package/dist/database/schemas/hot-item.schema.js +72 -0
- package/dist/database/schemas/hot-item.schema.js.map +1 -0
- package/dist/database/schemas/source-config.schema.d.ts +15 -0
- package/dist/database/schemas/source-config.schema.js +47 -0
- package/dist/database/schemas/source-config.schema.js.map +1 -0
- package/dist/history/dto/history-response.dto.d.ts +17 -0
- package/dist/history/dto/history-response.dto.js +13 -0
- package/dist/history/dto/history-response.dto.js.map +1 -0
- package/dist/history/dto/search-history.dto.d.ts +10 -0
- package/dist/history/dto/search-history.dto.js +72 -0
- package/dist/history/dto/search-history.dto.js.map +1 -0
- package/dist/history/history.controller.d.ts +13 -0
- package/dist/history/history.controller.js +92 -0
- package/dist/history/history.controller.js.map +1 -0
- package/dist/history/history.module.d.ts +2 -0
- package/dist/history/history.module.js +25 -0
- package/dist/history/history.module.js.map +1 -0
- package/dist/history/history.service.d.ts +15 -0
- package/dist/history/history.service.js +68 -0
- package/dist/history/history.service.js.map +1 -0
- package/dist/host-lists/decorators/hot-source.decorator.d.ts +9 -0
- package/dist/host-lists/decorators/hot-source.decorator.js +11 -0
- package/dist/host-lists/decorators/hot-source.decorator.js.map +1 -0
- package/dist/host-lists/dto/hot-list.dto.d.ts +14 -0
- package/dist/host-lists/dto/hot-list.dto.js +94 -0
- package/dist/host-lists/dto/hot-list.dto.js.map +1 -0
- package/dist/host-lists/hot-lists.controller.d.ts +39 -0
- package/dist/host-lists/hot-lists.controller.js +87 -0
- package/dist/host-lists/hot-lists.controller.js.map +1 -0
- package/dist/host-lists/hot-lists.module.d.ts +2 -0
- package/dist/host-lists/hot-lists.module.js +36 -0
- package/dist/host-lists/hot-lists.module.js.map +1 -0
- package/dist/host-lists/hot-lists.service.d.ts +21 -0
- package/dist/host-lists/hot-lists.service.js +115 -0
- package/dist/host-lists/hot-lists.service.js.map +1 -0
- package/dist/host-lists/interfaces/hot-list-source.interface.d.ts +5 -0
- package/dist/host-lists/interfaces/hot-list-source.interface.js +3 -0
- package/dist/host-lists/interfaces/hot-list-source.interface.js.map +1 -0
- package/dist/host-lists/interfaces/hot-list.interface.d.ts +31 -0
- package/dist/host-lists/interfaces/hot-list.interface.js +3 -0
- package/dist/host-lists/interfaces/hot-list.interface.js.map +1 -0
- package/dist/host-lists/interfaces/router-data.interface.d.ts +19 -0
- package/dist/host-lists/interfaces/router-data.interface.js +3 -0
- package/dist/host-lists/interfaces/router-data.interface.js.map +1 -0
- package/dist/host-lists/sources/36kr.source.d.ts +9 -0
- package/dist/host-lists/sources/36kr.source.js +89 -0
- package/dist/host-lists/sources/36kr.source.js.map +1 -0
- package/dist/host-lists/sources/51cto.source.d.ts +11 -0
- package/dist/host-lists/sources/51cto.source.js +71 -0
- package/dist/host-lists/sources/51cto.source.js.map +1 -0
- package/dist/host-lists/sources/52pojie.source.d.ts +9 -0
- package/dist/host-lists/sources/52pojie.source.js +109 -0
- package/dist/host-lists/sources/52pojie.source.js.map +1 -0
- package/dist/host-lists/sources/acfun.source.d.ts +9 -0
- package/dist/host-lists/sources/acfun.source.js +90 -0
- package/dist/host-lists/sources/acfun.source.js.map +1 -0
- package/dist/host-lists/sources/baidu.source.d.ts +9 -0
- package/dist/host-lists/sources/baidu.source.js +85 -0
- package/dist/host-lists/sources/baidu.source.js.map +1 -0
- package/dist/host-lists/sources/bilibili.source.d.ts +14 -0
- package/dist/host-lists/sources/bilibili.source.js +188 -0
- package/dist/host-lists/sources/bilibili.source.js.map +1 -0
- package/dist/host-lists/sources/caixin.source.d.ts +9 -0
- package/dist/host-lists/sources/caixin.source.js +102 -0
- package/dist/host-lists/sources/caixin.source.js.map +1 -0
- package/dist/host-lists/sources/cls.source.d.ts +9 -0
- package/dist/host-lists/sources/cls.source.js +62 -0
- package/dist/host-lists/sources/cls.source.js.map +1 -0
- package/dist/host-lists/sources/coolapk.source.d.ts +9 -0
- package/dist/host-lists/sources/coolapk.source.js +57 -0
- package/dist/host-lists/sources/coolapk.source.js.map +1 -0
- package/dist/host-lists/sources/csdn.source.d.ts +9 -0
- package/dist/host-lists/sources/csdn.source.js +59 -0
- package/dist/host-lists/sources/csdn.source.js.map +1 -0
- package/dist/host-lists/sources/dgtle.source.d.ts +9 -0
- package/dist/host-lists/sources/dgtle.source.js +57 -0
- package/dist/host-lists/sources/dgtle.source.js.map +1 -0
- package/dist/host-lists/sources/douban-group.source.d.ts +11 -0
- package/dist/host-lists/sources/douban-group.source.js +100 -0
- package/dist/host-lists/sources/douban-group.source.js.map +1 -0
- package/dist/host-lists/sources/douban-movie.source.d.ts +10 -0
- package/dist/host-lists/sources/douban-movie.source.js +103 -0
- package/dist/host-lists/sources/douban-movie.source.js.map +1 -0
- package/dist/host-lists/sources/douyin.d.ts +16 -0
- package/dist/host-lists/sources/douyin.js +215 -0
- package/dist/host-lists/sources/douyin.js.map +1 -0
- package/dist/host-lists/sources/eastmoney-stock.source.d.ts +11 -0
- package/dist/host-lists/sources/eastmoney-stock.source.js +151 -0
- package/dist/host-lists/sources/eastmoney-stock.source.js.map +1 -0
- package/dist/host-lists/sources/eastmoney.source.d.ts +9 -0
- package/dist/host-lists/sources/eastmoney.source.js +86 -0
- package/dist/host-lists/sources/eastmoney.source.js.map +1 -0
- package/dist/host-lists/sources/geekpark.source.d.ts +9 -0
- package/dist/host-lists/sources/geekpark.source.js +60 -0
- package/dist/host-lists/sources/geekpark.source.js.map +1 -0
- package/dist/host-lists/sources/gelonghui.source.d.ts +9 -0
- package/dist/host-lists/sources/gelonghui.source.js +139 -0
- package/dist/host-lists/sources/gelonghui.source.js.map +1 -0
- package/dist/host-lists/sources/github.source.d.ts +12 -0
- package/dist/host-lists/sources/github.source.js +171 -0
- package/dist/host-lists/sources/github.source.js.map +1 -0
- package/dist/host-lists/sources/guokr.source.d.ts +11 -0
- package/dist/host-lists/sources/guokr.source.js +98 -0
- package/dist/host-lists/sources/guokr.source.js.map +1 -0
- package/dist/host-lists/sources/hackernews.source.d.ts +11 -0
- package/dist/host-lists/sources/hackernews.source.js +121 -0
- package/dist/host-lists/sources/hackernews.source.js.map +1 -0
- package/dist/host-lists/sources/hellogithub.source.d.ts +11 -0
- package/dist/host-lists/sources/hellogithub.source.js +98 -0
- package/dist/host-lists/sources/hellogithub.source.js.map +1 -0
- package/dist/host-lists/sources/history.source.d.ts +11 -0
- package/dist/host-lists/sources/history.source.js +92 -0
- package/dist/host-lists/sources/history.source.js.map +1 -0
- package/dist/host-lists/sources/honkai.source.d.ts +9 -0
- package/dist/host-lists/sources/honkai.source.js +72 -0
- package/dist/host-lists/sources/honkai.source.js.map +1 -0
- package/dist/host-lists/sources/hostloc.source.d.ts +9 -0
- package/dist/host-lists/sources/hostloc.source.js +75 -0
- package/dist/host-lists/sources/hostloc.source.js.map +1 -0
- package/dist/host-lists/sources/hupu.source.d.ts +9 -0
- package/dist/host-lists/sources/hupu.source.js +73 -0
- package/dist/host-lists/sources/hupu.source.js.map +1 -0
- package/dist/host-lists/sources/huxiu.source.d.ts +9 -0
- package/dist/host-lists/sources/huxiu.source.js +153 -0
- package/dist/host-lists/sources/huxiu.source.js.map +1 -0
- package/dist/host-lists/sources/ifanr.source.d.ts +9 -0
- package/dist/host-lists/sources/ifanr.source.js +57 -0
- package/dist/host-lists/sources/ifanr.source.js.map +1 -0
- package/dist/host-lists/sources/index.d.ts +2 -0
- package/dist/host-lists/sources/index.js +134 -0
- package/dist/host-lists/sources/index.js.map +1 -0
- package/dist/host-lists/sources/ithome-xijiayi.source.d.ts +9 -0
- package/dist/host-lists/sources/ithome-xijiayi.source.js +75 -0
- package/dist/host-lists/sources/ithome-xijiayi.source.js.map +1 -0
- package/dist/host-lists/sources/ithome.source.d.ts +9 -0
- package/dist/host-lists/sources/ithome.source.js +71 -0
- package/dist/host-lists/sources/ithome.source.js.map +1 -0
- package/dist/host-lists/sources/jd.source.d.ts +9 -0
- package/dist/host-lists/sources/jd.source.js +82 -0
- package/dist/host-lists/sources/jd.source.js.map +1 -0
- package/dist/host-lists/sources/jianshu.source.d.ts +9 -0
- package/dist/host-lists/sources/jianshu.source.js +72 -0
- package/dist/host-lists/sources/jianshu.source.js.map +1 -0
- package/dist/host-lists/sources/jin10.source.d.ts +9 -0
- package/dist/host-lists/sources/jin10.source.js +63 -0
- package/dist/host-lists/sources/jin10.source.js.map +1 -0
- package/dist/host-lists/sources/juejin.source.d.ts +10 -0
- package/dist/host-lists/sources/juejin.source.js +81 -0
- package/dist/host-lists/sources/juejin.source.js.map +1 -0
- package/dist/host-lists/sources/kuaishou.source.d.ts +13 -0
- package/dist/host-lists/sources/kuaishou.source.js +179 -0
- package/dist/host-lists/sources/kuaishou.source.js.map +1 -0
- package/dist/host-lists/sources/linuxdo.source.d.ts +9 -0
- package/dist/host-lists/sources/linuxdo.source.js +62 -0
- package/dist/host-lists/sources/linuxdo.source.js.map +1 -0
- package/dist/host-lists/sources/lol.source.d.ts +9 -0
- package/dist/host-lists/sources/lol.source.js +58 -0
- package/dist/host-lists/sources/lol.source.js.map +1 -0
- package/dist/host-lists/sources/miyoushe.source.d.ts +9 -0
- package/dist/host-lists/sources/miyoushe.source.js +88 -0
- package/dist/host-lists/sources/miyoushe.source.js.map +1 -0
- package/dist/host-lists/sources/netease-news.source.d.ts +9 -0
- package/dist/host-lists/sources/netease-news.source.js +56 -0
- package/dist/host-lists/sources/netease-news.source.js.map +1 -0
- package/dist/host-lists/sources/ngabbs.source.d.ts +9 -0
- package/dist/host-lists/sources/ngabbs.source.js +70 -0
- package/dist/host-lists/sources/ngabbs.source.js.map +1 -0
- package/dist/host-lists/sources/nodeseek.source.d.ts +9 -0
- package/dist/host-lists/sources/nodeseek.source.js +62 -0
- package/dist/host-lists/sources/nodeseek.source.js.map +1 -0
- package/dist/host-lists/sources/nytimes.source.d.ts +9 -0
- package/dist/host-lists/sources/nytimes.source.js +77 -0
- package/dist/host-lists/sources/nytimes.source.js.map +1 -0
- package/dist/host-lists/sources/producthunt.source.d.ts +9 -0
- package/dist/host-lists/sources/producthunt.source.js +75 -0
- package/dist/host-lists/sources/producthunt.source.js.map +1 -0
- package/dist/host-lists/sources/qq-news.source.d.ts +9 -0
- package/dist/host-lists/sources/qq-news.source.js +53 -0
- package/dist/host-lists/sources/qq-news.source.js.map +1 -0
- package/dist/host-lists/sources/sina-news.source.d.ts +9 -0
- package/dist/host-lists/sources/sina-news.source.js +98 -0
- package/dist/host-lists/sources/sina-news.source.js.map +1 -0
- package/dist/host-lists/sources/sina.source.d.ts +9 -0
- package/dist/host-lists/sources/sina.source.js +78 -0
- package/dist/host-lists/sources/sina.source.js.map +1 -0
- package/dist/host-lists/sources/smzdm.source.d.ts +9 -0
- package/dist/host-lists/sources/smzdm.source.js +71 -0
- package/dist/host-lists/sources/smzdm.source.js.map +1 -0
- package/dist/host-lists/sources/sspai.source.d.ts +9 -0
- package/dist/host-lists/sources/sspai.source.js +69 -0
- package/dist/host-lists/sources/sspai.source.js.map +1 -0
- package/dist/host-lists/sources/starrail.source.d.ts +9 -0
- package/dist/host-lists/sources/starrail.source.js +72 -0
- package/dist/host-lists/sources/starrail.source.js.map +1 -0
- package/dist/host-lists/sources/taobao.source.d.ts +10 -0
- package/dist/host-lists/sources/taobao.source.js +169 -0
- package/dist/host-lists/sources/taobao.source.js.map +1 -0
- package/dist/host-lists/sources/thepaper.source.d.ts +9 -0
- package/dist/host-lists/sources/thepaper.source.js +56 -0
- package/dist/host-lists/sources/thepaper.source.js.map +1 -0
- package/dist/host-lists/sources/tieba.source.d.ts +9 -0
- package/dist/host-lists/sources/tieba.source.js +58 -0
- package/dist/host-lists/sources/tieba.source.js.map +1 -0
- package/dist/host-lists/sources/tonghuashun.source.d.ts +9 -0
- package/dist/host-lists/sources/tonghuashun.source.js +112 -0
- package/dist/host-lists/sources/tonghuashun.source.js.map +1 -0
- package/dist/host-lists/sources/toutiao.source.d.ts +9 -0
- package/dist/host-lists/sources/toutiao.source.js +56 -0
- package/dist/host-lists/sources/toutiao.source.js.map +1 -0
- package/dist/host-lists/sources/v2ex.source.d.ts +9 -0
- package/dist/host-lists/sources/v2ex.source.js +67 -0
- package/dist/host-lists/sources/v2ex.source.js.map +1 -0
- package/dist/host-lists/sources/wallstreet.source.d.ts +9 -0
- package/dist/host-lists/sources/wallstreet.source.js +59 -0
- package/dist/host-lists/sources/wallstreet.source.js.map +1 -0
- package/dist/host-lists/sources/weatheralarm.source.d.ts +9 -0
- package/dist/host-lists/sources/weatheralarm.source.js +68 -0
- package/dist/host-lists/sources/weatheralarm.source.js.map +1 -0
- package/dist/host-lists/sources/weibo.source.d.ts +15 -0
- package/dist/host-lists/sources/weibo.source.js +180 -0
- package/dist/host-lists/sources/weibo.source.js.map +1 -0
- package/dist/host-lists/sources/weread.source.d.ts +9 -0
- package/dist/host-lists/sources/weread.source.js +82 -0
- package/dist/host-lists/sources/weread.source.js.map +1 -0
- package/dist/host-lists/sources/xinyu.source.d.ts +9 -0
- package/dist/host-lists/sources/xinyu.source.js +151 -0
- package/dist/host-lists/sources/xinyu.source.js.map +1 -0
- package/dist/host-lists/sources/yicai.source.d.ts +9 -0
- package/dist/host-lists/sources/yicai.source.js +113 -0
- package/dist/host-lists/sources/yicai.source.js.map +1 -0
- package/dist/host-lists/sources/yystv.source.d.ts +9 -0
- package/dist/host-lists/sources/yystv.source.js +57 -0
- package/dist/host-lists/sources/yystv.source.js.map +1 -0
- package/dist/host-lists/sources/zhihu-daily.source.d.ts +9 -0
- package/dist/host-lists/sources/zhihu-daily.source.js +60 -0
- package/dist/host-lists/sources/zhihu-daily.source.js.map +1 -0
- package/dist/host-lists/sources/zhihu.source.d.ts +12 -0
- package/dist/host-lists/sources/zhihu.source.js +195 -0
- package/dist/host-lists/sources/zhihu.source.js.map +1 -0
- package/dist/http/http.module.d.ts +2 -0
- package/dist/http/http.module.js +30 -0
- package/dist/http/http.module.js.map +1 -0
- package/dist/http/http.service.d.ts +53 -0
- package/dist/http/http.service.js +277 -0
- package/dist/http/http.service.js.map +1 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +70 -0
- package/dist/main.js.map +1 -0
- package/dist/rss/rss.module.d.ts +2 -0
- package/dist/rss/rss.module.js +21 -0
- package/dist/rss/rss.module.js.map +1 -0
- package/dist/rss/rss.service.d.ts +5 -0
- package/dist/rss/rss.service.js +55 -0
- package/dist/rss/rss.service.js.map +1 -0
- package/dist/scheduler/dto/trigger-fetch.dto.d.ts +3 -0
- package/dist/scheduler/dto/trigger-fetch.dto.js +22 -0
- package/dist/scheduler/dto/trigger-fetch.dto.js.map +1 -0
- package/dist/scheduler/dto/update-source-config.dto.d.ts +4 -0
- package/dist/scheduler/dto/update-source-config.dto.js +29 -0
- package/dist/scheduler/dto/update-source-config.dto.js.map +1 -0
- package/dist/scheduler/scheduler.controller.d.ts +52 -0
- package/dist/scheduler/scheduler.controller.js +132 -0
- package/dist/scheduler/scheduler.controller.js.map +1 -0
- package/dist/scheduler/scheduler.module.d.ts +2 -0
- package/dist/scheduler/scheduler.module.js +34 -0
- package/dist/scheduler/scheduler.module.js.map +1 -0
- package/dist/scheduler/scheduler.service.d.ts +54 -0
- package/dist/scheduler/scheduler.service.js +238 -0
- package/dist/scheduler/scheduler.service.js.map +1 -0
- package/dist/scheduler/tasks/fetch-hot-data.task.d.ts +34 -0
- package/dist/scheduler/tasks/fetch-hot-data.task.js +175 -0
- package/dist/scheduler/tasks/fetch-hot-data.task.js.map +1 -0
- package/dist/token/coolapk.d.ts +11 -0
- package/dist/token/coolapk.js +40 -0
- package/dist/token/coolapk.js.map +1 -0
- package/dist/token/token.module.d.ts +2 -0
- package/dist/token/token.module.js +23 -0
- package/dist/token/token.module.js.map +1 -0
- package/dist/token/token.service.d.ts +19 -0
- package/dist/token/token.service.js +115 -0
- package/dist/token/token.service.js.map +1 -0
- package/dist/token/tools.d.ts +1 -0
- package/dist/token/tools.js +15 -0
- package/dist/token/tools.js.map +1 -0
- package/dist/token/weread.d.ts +2 -0
- package/dist/token/weread.js +55 -0
- package/dist/token/weread.js.map +1 -0
- package/dist/utils/getNum.d.ts +1 -0
- package/dist/utils/getNum.js +20 -0
- package/dist/utils/getNum.js.map +1 -0
- package/dist/utils/getTime.d.ts +11 -0
- package/dist/utils/getTime.js +134 -0
- package/dist/utils/getTime.js.map +1 -0
- package/dist/utils/headers.d.ts +16 -0
- package/dist/utils/headers.js +20 -0
- package/dist/utils/headers.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +12 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/parseRSS.d.ts +11 -0
- package/dist/utils/parseRSS.js +47 -0
- package/dist/utils/parseRSS.js.map +1 -0
- package/package.json +148 -4
- package/views/home.hbs +65 -0
|
@@ -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,QAAQ,CACT,CAAC;IACJ,CAAC;CACF,CAAA;AA7TY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAMqB,mBAAW;QACV,4BAAY;QACX,sBAAa;GAPpC,iBAAiB,CA6T7B"}
|
package/dist/main.d.ts
ADDED
package/dist/main.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveViewsDir = resolveViewsDir;
|
|
4
|
+
exports.bootstrap = bootstrap;
|
|
5
|
+
const core_1 = require("@nestjs/core");
|
|
6
|
+
const app_module_1 = require("./app.module");
|
|
7
|
+
const config_1 = require("@nestjs/config");
|
|
8
|
+
const common_1 = require("@nestjs/common");
|
|
9
|
+
const fs_1 = require("fs");
|
|
10
|
+
const path_1 = require("path");
|
|
11
|
+
process.on('unhandledRejection', (reason) => {
|
|
12
|
+
const name = reason instanceof Error ? reason.name : typeof reason;
|
|
13
|
+
if (name === 'MongoTopologyClosedError' ||
|
|
14
|
+
name === 'MongoServerSelectionError') {
|
|
15
|
+
console.warn(`MongoDB connection unavailable: ${name}`);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
console.error(`Unhandled Rejection: ${name}`);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
});
|
|
21
|
+
process.on('uncaughtException', (error) => {
|
|
22
|
+
if (error.name === 'MongoTopologyClosedError' ||
|
|
23
|
+
error.name === 'MongoServerSelectionError') {
|
|
24
|
+
console.warn('MongoDB connection error caught globally, service continues running');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
console.error(`Uncaught Exception: ${error.name}: ${error.message}`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
});
|
|
30
|
+
function resolveViewsDir() {
|
|
31
|
+
const packageRootViews = (0, path_1.join)(__dirname, '..', 'views');
|
|
32
|
+
if ((0, fs_1.existsSync)(packageRootViews)) {
|
|
33
|
+
return packageRootViews;
|
|
34
|
+
}
|
|
35
|
+
return (0, path_1.join)(process.cwd(), 'views');
|
|
36
|
+
}
|
|
37
|
+
async function bootstrap() {
|
|
38
|
+
const app = await core_1.NestFactory.create(app_module_1.AppModule);
|
|
39
|
+
app.enableShutdownHooks();
|
|
40
|
+
app.useGlobalPipes(new common_1.ValidationPipe({
|
|
41
|
+
transform: true,
|
|
42
|
+
whitelist: true,
|
|
43
|
+
forbidNonWhitelisted: true,
|
|
44
|
+
}));
|
|
45
|
+
app.setBaseViewsDir(resolveViewsDir());
|
|
46
|
+
app.setViewEngine('hbs');
|
|
47
|
+
const config = app.get(config_1.ConfigService);
|
|
48
|
+
const allowedDomain = config.get('ALLOWED_DOMAIN', '*');
|
|
49
|
+
app.enableCors({
|
|
50
|
+
origin: allowedDomain,
|
|
51
|
+
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
|
|
52
|
+
allowedHeaders: ['Content-Type', 'Authorization', 'X-Requested-With'],
|
|
53
|
+
});
|
|
54
|
+
const port = config.getOrThrow('PORT');
|
|
55
|
+
await app.listen(port);
|
|
56
|
+
return app;
|
|
57
|
+
}
|
|
58
|
+
async function main() {
|
|
59
|
+
const app = await bootstrap();
|
|
60
|
+
const config = app.get(config_1.ConfigService);
|
|
61
|
+
const port = config.getOrThrow('PORT');
|
|
62
|
+
console.log(`Server is running on port http://localhost:${port}`);
|
|
63
|
+
}
|
|
64
|
+
if (require.main === module) {
|
|
65
|
+
main().catch((err) => {
|
|
66
|
+
console.error('Bootstrap error:', err);
|
|
67
|
+
process.exitCode = 1;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAyCA,0CAMC;AAED,8BA6BC;AA9ED,uCAA2C;AAC3C,6CAAyC;AACzC,2CAA+C;AAE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B,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAQ,EAAE,EAAE;QACxB,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;QACvC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.RssModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const rss_service_1 = require("./rss.service");
|
|
12
|
+
let RssModule = class RssModule {
|
|
13
|
+
};
|
|
14
|
+
exports.RssModule = RssModule;
|
|
15
|
+
exports.RssModule = RssModule = __decorate([
|
|
16
|
+
(0, common_1.Module)({
|
|
17
|
+
providers: [rss_service_1.RssService],
|
|
18
|
+
exports: [rss_service_1.RssService],
|
|
19
|
+
})
|
|
20
|
+
], RssModule);
|
|
21
|
+
//# sourceMappingURL=rss.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rss.module.js","sourceRoot":"","sources":["../../src/rss/rss.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAA2C;AAMpC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAJrB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,wBAAU,CAAC;QACvB,OAAO,EAAE,CAAC,wBAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
var RssService_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.RssService = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const rss_1 = __importDefault(require("rss"));
|
|
16
|
+
let RssService = RssService_1 = class RssService {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.logger = new common_1.Logger(RssService_1.name);
|
|
19
|
+
}
|
|
20
|
+
generateRss(data) {
|
|
21
|
+
try {
|
|
22
|
+
const feed = new rss_1.default({
|
|
23
|
+
title: `${data.title} - ${data.type}`,
|
|
24
|
+
description: data.description || `${data.title}的${data.type}`,
|
|
25
|
+
feed_url: data.link,
|
|
26
|
+
site_url: data.link,
|
|
27
|
+
language: 'zh',
|
|
28
|
+
generator: 'daily-hot-api',
|
|
29
|
+
copyright: 'Copyright © 2020-present Helti',
|
|
30
|
+
pubDate: new Date(data.updateTime ?? Date.now()),
|
|
31
|
+
});
|
|
32
|
+
data.data.forEach((item) => {
|
|
33
|
+
feed.item({
|
|
34
|
+
title: item.title,
|
|
35
|
+
description: item.desc || item.title,
|
|
36
|
+
url: item.url,
|
|
37
|
+
guid: item.id.toString(),
|
|
38
|
+
date: item.timestamp ? new Date(item.timestamp) : new Date(),
|
|
39
|
+
author: item.author || '',
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
const xml = feed.xml({ indent: true });
|
|
43
|
+
return xml;
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
this.logger.error(`Failed to generate RSS: ${error}`);
|
|
47
|
+
return JSON.stringify(error);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.RssService = RssService;
|
|
52
|
+
exports.RssService = RssService = RssService_1 = __decorate([
|
|
53
|
+
(0, common_1.Injectable)()
|
|
54
|
+
], RssService);
|
|
55
|
+
//# sourceMappingURL=rss.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rss.service.js","sourceRoot":"","sources":["../../src/rss/rss.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,2CAAoD;AAEpD,8CAAsB;AAGf,IAAM,UAAU,kBAAhB,MAAM,UAAU;IAAhB;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,YAAU,CAAC,IAAI,CAAC,CAAC;IAyCxD,CAAC;IAlCC,WAAW,CAAC,IAAgB;QAC1B,IAAI,CAAC;YAEH,MAAM,IAAI,GAAG,IAAI,aAAG,CAAC;gBACnB,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,MAAM,IAAI,CAAC,IAAI,EAAE;gBACrC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE;gBAC7D,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,eAAe;gBAC1B,SAAS,EAAE,gCAAgC;gBAC3C,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;aACjD,CAAC,CAAC;YAGH,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBACzB,IAAI,CAAC,IAAI,CAAC;oBACR,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,WAAW,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK;oBACpC,GAAG,EAAE,IAAI,CAAC,GAAG;oBACb,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE;oBACxB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;oBAC5D,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE;iBAC1B,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAGH,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;YACvC,OAAO,GAAG,CAAC;QACb,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,KAAK,EAAE,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;CACF,CAAA;AA1CY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CA0CtB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TriggerFetchDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class TriggerFetchDto {
|
|
15
|
+
}
|
|
16
|
+
exports.TriggerFetchDto = TriggerFetchDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsOptional)(),
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], TriggerFetchDto.prototype, "source", void 0);
|
|
22
|
+
//# sourceMappingURL=trigger-fetch.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger-fetch.dto.js","sourceRoot":"","sources":["../../../src/scheduler/dto/trigger-fetch.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,eAAe;CAI3B;AAJD,0CAIC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACK"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateSourceConfigDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class UpdateSourceConfigDto {
|
|
15
|
+
}
|
|
16
|
+
exports.UpdateSourceConfigDto = UpdateSourceConfigDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsOptional)(),
|
|
19
|
+
(0, class_validator_1.IsBoolean)(),
|
|
20
|
+
__metadata("design:type", Boolean)
|
|
21
|
+
], UpdateSourceConfigDto.prototype, "enabled", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
(0, class_validator_1.IsInt)(),
|
|
25
|
+
(0, class_validator_1.Min)(1),
|
|
26
|
+
(0, class_validator_1.Max)(10080),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], UpdateSourceConfigDto.prototype, "interval", void 0);
|
|
29
|
+
//# sourceMappingURL=update-source-config.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-source-config.dto.js","sourceRoot":"","sources":["../../../src/scheduler/dto/update-source-config.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyE;AAEzE,MAAa,qBAAqB;CAUjC;AAVD,sDAUC;AAPC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;sDACM;AAMlB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,KAAK,CAAC;;uDACO"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { SchedulerService } from './scheduler.service';
|
|
2
|
+
import { SourceConfigRepository } from '../database/repositories/source-config.repository';
|
|
3
|
+
import { UpdateSourceConfigDto } from './dto/update-source-config.dto';
|
|
4
|
+
import { TriggerFetchDto } from './dto/trigger-fetch.dto';
|
|
5
|
+
export declare class SchedulerController {
|
|
6
|
+
private readonly schedulerService;
|
|
7
|
+
private readonly sourceConfigRepository;
|
|
8
|
+
constructor(schedulerService: SchedulerService, sourceConfigRepository: SourceConfigRepository);
|
|
9
|
+
getStatus(): {
|
|
10
|
+
isRunning: boolean;
|
|
11
|
+
schedulerEnabled: boolean;
|
|
12
|
+
cronJobs: number;
|
|
13
|
+
ignoreSources: string[];
|
|
14
|
+
cronExpression: string | undefined;
|
|
15
|
+
cronJobExists: boolean;
|
|
16
|
+
};
|
|
17
|
+
getIgnoredSources(): {
|
|
18
|
+
ignoredSources: string[];
|
|
19
|
+
message: string;
|
|
20
|
+
};
|
|
21
|
+
start(): {
|
|
22
|
+
message: string;
|
|
23
|
+
};
|
|
24
|
+
stop(): {
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
triggerFetch(body: TriggerFetchDto): Promise<{
|
|
28
|
+
runId: string;
|
|
29
|
+
status: "running" | "completed" | "failed";
|
|
30
|
+
sourceCount: number;
|
|
31
|
+
startedAt: string;
|
|
32
|
+
completedAt?: string;
|
|
33
|
+
results?: Array<Omit<import("./tasks/fetch-hot-data.task").FetchResult, "items">>;
|
|
34
|
+
error?: string;
|
|
35
|
+
}>;
|
|
36
|
+
getRun(runId: string): {
|
|
37
|
+
runId: string;
|
|
38
|
+
status: "running" | "completed" | "failed";
|
|
39
|
+
sourceCount: number;
|
|
40
|
+
startedAt: string;
|
|
41
|
+
completedAt?: string;
|
|
42
|
+
results?: Array<Omit<import("./tasks/fetch-hot-data.task").FetchResult, "items">>;
|
|
43
|
+
error?: string;
|
|
44
|
+
};
|
|
45
|
+
updateConfig(source: string, config: UpdateSourceConfigDto): Promise<{
|
|
46
|
+
message: string;
|
|
47
|
+
}>;
|
|
48
|
+
getConfigs(): Promise<import("../database/schemas/source-config.schema").SourceConfig[]>;
|
|
49
|
+
reconfigure(): {
|
|
50
|
+
message: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SchedulerController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const scheduler_service_1 = require("./scheduler.service");
|
|
18
|
+
const source_config_repository_1 = require("../database/repositories/source-config.repository");
|
|
19
|
+
const update_source_config_dto_1 = require("./dto/update-source-config.dto");
|
|
20
|
+
const trigger_fetch_dto_1 = require("./dto/trigger-fetch.dto");
|
|
21
|
+
let SchedulerController = class SchedulerController {
|
|
22
|
+
constructor(schedulerService, sourceConfigRepository) {
|
|
23
|
+
this.schedulerService = schedulerService;
|
|
24
|
+
this.sourceConfigRepository = sourceConfigRepository;
|
|
25
|
+
}
|
|
26
|
+
getStatus() {
|
|
27
|
+
return this.schedulerService.getStatus();
|
|
28
|
+
}
|
|
29
|
+
getIgnoredSources() {
|
|
30
|
+
const status = this.schedulerService.getStatus();
|
|
31
|
+
return {
|
|
32
|
+
ignoredSources: status.ignoreSources,
|
|
33
|
+
message: 'These sources will be skipped during data fetching',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
start() {
|
|
37
|
+
this.schedulerService.start();
|
|
38
|
+
return { message: 'Scheduler started' };
|
|
39
|
+
}
|
|
40
|
+
stop() {
|
|
41
|
+
this.schedulerService.stop();
|
|
42
|
+
return { message: 'Scheduler stopped' };
|
|
43
|
+
}
|
|
44
|
+
async triggerFetch(body) {
|
|
45
|
+
return this.schedulerService.triggerFetch(body?.source);
|
|
46
|
+
}
|
|
47
|
+
getRun(runId) {
|
|
48
|
+
return this.schedulerService.getRun(runId);
|
|
49
|
+
}
|
|
50
|
+
async updateConfig(source, config) {
|
|
51
|
+
if (config.enabled !== undefined) {
|
|
52
|
+
await this.sourceConfigRepository.setEnabled(source, config.enabled);
|
|
53
|
+
}
|
|
54
|
+
if (config.interval !== undefined) {
|
|
55
|
+
await this.sourceConfigRepository.updateInterval(source, config.interval);
|
|
56
|
+
}
|
|
57
|
+
return { message: 'Config updated' };
|
|
58
|
+
}
|
|
59
|
+
async getConfigs() {
|
|
60
|
+
return this.sourceConfigRepository.findAll();
|
|
61
|
+
}
|
|
62
|
+
reconfigure() {
|
|
63
|
+
this.schedulerService.reconfigureCron();
|
|
64
|
+
return { message: 'Scheduler reconfigured' };
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.SchedulerController = SchedulerController;
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, common_1.Get)('status'),
|
|
70
|
+
__metadata("design:type", Function),
|
|
71
|
+
__metadata("design:paramtypes", []),
|
|
72
|
+
__metadata("design:returntype", void 0)
|
|
73
|
+
], SchedulerController.prototype, "getStatus", null);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, common_1.Get)('ignored-sources'),
|
|
76
|
+
__metadata("design:type", Function),
|
|
77
|
+
__metadata("design:paramtypes", []),
|
|
78
|
+
__metadata("design:returntype", void 0)
|
|
79
|
+
], SchedulerController.prototype, "getIgnoredSources", null);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, common_1.Post)('start'),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", []),
|
|
84
|
+
__metadata("design:returntype", void 0)
|
|
85
|
+
], SchedulerController.prototype, "start", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, common_1.Post)('stop'),
|
|
88
|
+
__metadata("design:type", Function),
|
|
89
|
+
__metadata("design:paramtypes", []),
|
|
90
|
+
__metadata("design:returntype", void 0)
|
|
91
|
+
], SchedulerController.prototype, "stop", null);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, common_1.Post)('trigger'),
|
|
94
|
+
(0, common_1.HttpCode)(202),
|
|
95
|
+
__param(0, (0, common_1.Body)()),
|
|
96
|
+
__metadata("design:type", Function),
|
|
97
|
+
__metadata("design:paramtypes", [trigger_fetch_dto_1.TriggerFetchDto]),
|
|
98
|
+
__metadata("design:returntype", Promise)
|
|
99
|
+
], SchedulerController.prototype, "triggerFetch", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, common_1.Get)('runs/:runId'),
|
|
102
|
+
__param(0, (0, common_1.Param)('runId')),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [String]),
|
|
105
|
+
__metadata("design:returntype", void 0)
|
|
106
|
+
], SchedulerController.prototype, "getRun", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, common_1.Put)('config/:source'),
|
|
109
|
+
__param(0, (0, common_1.Param)('source')),
|
|
110
|
+
__param(1, (0, common_1.Body)()),
|
|
111
|
+
__metadata("design:type", Function),
|
|
112
|
+
__metadata("design:paramtypes", [String, update_source_config_dto_1.UpdateSourceConfigDto]),
|
|
113
|
+
__metadata("design:returntype", Promise)
|
|
114
|
+
], SchedulerController.prototype, "updateConfig", null);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, common_1.Get)('configs'),
|
|
117
|
+
__metadata("design:type", Function),
|
|
118
|
+
__metadata("design:paramtypes", []),
|
|
119
|
+
__metadata("design:returntype", Promise)
|
|
120
|
+
], SchedulerController.prototype, "getConfigs", null);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, common_1.Post)('reconfigure'),
|
|
123
|
+
__metadata("design:type", Function),
|
|
124
|
+
__metadata("design:paramtypes", []),
|
|
125
|
+
__metadata("design:returntype", void 0)
|
|
126
|
+
], SchedulerController.prototype, "reconfigure", null);
|
|
127
|
+
exports.SchedulerController = SchedulerController = __decorate([
|
|
128
|
+
(0, common_1.Controller)('api/scheduler'),
|
|
129
|
+
__metadata("design:paramtypes", [scheduler_service_1.SchedulerService,
|
|
130
|
+
source_config_repository_1.SourceConfigRepository])
|
|
131
|
+
], SchedulerController);
|
|
132
|
+
//# sourceMappingURL=scheduler.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.controller.js","sourceRoot":"","sources":["../../src/scheduler/scheduler.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,2DAAuD;AACvD,gGAA2F;AAC3F,6EAAuE;AACvE,+DAA0D;AAGnD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACmB,gBAAkC,EAClC,sBAA8C;QAD9C,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,2BAAsB,GAAtB,sBAAsB,CAAwB;IAC9D,CAAC;IAIJ,SAAS;QACP,OAAO,IAAI,CAAC,gBAAg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AC;IAC/C,CAAC;IAID,WAAW;QACT,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC;QACxC,OAAO,EAAE,OAAO,EAAE,wBAAwB,EAAE,CAAC;IAC/C,CAAC;CACF,CAAA;AA3EY,kDAAmB;AAQ9B;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;;;;oDAGb;AAID;IADC,IAAA,YAAG,EAAC,iBAAiB,CAAC;;;;4DAOtB;AAID;IADC,IAAA,aAAI,EAAC,OAAO,CAAC;;;;gDAIb;AAID;IADC,IAAA,aAAI,EAAC,MAAM,CAAC;;;;+CAIZ;AAKK;IAFL,IAAA,aAAI,EAAC,SAAS,CAAC;IACf,IAAA,iBAAQ,EAAC,GAAG,CAAC;IACM,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,mCAAe;;uDAE/C;AAGD;IADC,IAAA,YAAG,EAAC,aAAa,CAAC;IACX,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;;;;iDAErB;AAIK;IADL,IAAA,YAAG,EAAC,gBAAgB,CAAC;IAEnB,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;IACf,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAS,gDAAqB;;uDAStC;AAIK;IADL,IAAA,YAAG,EAAC,SAAS,CAAC;;;;qDAGd;AAID;IADC,IAAA,aAAI,EAAC,aAAa,CAAC;;;;sDAInB;8BA1EU,mBAAmB;IAD/B,IAAA,mBAAU,EAAC,eAAe,CAAC;qCAGW,oCAAgB;QACV,iDAAsB;GAHtD,mBAAmB,CA2E/B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SchedulerModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const schedule_1 = require("@nestjs/schedule");
|
|
12
|
+
const scheduler_service_1 = require("./scheduler.service");
|
|
13
|
+
const scheduler_controller_1 = require("./scheduler.controller");
|
|
14
|
+
const fetch_hot_data_task_1 = require("./tasks/fetch-hot-data.task");
|
|
15
|
+
const database_module_1 = require("../database/database.module");
|
|
16
|
+
const hot_lists_module_1 = require("../host-lists/hot-lists.module");
|
|
17
|
+
const cache_module_1 = require("../cache/cache.module");
|
|
18
|
+
let SchedulerModule = class SchedulerModule {
|
|
19
|
+
};
|
|
20
|
+
exports.SchedulerModule = SchedulerModule;
|
|
21
|
+
exports.SchedulerModule = SchedulerModule = __decorate([
|
|
22
|
+
(0, common_1.Module)({
|
|
23
|
+
imports: [
|
|
24
|
+
schedule_1.ScheduleModule.forRoot(),
|
|
25
|
+
database_module_1.DatabaseModule,
|
|
26
|
+
hot_lists_module_1.HotListsModule,
|
|
27
|
+
cache_module_1.CacheModule,
|
|
28
|
+
],
|
|
29
|
+
controllers: [scheduler_controller_1.SchedulerController],
|
|
30
|
+
providers: [scheduler_service_1.SchedulerService, fetch_hot_data_task_1.FetchHotDataTask],
|
|
31
|
+
exports: [scheduler_service_1.SchedulerService, fetch_hot_data_task_1.FetchHotDataTask],
|
|
32
|
+
})
|
|
33
|
+
], SchedulerModule);
|
|
34
|
+
//# sourceMappingURL=scheduler.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.module.js","sourceRoot":"","sources":["../../src/scheduler/scheduler.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,2DAAuD;AACvD,iEAA6D;AAC7D,qEAA+D;AAC/D,iEAA6D;AAC7D,qEAAgE;AAChE,wDAAoD;AAa7C,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAX3B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc,CAAC,OAAO,EAAE;YACxB,gCAAc;YACd,iCAAc;YACd,0BAAW;SACZ;QACD,WAAW,EAAE,CAAC,0CAAmB,CAAC;QAClC,SAAS,EAAE,CAAC,oCAAgB,EAAE,sCAAgB,CAAC;QAC/C,OAAO,EAAE,CAAC,oCAAgB,EAAE,sCAAgB,CAAC;KAC9C,CAAC;GACW,eAAe,CAAG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { OnModuleInit, OnModuleDestroy } from '@nestjs/common';
|
|
2
|
+
import { SchedulerRegistry } from '@nestjs/schedule';
|
|
3
|
+
import { ConfigService } from '@nestjs/config';
|
|
4
|
+
import { HotListsService } from '../host-lists/hot-lists.service';
|
|
5
|
+
import { SourceConfigRepository } from '../database/repositories/source-config.repository';
|
|
6
|
+
import { FetchHotDataTask, FetchResult } from './tasks/fetch-hot-data.task';
|
|
7
|
+
type FetchRun = {
|
|
8
|
+
runId: string;
|
|
9
|
+
status: 'running' | 'completed' | 'failed';
|
|
10
|
+
sourceCount: number;
|
|
11
|
+
startedAt: string;
|
|
12
|
+
completedAt?: string;
|
|
13
|
+
results?: Array<Omit<FetchResult, 'items'>>;
|
|
14
|
+
error?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare class SchedulerService implements OnModuleInit, OnModuleDestroy {
|
|
17
|
+
private readonly schedulerRegistry;
|
|
18
|
+
private readonly configService;
|
|
19
|
+
private readonly hotListsService;
|
|
20
|
+
private readonly sourceConfigRepository;
|
|
21
|
+
private readonly fetchHotDataTask;
|
|
22
|
+
private readonly logger;
|
|
23
|
+
private isRunning;
|
|
24
|
+
private schedulerEnabled;
|
|
25
|
+
private readonly cronJobName;
|
|
26
|
+
private readonly ignoreSources;
|
|
27
|
+
private readonly runs;
|
|
28
|
+
constructor(schedulerRegistry: SchedulerRegistry, configService: ConfigService, hotListsService: HotListsService, sourceConfigRepository: SourceConfigRepository, fetchHotDataTask: FetchHotDataTask);
|
|
29
|
+
onModuleInit(): Promise<void>;
|
|
30
|
+
onModuleDestroy(): void;
|
|
31
|
+
private loadIgnoreSources;
|
|
32
|
+
private loadSchedulerConfig;
|
|
33
|
+
private setupDynamicCronJob;
|
|
34
|
+
private stopDynamicCronJob;
|
|
35
|
+
private shouldIgnoreSource;
|
|
36
|
+
private initializeSourceConfigs;
|
|
37
|
+
handleCron(): Promise<void>;
|
|
38
|
+
private processScheduledTasks;
|
|
39
|
+
triggerFetch(source?: string): Promise<FetchRun>;
|
|
40
|
+
getRun(runId: string): FetchRun;
|
|
41
|
+
private pruneRuns;
|
|
42
|
+
getStatus(): {
|
|
43
|
+
isRunning: boolean;
|
|
44
|
+
schedulerEnabled: boolean;
|
|
45
|
+
cronJobs: number;
|
|
46
|
+
ignoreSources: string[];
|
|
47
|
+
cronExpression: string | undefined;
|
|
48
|
+
cronJobExists: boolean;
|
|
49
|
+
};
|
|
50
|
+
start(): void;
|
|
51
|
+
stop(): void;
|
|
52
|
+
reconfigureCron(): void;
|
|
53
|
+
}
|
|
54
|
+
export {};
|