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/codex/model.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
const re = new RegExp(${
|
|
1
|
+
import{cli as g,Strategy as w}from"@jackwener/opencli/registry";import{ArgumentError as v,CommandExecutionError as l,selectorError as E}from"@jackwener/opencli/errors";const x=/5\.\d|[Ee]xtra [Hh]igh|^High$|^Medium$|^Low$|^Auto$|^Fast$|^Speed$|^Pro$|GPT-/,y=x.source;function h(e){if(e&&typeof e==="object"&&"data"in e&&"session"in e)return e.data;return e}function d(e){return String(e??"").toLowerCase().replace(/\bgpt[-\s]*/g,"").replace(/\s+/g," ").trim()}const p=["extra high","medium","high","low","auto","fast","speed","pro"];function A(e){return p.find((t)=>e===t||e.endsWith(` ${t}`))||""}function b(e){return e.match(/(?:^|\s)(\d+(?:\.\d+)?)(?=\s|$)/)?.[1]||""}export function findUniqueModelOption(e,t){const n=d(t);if(!n)throw new v("model name cannot be empty");const o=e.map((r)=>({label:r,normalized:d(r)})),i=o.filter((r)=>r.normalized===n);if(i.length===1)return i[0].label;if(i.length>1)throw new l(`Model name "${t}" is ambiguous.`,`Matches: ${i.map((r)=>r.label).join(", ")}`);const s=o.filter((r)=>r.normalized.includes(n));if(s.length===1)return s[0].label;if(s.length>1)throw new l(`Model name "${t}" is ambiguous.`,`Matches: ${s.map((r)=>r.label).join(", ")}`);return null}export function modelSelectionVerified(e,t){const n=d(e),o=d(t);if(!n||!o)return!1;if(n===o)return!0;if(p.includes(o))return A(n)===o;const i=b(o);if(i)return b(n)===i;return!1}export const modelCommand=g({site:"codex",name:"model",access:"write",description:"Read, list, or switch the active model / reasoning level in Codex Desktop. The composer toolbar button toggles a menu that mixes model variants (GPT-5.5, Speed) with reasoning levels (Low/Medium/High/Extra High).",domain:"localhost",strategy:w.UI,browser:!0,args:[{name:"name",required:!1,positional:!0,help:"Substring (case-insensitive) of a model / reasoning level to switch to. Omit to read current."},{name:"list",type:"boolean",default:!1,help:"List all menu options (does not switch)"}],columns:["Status","Model"],func:async(e,t)=>{const n=String(t.name||"").trim().toLowerCase(),o=t.list===!0||t.list==="true",i=JSON.stringify(y),s=h(await e.evaluate(`(function() {
|
|
2
|
+
const re = new RegExp(${i});
|
|
3
3
|
const composers = Array.from(document.querySelectorAll('[contenteditable="true"]')).filter((el) => el.offsetParent);
|
|
4
4
|
const last = composers[composers.length - 1];
|
|
5
5
|
if (!last) return '';
|
|
@@ -8,9 +8,9 @@ import{cli as J,Strategy as P}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
8
8
|
const btns = Array.from(root.querySelectorAll('button')).filter((b) => b.offsetParent);
|
|
9
9
|
const match = btns.find((b) => re.test((b.textContent || '').trim()));
|
|
10
10
|
return match ? (match.textContent || '').trim() : '';
|
|
11
|
-
})()`));if(!
|
|
11
|
+
})()`));if(!s)throw E("Codex model button (composer toolbar). Make sure a chat is open.");if(!n&&!o)return[{Status:"Active",Model:s}];const r=JSON.stringify(o?"":n),a=h(await e.evaluate(`(async () => {
|
|
12
12
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
13
|
-
const re = new RegExp(${
|
|
13
|
+
const re = new RegExp(${i});
|
|
14
14
|
const composers = Array.from(document.querySelectorAll('[contenteditable="true"]')).filter((el) => el.offsetParent);
|
|
15
15
|
const last = composers[composers.length - 1];
|
|
16
16
|
if (!last) return { ok: false, reason: 'composer not found' };
|
|
@@ -62,7 +62,7 @@ import{cli as J,Strategy as P}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
const labels = modelItems.map(leadingText);
|
|
65
|
-
const target = ${
|
|
65
|
+
const target = ${r};
|
|
66
66
|
if (!target) {
|
|
67
67
|
document.body.click();
|
|
68
68
|
return { ok: true, labels };
|
|
@@ -105,8 +105,8 @@ import{cli as J,Strategy as P}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
105
105
|
} catch {}
|
|
106
106
|
});
|
|
107
107
|
return { ok: true, switched: true, chosen: chosenLabel, labels };
|
|
108
|
-
})()`));if(
|
|
109
|
-
const re = new RegExp(${
|
|
108
|
+
})()`));if(!a.ok)throw new l(a.reason,a.detail||"");if(o)return a.labels.map((m)=>({Status:m===s?"Active":"Available",Model:m}));const c=findUniqueModelOption(a.labels||[],n);if(!c)throw new l("No model matched.",`wanted=${n} available=${JSON.stringify(a.labels||[])}`);if(c!==a.chosen)throw new l("Codex model selection was inconsistent.",`expected=${c} chosen=${a.chosen}`);let u="";for(let m=0;m<20;m+=1){await e.wait(0.25);const f=h(await e.evaluate(`(function() {
|
|
109
|
+
const re = new RegExp(${i});
|
|
110
110
|
const composers = Array.from(document.querySelectorAll('[contenteditable="true"]')).filter((el) => el.offsetParent);
|
|
111
111
|
const last = composers[composers.length - 1];
|
|
112
112
|
if (!last) return '';
|
|
@@ -115,4 +115,4 @@ import{cli as J,Strategy as P}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
115
115
|
const btns = Array.from(root.querySelectorAll('button')).filter((b) => b.offsetParent);
|
|
116
116
|
const match = btns.find((b) => re.test((b.textContent || '').trim()));
|
|
117
117
|
return match ? (match.textContent || '').trim() : '';
|
|
118
|
-
})()`));if(modelSelectionVerified(
|
|
118
|
+
})()`));if(modelSelectionVerified(f,c)){u=f;break}}if(!u)throw new l(`Codex model switch to "${c}" was not verified.`,"The model menu click may have failed or the model selector text may have drifted.");return[{Status:"switched",Model:u}]}});
|
package/clis/codex/pin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as i,Strategy as a}from"@jackwener/opencli/registry";import{conversationSelectionArgs as c,setConversationPinned as d}from"./_actions.js";function n(t,o){i({site:"codex",name:t,access:"write",description:`${t==="pin"?"Pin":"Unpin"} the selected Codex conversation via the Chat actions header menu.`,domain:"localhost",strategy:a.UI,browser:!0,args:[...c],columns:["status","thread_id","project","conversation"],func:async(s,r)=>{const e=await d(s,r,o);return[{status:e.status,thread_id:e.selected.threadId,project:e.selected.project,conversation:e.selected.conversation}]}})}n("pin",!0);n("unpin",!1);
|
package/clis/codex/rename.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{cli as
|
|
2
|
-
`))throw new
|
|
1
|
+
import{cli as s,Strategy as l}from"@jackwener/opencli/registry";import{ArgumentError as r,CommandExecutionError as c}from"@jackwener/opencli/errors";import{conversationSelectionArgs as u,selectAndClickAction as d,unwrapEvaluateResult as m,waitForConversationPostcondition as p}from"./_actions.js";s({site:"codex",name:"rename",access:"write",description:'Rename the selected Codex conversation. Opens the Chat actions menu → "Rename chat", then types the new title.',domain:"localhost",strategy:l.UI,browser:!0,args:[{name:"title",required:!0,positional:!0,help:"New title (single line, no newlines)"},...u],columns:["status","title","thread_id","project"],func:async(e,i)=>{const t=String(i.title||"").trim();if(!t)throw new r("title cannot be empty");if(t.includes(`
|
|
2
|
+
`))throw new r("title must be a single line");const n=await d(e,i,["Rename chat"]);await e.wait(0.5);const a=m(await e.evaluate(`(async () => {
|
|
3
3
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
4
4
|
let input = null;
|
|
5
5
|
for (let attempt = 0; attempt < 15; attempt += 1) {
|
|
@@ -14,7 +14,7 @@ import{cli as H,Strategy as I}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
14
14
|
}
|
|
15
15
|
if (!input) return { ok: false, reason: 'Rename input did not appear after menu click.' };
|
|
16
16
|
input.focus();
|
|
17
|
-
const newTitle = ${JSON.stringify(
|
|
17
|
+
const newTitle = ${JSON.stringify(t)};
|
|
18
18
|
if (input instanceof HTMLInputElement) {
|
|
19
19
|
const setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;
|
|
20
20
|
setter.call(input, '');
|
|
@@ -31,4 +31,4 @@ import{cli as H,Strategy as I}from"@jackwener/opencli/registry";import{ArgumentE
|
|
|
31
31
|
document.execCommand('insertText', false, newTitle);
|
|
32
32
|
}
|
|
33
33
|
return { ok: true };
|
|
34
|
-
})()`));if(!
|
|
34
|
+
})()`));if(!a?.ok)throw new c(a?.reason||"Failed to fill rename input.","");await e.pressKey("Enter");await p(e,n.selected,(o)=>(o?.conversation?.title||"").trim()===t,"rename");return[{status:"renamed",title:t,thread_id:n.selected.threadId,project:n.selected.project}]}});
|
package/clis/codex/send.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as n,Strategy as s}from"@jackwener/opencli/registry";import{selectorError as c}from"@jackwener/opencli/errors";import{conversationSelectionArgs as i,openCodexConversation as a}from"./sidebar.js";export const sendCommand=n({site:"codex",name:"send",access:"write",description:"Send text/commands to the current or selected Codex AI composer",domain:"localhost",strategy:s.UI,browser:!0,args:[{name:"text",fromFile:!0,required:!0,positional:!0,help:"Text, command (e.g. /review), or skill (e.g. $imagegen)"},...i],columns:["Status","Project","Conversation","InjectedText"],func:async(e,t)=>{const o=t.text,r=await a(e,t);if(!await e.evaluate(`
|
|
2
2
|
(function(text) {
|
|
3
3
|
let composer = document.querySelector('textarea, [contenteditable="true"]');
|
|
4
4
|
|
|
@@ -12,5 +12,5 @@ import{cli as F,Strategy as G}from"@jackwener/opencli/registry";import{selectorE
|
|
|
12
12
|
composer.focus();
|
|
13
13
|
document.execCommand('insertText', false, text);
|
|
14
14
|
return true;
|
|
15
|
-
})(${JSON.stringify(
|
|
16
|
-
`))throw
|
|
15
|
+
})(${JSON.stringify(o)})
|
|
16
|
+
`))throw c("Codex Composer input element");await e.wait(0.5);await e.pressKey("Enter");return[{Status:"Success",Project:r?.project||"",Conversation:r?.conversation||"",InjectedText:o}]}});
|
package/clis/codex/sidebar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as m,CommandExecutionError as P,EmptyResultError as I}from"@jackwener/opencli/errors";function j(e){return String(e??"").replace(/\s+/g," ").trim()}function C(e){return j(e).toLowerCase()}function w(e,n){if(!n)return!0;const s=C(e.project),c=C(e.projectPath),d=C(n);if(!d)return!0;return s===d||s.includes(d)||c===d||c.endsWith(`/${d}`)}export function hasConversationTarget(e){return!!(e?.project||e?.conversation||e?.index||e?.["thread-id"])}export function parsePositiveIntegerOption(e,n){const s=j(e);if(!/^\d+$/.test(s))throw new m(`${n} must be a positive integer`);const c=Number.parseInt(s,10);if(!Number.isSafeInteger(c)||c<1)throw new m(`${n} must be a positive integer`);return c}export function parseOptionalPositiveIntegerOption(e,n){if(e==null||j(e)==="")return null;return parsePositiveIntegerOption(e,n)}export function requireNonEmptyOption(e,n){const s=j(e);if(!s)throw new m(`${n} cannot be empty`);return s}export function collectCodexProjectsFromDocument(e=document){const n="[data-app-action-sidebar-project-row]",s="[data-app-action-sidebar-thread-row]";function c(o){return(o.innerText||o.textContent||"").replace(/\s+/g," ").trim()}function d(o){return/^(?:(?:\d+\s*)?(?:刚刚|秒|分钟|小时|天|周|个月|年|sec|min|hr|hour|day|week|month|year|s|m|h|d|w)|.*\bago)$/i.test(o.trim())}function t(o,a){const h=Array.from(o.querySelectorAll('.tabular-nums, [class*="tabular-nums"], [class*="description"]')).map(c).filter(Boolean).find(d);if(h)return h;const v=c(o).replace(a,"").trim();return d(v)?v:""}return Array.from(e.querySelectorAll(n)).map((o,a)=>{const f=o.getAttribute("data-app-action-sidebar-project-label")||o.getAttribute("aria-label")||c(o),h=o.getAttribute("data-app-action-sidebar-project-id")||"",x=o.closest('[role="listitem"][aria-label]')||o.parentElement,i=(x?Array.from(x.querySelectorAll(s)):[]).map((p,b)=>{const l=p.getAttribute("data-app-action-sidebar-thread-title")||c(p);return{index:b+1,title:l,updated:t(p,l),active:p.getAttribute("data-app-action-sidebar-thread-active")==="true",pinned:p.getAttribute("data-app-action-sidebar-thread-pinned")==="true",threadId:p.getAttribute("data-app-action-sidebar-thread-id")||"",hostId:p.getAttribute("data-app-action-sidebar-thread-host-id")||"",kind:p.getAttribute("data-app-action-sidebar-thread-kind")||""}});return{index:a+1,project:f,projectPath:h,collapsed:o.getAttribute("data-app-action-sidebar-project-collapsed")==="true"||o.getAttribute("aria-expanded")==="false",conversations:i}})}export function selectCodexConversationInDocument(e,n=document){const s="[data-app-action-sidebar-project-row]",c="[data-app-action-sidebar-thread-row]";function d(r){return String(r??"").replace(/\s+/g," ").trim()}function t(r){return d(r).toLowerCase()}function o(r,u){const y=t(r),A=t(u);return!!A&&(y===A||y.includes(A))}function a(r){return r.getAttribute("data-app-action-sidebar-project-label")||r.getAttribute("aria-label")||r.textContent||""}function f(r){return r.getAttribute("data-app-action-sidebar-project-id")||""}function h(r){return r.getAttribute("data-app-action-sidebar-thread-title")||r.textContent||""}function x(r){const u=r.getBoundingClientRect?.();if(!u||!Number.isFinite(u.left)||!Number.isFinite(u.top))return{};return{x:u.left+u.width/2,y:u.top+u.height/2}}const v=Array.from(n.querySelectorAll(s));let i=null;if(e.project){i=v.find((r)=>o(a(r),e.project))||v.find((r)=>o(f(r),e.project));if(!i)return{ok:!1,error:`Project not found: ${e.project}`,projects:v.map((r)=>a(r)).filter(Boolean)}}if(i){if(i.getAttribute("data-app-action-sidebar-project-collapsed")==="true"||i.getAttribute("aria-expanded")==="false"){i.scrollIntoView?.({block:"center"});if(!e.preferNativeClick)i.click();return{ok:!0,expanded:!0,selected:!1,project:a(i),projectPath:f(i),...x(i)}}}const p=i?i.closest('[role="listitem"][aria-label]')||i.parentElement||n:n,b=Array.from(p.querySelectorAll(c));if(!b.length)return{ok:!1,error:i?`No visible conversations under project: ${a(i)}`:"No visible Codex conversations found"};let l=null;if(e.threadId)l=b.find((r)=>r.getAttribute("data-app-action-sidebar-thread-id")===e.threadId);if(!l&&e.index!=null){const r=Number(e.index);if(!Number.isInteger(r)||r<1)return{ok:!1,error:`Invalid conversation index: ${e.index}`};l=b[r-1]||null}if(!l&&e.conversation){const r=b.filter((u)=>t(h(u))===t(e.conversation));l=r[0]||b.find((u)=>o(h(u),e.conversation))||null;if(r.length>1&&!e.project)return{ok:!1,error:`Multiple conversations matched "${e.conversation}". Pass --project to disambiguate.`}}if(!l)return{ok:!1,error:e.threadId?`Thread not found: ${e.threadId}`:e.conversation?`Conversation not found: ${e.conversation}`:"Pass --conversation, --thread-id, or --index to select a Codex conversation",conversations:b.map((r,u)=>({index:u+1,title:h(r)}))};l.scrollIntoView?.({block:"center"});if(!e.preferNativeClick)l.click();return{ok:!0,expanded:!1,selected:!0,project:i?a(i):"",projectPath:i?f(i):"",conversation:h(l),threadId:l.getAttribute("data-app-action-sidebar-thread-id")||"",index:b.indexOf(l)+1,...x(l)}}export function flattenCodexProjects(e,n={}){const s=n.project,c=parseOptionalPositiveIntegerOption(n.limit,"codex --limit"),d=[];for(const t of e){if(!w(t,s))continue;const o=c?t.conversations.slice(0,c):t.conversations;if(o.length===0){d.push({Project:t.project,Index:0,Title:t.collapsed?"(collapsed)":"(no visible conversations)",Updated:"",Active:"",ProjectPath:t.projectPath,ThreadId:""});continue}for(const a of o)d.push({Project:t.project,Index:a.index,Title:a.title,Updated:a.updated,Active:a.active?"yes":"",ProjectPath:t.projectPath,ThreadId:a.threadId})}return d}export async function readCodexProjects(e){const n=await e.evaluate(`(${collectCodexProjectsFromDocument.toString()})()`);if(!Array.isArray(n))throw new P("Codex sidebar project extraction returned an invalid payload");return n}export async function openCodexConversation(e,n){if(!hasConversationTarget(n))return null;const s=parseOptionalPositiveIntegerOption(n.index,"codex conversation --index"),c=n["thread-id"]?requireNonEmptyOption(n["thread-id"],"codex conversation --thread-id"):"",d={project:n.project||"",conversation:n.conversation||"",index:s==null?"":String(s),threadId:c,preferNativeClick:typeof e.nativeClick==="function"};let t=await e.evaluate(`(${selectCodexConversationInDocument.toString()})(${JSON.stringify(d)})`);if(t?.expanded){if(typeof e.nativeClick==="function"&&Number.isFinite(t.x)&&Number.isFinite(t.y))await e.nativeClick(t.x,t.y);await e.wait(0.75);t=await e.evaluate(`(${selectCodexConversationInDocument.toString()})(${JSON.stringify(d)})`)}if(!t?.ok||!t?.selected){const o=t?.conversations?` Available: ${t.conversations.map((f)=>`${f.index}. ${f.title}`).join("; ")}`:t?.projects?` Available projects: ${t.projects.join(", ")}`:"",a=`${t?.error||"Could not select Codex conversation"}${o}`;if(t?.error?.startsWith("Invalid conversation index:"))throw new m(a);if(t?.error?.startsWith("Multiple conversations matched"))throw new m(a,"Pass --project or --thread-id to disambiguate the target conversation.");if(t?.error?.startsWith("Project not found:")||t?.error?.startsWith("Conversation not found:")||t?.error?.startsWith("Thread not found:")||t?.error?.startsWith("No visible conversations under project:"))throw new I("codex conversation",a);throw new P(a,"Open the Codex sidebar and verify project/conversation rows are visible.")}if(typeof e.nativeClick==="function"&&Number.isFinite(t.x)&&Number.isFinite(t.y))await e.nativeClick(t.x,t.y);await e.wait(1);return t}export const conversationSelectionArgs=[{name:"project",required:!1,help:"Project label or path to select before running the command"},{name:"conversation",required:!1,help:"Conversation title to select within --project"},{name:"index",required:!1,help:"1-based conversation index within --project"},{name:"thread-id",required:!1,help:"Exact Codex thread id to select"}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as g,Strategy as p}from"@jackwener/opencli/registry";import{ArgumentError as i,CommandExecutionError as a,EmptyResultError as u}from"@jackwener/opencli/errors";const c=["market_cap_desc","market_cap_asc","name_desc","name_asc","market_cap_change_24h_desc","market_cap_change_24h_asc"];g({site:"coingecko",name:"categories",access:"read",description:"Crypto categories ranked by aggregated market cap",domain:"api.coingecko.com",strategy:p.PUBLIC,browser:!1,args:[{name:"sort",default:"market_cap_desc",help:`Sort order (${c.join(" / ")})`},{name:"limit",type:"int",default:20,help:"Number of categories (1-100; CoinGecko returns ~120 max)"}],columns:["rank","id","name","marketCap","volume24h","marketCapChange24hPct","top3Coins"],func:async(n)=>{const s=String(n.sort??"market_cap_desc").trim().toLowerCase();if(!c.includes(s))throw new i(`coingecko sort "${n.sort}" is not supported`,`Supported sorts: ${c.join(", ")}`);const t=Number(n.limit??20);if(!Number.isInteger(t)||t<=0)throw new i("coingecko limit must be a positive integer");if(t>100)throw new i("coingecko limit must be <= 100");const m=`https://api.coingecko.com/api/v3/coins/categories?order=${encodeURIComponent(s)}`;let r;try{r=await fetch(m,{headers:{"User-Agent":"Mozilla/5.0"}})}catch(e){throw new a(`coingecko categories request failed: ${e?.message??e}`)}if(r.status===429)throw new a("coingecko returned HTTP 429 (rate limited)","Free tier allows ~30 calls/min. Wait and retry.");if(!r.ok)throw new a(`coingecko categories returned HTTP ${r.status}`);let o;try{o=await r.json()}catch(e){throw new a(`coingecko categories returned malformed JSON: ${e?.message??e}`)}if(!Array.isArray(o)||!o.length)throw new u("coingecko categories","CoinGecko returned no category data.");return o.slice(0,t).map((e,l)=>({rank:l+1,id:String(e.id??""),name:String(e.name??""),marketCap:e.market_cap!=null?Number(e.market_cap):null,volume24h:e.volume_24h!=null?Number(e.volume_24h):null,marketCapChange24hPct:e.market_cap_change_24h!=null?Number(e.market_cap_change_24h):null,top3Coins:Array.isArray(e.top_3_coins_id)?e.top_3_coins_id.join(", "):""}))}});
|
package/clis/coingecko/coin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as y,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentError as u,CommandExecutionError as i,EmptyResultError as w}from"@jackwener/opencli/errors";y({site:"coingecko",name:"coin",access:"read",description:"Fetch a single cryptocurrency's market data by CoinGecko id (e.g. bitcoin, ethereum).",domain:"api.coingecko.com",strategy:k.PUBLIC,browser:!1,args:[{name:"id",positional:!0,required:!0,type:"string",help:"CoinGecko coin id (lowercase, e.g. bitcoin / ethereum / solana)."},{name:"currency",type:"string",default:"usd",help:"Quote currency (usd, cny, eur, jpy, ...)."}],columns:["id","symbol","name","rank","price","marketCap","volume24h","change24hPct","change7dPct","change30dPct","ath","athDate","atl","atlDate","circulatingSupply","totalSupply","maxSupply","genesisDate","homepage"],func:async(l)=>{const s=String(l.id??"").trim().toLowerCase();if(!s)throw new u("coingecko coin id cannot be empty","Example: ppcli coingecko coin bitcoin");if(!/^[a-z0-9][a-z0-9-]*$/.test(s))throw new u(`coingecko coin id must look like a CoinGecko slug (got "${l.id}")`);const r=String(l.currency??"usd").trim().toLowerCase();if(!/^[a-z0-9-]{2,20}$/.test(r))throw new u(`coingecko currency must look like a currency slug (got "${l.currency}")`);const c=new URL(`https://api.coingecko.com/api/v3/coins/${s}`);c.searchParams.set("localization","false");c.searchParams.set("tickers","false");c.searchParams.set("market_data","true");c.searchParams.set("community_data","false");c.searchParams.set("developer_data","false");c.searchParams.set("sparkline","false");let o;try{o=await fetch(c,{headers:{"User-Agent":"Mozilla/5.0"}})}catch(t){throw new i(`coingecko coin request failed: ${t?.message||t}`)}if(o.status===404)throw new w("coingecko coin",`coingecko has no coin with id "${s}".`);if(o.status===429)throw new i("coingecko returned HTTP 429 (rate limited)","Free tier allows ~30 calls/min. Wait and retry.");if(!o.ok)throw new i(`coingecko coin failed: HTTP ${o.status}`);let a;try{a=await o.json()}catch(t){throw new i(`coingecko returned malformed JSON: ${t?.message||t}`)}if(a?.error)throw new i(`coingecko returned error: ${a.error}`);const e=a.market_data||{},n=(t,
|
|
1
|
+
import{cli as y,Strategy as k}from"@jackwener/opencli/registry";import{ArgumentError as u,CommandExecutionError as i,EmptyResultError as w}from"@jackwener/opencli/errors";y({site:"coingecko",name:"coin",access:"read",description:"Fetch a single cryptocurrency's market data by CoinGecko id (e.g. bitcoin, ethereum).",domain:"api.coingecko.com",strategy:k.PUBLIC,browser:!1,args:[{name:"id",positional:!0,required:!0,type:"string",help:"CoinGecko coin id (lowercase, e.g. bitcoin / ethereum / solana)."},{name:"currency",type:"string",default:"usd",help:"Quote currency (usd, cny, eur, jpy, ...)."}],columns:["id","symbol","name","rank","price","marketCap","volume24h","change24hPct","change7dPct","change30dPct","ath","athDate","atl","atlDate","circulatingSupply","totalSupply","maxSupply","genesisDate","homepage"],func:async(l)=>{const s=String(l.id??"").trim().toLowerCase();if(!s)throw new u("coingecko coin id cannot be empty","Example: ppcli coingecko coin bitcoin");if(!/^[a-z0-9][a-z0-9-]*$/.test(s))throw new u(`coingecko coin id must look like a CoinGecko slug (got "${l.id}")`);const r=String(l.currency??"usd").trim().toLowerCase();if(!/^[a-z0-9-]{2,20}$/.test(r))throw new u(`coingecko currency must look like a currency slug (got "${l.currency}")`);const c=new URL(`https://api.coingecko.com/api/v3/coins/${s}`);c.searchParams.set("localization","false");c.searchParams.set("tickers","false");c.searchParams.set("market_data","true");c.searchParams.set("community_data","false");c.searchParams.set("developer_data","false");c.searchParams.set("sparkline","false");let o;try{o=await fetch(c,{headers:{"User-Agent":"Mozilla/5.0"}})}catch(t){throw new i(`coingecko coin request failed: ${t?.message||t}`)}if(o.status===404)throw new w("coingecko coin",`coingecko has no coin with id "${s}".`);if(o.status===429)throw new i("coingecko returned HTTP 429 (rate limited)","Free tier allows ~30 calls/min. Wait and retry.");if(!o.ok)throw new i(`coingecko coin failed: HTTP ${o.status}`);let a;try{a=await o.json()}catch(t){throw new i(`coingecko returned malformed JSON: ${t?.message||t}`)}if(a?.error)throw new i(`coingecko returned error: ${a.error}`);const e=a.market_data||{},n=(t,d)=>t&&t[d]!=null?t[d]:null,m=(t)=>t?String(t).slice(0,10):"",p=n(e.current_price,r),g=n(e.market_cap,r),h=n(e.total_volume,r);if(p==null&&g==null&&h==null)throw new i(`coingecko returned no market data for currency "${r}"`,"Use a CoinGecko-supported quote currency such as usd, cny, eur, or jpy.");return[{id:a.id||s,symbol:String(a.symbol||"").toUpperCase(),name:a.name||"",rank:a.market_cap_rank??null,price:p,marketCap:g,volume24h:h,change24hPct:e.price_change_percentage_24h??null,change7dPct:e.price_change_percentage_7d??null,change30dPct:e.price_change_percentage_30d??null,ath:n(e.ath,r),athDate:m(n(e.ath_date,r)),atl:n(e.atl,r),atlDate:m(n(e.atl_date,r)),circulatingSupply:e.circulating_supply??null,totalSupply:e.total_supply??null,maxSupply:e.max_supply??null,genesisDate:a.genesis_date||"",homepage:Array.isArray(a.links?.homepage)?a.links.homepage.find(Boolean)||"":""}]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as u,Strategy as p}from"@jackwener/opencli/registry";import{ArgumentError as
|
|
1
|
+
import{cli as u,Strategy as p}from"@jackwener/opencli/registry";import{ArgumentError as l,CommandExecutionError as o,EmptyResultError as c}from"@jackwener/opencli/errors";const g="https://api.coingecko.com/api/v3/derivatives";u({site:"coingecko",name:"derivatives",access:"read",description:"Top crypto derivative (perpetual / futures) markets by 24h volume",domain:"api.coingecko.com",strategy:p.PUBLIC,browser:!1,args:[{name:"limit",type:"int",default:20,help:"Max rows to return (1-500; CoinGecko returns one large page)."},{name:"symbol",type:"string",required:!1,help:'Optional symbol substring filter (e.g. "BTC", "ETHUSDT").'}],columns:["rank","market","symbol","indexId","contractType","price","change24hPct","fundingRate","openInterestUsd","volume24hUsd","expired"],func:async(a)=>{const i=Number(a.limit??20);if(!Number.isInteger(i)||i<=0)throw new l("coingecko derivatives limit must be a positive integer");if(i>500)throw new l("coingecko derivatives limit must be <= 500");const n=a.symbol==null?"":String(a.symbol).trim().toUpperCase();let r;try{r=await fetch(g,{headers:{"User-Agent":"Mozilla/5.0"}})}catch(e){throw new o(`coingecko derivatives request failed: ${e?.message??e}`)}if(r.status===429)throw new o("coingecko derivatives returned HTTP 429 (rate limited)","Free tier allows ~30 calls/min. Wait and retry.");if(!r.ok)throw new o(`coingecko derivatives returned HTTP ${r.status}`);let t;try{t=await r.json()}catch(e){throw new o(`coingecko derivatives returned malformed JSON: ${e?.message??e}`)}if(!Array.isArray(t)||!t.length)throw new c("coingecko derivatives","CoinGecko returned no derivative tickers.");let s=t;if(n){s=t.filter((e)=>String(e.symbol??"").toUpperCase().includes(n)||String(e.index_id??"").toUpperCase().includes(n));if(!s.length)throw new c("coingecko derivatives",`No derivative tickers matched symbol="${n}".`)}return s.slice(0,i).map((e,m)=>({rank:m+1,market:String(e.market??""),symbol:String(e.symbol??""),indexId:String(e.index_id??""),contractType:String(e.contract_type??""),price:e.price!=null?Number(e.price):null,change24hPct:e.price_percentage_change_24h!=null?Number(e.price_percentage_change_24h):null,fundingRate:e.funding_rate!=null?Number(e.funding_rate):null,openInterestUsd:e.open_interest!=null?Number(e.open_interest):null,volume24hUsd:e.volume_24h!=null?Number(e.volume_24h):null,expired:e.expired_at?String(e.expired_at):""}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as l,Strategy as
|
|
1
|
+
import{cli as l,Strategy as m}from"@jackwener/opencli/registry";import{ArgumentError as c,CommandExecutionError as o,EmptyResultError as g}from"@jackwener/opencli/errors";l({site:"coingecko",name:"exchanges",access:"read",description:"Top crypto exchanges by 24h BTC trading volume",domain:"api.coingecko.com",strategy:m.PUBLIC,browser:!1,args:[{name:"limit",type:"int",default:20,help:"Number of exchanges (1-250, CoinGecko per_page upper bound)"},{name:"page",type:"int",default:1,help:"Page number (1-based)"}],columns:["rank","id","name","trustScore","volume24hBtc","country","yearEstablished","url"],func:async(s)=>{const r=Number(s.limit??20);if(!Number.isInteger(r)||r<=0)throw new c("coingecko limit must be a positive integer");if(r>250)throw new c("coingecko limit must be <= 250 (per_page upper bound)");const n=Number(s.page??1);if(!Number.isInteger(n)||n<=0)throw new c("coingecko page must be a positive integer");const i=new URL("https://api.coingecko.com/api/v3/exchanges");i.searchParams.set("per_page",String(r));i.searchParams.set("page",String(n));let t;try{t=await fetch(i,{headers:{"User-Agent":"Mozilla/5.0"}})}catch(e){throw new o(`coingecko exchanges request failed: ${e?.message??e}`)}if(t.status===429)throw new o("coingecko returned HTTP 429 (rate limited)","Free tier allows ~30 calls/min. Wait and retry.");if(!t.ok)throw new o(`coingecko exchanges returned HTTP ${t.status}`);let a;try{a=await t.json()}catch(e){throw new o(`coingecko exchanges returned malformed JSON: ${e?.message??e}`)}if(!Array.isArray(a)||!a.length)throw new g("coingecko exchanges","CoinGecko returned no exchange data.");return a.map((e,u)=>({rank:(n-1)*r+u+1,id:String(e.id??""),name:String(e.name??""),trustScore:e.trust_score!=null?Number(e.trust_score):null,volume24hBtc:e.trade_volume_24h_btc!=null?Number(e.trade_volume_24h_btc):null,country:String(e.country??""),yearEstablished:e.year_established!=null?Number(e.year_established):null,url:String(e.url??"")}))}});
|
package/clis/coingecko/global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as i,Strategy as m}from"@jackwener/opencli/registry";import{ArgumentError as s,CommandExecutionError as c}from"@jackwener/opencli/errors";i({site:"coingecko",name:"global",access:"read",description:"Aggregate crypto market stats: total market cap, volume, dominance",domain:"api.coingecko.com",strategy:m.PUBLIC,browser:!1,args:[{name:"currency",type:"string",default:"usd",help:"Quote currency for total market cap / volume (usd, cny, eur, jpy, ...)"}],columns:["currency","totalMarketCap","totalVolume24h","marketCapChange24hPct","btcDominancePct","ethDominancePct","activeCryptocurrencies","markets","ongoingIcos","updatedAt"],func:async(l)=>{const t=String(l.currency??"usd").trim().toLowerCase();if(!/^[a-z0-9-]{2,20}$/.test(t))throw new s(`coingecko currency must look like a currency slug (got "${l.currency}")`);let r;try{r=await fetch("https://api.coingecko.com/api/v3/global",{headers:{"User-Agent":"Mozilla/5.0"}})}catch(a){throw new c(`coingecko global request failed: ${a?.message??a}`)}if(r.status===429)throw new c("coingecko returned HTTP 429 (rate limited)","Free tier allows ~30 calls/min. Wait and retry.");if(!r.ok)throw new c(`coingecko global returned HTTP ${r.status}`);let u;try{u=await r.json()}catch(a){throw new c(`coingecko global returned malformed JSON: ${a?.message??a}`)}const e=u?.data;if(!e)throw new c("coingecko global returned no data envelope");const o=e?.total_market_cap?.[t],n=e?.total_volume?.[t];if(o==null&&n==null)throw new s(`coingecko has no market totals for currency "${t}"`,"Use a CoinGecko-supported quote currency such as usd, cny, eur, or jpy.");return[{currency:t.toUpperCase(),totalMarketCap:o!=null?Number(o):null,totalVolume24h:n!=null?Number(n):null,marketCapChange24hPct:e.market_cap_change_percentage_24h_usd!=null?Number(e.market_cap_change_percentage_24h_usd):null,btcDominancePct:e?.market_cap_percentage?.btc!=null?Number(e.market_cap_percentage.btc):null,ethDominancePct:e?.market_cap_percentage?.eth!=null?Number(e.market_cap_percentage.eth):null,activeCryptocurrencies:e.active_cryptocurrencies!=null?Number(e.active_cryptocurrencies):null,markets:e.markets!=null?Number(e.markets):null,ongoingIcos:e.ongoing_icos!=null?Number(e.ongoing_icos):null,updatedAt:e.updated_at?new Date(e.updated_at*1000).toISOString():""}]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as s,Strategy as m}from"@jackwener/opencli/registry";import{CommandExecutionError as
|
|
1
|
+
import{cli as s,Strategy as m}from"@jackwener/opencli/registry";import{CommandExecutionError as n,EmptyResultError as l}from"@jackwener/opencli/errors";s({site:"coingecko",name:"trending",access:"read",description:"Top trending cryptocurrencies on CoinGecko in the last 24h (search-volume based).",domain:"api.coingecko.com",strategy:m.PUBLIC,browser:!1,args:[],columns:["rank","id","symbol","name","marketCapRank","priceBtc","thumb"],func:async()=>{const c="https://api.coingecko.com/api/v3/search/trending";let t;try{t=await fetch(c,{headers:{"User-Agent":"Mozilla/5.0"}})}catch(r){throw new n(`coingecko trending request failed: ${r?.message||r}`)}if(t.status===429)throw new n("coingecko returned HTTP 429 (rate limited)","Wait and retry.");if(!t.ok)throw new n(`coingecko trending failed: HTTP ${t.status}`);let o;try{o=await t.json()}catch(r){throw new n(`coingecko returned malformed JSON: ${r?.message||r}`)}const a=Array.isArray(o?.coins)?o.coins:[];if(a.length===0)throw new l("coingecko trending","coingecko returned no trending coins.");return a.map((r,i)=>{const e=r?.item||{};return{rank:i+1,id:e.id||"",symbol:String(e.symbol||"").toUpperCase(),name:e.name||"",marketCapRank:e.market_cap_rank??null,priceBtc:e.price_btc??null,thumb:e.thumb||e.small||e.large||""}})}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as l,Strategy as o}from"@jackwener/opencli/registry";import{atlassianRequest as u,parseLimit as p,queryString as m,requireNonEmptyRows as f,requireString as h}from"../_atlassian/shared.js";import{confluenceConfig as y,confluenceResults as d,normalizeSearchResult as q,withSpaceCql as C}from"./shared.js";l({site:"confluence",name:"search",access:"read",description:"Search Confluence content with CQL",domain:"atlassian.net",strategy:o.PUBLIC,browser:!1,args:[{name:"cql",positional:!0,required:!0,help:'CQL query, e.g. "type = page and title ~ \\"RCA\\""'},{name:"space",type:"string",help:"Limit search to a Confluence space key"},{name:"limit",type:"int",default:20,help:"Max results to return (1-100)"}],columns:["id","title","type","spaceKey","status","lastModified","url"],func:async(e)=>{const t=y(),n=C(h(e.cql,"CQL"),e.space),c=p(e.limit,20,100,"confluence limit"),a=`/rest/api/search${m({cql:n,limit:c})}`,s=await u(t,a,{label:"confluence search"}),i=d(s,"confluence search");return f(i.map((r)=>q(r,t)),"confluence search",`No Confluence content matched "${n}".`)}});
|
package/clis/coupang/product.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as y,AuthRequiredError as _,CommandExecutionError as d,EmptyResultError as p}from"@jackwener/opencli/errors";import{cli as h,Strategy as N}from"@jackwener/opencli/registry";import{canonicalizeProductUrl as s,normalizeProductId as m,requireProductIdArg as g}from"./utils.js";function v(o){return JSON.stringify(o)}function w(o){return`
|
|
2
2
|
(async () => {
|
|
3
|
-
const expectedProductId = ${
|
|
3
|
+
const expectedProductId = ${v(o)};
|
|
4
4
|
const normalizeText = (value) => (value == null ? '' : String(value).trim());
|
|
5
5
|
const parseNum = (value) => {
|
|
6
6
|
const text = normalizeText(value).replace(/[^\\d.]/g, '');
|
|
@@ -158,4 +158,4 @@ import{ArgumentError as N,AuthRequiredError as q,CommandExecutionError as $,Empt
|
|
|
158
158
|
data: merged,
|
|
159
159
|
};
|
|
160
160
|
})()
|
|
161
|
-
`}
|
|
161
|
+
`}h({site:"coupang",name:"product",access:"read",description:"Read full product detail (price, rating, seller, delivery) for a Coupang product",domain:"www.coupang.com",strategy:N.COOKIE,browser:!0,args:[{name:"product-id",positional:!0,required:!1,help:"Coupang product ID (digits only)"},{name:"url",required:!1,help:"Canonical Coupang product URL (alternative to --product-id)"}],columns:["product_id","title","price","original_price","discount_rate","rating","review_count","seller","brand","rocket","delivery_promise","image_url","url"],func:async(o,a)=>{const i=a["product-id"];if(!i&&!a.url)throw new y("Either --product-id or --url is required");const n=i?g(i,"product-id"):g(a.url,"--url"),c=s(a.url,n)||s("",n);await o.goto(c).catch((t)=>{throw new d(`coupang product navigation failed: ${t?.message||t}`)});await o.wait(2).catch((t)=>{throw new d(`coupang product wait failed: ${t?.message||t}`)});const r=await o.evaluate(w(n)).catch((t)=>{throw new d(`coupang product extraction failed: ${t?.message||t}`)}),l=r?.loginHints??{};if(l.hasLoginLink&&!l.hasMyCoupang)throw new _("coupang.com","Please log into Coupang in Chrome and retry.");if(r?.reason==="PRODUCT_MISMATCH"){const t=m(r?.currentProductId||""),f=t?`got ${t}`:"no product id observed";throw new p("coupang product",`Product page redirected: expected ${n}, ${f} (item may be sold out or unavailable in your region)`)}if(!r?.ok||!r?.data)throw new p("coupang product",`No product data extracted from ${c}. The page may have failed to render or this product is restricted.`);const u=m(r?.currentProductId||r.data.product_id||n),e=r.data;return[{product_id:u,title:e.title||null,price:e.price??null,original_price:e.original_price??null,discount_rate:e.discount_rate??null,rating:e.rating??null,review_count:e.review_count??null,seller:e.seller||null,brand:e.brand||null,rocket:e.rocket||null,delivery_promise:e.delivery_promise||null,image_url:e.image_url||null,url:s("",u)||c}]}});
|
package/clis/coupang/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as g}from"@jackwener/opencli/errors";export function parseLimitArg(t,r,e){if(t===void 0||t===null||t==="")return r;const n=Number(t);if(!Number.isInteger(n)||n<1||n>e)throw new g(`--limit must be an integer between 1 and ${e} (got ${t})`);return n}export function parsePageArg(t,r){if(t===void 0||t===null||t==="")return r;const e=Number(t);if(!Number.isInteger(e)||e<1)throw new g(`--page must be a positive integer (got ${t})`);return e}function d(t){return t.url||t.product_id||`${t.title}:${t.price??""}`}const O=["판매자로켓","로켓프레시","로켓와우","로켓배송","로켓직구"],N=["무료배송","일반배송"],x=["오늘도착","내일도착","새벽도착","오늘출발"],_={ROCKET:"로켓배송",ROCKET_MERCHANT:"판매자로켓",ROCKET_WOW:"로켓와우",WOW:"로켓와우",ROCKET_FRESH:"로켓프레시",FRESH:"로켓프레시",SELLER_ROCKET:"판매자로켓",ROCKET_JIKGU:"로켓직구",JIKGU:"로켓직구",COUPANG_GLOBAL:"로켓직구"},y={DAWN:"새벽도착",EARLY_DAWN:"새벽도착",TOMORROW:"내일도착",TODAY:"오늘도착",SAME_DAY:"오늘도착",TODAY_SHIP:"오늘출발",TODAY_DISPATCH:"오늘출발"};function u(t){if(t==null)return"";return String(t).trim()}function f(t){if(typeof t==="number"&&Number.isFinite(t))return t;const r=u(t).replace(/[^\d.]/g,"");if(!r)return null;const e=Number(r);return Number.isFinite(e)?e:null}function s(t,r){for(const e of r){const n=e.split(".");let o=t,a=!0;for(const l of n){if(!o||typeof o!=="object"||!(l in o)){a=!1;break}o=o[l]}if(a&&o!=null&&u(o)!=="")return o}return null}export function normalizeProductId(t){const r=u(t);if(!r)return"";return(r.match(/\/vp\/products\/(\d+)/)||r.match(/\b(\d{6,})\b/))?.[1]??""}export function requireProductIdArg(t,r="--product-id"){const e=u(t);if(r==="--url"){try{const n=new URL(e.startsWith("http")?e:`https://www.coupang.com${e}`),o=n.pathname.match(/^\/vp\/products\/(\d{6,})(?:\/|$)/);if((n.hostname==="coupang.com"||n.hostname.endsWith(".coupang.com"))&&o)return o[1]}catch{}throw new g(`${r} must be a Coupang product URL containing /vp/products/<id>`)}if(!/^\d{6,}$/.test(e))throw new g(`${r} must be a numeric Coupang product ID`);return e}export function canonicalizeProductUrl(t,r){const e=u(t);if(e)try{const o=new URL(e.startsWith("http")?e:`https://www.coupang.com${e}`);if(!o.hostname.includes("coupang.com"))return"";const a=normalizeProductId(o.pathname)||normalizeProductId(r);if(!a)return o.toString();return`https://www.coupang.com/vp/products/${a}`}catch{return""}const n=normalizeProductId(r);return n?`https://www.coupang.com/vp/products/${n}`:""}function h(t){return t.flatMap((r)=>{const e=u(r);if(!e)return[];return e.split(/[,\s|]+/)}).map((r)=>r.trim().toUpperCase()).filter(Boolean)}function m(...t){return t.map(u).filter(Boolean).join(" ").replace(/schema\.org\/[A-Za-z]+/gi," ").replace(/\s+/g," ").trim()}function C(...t){const r=h(t);for(const n of r)if(_[n])return _[n];const e=m(...t);if(!e)return"";if(/판매자\s*로켓/.test(e))return"판매자로켓";if(/로켓\s*프레시|새벽\s*도착\s*보장/.test(e))return"로켓프레시";if(/로켓\s*와우/.test(e))return"로켓와우";if(/로켓\s*직구|직구/.test(e))return"로켓직구";if(/로켓\s*배송/.test(e))return"로켓배송";return O.find((n)=>e.includes(n))??""}function I(...t){const r=m(...t);if(!r)return"";if(/무료\s*배송/.test(r))return"무료배송";if(/일반\s*배송/.test(r))return"일반배송";return N.find((e)=>r.includes(e))??""}function S(...t){const r=h(t);for(const n of r)if(y[n])return y[n];const e=m(...t);if(!e)return"";if(/오늘\s*출발/.test(e))return"오늘출발";if(/오늘.*도착/.test(e))return"오늘도착";if(/새벽.*도착/.test(e))return"새벽도착";if(/내일.*도착/.test(e))return"내일도착";return x.find((n)=>e.includes(n))??""}function B(t){const r=(e)=>{const n=u(e);if(!n)return"";if(/schema\.org\//i.test(n))return n.split("/").pop()??"";return n};if(Array.isArray(t))return t.map(r).filter(Boolean).join(", ");return r(t)}export function normalizeSearchItem(t,r){const e=normalizeProductId(s(t,["productId","product_id","id","productNo","item.id","product.productId","url"])),n=u(s(t,["title","name","productName","productTitle","itemName","item.title"])),o=f(s(t,["price","salePrice","finalPrice","sellingPrice","discountPrice","item.price"])),a=f(s(t,["originalPrice","basePrice","listPrice","originPrice","strikePrice"])),l=u(s(t,["unitPrice","unit_price","unitPriceText"])),i=f(s(t,["rating","star","reviewRating","review.rating","item.rating"])),p=f(s(t,["reviewCount","ratingCount","reviews","reviewCnt","item.reviewCount"])),c=[s(t,["deliveryType","deliveryBadge","badgeLabel","shippingType","shippingBadge"]),s(t,["badge","badges","labels","benefitBadge","promotionBadge"]),s(t,["text","summary"]),s(t,["deliveryPromise","promise","arrivalText","arrivalBadge"]),s(t,["rocket","rocketType"])],T=I(...c),b=S(...c),P=C(...c),R=B(s(t,["badge","badges","labels","benefitBadge","promotionBadge"])),v=u(s(t,["category","categoryName","categoryPath","item.category"])),E=u(s(t,["seller","sellerName","vendorName","merchantName","item.seller"])),A=canonicalizeProductUrl(s(t,["url","productUrl","link","item.url"]),e),k=f(s(t,["discountRate","discount","discountPercent","discount_rate"]));return{rank:r+1,product_id:e,title:n,price:o,original_price:a,unit_price:l,discount_rate:k,rating:i,review_count:p,rocket:P,delivery_type:T,delivery_promise:b,seller:E,badge:R,category:v,url:A}}export function dedupeSearchItems(t){const r=new Set,e=[];for(const n of t){const o=d(n);if(!o||r.has(o))continue;r.add(o);e.push({...n,rank:e.length+1})}return e}export function sanitizeSearchItems(t,r){return dedupeSearchItems(t.filter((e)=>Boolean(e.title&&(e.product_id||e.url)))).slice(0,r)}export function mergeSearchItems(t,r,e){const n=new Map;for(const i of r){const p=d(i);if(p)n.set(p,i)}const o=t.map((i)=>{const p=d(i),c=p?n.get(p):null;if(!c)return i;return{...i,price:c.price??i.price,original_price:c.original_price??i.original_price,unit_price:c.unit_price||i.unit_price,discount_rate:c.discount_rate??i.discount_rate,rating:c.rating??i.rating,review_count:c.review_count??i.review_count,rocket:c.rocket||i.rocket,delivery_type:c.delivery_type||i.delivery_type,delivery_promise:c.delivery_promise||i.delivery_promise,seller:c.seller||i.seller,badge:c.badge||i.badge,category:c.category||i.category,url:c.url||i.url}}),a=new Set(o.map((i)=>d(i)).filter(Boolean)),l=r.filter((i)=>{const p=d(i);return p&&!a.has(p)});return sanitizeSearchItems([...o,...l],e)}
|
package/clis/crates/crate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as d,Strategy as l}from"@jackwener/opencli/registry";import{EmptyResultError as m}from"@jackwener/opencli/errors";import{CRATES_BASE as u,cratesFetch as p,requireCrateName as g}from"./utils.js";d({site:"crates",name:"crate",access:"read",description:"Single crates.io crate metadata (latest version, downloads, license, repo)",domain:"crates.io",strategy:l.PUBLIC,browser:!1,args:[{name:"name",positional:!0,required:!0,help:'crates.io crate name (e.g. "serde", "tokio")'}],columns:["name","latestVersion","description","downloads","recentDownloads","versions","license","homepage","documentation","repository","keywords","categories","created","updated","url"],func:async(
|
|
1
|
+
import{cli as d,Strategy as l}from"@jackwener/opencli/registry";import{EmptyResultError as m}from"@jackwener/opencli/errors";import{CRATES_BASE as u,cratesFetch as p,requireCrateName as g}from"./utils.js";d({site:"crates",name:"crate",access:"read",description:"Single crates.io crate metadata (latest version, downloads, license, repo)",domain:"crates.io",strategy:l.PUBLIC,browser:!1,args:[{name:"name",positional:!0,required:!0,help:'crates.io crate name (e.g. "serde", "tokio")'}],columns:["name","latestVersion","description","downloads","recentDownloads","versions","license","homepage","documentation","repository","keywords","categories","created","updated","url"],func:async(s)=>{const n=g(s.name),t=await p(`${u}/api/v1/crates/${encodeURIComponent(n)}`,`crates crate ${n}`),e=t?.crate;if(!e||!e.id)throw new m("crates crate",`crates.io returned no metadata for "${n}".`);const o=Array.isArray(t.versions)?t.versions:[],a=o.find((r)=>r.num===e.newest_version)||o.find((r)=>r.num===e.max_stable_version)||o[0]||{},i=Array.isArray(t.keywords)?t.keywords.map((r)=>r?.keyword||r?.id||"").filter(Boolean).join(", "):"",c=Array.isArray(t.categories)?t.categories.map((r)=>r?.category||r?.slug||"").filter(Boolean).join(", "):"";return[{name:String(e.name??e.id),latestVersion:String(e.newest_version??e.max_stable_version??e.max_version??""),description:String(e.description??"").trim(),downloads:e.downloads!=null?Number(e.downloads):null,recentDownloads:e.recent_downloads!=null?Number(e.recent_downloads):null,versions:e.num_versions!=null?Number(e.num_versions):o.length,license:String(a.license??""),homepage:String(e.homepage??""),documentation:String(e.documentation??""),repository:String(e.repository??""),keywords:i,categories:c,created:String(e.created_at??"").slice(0,10),updated:String(e.updated_at??"").slice(0,10),url:`https://crates.io/crates/${e.name??e.id}`}]}});
|
package/clis/crates/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as l,Strategy as d}from"@jackwener/opencli/registry";import{EmptyResultError as u}from"@jackwener/opencli/errors";import{CRATES_BASE as m,cratesFetch as c,requireBoundedInt as p,requireString as y}from"./utils.js";l({site:"crates",name:"search",access:"read",description:"Search the public crates.io registry by keyword",domain:"crates.io",strategy:d.PUBLIC,browser:!1,args:[{name:"query",positional:!0,required:!0,help:'Search keyword (e.g. "serde", "async runtime")'},{name:"limit",type:"int",default:20,help:"Max results (1-100)"}],columns:["rank","name","latestVersion","description","downloads","recentDownloads","repository","updated","url"],func:async(r)=>{const t=y(r.query,"query"),s=p(r.limit,20,100),o=`${m}/api/v1/crates?q=${encodeURIComponent(t)}&per_page=${s}`,a=await c(o,"crates search"),n=Array.isArray(a?.crates)?a.crates:[];if(!n.length)throw new u("crates search",`No crates.io results matched "${t}".`);return n.slice(0,s).map((e,i)=>({rank:i+1,name:String(e.name??e.id??""),latestVersion:String(e.newest_version??e.max_stable_version??e.max_version??""),description:String(e.description??"").trim(),downloads:e.downloads!=null?Number(e.downloads):null,recentDownloads:e.recent_downloads!=null?Number(e.recent_downloads):null,repository:String(e.repository??e.homepage??""),updated:String(e.updated_at??"").slice(0,10),url:e.name?`https://crates.io/crates/${e.name}`:""}))}});
|
package/clis/crates/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as o,CommandExecutionError as a,EmptyResultError as c}from"@jackwener/opencli/errors";export const CRATES_BASE="https://crates.io";const u="opencli-crates-adapter (+https://github.com/jackwener/OpenCLI)",w=/^[A-Za-z][A-Za-z0-9_-]{0,63}$/;export function requireString(r,t){const e=String(r??"").trim();if(!e)throw new o(`crates ${t} cannot be empty`);return e}export function requireCrateName(r){const t=String(r??"").trim();if(!t)throw new o('crates crate name is required (e.g. "serde", "tokio")');if(!w.test(t))throw new o(`crates crate name "${r}" is not a valid crates.io name`,'Names start with an ASCII letter, then 0-63 chars of letters / digits / "_-".');return t}export function requireBoundedInt(r,t,e,s="limit"){const n=r??t,i=typeof n==="number"?n:Number(n);if(!Number.isInteger(i)||i<=0)throw new o(`crates ${s} must be a positive integer`);if(i>e)throw new o(`crates ${s} must be <= ${e}`);return i}export async function cratesFetch(r,t){let e;try{e=await fetch(r,{headers:{"user-agent":u,accept:"application/json"}})}catch(n){throw new a(`${t} request failed: ${n?.message??n}`,"Check that crates.io is reachable from this network.")}if(e.status===404)throw new c(t,`crates.io returned 404 for ${r}.`);if(e.status===429)throw new a(`${t} returned HTTP 429 (rate limited)`,"crates.io rate-limits unauthenticated traffic; wait a few seconds and retry.");if(!e.ok)throw new a(`${t} returned HTTP ${e.status}`);let s;try{s=await e.json()}catch(n){throw new a(`${t} returned malformed JSON: ${n?.message??n}`)}return s}
|
package/clis/csdn/article.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import{CliError as
|
|
1
|
+
import{CliError as P,CommandExecutionError as O}from"@jackwener/opencli/errors";import{cli as L,Strategy as H}from"@jackwener/opencli/registry";import{publishArticle as M}from"../_shared/article/publish.js";import{checkLogin as J}from"../_shared/article/auth.js";import{readFile as j,stat as K}from"node:fs/promises";function R(e){if(!e.execute)throw new P("INVALID_INPUT","此 CSDN 写操作需要加 --execute 参数才能真正执行。注意:本报错仅表示缺少 --execute,并未校验其余参数,不能当 dry-run 预览用")}async function B(e){const t=typeof e.text==="string"?e.text:void 0,a=typeof e.file==="string"?e.file:void 0;if(t&&a)throw new P("INVALID_INPUT","只能用 <text> 或 --file 之一,不能同时传");let s=t??"";if(a){let l;try{l=await K(a)}catch{throw new P("INVALID_INPUT",`文件不存在:${a}`)}if(!l.isFile())throw new P("INVALID_INPUT",`路径必须是可读文本文件:${a}`);let x;try{x=await j(a)}catch{throw new P("INVALID_INPUT",`文件读取失败:${a}`)}try{s=new TextDecoder("utf-8",{fatal:!0}).decode(x)}catch{throw new P("INVALID_INPUT",`文件无法解码为 UTF-8 文本:${a}`)}}if(!s.trim())throw new P("INVALID_INPUT","正文不能为空");return s}function V(e,t,a,s,l={},x="success"){return[{status:x,outcome:s,message:e,target_type:t,target:a,...l}]}const csdnProfile={home:"https://editor.csdn.net/md/",outputFormat:"markdown",needsHtml:!0,image:{skip:["csdnimg.cn","csdn.net"],uploadFn:async(e,t)=>{const a="203803574",s="9znpamsyl2c7cdrr9sas0le9vbc3r6ba";function l(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(h){var g=Math.random()*16|0,S=h==="x"?g:g&3|8;return S.toString(16)})}async function x(h,g){var S=new TextEncoder,N=S.encode(g),D=S.encode(h),T=await crypto.subtle.importKey("raw",N,{name:"HMAC",hash:"SHA-256"},!1,["sign"]),U=await crypto.subtle.sign("HMAC",T,D),k=new Uint8Array(U),E="";for(var C=0;C<k.byteLength;C++)E+=String.fromCharCode(k[C]);return btoa(E)}async function p(h,g){var S=l(),N=g==="GET"?`GET
|
|
2
2
|
*/*
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
x-ca-key:`+
|
|
7
|
-
x-ca-nonce:`+
|
|
8
|
-
`+
|
|
6
|
+
x-ca-key:`+a+`
|
|
7
|
+
x-ca-nonce:`+S+`
|
|
8
|
+
`+h:`POST
|
|
9
9
|
*/*
|
|
10
10
|
|
|
11
11
|
application/json
|
|
12
12
|
|
|
13
|
-
x-ca-key:`+
|
|
14
|
-
x-ca-nonce:`+
|
|
15
|
-
`+
|
|
13
|
+
x-ca-key:`+a+`
|
|
14
|
+
x-ca-nonce:`+S+`
|
|
15
|
+
`+h,D=await x(N,s),T={accept:"*/*","x-ca-key":a,"x-ca-nonce":S,"x-ca-signature":D,"x-ca-signature-headers":"x-ca-key,x-ca-nonce"};if(g==="POST")T["content-type"]="application/json";return T}var u=await fetch(e,{credentials:"omit"});if(!u.ok)throw Error("图片下载失败: "+e.slice(0,80));var d=await u.blob(),i=["jpg","jpeg","png","gif","webp"],m=(e.split("?")[0].split(".").pop()||"").toLowerCase();if(i.indexOf(m)===-1){var y=(d.type||"").toLowerCase(),n=y.indexOf("/")!==-1?y.split("/")[1]:"";if(n==="jpeg")n="jpg";m=i.indexOf(n)!==-1?n:""}var v=m||"jpg",_="/resource-api/v1/image/direct/upload/signature",b=await p(_,"POST"),w=await fetch("https://bizapi.csdn.net"+_,{method:"POST",credentials:"include",headers:b,body:JSON.stringify({imageTemplate:"",appName:"direct_blog_markdown",imageSuffix:v})}),f=await w.json();if(f.code!==200||!f.data)return{url:e};var o=f.data,c=o.customParam,r=new FormData;r.append("key",o.filePath);r.append("policy",o.policy);r.append("signature",o.signature);r.append("callbackBody",o.callbackBody);r.append("callbackBodyType",o.callbackBodyType);r.append("callbackUrl",o.callbackUrl);r.append("AccessKeyId",o.accessId);r.append("x:rtype",c.rtype);r.append("x:filePath",c.filePath);r.append("x:isAudit",String(c.isAudit));r.append("x:x-image-app",c["x-image-app"]);r.append("x:type",c.type);r.append("x:x-image-suffix",c["x-image-suffix"]);r.append("x:username",c.username);r.append("file",d,"image."+v);var I=await fetch(o.host,{method:"POST",body:r}),A=await I.json();if(A.code!==200||!A.data||!A.data.imageUrl)return{url:e};return{url:A.data.imageUrl}}},checkAuth:async(e)=>{var t="203803574",a="9znpamsyl2c7cdrr9sas0le9vbc3r6ba";async function s(m,y){var n=new TextEncoder,v=n.encode(y),_=n.encode(m),b=await crypto.subtle.importKey("raw",v,{name:"HMAC",hash:"SHA-256"},!1,["sign"]),w=await crypto.subtle.sign("HMAC",b,_),f=new Uint8Array(w),o="";for(var c=0;c<f.byteLength;c++)o+=String.fromCharCode(f[c]);return btoa(o)}var l="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(m){var y=Math.random()*16|0;return(m==="x"?y:y&3|8).toString(16)}),x="/blog-console-api/v3/editor/getBaseInfo",p=`GET
|
|
16
16
|
*/*
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
x-ca-key:`+
|
|
21
|
-
x-ca-nonce
|
|
22
|
-
`+
|
|
20
|
+
x-ca-key:`+t+`
|
|
21
|
+
x-ca-nonce:`+l+`
|
|
22
|
+
`+x,u=await s(p,a),d=await fetch("https://bizapi.csdn.net"+x,{method:"GET",credentials:"include",headers:{accept:"*/*","x-ca-key":t,"x-ca-nonce":l,"x-ca-signature":u,"x-ca-signature-headers":"x-ca-key,x-ca-nonce"}}),i=await d.json();if(i.code===200&&i.data&&i.data.name)return{isAuthenticated:!0,userId:i.data.name,username:i.data.nickname||i.data.name,avatar:i.data.avatar||""};return{isAuthenticated:!1}},publish:async(e,t)=>{var a=e.params||{},s="203803574",l="9znpamsyl2c7cdrr9sas0le9vbc3r6ba";async function x(b,w){var f=new TextEncoder,o=f.encode(w),c=f.encode(b),r=await crypto.subtle.importKey("raw",o,{name:"HMAC",hash:"SHA-256"},!1,["sign"]),I=await crypto.subtle.sign("HMAC",r,c),A=new Uint8Array(I),h="";for(var g=0;g<A.byteLength;g++)h+=String.fromCharCode(A[g]);return btoa(h)}async function p(b){var w="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=Math.random()*16|0;return(c==="x"?r:r&3|8).toString(16)}),f=`POST
|
|
23
23
|
*/*
|
|
24
24
|
|
|
25
25
|
application/json
|
|
26
26
|
|
|
27
|
-
x-ca-key:`+
|
|
28
|
-
x-ca-nonce:`+
|
|
29
|
-
`+
|
|
27
|
+
x-ca-key:`+s+`
|
|
28
|
+
x-ca-nonce:`+w+`
|
|
29
|
+
`+b,o=await x(f,l);return{accept:"*/*","content-type":"application/json","x-ca-key":s,"x-ca-nonce":w,"x-ca-signature":o,"x-ca-signature-headers":"x-ca-key,x-ca-nonce"}}var u=!e.draftOnly,d="/blog-console-api/v3/mdeditor/saveArticle",i=await p(d),m=await fetch("https://bizapi.csdn.net"+d,{method:"POST",credentials:"include",headers:i,body:JSON.stringify({title:e.title,markdowncontent:e.content,content:e.html||"",readType:"public",level:0,tags:a.tags||"",status:u?0:2,categories:a.categories||"",type:"original",original_link:"",authorized_status:!1,Description:a.description||"",not_auto_saved:"1",source:"pc_mdeditor",cover_images:[],cover_type:0,is_new:1,vote_id:0,resource_id:"",pubStatus:u?"publish":"draft",creator_activity_id:""})}),y=await m.text(),n=null;try{n=JSON.parse(y)}catch(b){}if(!m.ok||!n||n.code!==200||!n.data||!n.data.id)return{ok:!1,stage:u?"publish":"save",status:m.status,message:n&&(n.msg||n.message)||y.slice(0,300)};var v=String(n.data.id);if(!u)return{ok:!0,draft:!0,id:v,url:"https://editor.csdn.net/md?articleId="+v};var _=n.data&&n.data.url||"https://blog.csdn.net/article/details/"+v;return{ok:!0,draft:!1,id:v,url:_}}};export{csdnProfile};L({site:"csdn",name:"article",access:"write",description:"发布 CSDN 博客文章。默认正式发布,加 --draft 仅存草稿。正文默认 Markdown,图片自动转存到 CSDN 图床。",domain:"editor.csdn.net",strategy:H.COOKIE,browser:!0,args:[{name:"title",positional:!0,required:!0,help:"文章标题"},{name:"text",positional:!0,help:"正文(Markdown,与 --file 二选一)"},{name:"file",help:"正文文件路径(UTF-8 编码 Markdown 文件)"},{name:"html",type:"boolean",help:"将正文视为 HTML 而非 Markdown"},{name:"category",help:"个人专栏名(CSDN 的「分类」即个人专栏),逗号分隔最多 3 个;合法值用 `csdn columns` 列举。可空=不归专栏"},{name:"tags",help:"标签,自由文本逗号分隔最多 5 个(CSDN 标签是自由词,无需查接口)。可空"},{name:"description",help:"文章摘要,最多 256 字(可空,CSDN 自动截取正文)"},{name:"draft",type:"boolean",help:"仅保存为草稿,不发布"},{name:"execute",type:"boolean",help:"真正执行写操作,不加此参数则拒绝发布"}],columns:["status","outcome","message","target_type","target","created_target","created_url"],func:async(e,t)=>{if(!e)throw new O("CSDN 文章发布需要浏览器会话");R(t);const a=String(t.title??"").trim();if(!a)throw new P("INVALID_INPUT","文章标题不能为空");const s=await B(t),l=Boolean(t.draft),x={categories:typeof t.category==="string"?t.category.trim():"",tags:typeof t.tags==="string"?t.tags.trim():"",description:typeof t.description==="string"?t.description:""},p=await M(e,{title:a,body:s,format:t.html?"html":"markdown",draftOnly:l,profile:csdnProfile,publishParams:x}),u=p.images.uploaded.length|0,d=p.images.failed.length|0;let i=p.draft?"已保存 CSDN 草稿":"已发布 CSDN 文章";if(u||d)i+=`·图片:${u} 张转存成功${d?`,${d} 张失败`:""}`;if(d>0){const m=p.images.failed.map((y)=>y&&y.src||"").filter(Boolean).slice(0,5).join(";");i+=`。⚠️ 有图片未成功转存(正文里这些图会裂),请检查图片来源后重发:${m}`}return V(i,"article","",p.draft?"draft":"created",{created_target:"article:"+p.id,created_url:p.url,images_uploaded:u,images_failed:d},d>0?"partial":"success")}});
|
package/clis/csdn/columns.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as n,Strategy as r}from"@jackwener/opencli/registry";import{CommandExecutionError as e}from"@jackwener/opencli/errors";import{gotoWritePage as c}from"../_shared/article/publish.js";import{csdnProfile as i}from"./article.js";n({site:"csdn",name:"columns",access:"read",description:"列出当前用户的 CSDN 个人专栏(id + 名称),供 `csdn article --category` 取合法专栏名。",domain:"editor.csdn.net",strategy:r.COOKIE,browser:!0,columns:["column_id","column_name","paid"],func:async(a)=>{if(!a)throw new e("CSDN 专栏列举需要浏览器会话");await c(a,i.home);const t=await a.evaluate("(async () => {var API_KEY='203803574', API_SECRET='9znpamsyl2c7cdrr9sas0le9vbc3r6ba';async function hmac(m,s){var e=new TextEncoder();var k=await crypto.subtle.importKey('raw',e.encode(s),{name:'HMAC',hash:'SHA-256'},false,['sign']);var sig=await crypto.subtle.sign('HMAC',k,e.encode(m));var b=new Uint8Array(sig),x='';for(var i=0;i<b.byteLength;i++)x+=String.fromCharCode(b[i]);return btoa(x);}var nonce='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=Math.random()*16|0;return (c==='x'?r:(r&0x3|0x8)).toString(16);});var apiPath='/blog/phoenix/console/v1/column/list?type=all';var signStr='GET\\n*/*\\n\\n\\n\\nx-ca-key:'+API_KEY+'\\nx-ca-nonce:'+nonce+'\\n'+apiPath;var sig=await hmac(signStr,API_SECRET);var res=await fetch('https://bizapi.csdn.net'+apiPath,{method:'GET',credentials:'include',headers:{'accept':'*/*','x-ca-key':API_KEY,'x-ca-nonce':nonce,'x-ca-signature':sig,'x-ca-signature-headers':'x-ca-key,x-ca-nonce'}});var j=await res.json();var out=[]; var lst=(j&&j.data&&j.data.list)||{};(lst.column||[]).forEach(function(c){out.push({column_id:String(c.id),column_name:c.edit_title||c.title||'',paid:false});});(lst.pay_column||[]).forEach(function(c){out.push({column_id:String(c.id),column_name:c.edit_title||c.title||'',paid:true});});return out;})()");return Array.isArray(t)?t:[]}});
|
package/clis/csdn/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerArticleLogin as
|
|
1
|
+
import{registerArticleLogin as o}from"../_shared/article/login.js";import{csdnProfile as i}from"./article.js";o({site:"csdn",domain:"csdn.net",profile:{home:i.home,originRe:i.originRe,checkAuth:i.checkAuth},loginUrl:"https://passport.csdn.net/login",loginDescription:"打开 CSDN 登录页并等待浏览器完成登录(供桌面客户端引导登录)。"});
|