publishport-opencli 1.0.19 → 1.0.21
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/cli-manifest.json +35 -0
- package/clis/12306/me.js +2 -2
- package/clis/12306/orders.js +3 -3
- package/clis/12306/passengers.js +3 -3
- package/clis/12306/price.js +1 -1
- package/clis/12306/stations.js +1 -1
- package/clis/12306/train.js +1 -1
- package/clis/12306/trains.js +1 -1
- package/clis/12306/utils.js +1 -1
- package/clis/1688/download.js +1 -1
- package/clis/1688/item.js +4 -4
- package/clis/1688/search.js +4 -4
- package/clis/1688/store.js +4 -4
- package/clis/1point3acres/forum.js +1 -1
- package/clis/1point3acres/forums.js +1 -1
- package/clis/1point3acres/notifications.js +1 -1
- package/clis/1point3acres/search.js +1 -1
- package/clis/1point3acres/thread.js +2 -2
- package/clis/1point3acres/user.js +1 -1
- package/clis/1point3acres/utils.js +2 -2
- package/clis/36kr/article.js +2 -2
- package/clis/36kr/hot.js +2 -2
- package/clis/36kr/news.js +1 -1
- package/clis/36kr/search.js +2 -2
- package/clis/51job/company.js +2 -2
- package/clis/51job/detail.js +2 -2
- package/clis/51job/hot.js +1 -1
- package/clis/51job/search.js +1 -1
- package/clis/51job/utils.js +7 -7
- package/clis/_atlassian/shared.js +9 -9
- package/clis/_shared/article/auth.js +4 -4
- package/clis/_shared/article/douban-md2draft.js +4 -4
- package/clis/_shared/article/format.js +1 -1
- package/clis/_shared/article/images.js +7 -7
- package/clis/_shared/article/login.js +1 -1
- package/clis/_shared/article/publish.js +11 -11
- package/clis/_shared/common.js +1 -1
- package/clis/_shared/content-guard.js +1 -1
- package/clis/_shared/desktop-commands.js +1 -1
- package/clis/_shared/file-inject.js +12 -12
- package/clis/_shared/self-hosted-sites.js +2 -2
- package/clis/_shared/site-auth.js +1 -1
- package/clis/_shared/token-auth.js +2 -2
- package/clis/_shared/video-publish.js +9 -9
- package/clis/amazon/offer.js +3 -3
- package/clis/amazon/product.js +5 -5
- package/clis/amazon/shared.js +6 -6
- package/clis/antigravity/_actions.js +13 -13
- package/clis/antigravity/audit-extras.js +10 -10
- package/clis/antigravity/delete.js +1 -1
- package/clis/antigravity/model.js +6 -6
- package/clis/antigravity/new.js +2 -2
- package/clis/antigravity/read.js +2 -2
- package/clis/antigravity/rename.js +1 -1
- package/clis/antigravity/send.js +3 -3
- package/clis/antigravity/serve.js +17 -17
- package/clis/antigravity/storage.js +6 -6
- package/clis/antigravity/watch.js +2 -2
- package/clis/apple-podcasts/episodes.js +1 -1
- package/clis/apple-podcasts/top.js +1 -1
- package/clis/apple-podcasts/utils.js +1 -1
- package/clis/archive/item.js +1 -1
- package/clis/archive/search.js +1 -1
- package/clis/archive/snapshots.js +1 -1
- package/clis/archive/wayback.js +1 -1
- package/clis/arxiv/author.js +1 -1
- package/clis/arxiv/utils.js +1 -1
- package/clis/autohome/brand.js +1 -1
- package/clis/autohome/score.js +1 -1
- package/clis/autohome/utils.js +1 -1
- package/clis/baijiahao/article.js +1 -1
- package/clis/baijiahao/lists.js +1 -1
- package/clis/baijiahao/login.js +1 -1
- package/clis/baijiahao/publish.js +9 -9
- package/clis/baijiahao/stats.js +1 -1
- package/clis/baijiahao/whoami.js +1 -1
- package/clis/band/bands.js +2 -2
- package/clis/band/mentions.js +2 -2
- package/clis/band/post.js +4 -4
- package/clis/band/posts.js +3 -3
- package/clis/barchart/flow.js +3 -3
- package/clis/barchart/greeks.js +2 -2
- package/clis/barchart/quote.js +3 -3
- package/clis/bbc/news.js +1 -1
- package/clis/bbc/topic.js +1 -1
- package/clis/bbc/utils.js +1 -1
- package/clis/bilibili/article.js +1 -1
- package/clis/bilibili/categories.js +1 -1
- package/clis/bilibili/coin.js +1 -1
- package/clis/bilibili/comment-del.js +1 -1
- package/clis/bilibili/comment-like.js +1 -1
- package/clis/bilibili/comment.js +1 -1
- package/clis/bilibili/comments.js +1 -1
- package/clis/bilibili/dm-list.js +1 -1
- package/clis/bilibili/dm-read.js +1 -1
- package/clis/bilibili/dm-send.js +1 -1
- package/clis/bilibili/download.js +2 -2
- package/clis/bilibili/drafts.js +1 -1
- package/clis/bilibili/dynamic-post.js +3 -3
- package/clis/bilibili/favorite-add.js +1 -1
- package/clis/bilibili/favorite.js +1 -1
- package/clis/bilibili/feed.js +2 -2
- package/clis/bilibili/follow.js +1 -1
- package/clis/bilibili/following.js +1 -1
- package/clis/bilibili/like.js +1 -1
- package/clis/bilibili/partitions.js +1 -1
- package/clis/bilibili/stats.js +1 -1
- package/clis/bilibili/subtitle.js +3 -3
- package/clis/bilibili/summary.js +1 -1
- package/clis/bilibili/topics.js +1 -1
- package/clis/bilibili/unfollow.js +1 -1
- package/clis/bilibili/upload.js +1 -1
- package/clis/bilibili/utils.js +10 -10
- package/clis/bilibili/video-drafts.js +1 -1
- package/clis/bilibili/video.js +1 -1
- package/clis/bloomberg/businessweek.js +4 -4
- package/clis/bloomberg/news.js +2 -2
- package/clis/bloomberg/utils.js +13 -13
- package/clis/bluesky/post.js +1 -1
- package/clis/bluesky/shared.js +11 -11
- package/clis/bluesky/whoami.js +1 -1
- package/clis/booking/search.js +2 -2
- package/clis/boss/accept.js +1 -1
- package/clis/boss/applied.js +1 -1
- package/clis/boss/auth.js +1 -1
- package/clis/boss/batchgreet.js +1 -1
- package/clis/boss/bossinfo.js +1 -1
- package/clis/boss/chatlist.js +1 -1
- package/clis/boss/chatmsg.js +1 -1
- package/clis/boss/cities.js +1 -1
- package/clis/boss/detail.js +1 -1
- package/clis/boss/exchange.js +1 -1
- package/clis/boss/greet.js +1 -1
- package/clis/boss/interviews.js +1 -1
- package/clis/boss/invite.js +1 -1
- package/clis/boss/joblist.js +1 -1
- package/clis/boss/mark.js +1 -1
- package/clis/boss/me.js +2 -2
- package/clis/boss/recommend.js +1 -1
- package/clis/boss/resumedelete.js +1 -1
- package/clis/boss/resumelist.js +1 -1
- package/clis/boss/resumeupload.js +11 -11
- package/clis/boss/search.js +1 -1
- package/clis/boss/send.js +1 -1
- package/clis/boss/sendresume.js +1 -1
- package/clis/boss/stats.js +1 -1
- package/clis/boss/unread.js +1 -1
- package/clis/boss/utils.js +13 -13
- package/clis/chaoxing/assignments.js +1 -1
- package/clis/chaoxing/exams.js +1 -1
- package/clis/chaoxing/utils.js +9 -9
- package/clis/chatgpt/ask.js +1 -1
- package/clis/chatgpt/auth.js +2 -2
- package/clis/chatgpt/detail.js +1 -1
- package/clis/chatgpt/image.js +1 -1
- package/clis/chatgpt/read.js +1 -1
- package/clis/chatgpt/send.js +1 -1
- package/clis/chatgpt/utils.js +59 -59
- package/clis/chatgpt-app/ask.js +1 -1
- package/clis/chatgpt-app/send.js +1 -1
- package/clis/chatwise/model.js +6 -6
- package/clis/chess/analyze.js +1 -1
- package/clis/chess/game.js +1 -1
- package/clis/chess/games.js +1 -1
- package/clis/chess/stats.js +1 -1
- package/clis/chess/utils.js +1 -1
- package/clis/claude/ask.js +2 -2
- package/clis/claude/detail.js +1 -1
- package/clis/claude/new.js +1 -1
- package/clis/claude/read.js +1 -1
- package/clis/claude/send.js +1 -1
- package/clis/claude/utils.js +23 -23
- package/clis/cnblogs/article.js +1 -1
- package/clis/cnblogs/login.js +1 -1
- package/clis/cnblogs/stats.js +7 -7
- package/clis/cnblogs/whoami.js +1 -1
- package/clis/codex/_actions.js +3 -3
- package/clis/codex/archive.js +1 -1
- package/clis/codex/ask.js +6 -6
- package/clis/codex/model.js +8 -8
- package/clis/codex/pin.js +1 -1
- package/clis/codex/rename.js +4 -4
- package/clis/codex/send.js +3 -3
- package/clis/codex/sidebar.js +1 -1
- package/clis/coingecko/categories.js +1 -1
- package/clis/coingecko/coin.js +1 -1
- package/clis/coingecko/derivatives.js +1 -1
- package/clis/coingecko/exchanges.js +1 -1
- package/clis/coingecko/global.js +1 -1
- package/clis/coingecko/trending.js +1 -1
- package/clis/confluence/search.js +1 -1
- package/clis/coupang/product.js +3 -3
- package/clis/coupang/utils.js +1 -1
- package/clis/crates/crate.js +1 -1
- package/clis/crates/search.js +1 -1
- package/clis/crates/utils.js +1 -1
- package/clis/csdn/article.js +13 -13
- package/clis/csdn/columns.js +1 -1
- package/clis/csdn/login.js +1 -1
- package/clis/csdn/stats.js +4 -4
- package/clis/csdn/whoami.js +1 -1
- package/clis/cto51/article.js +1 -1
- package/clis/cto51/whoami.js +1 -1
- package/clis/ctrip/flight.js +2 -2
- package/clis/ctrip/hotel-search.js +3 -3
- package/clis/ctrip/hotel-suggest.js +1 -1
- package/clis/ctrip/search.js +1 -1
- package/clis/ctrip/utils.js +6 -6
- package/clis/cursor/ask.js +5 -5
- package/clis/cursor/composer.js +2 -2
- package/clis/cursor/model.js +4 -4
- package/clis/cursor/send.js +2 -2
- package/clis/dblp/author.js +1 -1
- package/clis/dblp/paper.js +1 -1
- package/clis/dblp/search.js +1 -1
- package/clis/dblp/utils.js +1 -1
- package/clis/dblp/venue.js +1 -1
- package/clis/deepseek/ask.js +1 -1
- package/clis/deepseek/auth.js +2 -2
- package/clis/deepseek/detail.js +1 -1
- package/clis/deepseek/new.js +1 -1
- package/clis/deepseek/read.js +1 -1
- package/clis/deepseek/send.js +7 -7
- package/clis/deepseek/utils.js +25 -25
- package/clis/defillama/protocol.js +1 -1
- package/clis/defillama/protocols.js +1 -1
- package/clis/defillama/utils.js +1 -1
- package/clis/devto/auth.js +2 -2
- package/clis/devto/latest.js +1 -1
- package/clis/devto/publish.js +5 -5
- package/clis/devto/read.js +2 -2
- package/clis/devto/stats.js +3 -3
- package/clis/dianping/auth.js +2 -2
- package/clis/dianping/cityResolver.js +2 -2
- package/clis/dianping/search.js +1 -1
- package/clis/dianping/shop.js +1 -1
- package/clis/dianping/utils.js +1 -1
- package/clis/discord-app/delete.js +3 -3
- package/clis/discord-app/read.js +1 -1
- package/clis/discord-app/thread-read.js +1 -1
- package/clis/discord-web/auth.js +2 -2
- package/clis/discord-web/send.js +5 -5
- package/clis/dockerhub/image.js +1 -1
- package/clis/dockerhub/search.js +1 -1
- package/clis/dockerhub/utils.js +1 -1
- package/clis/dongchedi/koubei.js +1 -1
- package/clis/dongchedi/models.js +1 -1
- package/clis/dongchedi/score.js +1 -1
- package/clis/dongchedi/search.js +1 -1
- package/clis/dongchedi/series.js +1 -1
- package/clis/dongchedi/specs.js +1 -1
- package/clis/dongchedi/utils.js +1 -1
- package/clis/douban/article.js +3 -3
- package/clis/douban/auth.js +2 -2
- package/clis/douban/download.js +1 -1
- package/clis/douban/utils.js +23 -23
- package/clis/doubao/auth.js +3 -3
- package/clis/doubao/utils.js +39 -39
- package/clis/doubao-app/ask.js +1 -1
- package/clis/doubao-app/utils.js +4 -4
- package/clis/douyin/_shared/browser-fetch.js +7 -7
- package/clis/douyin/_shared/draft-cache.js +1 -1
- package/clis/douyin/_shared/imagex-upload.js +1 -1
- package/clis/douyin/_shared/sts2.js +1 -1
- package/clis/douyin/_shared/text-extra.js +1 -1
- package/clis/douyin/_shared/tos-upload.js +4 -4
- package/clis/douyin/_shared/transcode.js +1 -1
- package/clis/douyin/_shared/vod-upload.js +4 -4
- package/clis/douyin/draft.js +18 -18
- package/clis/douyin/drafts.js +1 -1
- package/clis/douyin/publish-image.js +12 -12
- package/clis/douyin/publish.js +9 -9
- package/clis/douyin/search.js +3 -3
- package/clis/douyin/videos.js +1 -1
- package/clis/eastmoney/_secid.js +1 -1
- package/clis/eastmoney/announcement.js +1 -1
- package/clis/eastmoney/article.js +1 -1
- package/clis/eastmoney/convertible.js +1 -1
- package/clis/eastmoney/etf.js +1 -1
- package/clis/eastmoney/holders.js +1 -1
- package/clis/eastmoney/index-board.js +1 -1
- package/clis/eastmoney/kline.js +1 -1
- package/clis/eastmoney/kuaixun.js +1 -1
- package/clis/eastmoney/longhu.js +1 -1
- package/clis/eastmoney/money-flow.js +1 -1
- package/clis/eastmoney/northbound.js +1 -1
- package/clis/eastmoney/quote.js +1 -1
- package/clis/eastmoney/rank.js +1 -1
- package/clis/eastmoney/sectors.js +1 -1
- package/clis/endoflife/product.js +1 -1
- package/clis/endoflife/utils.js +1 -1
- package/clis/facebook/comment.js +8 -8
- package/clis/facebook/feed.js +4 -4
- package/clis/facebook/like.js +5 -5
- package/clis/facebook/notifications.js +3 -3
- package/clis/facebook/post.js +11 -11
- package/clis/facebook/search.js +3 -3
- package/clis/flathub/app.js +1 -1
- package/clis/flathub/search.js +1 -1
- package/clis/flathub/utils.js +1 -1
- package/clis/flomo/memos.js +1 -1
- package/clis/gemini/deep-research-result.js +4 -4
- package/clis/gemini/deep-research.js +1 -1
- package/clis/gemini/detail.js +1 -1
- package/clis/gemini/history.js +1 -1
- package/clis/gemini/image.js +2 -2
- package/clis/gemini/status.js +1 -1
- package/clis/gemini/utils.js +43 -43
- package/clis/geogebra/hexagon.js +1 -1
- package/clis/geogebra/info.js +3 -3
- package/clis/geogebra/triangle.js +1 -1
- package/clis/geogebra/utils.js +11 -11
- package/clis/ghost/login.js +1 -1
- package/clis/ghost/shared.js +2 -2
- package/clis/gitee/auth.js +2 -2
- package/clis/github-trending/repos.js +1 -1
- package/clis/google/news.js +1 -1
- package/clis/google/search.js +2 -2
- package/clis/google/suggest.js +1 -1
- package/clis/google/trends.js +1 -1
- package/clis/google/utils.js +1 -1
- package/clis/goproxy/module.js +1 -1
- package/clis/goproxy/utils.js +1 -1
- package/clis/goproxy/versions.js +1 -1
- package/clis/gov-policy/recent.js +2 -2
- package/clis/gov-policy/search.js +2 -2
- package/clis/grok/ask.js +1 -1
- package/clis/grok/detail.js +1 -1
- package/clis/grok/image.js +8 -8
- package/clis/grok/pin.js +1 -1
- package/clis/grok/send.js +1 -1
- package/clis/grok/status.js +1 -1
- package/clis/grok/utils.js +21 -21
- package/clis/guazi/browse.js +1 -1
- package/clis/guazi/car.js +1 -1
- package/clis/guazi/utils.js +1 -1
- package/clis/hackernews/auth.js +2 -2
- package/clis/hackernews/comment.js +8 -8
- package/clis/hackernews/read.js +7 -7
- package/clis/hackernews/submit.js +7 -7
- package/clis/hashnode/auth.js +3 -3
- package/clis/hashnode/publish.js +14 -14
- package/clis/hf/auth.js +2 -2
- package/clis/hf/models.js +1 -1
- package/clis/hf/paper.js +1 -1
- package/clis/hf/spaces.js +1 -1
- package/clis/hf/top.js +1 -1
- package/clis/homebrew/cask.js +1 -1
- package/clis/homebrew/formula.js +1 -1
- package/clis/homebrew/popular.js +1 -1
- package/clis/homebrew/utils.js +1 -1
- package/clis/huodongxing/events.js +1 -1
- package/clis/hupu/detail.js +4 -4
- package/clis/hupu/hot.js +3 -3
- package/clis/hupu/reply.js +1 -1
- package/clis/hupu/search.js +1 -1
- package/clis/hupu/unlike.js +1 -1
- package/clis/hupu/utils.js +10 -10
- package/clis/imdb/person.js +2 -2
- package/clis/imdb/reviews.js +3 -3
- package/clis/imdb/search.js +2 -2
- package/clis/imdb/title.js +1 -1
- package/clis/imdb/top.js +1 -1
- package/clis/imdb/trending.js +1 -1
- package/clis/imdb/utils.js +13 -13
- package/clis/imooc/article.js +6 -6
- package/clis/imooc/login.js +1 -1
- package/clis/imooc/whoami.js +1 -1
- package/clis/indeed/job.js +2 -2
- package/clis/indeed/search.js +2 -2
- package/clis/indeed/utils.js +1 -1
- package/clis/infoq/article.js +2 -2
- package/clis/infoq/login.js +1 -1
- package/clis/infoq/whoami.js +1 -1
- package/clis/instagram/_shared/private-publish.js +4 -4
- package/clis/instagram/_shared/protocol-capture.js +9 -9
- package/clis/instagram/detail.js +3 -3
- package/clis/instagram/post.js +25 -25
- package/clis/instagram/reel.js +18 -18
- package/clis/instagram/story.js +4 -4
- package/clis/instagram/user.js +2 -2
- package/clis/jd/item.js +65 -65
- package/clis/jianshu/article.js +1 -1
- package/clis/jianshu/login.js +1 -1
- package/clis/jianshu/notebooks.js +1 -1
- package/clis/jianshu/whoami.js +1 -1
- package/clis/jianyu/search.js +6 -6
- package/clis/jianyu/shared/procurement-contract.js +1 -1
- package/clis/jike/api.js +6 -6
- package/clis/jike/auth.js +3 -3
- package/clis/jike/comment.js +1 -1
- package/clis/jike/create.js +6 -6
- package/clis/jike/feed.js +3 -3
- package/clis/jike/like.js +1 -1
- package/clis/jike/notifications.js +3 -3
- package/clis/jike/repost.js +13 -13
- package/clis/jike/search.js +3 -3
- package/clis/jimeng/auth.js +2 -2
- package/clis/jimeng/generate.js +10 -10
- package/clis/jira/shared.js +1 -1
- package/clis/juejin/article.js +4 -4
- package/clis/juejin/categories.js +1 -1
- package/clis/juejin/hot.js +1 -1
- package/clis/juejin/login.js +1 -1
- package/clis/juejin/recommend.js +1 -1
- package/clis/juejin/stats.js +3 -3
- package/clis/juejin/tags.js +1 -1
- package/clis/juejin/utils.js +1 -1
- package/clis/juejin/whoami.js +1 -1
- package/clis/ke/utils.js +4 -4
- package/clis/kimi/_utils.js +7 -7
- package/clis/kimi/audit-extras.js +14 -14
- package/clis/kimi/auth.js +3 -3
- package/clis/kimi/chat.js +15 -15
- package/clis/kimi/storage.js +5 -5
- package/clis/kimi/ui.js +13 -13
- package/clis/kimi/usage.js +3 -3
- package/clis/kuaishou/auth.js +1 -1
- package/clis/kuaishou/publish.js +6 -6
- package/clis/lesswrong/_helpers.js +5 -5
- package/clis/lesswrong/comments.js +5 -5
- package/clis/lichess/top.js +1 -1
- package/clis/lichess/user.js +1 -1
- package/clis/lichess/utils.js +1 -1
- package/clis/linkedin/comment.js +1 -1
- package/clis/linkedin/connect.js +11 -11
- package/clis/linkedin/create.js +5 -5
- package/clis/linkedin/follow.js +1 -1
- package/clis/linkedin/inbox.js +1 -1
- package/clis/linkedin/job-detail.js +3 -3
- package/clis/linkedin/like.js +1 -1
- package/clis/linkedin/notifications.js +1 -1
- package/clis/linkedin/people-search.js +1 -1
- package/clis/linkedin/post-comments.js +1 -1
- package/clis/linkedin/post-detail.js +1 -1
- package/clis/linkedin/profile-analytics.js +1 -1
- package/clis/linkedin/profile-api.js +13 -13
- package/clis/linkedin/profile-experience.js +1 -1
- package/clis/linkedin/profile-projects.js +1 -1
- package/clis/linkedin/profile-read.js +3 -3
- package/clis/linkedin/reply.js +1 -1
- package/clis/linkedin/repost.js +1 -1
- package/clis/linkedin/safe-send.js +8 -8
- package/clis/linkedin/salesnav-inbox.js +5 -5
- package/clis/linkedin/salesnav-message.js +3 -3
- package/clis/linkedin/salesnav-search.js +4 -4
- package/clis/linkedin/salesnav-thread.js +1 -1
- package/clis/linkedin/search-api.js +3 -3
- package/clis/linkedin/search.js +8 -8
- package/clis/linkedin/social-api.js +31 -31
- package/clis/linkedin/timeline.js +3 -3
- package/clis/linkedin-learning/search.js +2 -2
- package/clis/linkedin-learning/trending.js +2 -2
- package/clis/linux-do/feed.js +4 -4
- package/clis/linux-do/topic-content.js +8 -8
- package/clis/lobsters/domain.js +1 -1
- package/clis/lobsters/read.js +7 -7
- package/clis/maimai/auth.js +2 -2
- package/clis/maimai/search-talents.js +4 -4
- package/clis/manus/_utils.js +1 -1
- package/clis/mastodon/login.js +1 -1
- package/clis/mastodon/post.js +1 -1
- package/clis/mastodon/shared.js +12 -12
- package/clis/mastodon/whoami.js +1 -1
- package/clis/maven/artifact.js +1 -1
- package/clis/maven/search.js +1 -1
- package/clis/maven/utils.js +1 -1
- package/clis/mdn/search.js +1 -1
- package/clis/medium/article.js +5 -5
- package/clis/medium/login.js +1 -1
- package/clis/medium/stats.js +3 -3
- package/clis/medium/tag.js +1 -1
- package/clis/medium/whoami.js +1 -1
- package/clis/mubu/notes.js +1 -1
- package/clis/mubu/utils.js +15 -15
- package/clis/note/auth.js +2 -2
- package/clis/note/note-utils.js +2 -2
- package/clis/note/publish.js +8 -8
- package/clis/notebooklm/add-source.js +8 -8
- package/clis/notebooklm/create.js +1 -1
- package/clis/notebooklm/generate-slides.js +1 -1
- package/clis/notebooklm/notes-get.js +1 -1
- package/clis/notebooklm/rpc.js +8 -8
- package/clis/notebooklm/source-fulltext.js +1 -1
- package/clis/notebooklm/utils.js +10 -10
- package/clis/nowcoder/auth.js +2 -2
- package/clis/nowcoder/comment.js +1 -1
- package/clis/nowcoder/comments.js +1 -1
- package/clis/nowcoder/dm-list.js +1 -1
- package/clis/nowcoder/dm-read.js +1 -1
- package/clis/nowcoder/dm-send.js +1 -1
- package/clis/nowcoder/drafts.js +1 -1
- package/clis/nowcoder/inbox.js +1 -1
- package/clis/nowcoder/like.js +1 -1
- package/clis/nowcoder/my.js +1 -1
- package/clis/nowcoder/post.js +1 -1
- package/clis/nowcoder/utils.js +13 -13
- package/clis/npm/downloads.js +1 -1
- package/clis/npm/package.js +1 -1
- package/clis/npm/search.js +1 -1
- package/clis/npm/utils.js +1 -1
- package/clis/nuget/package.js +1 -1
- package/clis/nuget/search.js +1 -1
- package/clis/nuget/utils.js +1 -1
- package/clis/nvd/cve.js +1 -1
- package/clis/oeis/search.js +1 -1
- package/clis/oeis/sequence.js +1 -1
- package/clis/oeis/utils.js +1 -1
- package/clis/ones/common.js +6 -6
- package/clis/ones/enrich-tasks.js +1 -1
- package/clis/ones/my-tasks.js +1 -1
- package/clis/ones/resolve-labels.js +1 -1
- package/clis/ones/task-helpers.js +1 -1
- package/clis/ones/task.js +1 -1
- package/clis/ones/worklog.js +7 -7
- package/clis/openalex/search.js +1 -1
- package/clis/openalex/utils.js +1 -1
- package/clis/openalex/work.js +1 -1
- package/clis/openfda/drug-label.js +1 -1
- package/clis/openfda/food-recall.js +1 -1
- package/clis/openfda/utils.js +1 -1
- package/clis/openreview/author.js +1 -1
- package/clis/openreview/paper.js +1 -1
- package/clis/openreview/reviews.js +3 -3
- package/clis/openreview/search.js +1 -1
- package/clis/openreview/utils.js +1 -1
- package/clis/openreview/venue.js +1 -1
- package/clis/oschina/article.js +1 -1
- package/clis/oschina/catalogs.js +1 -1
- package/clis/oschina/login.js +1 -1
- package/clis/oschina/stats.js +6 -6
- package/clis/oschina/whoami.js +1 -1
- package/clis/osv/query.js +1 -1
- package/clis/osv/utils.js +1 -1
- package/clis/osv/vulnerability.js +1 -1
- package/clis/packagist/package.js +1 -1
- package/clis/packagist/search.js +1 -1
- package/clis/packagist/utils.js +1 -1
- package/clis/pinterest/api.js +1 -1
- package/clis/pinterest/auth.js +1 -1
- package/clis/pinterest/boards.js +1 -1
- package/clis/pinterest/client.js +6 -6
- package/clis/pinterest/publish.js +5 -5
- package/clis/pixiv/auth.js +2 -2
- package/clis/pixiv/download.js +1 -1
- package/clis/pixiv/illusts.js +1 -1
- package/clis/pixiv/search.js +1 -1
- package/clis/pixiv/utils.js +3 -3
- package/clis/powerchina/auth.js +2 -2
- package/clis/powerchina/search.js +1 -1
- package/clis/producthunt/browse.js +2 -2
- package/clis/producthunt/hot.js +2 -2
- package/clis/producthunt/posts.js +1 -1
- package/clis/producthunt/today.js +1 -1
- package/clis/producthunt/utils.js +1 -1
- package/clis/pypi/downloads.js +1 -1
- package/clis/pypi/package.js +1 -1
- package/clis/pypi/utils.js +1 -1
- package/clis/qiita/auth.js +1 -1
- package/clis/qiita/gql.js +6 -6
- package/clis/qiita/publish.js +4 -4
- package/clis/qiita/stats.js +4 -4
- package/clis/qoder/_utils.js +16 -16
- package/clis/qoder/composer.js +1 -1
- package/clis/qoder/quest.js +1 -1
- package/clis/qoder/ui.js +14 -14
- package/clis/quark/auth.js +2 -2
- package/clis/quark/utils.js +2 -2
- package/clis/quora/answer-comments.js +3 -3
- package/clis/quora/create-answer.js +4 -4
- package/clis/quora/create-question.js +3 -3
- package/clis/quora/shared.js +17 -17
- package/clis/quora/whoami.js +1 -1
- package/clis/qwen/ask.js +1 -1
- package/clis/qwen/auth.js +3 -3
- package/clis/qwen/detail.js +1 -1
- package/clis/qwen/image.js +5 -5
- package/clis/qwen/status.js +1 -1
- package/clis/qwen/utils.js +16 -16
- package/clis/reddit/home.js +3 -3
- package/clis/reddit/read.js +10 -10
- package/clis/reddit/reply.js +4 -4
- package/clis/reddit/submit.js +11 -11
- package/clis/reddit/subreddit-info.js +3 -3
- package/clis/reddit/subscribed.js +4 -4
- package/clis/reddit/whoami.js +2 -2
- package/clis/rednote/comments.js +1 -1
- package/clis/rednote/download.js +1 -1
- package/clis/rednote/feed.js +1 -1
- package/clis/rednote/note.js +1 -1
- package/clis/rednote/notifications.js +2 -2
- package/clis/rednote/search.js +2 -2
- package/clis/rest-countries/country.js +1 -1
- package/clis/rest-countries/region.js +1 -1
- package/clis/rest-countries/utils.js +1 -1
- package/clis/reuters/article-detail.js +1 -1
- package/clis/reuters/auth.js +3 -3
- package/clis/reuters/search.js +1 -1
- package/clis/reuters/utils.js +4 -4
- package/clis/rfc/rfc.js +1 -1
- package/clis/rfc/utils.js +1 -1
- package/clis/rubygems/gem.js +1 -1
- package/clis/rubygems/search.js +1 -1
- package/clis/rubygems/utils.js +1 -1
- package/clis/segmentfault/article.js +3 -3
- package/clis/segmentfault/channels.js +1 -1
- package/clis/segmentfault/login.js +1 -1
- package/clis/segmentfault/stats.js +4 -4
- package/clis/segmentfault/tags.js +1 -1
- package/clis/segmentfault/whoami.js +1 -1
- package/clis/semanticscholar/citations.js +1 -1
- package/clis/semanticscholar/paper.js +1 -1
- package/clis/semanticscholar/recommendations.js +1 -1
- package/clis/semanticscholar/search.js +1 -1
- package/clis/semanticscholar/utils.js +1 -1
- package/clis/sinafinance/news.js +1 -1
- package/clis/sinafinance/stock-rank.js +1 -1
- package/clis/sinafinance/stock.js +1 -1
- package/clis/slock/attachment-download.js +1 -1
- package/clis/slock/attachment-upload.js +7 -7
- package/clis/slock/attachment-url.js +1 -1
- package/clis/slock/auth-verify.js +1 -1
- package/clis/slock/bookmark-add.js +1 -1
- package/clis/slock/bookmark-remove.js +1 -1
- package/clis/slock/channel-action.js +1 -1
- package/clis/slock/channel-create.js +1 -1
- package/clis/slock/channel-files.js +1 -1
- package/clis/slock/channel-list.js +1 -1
- package/clis/slock/channel-mark.js +1 -1
- package/clis/slock/channel-members.js +1 -1
- package/clis/slock/channel-unarchive.js +1 -1
- package/clis/slock/dm-list.js +1 -1
- package/clis/slock/errors.js +1 -1
- package/clis/slock/in-page.js +28 -28
- package/clis/slock/inbox-done.js +5 -5
- package/clis/slock/inbox.js +1 -1
- package/clis/slock/message-read.js +22 -22
- package/clis/slock/message-search.js +10 -10
- package/clis/slock/message-send.js +25 -25
- package/clis/slock/reaction-add.js +1 -1
- package/clis/slock/reaction-remove.js +1 -1
- package/clis/slock/resolve.js +1 -1
- package/clis/slock/server-list.js +2 -2
- package/clis/slock/task-claim.js +4 -4
- package/clis/slock/task-convert.js +13 -13
- package/clis/slock/task-create.js +1 -1
- package/clis/slock/task-delete.js +5 -5
- package/clis/slock/task-get.js +5 -5
- package/clis/slock/task-list-server.js +4 -4
- package/clis/slock/task-list.js +5 -5
- package/clis/slock/task-status.js +3 -3
- package/clis/slock/task-unclaim.js +3 -3
- package/clis/slock/thread-follow.js +1 -1
- package/clis/slock/thread-state.js +1 -1
- package/clis/slock/unread-summary.js +5 -5
- package/clis/slock/whoami.js +1 -1
- package/clis/smzdm/search.js +3 -3
- package/clis/sohu/article.js +1 -1
- package/clis/sohu/attributes.js +1 -1
- package/clis/sohu/categories.js +1 -1
- package/clis/sohu/channels.js +1 -1
- package/clis/sohu/columns.js +1 -1
- package/clis/sohu/login.js +1 -1
- package/clis/sohu/stats.js +3 -3
- package/clis/sohu/topics.js +1 -1
- package/clis/sohu/whoami.js +1 -1
- package/clis/spotify/spotify.js +1 -1
- package/clis/stackoverflow/read.js +6 -6
- package/clis/stackoverflow/related.js +1 -1
- package/clis/stackoverflow/tag.js +1 -1
- package/clis/stackoverflow/user.js +1 -1
- package/clis/stackoverflow/utils.js +1 -1
- package/clis/steam/app.js +1 -1
- package/clis/steam/search.js +1 -1
- package/clis/steam/utils.js +1 -1
- package/clis/substack/auth.js +2 -2
- package/clis/substack/post-utils.js +2 -2
- package/clis/substack/publish.js +5 -5
- package/clis/suno/auth.js +2 -2
- package/clis/suno/download.js +5 -5
- package/clis/suno/generate.js +3 -3
- package/clis/suno/list.js +1 -1
- package/clis/suno/status.js +1 -1
- package/clis/suno/utils.js +29 -29
- package/clis/telegram/send.js +7 -7
- package/clis/telegram/shared.js +2 -2
- package/clis/telegram/whoami.js +1 -1
- package/clis/test-utils.js +1 -1
- package/clis/threads/post.js +23 -23
- package/clis/threads/shared.js +3 -3
- package/clis/threads/whoami.js +1 -1
- package/clis/tieba/hot.js +3 -3
- package/clis/tieba/posts.js +1 -1
- package/clis/tieba/read.js +2 -2
- package/clis/tieba/search.js +3 -3
- package/clis/tieba/utils.js +1 -1
- package/clis/tiktok/comment.js +2 -2
- package/clis/tiktok/creator-videos.js +3 -3
- package/clis/tiktok/explore.js +3 -3
- package/clis/tiktok/follow.js +8 -8
- package/clis/tiktok/following.js +4 -4
- package/clis/tiktok/friends.js +7 -7
- package/clis/tiktok/live.js +3 -3
- package/clis/tiktok/notifications.js +6 -6
- package/clis/tiktok/publish.js +16 -16
- package/clis/tiktok/unfollow.js +4 -4
- package/clis/tiktok/user.js +2 -2
- package/clis/tiktok/utils.js +1 -1
- package/clis/toutiao/article.js +1 -1
- package/clis/toutiao/articles.js +2 -2
- package/clis/toutiao/auth.js +2 -2
- package/clis/toutiao/hot.js +1 -1
- package/clis/toutiao/recommend.js +1 -1
- package/clis/toutiao/utils.js +2 -2
- package/clis/trae-solo/_actions.js +4 -4
- package/clis/trae-solo/_fs.js +5 -5
- package/clis/trae-solo/_state.js +2 -2
- package/clis/trae-solo/automation.js +4 -4
- package/clis/trae-solo/mode.js +4 -4
- package/clis/trae-solo/model.js +4 -4
- package/clis/trae-solo/renderer-storage.js +4 -4
- package/clis/trae-solo/settings.js +1 -1
- package/clis/trae-solo/skill-fs.js +1 -1
- package/clis/trae-solo/skill.js +12 -12
- package/clis/trae-solo/state-fs.js +2 -2
- package/clis/trae-solo/task-fs.js +5 -5
- package/clis/trae-solo/workspaces-fs.js +1 -1
- package/clis/tumblr/auth.js +2 -2
- package/clis/tumblr/publish.js +3 -3
- package/clis/tvmaze/search.js +1 -1
- package/clis/tvmaze/show.js +1 -1
- package/clis/tvmaze/utils.js +1 -1
- package/clis/twitter/accept.js +7 -7
- package/clis/twitter/article.js +7 -7
- package/clis/twitter/bookmark-folder.js +3 -3
- package/clis/twitter/bookmark-folders.js +3 -3
- package/clis/twitter/bookmarks.js +4 -4
- package/clis/twitter/delete.js +5 -5
- package/clis/twitter/device-follow.js +3 -3
- package/clis/twitter/dm-list.js +1 -1
- package/clis/twitter/dm-read.js +1 -1
- package/clis/twitter/dm-send.js +5 -5
- package/clis/twitter/dm-shared.js +3 -3
- package/clis/twitter/download.js +6 -6
- package/clis/twitter/followers.js +5 -5
- package/clis/twitter/following.js +2 -2
- package/clis/twitter/like.js +3 -3
- package/clis/twitter/likes.js +8 -8
- package/clis/twitter/list-add-core.js +9 -9
- package/clis/twitter/list-create.js +5 -5
- package/clis/twitter/list-remove-core.js +9 -9
- package/clis/twitter/list-tweets.js +7 -7
- package/clis/twitter/lists.js +6 -6
- package/clis/twitter/notifications.js +2 -2
- package/clis/twitter/post.js +24 -24
- package/clis/twitter/profile.js +7 -7
- package/clis/twitter/quote.js +7 -7
- package/clis/twitter/reply-dm.js +7 -7
- package/clis/twitter/reply.js +12 -12
- package/clis/twitter/retweet.js +3 -3
- package/clis/twitter/scheduled-delete.js +3 -3
- package/clis/twitter/scheduled-list.js +2 -2
- package/clis/twitter/scheduled-utils.js +3 -3
- package/clis/twitter/search.js +5 -5
- package/clis/twitter/shared.js +6 -6
- package/clis/twitter/thread.js +4 -4
- package/clis/twitter/timeline.js +3 -3
- package/clis/twitter/trending.js +2 -2
- package/clis/twitter/tweets.js +11 -11
- package/clis/twitter/unlike.js +3 -3
- package/clis/twitter/unretweet.js +3 -3
- package/clis/twitter/utils.js +6 -6
- package/clis/upwork/detail.js +2 -2
- package/clis/upwork/feed.js +2 -2
- package/clis/upwork/search.js +2 -2
- package/clis/upwork/utils.js +1 -1
- package/clis/v2ex/auth.js +2 -2
- package/clis/v2ex/daily.js +3 -3
- package/clis/v2ex/me.js +2 -2
- package/clis/v2ex/notifications.js +2 -2
- package/clis/vk/post.js +1 -1
- package/clis/vk/shared.js +2 -2
- package/clis/vk/whoami.js +1 -1
- package/clis/web/read.js +8 -8
- package/clis/wechat-channels/auth.js +2 -2
- package/clis/wechat-channels/publish.js +30 -30
- package/clis/weibo/article.js +1 -1
- package/clis/weibo/auth.js +3 -3
- package/clis/weibo/comments.js +1 -1
- package/clis/weibo/delete.js +2 -2
- package/clis/weibo/feed.js +3 -3
- package/clis/weibo/hot.js +1 -1
- package/clis/weibo/publish.js +10 -10
- package/clis/weibo/search.js +2 -2
- package/clis/weibo/user-posts.js +3 -3
- package/clis/weibo/user.js +2 -2
- package/clis/weibo/utils.js +3 -3
- package/clis/weixin/article.js +1 -1
- package/clis/weixin/create-draft.js +26 -26
- package/clis/weixin/download.js +2 -2
- package/clis/weixin/login.js +1 -1
- package/clis/weixin/search.js +2 -2
- package/clis/weixin/stats.js +3 -3
- package/clis/weixin/whoami.js +1 -1
- package/clis/weread/ai-outline.js +2 -2
- package/clis/weread/book-search.js +2 -2
- package/clis/weread/book.js +2 -2
- package/clis/weread/notebooks.js +1 -1
- package/clis/weread/search.js +1 -1
- package/clis/weread/shelf.js +1 -1
- package/clis/weread/utils.js +6 -6
- package/clis/weread-official/book.js +1 -1
- package/clis/weread-official/discover.js +1 -1
- package/clis/weread-official/list-apis.js +1 -1
- package/clis/weread-official/notes.js +1 -1
- package/clis/weread-official/readdata.js +1 -1
- package/clis/weread-official/review.js +1 -1
- package/clis/weread-official/search.js +1 -1
- package/clis/weread-official/shelf.js +1 -1
- package/clis/weread-official/utils.js +1 -1
- package/clis/wikidata/entity.js +1 -1
- package/clis/wikidata/search.js +1 -1
- package/clis/wikidata/utils.js +1 -1
- package/clis/wikipedia/page.js +1 -1
- package/clis/wikipedia/trending.js +1 -1
- package/clis/wikipedia/utils.js +1 -1
- package/clis/wordpress/login.js +1 -1
- package/clis/wordpress/publish.js +1 -1
- package/clis/wordpress/shared.js +3 -3
- package/clis/wordpress/whoami.js +1 -1
- package/clis/woshipm/article.js +1 -1
- package/clis/woshipm/login.js +1 -1
- package/clis/woshipm/stats.js +4 -4
- package/clis/woshipm/whoami.js +1 -1
- package/clis/wttr/current.js +1 -1
- package/clis/wttr/forecast.js +1 -1
- package/clis/wttr/utils.js +1 -1
- package/clis/xianyu/collect.js +1 -1
- package/clis/xianyu/inbox.js +1 -1
- package/clis/xianyu/item-stats.js +2 -2
- package/clis/xianyu/location.js +1 -1
- package/clis/xianyu/manage.js +1 -1
- package/clis/xianyu/messages.js +1 -1
- package/clis/xianyu/mtop.js +5 -5
- package/clis/xianyu/order.js +1 -1
- package/clis/xianyu/promote-stats.js +2 -2
- package/clis/xianyu/publish.js +17 -17
- package/clis/xianyu/rate.js +1 -1
- package/clis/xianyu/reply.js +1 -1
- package/clis/xianyu/search.js +8 -8
- package/clis/xianyu/seller-data.js +1 -1
- package/clis/xianyu/seller-list.js +1 -1
- package/clis/xianyu/user.js +1 -1
- package/clis/xiaoe/catalog.js +2 -2
- package/clis/xiaoe/content.js +2 -2
- package/clis/xiaoe/courses.js +2 -2
- package/clis/xiaohongshu/ask.js +6 -6
- package/clis/xiaohongshu/comments.js +6 -6
- package/clis/xiaohongshu/creator-note-detail.js +7 -7
- package/clis/xiaohongshu/creator-notes-summary.js +1 -1
- package/clis/xiaohongshu/creator-notes.js +13 -13
- package/clis/xiaohongshu/creator-profile.js +2 -2
- package/clis/xiaohongshu/creator-stats.js +2 -2
- package/clis/xiaohongshu/delete-note.js +7 -7
- package/clis/xiaohongshu/download.js +4 -4
- package/clis/xiaohongshu/feed.js +2 -2
- package/clis/xiaohongshu/follow.js +3 -3
- package/clis/xiaohongshu/human.js +3 -3
- package/clis/xiaohongshu/note-helpers.js +1 -1
- package/clis/xiaohongshu/note.js +2 -2
- package/clis/xiaohongshu/notifications.js +1 -1
- package/clis/xiaohongshu/publish-video.js +8 -8
- package/clis/xiaohongshu/publish.js +59 -59
- package/clis/xiaohongshu/search.js +8 -8
- package/clis/xiaohongshu/unfollow.js +4 -4
- package/clis/xiaohongshu/user-helpers.js +1 -1
- package/clis/xiaohongshu/user.js +2 -2
- package/clis/xiaoyuzhou/auth.js +3 -3
- package/clis/xiaoyuzhou/download.js +1 -1
- package/clis/xiaoyuzhou/utils.js +1 -1
- package/clis/xueqiu/article.js +4 -4
- package/clis/xueqiu/comments.js +4 -4
- package/clis/xueqiu/danjuan-utils.js +4 -4
- package/clis/xueqiu/earnings-date.js +1 -1
- package/clis/xueqiu/events.js +3 -3
- package/clis/xueqiu/hashtags.js +3 -3
- package/clis/xueqiu/stocks.js +3 -3
- package/clis/xueqiu/users.js +3 -3
- package/clis/xueqiu/utils.js +3 -3
- package/clis/yahoo-finance/quote.js +1 -1
- package/clis/yollomi/background.js +1 -1
- package/clis/yollomi/edit.js +1 -1
- package/clis/yollomi/face-swap.js +1 -1
- package/clis/yollomi/generate.js +1 -1
- package/clis/yollomi/object-remover.js +1 -1
- package/clis/yollomi/remove-bg.js +1 -1
- package/clis/yollomi/restore.js +1 -1
- package/clis/yollomi/try-on.js +1 -1
- package/clis/yollomi/upload.js +4 -4
- package/clis/yollomi/upscale.js +1 -1
- package/clis/yollomi/utils.js +4 -4
- package/clis/yollomi/video.js +1 -1
- package/clis/youtube/channel.js +4 -4
- package/clis/youtube/feed.js +2 -2
- package/clis/youtube/like.js +5 -5
- package/clis/youtube/playlist.js +7 -7
- package/clis/youtube/publish.js +11 -11
- package/clis/youtube/search.js +3 -3
- package/clis/youtube/subscribe.js +7 -7
- package/clis/youtube/subscriptions.js +1 -1
- package/clis/youtube/transcript-group.js +2 -2
- package/clis/youtube/transcript.js +13 -13
- package/clis/youtube/unlike.js +5 -5
- package/clis/youtube/unsubscribe.js +7 -7
- package/clis/youtube/utils.js +3 -3
- package/clis/youtube/video.js +4 -4
- package/clis/youtube/watch-later.js +2 -2
- package/clis/yuanbao/ask.js +18 -18
- package/clis/yuanbao/detail.js +1 -1
- package/clis/yuanbao/read.js +1 -1
- package/clis/yuanbao/shared.js +9 -9
- package/clis/yuanbao/status.js +1 -1
- package/clis/yuque/article.js +1 -1
- package/clis/yuque/whoami.js +1 -1
- package/clis/zhihu/answer-comments.js +2 -2
- package/clis/zhihu/answer-detail.js +3 -3
- package/clis/zhihu/answer.js +1 -1
- package/clis/zhihu/article-transform.js +1 -1
- package/clis/zhihu/article.js +1 -1
- package/clis/zhihu/auth.js +2 -2
- package/clis/zhihu/collection.js +3 -3
- package/clis/zhihu/collections.js +3 -3
- package/clis/zhihu/download.js +2 -2
- package/clis/zhihu/image-profile.js +6 -6
- package/clis/zhihu/paginate.js +3 -3
- package/clis/zhihu/pin.js +4 -4
- package/clis/zhihu/question.js +3 -3
- package/clis/zhihu/recommend.js +3 -3
- package/clis/zhihu/search.js +3 -3
- package/clis/zhihu/stats.js +3 -3
- package/clis/zhihu/user-arg.js +1 -1
- package/clis/zhihu/write-shared.js +7 -7
- package/clis/zlibrary/utils.js +6 -6
- package/clis/zsxq/auth.js +3 -3
- package/clis/zsxq/search.js +1 -1
- package/clis/zsxq/topic.js +1 -1
- package/clis/zsxq/utils.js +5 -5
- package/dist/src/adapter-source.js +1 -1
- package/dist/src/browser/analyze.js +1 -1
- package/dist/src/browser/article-extract.js +2 -2
- package/dist/src/browser/ax-snapshot.js +2 -2
- package/dist/src/browser/base-page.js +25 -25
- package/dist/src/browser/bridge.js +1 -1
- package/dist/src/browser/cdp.js +1 -1
- package/dist/src/browser/daemon-client.js +1 -1
- package/dist/src/browser/daemon-lifecycle.js +7 -7
- package/dist/src/browser/dom-helpers.js +35 -35
- package/dist/src/browser/dom-snapshot.js +19 -19
- package/dist/src/browser/errors.js +3 -3
- package/dist/src/browser/extract.js +5 -5
- package/dist/src/browser/find.js +13 -13
- package/dist/src/browser/fingerprint.js +2 -2
- package/dist/src/browser/html-tree.js +6 -6
- package/dist/src/browser/managed-chrome.js +1 -1
- package/dist/src/browser/network-cache.js +1 -1
- package/dist/src/browser/network-key.js +1 -1
- package/dist/src/browser/page.js +7 -7
- package/dist/src/browser/profile.js +2 -2
- package/dist/src/browser/proxy-test.js +8 -8
- package/dist/src/browser/shape-filter.js +1 -1
- package/dist/src/browser/shape.js +1 -1
- package/dist/src/browser/stealth.js +3 -3
- package/dist/src/browser/tabs.js +2 -2
- package/dist/src/browser/target-errors.js +1 -1
- package/dist/src/browser/target-resolver.js +23 -23
- package/dist/src/browser/trace.js +2 -2
- package/dist/src/browser/utils.js +1 -1
- package/dist/src/browser/verify-fixture.js +2 -2
- package/dist/src/browser-session-lock.js +1 -1
- package/dist/src/build-manifest.js +11 -11
- package/dist/src/capabilityRouting.js +1 -1
- package/dist/src/cli-argv-preprocess.js +1 -1
- package/dist/src/cli.js +32 -32
- package/dist/src/commanderAdapter.js +3 -3
- package/dist/src/commands/auth.js +3 -3
- package/dist/src/commands/daemon.js +1 -1
- package/dist/src/completion-fast.js +1 -1
- package/dist/src/completion.js +1 -1
- package/dist/src/constants.js +1 -1
- package/dist/src/convention-audit.js +2 -2
- package/dist/src/daemon-utils.js +1 -1
- package/dist/src/daemon.js +1 -1
- package/dist/src/discovery.js +2 -2
- package/dist/src/doctor.js +9 -9
- package/dist/src/download/article-download.js +15 -15
- package/dist/src/download/index.js +4 -4
- package/dist/src/download/media-download.js +1 -1
- package/dist/src/download/progress.js +3 -3
- package/dist/src/electron-apps.js +1 -1
- package/dist/src/errors.js +2 -2
- package/dist/src/execution.js +2 -2
- package/dist/src/external.js +1 -1
- package/dist/src/help.js +8 -8
- package/dist/src/hooks.js +1 -1
- package/dist/src/interceptor.js +21 -21
- package/dist/src/launcher.js +7 -7
- package/dist/src/logger.js +8 -8
- package/dist/src/main.js +7 -7
- package/dist/src/observation/artifact.js +5 -5
- package/dist/src/observation/retention.js +1 -1
- package/dist/src/output.js +2 -2
- package/dist/src/package-paths.js +1 -1
- package/dist/src/pipeline/executor.js +1 -1
- package/dist/src/pipeline/registry.js +1 -1
- package/dist/src/pipeline/steps/browser.js +1 -1
- package/dist/src/pipeline/steps/download.js +1 -1
- package/dist/src/pipeline/steps/fetch.js +6 -6
- package/dist/src/pipeline/steps/intercept.js +1 -1
- package/dist/src/pipeline/steps/tap.js +17 -17
- package/dist/src/pipeline/steps/transform.js +1 -1
- package/dist/src/pipeline/template.js +1 -1
- package/dist/src/plugin-manifest.js +1 -1
- package/dist/src/plugin-scaffold.js +19 -19
- package/dist/src/plugin.js +12 -12
- package/dist/src/rate-limit.js +1 -1
- package/dist/src/registry.js +1 -1
- package/dist/src/runtime-detect.js +1 -1
- package/dist/src/runtime.js +1 -1
- package/dist/src/scripts/framework.js +1 -1
- package/dist/src/scripts/interact.js +1 -1
- package/dist/src/scripts/store.js +1 -1
- package/dist/src/serialization.js +2 -2
- package/dist/src/session-lease.js +1 -1
- package/dist/src/snapshotFormatter.js +2 -2
- package/dist/src/tui.js +12 -12
- package/dist/src/user-runtime.js +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.js +4 -4
- package/dist/src/validate.js +2 -2
- package/dist/src/verify.js +2 -2
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/clis/discord-web/send.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as s,AuthRequiredError as w,CommandExecutionError as i}from"@jackwener/opencli/errors";import{cli as f,Strategy as p}from"@jackwener/opencli/registry";const g=/^(?:@me|\d{3,})\/\d{3,}$/;export function normalizeChannelUrl(e){const t=String(e||"").trim();if(!t)throw new s("Channel is required.",'Pass a channel URL like https://discord.com/channels/<guild>/<channel>, or "<guild>/<channel>".');if(/^https?:\/\//i.test(t)){let o;try{o=new URL(t)}catch{throw new s(`Invalid channel URL: ${t}`)}const a=o.hostname.toLowerCase();if(a!=="discord.com"&&!a.endsWith(".discord.com"))throw new s("Channel URL must be a discord.com URL.");const r=o.pathname.split("/").filter(Boolean);if(r[0]!=="channels"||r.length<3)throw new s("Channel URL must look like /channels/<guild>/<channel>.");return`https://discord.com/channels/${r[1]}/${r[2]}`}if(!g.test(t))throw new s(`Invalid channel reference: ${JSON.stringify(t)}`,'Use "<guild>/<channel>" (numeric ids) or "@me/<dm-channel>", or a full channel URL.');return`https://discord.com/channels/${t}`}f({site:"discord-web",name:"send",access:"write",description:'Send a message to a Discord channel (discord.com). Pass the channel URL or "<guild>/<channel>". Multi-line text is sent as one message.',domain:"discord.com",strategy:p.COOKIE,browser:!0,args:[{name:"channel",type:"string",required:!0,positional:!0,help:'Channel URL (https://discord.com/channels/<guild>/<channel>) or "<guild>/<channel>"'},{name:"text",fromFile:!0,type:"string",required:!0,positional:!0,help:"Message text (multi-line allowed)"}],columns:["status","channel_id","message"],func:async(e,t)=>{if(!e)throw new i("Browser session required");const o=normalizeChannelUrl(t.channel),a=o.split("/").pop(),r=String(t.text??"");if(!r.trim())throw new s("Message text cannot be empty.");await e.goto(o);let d=!1;for(let n=0;n<12;n++){const m=await e.evaluate(`(() => {
|
|
2
2
|
if (/\\/login(\\b|\\/|\\?|$)/.test(location.pathname)) return 'login';
|
|
3
3
|
const ed = document.querySelector('[role="textbox"][data-slate-editor="true"]');
|
|
4
4
|
if (!ed) return 'no-editor';
|
|
5
5
|
return 'ready';
|
|
6
|
-
})()`);if(
|
|
7
|
-
`);for(let
|
|
6
|
+
})()`);if(m==="login")throw new w("discord.com","Discord redirected to /login — not signed in");if(m==="ready"){d=!0;break}await e.wait(1)}if(!d)throw new i("Discord message box not found — the channel may not exist, or you lack access to it.");const h='[role="textbox"][data-slate-editor="true"]';await e.click(h);await e.pressKey("Control+A");await e.pressKey("Delete");const l=r.split(`
|
|
7
|
+
`);for(let n=0;n<l.length;n++){if(n>0)await e.pressKey("Shift+Enter");if(l[n].length)await e.typeText(h,l[n])}if(await e.evaluate(`(() => !!document.querySelector('[class*="autocomplete"]'))()`))await e.pressKey("Escape");const c=await e.evaluate(`(() => {
|
|
8
8
|
const ed = document.querySelector('[role="textbox"][data-slate-editor="true"]');
|
|
9
9
|
return ed ? (ed.textContent || '').replace(/\\uFEFF/g, '') : null;
|
|
10
|
-
})()`),
|
|
10
|
+
})()`),u=(n)=>String(n||"").replace(/\s+/g," ").trim();if(c===null||u(c)!==u(r))throw new i(`Composed text did not match before send (got ${JSON.stringify((c||"").slice(0,60))}).`);await e.pressKey("Enter");await e.wait(1);if((await e.evaluate(`(() => {
|
|
11
11
|
const ed = document.querySelector('[role="textbox"][data-slate-editor="true"]');
|
|
12
12
|
return ed ? (ed.textContent || '').replace(/\\uFEFF/g, '') : '';
|
|
13
|
-
})()`)).trim().length>0)throw new
|
|
13
|
+
})()`)).trim().length>0)throw new i("Message still in the box after Enter — send blocked (slow-mode, rate limit, or no permission to post here).");return[{status:"success",channel_id:a,message:"Message sent"}]}});
|
package/clis/dockerhub/image.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as c,Strategy as u}from"@jackwener/opencli/registry";import{HUB_BASE as d,hubFetch as m,parseImage as p}from"./utils.js";function a(i){const r=String(i??"").trim();if(!r)return null;const e=r.replace(/\.\d+/,"");return e.endsWith("Z")?e:`${e}Z`}c({site:"dockerhub",name:"image",access:"read",description:"Fetch a Docker Hub repository's public metadata (stars, pulls, last updated, status)",domain:"hub.docker.com",strategy:u.PUBLIC,browser:!1,args:[{name:"image",positional:!0,required:!0,help:'Image name (e.g. "nginx", "library/nginx", "bitnami/redis")'}],columns:["image","official","stars","pulls","description","lastUpdated","lastModified","registered","status","url"],func:async(i)=>{const{owner:r,name:e}=p(i.image),l=`${d}/repositories/${r}/${e}/`,t=await m(l,"dockerhub image"),s=String(t?.namespace??r).trim(),n=s==="library"||s==="_",o=n?`library/${e}`:`${s}/${e}`;return[{image:o,official:n,stars:t?.star_count!=null?Number(t.star_count):null,pulls:t?.pull_count!=null?Number(t.pull_count):null,description:String(t?.description??"").trim(),lastUpdated:a(t?.last_updated),lastModified:a(t?.last_modified),registered:a(t?.date_registered),status:String(t?.status_description??"").trim(),url:`https://hub.docker.com/r/${o}`}]}});
|
package/clis/dockerhub/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as m,Strategy as p}from"@jackwener/opencli/registry";import{EmptyResultError as d}from"@jackwener/opencli/errors";import{HUB_BASE as h,hubFetch as y,requireBoundedInt as b,requireString as f}from"./utils.js";m({site:"dockerhub",name:"search",access:"read",description:"Search Docker Hub repositories by keyword",domain:"hub.docker.com",strategy:p.PUBLIC,browser:!1,args:[{name:"query",positional:!0,required:!0,help:'Search keyword (e.g. "nginx", "bitnami redis")'},{name:"limit",type:"int",default:25,help:"Max repositories (1-100, single Docker Hub page)"}],columns:["rank","image","official","stars","pulls","description","url"],func:async(t)=>{const i=f(t.query,"query"),s=b(t.limit,25,100),a=`${h}/search/repositories/?query=${encodeURIComponent(i)}&page_size=${s}`,n=await y(a,"dockerhub search"),c=Array.isArray(n?.results)?n.results:[];if(!c.length)throw new d("dockerhub search",`No Docker Hub repositories matched "${i}".`);return c.slice(0,s).map((e,l)=>{const u=String(e.repo_owner??"").trim(),r=String(e.repo_name??"").trim(),o=u?`${u}/${r}`:e.is_official?`library/${r}`:r;return{rank:l+1,image:o,official:Boolean(e.is_official),stars:e.star_count!=null?Number(e.star_count):null,pulls:e.pull_count!=null?Number(e.pull_count):null,description:String(e.short_description??"").trim(),url:o?`https://hub.docker.com/r/${o}`:""}})}});
|
package/clis/dockerhub/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as i,CommandExecutionError as a,EmptyResultError as u}from"@jackwener/opencli/errors";export const HUB_BASE="https://hub.docker.com/v2";const h="opencli-dockerhub-adapter (+https://github.com/jackwener/OpenCLI)",c=/^[a-z0-9][a-z0-9._-]*$/;export function requireString(o,r){const e=String(o??"").trim();if(!e)throw new i(`dockerhub ${r} cannot be empty`);return e}export function requireBoundedInt(o,r,e,n="limit"){const t=o??r,s=typeof t==="number"?t:Number(t);if(!Number.isInteger(s)||s<=0)throw new i(`dockerhub ${n} must be a positive integer`);if(s>e)throw new i(`dockerhub ${n} must be <= ${e}`);return s}export function parseImage(o){const r=String(o??"").trim().toLowerCase();if(!r)throw new i('dockerhub image name is required (e.g. "nginx", "library/nginx", "bitnami/redis")');const e=r.indexOf("/");let n,t;if(e>=0){n=r.slice(0,e);t=r.slice(e+1)}else{n="library";t=r}if(!c.test(n)||!c.test(t))throw new i(`dockerhub image "${o}" is not a valid repository slug`,'Use lowercase letters / digits / "._-", optionally prefixed with "<owner>/".');if(t.length<2||t.length>255)throw new i(`dockerhub image "${o}" name must be 2-255 chars`);return{owner:n,name:t}}export async function hubFetch(o,r){let e;try{e=await fetch(o,{headers:{"user-agent":h,accept:"application/json"}})}catch(t){throw new a(`${r} request failed: ${t?.message??t}`,"Check that hub.docker.com is reachable from this network.")}if(e.status===404)throw new u(r,`Docker Hub returned 404 for ${o}.`);if(e.status===429)throw new a(`${r} returned HTTP 429 (rate limited)`,"Docker Hub throttles anonymous traffic; wait a few seconds and retry.");if(!e.ok)throw new a(`${r} returned HTTP ${e.status}`);let n;try{n=await e.json()}catch(t){throw new a(`${r} returned malformed JSON: ${t?.message??t}`)}return n}
|
package/clis/dongchedi/koubei.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as l,Strategy as _}from"@jackwener/opencli/registry";import{EmptyResultError as g}from"@jackwener/opencli/errors";import{DCD_BASE as b,KOUBEI_COLUMNS as p,clean as h,dcdFetchPageProps as w,normalizeSeriesId as f,parseScore as y,requireArray as k,requireStableId as S,requireText as a,requireLimit as x,snippet as N}from"./utils.js";export function parseKoubei(o,t){const n=o?.review_list;k(n,"dongchedi reviewListData.review_list");const r=[];for(const[i,e]of n.entries()){const s=e?.buy_car_info||{},u=h(s.car_name||e?.car_name),c=s.year||e?.year,m=[c?String(c):"",u].filter(Boolean).join(" "),d=S(e?.gid_str||e?.gid,`dongchedi koubei row ${i+1}`);r.push({rank:r.length+1,user:a(e?.user_info?.name,`dongchedi koubei row ${i+1} user`),car:m,score:y(e?.score_info?.score),likes:Number.isFinite(Number(e?.digg_count_en))?Number(e.digg_count_en):0,comments:Number.isFinite(Number(e?.comment_count_en))?Number(e.comment_count_en):0,content:N(a(e?.content,`dongchedi koubei row ${i+1} content`),180),url:`${b}/ugc/article/${d}`});if(r.length>=t)break}return r}l({site:"dongchedi",name:"koubei",access:"read",aliases:["reviews"],description:"懂车帝车系口碑/车主评价(评分 / 购车款型 / 点赞 / 评论 / 正文摘要)",strategy:_.PUBLIC,browser:!1,args:[{name:"series_id",required:!0,positional:!0,help:"车系 ID(来自 search 的 series_id,或 /auto/series/<id> URL)"},{name:"limit",type:"int",default:10,help:"返回的口碑条数(最多 15,单页 SSR 上限)"}],columns:p,func:async(o)=>{const t=f(o.series_id),n=x(o.limit,10,15),r=await w(`/auto/series/score/${t}-x-x-x-x-x`,`koubei ${t}`),i=parseKoubei(r.reviewListData,n);if(i.length===0)throw new g(`dongchedi koubei ${t}`,"This series has no owner reviews yet.");return i}});
|
package/clis/dongchedi/models.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as u,Strategy as p}from"@jackwener/opencli/registry";import{ArgumentError as _,CommandExecutionError as h,EmptyResultError as g}from"@jackwener/opencli/errors";import{MODELS_COLUMNS as w,clean as b,dcdFetchPageProps as y,normalizeSeriesId as E,requireArray as f,requireStableId as S,requireText as C}from"./utils.js";function c(e){if(e==null||e==="")return"";if(typeof e==="number")return Number.isFinite(e)&&e>0?`${e}万`:"";return b(e)}export function parseModels(e,o){const r=e?.tab_list;f(r,"dongchedi carModelsData.tab_list");if(r.length===0)return[];const a=o==="offline"?"offline":"online_all",n=r.find((t)=>t?.tab_key===a)||(o==="offline"?r.find((t)=>/停售/.test(t?.tab_text||"")):r[0]);if(!n)return[];const s=n?.data;f(s,`dongchedi models ${o} data`);const d=[];for(const[t,m]of s.entries()){const i=m?.info||{},l=i.car_id??i.id;if(!l)continue;d.push({car_id:S(l,`dongchedi models row ${t+1}`),name:C(i.name||i.car_name,`dongchedi models row ${t+1} name`),year:i.year!=null?String(i.year):"",official_price:c(i.official_price),dealer_price:c(i.dealer_price),owner_price:c(i.owner_price)})}return d}u({site:"dongchedi",name:"models",access:"read",aliases:["trims"],description:"懂车帝车系款型列表(car_id / 名称 / 年款 / 指导价 / 经销商价 / 车主成交价)",strategy:p.PUBLIC,browser:!1,args:[{name:"series_id",required:!0,positional:!0,help:"车系 ID(来自 search 的 series_id,或 /auto/series/<id> URL)"},{name:"status",default:"online",help:"在售 online(默认)或停售 offline"}],columns:w,func:async(e)=>{const o=E(e.series_id),r=String(e.status||"online").trim().toLowerCase();if(r!=="online"&&r!=="offline")throw new _("status","must be 'online' (在售) or 'offline' (停售)");const a=await y(`/auto/series/${o}`,`models ${o}`),n=parseModels(a.carModelsData,r);if(n.length===0){const s=r==="offline"?"No discontinued trims listed for this series.":"No on-sale trims listed for this series.";throw new(r==="offline"?g:h)(`dongchedi models ${o} (${r})`,s)}return n}});
|
package/clis/dongchedi/score.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as c,Strategy as d}from"@jackwener/opencli/registry";import{EmptyResultError as t}from"@jackwener/opencli/errors";import{SCORE_COLUMNS as _,dcdFetchPageProps as l,normalizeSeriesId as u,parseScore as n,requireArray as w}from"./utils.js";const g=[["score","综合"],["space_score","空间"],["power_score","动力"],["control_score","操控"],["comfort_score","舒适性"],["appearance_score","外观"],["interiors_score","内饰"],["configuration_score","配置"]];export function parseScoreBreakdown(r,e){if(!r||typeof r!=="object"||Array.isArray(r))throw new t("dongchedi score","This series has no 懂车分 rating yet (too few owner reviews).");const s=r||{},o=e||{};return g.map(([i,a])=>({dimension:a,score:n(s[i]),same_level_avg:n(o[i])}))}function p(r){const e=r?.same_level_review;if(e==null)return r?.average_series_review||{};w(e,"dongchedi same_level_review");return e.find((s)=>String(s?.series_id)==="0")||e[0]||{}}c({site:"dongchedi",name:"score",access:"read",aliases:["rating"],description:"懂车帝车系评分(懂车分 8 维度 + 同级车均值对比)",strategy:d.PUBLIC,browser:!1,args:[{name:"series_id",required:!0,positional:!0,help:"车系 ID(来自 search 的 series_id,或 /auto/series/<id> URL)"}],columns:_,func:async(r)=>{const e=u(r.series_id),s=await l(`/auto/series/${e}`,`score ${e}`),o=parseScoreBreakdown(s.scoreSimpleInfo,p(s.reviewData));if(o.every((i)=>i.score==null))throw new t(`dongchedi score ${e}`,"This series has no 懂车分 rating yet (too few owner reviews).");return o}});
|
package/clis/dongchedi/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as m,Strategy as u}from"@jackwener/opencli/registry";import{ArgumentError as l,EmptyResultError as p}from"@jackwener/opencli/errors";import{DCD_BASE as h,SEARCH_COLUMNS as f,clean as s,requireArray as g,requireStableId as w,requireText as _,dcdFetchPageProps as y,requireLimit as b}from"./utils.js";const E=26;export function parseSearchRows(n,r){const o=g(n?.data,"dongchedi searchData.data"),t=[];for(const[i,a]of o.entries()){if(a?.cell_type!==E)continue;const c=w(a?.series_id,`dongchedi search row ${i+1}`),e=a.display||{},d=_(e.series_name||e.title,`dongchedi search row ${i+1} name`);t.push({rank:t.length+1,series_id:c,name:d,brand:s(e.sub_brand_name),official_price:s(e.official_price),dealer_price:s(e.agent_price),pictures:Number.isFinite(Number(e.picture_num))?Number(e.picture_num):null,url:`${h}/auto/series/${c}`});if(t.length>=r)break}return t}m({site:"dongchedi",name:"search",access:"read",description:"懂车帝车系搜索(按关键词,返回车系 + 指导价/经销商价)",strategy:u.PUBLIC,browser:!1,args:[{name:"keyword",required:!0,positional:!0,help:'搜索关键词,例如 "宝马X5" 或 "汉兰达"'},{name:"limit",type:"int",default:15,help:"返回的车系数量(最多 30)"}],columns:f,func:async(n)=>{const r=String(n.keyword||"").trim();if(!r)throw new l("keyword","must be a non-empty string");const o=b(n.limit,15,30),t=await y(`/search?keyword=${encodeURIComponent(r)}`,`search "${r}"`),i=parseSearchRows(t.searchData,o);if(i.length===0)throw new p(`dongchedi search "${r}"`,'No car series matched. Try the model name, e.g. "宝马X5" or "汉兰达".');return i}});
|
package/clis/dongchedi/series.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as _,Strategy as u}from"@jackwener/opencli/registry";import{DCD_BASE as m,SERIES_COLUMNS as f,assertPlainObject as h,clean as n,dcdFetchPageProps as b,normalizeSeriesId as p,parseScore as g,requireText as t}from"./utils.js";function k(s){const r=s?.tab_list;if(!Array.isArray(r))return null;const i=(r.find((a)=>a?.tab_key==="online_all")||r[0])?.data;if(!Array.isArray(i))return null;return i.filter((a)=>a?.info?.car_id??a?.info?.id).length}function o(s){const r=s?.list?.[0];if(!r||!r.rank)return"";const e=n(s.rank_name||r.rank_name);return e?`${e} 第${r.rank}名`:`第${r.rank}名`}export function parseSeries(s,r){const e=h(s?.seriesHomeHead,"dongchedi seriesHomeHead"),i=s.scoreSimpleInfo||{},a=s.rankData||{},c=e.sh_low_Price||e.sh_high_price?`${e.sh_low_Price??"?"}-${e.sh_high_price??"?"}万`:"";return[["series_id",r],["name",t(e.series_name,"dongchedi series name")],["brand",t(e.brand_name,"dongchedi series brand")],["sub_brand",n(e.sub_brand_name)],["official_price",e.has_official_price?n(e.official_price):""],["dealer_price",e.has_dealer_price?n(e.dealer_price):""],["used_price",c],["score",g(i.score)],["review_count",Number.isFinite(Number(i.total_review_count))?Number(i.total_review_count):null],["sale_rank",o(a.sale)],["score_rank",o(a.score)],["models",k(s.carModelsData)],["url",`${m}/auto/series/${r}`]].map(([l,d])=>({field:l,value:d}))}_({site:"dongchedi",name:"series",access:"read",aliases:["detail"],description:"懂车帝车系概览(品牌 / 指导价 / 二手价 / 懂车分 / 销量排名 / 在售款型数)",strategy:u.PUBLIC,browser:!1,args:[{name:"series_id",required:!0,positional:!0,help:"车系 ID(来自 search 的 series_id,或 /auto/series/<id> URL)"}],columns:f,func:async(s)=>{const r=p(s.series_id),e=await b(`/auto/series/${r}`,`series ${r}`);return parseSeries(e,r)}});
|
package/clis/dongchedi/specs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as f,Strategy as g}from"@jackwener/opencli/registry";import{CommandExecutionError as _}from"@jackwener/opencli/errors";import{SPECS_COLUMNS as h,assertPlainObject as w,clean as t,dcdFetchPageProps as v,normalizeSeriesId as y}from"./utils.js";function c(o,s){const r=[];for(const e of Array.isArray(o)?o:[]){const i=t(e?.[s]);if(i&&!r.includes(i))r.push(i)}return r}function b(o,s,r=""){const e=(Array.isArray(o)?o:[]).map((a)=>parseFloat(String(a?.[s]).replace(/[^\d.]/g,""))).filter((a)=>Number.isFinite(a));if(e.length===0)return"";const i=Math.min(...e),n=Math.max(...e);return i===n?`${i}${r}`:`${i}-${n}${r}`}function A(o){const s=Array.isArray(o)?o:[];if(s.length===0)return"";const r=(n)=>s.some((a)=>a?.[n]),i=[["main_airbag","主"],["vice_airbag","副"],["front_airbag","前"],["rear_airbag","后"],["side_air_curtain","侧气帘"],["main_knee_airbag","主膝部"],["vice_knee_airbag","副膝部"]].filter(([n])=>r(n)).map(([,n])=>n);return i.length?i.join("/")+"气囊":""}export function parseSpecs(o,s){const r=w(o,"dongchedi overviewData"),e=Array.isArray(r.space)&&r.space[0]||{},i=r.power||{},n=i.power_item||[],a=Array.isArray(r.manipulation)&&r.manipulation[0]||{},m=e.length&&e.width&&e.height?`${e.length} × ${e.width} × ${e.height} mm`:"",p=[t(a.driver_form),t(a.fourwheel_drive_type)].filter(Boolean).join(" · "),l=a.front_suspension_form||a.rear_suspension_form?`前 ${t(a.front_suspension_form)||"?"} / 后 ${t(a.rear_suspension_form)||"?"}`:"";return[["series_id",String(s)],["dimensions",m],["wheelbase",e.wheelbase?`${e.wheelbase} mm`:""],["power",t(i.overview)],["engine",c(n,"engine_description").join(" / ")],["gearbox",c(n,"gearbox_description").join(" / ")],["energy",c(n,"fuel_form").join(" / ")],["acceleration",b(n,"acceleration_time","s")],["drivetrain",p],["suspension",l],["airbags",A(r.airbag)]].map(([u,d])=>({field:u,value:d}))}f({site:"dongchedi",name:"specs",access:"read",aliases:["config"],description:"懂车帝车系配置概览(尺寸 / 动力 / 发动机 / 变速箱 / 四驱 / 悬挂 / 气囊)",strategy:g.PUBLIC,browser:!1,args:[{name:"series_id",required:!0,positional:!0,help:"车系 ID(来自 search 的 series_id,或 /auto/series/<id> URL)"}],columns:h,func:async(o)=>{const s=y(o.series_id),r=await v(`/auto/series/${s}`,`specs ${s}`),e=parseSpecs(r.overviewData,s);if(e.every((i)=>i.field==="series_id"||!i.value))throw new _(`dongchedi specs ${s}`,"No spec overview found for this series (layout may have changed).");return e}});
|
package/clis/dongchedi/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as c,CommandExecutionError as o,EmptyResultError as l}from"@jackwener/opencli/errors";export const DCD_BASE="https://www.dongchedi.com";const a="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0 Safari/537.36";export const SEARCH_COLUMNS=["rank","series_id","name","brand","official_price","dealer_price","pictures","url"],SERIES_COLUMNS=["field","value"],MODELS_COLUMNS=["car_id","name","year","official_price","dealer_price","owner_price"],SPECS_COLUMNS=["field","value"],SCORE_COLUMNS=["dimension","score","same_level_avg"],KOUBEI_COLUMNS=["rank","user","car","score","likes","comments","content","url"];const u=["__hasUrlCity","is_gray","has_gray","clientIp","sensitiveSeriesIdList"];export function extractPageProps(e){const r=String(e||"").match(/<script id="__NEXT_DATA__"[^>]*>([\s\S]*?)<\/script>/);if(!r)return null;try{const t=JSON.parse(r[1]);return t&&t.props&&t.props.pageProps||null}catch{return null}}export function isFallbackShell(e){if(!e||typeof e!=="object")return!0;return Object.keys(e).filter((t)=>!u.includes(t)).length===0}export async function dcdFetchPageProps(e,r){let t;try{t=await fetch(`${DCD_BASE}${e}`,{headers:{"User-Agent":a,Referer:`${DCD_BASE}/`,"Accept-Language":"zh-CN,zh;q=0.9"}})}catch(s){throw new o(`dongchedi ${r} network error: ${s?.message||s}`)}if(!t.ok)throw new o(`dongchedi ${r} HTTP ${t.status}`);const i=await t.text(),n=extractPageProps(i);if(!n)throw new o(`dongchedi ${r} returned no __NEXT_DATA__`,"Dongchedi likely changed its page structure, or the request hit an anti-bot page.");if(isFallbackShell(n))throw new o(`dongchedi ${r}`,"Dongchedi served its empty fallback shell — the id may not exist or the URL form changed.");return n}export function assertPlainObject(e,r){if(!e||typeof e!=="object"||Array.isArray(e))throw new o(`${r} returned an unexpected payload shape; expected an object.`);return e}export function requireArray(e,r){if(!Array.isArray(e))throw new o(`${r} returned an unexpected payload shape; expected an array.`);return e}export function requireStableId(e,r){const t=String(e??"").trim();if(!/^\d+$/.test(t)||t==="0")throw new o(`${r} did not include a stable numeric id.`);return t}export function requireText(e,r){const t=clean(e);if(!t)throw new o(`${r} did not include a stable text value.`);return t}export function parseScore(e){const r=Number(e);if(!Number.isFinite(r)||r<=0)return null;return Number((r/100).toFixed(2))}export function normalizeSeriesId(e){const r=String(e||"").trim();if(!r)throw new c("series_id must be a non-empty value");const t=r.match(/series\/(\d+)/)||r.match(/^(\d+)$/);if(!t)throw new c(`'${e}' does not look like a dongchedi series id (a number, or a /auto/series/<id> URL)`);return t[1]}export function requireLimit(e,r,t){const i=e==null||e===""?r:e,n=typeof i==="number"?i:Number(String(i).trim());if(!Number.isInteger(n)||n<1||n>t)throw new c(`limit must be an integer between 1 and ${t}`);return n}export function clean(e){return String(e==null?"":e).replace(/\s+/g," ").trim()}export function snippet(e,r=180){const t=clean(e);return t.length>r?`${t.slice(0,r)}…`:t}
|
package/clis/douban/article.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{CliError as
|
|
2
|
-
const I = `+JSON.stringify(
|
|
1
|
+
import{CliError as r,CommandExecutionError as u}from"@jackwener/opencli/errors";import{cli as y,Strategy as _}from"@jackwener/opencli/registry";import{readFile as b,stat as g}from"node:fs/promises";import{gotoWritePage as I}from"../_shared/article/publish.js";import{normalizeContent as T}from"../_shared/article/format.js";import{markdownToDraftState as N}from"../_shared/article/douban-md2draft.js";function k(e){if(!e.execute)throw new r("INVALID_INPUT","此命令需要 --execute 才会真正发布。注意:本报错仅表示缺少 --execute,并未校验其余参数,不能当 dry-run 预览用")}async function S(e){const o=typeof e.text==="string"?e.text:void 0,t=typeof e.file==="string"?e.file:void 0;if(o&&t)throw new r("INVALID_INPUT","text 和 --file 不能同时使用");let i=o??"";if(t){let a;try{a=await g(t)}catch{throw new r("INVALID_INPUT",`文件未找到:${t}`)}if(!a.isFile())throw new r("INVALID_INPUT",`必须是可读文本文件:${t}`);let s;try{s=await b(t)}catch{throw new r("INVALID_INPUT",`文件无法读取:${t}`)}try{i=new TextDecoder("utf-8",{fatal:!0}).decode(s)}catch{throw new r("INVALID_INPUT",`文件不是合法 UTF-8 文本:${t}`)}}if(!i.trim())throw new r("INVALID_INPUT","正文不能为空");return i}function O(e,o,t,i,a={}){return[{status:"success",outcome:i,message:e,target_type:o,target:t,...a}]}function p(e){let o=0;for(const t of e.blocks||[]){if(t.key==null)t.key="b"+(o++).toString(36);if(t.depth==null)t.depth=0;if(!t.inlineStyleRanges)t.inlineStyleRanges=[];if(!t.entityRanges)t.entityRanges=[];if(!t.data)t.data={}}if(!e.entityMap)e.entityMap={};return e}function f(e){return`(async () => {
|
|
2
|
+
const I = `+JSON.stringify(e)+`;
|
|
3
3
|
const ck = (document.cookie.match(/\\bck="?([^";]+)"?/) || [])[1] || "";
|
|
4
4
|
const uploadAuthToken = (window.__INIT_STATE__ && window.__INIT_STATE__.upload_auth_token) || "";
|
|
5
5
|
const draft = I.draftState;
|
|
@@ -50,4 +50,4 @@ if (I.draftOnly) {
|
|
|
50
50
|
noteUrl = (data && data.url) || ("https://www.douban.com/note/" + id + "/");
|
|
51
51
|
}
|
|
52
52
|
return { ok: true, id: String(id), url: noteUrl, draft: !!I.draftOnly, uploaded, failed };
|
|
53
|
-
})()`}const
|
|
53
|
+
})()`}const x="https://www.douban.com/note/create",P="^https?://([^/]*\\.)?douban\\.com(/|$)";export const __test__={normalizeDraftState:p,buildDoubanPublishJs:f};y({site:"douban",name:"article",access:"write",description:"发布豆瓣日记。正文默认 Markdown,图片自动转存到豆瓣图床;正文以 Draft.js 提交到新版 rexxar 接口。",domain:"www.douban.com",strategy:_.COOKIE,browser:!0,args:[{name:"title",positional:!0,required:!0,help:"日记标题"},{name:"text",positional:!0,help:"正文(Markdown 格式;也可用 --file)"},{name:"file",help:"正文文件路径(UTF-8,Markdown 格式)"},{name:"html",type:"boolean",help:"把正文当 HTML 处理而不是 Markdown"},{name:"draft",type:"boolean",help:"仅保存草稿(私有,不公开发布)"},{name:"execute",type:"boolean",help:"真正执行写操作;不带此参数命令会拒绝写入"}],columns:["status","outcome","message","target_type","target","created_target","created_url"],func:async(e,o)=>{if(!e)throw new u("豆瓣 article 命令需要浏览器会话(Browser session required)");k(o);const t=String(o.title??"").trim();if(!t)throw new r("INVALID_INPUT","文章标题不能为空");const i=await S(o),a=Boolean(o.draft),s=T(i,{format:o.html?"html":"markdown"}),h=p(N(s.markdown));await I(e,x,P);const n=await e.evaluate(f({title:t,draftState:h,draftOnly:a}));if(!n||!n.ok){const m=n&&n.stage||"unknown",w=n&&n.message||"未知错误";throw new u(`豆瓣发布失败(${m}${n&&n.status?" HTTP "+n.status:""}):${w}`)}const l=(n.uploaded&&n.uploaded.length)|0,d=(n.failed&&n.failed.length)|0;let c=a?"已保存豆瓣日记草稿(私有,可在编辑器草稿箱查看)":"已发布豆瓣日记";if(l||d)c+=`・图片:${l} 张已转存${d?`,${d} 张失败`:""}`;return O(c,"article","",a?"draft":"created",{created_target:"note:"+n.id,created_url:n.url})}});
|
package/clis/douban/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as t,CommandExecutionError as c}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as u}from"../_shared/site-auth.js";async function i(e){const o=await e.getCookies({url:"https://www.douban.com"}),r=new Set(o.filter((n)=>n.value).map((n)=>n.name));return r.has("dbcl2")||r.has("ck")}async function a(e){if(!await i(e))throw new t("douban.com","Douban dbcl2 / ck cookies missing");await e.goto("https://www.douban.com/mine/");await e.wait(2);const o=await e.evaluate(`
|
|
2
2
|
(() => {
|
|
3
3
|
const href = location.href;
|
|
4
4
|
const m = href.match(/people\\/(\\d+)\\/?/);
|
|
@@ -18,4 +18,4 @@ import{AuthRequiredError as G,CommandExecutionError as N}from"@jackwener/opencli
|
|
|
18
18
|
}
|
|
19
19
|
return { ok: true, user_id, name };
|
|
20
20
|
})()
|
|
21
|
-
`);if(
|
|
21
|
+
`);if(o?.kind==="auth")throw new t("douban.com",o.detail);if(!o?.ok)throw new c(`Unexpected Douban probe: ${JSON.stringify(o)}`);return{user_id:o.user_id,name:o.name}}u({site:"douban",domain:"douban.com",loginUrl:"https://accounts.douban.com/passport/login",columns:["user_id","name"],quickCheck:i,verify:a,poll:async(e)=>{if(!await i(e))throw new t("douban.com","Waiting for Douban dbcl2 / ck cookies");return a(e)}});
|
package/clis/douban/download.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as f from"node:fs";import*as m from"node:path";import{formatBytes as b}from"@jackwener/opencli/download/progress";import{httpDownload as y,sanitizeFilename as I}from"@jackwener/opencli/download";import{EmptyResultError as g}from"@jackwener/opencli/errors";import{cli as S,Strategy as j}from"@jackwener/opencli/registry";import{getDoubanPhotoExtension as D,loadDoubanSubjectPhotos as x,normalizeDoubanSubjectId as P}from"./utils.js";function R(s,t){const e=String(t.index).padStart(3,"0"),r=I(t.title||t.photoId||"photo",80)||"photo";return`${s}_${e}_${t.photoId||"photo"}_${r}${D(t.imageUrl)}`}S({site:"douban",name:"download",access:"read",description:"下载电影海报/剧照图片",domain:"movie.douban.com",strategy:j.COOKIE,args:[{name:"id",positional:!0,required:!0,help:"电影 subject ID"},{name:"type",default:"Rb",help:"豆瓣 photos 的 type 参数,默认 Rb(海报)"},{name:"limit",type:"int",default:120,help:"最多下载多少张图片"},{name:"photo-id",help:"只下载指定 photo_id 的图片"},{name:"output",default:"./douban-downloads",help:"输出目录"}],columns:["index","title","status","size"],func:async(s,t)=>{const e=P(String(t.id||"")),r=String(t.output||"./douban-downloads"),n=String(t["photo-id"]||"").trim(),a={type:String(t.type||"Rb")};if(n)a.targetPhotoId=n;else a.limit=Number(t.limit)||120;const d=await x(s,e,a),u=n?d.photos.filter((o)=>o.photoId===n):d.photos;if(n&&!u.length)throw new g("douban download",`Photo ID ${n} was not found under subject ${e}. Try "douban photos ${e} -f json" first.`);const l=m.join(r,e);f.mkdirSync(l,{recursive:!0});const p=[];for(const o of u){const c=R(e,o),h=m.join(l,c),i=await y(o.imageUrl,h,{headers:{Referer:o.detailUrl||`https://movie.douban.com/subject/${e}/photos?type=${encodeURIComponent(String(t.type||"Rb"))}`},timeout:60000});p.push({index:o.index,title:o.title,photo_id:o.photoId,image_url:o.imageUrl,detail_url:o.detailUrl,status:i.success?"success":"failed",size:i.success?b(i.size):i.error||"unknown error"})}return p}});
|
package/clis/douban/utils.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as T,CliError as k,EmptyResultError as b}from"@jackwener/opencli/errors";import{clamp as y}from"../_shared/common.js";const U=30,D=500,f=(t)=>y(t||20,1,50),q=(t)=>y(t||120,1,D),P=".item-root .title-text, .item-root .title a, .result-list .result-item h3 a",l=(t)=>String(t||"").replace(/\s+/g," ").trim();function a(t){for(const e of t){const o=l(e);if(o)return o}return""}function S(t){return l(t).split(/\s*\/\s*/).map((e)=>l(e)).filter(Boolean)}function I(t){const e=String(t||"").replace(/\r/g,`
|
|
2
2
|
`).split(`
|
|
3
|
-
`).map((
|
|
3
|
+
`).map((r)=>l(r)).filter(Boolean),o={};for(const r of e){const n=r.match(/^([^::]+)\s*[::]\s*(.*)$/);if(!n)continue;const i=l(n[1]),s=l(n[2]);if(!i)continue;o[i]=s}return o}function C(t){const e=l(t);if(!e)return 0;const o=Number.parseFloat(e);return Number.isFinite(o)?o:0}function _(t){const e=l(t).replace(/[^\d]/g,"");if(!e)return 0;const o=Number.parseInt(e,10);return Number.isFinite(o)?o:0}function j(t){const e=l(t).match(/(\d+)/);if(!e)return null;const o=Number.parseInt(e[1],10);return Number.isFinite(o)?o:null}function E(t){return l(t).match(/\b(19|20)\d{2}\b/)?.[0]||""}export function splitDoubanTitle(t){const e=(n)=>String(n||"").replace(/\s+/g," ").trim(),o=e(t);if(!o)return{title:"",originalTitle:""};const r=o.match(/^([\u4e00-\u9fff\u3000-\u303f\uff00-\uffef]+(?:\s*[\u4e00-\u9fff\u3000-\u303f\uff00-\uffef·::!?]+)*)\s+(.+)$/);if(!r)return{title:o,originalTitle:""};return{title:e(r[1]),originalTitle:e(r[2])}}async function u(t){if((await t.evaluate(`
|
|
4
4
|
(() => {
|
|
5
5
|
const title = (document.title || '').trim();
|
|
6
6
|
const href = (location.href || '').trim();
|
|
7
7
|
const blocked = href.includes('sec.douban.com') || /登录跳转/.test(title) || /异常请求/.test(document.body?.innerText || '');
|
|
8
8
|
return { blocked, title, href };
|
|
9
9
|
})()
|
|
10
|
-
`))?.blocked)throw new
|
|
10
|
+
`))?.blocked)throw new k("AUTH_REQUIRED","Douban requires a logged-in browser session before these commands can load data.","Please sign in to douban.com in the browser that ppcli reuses, then rerun the command.")}function R(t){const e=t instanceof Error?t.message:String(t||"");return/Detached while handling command|Debugger is not attached to the tab|Target closed|No tab with id/i.test(e)}async function g(t,e={}){const o=Math.max(1,e.attempts||2);let r;for(let n=0;n<o;n+=1)try{return await t()}catch(i){r=i;if(n>=o-1||!R(i))throw i}throw r}function N(t,e){const o=new URL(`https://search.douban.com/${encodeURIComponent(t)}/subject_search`);o.searchParams.set("search_text",String(e||""));if(String(t||"").trim()==="book")o.searchParams.set("cat","1001");return o.toString()}export function normalizeDoubanSubjectId(t){const e=String(t||"").trim();if(!/^\d+$/.test(e))throw new T(`Invalid Douban subject ID: ${t}`);return e}export function promoteDoubanPhotoUrl(t,e="l"){const o=String(t||"").trim();if(!o)return"";if(/^[a-z]+:/i.test(o)&&!/^https?:/i.test(o))return"";return o.replace(/\/view\/photo\/[^/]+\/public\//,`/view/photo/${e}/public/`)}export function resolveDoubanPhotoAssetUrl(t,e=""){for(const o of t){const r=String(o||"").trim();if(!r)continue;let n=r;try{n=e?new URL(r,e).toString():new URL(r).toString()}catch{n=r}if(/^https?:\/\//i.test(n))return n}return""}export function getDoubanPhotoExtension(t){const e=String(t||"").trim();if(!e)return".jpg";try{return new URL(e).pathname.match(/\.(jpe?g|png|gif|webp|avif|bmp)$/i)?.[0]||".jpg"}catch{const o=e.match(/\.(jpe?g|png|gif|webp|avif|bmp)(?:$|[?#])/i)?.[0];return o?o.replace(/[?#].*$/,""):".jpg"}}export function normalizeDoubanBookSubject(t){const e=I(t?.infoText),o=a([t?.title]),r=a([t?.subtitle,e["副标题"]]),n=a([t?.originalTitle,e["原作名"]]),i=S(a([e["作者"]])),s=S(a([e["译者"]])),c=a([e["出版社"],e["出品方"]]),p=a([e["出版年"]]),m=E(p),h=j(e["页数"]),w=a([e["装帧"]]),v=a([e["定价"]]),x=a([e["丛书"]]),d=a([e.ISBN]).replace(/[^\dxX]/g,""),A=d.length===10?d:"",z=d.length===13?d:"";return{id:normalizeDoubanSubjectId(t?.id),type:"book",title:o,subtitle:r,originalTitle:n,authors:i,translators:s,publisher:c,publishDate:p,publishYear:m,pageCount:h,binding:w,price:v,series:x,isbn10:A,isbn13:z,rating:C(t?.rating),ratingCount:_(t?.ratingCount),summary:l(t?.summary),cover:a([t?.cover]),url:a([t?.url])}}async function L(t,e){const o=normalizeDoubanSubjectId(e);return await g(async()=>{await t.goto(`https://movie.douban.com/subject/${o}/`,{waitUntil:"load",settleMs:1500});await u(t);await t.wait({selector:'span[property="v:itemreviewed"], #info',timeout:8}).catch(()=>{});return t.evaluate(`
|
|
11
11
|
(() => {
|
|
12
|
-
const id = ${JSON.stringify(
|
|
12
|
+
const id = ${JSON.stringify(o)};
|
|
13
13
|
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
14
14
|
const { title, originalTitle } = (${splitDoubanTitle.toString()})(normalize(document.querySelector('span[property="v:itemreviewed"]')?.textContent || ''));
|
|
15
15
|
const year = normalize(document.querySelector('.year')?.textContent).replace(/[()()]/g, '');
|
|
@@ -53,7 +53,7 @@ import{ArgumentError as V,CliError as W,EmptyResultError as K}from"@jackwener/op
|
|
|
53
53
|
url: 'https://movie.douban.com/subject/' + id + '/',
|
|
54
54
|
};
|
|
55
55
|
})()
|
|
56
|
-
`)})}async function
|
|
56
|
+
`)})}async function B(t,e){const o=normalizeDoubanSubjectId(e),r=await g(async()=>{await t.goto(`https://book.douban.com/subject/${o}/`,{waitUntil:"load",settleMs:1500});await u(t);await t.wait({selector:"h1 span, #info",timeout:8}).catch(()=>{});return t.evaluate(`
|
|
57
57
|
(() => {
|
|
58
58
|
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
59
59
|
const pickSummary = () => {
|
|
@@ -65,7 +65,7 @@ import{ArgumentError as V,CliError as W,EmptyResultError as K}from"@jackwener/op
|
|
|
65
65
|
return '';
|
|
66
66
|
};
|
|
67
67
|
return {
|
|
68
|
-
id: ${JSON.stringify(
|
|
68
|
+
id: ${JSON.stringify(o)},
|
|
69
69
|
title: normalize(document.querySelector('h1 span')?.textContent || document.querySelector('h1')?.textContent || ''),
|
|
70
70
|
subtitle: '',
|
|
71
71
|
originalTitle: '',
|
|
@@ -77,14 +77,14 @@ import{ArgumentError as V,CliError as W,EmptyResultError as K}from"@jackwener/op
|
|
|
77
77
|
url: location.href,
|
|
78
78
|
};
|
|
79
79
|
})()
|
|
80
|
-
`)});return normalizeDoubanBookSubject(
|
|
80
|
+
`)});return normalizeDoubanBookSubject(r)}export async function loadDoubanSubjectDetail(t,e,o="movie"){if((String(o||"movie").trim()==="book"?"book":"movie")==="book")return B(t,e);return L(t,e)}export async function loadDoubanSubjectPhotos(t,e,o={}){const r=normalizeDoubanSubjectId(e),n=String(o.type||"Rb").trim()||"Rb",i=String(o.targetPhotoId||"").trim(),s=i?Number.MAX_SAFE_INTEGER:q(Number(o.limit)||120),c=resolveDoubanPhotoAssetUrl.toString(),p=`https://movie.douban.com/subject/${r}/photos?type=${encodeURIComponent(n)}`;await t.goto(p);await t.wait(2);await u(t);const m=await t.evaluate(`
|
|
81
81
|
(async () => {
|
|
82
|
-
const subjectId = ${JSON.stringify(
|
|
83
|
-
const type = ${JSON.stringify(
|
|
84
|
-
const limit = ${
|
|
85
|
-
const targetPhotoId = ${JSON.stringify(
|
|
86
|
-
const pageSize = ${
|
|
87
|
-
const resolveDoubanPhotoAssetUrl = ${
|
|
82
|
+
const subjectId = ${JSON.stringify(r)};
|
|
83
|
+
const type = ${JSON.stringify(n)};
|
|
84
|
+
const limit = ${s};
|
|
85
|
+
const targetPhotoId = ${JSON.stringify(i)};
|
|
86
|
+
const pageSize = ${U};
|
|
87
|
+
const resolveDoubanPhotoAssetUrl = ${c};
|
|
88
88
|
|
|
89
89
|
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
90
90
|
const toAbsoluteUrl = (value) => {
|
|
@@ -191,7 +191,7 @@ import{ArgumentError as V,CliError as W,EmptyResultError as K}from"@jackwener/op
|
|
|
191
191
|
photos,
|
|
192
192
|
};
|
|
193
193
|
})()
|
|
194
|
-
`),
|
|
194
|
+
`),h=Array.isArray(m?.photos)?m.photos:[];if(!h.length)throw new b("douban photos","No photos found. Try a different subject ID or a different --type value such as Rb.");return{subjectId:r,subjectTitle:String(m?.subjectTitle||"").trim(),type:n,photos:h}}export async function loadDoubanBookHot(t,e){const o=f(e);await t.goto("https://book.douban.com/chart");await t.wait(4);await u(t);const r=await t.evaluate(`
|
|
195
195
|
(() => {
|
|
196
196
|
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
197
197
|
const books = [];
|
|
@@ -225,9 +225,9 @@ import{ArgumentError as V,CliError as W,EmptyResultError as K}from"@jackwener/op
|
|
|
225
225
|
});
|
|
226
226
|
} catch {}
|
|
227
227
|
}
|
|
228
|
-
return books.slice(0, ${
|
|
228
|
+
return books.slice(0, ${o});
|
|
229
229
|
})()
|
|
230
|
-
`);return Array.isArray(
|
|
230
|
+
`);return Array.isArray(r)?r:[]}export async function loadDoubanMovieHot(t,e){const o=f(e);await t.goto("https://movie.douban.com/chart");await t.wait(4);await u(t);const r=await t.evaluate(`
|
|
231
231
|
(() => {
|
|
232
232
|
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
233
233
|
const results = [];
|
|
@@ -254,14 +254,14 @@ import{ArgumentError as V,CliError as W,EmptyResultError as K}from"@jackwener/op
|
|
|
254
254
|
url,
|
|
255
255
|
cover: el.querySelector('img')?.getAttribute('src') || '',
|
|
256
256
|
});
|
|
257
|
-
if (results.length >= ${
|
|
257
|
+
if (results.length >= ${o}) break;
|
|
258
258
|
}
|
|
259
259
|
return results;
|
|
260
260
|
})()
|
|
261
|
-
`),
|
|
261
|
+
`),n=Array.isArray(r)?r:[];if(!n.length)throw new b("douban movie-hot","No movie chart rows were parsed from movie.douban.com/chart.");return n}export function inferDoubanSearchResultType(t,e={}){const o=String(t||"").trim()||"movie";if(o!=="movie")return o;if((String(e.moreUrl||e.more_url||"").trim().match(/is_tv:\s*['"]?([01])['"]?/)?.[1]||"")==="1")return"tvshow";return(Array.isArray(e.labels)?e.labels.map((s)=>typeof s==="string"?s.trim():String(s?.text||"").trim()).filter(Boolean):[]).includes("剧集")?"tvshow":o}export async function searchDouban(t,e,o,r){const n=f(r),i=inferDoubanSearchResultType.toString(),s=N(e,o),c=await g(async()=>{await t.goto(s,{waitUntil:"load",settleMs:1500});await u(t);await t.wait({selector:P,timeout:8}).catch(()=>{});return t.evaluate(`
|
|
262
262
|
(async () => {
|
|
263
|
-
const type = ${JSON.stringify(
|
|
264
|
-
const inferDoubanSearchResultType = ${
|
|
263
|
+
const type = ${JSON.stringify(e)};
|
|
264
|
+
const inferDoubanSearchResultType = ${i};
|
|
265
265
|
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
266
266
|
const seen = new Set();
|
|
267
267
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -304,11 +304,11 @@ import{ArgumentError as V,CliError as W,EmptyResultError as K}from"@jackwener/op
|
|
|
304
304
|
url,
|
|
305
305
|
cover: el.querySelector('img')?.getAttribute('src') || '',
|
|
306
306
|
});
|
|
307
|
-
if (results.length >= ${
|
|
307
|
+
if (results.length >= ${n}) break;
|
|
308
308
|
}
|
|
309
309
|
return results;
|
|
310
310
|
})()
|
|
311
|
-
`)});return Array.isArray(
|
|
311
|
+
`)});return Array.isArray(c)?c:[]}export async function getSelfUid(t){await t.goto("https://movie.douban.com/mine");await t.wait({time:2});const e=await t.evaluate(`
|
|
312
312
|
(() => {
|
|
313
313
|
// 方案1: 尝试从全局变量获取
|
|
314
314
|
if (window.__DATA__ && window.__DATA__.uid) {
|
|
@@ -341,4 +341,4 @@ import{ArgumentError as V,CliError as W,EmptyResultError as K}from"@jackwener/op
|
|
|
341
341
|
|
|
342
342
|
return '';
|
|
343
343
|
})()
|
|
344
|
-
`);if(!
|
|
344
|
+
`);if(!e)throw Error("Not logged in to Douban. Please login in Chrome first.");return e}
|
package/clis/doubao/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as a,CommandExecutionError as e}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as s}from"../_shared/site-auth.js";async function i(o){return(await o.getCookies({url:"https://www.doubao.com"})).some((r)=>r.name==="passport_csrf_token"&&r.value)}async function n(o){if(!await i(o))throw new a("www.doubao.com","Doubao passport_csrf_token cookie missing");await o.goto("https://www.doubao.com/chat/");await o.wait(3);const t=await o.evaluate(`(async () => {
|
|
2
2
|
try {
|
|
3
3
|
const res = await fetch('/passport/account/info/v2/', { credentials: 'include', headers: { 'Accept': 'application/json' } });
|
|
4
4
|
if (res.status === 401 || res.status === 403) {
|
|
@@ -18,11 +18,11 @@ import{AuthRequiredError as F,CommandExecutionError as G}from"@jackwener/opencli
|
|
|
18
18
|
} catch (e) {
|
|
19
19
|
return { kind: 'exception', detail: String(e && e.message || e) };
|
|
20
20
|
}
|
|
21
|
-
})()`);if(
|
|
21
|
+
})()`);if(t?.kind==="auth")throw new a("www.doubao.com",t.detail);if(t?.kind==="http")throw new e(`HTTP ${t.httpStatus} from /passport/account/info`);if(t?.kind==="exception")throw new e(`Doubao whoami failed: ${t.detail}`);if(!t?.ok)throw new e(`Unexpected Doubao probe: ${JSON.stringify(t)}`);return{user_id:t.user_id,name:t.name}}s({site:"doubao",domain:"www.doubao.com",loginUrl:"https://www.doubao.com/chat/",columns:["user_id","name"],verify:n,poll:async(o)=>{if(!await o.evaluate(`(async () => {
|
|
22
22
|
try {
|
|
23
23
|
const r = await fetch('/passport/account/info/v2/', { credentials: 'include', headers: { Accept: 'application/json' } });
|
|
24
24
|
if (!r.ok) return false;
|
|
25
25
|
const d = await r.json();
|
|
26
26
|
return !!(d?.data?.user_id_str);
|
|
27
27
|
} catch { return false; }
|
|
28
|
-
})()`))throw new
|
|
28
|
+
})()`))throw new a("www.doubao.com","Waiting for Doubao login");return n(o)}});
|