publishport-opencli 1.0.20 → 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/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 +17 -17
- 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/osv/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as o,CommandExecutionError as s,EmptyResultError as c}from"@jackwener/opencli/errors";export const OSV_BASE="https://api.osv.dev";const u="opencli-osv-adapter (+https://github.com/jackwener/OpenCLI)",h=/^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$/;export const OSV_ECOSYSTEMS=new Set(["npm","PyPI","Go","Maven","NuGet","RubyGems","crates.io","Packagist","Pub","Hex","Hackage","CRAN","Bitnami","GitHub Actions","SwiftURL"]);export function requireString(r,t){const e=String(r??"").trim();if(!e)throw new o(`osv ${t} cannot be empty`);return e}export function requireVulnId(r){const t=String(r??"").trim();if(!t)throw new o('osv vulnerability id is required (e.g. "GHSA-29mw-wpgm-hmr9", "CVE-2020-28500")',"IDs are listed at https://osv.dev — paste the canonical id from the vulnerability page.");if(!h.test(t))throw new o(`osv vulnerability id "${r}" is not a valid OSV id`,'IDs are short ASCII tokens like "GHSA-...", "CVE-...", "PYSEC-...".');return t}export function requireEcosystem(r){const t=String(r??"").trim();if(!t)throw new o("osv --ecosystem is required when querying by package",`Pick one of: ${[...OSV_ECOSYSTEMS].join(", ")}.`);if(!OSV_ECOSYSTEMS.has(t))throw new o(`osv --ecosystem "${r}" is not a recognised OSV ecosystem`,`Pick one of: ${[...OSV_ECOSYSTEMS].join(", ")}.`);return t}export function requireBoundedInt(r,t,e,n="limit"){const i=r??t,a=typeof i==="number"?i:Number(i);if(!Number.isInteger(a)||a<=0)throw new o(`osv ${n} must be a positive integer`);if(a>e)throw new o(`osv ${n} must be <= ${e}`);return a}async function f(r,t){let e;try{e=await r.json()}catch(n){throw new s(`${t} returned malformed JSON: ${n?.message??n}`)}return e}export async function osvGet(r,t){let e;try{e=await fetch(r,{headers:{"user-agent":u,accept:"application/json"}})}catch(n){throw new s(`${t} request failed: ${n?.message??n}`,"Check that api.osv.dev is reachable from this network.")}if(e.status===404)throw new c(t,`OSV.dev returned 404 for ${r}.`);if(e.status===429)throw new s(`${t} returned HTTP 429 (rate limited)`);if(!e.ok)throw new s(`${t} returned HTTP ${e.status}`);return f(e,t)}export async function osvPost(r,t,e){let n;try{n=await fetch(r,{method:"POST",headers:{"user-agent":u,accept:"application/json","content-type":"application/json"},body:JSON.stringify(t)})}catch(i){throw new s(`${e} request failed: ${i?.message??i}`,"Check that api.osv.dev is reachable from this network.")}if(n.status===404)throw new c(e,`OSV.dev returned 404 for ${r}.`);if(n.status===429)throw new s(`${e} returned HTTP 429 (rate limited)`);if(!n.ok){const i=await n.text().catch(()=>"");throw new s(`${e} returned HTTP ${n.status}${i?`: ${i.slice(0,200)}`:""}`)}return f(n,e)}export function severityLabel(r){const t=r?.database_specific;if(t&&typeof t.severity==="string"&&t.severity.trim())return t.severity.trim();const e=Array.isArray(r?.severity)?r.severity:[];for(const n of e)if(n&&typeof n.score==="string"&&n.score.trim())return n.score.trim();return null}export function trimDate(r){const t=String(r??"").trim();if(!t)return null;const e=t.replace(/\.\d+/,"");return e.endsWith("Z")?e:t.length>=10?t.slice(0,10):null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as m,Strategy as u}from"@jackwener/opencli/registry";import{EmptyResultError as y}from"@jackwener/opencli/errors";import{OSV_BASE as v,osvGet as p,requireVulnId as g,severityLabel as b,trimDate as n}from"./utils.js";m({site:"osv",name:"vulnerability",access:"read",description:"Single OSV.dev vulnerability detail (severity, affected packages, CVE/GHSA aliases)",domain:"osv.dev",strategy:u.PUBLIC,browser:!1,args:[{name:"id",positional:!0,type:"string",required:!0,help:'OSV vulnerability id (e.g. "GHSA-29mw-wpgm-hmr9", "CVE-2020-28500")'}],columns:["id","summary","severity","aliases","published","modified","affectedPackages","cwes","referenceCount","url"],func:async(o)=>{const
|
|
1
|
+
import{cli as m,Strategy as u}from"@jackwener/opencli/registry";import{EmptyResultError as y}from"@jackwener/opencli/errors";import{OSV_BASE as v,osvGet as p,requireVulnId as g,severityLabel as b,trimDate as n}from"./utils.js";m({site:"osv",name:"vulnerability",access:"read",description:"Single OSV.dev vulnerability detail (severity, affected packages, CVE/GHSA aliases)",domain:"osv.dev",strategy:u.PUBLIC,browser:!1,args:[{name:"id",positional:!0,type:"string",required:!0,help:'OSV vulnerability id (e.g. "GHSA-29mw-wpgm-hmr9", "CVE-2020-28500")'}],columns:["id","summary","severity","aliases","published","modified","affectedPackages","cwes","referenceCount","url"],func:async(o)=>{const r=g(o.id),e=await p(`${v}/v1/vulns/${encodeURIComponent(r)}`,`osv vulnerability ${r}`);if(!e||!e.id)throw new y("osv vulnerability",`OSV.dev returned no record for "${r}".`);const c=Array.isArray(e.affected)?e.affected:[],i=[];for(const s of c){const a=s?.package?.ecosystem,t=s?.package?.name;if(a&&t)i.push(`${a}:${t}`)}const d=Array.isArray(e.aliases)?e.aliases.filter(Boolean):[],l=Array.isArray(e?.database_specific?.cwe_ids)?e.database_specific.cwe_ids:[],f=Array.isArray(e.references)?e.references:[];return[{id:String(e.id),summary:String(e.summary??"").trim(),severity:b(e),aliases:d.join(", "),published:n(e.published),modified:n(e.modified),affectedPackages:i.join(", "),cwes:l.join(", "),referenceCount:f.length,url:`https://osv.dev/vulnerability/${e.id}`}]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as l,Strategy as c}from"@jackwener/opencli/registry";import{CommandExecutionError as g}from"@jackwener/opencli/errors";import{PACKAGIST_BASE as p,packagistFetch as
|
|
1
|
+
import{cli as l,Strategy as c}from"@jackwener/opencli/registry";import{CommandExecutionError as g}from"@jackwener/opencli/errors";import{PACKAGIST_BASE as p,packagistFetch as m,pickStableVersion as u,requirePackageName as d,trimDate as y}from"./utils.js";l({site:"packagist",name:"package",access:"read",description:"Fetch a Packagist package's metadata (version, downloads, license, repo, GitHub stars)",domain:"packagist.org",strategy:c.PUBLIC,browser:!1,args:[{name:"name",positional:!0,required:!0,help:'Composer package "<vendor>/<package>" (e.g. "symfony/console", "monolog/monolog")'}],columns:["package","version","releasedAt","license","description","repository","githubStars","favers","downloads","monthlyDownloads","dailyDownloads","url"],func:async(s)=>{const{full:o}=d(s.name),n=`${p}/packages/${o}.json`,e=(await m(n,"packagist package"))?.package;if(!e||typeof e!=="object")throw new g(`packagist package returned no "package" object for ${o}.`);const r=u(e.versions),t=r?e.versions?.[r]:null,i=Array.isArray(t?.license)?t.license.filter(Boolean).join(", "):"",a=e.downloads??{};return[{package:String(e.name??o).trim(),version:r?String(r):"",releasedAt:y(t?.time),license:i,description:String(e.description??"").trim(),repository:String(e.repository??"").trim(),githubStars:e.github_stars!=null?Number(e.github_stars):null,favers:e.favers!=null?Number(e.favers):null,downloads:a.total!=null?Number(a.total):null,monthlyDownloads:a.monthly!=null?Number(a.monthly):null,dailyDownloads:a.daily!=null?Number(a.daily):null,url:`https://packagist.org/packages/${o}`}]}});
|
package/clis/packagist/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as c,Strategy as
|
|
1
|
+
import{cli as c,Strategy as l}from"@jackwener/opencli/registry";import{EmptyResultError as p}from"@jackwener/opencli/errors";import{PACKAGIST_BASE as m,packagistFetch as u,requireBoundedInt as g,requireString as d}from"./utils.js";c({site:"packagist",name:"search",access:"read",description:"Search Packagist (PHP / Composer) packages by keyword",domain:"packagist.org",strategy:l.PUBLIC,browser:!1,args:[{name:"query",positional:!0,required:!0,help:'Search keyword (e.g. "symfony", "laravel http")'},{name:"limit",type:"int",default:30,help:"Max packages (1-100, single Packagist page)"}],columns:["rank","package","description","downloads","favers","repository","url"],func:async(r)=>{const a=d(r.query,"query"),t=g(r.limit,30,100),n=`${m}/search.json?q=${encodeURIComponent(a)}&per_page=${t}`,s=await u(n,"packagist search"),i=Array.isArray(s?.results)?s.results:[];if(!i.length)throw new p("packagist search",`No Packagist packages matched "${a}".`);return i.slice(0,t).map((e,o)=>({rank:o+1,package:String(e.name??"").trim(),description:String(e.description??"").trim(),downloads:e.downloads!=null?Number(e.downloads):null,favers:e.favers!=null?Number(e.favers):null,repository:String(e.repository??"").trim(),url:String(e.url??"").trim()}))}});
|
package/clis/packagist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as s,CommandExecutionError as i,EmptyResultError as p}from"@jackwener/opencli/errors";export const PACKAGIST_BASE="https://packagist.org";const g="opencli-packagist-adapter (+https://github.com/jackwener/OpenCLI)",c=/^[a-z0-9]([_.-]?[a-z0-9]+)*$/;export function requireString(n,t){const e=String(n??"").trim();if(!e)throw new s(`packagist ${t} cannot be empty`);return e}export function requireBoundedInt(n,t,e,o="limit"){const r=n??t,a=typeof r==="number"?r:Number(r);if(!Number.isInteger(a)||a<=0)throw new s(`packagist ${o} must be a positive integer`);if(a>e)throw new s(`packagist ${o} must be <= ${e}`);return a}export function requirePackageName(n){const t=String(n??"").trim().toLowerCase();if(!t)throw new s('packagist package name is required (e.g. "symfony/console", "monolog/monolog")');const e=t.indexOf("/");if(e<=0||e===t.length-1)throw new s(`packagist package "${n}" must be "<vendor>/<package>"`,"Both segments are required (Composer convention).");const o=t.slice(0,e),r=t.slice(e+1);if(o.length>100||r.length>100||!c.test(o)||!c.test(r))throw new s(`packagist package "${n}" is not a valid Composer name`,'Use lowercase letters / digits / "_-.", segments separated by single "_-." chars (max 100 chars each).');return{vendor:o,package:r,full:`${o}/${r}`}}export async function packagistFetch(n,t){let e;try{e=await fetch(n,{headers:{"user-agent":g,accept:"application/json"}})}catch(r){throw new i(`${t} request failed: ${r?.message??r}`,"Check that packagist.org is reachable from this network.")}if(e.status===404)throw new p(t,`Packagist returned 404 for ${n}.`);if(e.status===429)throw new i(`${t} returned HTTP 429 (rate limited)`,"Packagist throttles bursts; wait a few seconds and retry.");if(!e.ok)throw new i(`${t} returned HTTP ${e.status}`);let o;try{o=await e.json()}catch(r){throw new i(`${t} returned malformed JSON: ${r?.message??r}`)}return o}export function trimDate(n){const t=String(n??"").trim();if(!t)return null;return t.replace(/\.\d+/,"").replace(/(?:[+-]\d{2}:?\d{2}|Z)?$/,"Z")}export function pickStableVersion(n){if(!n||typeof n!=="object")return null;const t=Object.keys(n);if(!t.length)return null;const e=/(?:^|[._\-+])(?:dev|alpha|beta|rc|pre|nightly)(?:[._\-+\d]|$)/i,o=/\.x-dev$|-dev$/i;for(const r of t){if(o.test(r))continue;if(e.test(r))continue;return r}return t[0]}
|
package/clis/pinterest/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CommandExecutionError as
|
|
1
|
+
import{CommandExecutionError as u}from"@jackwener/opencli/errors";export function pinUrlEncode(e){return encodeURIComponent(String(e))}export function encodeResourceBody({options:e,context:r=null,sourceUrl:t},n=Date.now()){const o=JSON.stringify({options:e??{},context:r});return`source_url=${pinUrlEncode(t)}&data=${pinUrlEncode(o)}&_=${n}`}export function csrfTokenFromCookies(e){const r=(e||[]).find((t)=>t&&t.name==="csrftoken");return r?r.value:""}export function writeHeaders(e){return{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8",...e?{"X-CSRFToken":e}:{}}}export function parseResourceData(e,r="resource"){const t=e&&e.resource_response,n=t&&t.data;if(n===void 0||n===null){const o=t&&(t.error||t.message);throw new u(`Pinterest ${r} returned no data${o?": "+JSON.stringify(o):""}`)}return n}export function buildBoardsOptions(e){return{page_size:50,privacy_filter:"all",sort:"custom",username:e,isPrefetch:!1,include_archived:!0,field_set_key:"profile_grid_item",group_by:"visibility"}}export function buildCreateBoardOptions(e,{description:r="",privacy:t="public"}={}){return{name:String(e),description:String(r||""),category:"other",privacy:t==="secret"||t==="private"?"secret":"public",layout:"default"}}export function selectBoardByName(e,r){const t=String(r??"").trim().toLowerCase();return(e||[]).find((n)=>n&&String(n.name??"").toLowerCase()===t)||null}export function buildPinOptions({boardId:e,imageUrl:r,title:t="",description:n="",link:o="",altText:i=""}){return{board_id:String(e),image_url:r,title:String(t||""),description:String(n||""),link:o?String(o):r,alt_text:String(i||""),method:"uploaded",scrape_metric:{source:"www_url_scrape"},section:null}}
|
package/clis/pinterest/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as i}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as o}from"../_shared/site-auth.js";import{resolvePinterestUser as w}from"./client.js";async function s(e){return(await e.getCookies({url:"https://www.pinterest.com"})).some((n)=>n.name==="_pinterest_sess")}async function r(e){if(!await s(e))throw new i("www.pinterest.com","Pinterest _pinterest_sess cookie missing");const t=await w(e);return{username:t,url:`https://www.pinterest.com/${t}/`}}o({site:"pinterest",domain:"www.pinterest.com",loginUrl:"https://www.pinterest.com/login/",columns:["username","url"],quickCheck:s,verify:r,poll:async(e)=>{if(!await s(e))throw new i("www.pinterest.com","Waiting for Pinterest session cookie");return r(e)}});
|
package/clis/pinterest/boards.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as s,Strategy as i}from"@jackwener/opencli/registry";import{ArgumentError as u,CommandExecutionError as
|
|
1
|
+
import{cli as s,Strategy as i}from"@jackwener/opencli/registry";import{ArgumentError as u,CommandExecutionError as n}from"@jackwener/opencli/errors";import{buildBoardsOptions as p,buildCreateBoardOptions as w,csrfTokenFromCookies as l}from"./api.js";import{pinGet as b,pinCreate as f,resolvePinterestUser as a}from"./client.js";function c(r,e){return{id:String(r?.id??""),name:r?.name??e??"",url:r?.url?`https://www.pinterest.com${r.url}`:""}}s({site:"pinterest",name:"boards",access:"read",description:"List your Pinterest boards",domain:"www.pinterest.com",strategy:i.COOKIE,browser:!0,args:[],columns:["id","name","url"],func:async(r)=>{if(!r)throw new n("Browser session required for pinterest boards");const e=await a(r),t=await b(r,{resource:"BoardsResource",sourceUrl:`/${e}/boards/`,options:p(e),label:"boards"});return(Array.isArray(t)?t:[]).map((o)=>c(o))}});s({site:"pinterest",name:"board-create",access:"write",description:"Create a new Pinterest board",domain:"www.pinterest.com",strategy:i.COOKIE,browser:!0,args:[{name:"name",type:"string",required:!0,positional:!0,help:"Board name"},{name:"description",type:"string",help:"Board description"},{name:"privacy",type:"string",default:"public",help:"public | secret"}],columns:["id","name","url"],func:async(r,e)=>{if(!r)throw new n("Browser session required for pinterest board-create");const t=String(e.name??"").trim();if(!t)throw new u("board name is required");const o=await a(r),d=l(await r.getCookies({url:"https://www.pinterest.com"})),m=await f(r,{resource:"BoardResource",sourceUrl:`/${o}/boards/`,options:w(t,{description:e.description,privacy:e.privacy}),csrf:d,label:"board-create"});return c(m,t)}});
|
package/clis/pinterest/client.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as u,CommandExecutionError as w}from"@jackwener/opencli/errors";import{encodeResourceBody as d,writeHeaders as f,parseResourceData as p}from"./api.js";const c="https://www.pinterest.com";export function unwrap(t){if(t&&typeof t==="object"&&!Array.isArray(t)&&"session"in t&&"data"in t)return t.data;return t}export async function pageFetch(t,{url:e,method:a="GET",headers:o={},body:r=null}){const n=`(async () => {
|
|
2
2
|
try {
|
|
3
|
-
const opts = { method: ${JSON.stringify(
|
|
4
|
-
${
|
|
5
|
-
const res = await fetch(${JSON.stringify(
|
|
3
|
+
const opts = { method: ${JSON.stringify(a)}, credentials: 'include', headers: ${JSON.stringify(o)} };
|
|
4
|
+
${r!=null?`opts.body = ${JSON.stringify(r)};`:""}
|
|
5
|
+
const res = await fetch(${JSON.stringify(e)}, opts);
|
|
6
6
|
const text = await res.text();
|
|
7
7
|
let data = null; try { data = JSON.parse(text); } catch {}
|
|
8
8
|
return { ok: res.ok, status: res.status, data, text: text.slice(0, 300) };
|
|
9
9
|
} catch (e) { return { ok: false, status: 0, data: null, text: String(e && e.message || e) }; }
|
|
10
|
-
})()`;return unwrap(await
|
|
10
|
+
})()`;return unwrap(await t.evaluate(n))}export async function pinGet(t,{resource:e,sourceUrl:a,options:o,label:r}){const n=d({options:o,sourceUrl:a}),s=await pageFetch(t,{url:`${c}/resource/${e}/get/?${n}`,headers:{Accept:"application/json"}});if(s.status===401||s.status===403)throw new u("www.pinterest.com",`${r||e} HTTP ${s.status}`);if(!s.ok)throw new w(`Pinterest ${r||e} failed: HTTP ${s.status} ${s.text}`);return p(s.data,r||e)}export async function pinCreate(t,{resource:e,sourceUrl:a,options:o,csrf:r,label:n}){const s=d({options:o,sourceUrl:a}),i=await pageFetch(t,{url:`${c}/resource/${e}/create/`,method:"POST",headers:{Accept:"application/json",...f(r)},body:s});if(i.status===401||i.status===403)throw new u("www.pinterest.com",`${n||e} HTTP ${i.status}`);if(!i.ok)throw new w(`Pinterest ${n||e} failed: HTTP ${i.status} ${i.text}`);return p(i.data,n||e)}export async function resolvePinterestUser(t){await t.goto(`${c}/`);const e=unwrap(await t.evaluate(`(() => {
|
|
11
11
|
try {
|
|
12
12
|
const p = window.__PWS_INITIAL_PROPS__ || window.__PWS_DATA__ || {};
|
|
13
13
|
const rs = p.initialReduxState || p.reduxState || {};
|
|
@@ -17,4 +17,4 @@ import{AuthRequiredError as Y,CommandExecutionError as $}from"@jackwener/opencli
|
|
|
17
17
|
if (!u && sess.userId && rs.users && rs.users[sess.userId]) u = rs.users[sess.userId].username;
|
|
18
18
|
return u || null;
|
|
19
19
|
} catch (e) { return null; }
|
|
20
|
-
})()`));if(!
|
|
20
|
+
})()`));if(!e)throw new u("www.pinterest.com","Could not resolve Pinterest username — not logged in?");return String(e)}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import*as g from"node:fs";import*as
|
|
1
|
+
import*as g from"node:fs";import*as m from"node:path";import{cli as x,Strategy as O}from"@jackwener/opencli/registry";import{ArgumentError as n,CommandExecutionError as b}from"@jackwener/opencli/errors";import{buildBoardsOptions as R,buildCreateBoardOptions as B,buildPinOptions as I,selectBoardByName as P,csrfTokenFromCookies as _}from"./api.js";import{pinGet as q,pinCreate as w,resolvePinterestUser as N,pageFetch}from"./client.js";const A=new Set([".jpg",".jpeg",".png",".gif",".webp"]);async function h(i,t,s){const r=m.resolve(t);if(!A.has(m.extname(r).toLowerCase()))throw new n(`Unsupported image (jpg/png/gif/webp): ${t}`);const l=g.statSync(r,{throwIfNoEntry:!1});if(!l||!l.isFile())throw new n(`Not a file: ${r}`);const p=g.readFileSync(r).toString("base64"),d=m.basename(r),c={"X-Requested-With":"XMLHttpRequest","X-UPLOAD-SOURCE":"pinner_uploader",...s?{"X-CSRFToken":s}:{}},a=await i.evaluate(`(async () => {
|
|
2
2
|
try {
|
|
3
|
-
const bin = atob(${JSON.stringify(
|
|
3
|
+
const bin = atob(${JSON.stringify(p)});
|
|
4
4
|
const arr = new Uint8Array(bin.length);
|
|
5
5
|
for (let i = 0; i < bin.length; i++) arr[i] = bin.charCodeAt(i);
|
|
6
6
|
const fd = new FormData();
|
|
7
|
-
fd.append('img', new Blob([arr]), ${JSON.stringify(
|
|
8
|
-
const res = await fetch('https://www.pinterest.com/upload-image/', { method: 'POST', credentials: 'include', headers: ${JSON.stringify(
|
|
7
|
+
fd.append('img', new Blob([arr]), ${JSON.stringify(d)});
|
|
8
|
+
const res = await fetch('https://www.pinterest.com/upload-image/', { method: 'POST', credentials: 'include', headers: ${JSON.stringify(c)}, body: fd });
|
|
9
9
|
const text = await res.text();
|
|
10
10
|
let data = null; try { data = JSON.parse(text); } catch {}
|
|
11
11
|
return { ok: res.ok, status: res.status, data, text: text.slice(0, 300) };
|
|
12
12
|
} catch (e) { return { ok: false, status: 0, data: null, text: String(e && e.message || e) }; }
|
|
13
|
-
})()`),e=a&&typeof a==="object"&&"session"in a&&"data"in a?a.data:a,
|
|
13
|
+
})()`),e=a&&typeof a==="object"&&"session"in a&&"data"in a?a.data:a,o=e&&e.data&&(e.data.image_url||e.data.url||e.data.success&&e.data.success.image_url);if(!e||!e.ok||!o)throw new b(`Pinterest image upload failed (best-effort): HTTP ${e?e.status:"?"} ${e?e.text:""}. Prefer --image-url.`);return o}x({site:"pinterest",name:"pin",access:"write",description:"Create a pin on a board with an optional destination link",domain:"www.pinterest.com",strategy:O.COOKIE,browser:!0,args:[{name:"title",type:"string",required:!0,positional:!0,help:"Pin title"},{name:"image-url",type:"string",help:"Image URL to pin (required unless --image)"},{name:"image",type:"string",help:"(best-effort) local image file to upload"},{name:"board",type:"string",required:!0,help:"Target board name"},{name:"description",fromFile:!0,type:"string",help:"Pin description"},{name:"link",type:"string",help:"Destination/landing URL (defaults to the image URL)"},{name:"create-board",type:"boolean",default:!1,help:"Create the board if it does not exist"}],columns:["status","pin_id","url"],func:async(i,t)=>{if(!i)throw new b("Browser session required for pinterest pin");const s=String(t.title??"").trim();if(!s)throw new n("pin title is required");const r=String(t.board??"").trim();if(!r)throw new n("--board is required");const l=t["image-url"]?String(t["image-url"]):"",p=t.image?String(t.image):"";if(!l&&!p)throw new n("provide --image-url (or --image local file)");const d=await N(i),c=_(await i.getCookies({url:"https://www.pinterest.com"})),a=await q(i,{resource:"BoardsResource",sourceUrl:`/${d}/boards/`,options:R(d),label:"boards"}),e=Array.isArray(a)?a:[];let o=P(e,r);if(!o){if(!t["create-board"]){const U=e.map((C)=>C.name).join(", ")||"(none)";throw new n(`Board "${r}" not found. Available: ${U} (use --create-board to create it)`)}o=await w(i,{resource:"BoardResource",sourceUrl:`/${d}/boards/`,options:B(r,{}),csrf:c,label:"board-create"})}const f=l||await h(i,p,c),y=I({boardId:String(o.id),imageUrl:f,title:s,description:t.description,link:t.link}),S=await w(i,{resource:"PinResource",sourceUrl:`/pin/find/?url=${encodeURIComponent(f)}`,options:y,csrf:c,label:"pin"}),u=String(S.id??"");return{status:"published",pin_id:u,url:u?`https://www.pinterest.com/pin/${u}/`:""}}});export const __test__={uploadLocalImage:h};export{pageFetch};
|
package/clis/pixiv/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as e,CommandExecutionError as n}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as o}from"../_shared/site-auth.js";async function r(i){return(await i.getCookies({url:"https://www.pixiv.net"})).some((s)=>s.name==="PHPSESSID"&&/^\d+_/.test(s.value||""))}async function a(i){if(!await r(i))throw new e("pixiv.net","Pixiv PHPSESSID cookie missing");await i.goto("https://www.pixiv.net/");await i.wait(2);const t=await i.evaluate(`(async () => {
|
|
2
2
|
try {
|
|
3
3
|
const r = await fetch('/touch/ajax/user/self/status', { credentials: 'include', headers: { Accept: 'application/json' } });
|
|
4
4
|
if (r.status === 401 || r.status === 403) {
|
|
@@ -14,4 +14,4 @@ import{AuthRequiredError as D,CommandExecutionError as F}from"@jackwener/opencli
|
|
|
14
14
|
} catch (e) {
|
|
15
15
|
return { kind: 'exception', detail: String(e && e.message || e) };
|
|
16
16
|
}
|
|
17
|
-
})()`);if(
|
|
17
|
+
})()`);if(t?.kind==="auth")throw new e("pixiv.net",t.detail);if(t?.kind==="http")throw new n(`HTTP ${t.httpStatus} from Pixiv ajax`);if(t?.kind==="exception")throw new n(`Pixiv whoami failed: ${t.detail}`);if(!t?.ok)throw new n(`Unexpected Pixiv probe: ${JSON.stringify(t)}`);return{user_id:t.user_id,name:t.name}}o({site:"pixiv",domain:"pixiv.net",loginUrl:"https://accounts.pixiv.net/login",columns:["user_id","name"],quickCheck:r,verify:a,poll:async(i)=>{if(!await r(i))throw new e("pixiv.net","Waiting for Pixiv PHPSESSID cookie");return a(i)}});
|
package/clis/pixiv/download.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as h from"node:fs";import*as a from"node:path";import{cli as x,Strategy as y}from"@jackwener/opencli/registry";import{formatCookieHeader as v,httpDownload as I}from"@jackwener/opencli/download";import{formatBytes as E}from"@jackwener/opencli/download/progress";import{CommandExecutionError as m,EmptyResultError as z,getErrorMessage as D}from"@jackwener/opencli/errors";import{pixivFetch as j}from"./utils.js";x({site:"pixiv",name:"download",access:"read",description:"Download illustration images from Pixiv",domain:"www.pixiv.net",strategy:y.COOKIE,args:[{name:"illust-id",positional:!0,required:!0,help:"Illustration ID"},{name:"output",default:"./pixiv-downloads",help:"Output directory"}],columns:["index","type","status","size"],func:async(u,l)=>{const t=String(l["illust-id"]??""),c=String(l.output??"./pixiv-downloads");if(!/^\d+$/.test(t))throw new m(`Invalid illustration ID: ${t}`);const i=await j(u,`/ajax/illust/${t}/pages`,{notFoundMsg:`Illustration not found: ${t}`});if(!Array.isArray(i))throw new m("Pixiv pages API returned malformed payload");if(i.length===0)throw new z("pixiv download",`No images found for illustration ${t}.`);const f=v(await u.getCookies({domain:"pixiv.net"})),p=a.join(c,t);h.mkdirSync(p,{recursive:!0});const o=[];for(let e=0;e<i.length;e++){const d=i[e],s=d.urls?.original||d.urls?.regular||"";if(!s){o.push({index:e+1,type:"image",status:"failed",size:"No URL"});continue}try{const n=a.extname(new URL(s).pathname)||".jpg",w=`${t}_p${e}${n}`,g=a.join(p,w),r=await I(s,g,{cookies:f,headers:{Referer:"https://www.pixiv.net/"},timeout:60000});o.push({index:e+1,type:"image",status:r.success?"success":"failed",size:r.success?E(r.size):r.error||"unknown error"})}catch(n){o.push({index:e+1,type:"image",status:"failed",size:D(n)})}}return o}});
|
package/clis/pixiv/illusts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as f,Strategy as g}from"@jackwener/opencli/registry";import{CommandExecutionError as w}from"@jackwener/opencli/errors";import{pixivFetch as n,BATCH_SIZE as u}from"./utils.js";f({site:"pixiv",name:"illusts",access:"read",description:"List a Pixiv artist's illustrations",domain:"www.pixiv.net",strategy:g.COOKIE,args:[{name:"user-id",positional:!0,required:!0,help:"Pixiv user ID"},{name:"limit",type:"int",default:20,help:"Number of results"}],columns:["rank","title","illust_id","pages","bookmarks","tags","created","url"],func:async(a,o)=>{const e=String(o["user-id"]??""),c=Number(o.limit)||20;if(!/^\d+$/.test(e))throw new w(`Invalid user ID: ${e}`);const m=await n(a,`/ajax/user/${e}/profile/all`,{notFoundMsg:`User not found: ${e}`}),s=Object.keys(m?.illusts||{}).sort((i,r)=>Number(r)-Number(i)).slice(0,c);if(s.length===0)return[];const l={};for(let i=0;i<s.length;i+=u){const t=s.slice(i,i+u).map((p)=>`ids[]=${p}`).join("&"),d=await n(a,`/ajax/user/${e}/profile/illusts?${t}&work_category=illustManga&is_first_page=${i===0?1:0}`);Object.assign(l,d?.works||{})}return s.map((i,r)=>{const t=l[i];if(!t)return null;return{rank:r+1,title:t.title||"",illust_id:t.id,pages:t.pageCount||1,bookmarks:t.bookmarkCount||0,tags:(t.tags||[]).slice(0,5).join(", "),created:(t.createDate||"").split("T")[0],url:"https://www.pixiv.net/artworks/"+t.id}}).filter(Boolean)}});
|
package/clis/pixiv/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as p,Strategy as n}from"@jackwener/opencli/registry";import{pixivFetch as m}from"./utils.js";p({site:"pixiv",name:"search",access:"read",description:"Search Pixiv illustrations by keyword",domain:"www.pixiv.net",strategy:n.COOKIE,args:[{name:"query",positional:!0,required:!0,help:"Search keyword or tag"},{name:"limit",type:"int",default:20,help:"Number of results"},{name:"order",type:"str",default:"date_d",help:"Sort order",choices:["date_d","date","popular_d","popular_male_d","popular_female_d"]},{name:"mode",type:"str",default:"all",help:"Search mode",choices:["all","safe","r18"]},{name:"page",type:"int",default:1,help:"Page number"}],columns:["rank","title","author","user_id","illust_id","pages","bookmarks","tags","url"],func:async(t,r)=>{const{query:a,limit:o=20,order:s="date_d",mode:l="all",page:i=1}=r,d=encodeURIComponent(a);return((await m(t,`/ajax/search/illustrations/${d}`,{params:{word:a,order:s,mode:l,p:i,s_mode:"s_tag_full",type:"illust_and_ugoira"}}))?.illust?.data||[]).filter((e)=>e.id).slice(0,Number(o)).map((e,u)=>({rank:u+1,title:e.title||"",author:e.userName||"",user_id:e.userId||"",illust_id:e.id,pages:e.pageCount||1,bookmarks:e.bookmarkCount||0,tags:(e.tags||[]).slice(0,5).join(", "),url:"https://www.pixiv.net/artworks/"+e.id}))}});
|
package/clis/pixiv/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as m,CommandExecutionError as n}from"@jackwener/opencli/errors";const a="www.pixiv.net";function w(r){if(r&&!Array.isArray(r)&&typeof r==="object"&&"session"in r&&"data"in r)return r.data;return r}function u(r){if(!r||typeof r!=="object")return"";const i=[r.message,r.errorMessage,r.error?.message,r.error].find((o)=>typeof o==="string"&&o.trim());return i?i.trim():""}export async function pixivFetch(r,c,i={}){try{await r.goto(`https://${a}`)}catch(e){throw new n(`Pixiv navigation failed: ${e instanceof Error?e.message:String(e)}`)}const o=i.params?"?"+Object.entries(i.params).map(([e,s])=>`${e}=${encodeURIComponent(s)}`).join("&"):"",f=`https://${a}${c}${o}`;let t;try{t=w(await r.evaluate(`
|
|
2
2
|
(async () => {
|
|
3
|
-
const res = await fetch(${JSON.stringify(
|
|
3
|
+
const res = await fetch(${JSON.stringify(f)}, { credentials: 'include' });
|
|
4
4
|
const text = await res.text();
|
|
5
5
|
let json = null;
|
|
6
6
|
if (text) {
|
|
@@ -15,4 +15,4 @@ import{AuthRequiredError as U,CommandExecutionError as G}from"@jackwener/opencli
|
|
|
15
15
|
if (!json) return { __malformed: true, message: 'invalid JSON' };
|
|
16
16
|
return json;
|
|
17
17
|
})()
|
|
18
|
-
`))}catch(
|
|
18
|
+
`))}catch(e){throw new n(`Pixiv request failed: ${e instanceof Error?e.message:String(e)}`)}if(t?.__httpError){const e=t.__httpError;if(e===401||e===403)throw new m(a,"Authentication required — please log in to Pixiv in Chrome");const s=u(t);if(e===404)throw new n(s||i.notFoundMsg||"Pixiv resource not found (HTTP 404)");throw new n(s?`Pixiv request failed (HTTP ${e}): ${s}`:`Pixiv request failed (HTTP ${e})`)}if(!t||Array.isArray(t)||typeof t!=="object"||t.__malformed)throw new n("Pixiv request returned malformed JSON payload");if(t.error===!0)throw new n(u(t)||"Pixiv API returned an error");if(!("body"in t))throw new n("Pixiv request returned malformed API payload");return t?.body}export const BATCH_SIZE=48;
|
package/clis/powerchina/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as o,CommandExecutionError as a}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as s}from"../_shared/site-auth.js";async function i(e){return(await e.getCookies({url:"https://zhaopin.powerchina.cn"})).some((t)=>/^(Admin-Token|access_token)$/i.test(t.name)&&t.value)}async function r(e){if(!await i(e))throw new o("powerchina.cn","Powerchina session cookies missing — anonymous");await e.goto("https://zhaopin.powerchina.cn/index");await e.wait(3);const n=await e.evaluate(`
|
|
2
2
|
(() => {
|
|
3
3
|
if (/\\/login(\\b|$|\\?)/.test(location.pathname)) {
|
|
4
4
|
return { kind: 'auth', detail: 'Powerchina redirected to /login — anonymous' };
|
|
@@ -14,4 +14,4 @@ import{AuthRequiredError as D,CommandExecutionError as J}from"@jackwener/opencli
|
|
|
14
14
|
}
|
|
15
15
|
return { ok: true, name: userName };
|
|
16
16
|
})()
|
|
17
|
-
`);if(
|
|
17
|
+
`);if(n?.kind==="auth")throw new o("powerchina.cn",n.detail);if(!n?.ok)throw new a(`Unexpected Powerchina probe: ${JSON.stringify(n)}`);return{name:n.name}}s({site:"powerchina",domain:"powerchina.cn",loginUrl:"https://zhaopin.powerchina.cn/login",columns:["name"],quickCheck:i,verify:r,poll:async(e)=>{if(!await i(e))throw new o("powerchina.cn","Waiting for Powerchina session cookies");return r(e)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as b,Strategy as g}from"@jackwener/opencli/registry";import{AuthRequiredError as x,EmptyResultError as p}from"@jackwener/opencli/errors";import{cleanText as o,normalizeDate as l,toProcurementSearchRecords as E}from"../jianyu/shared/procurement-contract.js";import{searchRowsFromEntries as _}from"../jianyu/shared/china-bid-search.js";const m=["https://bid.powerchina.cn/search","https://bid.powerchina.cn/"],N="https://bid.powerchina.cn/newcbs/recpro-newmember/BidAnnouncementSummary/list",R="https://bid.powerchina.cn/newcbs/recpro-newmember/BidAnnouncementSummary/getInfo",I="招采公告",A=/(公告|招标|采购|中标|成交|项目|notice|tender|bidding)/i,S=/^(english|中文|chinese|language|home|首页|搜索|search)$/i,C=/(detached while handling command|execution context was destroyed|target closed|cannot find context with specified id)/i;export function buildSearchCandidates(t){const n=t.trim();if(!n)return[...m];const e=encodeURIComponent(n);return[`https://bid.powerchina.cn/search?keyword=${e}`,`https://bid.powerchina.cn/search?keywords=${e}`,`https://bid.powerchina.cn/search?q=${e}`,...m]}function h(t){const n=[],e=new Set;for(const r of t){const a=`${r.title} ${r.url}`;if(e.has(a))continue;e.add(a);n.push(r)}return n}function f(t){const n=o(t);if(!n)return!0;try{const e=new URL(n),r=e.pathname.toLowerCase().replace(/\/+$/,"")||"/",a=o(e.hash).toLowerCase();if(r==="/"||r==="/index")return!0;if(r==="/search")return!0;if(r==="/old"||r.startsWith("/old/"))return!0;if(r==="/en"||r.startsWith("/en/"))return!0;if(r==="/zh"||r.startsWith("/zh/"))return!0;if(a==="#/"||a==="#/index"||a.startsWith("#/search"))return!0;return!1}catch{return!0}}function w(t){const n=o(t);if(!n)return!0;const e=n.toLowerCase();if(S.test(e))return!0;if(e.length<=10&&(e==="en"||e==="zh"||e.includes("english")))return!0;return!1}function y(t){return t.filter((n)=>{const e=o(n.title),r=o(n.url);if(!r||!e)return!1;if(f(r))return!1;if(w(e)&&!A.test(e))return!1;return!0})}export function buildApiDetailUrl(t){const n=o(t);if(!n)return"";return`${R}/${encodeURIComponent(n)}`}function T(t){const n=o(t.id),e=o(t.title);if(!n||!e)return null;const r=buildApiDetailUrl(n);if(!r)return null;const a=o([t.announcementType,t.titleTypeName,t.source,t.publishTime,t.registrationDeadline,t.submissionDeadline,t.bidOpenTime].filter(Boolean).join(" | ")),s=l(o(t.publishTime||t.bidOpenTime||t.submissionDeadline||""));return{title:e,url:r,date:s,contextText:a}}async function L(t,n){const e=o(t),a={pageNum:1,pageSize:Math.max(20,Math.min(100,Math.max(n*3,n))),announcementType:I,companyType:"3",time:Date.now()};if(e)a.keyWords=e;const s=await fetch(N,{method:"POST",headers:{"Content-Type":"application/json;charset=utf-8"},body:JSON.stringify(a)});if(!s.ok)throw Error(`[taxonomy=relay_unavailable] site=powerchina command=search api HTTP ${s.status}`);const c=await s.json();if((c.code??200)!==200)throw Error(`[taxonomy=relay_unavailable] site=powerchina command=search api code=${c.code??"unknown"} msg=${o(c.msg)}`);const i=(Array.isArray(c.rows)?c.rows:[]).map((d)=>T(d)).filter(Boolean);return h(i).slice(0,n)}b({site:"powerchina",name:"search",access:"read",description:"搜索中国电建阳光采购公告",domain:"bid.powerchina.cn",strategy:g.COOKIE,browser:!0,args:[{name:"query",required:!0,positional:!0,help:'Search keyword, e.g. "procurement"'},{name:"limit",type:"int",default:20,help:"Number of results (max 50)"}],columns:["rank","content_type","title","publish_time","project_code","budget_or_limit","url"],func:async(t,n)=>{const e=o(n.query),r=Math.max(1,Math.min(Number(n.limit)||20,50));let a=[],s=null,c=!1;try{a=await L(e,r);c=!0}catch(i){s=o(i instanceof Error?i.message:String(i||""))}if(c&&a.length===0)return[];if(!c)try{a=await _(t,{query:e,candidateUrls:buildSearchCandidates(e),allowedHostFragments:["bid.powerchina.cn","powerchina.cn"],limit:r})}catch(i){const d=o(i instanceof Error?i.message:String(i||""));if(C.test(d))throw Error(`[taxonomy=relay_unavailable] site=powerchina command=search detached browser context: ${d}`);throw i}const u=y(h(a).map((i)=>({title:o(i.title),url:o(i.url),date:l(o(i.date)),contextText:o(i.contextText)})));if(u.length===0&&a.length>0)throw new p("powerchina search","extracted only navigation/portal rows, no bid entries matched");if(u.length===0){const i=o(await t.evaluate('document.body ? document.body.innerText : ""'));if(/(请先登录|未登录|登录后|验证码|人机验证)/.test(i))throw new x("bid.powerchina.cn","[taxonomy=selector_drift] site=powerchina command=search login required or human verification");if(s)throw new p("powerchina search",`api/dom yielded no result: ${s}`)}return E(u,{site:"powerchina",query:e,limit:r})}});export const __test__={buildSearchCandidates,normalizeDate:l,dedupeCandidates:h,filterNavigationRows:y,isLikelyNavigationUrl:f,isLikelyNavigationTitle:w,buildApiDetailUrl,toApiCandidate:T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as c,Strategy as l}from"@jackwener/opencli/registry";import{CliError as u}from"@jackwener/opencli/errors";import{PRODUCTHUNT_CATEGORY_SLUGS as
|
|
1
|
+
import{cli as c,Strategy as l}from"@jackwener/opencli/registry";import{CliError as u}from"@jackwener/opencli/errors";import{PRODUCTHUNT_CATEGORY_SLUGS as m}from"./utils.js";c({site:"producthunt",name:"browse",access:"read",description:"Best products in a Product Hunt category",domain:"www.producthunt.com",strategy:l.INTERCEPT,args:[{name:"category",type:"string",positional:!0,required:!0,help:"Category slug, e.g. vibe-coding, ai-agents, developer-tools"},{name:"limit",type:"int",default:20,help:"Number of results (max 50)"}],columns:["rank","name","tagline","reviews","url"],func:async(e,r)=>{const a=Math.min(Number(r.limit)||20,50),n=String(r.category||"").trim().toLowerCase();await e.installInterceptor("producthunt.com");await e.goto(`https://www.producthunt.com/categories/${n}`);await e.waitForCapture(5);const i=await e.evaluate(`
|
|
2
2
|
(() => {
|
|
3
3
|
const seen = new Set();
|
|
4
4
|
const results = [];
|
|
@@ -51,4 +51,4 @@ import{cli as c,Strategy as l}from"@jackwener/opencli/registry";import{CliError
|
|
|
51
51
|
|
|
52
52
|
return results;
|
|
53
53
|
})()
|
|
54
|
-
`),
|
|
54
|
+
`),s=Array.isArray(i)?i:[];if(s.length===0)throw new u("NO_DATA",`No products found for category "${n}"`,"Check the category slug or try: "+m.slice(0,5).join(", "));return s.slice(0,a).map((t,o)=>({rank:o+1,name:t.name,tagline:t.tagline,reviews:t.reviews,url:t.url}))}});
|
package/clis/producthunt/hot.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as u,Strategy as l}from"@jackwener/opencli/registry";import{CliError as s}from"@jackwener/opencli/errors";import{pickVoteCount as d}from"./utils.js";u({site:"producthunt",name:"hot",access:"read",description:"Today's top Product Hunt launches with vote counts",domain:"www.producthunt.com",strategy:l.INTERCEPT,args:[{name:"limit",type:"int",default:20,help:"Number of results (max 50)"}],columns:["rank","name","votes","url"],func:async(
|
|
1
|
+
import{cli as u,Strategy as l}from"@jackwener/opencli/registry";import{CliError as s}from"@jackwener/opencli/errors";import{pickVoteCount as d}from"./utils.js";u({site:"producthunt",name:"hot",access:"read",description:"Today's top Product Hunt launches with vote counts",domain:"www.producthunt.com",strategy:l.INTERCEPT,args:[{name:"limit",type:"int",default:20,help:"Number of results (max 50)"}],columns:["rank","name","votes","url"],func:async(t,i)=>{const c=Math.min(Number(i.limit)||20,50);await t.installInterceptor("producthunt.com");await t.goto("https://www.producthunt.com");await t.waitForCapture(5);const o=await t.evaluate(`
|
|
2
2
|
(() => {
|
|
3
3
|
const seen = new Set();
|
|
4
4
|
const results = [];
|
|
@@ -61,4 +61,4 @@ import{cli as u,Strategy as l}from"@jackwener/opencli/registry";import{CliError
|
|
|
61
61
|
|
|
62
62
|
return results;
|
|
63
63
|
})()
|
|
64
|
-
`),a=Array.isArray(o)?o:[];if(a.length===0)throw new s("NO_DATA","Could not retrieve Product Hunt top posts","Product Hunt may have changed its layout");const r=a.map((
|
|
64
|
+
`),a=Array.isArray(o)?o:[];if(a.length===0)throw new s("NO_DATA","Could not retrieve Product Hunt top posts","Product Hunt may have changed its layout");const r=a.map((e)=>({name:e.name,url:e.url,votes:d(Array.isArray(e.voteCandidates)?e.voteCandidates:[])})).filter((e)=>e.name&&e.url&&e.votes);if(r.length===0)throw new s("NO_DATA","Could not retrieve Product Hunt vote counts","Product Hunt may have changed its vote button structure");r.sort((e,n)=>parseInt(n.votes,10)-parseInt(e.votes,10));return r.slice(0,c).map((e,n)=>({rank:n+1,name:e.name,votes:e.votes,url:e.url}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as a,Strategy as n}from"@jackwener/opencli/registry";import{fetchFeed as o,PRODUCTHUNT_CATEGORY_SLUGS as i}from"./utils.js";a({site:"producthunt",name:"posts",access:"read",description:"Latest Product Hunt launches (optional category filter)",domain:"www.producthunt.com",strategy:n.PUBLIC,args:[{name:"limit",type:"int",default:20,help:"Number of results (max 50)"},{name:"category",type:"string",default:"",help:`Category filter: ${i.join(", ")}`}],columns:["rank","name","tagline","author","date","url"],func:async(t)=>{const e=Math.min(Number(t.limit)||20,50),r=String(t.category??"").trim()||void 0;return(await o(r)).slice(0,e)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as s,Strategy as i}from"@jackwener/opencli/registry";import{fetchFeed as u}from"./utils.js";s({site:"producthunt",name:"today",access:"read",description:"Today's Product Hunt launches (most recent day in feed)",domain:"www.producthunt.com",strategy:i.PUBLIC,args:[{name:"limit",type:"int",default:20,help:"Max results"}],columns:["rank","name","tagline","author","url"],func:async(a)=>{const n=Math.min(Number(a.limit)||20,50),e=await u();if(e.length===0)return[];const r=e.map((t)=>t.date).sort().reverse()[0];return e.filter((t)=>t.date===r).slice(0,n).map((t,o)=>({rank:o+1,name:t.name,tagline:t.tagline,author:t.author,url:t.url}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PRODUCTHUNT_CATEGORY_SLUGS=["ai-agents","ai-coding-agents","ai-code-editors","ai-chatbots","ai-workflow-automation","vibe-coding","developer-tools","productivity","design-creative","marketing-sales","no-code-platforms","llms","finance","social-community","engineering-development"];const
|
|
1
|
+
export const PRODUCTHUNT_CATEGORY_SLUGS=["ai-agents","ai-coding-agents","ai-code-editors","ai-chatbots","ai-workflow-automation","vibe-coding","developer-tools","productivity","design-creative","marketing-sales","no-code-platforms","llms","finance","social-community","engineering-development"];const p="Mozilla/5.0 (compatible; ppcli/1.0)";export async function fetchFeed(o){const c=o?`https://www.producthunt.com/feed?category=${encodeURIComponent(o)}`:"https://www.producthunt.com/feed",e=await fetch(c,{headers:{"User-Agent":p}});if(!e.ok)return[];const t=await e.text();return parseFeed(t)}export function parseFeed(o){const c=[],e=/<entry>([\s\S]*?)<\/entry>/g;let t,s=1;while(t=e.exec(o)){const n=t[1],r=n.match(/<title>([\s\S]*?)<\/title>/)?.[1]?.trim()??"",i=n.match(/<name>([\s\S]*?)<\/name>/)?.[1]?.trim()??"",l=(n.match(/<published>(.*?)<\/published>/)?.[1]?.trim()??"").slice(0,10),a=n.match(/<link[^>]*href="([^"]+)"/)?.[1]?.trim()??"",u=(n.match(/<content[^>]*>([\s\S]*?)<\/content>/)?.[1]??"").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/<[^>]+>/g," ").replace(/\s+/g," ").replace(/\s*Discussion\s*\|?\s*/gi,"").replace(/\s*\|?\s*Link\s*$/gi,"").trim().slice(0,120);if(r)c.push({rank:s++,name:r,tagline:u,author:i,date:l,url:a})}return c}export function pickVoteCount(o){return o.map((e)=>{const t=String(e.text??"").trim();if(!/^\d+$/.test(t))return null;if(e.inReviewLink)return null;const s=parseInt(t,10);if(!Number.isFinite(s)||s<=0)return null;const n=`${e.tagName??""} ${e.className??""} ${e.role??""}`.toLowerCase();let r=0;if(e.inButton)r+=4;if(n.includes("vote")||n.includes("upvote"))r+=3;if(n.includes("button"))r+=1;return{text:t,score:r,value:s}}).filter((e)=>Boolean(e)).sort((e,t)=>{if(t.score!==e.score)return t.score-e.score;if(t.value!==e.value)return t.value-e.value;return e.text.localeCompare(t.text)})[0]?.text??""}export function toDate(o){return o.slice(0,10)}
|
package/clis/pypi/downloads.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as i,Strategy as p}from"@jackwener/opencli/registry";import{ArgumentError as c,EmptyResultError as l}from"@jackwener/opencli/errors";import{PYPISTATS_BASE as
|
|
1
|
+
import{cli as i,Strategy as p}from"@jackwener/opencli/registry";import{ArgumentError as c,EmptyResultError as l}from"@jackwener/opencli/errors";import{PYPISTATS_BASE as d,pypiFetch as s,requirePackageName as u}from"./utils.js";const w=new Set(["recent","overall"]);function y(t){const a=String(t??"recent").trim().toLowerCase();if(!w.has(a))throw new c(`pypi downloads period "${t}" is invalid`,"Allowed values: recent (default — last day/week/month totals) or overall (full daily history).");return a}i({site:"pypi",name:"downloads",access:"read",description:"PyPI download stats for a package (recent totals or full daily history)",domain:"pypistats.org",strategy:p.PUBLIC,browser:!1,args:[{name:"name",positional:!0,required:!0,help:'PyPI package name (e.g. "requests", "pandas")'},{name:"period",default:"recent",help:"recent (default — 1 row, last day/week/month) or overall (1 row per day)"}],columns:["rank","package","period","date","downloads"],func:async(t)=>{const a=u(t.name);if(y(t.period)==="recent"){const o=await s(`${d}/api/packages/${encodeURIComponent(a)}/recent`,`pypi downloads ${a}`),e=o?.data;if(!e||e.last_day==null&&e.last_week==null&&e.last_month==null)throw new l("pypi downloads",`pypistats has no recent download data for "${a}".`);return[{rank:1,package:String(o.package??a),period:"last_day",date:"",downloads:e.last_day!=null?Number(e.last_day):null},{rank:2,package:String(o.package??a),period:"last_week",date:"",downloads:e.last_week!=null?Number(e.last_week):null},{rank:3,package:String(o.package??a),period:"last_month",date:"",downloads:e.last_month!=null?Number(e.last_month):null}]}const r=await s(`${d}/api/packages/${encodeURIComponent(a)}/overall?mirrors=false`,`pypi downloads ${a}`),n=Array.isArray(r?.data)?r.data:[];if(!n.length)throw new l("pypi downloads",`pypistats has no overall download history for "${a}".`);return n.map((o,e)=>({rank:e+1,package:String(r.package??a),period:"daily",date:String(o.date??""),downloads:o.downloads!=null?Number(o.downloads):null}))}});
|
package/clis/pypi/package.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as u,Strategy as g}from"@jackwener/opencli/registry";import{EmptyResultError as y}from"@jackwener/opencli/errors";import{PYPI_BASE as l,pypiFetch as f,requirePackageName as d}from"./utils.js";function S(t){if(t.home_page)return String(t.home_page);const e=t.project_urls;if(e&&typeof e==="object")return String(e.Homepage||e.homepage||e.Documentation||e.Source||e["Source Code"]||"");return""}function h(t){const e=t.project_urls;if(e&&typeof e==="object")return String(e.Source||e["Source Code"]||e.Repository||e.repository||"");return""}u({site:"pypi",name:"package",access:"read",description:"Single PyPI package metadata (latest version, license, homepage, classifiers)",domain:"pypi.org",strategy:g.PUBLIC,browser:!1,args:[{name:"name",positional:!0,required:!0,help:'PyPI package name (e.g. "requests", "pandas")'}],columns:["name","latestVersion","summary","author","license","homepage","repository","requiresPython","keywords","releases","firstReleased","lastReleased","url"],func:async(t)=>{const e=d(t.name),p=await f(`${l}/pypi/${encodeURIComponent(e)}/json`,`pypi package ${e}`),r=p?.info;if(!r||!r.name)throw new y("pypi package",`PyPI returned no metadata for "${e}".`);const s=p?.releases??{},c=Object.keys(s).filter((i)=>Array.isArray(s[i])&&s[i].length>0);let a="",n="";for(const i of c)for(const m of s[i]){const o=String(m?.upload_time??"").slice(0,10);if(!o)continue;if(!a||o<a)a=o;if(!n||o>n)n=o}return[{name:String(r.name),latestVersion:String(r.version??""),summary:String(r.summary??""),author:String(r.author??r.author_email??""),license:String(r.license_expression??r.license??""),homepage:S(r),repository:h(r),requiresPython:String(r.requires_python??""),keywords:String(r.keywords??""),releases:c.length,firstReleased:a,lastReleased:n,url:String(r.package_url??`${l}/project/${r.name}/`)}]}});
|
package/clis/pypi/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as o,CommandExecutionError as n,EmptyResultError as i}from"@jackwener/opencli/errors";export const PYPI_BASE="https://pypi.org",PYPISTATS_BASE="https://pypistats.org";const p="opencli-pypi-adapter (+https://github.com/jackwener/OpenCLI)",c=/^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$/;export function requirePackageName(r){const t=String(r??"").trim();if(!t)throw new o('pypi package name is required (e.g. "requests", "pandas")');if(!c.test(t))throw new o(`pypi package name "${r}" is not a valid distribution name`,'PyPI accepts ASCII letters / digits / "._-" with no leading or trailing separator.');return t}export async function pypiFetch(r,t){let e;try{e=await fetch(r,{headers:{"user-agent":p,accept:"application/json"}})}catch(a){throw new n(`${t} request failed: ${a?.message??a}`,"Check that pypi.org / pypistats.org are reachable from this network.")}if(e.status===404)throw new i(t,`PyPI returned 404 for ${r}.`);if(e.status===429)throw new n(`${t} returned HTTP 429 (rate limited)`,"PyPI throttles unauthenticated bursts; wait a few seconds and retry.");if(!e.ok)throw new n(`${t} returned HTTP ${e.status}`);let s;try{s=await e.json()}catch(a){throw new n(`${t} returned malformed JSON: ${a?.message??a}`)}return s}
|
package/clis/qiita/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as r}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as s}from"../_shared/site-auth.js";import{qiitaViewer as m}from"./gql.js";const e="https://qiita.com";async function a(i){return(await i.getCookies({url:e})).some((t)=>t.name==="_qiita_login_session"&&t.value)}async function n(i){await i.goto(`${e}/`);const o=await m(i);return{url_name:o.urlName,name:o.name||"",user_id:String(o.originalId??"")}}s({site:"qiita",domain:"qiita.com",loginUrl:"https://qiita.com/login",columns:["url_name","name","user_id"],loginDescription:"打开 Qiita 登录页并等待浏览器完成登录(供桌面客户端引导登录)。",quickCheck:a,verify:n,poll:async(i)=>{if(!await a(i))throw new r("qiita.com","Waiting for Qiita session cookie");return n(i)}});
|
package/clis/qiita/gql.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as o,CommandExecutionError as a}from"@jackwener/opencli/errors";const u="https://qiita.com/graphql";export async function qiitaGql(i,e,r={}){const t=await i.evaluate(`(async () => {
|
|
2
2
|
try {
|
|
3
3
|
var csrf = (document.querySelector('meta[name="csrf-token"]') || {}).content;
|
|
4
4
|
if (!csrf) return { kind: 'auth', detail: 'no csrf-token meta — not logged in?' };
|
|
5
|
-
var r = await fetch(${JSON.stringify(
|
|
5
|
+
var r = await fetch(${JSON.stringify(u)}, {
|
|
6
6
|
method: 'POST',
|
|
7
7
|
credentials: 'include',
|
|
8
8
|
headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': csrf, 'X-Requested-With': 'XMLHttpRequest' },
|
|
9
|
-
body: JSON.stringify({ query: ${JSON.stringify(
|
|
9
|
+
body: JSON.stringify({ query: ${JSON.stringify(e)}, variables: ${JSON.stringify(r)} }),
|
|
10
10
|
});
|
|
11
11
|
var text = await r.text();
|
|
12
12
|
var data = null; try { data = JSON.parse(text); } catch (e) {}
|
|
@@ -14,12 +14,12 @@ import{AuthRequiredError as K,CommandExecutionError as H}from"@jackwener/opencli
|
|
|
14
14
|
if (!r.ok) return { kind: 'http', status: r.status, detail: text.slice(0, 300) };
|
|
15
15
|
return { kind: 'ok', body: data };
|
|
16
16
|
} catch (e) { return { kind: 'exception', detail: String(e && e.message || e) }; }
|
|
17
|
-
})()`);if(
|
|
17
|
+
})()`);if(t?.kind==="auth")throw new o("qiita.com",`Not logged in (${t.detail}). Run \`ppcli qiita login\`.`);if(t?.kind==="http")throw new a(`Qiita GraphQL failed: HTTP ${t.status} ${t.detail}`);if(t?.kind==="exception")throw new a(`Qiita GraphQL error: ${t.detail}`);if(t?.kind!=="ok"||!t.body)throw new a(`Unexpected Qiita response: ${JSON.stringify(t)}`);const n=t.body;if(Array.isArray(n.errors)&&n.errors.length){const s=n.errors.map((d)=>d.message).join("; ");if(/login required|unauthor|not authenticated/i.test(s))throw new o("qiita.com",`Qiita auth error: ${s}`);throw new a(`Qiita GraphQL error: ${s}`)}return n.data||{}}export async function qiitaDeleteByForm(i,e){const r=await i.evaluate(`(async () => {
|
|
18
18
|
try {
|
|
19
19
|
var meta = document.querySelector('meta[name="csrf-token"]');
|
|
20
20
|
var token = meta && meta.content;
|
|
21
21
|
if (!token) return { kind: 'auth' };
|
|
22
|
-
var r = await fetch(${JSON.stringify(
|
|
22
|
+
var r = await fetch(${JSON.stringify(e)}, {
|
|
23
23
|
method: 'POST', credentials: 'include',
|
|
24
24
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
25
25
|
body: '_method=delete&authenticity_token=' + encodeURIComponent(token),
|
|
@@ -29,4 +29,4 @@ import{AuthRequiredError as K,CommandExecutionError as H}from"@jackwener/opencli
|
|
|
29
29
|
var ok = r.type === 'opaqueredirect' || r.status === 0 || (r.status >= 200 && r.status < 400);
|
|
30
30
|
return { kind: 'done', ok: ok, status: r.status };
|
|
31
31
|
} catch (e) { return { kind: 'exception', detail: String(e && e.message || e) }; }
|
|
32
|
-
})()`);if(
|
|
32
|
+
})()`);if(r?.kind==="auth")throw new o("qiita.com","Not logged in. Run `ppcli qiita login`.");if(r?.kind==="exception")throw new a(`Qiita delete error: ${r.detail}`);return{ok:!!r?.ok,status:r?.status??-1}}export async function qiitaViewer(i){const e=await qiitaGql(i,"{ viewer { urlName name originalId } }");if(!e.viewer||!e.viewer.urlName)throw new o("qiita.com","Qiita viewer empty — not logged in");return e.viewer}
|
package/clis/qiita/publish.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as c from"node:fs";import{cli as f,Strategy as m}from"@jackwener/opencli/registry";import{ArgumentError as l,CommandExecutionError as o}from"@jackwener/opencli/errors";import{qiitaGql as u,qiitaDeleteByForm as h}from"./gql.js";import{assertLiteralContent as b}from"../_shared/content-guard.js";export function resolveBody(t){if(t["body-file"]){const e=String(t["body-file"]);if(!c.statSync(e,{throwIfNoEntry:!1})?.isFile())throw new l(`--body-file not found: ${e}`);return c.readFileSync(e,"utf8")}if(t.body!==void 0&&t.body!==null){b(String(t.body),{fileFlag:"--body-file"});return String(t.body)}return}export function assertNoLocalImages(t){const e=[],r=(i)=>{const a=String(i??"").trim();if(!a)return;if(/^(https?:)?\/\//i.test(a))return;e.push(a.length>80?a.slice(0,80)+"…":a)};for(const i of t.matchAll(/!\[[^\]]*\]\(\s*<?([^)\s>]+)/g))r(i[1]);for(const i of t.matchAll(/<img\b[^>]*\bsrc\s*=\s*["']([^"']+)["']/gi))r(i[1]);if(e.length)throw new l(`正文里有 ${e.length} 张非公网 URL 的图片(${e.slice(0,3).join("、")})。`+"Qiita 不转存本机图片,发出去会是裂图——请改用公网可直接访问的 http(s) 图片 URL,或移除这些图。")}export function resolveTagNames(t){return String(t??"").split(",").map((e)=>e.trim()).filter(Boolean)}const y=`mutation($input: SaveCreatingArticleInput!) {
|
|
2
2
|
saveCreatingArticle(input: $input) { draftItem { uuid } }
|
|
3
|
-
}`,
|
|
3
|
+
}`,w=`mutation($input: PublishPublicArticleInput!) {
|
|
4
4
|
publishPublicArticle(input: $input) { article { uuid linkUrl encryptedId isSecret } }
|
|
5
|
-
}`,
|
|
5
|
+
}`,q=`mutation($input: PublishSecretArticleInput!) {
|
|
6
6
|
publishSecretArticle(input: $input) { article { uuid linkUrl encryptedId isSecret } }
|
|
7
|
-
}`;
|
|
7
|
+
}`;f({site:"qiita",name:"publish",access:"write",description:"Publish a Qiita article (markdown). Tags required. Public by default; --draft or --secret to change.",domain:"qiita.com",strategy:m.COOKIE,browser:!0,args:[{name:"title",type:"string",required:!1,help:"Article title (required)"},{name:"body",type:"string",required:!1,help:"Article body in Markdown (or use --body-file)"},{name:"body-file",type:"string",required:!1,help:"Path to a Markdown file for the body"},{name:"tags",type:"string",required:!1,help:"Comma-separated tags (REQUIRED, at least 1)"},{name:"draft",type:"boolean",required:!1,default:!1,help:"Save as draft only (do not publish)"},{name:"secret",type:"boolean",required:!1,default:!1,help:"Publish as limited-public (secret) instead of public"},{name:"tweet-share",type:"boolean",required:!1,default:!1,help:"Also share to X/Twitter on publish (public only)"}],columns:["status","uuid","url"],func:async(t,e)=>{if(!t)throw new o("Browser session required for qiita publish");const r=String(e.title??"").trim(),i=resolveBody(e),a=resolveTagNames(e.tags);if(!r)throw new l("--title is required");if(i===void 0)throw new l("--body or --body-file is required");if(a.length===0)throw new l("--tags is required (Qiita articles need at least one tag)");assertNoLocalImages(i);await t.goto("https://qiita.com/drafts/new");await t.wait({time:2});const d=await u(t,y,{input:{uuid:"",title:r,rawBody:i,tagNames:a,slide:!1,organizationId:null}}),n=d?.saveCreatingArticle?.draftItem?.uuid;if(!n)throw new o(`Qiita saveCreatingArticle returned no uuid: ${JSON.stringify(d)}`);if(e.draft)return[{status:"draft",uuid:n,url:`https://qiita.com/drafts/${n}/edit`}];let s;if(e.secret)s=(await u(t,q,{input:{uuid:n,title:r,rawBody:i,tagNames:a,slide:!1}}))?.publishSecretArticle?.article;else s=(await u(t,w,{input:{uuid:n,title:r,rawBody:i,tagNames:a,slide:!1,tweetShare:!!e["tweet-share"],adventCalendarItems:[]}}))?.publishPublicArticle?.article;if(!s||!s.linkUrl)throw new o(`Qiita publish returned no article: ${JSON.stringify(s)}`);return[{status:e.secret?"published-secret":"published",uuid:s.uuid||n,url:s.linkUrl}]}});f({site:"qiita",name:"delete",access:"write",description:"Delete a Qiita article or draft by its URL (article linkUrl, or https://qiita.com/drafts/<uuid>).",domain:"qiita.com",strategy:m.COOKIE,browser:!0,args:[{name:"url",type:"string",required:!1,help:"Article URL (e.g. https://qiita.com/<urlName>/items/<uuid>) or draft URL (https://qiita.com/drafts/<uuid>)"}],columns:["status","url"],func:async(t,e)=>{if(!t)throw new o("Browser session required for qiita delete");const r=String(e.url??"").trim();if(!/^https:\/\/qiita\.com\/.+/.test(r))throw new l("--url is required (a https://qiita.com/... article or draft URL)");await t.goto("https://qiita.com/");await t.wait({time:1});const i=await h(t,r);if(!i.ok)throw new o(`Qiita delete failed (HTTP ${i.status}) for ${r}`);return[{status:"deleted",url:r}]}});
|