publishport-opencli 1.0.20 → 1.0.22
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 +75 -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.d.ts +14 -1
- 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.d.ts +24 -0
- package/dist/src/browser/dom-helpers.js +36 -36
- 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.d.ts +3 -1
- 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/types.d.ts +2 -1
- 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/notebooklm/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
2
|
-
`).trim();if(!
|
|
3
|
-
`).trim();if(!
|
|
1
|
+
import{ArgumentError as T,AuthRequiredError as h,CliError as f,CommandExecutionError as c}from"@jackwener/opencli/errors";import{NOTEBOOKLM_DOMAIN as l,NOTEBOOKLM_HOME_URL as k}from"./shared.js";import{callNotebooklmRpc as u,getNotebooklmPageAuth as S,unwrapNotebooklmEvaluateResult as d}from"./rpc.js";export{buildNotebooklmRpcBody,extractNotebooklmRpcResult,fetchNotebooklmInPage,getNotebooklmPageAuth,parseNotebooklmChunkedResponse,stripNotebooklmAntiXssi}from"./rpc.js";const M="wXbhsf",p="rLM1Ne",C="hPTbtc",E="khqZz";function N(o){let t=o;while(Array.isArray(t)&&t.length===1&&Array.isArray(t[0]))t=t[0];return t}export function isPlainObject(o){return o!==null&&typeof o==="object"&&!Array.isArray(o)}export function parseNotebooklmIdFromUrl(o){return o.match(/\/notebook\/([^/?#]+)/)?.[1]??""}const U=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function w(o){if(!U.test(o))throw new f("NOTEBOOKLM_INVALID_NOTEBOOK",`NotebookLM notebook id "${o}" is not a valid UUID`,"Pass a notebook id from `ppcli notebooklm list` or a full notebook URL like https://notebooklm.google.com/notebook/<uuid>.");return o}export function parseNotebooklmNotebookTarget(o){const t=o.trim();if(!t)throw new f("NOTEBOOKLM_INVALID_NOTEBOOK","NotebookLM notebook id is required","Pass a notebook id from `ppcli notebooklm list` or a full notebook URL.");if(/^https?:\/\//i.test(t)){let n;try{n=new URL(t)}catch{throw new f("NOTEBOOKLM_INVALID_NOTEBOOK","NotebookLM notebook URL is invalid","Pass a full NotebookLM notebook URL like https://notebooklm.google.com/notebook/<uuid>.")}if(n.protocol!=="https:"||n.hostname!==l||n.username||n.password||n.port)throw new f("NOTEBOOKLM_INVALID_NOTEBOOK","NotebookLM notebook URL must be a canonical https://notebooklm.google.com URL","Pass a notebook id from `ppcli notebooklm list` or a full NotebookLM notebook URL.");const r=parseNotebooklmIdFromUrl(t);if(!r)throw new f("NOTEBOOKLM_INVALID_NOTEBOOK","NotebookLM notebook URL is invalid","Pass a full NotebookLM notebook URL like https://notebooklm.google.com/notebook/<uuid>.");return w(r)}const e=t.match(/(?:^|\/)notebook\/([^/?#]+)/);if(e?.[1])return w(e[1]);return w(t)}export function getNotebooklmAuthuser(){const o=process.env.OPENCLI_NOTEBOOKLM_AUTHUSER;return typeof o==="string"&&/^\d+$/.test(o)?o:""}export function requireNotebooklmExecute(o,t){if(o!==!0)throw new T(`Refusing to ${t}: pass --execute to perform this NotebookLM write`)}export function buildNotebooklmNotebookUrl(o){const t=new URL(`/notebook/${encodeURIComponent(o)}`,k),e=getNotebooklmAuthuser();if(e)t.searchParams.set("authuser",e);return t.toString()}export function classifyNotebooklmPage(o){try{const t=new URL(o);if(t.hostname!==l)return"unknown";if(/\/notebook\/[^/?#]+/.test(t.pathname))return"notebook";return"home"}catch{return"unknown"}}export function normalizeNotebooklmTitle(o,t=""){if(typeof o!=="string")return t;let e=o.replace(/\s+/g," ").trim();if(/^Untitled\b/i.test(e)&&/otebook$/i.test(e)&&e!=="Untitled notebook")e="Untitled notebook";return e||t}function q(o){if(typeof o!=="string")return null;const t=o.trim();if(!t)return null;const e=Date.parse(t);if(Number.isNaN(e))return t;return new Date(e).toISOString()}function m(o){if(typeof o==="number"&&Number.isFinite(o))try{return new Date(o*1000).toISOString()}catch{return null}if(Array.isArray(o)&&typeof o[0]==="number"&&Number.isFinite(o[0])){const t=o[0],e=typeof o[1]==="number"&&Number.isFinite(o[1])?o[1]:0;try{return new Date(t*1000+Math.floor(e/1e6)).toISOString()}catch{return null}}return null}function g(o){if(typeof o==="number"&&Number.isFinite(o))return o;if(!Array.isArray(o)||typeof o[1]!=="number"||!Number.isFinite(o[1]))return null;return o[1]}function x(o){const t=g(o);if(t===8)return"pasted-text";if(t===9)return"youtube";if(t===2)return"generated-text";if(t===3)return"pdf";if(t===4)return"audio";if(t===5)return"web";if(t===6)return"video";return t==null?null:`type-${t}`}function A(o){if(typeof o==="string"&&o.trim())return o.trim();if(!Array.isArray(o))return null;for(const t of o){const e=A(t);if(e)return e}return null}function L(o){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(o)}function _(o,t){if(typeof o==="string"){const e=normalizeNotebooklmTitle(o);if(!e)return t;if(L(e))return t;if(/^[\d\s]+$/.test(e))return t;if(/^(null|undefined)$/i.test(e))return t;t.push(e);return t}if(!Array.isArray(o))return t;for(const e of o)_(e,t);return t}function O(o,t){if(typeof o==="string"){const e=o.trim();if(e)t.push(e);return t}if(!Array.isArray(o))return t;for(const e of o)O(e,t);return t}function I(o,t,e){if(typeof o==="string"){const n=o.trim();if(L(n)&&!e.has(n)){e.add(n);t.push(n)}return t}if(!Array.isArray(o))return t;for(const n of o)I(n,t,e);return t}export function parseNotebooklmHistoryThreadIdsResult(o){return I(o,[],new Set)}export function extractNotebooklmHistoryPreview(o){const t=_(o,[]);return t.length>0?t[0]:null}export function parseNotebooklmNoteListRawRows(o,t,e){return o.map((r)=>{const i=normalizeNotebooklmTitle(r.title,""),a=String(r.text??"").replace(/\bsticky_note_2\b/g," ").replace(/\bmore_vert\b/g," ").replace(/\s+/g," ").trim();if(!i)return null;const s=a.startsWith(i)?a.slice(i.length).trim():a.replace(i,"").trim();return{notebook_id:t,title:i,created_at:s||null,url:e,source:"studio-list"}}).filter((r)=>r!==null)}function B(o,t,e){const n=normalizeNotebooklmTitle(o?.title,"Untitled Notebook"),r=String(o?.summary??"").trim();if(!r)return null;return{notebook_id:t,title:n,summary:r,url:e,source:"summary-dom"}}function P(o,t,e){const n=normalizeNotebooklmTitle(o?.title,""),r=String(o?.content??"").replace(/\r\n/g,`
|
|
2
|
+
`).trim();if(!n)return null;return{notebook_id:t,id:null,title:n,content:r,url:e,source:"studio-editor"}}export function parseNotebooklmListResult(o){if(!Array.isArray(o)||o.length===0)return[];const t=Array.isArray(o[0])?o[0]:o;if(!Array.isArray(t))return[];return t.filter((e)=>Array.isArray(e)).map((e)=>{const n=Array.isArray(e[5])?e[5]:[],r=Array.isArray(n[5])?n[5]:[],i=typeof e[2]==="string"?e[2]:"",a=typeof e[0]==="string"?e[0].replace(/^thought\s*\n/,""):"";return{id:i,title:normalizeNotebooklmTitle(a,"Untitled Notebook"),url:`https://${l}/notebook/${i}`,source:"rpc",is_owner:n.length>1?n[1]===!1:!0,created_at:r.length>0?m(r[0]):null}}).filter((e)=>e.id)}export function parseNotebooklmNotebookDetailResult(o){const t=N(o);if(!Array.isArray(t)||t.length<3)return null;const e=typeof t[2]==="string"?t[2]:"";if(!e)return null;const n=normalizeNotebooklmTitle(t[0],"Untitled Notebook"),r=typeof t[3]==="string"?t[3]:null,i=Array.isArray(t[5])?t[5]:[],a=Array.isArray(t[1])?t[1]:[];return{id:e,title:n,url:`https://${l}/notebook/${e}`,source:"rpc",is_owner:i.length>1?i[1]===!1:!0,created_at:m(i[8]),updated_at:m(i[5]),emoji:r,source_count:a.length}}export function parseNotebooklmSourceListResult(o){const t=N(o),e=parseNotebooklmNotebookDetailResult(t);if(!e||!Array.isArray(t))return[];return(Array.isArray(t[1])?t[1]:[]).filter((r)=>Array.isArray(r)).map((r)=>{const i=A(r[0])??"",a=normalizeNotebooklmTitle(r[1],"Untitled source"),s=Array.isArray(r[2])?r[2]:[],b=typeof s[4]==="number"?s[4]:r[3];return{id:i,notebook_id:e.id,title:a,url:e.url,source:"rpc",type:x(b),type_code:g(b),size:typeof s[1]==="number"&&Number.isFinite(s[1])?s[1]:null,created_at:m(s[2]),updated_at:m(s[14])}}).filter((r)=>r.id)}export function parseNotebooklmSourceGuideResult(o,t){if(!Array.isArray(o)||o.length===0||!Array.isArray(o[0]))return null;const e=o[0],n=Array.isArray(e)&&e.length>0&&Array.isArray(e[0])?e[0]:e;if(!Array.isArray(n))return null;const r=Array.isArray(n[1])&&typeof n[1][0]==="string"?n[1][0].trim():"",i=Array.isArray(n[2])&&Array.isArray(n[2][0])?n[2][0].filter((a)=>typeof a==="string"&&a.trim().length>0):[];if(!r)return null;return{source_id:t.id,notebook_id:t.notebook_id,title:t.title,type:t.type??null,summary:r,keywords:i,source:"rpc"}}export function parseNotebooklmSourceFulltextResult(o,t,e){if(!Array.isArray(o)||o.length===0||!Array.isArray(o[0]))return null;const n=o[0],r=A(n[0])??"",i=normalizeNotebooklmTitle(n[1],"Untitled source"),a=Array.isArray(n[2])?n[2]:[],s=Array.isArray(a[7])&&typeof a[7][0]==="string"?a[7][0]:e,b=x([null,a[4]]),R=Array.isArray(o[3])&&o[3].length>0?o[3][0]:[],y=O(R,[]).join(`
|
|
3
|
+
`).trim();if(!r||!y)return null;return{source_id:r,notebook_id:t,title:i,kind:b,content:y,char_count:y.length,url:s,source:"rpc"}}export function findNotebooklmSourceRow(o,t){const e=t.trim().toLowerCase();if(!e)return null;const n=o.find((a)=>a.id.trim().toLowerCase()===e);if(n)return n;const r=o.find((a)=>a.title.trim().toLowerCase()===e);if(r)return r;const i=o.filter((a)=>a.title.trim().toLowerCase().includes(e));if(i.length===1)return i[0];return null}export function findNotebooklmNoteRow(o,t){const e=t.trim().toLowerCase();if(!e)return null;const n=o.find((i)=>i.title.trim().toLowerCase()===e);if(n)return n;const r=o.filter((i)=>i.title.trim().toLowerCase().includes(e));if(r.length===1)return r[0];return null}export async function listNotebooklmViaRpc(o){const t=await u(o,M,[null,1,null,[2]]);return parseNotebooklmListResult(t.result)}export async function getNotebooklmDetailViaRpc(o){const t=await getNotebooklmPageState(o);if(t.kind!=="notebook"||!t.notebookId)return null;const e=await u(o,p,[t.notebookId,null,[2],null,0]);return parseNotebooklmNotebookDetailResult(e.result)}export async function getNotebooklmNotebookDetailById(o,t){const e=await u(o,p,[t,null,[2],null,0]);return{detail:parseNotebooklmNotebookDetailResult(e.result),sources:parseNotebooklmSourceListResult(e.result)}}export async function verifyNotebooklmNotebookExists(o,t,e){try{const{detail:n}=await getNotebooklmNotebookDetailById(o,t);if(!n||n.id!==t)throw new c(`NotebookLM ${e} succeeded but the notebook ${t} was not found in the post-write verification`);return n}catch(n){if(n instanceof h||n instanceof c)throw n;throw new c(`NotebookLM ${e} post-write verification failed: ${n?.message||n}`)}}export async function verifyNotebooklmSourceAdded(o,t,e,n){try{const{detail:r,sources:i}=await getNotebooklmNotebookDetailById(o,t);if(!r||r.id!==t)throw new c(`NotebookLM ${n} succeeded but the notebook ${t} was not found in the post-write verification`);const a=i.find((s)=>s.id===e);if(!a)throw new c(`NotebookLM ${n} succeeded but source ${e} did not appear in the notebook's source list`);return a}catch(r){if(r instanceof h||r instanceof c)throw r;throw new c(`NotebookLM ${n} post-write verification failed: ${r?.message||r}`)}}export async function listNotebooklmSourcesViaRpc(o){const t=await getNotebooklmPageState(o);if(t.kind!=="notebook"||!t.notebookId)return[];const e=await u(o,p,[t.notebookId,null,[2],null,0]);return parseNotebooklmSourceListResult(e.result)}export async function listNotebooklmHistoryViaRpc(o){const t=await getNotebooklmPageState(o);if(t.kind!=="notebook"||!t.notebookId)return[];const e=await u(o,C,[[],null,t.notebookId,20]),n=parseNotebooklmHistoryThreadIdsResult(e.result);if(n.length===0)return[];const r=[];for(const i of n){const a=await u(o,E,[[],null,null,i,20]);r.push({notebook_id:t.notebookId,thread_id:i,item_count:Array.isArray(a.result)?a.result.length:0,preview:extractNotebooklmHistoryPreview(a.result),url:t.url||`https://${l}/notebook/${t.notebookId}`,source:"rpc"})}return r}export async function listNotebooklmNotesFromPage(o){const t=await getNotebooklmPageState(o);if(t.kind!=="notebook"||!t.notebookId)return[];const e=d(await o.evaluate(`(() => {
|
|
4
4
|
return Array.from(document.querySelectorAll('artifact-library-note')).map((node) => {
|
|
5
5
|
const titleNode = node.querySelector('.artifact-title');
|
|
6
6
|
return {
|
|
@@ -8,13 +8,13 @@ import{ArgumentError as x,AuthRequiredError as E,CliError as C,CommandExecutionE
|
|
|
8
8
|
text: (node.innerText || node.textContent || '').replace(/\\s+/g, ' ').trim(),
|
|
9
9
|
};
|
|
10
10
|
});
|
|
11
|
-
})()`));if(!Array.isArray(
|
|
11
|
+
})()`));if(!Array.isArray(e)||e.length===0)return[];return parseNotebooklmNoteListRawRows(e,t.notebookId,t.url||`https://${l}/notebook/${t.notebookId}`)}export async function readNotebooklmSummaryFromPage(o){const t=await getNotebooklmPageState(o);if(t.kind!=="notebook"||!t.notebookId)return null;const e=d(await o.evaluate(`(() => {
|
|
12
12
|
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
13
13
|
const title = normalize(document.querySelector('.notebook-title, h1, [data-testid="notebook-title"]')?.textContent || document.title || '');
|
|
14
14
|
const summaryNode = document.querySelector('.notebook-summary, .summary-content, [class*="summary"]');
|
|
15
15
|
const summary = normalize(summaryNode?.textContent || '');
|
|
16
16
|
return { title, summary };
|
|
17
|
-
})()`));return
|
|
17
|
+
})()`));return B(e,t.notebookId,t.url||`https://${l}/notebook/${t.notebookId}`)}export async function getNotebooklmSummaryViaRpc(o){const t=await getNotebooklmPageState(o);if(t.kind!=="notebook"||!t.notebookId)return null;const e=await u(o,p,[t.notebookId,null,[2],null,0]),n=N(e.result);if(!Array.isArray(n))return null;const r=normalizeNotebooklmTitle(n[0],"Untitled Notebook"),i=n.filter((a,s)=>s!==0&&s!==2&&s!==3).find((a)=>typeof a==="string"&&a.trim().length>=80);if(typeof i!=="string")return null;return{notebook_id:t.notebookId,title:r,summary:i.trim(),url:t.url||`https://${l}/notebook/${t.notebookId}`,source:"rpc"}}export async function getNotebooklmSourceFulltextViaRpc(o,t){const e=await getNotebooklmPageState(o);if(e.kind!=="notebook"||!e.notebookId||!t)return null;const n=await u(o,"hizoJc",[[t],[2],[2]]);return parseNotebooklmSourceFulltextResult(n.result,e.notebookId,e.url||`https://${l}/notebook/${e.notebookId}`)}export async function getNotebooklmSourceGuideViaRpc(o,t){if(!t.id)return null;const e=await u(o,"tr032e",[[[[t.id]]]]);return parseNotebooklmSourceGuideResult(e.result,t)}export async function readNotebooklmVisibleNoteFromPage(o){const t=await getNotebooklmPageState(o);if(t.kind!=="notebook"||!t.notebookId)return null;const e=d(await o.evaluate(`(() => {
|
|
18
18
|
const normalizeText = (value) => (value || '').replace(/\\u00a0/g, ' ').replace(/\\r\\n/g, '\\n').trim();
|
|
19
19
|
const titleNode = document.querySelector('.note-header__editable-title');
|
|
20
20
|
const title = titleNode instanceof HTMLInputElement || titleNode instanceof HTMLTextAreaElement
|
|
@@ -31,7 +31,7 @@ import{ArgumentError as x,AuthRequiredError as E,CliError as C,CommandExecutionE
|
|
|
31
31
|
title: normalizeText(title),
|
|
32
32
|
content: normalizeText(content),
|
|
33
33
|
};
|
|
34
|
-
})()`));return
|
|
34
|
+
})()`));return P(e,t.notebookId,t.url||`https://${l}/notebook/${t.notebookId}`)}export async function ensureNotebooklmHome(o){const t=o.getCurrentUrl?await o.getCurrentUrl().catch(()=>null):null;if((t?classifyNotebooklmPage(t):"unknown")==="home")return;const n=getNotebooklmAuthuser(),r=n?`${k}?authuser=${encodeURIComponent(n)}`:k;try{await o.goto(r);await o.wait(2)}catch(i){throw new c(`Failed to open NotebookLM home: ${i?.message||i}`)}}export async function getNotebooklmPageState(o){const t=d(await o.evaluate(`(() => {
|
|
35
35
|
const url = window.location.href;
|
|
36
36
|
const title = document.title || '';
|
|
37
37
|
const hostname = window.location.hostname || '';
|
|
@@ -58,7 +58,7 @@ import{ArgumentError as x,AuthRequiredError as E,CliError as C,CommandExecutionE
|
|
|
58
58
|
.reduce((count, href, index, list) => list.indexOf(href) === index ? count + 1 : count, 0);
|
|
59
59
|
|
|
60
60
|
return { url, title, hostname, kind, notebookId, loginRequired, notebookCount, path };
|
|
61
|
-
})()`)),
|
|
61
|
+
})()`)),e={url:String(t?.url??""),title:normalizeNotebooklmTitle(t?.title,"NotebookLM"),hostname:String(t?.hostname??""),kind:t?.kind==="notebook"||t?.kind==="home"?t.kind:"unknown",notebookId:String(t?.notebookId??""),loginRequired:Boolean(t?.loginRequired),notebookCount:Number(t?.notebookCount??0)};if(e.hostname===l&&e.loginRequired)try{await S(o);e.loginRequired=!1}catch{}return e}export async function readCurrentNotebooklm(o){const t=d(await o.evaluate(`(() => {
|
|
62
62
|
const url = window.location.href;
|
|
63
63
|
const match = url.match(/\\/notebook\\/([^/?#]+)/);
|
|
64
64
|
if (!match) return null;
|
|
@@ -71,7 +71,7 @@ import{ArgumentError as x,AuthRequiredError as E,CliError as C,CommandExecutionE
|
|
|
71
71
|
url,
|
|
72
72
|
source: 'current-page',
|
|
73
73
|
};
|
|
74
|
-
})()`));if(!
|
|
74
|
+
})()`));if(!t)return null;return{id:String(t.id??""),title:normalizeNotebooklmTitle(t.title,"Untitled Notebook"),url:String(t.url??""),source:"current-page",is_owner:!0,created_at:null}}export async function listNotebooklmLinks(o){const t=d(await o.evaluate(`(() => {
|
|
75
75
|
const rows = [];
|
|
76
76
|
const seen = new Set();
|
|
77
77
|
|
|
@@ -119,7 +119,7 @@ import{ArgumentError as x,AuthRequiredError as E,CliError as C,CommandExecutionE
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
return rows;
|
|
122
|
-
})()`));if(!Array.isArray(
|
|
122
|
+
})()`));if(!Array.isArray(t))return[];return t.map((e)=>({id:String(e.id??""),title:normalizeNotebooklmTitle(e.title,"Untitled Notebook"),url:String(e.url??""),source:"home-links",is_owner:e.is_owner===!1?!1:!0,created_at:q(e.created_at)})).filter((e)=>e.id&&e.url)}export async function listNotebooklmSourcesFromPage(o){const t=d(await o.evaluate(`(() => {
|
|
123
123
|
const notebookMatch = window.location.href.match(/\\/notebook\\/([^/?#]+)/);
|
|
124
124
|
const notebookId = notebookMatch ? notebookMatch[1] : '';
|
|
125
125
|
if (!notebookId) return [];
|
|
@@ -169,4 +169,4 @@ import{ArgumentError as x,AuthRequiredError as E,CliError as C,CommandExecutionE
|
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
return rows;
|
|
172
|
-
})()`));if(!Array.isArray(
|
|
172
|
+
})()`));if(!Array.isArray(t))return[];return t.filter((e)=>e.id&&e.title)}export async function requireNotebooklmSession(o){const t=await getNotebooklmPageState(o);if(t.hostname!==l)throw new f("NOTEBOOKLM_UNAVAILABLE","NotebookLM page is not available in the current browser session",`Open Chrome and navigate to ${k}`);if(t.loginRequired)throw new h(l,"NotebookLM requires a logged-in Google session");return t}
|
package/clis/nowcoder/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as e,CommandExecutionError as n}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as c}from"../_shared/site-auth.js";async function r(o){return(await o.getCookies({url:"https://www.nowcoder.com"})).some((i)=>i.name==="t"&&i.value)}const d=`(async () => {
|
|
2
2
|
try {
|
|
3
3
|
const link = document.querySelector('a[href*="/users/"]');
|
|
4
4
|
const href = link ? (link.getAttribute('href') || '') : '';
|
|
@@ -21,4 +21,4 @@ import{AuthRequiredError as F,CommandExecutionError as G}from"@jackwener/opencli
|
|
|
21
21
|
} catch (e) {
|
|
22
22
|
return { kind: 'exception', detail: String(e && e.message || e) };
|
|
23
23
|
}
|
|
24
|
-
})()`;async function
|
|
24
|
+
})()`;async function a(o){if(!await r(o))throw new e("nowcoder.com","Nowcoder t cookie missing (anonymous)");await o.goto("https://www.nowcoder.com/");await o.wait(2);const t=await o.evaluate(d);if(t?.kind==="auth")throw new e("nowcoder.com",t.detail);if(t?.kind==="http")throw new n(`HTTP ${t.httpStatus} from nowcoder profile API`);if(t?.kind==="exception")throw new n(`Nowcoder whoami failed: ${t.detail}`);if(!t?.ok)throw new n(`Unexpected nowcoder probe: ${JSON.stringify(t)}`);return{user_id:t.user_id,nickname:t.nickname}}c({site:"nowcoder",domain:"nowcoder.com",loginUrl:"https://www.nowcoder.com/login",columns:["user_id","nickname"],quickCheck:r,verify:a,poll:async(o)=>{if(!await r(o))throw new e("nowcoder.com","Waiting for Nowcoder login");return a(o)}});
|
package/clis/nowcoder/comment.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as i,Strategy as s}from"@jackwener/opencli/registry";import{ArgumentError as c}from"@jackwener/opencli/errors";import{WWW_BASE as d,postForm as a,requireOk as u,resolveMomentId as l}from"./utils.js";import{assertLiteralContent as p}from"../_shared/content-guard.js";i({site:"nowcoder",name:"comment",access:"write",description:"评论帖子;配 --to-user/--to-comment 可定向回复某条评论",domain:"www.nowcoder.com",strategy:s.COOKIE,args:[{name:"id",positional:!0,required:!0,help:"帖子 id(数字 momentId / UUID / 链接均可)"},{name:"content",fromFile:!0,positional:!0,required:!0,help:"评论内容"},{name:"to-user",type:"str",default:"0",help:"帖主/对方 userId(定向回复时必传)"},{name:"to-comment",type:"str",default:"0",help:"定向回复的评论 id(inbox 的 reply_comment_id)"}],columns:["post_id","kind","status"],func:async(n,t)=>{const r=await l(n,t.id),e=String(t.content??"").trim();p(e,{label:"评论内容"});if(!e)throw new c("评论内容不能为空");const m=String(t["to-user"]??"0").trim()||"0",o=String(t["to-comment"]??"0").trim()||"0";u(await a(n,`${d}/comment/create?_=${Date.now()}`,{entityType:"74",entityId:r,commentContent:e,contentV2:JSON.stringify({pureText:e,imgs:[]}),toFeed:"false",toUserId:m,toCommentId:o,entityOwnerId:m,isAnonymousFlag:"false"}),"评论");return[{post_id:r,kind:o!=="0"?`reply-to-${o}`:"comment",status:"ok"}]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as i,Strategy as
|
|
1
|
+
import{cli as i,Strategy as a}from"@jackwener/opencli/registry";import{GW_BASE as d,getJson as m,requireOk as c,resolveMomentId as s}from"./utils.js";i({site:"nowcoder",name:"comments",access:"read",description:"某帖的评论列表(评论前先读,避免重复/不合语境)",domain:"www.nowcoder.com",strategy:a.COOKIE,args:[{name:"id",positional:!0,required:!0,help:"帖子 id(数字 momentId / UUID / 链接均可)"},{name:"page",type:"int",default:1,help:"页码"}],columns:["comment_id","user_id","nickname","content"],func:async(t,n)=>{const o=await s(t,n.id),r=`${d}/comment/list-by-page?entityId=${encodeURIComponent(o)}&entityType=74&order=2&pageNo=${n.page}&toCommentId=0&_=${Date.now()}`;return(c(await m(t,r),"评论列表").data?.records??[]).map((e)=>({comment_id:e.id??"",user_id:e.userBrief?.userId??"",nickname:e.userBrief?.nickname??"",content:(e.content??"").trim()}))}});
|
package/clis/nowcoder/dm-list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as o,Strategy as r}from"@jackwener/opencli/registry";import{WWW_BASE as i,getJson as
|
|
1
|
+
import{cli as o,Strategy as r}from"@jackwener/opencli/registry";import{WWW_BASE as i,getJson as c,getSelfUid as d,requireOk as l}from"./utils.js";o({site:"nowcoder",name:"dm-list",access:"read",description:"私信会话列表(conversationId / 最后一条消息 / 未读数)",domain:"www.nowcoder.com",strategy:r.COOKIE,args:[{name:"page",type:"int",default:1,help:"页码"}],columns:["conversation_id","target_user_id","target_name","last_content","unread","allow_send","is_official"],func:async(a,t)=>{const n=await d(a),s=`${i}/sns/message/${n}/get-conversation-list?page=${t.page}`;return(l(await c(a,s),"私信会话列表").data?.conversations??[]).map((e)=>({conversation_id:e.conversationId??"",target_user_id:e.targetUserId??"",target_name:e.targetUserName??"",last_content:(e.content??"").replace(/\s+/g," ").slice(0,80),unread:e.unreadMessageCount??0,allow_send:e.allowSendMessage??"",is_official:e.targetIsOfficialAccount??""}))}});
|
package/clis/nowcoder/dm-read.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as n,Strategy as i}from"@jackwener/opencli/registry";import{WWW_BASE as
|
|
1
|
+
import{cli as n,Strategy as i}from"@jackwener/opencli/registry";import{WWW_BASE as m,getJson as d,requireOk as c}from"./utils.js";n({site:"nowcoder",name:"dm-read",access:"read",description:"读某私信会话的消息(target 为 dm-list 的 target_user_id)",domain:"www.nowcoder.com",strategy:i.COOKIE,args:[{name:"target",positional:!0,required:!0,help:"对方 userId(dm-list 的 target_user_id)"},{name:"page",type:"int",default:1,help:"页码"}],columns:["from_user_id","content"],func:async(s,r)=>{const a=String(r.target).trim(),o=`${m}/sns/message/${encodeURIComponent(a)}/get-msg-list?page=${r.page}`,t=c(await d(s,o),"私信读取").data??{};return(t.msgList??t.list??t.records??[]).map((e)=>({from_user_id:e.fromUserId??"",content:(e.content??e.msg??"").trim()}))}});
|
package/clis/nowcoder/dm-send.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as n,Strategy as i}from"@jackwener/opencli/registry";import{ArgumentError as s}from"@jackwener/opencli/errors";import{GW_BASE as a,postJson as c,requireOk as m}from"./utils.js";import{assertLiteralContent as d}from"../_shared/content-guard.js";n({site:"nowcoder",name:"dm-send",access:"write",description:"发私信(conversation 为 dm-list 的 conversation_id)",domain:"www.nowcoder.com",strategy:i.COOKIE,args:[{name:"conversation",positional:!0,required:!0,help:"会话 id(dm-list 的 conversation_id,格式 <我uid>_<对方uid>)"},{name:"content",fromFile:!0,positional:!0,required:!0,help:"私信内容"}],columns:["conversation_id","status"],func:async(r,o)=>{const e=String(o.conversation??"").trim(),t=String(o.content??"").trim();d(t,{label:"私信内容"});if(!t)throw new s("私信内容不能为空");m(await c(r,`${a}/msg/send-msg`,{body:{content:t,sourceType:1200,conversationId:e}}),"私信发送");return[{conversation_id:e,status:"sent"}]}});
|
package/clis/nowcoder/drafts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as i,Strategy as
|
|
1
|
+
import{cli as i,Strategy as c}from"@jackwener/opencli/registry";import{GW_BASE as n,getJson as s,getSelfUid as d,requireOk as l}from"./utils.js";i({site:"nowcoder",name:"drafts",access:"read",description:"我的草稿列表",domain:"www.nowcoder.com",strategy:c.COOKIE,args:[{name:"page",type:"int",default:1,help:"页码"}],columns:["draft_id","title","content"],func:async(e,a)=>{const r=await d(e),o=`${n}/discuss-draft/list?authorId=${r}&pageNo=${a.page}&pageSize=10&entityType=250`;return(l(await s(e,o),"草稿列表").data?.records??[]).map((t)=>({draft_id:t.id??"",title:(t.title??"").trim(),content:(t.content??"").replace(/\s+/g," ").slice(0,120)}))}});
|
package/clis/nowcoder/inbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as n,Strategy as i}from"@jackwener/opencli/registry";import{GW_BASE as m,getJson as c,requireOk as
|
|
1
|
+
import{cli as n,Strategy as i}from"@jackwener/opencli/registry";import{GW_BASE as m,getJson as c,requireOk as a}from"./utils.js";n({site:"nowcoder",name:"inbox",access:"read",description:"评论回复收件箱(谁回复/@了我们,含定向回复所需的评论 id)",domain:"www.nowcoder.com",strategy:i.COOKIE,args:[{name:"page",type:"int",default:1,help:"页码"}],columns:["msg_id","from_user_id","from_nickname","reply_content","reply_comment_id","quoted_ours","url","time"],func:async(t,r)=>{const o=`${m}/message/pc/comment/list?page=${r.page}&pageSize=20`;return(a(await c(t,o),"评论收件箱").data?.records??[]).map((e)=>({msg_id:e.id??"",from_user_id:e.user?.userId??"",from_nickname:e.user?.nickname??"",reply_content:(e.triggerEntity?.content??"").trim(),reply_comment_id:e.triggerEntity?.entityId??"",quoted_ours:(e.quote?.content??"").trim(),url:e.pcUrl??"",time:e.createTime??""}))}});
|
package/clis/nowcoder/like.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as r,Strategy as
|
|
1
|
+
import{cli as r,Strategy as s}from"@jackwener/opencli/registry";import{WWW_BASE as n,postMultipart as a,requireOk as c,resolveMomentId as d}from"./utils.js";r({site:"nowcoder",name:"like",access:"write",description:"点赞帖子(toggle,再次调用取消;有频控,务必低频)",domain:"www.nowcoder.com",strategy:s.COOKIE,args:[{name:"id",positional:!0,required:!0,help:"帖子 id(数字 momentId / UUID / 链接均可)"}],columns:["post_id","status","like_count"],func:async(t,o)=>{const e=await d(t,o.id),i=c(await a(t,`${n}/sns/like?_=${Date.now()}`,{id:e,type:"74"}),"点赞");return[{post_id:e,status:"toggled",like_count:i.count??""}]}});
|
package/clis/nowcoder/my.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as o,Strategy as m}from"@jackwener/opencli/registry";import{WWW_BASE as
|
|
1
|
+
import{cli as o,Strategy as m}from"@jackwener/opencli/registry";import{WWW_BASE as c,getJson as i,requireOk as r}from"./utils.js";o({site:"nowcoder",name:"my",access:"read",description:"我发布的动态列表(含 momentId,可供 delete 使用)",domain:"www.nowcoder.com",strategy:m.COOKIE,args:[{name:"page",type:"int",default:1,help:"页码"}],columns:["moment_id","title","content"],func:async(e,a)=>{const n=`${c}/moment/my-moment?status=1&page=${a.page}`;return(r(await i(e,n),"我的动态").data?.tableData??[]).map((t)=>({moment_id:t.id??"",title:(t.title??"").trim(),content:(t.content??"").replace(/\s+/g," ").slice(0,120)}))}});
|
package/clis/nowcoder/post.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as i,Strategy as
|
|
1
|
+
import{cli as i,Strategy as m}from"@jackwener/opencli/registry";import{ArgumentError as a,CommandExecutionError as c}from"@jackwener/opencli/errors";import{GW_BASE as s,postJson as l,requireOk as d}from"./utils.js";import{assertLiteralContent as u}from"../_shared/content-guard.js";i({site:"nowcoder",name:"post",access:"write",description:"发布动态(实名发帖,高风险写操作,务必低频且内容有价值)",domain:"www.nowcoder.com",strategy:m.COOKIE,args:[{name:"content",fromFile:!0,positional:!0,required:!0,help:"正文内容"},{name:"title",type:"str",default:"",help:"标题(可选)"}],columns:["moment_id","content_id","url"],func:async(o,r)=>{const e=String(r.content??"").trim();u(e,{label:"正文内容"});if(!e)throw new a("发帖正文不能为空");const n=d(await l(o,`${s}/moment/create`,{title:String(r.title??""),content:e,type:0,isAnonymousFlag:!1,publicEntrance:"发动态",publicEntrancePage:"首页"}),"发帖"),t=n.data??{};if(!t.id)throw new c(`牛客发帖响应缺少 momentId: ${JSON.stringify(n).slice(0,200)}`);return[{moment_id:t.id,content_id:t.result??"",url:t.result?`https://www.nowcoder.com/feed/main/detail/${t.result}`:""}]}});
|
package/clis/nowcoder/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{AuthRequiredError as
|
|
1
|
+
import{AuthRequiredError as i,CommandExecutionError as c}from"@jackwener/opencli/errors";export const GW_BASE="https://gw-c.nowcoder.com/api/sparta",WWW_BASE="https://www.nowcoder.com";export async function getJson(t,e){const r=JSON.stringify(e);return t.evaluate(`
|
|
2
2
|
async () => {
|
|
3
|
-
const res = await fetch(${
|
|
3
|
+
const res = await fetch(${r}, { credentials: 'include' });
|
|
4
4
|
const text = await res.text();
|
|
5
5
|
try {
|
|
6
6
|
return JSON.parse(text);
|
|
@@ -8,13 +8,13 @@ import{AuthRequiredError as Q,CommandExecutionError as M}from"@jackwener/opencli
|
|
|
8
8
|
return { code: -1, msg: '非 JSON 响应 (HTTP ' + res.status + '): ' + text.slice(0, 200) };
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
`)}export async function postJson(
|
|
11
|
+
`)}export async function postJson(t,e,r){const s=JSON.stringify(e),n=JSON.stringify(JSON.stringify(r));return t.evaluate(`
|
|
12
12
|
async () => {
|
|
13
|
-
const res = await fetch(${
|
|
13
|
+
const res = await fetch(${s}, {
|
|
14
14
|
method: 'POST',
|
|
15
15
|
credentials: 'include',
|
|
16
16
|
headers: { 'Content-Type': 'application/json' },
|
|
17
|
-
body: ${
|
|
17
|
+
body: ${n},
|
|
18
18
|
});
|
|
19
19
|
const text = await res.text();
|
|
20
20
|
try {
|
|
@@ -23,10 +23,10 @@ import{AuthRequiredError as Q,CommandExecutionError as M}from"@jackwener/opencli
|
|
|
23
23
|
return { code: -1, msg: '非 JSON 响应 (HTTP ' + res.status + '): ' + text.slice(0, 200) };
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
`)}export async function postForm(
|
|
26
|
+
`)}export async function postForm(t,e,r){const s=JSON.stringify(e),n=JSON.stringify(r);return t.evaluate(`
|
|
27
27
|
async () => {
|
|
28
|
-
const body = new URLSearchParams(${
|
|
29
|
-
const res = await fetch(${
|
|
28
|
+
const body = new URLSearchParams(${n});
|
|
29
|
+
const res = await fetch(${s}, {
|
|
30
30
|
method: 'POST',
|
|
31
31
|
credentials: 'include',
|
|
32
32
|
headers: {
|
|
@@ -42,11 +42,11 @@ import{AuthRequiredError as Q,CommandExecutionError as M}from"@jackwener/opencli
|
|
|
42
42
|
return { code: -1, msg: '非 JSON 响应 (HTTP ' + res.status + '): ' + text.slice(0, 200) };
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
`)}export async function postMultipart(
|
|
45
|
+
`)}export async function postMultipart(t,e,r){const s=JSON.stringify(e),n=JSON.stringify(r);return t.evaluate(`
|
|
46
46
|
async () => {
|
|
47
47
|
const fd = new FormData();
|
|
48
|
-
for (const [k, v] of Object.entries(${
|
|
49
|
-
const res = await fetch(${
|
|
48
|
+
for (const [k, v] of Object.entries(${n})) fd.append(k, v);
|
|
49
|
+
const res = await fetch(${s}, {
|
|
50
50
|
method: 'POST',
|
|
51
51
|
credentials: 'include',
|
|
52
52
|
body: fd,
|
|
@@ -58,11 +58,11 @@ import{AuthRequiredError as Q,CommandExecutionError as M}from"@jackwener/opencli
|
|
|
58
58
|
return { code: -1, msg: '非 JSON 响应 (HTTP ' + res.status + '): ' + text.slice(0, 200) };
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
`)}export function requireOk(
|
|
61
|
+
`)}export function requireOk(t,e){if(!t||typeof t!=="object"||Array.isArray(t))throw new c(`牛客 ${e} 接口返回了畸形响应`);if(Object.hasOwn(t,"success")?!!t.success:Object.hasOwn(t,"code")?t.code===0:Object.hasOwn(t,"data"))return t;const s=String(t.msg??t.message??"未知错误");if(/登录|登陆|未授权|token|身份/i.test(s))throw new i("nowcoder.com",`牛客 ${e} 需要登录: ${s}`);throw new c(`牛客 ${e} 失败: ${s} (code=${t.code??"?"})`)}export async function resolveMomentId(t,e){let r=String(e??"").trim();for(const a of[/detail\/([0-9a-fA-F]{20,})/,/discuss\/(\d+)/]){const o=r.match(a);if(o){r=o[1];break}}if(/^\d+$/.test(r))return r;if(!/^[0-9a-fA-F]{20,}$/.test(r))throw new c(`无法从输入解析牛客帖子 id: ${e}`);const n=requireOk(await getJson(t,`${GW_BASE}/detail/moment-data/detail/${r}`),"帖子解析").data?.id;if(!n)throw new c(`牛客帖子 ${r} 的详情缺少数字 momentId`);return String(n)}export async function getSelfUid(t){const e=await t.evaluate(`
|
|
62
62
|
async () => {
|
|
63
63
|
const link = document.querySelector('a[href*="/users/"]');
|
|
64
64
|
const href = link ? (link.getAttribute('href') || '') : '';
|
|
65
65
|
const match = href.match(/\\/users\\/(\\d+)/);
|
|
66
66
|
return match ? match[1] : '';
|
|
67
67
|
}
|
|
68
|
-
`);if(!
|
|
68
|
+
`);if(!e)throw new i("nowcoder.com","导航栏无登录用户链接(未登录)");return e}
|
package/clis/npm/downloads.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as i,Strategy as m}from"@jackwener/opencli/registry";import{ArgumentError as d,EmptyResultError as
|
|
1
|
+
import{cli as i,Strategy as m}from"@jackwener/opencli/registry";import{ArgumentError as d,EmptyResultError as w}from"@jackwener/opencli/errors";import{NPM_API as p,npmFetch as c,requirePackageName as u}from"./utils.js";const y=new Set(["last-day","last-week","last-month","last-year"]),g=/^(\d{4}-\d{2}-\d{2}):(\d{4}-\d{2}-\d{2})$/;function Y(n){const a=String(n??"last-week").trim();if(y.has(a))return a;const o=g.exec(a);if(o){const[,t,e]=o;if(new Date(t)>new Date(e))throw new d(`npm downloads period start ${t} is after end ${e}`);return`${t}:${e}`}throw new d(`npm downloads period "${n}" is invalid`,"Use last-day / last-week (default) / last-month / last-year, or YYYY-MM-DD:YYYY-MM-DD.")}i({site:"npm",name:"downloads",access:"read",description:"Daily download counts for an npm package over a window",domain:"api.npmjs.org",strategy:m.PUBLIC,browser:!1,args:[{name:"name",positional:!0,required:!0,help:'npm package name (e.g. "react", "@vercel/og")'},{name:"period",default:"last-week",help:"last-day / last-week / last-month / last-year, or YYYY-MM-DD:YYYY-MM-DD"}],columns:["rank","package","day","downloads"],func:async(n)=>{const a=u(n.name),o=Y(n.period),t=`${p}/downloads/range/${o}/${a}`,e=await c(t,`npm downloads ${a}`),s=Array.isArray(e?.downloads)?e.downloads:[];if(!s.length)throw new w("npm downloads",`npm has no download stats for "${a}" in window ${o}.`);return s.map((r,l)=>({rank:l+1,package:String(e.package??a),day:String(r.day??""),downloads:r.downloads!=null?Number(r.downloads):null}))}});
|
package/clis/npm/package.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as c,Strategy as p}from"@jackwener/opencli/registry";import{EmptyResultError as m}from"@jackwener/opencli/errors";import{NPM_REGISTRY as l,npmFetch as g,requirePackageName as f}from"./utils.js";function y(e){if(!e)return"";if(typeof e==="string")return e;if(typeof e==="object"&&typeof e.url==="string")return e.url.replace(/^git\+/,"").replace(/\.git$/,"");return""}function d(e){if(!e)return"";if(typeof e==="string")return e;if(typeof e==="object"&&typeof e.url==="string")return e.url;return""}c({site:"npm",name:"package",access:"read",description:"Single npm package metadata (latest version, license, homepage, repository). Use `npm downloads` for stats.",domain:"registry.npmjs.org",strategy:p.PUBLIC,browser:!1,args:[{name:"name",positional:!0,required:!0,help:'npm package name (e.g. "react", "@vercel/og")'}],columns:["name","latestVersion","description","license","homepage","repository","bugs","maintainers","keywords","created","modified","url"],func:async(e)=>{const n=f(e.name),t=await g(`${l}/${n.split("/").map(encodeURIComponent).join("/")}`,`npm package ${n}`),a=t?.["dist-tags"]?.latest;if(!a)throw new m("npm package",`npm registry has no latest version for "${n}".`);const r=t?.versions?.[a]??{},o=Array.isArray(t.maintainers)?t.maintainers.map((i)=>typeof i==="object"&&i?i.name||i.email||"":String(i)).filter(Boolean).join(", "):"",s=Array.isArray(r.keywords)?r.keywords.join(", "):"";return[{name:String(t.name??n),latestVersion:String(a),description:String(r.description??t.description??""),license:typeof r.license==="string"?r.license:r.license?.type??"",homepage:String(r.homepage??""),repository:y(r.repository),bugs:d(r.bugs),maintainers:o,keywords:s,created:String(t.time?.created??"").slice(0,10),modified:String(t.time?.modified??"").slice(0,10),url:`https://www.npmjs.com/package/${n}`}]}});
|
package/clis/npm/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as p,Strategy as m}from"@jackwener/opencli/registry";import{EmptyResultError as d}from"@jackwener/opencli/errors";import{NPM_REGISTRY as u,npmFetch as y,requireBoundedInt as g,requireString as h}from"./utils.js";p({site:"npm",name:"search",access:"read",description:"Search the public npm registry by keyword",domain:"registry.npmjs.org",strategy:m.PUBLIC,browser:!1,args:[{name:"query",positional:!0,required:!0,help:'Search keyword (e.g. "react", "graphql client")'},{name:"limit",type:"int",default:20,help:"Max results (1-250)"}],columns:["rank","name","version","description","weeklyDownloads","dependents","license","publisher","updated","url"],func:async(r)=>{const t=h(r.query,"query"),s=g(r.limit,20,250),o=`${u}/-/v1/search?text=${encodeURIComponent(t)}&size=${s}`,i=await y(o,"npm search"),a=Array.isArray(i?.objects)?i.objects:[];if(!a.length)throw new d("npm search",`No npm packages matched "${t}".`);return a.slice(0,s).map((n,c)=>{const e=n?.package??{},l=n?.downloads??{};return{rank:c+1,name:String(e.name??""),version:String(e.version??""),description:String(e.description??""),weeklyDownloads:l.weekly!=null?Number(l.weekly):null,dependents:n.dependents!=null?Number(n.dependents):null,license:String(e.license??""),publisher:String(e.publisher?.username??""),updated:String(n.updated??"").slice(0,10),url:e.links?.npm?String(e.links.npm):e.name?`https://www.npmjs.com/package/${e.name}`:""}})}});
|
package/clis/npm/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as o,CommandExecutionError as i,EmptyResultError as m}from"@jackwener/opencli/errors";export const NPM_REGISTRY="https://registry.npmjs.org",NPM_API="https://api.npmjs.org";const c="opencli-npm-adapter (+https://github.com/jackwener/OpenCLI)",p=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/i;export function requireString(r,e){const t=String(r??"").trim();if(!t)throw new o(`npm ${e} cannot be empty`);return t}export function requirePackageName(r){const e=String(r??"").trim();if(!e)throw new o('npm package name is required (e.g. "react", "@vercel/og")');if(e.length>214)throw new o(`npm package name "${r}" is too long (max 214 chars)`);if(!p.test(e))throw new o(`npm package name "${r}" is not a valid registry name`,'Names are 1–214 chars of lowercase a-z / 0-9 / "-._" (scoped form: "@scope/name").');return e}export function requireBoundedInt(r,e,t,s="limit"){const n=r??e,a=typeof n==="number"?n:Number(n);if(!Number.isInteger(a)||a<=0)throw new o(`npm ${s} must be a positive integer`);if(a>t)throw new o(`npm ${s} must be <= ${t}`);return a}export async function npmFetch(r,e){let t;try{t=await fetch(r,{headers:{"user-agent":c,accept:"application/json"}})}catch(n){throw new i(`${e} request failed: ${n?.message??n}`,"Check that registry.npmjs.org / api.npmjs.org are reachable from this network.")}if(t.status===404)throw new m(e,`npm registry returned 404 for ${r}.`);if(t.status===429)throw new i(`${e} returned HTTP 429 (rate limited)`,"npm throttles unauthenticated bursts; wait a few seconds and retry.");if(!t.ok)throw new i(`${e} returned HTTP ${t.status}`);let s;try{s=await t.json()}catch(n){throw new i(`${e} returned malformed JSON: ${n?.message??n}`)}return s}
|
package/clis/nuget/package.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as d,Strategy as f}from"@jackwener/opencli/registry";import{CommandExecutionError as i,EmptyResultError as y}from"@jackwener/opencli/errors";import{NUGET_REGISTRATION_BASE as m,joinAuthors as h,joinTags as E,nugetFetch as g,requirePackageId as w}from"./utils.js";d({site:"nuget",name:"package",access:"read",description:"Full NuGet package version history (catalogEntry per release)",domain:"api.nuget.org",strategy:f.PUBLIC,browser:!1,args:[{name:"id",positional:!0,required:!0,help:'NuGet package id (e.g. "Newtonsoft.Json", case-insensitive)'}],columns:["rank","id","version","title","authors","tags","language","licenseExpression","projectUrl","published","listed","url"],func:async(p)=>{const o=w(p.id),c=`${m}/${encodeURIComponent(o.toLowerCase())}/index.json`,l=await g(c,"nuget package"),u=Array.isArray(l?.items)?l.items:[],a=[];for(const[n,r]of u.entries()){let e=Array.isArray(r?.items)?r.items:null;if(!e){const t=typeof r?.["@id"]==="string"?r["@id"]:null;if(!t)throw new i(`nuget package registration page ${n+1} is missing @id for package "${o}"`);const s=await g(t,"nuget package page");if(!Array.isArray(s?.items))throw new i(`nuget package registration leaf ${t} did not include an items array`);e=s.items}for(const t of e){if(!t||typeof t!=="object"||!t.catalogEntry||typeof t.catalogEntry!=="object")throw new i(`nuget package registration page ${n+1} contains a malformed version entry`);a.push(t)}}if(!a.length)throw new y("nuget package",`No published versions found for NuGet package "${o}".`);return[...a].sort((n,r)=>{const e=n?.catalogEntry?.published??"",t=r?.catalogEntry?.published??"";if(e!==t)return t.localeCompare(e);const s=n?.catalogEntry?.version??"";return(r?.catalogEntry?.version??"").localeCompare(s)}).map((n,r)=>{const e=n?.catalogEntry??{};return{rank:r+1,id:typeof e?.id==="string"?e.id:o,version:typeof e?.version==="string"?e.version:null,title:typeof e?.title==="string"?e.title:null,authors:h(e?.authors),tags:E(e?.tags),language:typeof e?.language==="string"?e.language:null,licenseExpression:typeof e?.licenseExpression==="string"?e.licenseExpression:null,projectUrl:typeof e?.projectUrl==="string"?e.projectUrl:null,published:typeof e?.published==="string"?e.published:null,listed:typeof e?.listed==="boolean"?e.listed:null,url:typeof e?.id==="string"&&typeof e?.version==="string"?`https://www.nuget.org/packages/${e.id}/${e.version}`:""}})}});
|
package/clis/nuget/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as c,Strategy as d}from"@jackwener/opencli/registry";import{EmptyResultError as p}from"@jackwener/opencli/errors";import{NUGET_SEARCH_BASE as y,joinAuthors as
|
|
1
|
+
import{cli as c,Strategy as d}from"@jackwener/opencli/registry";import{EmptyResultError as p}from"@jackwener/opencli/errors";import{NUGET_SEARCH_BASE as y,joinAuthors as m,joinTags as f,nugetFetch as h,requireBoundedInt as w,requireString as g}from"./utils.js";c({site:"nuget",name:"search",access:"read",description:"Search NuGet packages by keyword",domain:"api.nuget.org",strategy:d.PUBLIC,browser:!1,args:[{name:"query",positional:!0,required:!0,help:"Search keyword"},{name:"limit",type:"int",default:20,help:"Max packages (1-1000)"},{name:"prerelease",type:"boolean",default:!1,help:"Include prerelease versions"}],columns:["rank","id","version","title","description","authors","tags","totalDownloads","verified","projectUrl","url"],func:async(t)=>{const o=g(t.query,"query"),a=w(t.limit,20,1000),i=t.prerelease===!0?"true":"false",l=`${y}/query?q=${encodeURIComponent(o)}&take=${a}&prerelease=${i}`,n=await h(l,"nuget search"),s=Array.isArray(n?.data)?n.data:[];if(!s.length)throw new p("nuget search",`No NuGet packages matched "${o}".`);return s.slice(0,a).map((e,u)=>{const r=typeof e?.id==="string"?e.id:"";return{rank:u+1,id:r,version:typeof e?.version==="string"?e.version:null,title:typeof e?.title==="string"?e.title:null,description:typeof e?.description==="string"?e.description:null,authors:m(e?.authors),tags:f(e?.tags),totalDownloads:typeof e?.totalDownloads==="number"?e.totalDownloads:null,verified:e?.verified===!0,projectUrl:typeof e?.projectUrl==="string"?e.projectUrl:null,url:r?`https://www.nuget.org/packages/${r}`:""}})}});
|
package/clis/nuget/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as o,CommandExecutionError as u,EmptyResultError as a}from"@jackwener/opencli/errors";export const NUGET_SEARCH_BASE="https://azuresearch-usnc.nuget.org",NUGET_REGISTRATION_BASE="https://api.nuget.org/v3/registration5-semver1";const c="opencli-nuget-adapter/1.0 (+https://github.com/jackwener/OpenCLI; mailto:ppcli@example.com)",g=/^[A-Za-z0-9](?:[A-Za-z0-9._-]{0,99})$/;export function requireString(e,t){const r=String(e??"").trim();if(!r)throw new o(`nuget ${t} cannot be empty`);return r}export function requireBoundedInt(e,t,r,i="limit"){const n=e??t,s=typeof n==="number"?n:Number(n);if(!Number.isInteger(s)||s<=0)throw new o(`nuget ${i} must be a positive integer`);if(s>r)throw new o(`nuget ${i} must be <= ${r}`);return s}export function requirePackageId(e){const t=String(e??"").trim();if(!t)throw new o('nuget package id is required (e.g. "Newtonsoft.Json")');if(!g.test(t))throw new o(`nuget package id "${e}" is not a valid NuGet identifier`,"NuGet IDs are 1-100 chars: letters/digits/`.`/`_`/`-`, starting with letter or digit.");return t}export async function nugetFetch(e,t){let r;try{r=await fetch(e,{headers:{"user-agent":c,accept:"application/json"}})}catch(n){throw new u(`${t} request failed: ${n?.message??n}`,"Check that api.nuget.org is reachable from this network.")}if(r.status===404)throw new a(t,`NuGet returned 404 for ${e}.`);if(r.status===429)throw new u(`${t} returned HTTP 429 (rate limited)`);if(!r.ok)throw new u(`${t} returned HTTP ${r.status}`);let i;try{i=await r.json()}catch(n){throw new u(`${t} returned malformed JSON: ${n?.message??n}`)}return i}export function joinTags(e){if(!Array.isArray(e))return"";return e.filter((t)=>typeof t==="string"&&t.trim()).join(", ")}export function joinAuthors(e){if(Array.isArray(e))return e.filter((t)=>typeof t==="string"&&t.trim()).join(", ");if(typeof e==="string")return e.trim();return""}
|
package/clis/nvd/cve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as l,Strategy as
|
|
1
|
+
import{cli as l,Strategy as v}from"@jackwener/opencli/registry";import{ArgumentError as u,CommandExecutionError as a,EmptyResultError as f}from"@jackwener/opencli/errors";const p="https://services.nvd.nist.gov/rest/json/cves/2.0",y="opencli-nvd-adapter (+https://github.com/jackwener/OpenCLI)",g=/^CVE-\d{4}-\d{4,}$/i;function w(e){const t=String(e??"").trim().toUpperCase();if(!t)throw new u('nvd CVE id is required (e.g. "CVE-2021-44228")');if(!g.test(t))throw new u(`nvd CVE id "${e}" is not a valid CVE identifier`,'Expected the form "CVE-YYYY-N..." with at least 4 sequence digits.');return t}function h(e){if(!Array.isArray(e))return"";const t=e.find((s)=>s?.lang==="en");return String(t?.value??e[0]?.value??"").trim()}function V(e){if(!e||typeof e!=="object")return null;const t=[...Array.isArray(e.cvssMetricV31)?e.cvssMetricV31:[],...Array.isArray(e.cvssMetricV30)?e.cvssMetricV30:[],...Array.isArray(e.cvssMetricV2)?e.cvssMetricV2:[]];return t.find((s)=>s?.type==="Primary")||t[0]||null}function S(e){if(!Array.isArray(e))return"";const t=new Set;for(const s of e)for(const i of s?.description??[])if(i?.value)t.add(String(i.value));return[...t].join(", ")}l({site:"nvd",name:"cve",access:"read",description:"NIST NVD CVE detail (description, CVSS, CWE, KEV flag)",domain:"services.nvd.nist.gov",strategy:v.PUBLIC,browser:!1,args:[{name:"id",positional:!0,required:!0,help:'CVE identifier (e.g. "CVE-2021-44228")'}],columns:["id","published","lastModified","vulnStatus","baseScore","severity","attackVector","cwe","kevAdded","description","url"],func:async(e)=>{const t=w(e.id),s=`${p}?cveId=${encodeURIComponent(t)}`;let i;try{i=await fetch(s,{headers:{"user-agent":y,accept:"application/json"}})}catch(n){throw new a(`nvd cve request failed: ${n?.message??n}`)}if(i.status===403)throw new a("nvd cve returned HTTP 403","NVD enforces aggressive rate limits without an API key. Wait, then retry or set NVD_API_KEY (not yet wired).");if(i.status===429)throw new a("nvd cve returned HTTP 429 (rate limited)","NVD throttles unauthenticated traffic; wait several seconds before retry.");if(!i.ok)throw new a(`nvd cve returned HTTP ${i.status}`);let o;try{o=await i.json()}catch(n){throw new a(`nvd cve returned malformed JSON: ${n?.message??n}`)}const r=(Array.isArray(o?.vulnerabilities)?o.vulnerabilities:[])[0]?.cve;if(!r||!r.id)throw new f("nvd cve",`NVD has no record for "${t}".`);const d=V(r.metrics),c=d?.cvssData??{};return[{id:String(r.id),published:String(r.published??"").slice(0,10),lastModified:String(r.lastModified??"").slice(0,10),vulnStatus:String(r.vulnStatus??""),baseScore:c.baseScore!=null?Number(c.baseScore):null,severity:String(c.baseSeverity??d?.baseSeverity??""),attackVector:String(c.attackVector??""),cwe:S(r.weaknesses),kevAdded:r.cisaExploitAdd?String(r.cisaExploitAdd).slice(0,10):"",description:h(r.descriptions),url:`https://nvd.nist.gov/vuln/detail/${r.id}`}]}});
|
package/clis/oeis/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as p,Strategy as y}from"@jackwener/opencli/registry";import{EmptyResultError as h}from"@jackwener/opencli/errors";import{OEIS_BASE as u,formatId as f,oeisFetch as g,previewTerms as w,requireBoundedInt as k,requireString as q}from"./utils.js";p({site:"oeis",name:"search",access:"read",description:"Search OEIS sequences by keyword or numeric pattern",domain:"oeis.org",strategy:y.PUBLIC,browser:!1,args:[{name:"query",positional:!0,required:!0,help:'Search keyword or comma-separated terms (e.g. "fibonacci", "1,1,2,3,5,8")'},{name:"limit",type:"int",default:10,help:"Max sequences (1-100)"}],columns:["rank","id","name","keywords","preview","author","created","url"],func:async(i)=>{const c=q(i.query,"query"),o=k(i.limit,10,100),t=[];let l=0;const a=10,m=Math.ceil(o/a)+1;for(let e=0;e<m&&t.length<o;e++){const n=`${u}/search?q=${encodeURIComponent(c)}&fmt=json&start=${l}`,r=await g(n,"oeis search"),s=Array.isArray(r)?r:[];if(!s.length)break;for(const d of s){if(t.length>=o)break;t.push(d)}if(s.length<a)break;l+=a}if(!t.length)throw new h("oeis search",`No OEIS sequences matched "${c}".`);return t.map((e,n)=>{const r=f(e?.number);return{rank:n+1,id:r,name:typeof e?.name==="string"?e.name:null,keywords:typeof e?.keyword==="string"?e.keyword:null,preview:w(e?.data),author:typeof e?.author==="string"?e.author:null,created:typeof e?.created==="string"?e.created:null,url:r?`${u}/${r}`:""}})}});
|
package/clis/oeis/sequence.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cli as
|
|
1
|
+
import{cli as f,Strategy as m}from"@jackwener/opencli/registry";import{EmptyResultError as d}from"@jackwener/opencli/errors";import{OEIS_BASE as u,formatId as a,oeisFetch as y,previewTerms as p,requireSequenceId as g}from"./utils.js";function r(n){return Array.isArray(n)?n:[]}f({site:"oeis",name:"sequence",access:"read",description:"Full OEIS sequence detail by A-number (terms, name, keywords, formula counts)",domain:"oeis.org",strategy:m.PUBLIC,browser:!1,args:[{name:"id",positional:!0,required:!0,help:'OEIS sequence id (e.g. "A000045" for Fibonacci)'}],columns:["id","name","keywords","preview","termCount","offset","author","created","revision","commentCount","formulaCount","referenceCount","xrefCount","linkCount","url"],func:async(n)=>{const t=g(n.id),l=`${u}/search?q=id:${encodeURIComponent(t)}&fmt=json`,s=await y(l,"oeis sequence"),i=Array.isArray(s)?s:[];if(!i.length)throw new d("oeis sequence",`OEIS sequence "${t}" not found.`);const e=i[0],o=typeof e?.data==="string"?e.data:"",c=o?o.split(",").filter(Boolean).length:0;return[{id:a(e?.number)??t,name:typeof e?.name==="string"?e.name:null,keywords:typeof e?.keyword==="string"?e.keyword:null,preview:p(o),termCount:c,offset:typeof e?.offset==="string"?e.offset:null,author:typeof e?.author==="string"?e.author:null,created:typeof e?.created==="string"?e.created:null,revision:typeof e?.revision==="number"?e.revision:null,commentCount:r(e?.comment).length,formulaCount:r(e?.formula).length,referenceCount:r(e?.reference).length,xrefCount:r(e?.xref).length,linkCount:r(e?.link).length,url:`${u}/${a(e?.number)??t}`}]}});
|
package/clis/oeis/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ArgumentError as
|
|
1
|
+
import{ArgumentError as i,CommandExecutionError as c,EmptyResultError as u}from"@jackwener/opencli/errors";export const OEIS_BASE="https://oeis.org";const p="opencli-oeis-adapter/1.0 (+https://github.com/jackwener/OpenCLI; mailto:ppcli@example.com)",a=/^A\d{1,7}$/;export function requireString(t,r){const e=String(t??"").trim();if(!e)throw new i(`oeis ${r} cannot be empty`);return e}export function requireBoundedInt(t,r,e,o="limit"){const n=t??r,s=typeof n==="number"?n:Number(n);if(!Number.isInteger(s)||s<=0)throw new i(`oeis ${o} must be a positive integer`);if(s>e)throw new i(`oeis ${o} must be <= ${e}`);return s}export function requireSequenceId(t){const r=String(t??"").trim().toUpperCase();if(!r)throw new i('oeis sequence id is required (e.g. "A000045" for Fibonacci)');const e=r.replace(/^HTTPS?:\/\/(?:WWW\.)?OEIS\.ORG\//,"").replace(/\/.*$/,"");if(!a.test(e))throw new i(`oeis sequence id "${t}" is not a valid A-number`,'Expected format: "A" + digits (e.g. "A000045").');return e}export async function oeisFetch(t,r){let e;try{e=await fetch(t,{headers:{"user-agent":p,accept:"application/json"}})}catch(n){throw new c(`${r} request failed: ${n?.message??n}`,"Check that oeis.org is reachable from this network.")}if(e.status===404)throw new u(r,`OEIS returned 404 for ${t}.`);if(e.status===429)throw new c(`${r} returned HTTP 429 (rate limited)`);if(!e.ok)throw new c(`${r} returned HTTP ${e.status}`);let o;try{o=await e.json()}catch(n){throw new c(`${r} returned malformed JSON: ${n?.message??n}`)}return o}export function formatId(t){if(typeof t!=="number"||!Number.isInteger(t)||t<0)return null;return`A${String(t).padStart(6,"0")}`}export function previewTerms(t,r=12){if(typeof t!=="string")return"";const e=t.split(",").map((o)=>o.trim()).filter(Boolean);if(e.length<=r)return e.join(", ");return[...e.slice(0,r),`(+${e.length-r})`].join(", ")}
|