publishport-opencli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +214 -0
- package/README.md +299 -0
- package/README.zh-CN.md +341 -0
- package/cli-manifest.json +51513 -0
- package/clis/12306/auth.js +25 -0
- package/clis/12306/me.js +9 -0
- package/clis/12306/orders.js +13 -0
- package/clis/12306/passengers.js +14 -0
- package/clis/12306/price.js +1 -0
- package/clis/12306/stations.js +1 -0
- package/clis/12306/train.js +1 -0
- package/clis/12306/trains.js +1 -0
- package/clis/12306/utils.js +1 -0
- package/clis/1688/assets.js +127 -0
- package/clis/1688/auth.js +1 -0
- package/clis/1688/download.js +1 -0
- package/clis/1688/item.js +21 -0
- package/clis/1688/search.js +129 -0
- package/clis/1688/shared.js +11 -0
- package/clis/1688/store.js +26 -0
- package/clis/1point3acres/auth.js +18 -0
- package/clis/1point3acres/digest.js +1 -0
- package/clis/1point3acres/forum.js +1 -0
- package/clis/1point3acres/forums.js +1 -0
- package/clis/1point3acres/hot.js +1 -0
- package/clis/1point3acres/latest.js +1 -0
- package/clis/1point3acres/notifications.js +1 -0
- package/clis/1point3acres/search.js +1 -0
- package/clis/1point3acres/thread.js +2 -0
- package/clis/1point3acres/user.js +1 -0
- package/clis/1point3acres/utils.js +6 -0
- package/clis/36kr/article.js +20 -0
- package/clis/36kr/hot.js +16 -0
- package/clis/36kr/news.js +1 -0
- package/clis/36kr/search.js +36 -0
- package/clis/51job/company.js +36 -0
- package/clis/51job/detail.js +35 -0
- package/clis/51job/hot.js +1 -0
- package/clis/51job/search.js +1 -0
- package/clis/51job/utils.js +21 -0
- package/clis/_atlassian/shared.js +21 -0
- package/clis/_shared/article/auth.js +16 -0
- package/clis/_shared/article/douban-md2draft.js +4 -0
- package/clis/_shared/article/format.js +1 -0
- package/clis/_shared/article/images.js +95 -0
- package/clis/_shared/article/login.js +1 -0
- package/clis/_shared/article/page-runtime.js +745 -0
- package/clis/_shared/article/publish.js +34 -0
- package/clis/_shared/common.js +1 -0
- package/clis/_shared/content-guard.js +1 -0
- package/clis/_shared/desktop-commands.js +1 -0
- package/clis/_shared/search-adapter.js +1 -0
- package/clis/_shared/site-auth.js +1 -0
- package/clis/_shared/token-auth.js +2 -0
- package/clis/_shared/video-publish.js +62 -0
- package/clis/aibase/news.js +31 -0
- package/clis/amazon/auth.js +19 -0
- package/clis/amazon/bestsellers.js +1 -0
- package/clis/amazon/discussion.js +20 -0
- package/clis/amazon/movers-shakers.js +1 -0
- package/clis/amazon/new-releases.js +1 -0
- package/clis/amazon/offer.js +29 -0
- package/clis/amazon/product.js +25 -0
- package/clis/amazon/rankings.js +68 -0
- package/clis/amazon/search.js +16 -0
- package/clis/amazon/shared.js +11 -0
- package/clis/antigravity/SKILL.md +38 -0
- package/clis/antigravity/_actions.js +201 -0
- package/clis/antigravity/audit-extras.js +78 -0
- package/clis/antigravity/delete.js +1 -0
- package/clis/antigravity/dump.js +1 -0
- package/clis/antigravity/extract-code.js +18 -0
- package/clis/antigravity/history.js +1 -0
- package/clis/antigravity/mark-read.js +1 -0
- package/clis/antigravity/model.js +90 -0
- package/clis/antigravity/new.js +9 -0
- package/clis/antigravity/read.js +10 -0
- package/clis/antigravity/rename.js +1 -0
- package/clis/antigravity/send.js +11 -0
- package/clis/antigravity/serve.js +97 -0
- package/clis/antigravity/status.js +1 -0
- package/clis/antigravity/storage.js +12 -0
- package/clis/antigravity/watch.js +6 -0
- package/clis/apple-podcasts/episodes.js +1 -0
- package/clis/apple-podcasts/search.js +1 -0
- package/clis/apple-podcasts/top.js +1 -0
- package/clis/apple-podcasts/utils.js +1 -0
- package/clis/archive/item.js +1 -0
- package/clis/archive/search.js +1 -0
- package/clis/archive/snapshots.js +1 -0
- package/clis/archive/wayback.js +1 -0
- package/clis/arxiv/author.js +1 -0
- package/clis/arxiv/paper.js +1 -0
- package/clis/arxiv/recent.js +1 -0
- package/clis/arxiv/search.js +1 -0
- package/clis/arxiv/utils.js +1 -0
- package/clis/autohome/__fixtures__/catalog.html +11 -0
- package/clis/autohome/__fixtures__/koubei.json +116 -0
- package/clis/autohome/brand.js +1 -0
- package/clis/autohome/score.js +1 -0
- package/clis/autohome/utils.js +1 -0
- package/clis/baidu-scholar/search.js +63 -0
- package/clis/baijiahao/article.js +1 -0
- package/clis/baijiahao/lists.js +1 -0
- package/clis/baijiahao/login.js +1 -0
- package/clis/baijiahao/publish.js +57 -0
- package/clis/baijiahao/stats.js +1 -0
- package/clis/baijiahao/whoami.js +1 -0
- package/clis/band/auth.js +29 -0
- package/clis/band/bands.js +37 -0
- package/clis/band/mentions.js +6 -0
- package/clis/band/post.js +76 -0
- package/clis/band/posts.js +50 -0
- package/clis/barchart/flow.js +70 -0
- package/clis/barchart/greeks.js +88 -0
- package/clis/barchart/options.js +61 -0
- package/clis/barchart/quote.js +87 -0
- package/clis/bbc/news.js +1 -0
- package/clis/bbc/topic.js +1 -0
- package/clis/bbc/utils.js +1 -0
- package/clis/bilibili/article.js +1 -0
- package/clis/bilibili/auth.js +1 -0
- package/clis/bilibili/categories.js +1 -0
- package/clis/bilibili/coin.js +1 -0
- package/clis/bilibili/comment-del.js +1 -0
- package/clis/bilibili/comment-like.js +1 -0
- package/clis/bilibili/comment.js +1 -0
- package/clis/bilibili/comments.js +1 -0
- package/clis/bilibili/dm-list.js +1 -0
- package/clis/bilibili/dm-read.js +1 -0
- package/clis/bilibili/dm-send.js +1 -0
- package/clis/bilibili/download.js +7 -0
- package/clis/bilibili/drafts.js +1 -0
- package/clis/bilibili/dynamic-post.js +24 -0
- package/clis/bilibili/dynamic.js +1 -0
- package/clis/bilibili/favorite-add.js +1 -0
- package/clis/bilibili/favorite.js +1 -0
- package/clis/bilibili/feed.js +2 -0
- package/clis/bilibili/follow.js +1 -0
- package/clis/bilibili/following.js +1 -0
- package/clis/bilibili/history.js +1 -0
- package/clis/bilibili/hot.js +15 -0
- package/clis/bilibili/like.js +1 -0
- package/clis/bilibili/me.js +1 -0
- package/clis/bilibili/partitions.js +1 -0
- package/clis/bilibili/ranking.js +1 -0
- package/clis/bilibili/search.js +1 -0
- package/clis/bilibili/stats.js +1 -0
- package/clis/bilibili/subtitle.js +21 -0
- package/clis/bilibili/summary.js +1 -0
- package/clis/bilibili/topics.js +1 -0
- package/clis/bilibili/unfollow.js +1 -0
- package/clis/bilibili/upload.js +1 -0
- package/clis/bilibili/user-videos.js +1 -0
- package/clis/bilibili/utils.js +50 -0
- package/clis/bilibili/video-drafts.js +1 -0
- package/clis/bilibili/video.js +1 -0
- package/clis/binance/asks.js +1 -0
- package/clis/binance/depth.js +1 -0
- package/clis/binance/gainers.js +1 -0
- package/clis/binance/klines.js +1 -0
- package/clis/binance/losers.js +1 -0
- package/clis/binance/pairs.js +1 -0
- package/clis/binance/price.js +1 -0
- package/clis/binance/prices.js +1 -0
- package/clis/binance/ticker.js +1 -0
- package/clis/binance/top.js +1 -0
- package/clis/binance/trades.js +1 -0
- package/clis/bloomberg/businessweek.js +12 -0
- package/clis/bloomberg/crypto.js +1 -0
- package/clis/bloomberg/economics.js +1 -0
- package/clis/bloomberg/feeds.js +1 -0
- package/clis/bloomberg/green.js +1 -0
- package/clis/bloomberg/industries.js +1 -0
- package/clis/bloomberg/main.js +1 -0
- package/clis/bloomberg/markets.js +1 -0
- package/clis/bloomberg/news.js +57 -0
- package/clis/bloomberg/opinions.js +1 -0
- package/clis/bloomberg/politics.js +1 -0
- package/clis/bloomberg/pursuits.js +1 -0
- package/clis/bloomberg/tech.js +1 -0
- package/clis/bloomberg/utils.js +17 -0
- package/clis/bluesky/post.js +1 -0
- package/clis/bluesky/shared.js +56 -0
- package/clis/bluesky/whoami.js +1 -0
- package/clis/booking/search.js +93 -0
- package/clis/boss/auth.js +13 -0
- package/clis/boss/batchgreet.js +1 -0
- package/clis/boss/chatlist.js +1 -0
- package/clis/boss/chatmsg.js +1 -0
- package/clis/boss/detail.js +1 -0
- package/clis/boss/exchange.js +1 -0
- package/clis/boss/greet.js +1 -0
- package/clis/boss/invite.js +4 -0
- package/clis/boss/joblist.js +1 -0
- package/clis/boss/mark.js +1 -0
- package/clis/boss/recommend.js +1 -0
- package/clis/boss/resume.js +90 -0
- package/clis/boss/search.js +1 -0
- package/clis/boss/send.js +1 -0
- package/clis/boss/stats.js +1 -0
- package/clis/boss/utils.js +161 -0
- package/clis/brave/search.js +23 -0
- package/clis/chaoxing/assignments.js +1 -0
- package/clis/chaoxing/auth.js +21 -0
- package/clis/chaoxing/exams.js +1 -0
- package/clis/chaoxing/utils.js +58 -0
- package/clis/chatgpt/ask.js +1 -0
- package/clis/chatgpt/auth.js +17 -0
- package/clis/chatgpt/detail.js +1 -0
- package/clis/chatgpt/history.js +1 -0
- package/clis/chatgpt/image.js +1 -0
- package/clis/chatgpt/model.js +1 -0
- package/clis/chatgpt/new.js +1 -0
- package/clis/chatgpt/project-file-add.js +1 -0
- package/clis/chatgpt/project-list.js +1 -0
- package/clis/chatgpt/read.js +1 -0
- package/clis/chatgpt/send.js +1 -0
- package/clis/chatgpt/status.js +1 -0
- package/clis/chatgpt/utils.js +1092 -0
- package/clis/chatgpt-app/ask.js +1 -0
- package/clis/chatgpt-app/ax.js +512 -0
- package/clis/chatgpt-app/model.js +1 -0
- package/clis/chatgpt-app/new.js +1 -0
- package/clis/chatgpt-app/read.js +1 -0
- package/clis/chatgpt-app/send.js +1 -0
- package/clis/chatgpt-app/status.js +1 -0
- package/clis/chatwise/ask.js +1 -0
- package/clis/chatwise/export.js +21 -0
- package/clis/chatwise/history.js +26 -0
- package/clis/chatwise/model.js +48 -0
- package/clis/chatwise/new.js +1 -0
- package/clis/chatwise/read.js +25 -0
- package/clis/chatwise/screenshot.js +1 -0
- package/clis/chatwise/send.js +1 -0
- package/clis/chatwise/status.js +1 -0
- package/clis/chatwise/utils.js +75 -0
- package/clis/chess/analyze.js +1 -0
- package/clis/chess/game.js +1 -0
- package/clis/chess/games.js +1 -0
- package/clis/chess/stats.js +1 -0
- package/clis/chess/utils.js +1 -0
- package/clis/claude/ask.js +4 -0
- package/clis/claude/auth.js +19 -0
- package/clis/claude/detail.js +1 -0
- package/clis/claude/history.js +1 -0
- package/clis/claude/new.js +1 -0
- package/clis/claude/read.js +1 -0
- package/clis/claude/send.js +1 -0
- package/clis/claude/status.js +1 -0
- package/clis/claude/utils.js +179 -0
- package/clis/cnblogs/article.js +1 -0
- package/clis/cnblogs/login.js +1 -0
- package/clis/cnblogs/stats.js +37 -0
- package/clis/cnblogs/whoami.js +1 -0
- package/clis/cnki/search.js +38 -0
- package/clis/codex/_actions.js +72 -0
- package/clis/codex/archive.js +1 -0
- package/clis/codex/ask.js +23 -0
- package/clis/codex/dump.js +1 -0
- package/clis/codex/export.js +12 -0
- package/clis/codex/extract-diff.js +28 -0
- package/clis/codex/history.js +1 -0
- package/clis/codex/model.js +118 -0
- package/clis/codex/new.js +1 -0
- package/clis/codex/pin.js +1 -0
- package/clis/codex/projects.js +1 -0
- package/clis/codex/read.js +16 -0
- package/clis/codex/rename.js +34 -0
- package/clis/codex/screenshot.js +1 -0
- package/clis/codex/send.js +16 -0
- package/clis/codex/sidebar.js +1 -0
- package/clis/codex/status.js +1 -0
- package/clis/coingecko/categories.js +1 -0
- package/clis/coingecko/coin.js +1 -0
- package/clis/coingecko/derivatives.js +1 -0
- package/clis/coingecko/exchanges.js +1 -0
- package/clis/coingecko/global.js +1 -0
- package/clis/coingecko/top.js +1 -0
- package/clis/coingecko/trending.js +1 -0
- package/clis/confluence/create.js +1 -0
- package/clis/confluence/page.js +1 -0
- package/clis/confluence/search.js +1 -0
- package/clis/confluence/shared.js +1 -0
- package/clis/confluence/update.js +1 -0
- package/clis/coupang/add-to-cart.js +86 -0
- package/clis/coupang/auth.js +16 -0
- package/clis/coupang/product.js +161 -0
- package/clis/coupang/search.js +385 -0
- package/clis/coupang/utils.js +1 -0
- package/clis/crates/crate.js +1 -0
- package/clis/crates/search.js +1 -0
- package/clis/crates/utils.js +1 -0
- package/clis/csdn/article.js +29 -0
- package/clis/csdn/columns.js +1 -0
- package/clis/csdn/login.js +1 -0
- package/clis/csdn/stats.js +71 -0
- package/clis/csdn/whoami.js +1 -0
- package/clis/cto51/article.js +1 -0
- package/clis/cto51/whoami.js +1 -0
- package/clis/ctrip/auth.js +1 -0
- package/clis/ctrip/flight.js +17 -0
- package/clis/ctrip/hotel-search.js +24 -0
- package/clis/ctrip/hotel-suggest.js +1 -0
- package/clis/ctrip/search.js +1 -0
- package/clis/ctrip/utils.js +119 -0
- package/clis/cursor/ask.js +22 -0
- package/clis/cursor/composer.js +12 -0
- package/clis/cursor/dump.js +1 -0
- package/clis/cursor/export.js +23 -0
- package/clis/cursor/extract-code.js +18 -0
- package/clis/cursor/history.js +26 -0
- package/clis/cursor/model.js +18 -0
- package/clis/cursor/new.js +1 -0
- package/clis/cursor/read.js +27 -0
- package/clis/cursor/screenshot.js +1 -0
- package/clis/cursor/send.js +12 -0
- package/clis/cursor/status.js +1 -0
- package/clis/dblp/author.js +1 -0
- package/clis/dblp/paper.js +1 -0
- package/clis/dblp/search.js +1 -0
- package/clis/dblp/utils.js +1 -0
- package/clis/dblp/venue.js +1 -0
- package/clis/deepseek/ask.js +1 -0
- package/clis/deepseek/auth.js +22 -0
- package/clis/deepseek/detail.js +1 -0
- package/clis/deepseek/history.js +1 -0
- package/clis/deepseek/new.js +1 -0
- package/clis/deepseek/read.js +1 -0
- package/clis/deepseek/send.js +50 -0
- package/clis/deepseek/status.js +1 -0
- package/clis/deepseek/utils.js +202 -0
- package/clis/defillama/protocol.js +1 -0
- package/clis/defillama/protocols.js +1 -0
- package/clis/defillama/utils.js +1 -0
- package/clis/devto/auth.js +9 -0
- package/clis/devto/latest.js +1 -0
- package/clis/devto/publish.js +17 -0
- package/clis/devto/read.js +3 -0
- package/clis/devto/stats.js +27 -0
- package/clis/devto/tag.js +1 -0
- package/clis/devto/top.js +1 -0
- package/clis/devto/user.js +1 -0
- package/clis/dianping/__fixtures__/search.html +168 -0
- package/clis/dianping/__fixtures__/shop.html +6 -0
- package/clis/dianping/auth.js +10 -0
- package/clis/dianping/cityResolver.js +4 -0
- package/clis/dianping/search.js +1 -0
- package/clis/dianping/shop.js +1 -0
- package/clis/dianping/utils.js +1 -0
- package/clis/dictionary/examples.js +1 -0
- package/clis/dictionary/search.js +1 -0
- package/clis/dictionary/synonyms.js +1 -0
- package/clis/discord-app/channels.js +1 -0
- package/clis/discord-app/delete.js +66 -0
- package/clis/discord-app/goto.js +1 -0
- package/clis/discord-app/members.js +21 -0
- package/clis/discord-app/read.js +1 -0
- package/clis/discord-app/search.js +29 -0
- package/clis/discord-app/send.js +10 -0
- package/clis/discord-app/servers.js +1 -0
- package/clis/discord-app/status.js +1 -0
- package/clis/discord-app/thread-read.js +1 -0
- package/clis/discord-app/threads.js +1 -0
- package/clis/discord-app/utils.js +226 -0
- package/clis/discord-web/auth.js +10 -0
- package/clis/discord-web/send.js +13 -0
- package/clis/dockerhub/image.js +1 -0
- package/clis/dockerhub/search.js +1 -0
- package/clis/dockerhub/utils.js +1 -0
- package/clis/dongchedi/__fixtures__/search.json +60 -0
- package/clis/dongchedi/__fixtures__/series-detail.json +911 -0
- package/clis/dongchedi/__fixtures__/series-score.json +1396 -0
- package/clis/dongchedi/koubei.js +1 -0
- package/clis/dongchedi/models.js +1 -0
- package/clis/dongchedi/score.js +1 -0
- package/clis/dongchedi/search.js +1 -0
- package/clis/dongchedi/series.js +1 -0
- package/clis/dongchedi/specs.js +1 -0
- package/clis/dongchedi/utils.js +1 -0
- package/clis/douban/article.js +53 -0
- package/clis/douban/auth.js +21 -0
- package/clis/douban/book-hot.js +1 -0
- package/clis/douban/download.js +1 -0
- package/clis/douban/marks.js +59 -0
- package/clis/douban/movie-hot.js +1 -0
- package/clis/douban/photos.js +1 -0
- package/clis/douban/reviews.js +53 -0
- package/clis/douban/search.js +1 -0
- package/clis/douban/subject.js +1 -0
- package/clis/douban/top250.js +50 -0
- package/clis/douban/utils.js +344 -0
- package/clis/doubao/ask.js +1 -0
- package/clis/doubao/auth.js +28 -0
- package/clis/doubao/detail.js +1 -0
- package/clis/doubao/history.js +1 -0
- package/clis/doubao/meeting-summary.js +1 -0
- package/clis/doubao/meeting-transcript.js +1 -0
- package/clis/doubao/new.js +1 -0
- package/clis/doubao/read.js +1 -0
- package/clis/doubao/send.js +1 -0
- package/clis/doubao/status.js +1 -0
- package/clis/doubao/utils.js +704 -0
- package/clis/doubao-app/ask.js +1 -0
- package/clis/doubao-app/dump.js +1 -0
- package/clis/doubao-app/new.js +1 -0
- package/clis/doubao-app/read.js +1 -0
- package/clis/doubao-app/screenshot.js +1 -0
- package/clis/doubao-app/send.js +1 -0
- package/clis/doubao-app/status.js +1 -0
- package/clis/doubao-app/utils.js +64 -0
- package/clis/douyin/_shared/browser-fetch.js +28 -0
- package/clis/douyin/_shared/creation-id.js +1 -0
- package/clis/douyin/_shared/evaluate-result.js +1 -0
- package/clis/douyin/_shared/imagex-upload.js +1 -0
- package/clis/douyin/_shared/public-api.js +1 -0
- package/clis/douyin/_shared/sts2.js +1 -0
- package/clis/douyin/_shared/text-extra.js +1 -0
- package/clis/douyin/_shared/timing.js +1 -0
- package/clis/douyin/_shared/tos-upload.js +5 -0
- package/clis/douyin/_shared/transcode.js +1 -0
- package/clis/douyin/_shared/types.js +1 -0
- package/clis/douyin/_shared/vod-upload.js +5 -0
- package/clis/douyin/activities.js +1 -0
- package/clis/douyin/auth.js +1 -0
- package/clis/douyin/collections.js +1 -0
- package/clis/douyin/delete.js +76 -0
- package/clis/douyin/draft.js +166 -0
- package/clis/douyin/drafts.js +1 -0
- package/clis/douyin/hashtag.js +1 -0
- package/clis/douyin/location.js +1 -0
- package/clis/douyin/profile.js +1 -0
- package/clis/douyin/publish-image.js +64 -0
- package/clis/douyin/publish.js +14 -0
- package/clis/douyin/search.js +51 -0
- package/clis/douyin/stats.js +1 -0
- package/clis/douyin/update.js +1 -0
- package/clis/douyin/user-videos.js +1 -0
- package/clis/douyin/videos.js +1 -0
- package/clis/duckduckgo/search.js +1 -0
- package/clis/duckduckgo/suggest.js +1 -0
- package/clis/eastmoney/_secid.js +1 -0
- package/clis/eastmoney/announcement.js +1 -0
- package/clis/eastmoney/article.js +1 -0
- package/clis/eastmoney/convertible.js +1 -0
- package/clis/eastmoney/etf.js +1 -0
- package/clis/eastmoney/holders.js +1 -0
- package/clis/eastmoney/hot-rank.js +30 -0
- package/clis/eastmoney/index-board.js +1 -0
- package/clis/eastmoney/kline.js +1 -0
- package/clis/eastmoney/kuaixun.js +1 -0
- package/clis/eastmoney/longhu.js +1 -0
- package/clis/eastmoney/money-flow.js +1 -0
- package/clis/eastmoney/northbound.js +1 -0
- package/clis/eastmoney/quote.js +1 -0
- package/clis/eastmoney/rank.js +1 -0
- package/clis/eastmoney/sectors.js +1 -0
- package/clis/eastmoney/whoami.js +1 -0
- package/clis/endoflife/product.js +1 -0
- package/clis/endoflife/utils.js +1 -0
- package/clis/facebook/__fixtures__/notifications-page.html +13 -0
- package/clis/facebook/add-friend.js +24 -0
- package/clis/facebook/auth.js +1 -0
- package/clis/facebook/comment.js +18 -0
- package/clis/facebook/events.js +26 -0
- package/clis/facebook/feed.js +209 -0
- package/clis/facebook/friends.js +24 -0
- package/clis/facebook/groups.js +32 -0
- package/clis/facebook/join-group.js +25 -0
- package/clis/facebook/like.js +29 -0
- package/clis/facebook/marketplace-inbox.js +34 -0
- package/clis/facebook/marketplace-listings.js +33 -0
- package/clis/facebook/memories.js +21 -0
- package/clis/facebook/notifications.js +31 -0
- package/clis/facebook/post.js +88 -0
- package/clis/facebook/profile.js +18 -0
- package/clis/facebook/search.js +22 -0
- package/clis/flathub/app.js +1 -0
- package/clis/flathub/search.js +1 -0
- package/clis/flathub/utils.js +1 -0
- package/clis/flomo/auth.js +22 -0
- package/clis/flomo/memos.js +13 -0
- package/clis/gemini/ask.js +1 -0
- package/clis/gemini/auth.js +14 -0
- package/clis/gemini/deep-research-result.js +4 -0
- package/clis/gemini/deep-research.js +1 -0
- package/clis/gemini/detail.js +1 -0
- package/clis/gemini/history.js +1 -0
- package/clis/gemini/image.js +3 -0
- package/clis/gemini/new.js +1 -0
- package/clis/gemini/read.js +1 -0
- package/clis/gemini/status.js +1 -0
- package/clis/gemini/utils.js +1234 -0
- package/clis/geogebra/add-circle.js +1 -0
- package/clis/geogebra/add-line.js +1 -0
- package/clis/geogebra/add-point.js +1 -0
- package/clis/geogebra/add-polygon.js +1 -0
- package/clis/geogebra/eval.js +1 -0
- package/clis/geogebra/hexagon.js +1 -0
- package/clis/geogebra/info.js +13 -0
- package/clis/geogebra/list.js +1 -0
- package/clis/geogebra/triangle.js +1 -0
- package/clis/geogebra/utils.js +99 -0
- package/clis/ghost/publish.js +1 -0
- package/clis/ghost/shared.js +1 -0
- package/clis/ghost/whoami.js +1 -0
- package/clis/gitee/auth.js +12 -0
- package/clis/gitee/index.js +1 -0
- package/clis/gitee/search.js +1 -0
- package/clis/gitee/trending.js +240 -0
- package/clis/gitee/user.js +71 -0
- package/clis/github/auth.js +7 -0
- package/clis/github-trending/repos.js +1 -0
- package/clis/google/news.js +1 -0
- package/clis/google/search.js +90 -0
- package/clis/google/suggest.js +1 -0
- package/clis/google/trends.js +1 -0
- package/clis/google/utils.js +1 -0
- package/clis/google-scholar/cite.js +20 -0
- package/clis/google-scholar/profile.js +36 -0
- package/clis/google-scholar/search.js +35 -0
- package/clis/goproxy/module.js +1 -0
- package/clis/goproxy/utils.js +1 -0
- package/clis/goproxy/versions.js +1 -0
- package/clis/gov-law/recent.js +1 -0
- package/clis/gov-law/search.js +14 -0
- package/clis/gov-law/shared.js +29 -0
- package/clis/gov-policy/__fixtures__/recent.html +16 -0
- package/clis/gov-policy/__fixtures__/search.html +41 -0
- package/clis/gov-policy/recent.js +8 -0
- package/clis/gov-policy/search.js +8 -0
- package/clis/gov-policy/utils.js +1 -0
- package/clis/grok/ask.js +1 -0
- package/clis/grok/auth.js +17 -0
- package/clis/grok/delete.js +1 -0
- package/clis/grok/detail.js +1 -0
- package/clis/grok/export-all.js +170 -0
- package/clis/grok/export-utils.js +1 -0
- package/clis/grok/export.js +106 -0
- package/clis/grok/history.js +1 -0
- package/clis/grok/image.js +119 -0
- package/clis/grok/image.test.ts +127 -0
- package/clis/grok/new.js +1 -0
- package/clis/grok/pin.js +1 -0
- package/clis/grok/read.js +1 -0
- package/clis/grok/send.js +1 -0
- package/clis/grok/status.js +1 -0
- package/clis/grok/utils.js +337 -0
- package/clis/guazi/__fixtures__/detail.html +7 -0
- package/clis/guazi/__fixtures__/list.html +5 -0
- package/clis/guazi/browse.js +1 -0
- package/clis/guazi/car.js +1 -0
- package/clis/guazi/utils.js +1 -0
- package/clis/hackernews/ask.js +1 -0
- package/clis/hackernews/auth.js +9 -0
- package/clis/hackernews/best.js +1 -0
- package/clis/hackernews/comment.js +61 -0
- package/clis/hackernews/jobs.js +1 -0
- package/clis/hackernews/new.js +1 -0
- package/clis/hackernews/read.js +11 -0
- package/clis/hackernews/search.js +1 -0
- package/clis/hackernews/show.js +1 -0
- package/clis/hackernews/submit.js +65 -0
- package/clis/hackernews/top.js +1 -0
- package/clis/hackernews/user.js +1 -0
- package/clis/hashnode/auth.js +11 -0
- package/clis/hashnode/publish.js +92 -0
- package/clis/hf/auth.js +12 -0
- package/clis/hf/datasets.js +1 -0
- package/clis/hf/models.js +1 -0
- package/clis/hf/paper.js +1 -0
- package/clis/hf/spaces.js +1 -0
- package/clis/hf/top.js +1 -0
- package/clis/homebrew/cask.js +1 -0
- package/clis/homebrew/formula.js +1 -0
- package/clis/homebrew/popular.js +1 -0
- package/clis/homebrew/utils.js +1 -0
- package/clis/huodongxing/events.js +1 -0
- package/clis/hupu/__fixtures__/hot-home.html +64 -0
- package/clis/hupu/auth.js +14 -0
- package/clis/hupu/detail.js +7 -0
- package/clis/hupu/hot.js +14 -0
- package/clis/hupu/like.js +1 -0
- package/clis/hupu/mentions.js +91 -0
- package/clis/hupu/reply.js +1 -0
- package/clis/hupu/search.js +1 -0
- package/clis/hupu/unlike.js +1 -0
- package/clis/hupu/utils.js +243 -0
- package/clis/imdb/person.js +140 -0
- package/clis/imdb/reviews.js +40 -0
- package/clis/imdb/search.js +113 -0
- package/clis/imdb/title.js +1 -0
- package/clis/imdb/top.js +1 -0
- package/clis/imdb/trending.js +1 -0
- package/clis/imdb/utils.js +162 -0
- package/clis/imooc/article.js +59 -0
- package/clis/imooc/login.js +1 -0
- package/clis/imooc/whoami.js +1 -0
- package/clis/indeed/job.js +20 -0
- package/clis/indeed/search.js +37 -0
- package/clis/indeed/utils.js +1 -0
- package/clis/infoq/article.js +19 -0
- package/clis/infoq/login.js +1 -0
- package/clis/infoq/whoami.js +1 -0
- package/clis/instagram/_shared/private-publish.js +75 -0
- package/clis/instagram/_shared/protocol-capture.js +180 -0
- package/clis/instagram/_shared/runtime-info.js +33 -0
- package/clis/instagram/auth.js +22 -0
- package/clis/instagram/collection-create.js +38 -0
- package/clis/instagram/collection-delete.js +72 -0
- package/clis/instagram/comment.js +26 -0
- package/clis/instagram/detail.js +2 -0
- package/clis/instagram/download.js +83 -0
- package/clis/instagram/explore.js +27 -0
- package/clis/instagram/follow.js +24 -0
- package/clis/instagram/followers.js +30 -0
- package/clis/instagram/following.js +74 -0
- package/clis/instagram/like.js +25 -0
- package/clis/instagram/note.js +162 -0
- package/clis/instagram/post.js +718 -0
- package/clis/instagram/profile.js +25 -0
- package/clis/instagram/reel.js +452 -0
- package/clis/instagram/save.js +25 -0
- package/clis/instagram/saved.js +37 -0
- package/clis/instagram/search.js +23 -0
- package/clis/instagram/story.js +21 -0
- package/clis/instagram/unfollow.js +21 -0
- package/clis/instagram/unlike.js +25 -0
- package/clis/instagram/unsave.js +25 -0
- package/clis/instagram/user.js +1 -0
- package/clis/jd/add-cart.js +22 -0
- package/clis/jd/auth.js +12 -0
- package/clis/jd/cart.js +59 -0
- package/clis/jd/detail.js +42 -0
- package/clis/jd/item.js +98 -0
- package/clis/jd/item.test.ts +517 -0
- package/clis/jd/reviews.js +31 -0
- package/clis/jd/search.js +42 -0
- package/clis/jianshu/article.js +1 -0
- package/clis/jianshu/login.js +1 -0
- package/clis/jianshu/notebooks.js +1 -0
- package/clis/jianshu/whoami.js +1 -0
- package/clis/jianyu/auth.js +28 -0
- package/clis/jianyu/detail.js +1 -0
- package/clis/jianyu/search.js +73 -0
- package/clis/jianyu/shared/china-bid-search.js +86 -0
- package/clis/jianyu/shared/procurement-contract.js +1 -0
- package/clis/jianyu/shared/procurement-detail.js +18 -0
- package/clis/jike/auth.js +19 -0
- package/clis/jike/comment.js +82 -0
- package/clis/jike/create.js +83 -0
- package/clis/jike/feed.js +32 -0
- package/clis/jike/like.js +38 -0
- package/clis/jike/notifications.js +115 -0
- package/clis/jike/post.js +33 -0
- package/clis/jike/repost.js +67 -0
- package/clis/jike/search.js +29 -0
- package/clis/jike/topic.js +20 -0
- package/clis/jike/user.js +19 -0
- package/clis/jike/utils.js +15 -0
- package/clis/jimeng/auth.js +13 -0
- package/clis/jimeng/generate.js +60 -0
- package/clis/jimeng/history.js +32 -0
- package/clis/jimeng/new.js +26 -0
- package/clis/jimeng/workspaces.js +22 -0
- package/clis/jira/attachments.js +1 -0
- package/clis/jira/comments.js +1 -0
- package/clis/jira/issue.js +1 -0
- package/clis/jira/links.js +1 -0
- package/clis/jira/search.js +1 -0
- package/clis/jira/shared.js +1 -0
- package/clis/juejin/article.js +5 -0
- package/clis/juejin/categories.js +1 -0
- package/clis/juejin/hot.js +1 -0
- package/clis/juejin/login.js +1 -0
- package/clis/juejin/recommend.js +1 -0
- package/clis/juejin/stats.js +53 -0
- package/clis/juejin/tags.js +1 -0
- package/clis/juejin/utils.js +1 -0
- package/clis/juejin/whoami.js +1 -0
- package/clis/ke/auth.js +14 -0
- package/clis/ke/chengjiao.js +45 -0
- package/clis/ke/ershoufang.js +50 -0
- package/clis/ke/utils.js +21 -0
- package/clis/ke/xiaoqu.js +45 -0
- package/clis/ke/zufang.js +50 -0
- package/clis/kimi/_utils.js +38 -0
- package/clis/kimi/audit-extras.js +64 -0
- package/clis/kimi/auth.js +17 -0
- package/clis/kimi/chat.js +77 -0
- package/clis/kimi/storage.js +14 -0
- package/clis/kimi/ui.js +89 -0
- package/clis/kimi/usage.js +51 -0
- package/clis/kuaishou/auth.js +1 -0
- package/clis/kuaishou/publish.js +53 -0
- package/clis/lesswrong/_helpers.js +9 -0
- package/clis/lesswrong/comments.js +9 -0
- package/clis/lesswrong/curated.js +5 -0
- package/clis/lesswrong/frontpage.js +5 -0
- package/clis/lesswrong/new.js +5 -0
- package/clis/lesswrong/read.js +5 -0
- package/clis/lesswrong/sequences.js +5 -0
- package/clis/lesswrong/shortform.js +5 -0
- package/clis/lesswrong/tag.js +5 -0
- package/clis/lesswrong/tags.js +5 -0
- package/clis/lesswrong/top-month.js +5 -0
- package/clis/lesswrong/top-week.js +5 -0
- package/clis/lesswrong/top-year.js +5 -0
- package/clis/lesswrong/top.js +5 -0
- package/clis/lesswrong/user-posts.js +5 -0
- package/clis/lesswrong/user.js +5 -0
- package/clis/lichess/top.js +1 -0
- package/clis/lichess/user.js +1 -0
- package/clis/lichess/utils.js +1 -0
- package/clis/linkedin/auth.js +27 -0
- package/clis/linkedin/comment.js +1 -0
- package/clis/linkedin/connect.js +244 -0
- package/clis/linkedin/create.js +113 -0
- package/clis/linkedin/follow.js +1 -0
- package/clis/linkedin/inbox.js +1 -0
- package/clis/linkedin/job-detail.js +40 -0
- package/clis/linkedin/jobs-preferences.js +34 -0
- package/clis/linkedin/like.js +1 -0
- package/clis/linkedin/notifications.js +1 -0
- package/clis/linkedin/people-search.js +1 -0
- package/clis/linkedin/post-analytics.js +1 -0
- package/clis/linkedin/post-comments.js +1 -0
- package/clis/linkedin/post-detail.js +1 -0
- package/clis/linkedin/posts-core.js +138 -0
- package/clis/linkedin/posts.js +1 -0
- package/clis/linkedin/profile-analytics.js +1 -0
- package/clis/linkedin/profile-api.js +218 -0
- package/clis/linkedin/profile-experience.js +1 -0
- package/clis/linkedin/profile-projects.js +1 -0
- package/clis/linkedin/profile-read.js +3 -0
- package/clis/linkedin/reply.js +1 -0
- package/clis/linkedin/repost.js +1 -0
- package/clis/linkedin/safe-send.js +155 -0
- package/clis/linkedin/salesnav-inbox.js +21 -0
- package/clis/linkedin/salesnav-message.js +33 -0
- package/clis/linkedin/salesnav-search.js +15 -0
- package/clis/linkedin/salesnav-thread.js +1 -0
- package/clis/linkedin/search-api.js +42 -0
- package/clis/linkedin/search.js +50 -0
- package/clis/linkedin/sent-invitations.js +46 -0
- package/clis/linkedin/services-read.js +57 -0
- package/clis/linkedin/shared.js +10 -0
- package/clis/linkedin/social-api.js +260 -0
- package/clis/linkedin/thread-snapshot.js +81 -0
- package/clis/linkedin/timeline.js +37 -0
- package/clis/linkedin-learning/auth.js +27 -0
- package/clis/linkedin-learning/course.js +17 -0
- package/clis/linkedin-learning/search.js +17 -0
- package/clis/linkedin-learning/trending.js +17 -0
- package/clis/linux-do/auth.js +20 -0
- package/clis/linux-do/categories.js +1 -0
- package/clis/linux-do/feed.js +19 -0
- package/clis/linux-do/search.js +1 -0
- package/clis/linux-do/tags.js +1 -0
- package/clis/linux-do/topic-content.js +28 -0
- package/clis/linux-do/topic.js +1 -0
- package/clis/linux-do/user-posts.js +1 -0
- package/clis/linux-do/user-topics.js +1 -0
- package/clis/lobsters/active.js +1 -0
- package/clis/lobsters/domain.js +1 -0
- package/clis/lobsters/hot.js +1 -0
- package/clis/lobsters/newest.js +1 -0
- package/clis/lobsters/read.js +11 -0
- package/clis/lobsters/tag.js +1 -0
- package/clis/maimai/auth.js +19 -0
- package/clis/maimai/search-talents.js +37 -0
- package/clis/manus/_utils.js +28 -0
- package/clis/manus/auth.js +20 -0
- package/clis/manus/connectors.js +4 -0
- package/clis/manus/credits.js +4 -0
- package/clis/manus/list.js +7 -0
- package/clis/manus/read.js +7 -0
- package/clis/manus/skills.js +4 -0
- package/clis/manus/status.js +8 -0
- package/clis/mastodon/post.js +1 -0
- package/clis/mastodon/shared.js +48 -0
- package/clis/mastodon/whoami.js +1 -0
- package/clis/maven/artifact.js +1 -0
- package/clis/maven/search.js +1 -0
- package/clis/maven/utils.js +1 -0
- package/clis/mdn/search.js +1 -0
- package/clis/medium/article.js +12 -0
- package/clis/medium/feed.js +1 -0
- package/clis/medium/login.js +1 -0
- package/clis/medium/search.js +1 -0
- package/clis/medium/stats.js +56 -0
- package/clis/medium/tag.js +1 -0
- package/clis/medium/user.js +1 -0
- package/clis/medium/utils.js +62 -0
- package/clis/medium/whoami.js +1 -0
- package/clis/mubu/doc.js +1 -0
- package/clis/mubu/docs.js +1 -0
- package/clis/mubu/notes.js +1 -0
- package/clis/mubu/recent.js +1 -0
- package/clis/mubu/search.js +1 -0
- package/clis/mubu/utils.js +31 -0
- package/clis/note/auth.js +12 -0
- package/clis/note/note-utils.js +2 -0
- package/clis/note/publish.js +17 -0
- package/clis/notebooklm/add-source.js +46 -0
- package/clis/notebooklm/auth.js +21 -0
- package/clis/notebooklm/create.js +1 -0
- package/clis/notebooklm/current.js +1 -0
- package/clis/notebooklm/generate-audio.js +1 -0
- package/clis/notebooklm/generate-slides.js +1 -0
- package/clis/notebooklm/get.js +1 -0
- package/clis/notebooklm/history.js +1 -0
- package/clis/notebooklm/list.js +1 -0
- package/clis/notebooklm/note-list.js +1 -0
- package/clis/notebooklm/notes-get.js +1 -0
- package/clis/notebooklm/open.js +1 -0
- package/clis/notebooklm/rpc.js +36 -0
- package/clis/notebooklm/shared.js +1 -0
- package/clis/notebooklm/source-fulltext.js +1 -0
- package/clis/notebooklm/source-get.js +1 -0
- package/clis/notebooklm/source-guide.js +1 -0
- package/clis/notebooklm/source-list.js +1 -0
- package/clis/notebooklm/status.js +1 -0
- package/clis/notebooklm/summary.js +1 -0
- package/clis/notebooklm/utils.js +172 -0
- package/clis/notebooklm/write-note.js +1 -0
- package/clis/nowcoder/auth.js +24 -0
- package/clis/nowcoder/comment.js +1 -0
- package/clis/nowcoder/comments.js +1 -0
- package/clis/nowcoder/companies.js +1 -0
- package/clis/nowcoder/creators.js +1 -0
- package/clis/nowcoder/delete.js +1 -0
- package/clis/nowcoder/detail.js +46 -0
- package/clis/nowcoder/dm-list.js +1 -0
- package/clis/nowcoder/dm-read.js +1 -0
- package/clis/nowcoder/dm-send.js +1 -0
- package/clis/nowcoder/drafts.js +1 -0
- package/clis/nowcoder/experience.js +20 -0
- package/clis/nowcoder/hot.js +1 -0
- package/clis/nowcoder/inbox.js +1 -0
- package/clis/nowcoder/jobs.js +1 -0
- package/clis/nowcoder/like.js +1 -0
- package/clis/nowcoder/my.js +1 -0
- package/clis/nowcoder/notifications.js +16 -0
- package/clis/nowcoder/papers.js +22 -0
- package/clis/nowcoder/post.js +1 -0
- package/clis/nowcoder/practice.js +21 -0
- package/clis/nowcoder/recommend.js +1 -0
- package/clis/nowcoder/referral.js +21 -0
- package/clis/nowcoder/salary.js +22 -0
- package/clis/nowcoder/search.js +31 -0
- package/clis/nowcoder/suggest.js +17 -0
- package/clis/nowcoder/topics.js +1 -0
- package/clis/nowcoder/trending.js +1 -0
- package/clis/nowcoder/utils.js +68 -0
- package/clis/npm/downloads.js +1 -0
- package/clis/npm/package.js +1 -0
- package/clis/npm/search.js +1 -0
- package/clis/npm/utils.js +1 -0
- package/clis/nuget/package.js +1 -0
- package/clis/nuget/search.js +1 -0
- package/clis/nuget/utils.js +1 -0
- package/clis/nvd/cve.js +1 -0
- package/clis/oeis/search.js +1 -0
- package/clis/oeis/sequence.js +1 -0
- package/clis/oeis/utils.js +1 -0
- package/clis/ones/common.js +23 -0
- package/clis/ones/enrich-tasks.js +1 -0
- package/clis/ones/login.js +2 -0
- package/clis/ones/logout.js +1 -0
- package/clis/ones/me.js +1 -0
- package/clis/ones/my-tasks.js +1 -0
- package/clis/ones/resolve-labels.js +1 -0
- package/clis/ones/task-helpers.js +1 -0
- package/clis/ones/task.js +1 -0
- package/clis/ones/tasks.js +1 -0
- package/clis/ones/token-info.js +1 -0
- package/clis/ones/worklog.js +14 -0
- package/clis/openalex/search.js +1 -0
- package/clis/openalex/utils.js +1 -0
- package/clis/openalex/work.js +1 -0
- package/clis/openfda/drug-label.js +1 -0
- package/clis/openfda/food-recall.js +1 -0
- package/clis/openfda/utils.js +1 -0
- package/clis/openreview/author.js +1 -0
- package/clis/openreview/paper.js +1 -0
- package/clis/openreview/reviews.js +4 -0
- package/clis/openreview/search.js +1 -0
- package/clis/openreview/utils.js +1 -0
- package/clis/openreview/venue.js +1 -0
- package/clis/oschina/article.js +1 -0
- package/clis/oschina/catalogs.js +1 -0
- package/clis/oschina/login.js +1 -0
- package/clis/oschina/stats.js +54 -0
- package/clis/oschina/whoami.js +1 -0
- package/clis/osv/query.js +1 -0
- package/clis/osv/utils.js +1 -0
- package/clis/osv/vulnerability.js +1 -0
- package/clis/packagist/package.js +1 -0
- package/clis/packagist/search.js +1 -0
- package/clis/packagist/utils.js +1 -0
- package/clis/paperreview/feedback.js +1 -0
- package/clis/paperreview/review.js +1 -0
- package/clis/paperreview/submit.js +1 -0
- package/clis/paperreview/utils.js +1 -0
- package/clis/pinterest/api.js +1 -0
- package/clis/pinterest/auth.js +1 -0
- package/clis/pinterest/boards.js +1 -0
- package/clis/pinterest/client.js +20 -0
- package/clis/pinterest/publish.js +13 -0
- package/clis/pixiv/auth.js +17 -0
- package/clis/pixiv/detail.js +1 -0
- package/clis/pixiv/download.js +1 -0
- package/clis/pixiv/illusts.js +1 -0
- package/clis/pixiv/ranking.js +26 -0
- package/clis/pixiv/search.js +1 -0
- package/clis/pixiv/user.js +1 -0
- package/clis/pixiv/utils.js +18 -0
- package/clis/powerchina/auth.js +17 -0
- package/clis/powerchina/search.js +1 -0
- package/clis/producthunt/browse.js +54 -0
- package/clis/producthunt/hot.js +64 -0
- package/clis/producthunt/posts.js +1 -0
- package/clis/producthunt/today.js +1 -0
- package/clis/producthunt/utils.js +1 -0
- package/clis/pubmed/article.js +1 -0
- package/clis/pubmed/author.js +1 -0
- package/clis/pubmed/citations.js +1 -0
- package/clis/pubmed/clinical-trial.js +1 -0
- package/clis/pubmed/journal.js +1 -0
- package/clis/pubmed/mesh.js +1 -0
- package/clis/pubmed/related.js +1 -0
- package/clis/pubmed/review.js +1 -0
- package/clis/pubmed/search.js +1 -0
- package/clis/pubmed/utils.js +1 -0
- package/clis/pypi/downloads.js +1 -0
- package/clis/pypi/package.js +1 -0
- package/clis/pypi/utils.js +1 -0
- package/clis/qiita/auth.js +1 -0
- package/clis/qiita/gql.js +32 -0
- package/clis/qiita/publish.js +7 -0
- package/clis/qiita/stats.js +37 -0
- package/clis/qoder/_utils.js +113 -0
- package/clis/qoder/composer.js +1 -0
- package/clis/qoder/history.js +25 -0
- package/clis/qoder/quest.js +1 -0
- package/clis/qoder/read.js +1 -0
- package/clis/qoder/status.js +1 -0
- package/clis/qoder/ui.js +59 -0
- package/clis/quark/auth.js +16 -0
- package/clis/quark/ls.js +1 -0
- package/clis/quark/mkdir.js +1 -0
- package/clis/quark/mv.js +1 -0
- package/clis/quark/rename.js +1 -0
- package/clis/quark/rm.js +1 -0
- package/clis/quark/save.js +1 -0
- package/clis/quark/share-tree.js +1 -0
- package/clis/quark/utils.js +13 -0
- package/clis/quora/create-answer.js +22 -0
- package/clis/quora/create-question.js +24 -0
- package/clis/quora/shared.js +43 -0
- package/clis/quora/whoami.js +1 -0
- package/clis/qwen/ask.js +1 -0
- package/clis/qwen/auth.js +17 -0
- package/clis/qwen/detail.js +1 -0
- package/clis/qwen/history.js +1 -0
- package/clis/qwen/image.js +31 -0
- package/clis/qwen/new.js +1 -0
- package/clis/qwen/read.js +1 -0
- package/clis/qwen/send.js +1 -0
- package/clis/qwen/status.js +1 -0
- package/clis/qwen/utils.js +185 -0
- package/clis/reddit/auth.js +17 -0
- package/clis/reddit/comment.js +36 -0
- package/clis/reddit/frontpage.js +40 -0
- package/clis/reddit/home.js +32 -0
- package/clis/reddit/hot.js +46 -0
- package/clis/reddit/popular.js +46 -0
- package/clis/reddit/read.js +398 -0
- package/clis/reddit/reply.js +56 -0
- package/clis/reddit/save.js +30 -0
- package/clis/reddit/saved.js +24 -0
- package/clis/reddit/search.js +51 -0
- package/clis/reddit/submit.js +42 -0
- package/clis/reddit/subreddit-info.js +29 -0
- package/clis/reddit/subreddit.js +52 -0
- package/clis/reddit/subscribe.js +29 -0
- package/clis/reddit/subscribed.js +68 -0
- package/clis/reddit/upvote.js +43 -0
- package/clis/reddit/upvoted.js +24 -0
- package/clis/reddit/user-comments.js +20 -0
- package/clis/reddit/user-posts.js +17 -0
- package/clis/reddit/user.js +20 -0
- package/clis/reddit/whoami.js +19 -0
- package/clis/rednote/auth.js +19 -0
- package/clis/rednote/comments.js +1 -0
- package/clis/rednote/download.js +1 -0
- package/clis/rednote/feed.js +1 -0
- package/clis/rednote/note.js +1 -0
- package/clis/rednote/notifications.js +67 -0
- package/clis/rednote/search.js +32 -0
- package/clis/rednote/user.js +1 -0
- package/clis/rest-countries/country.js +1 -0
- package/clis/rest-countries/region.js +1 -0
- package/clis/rest-countries/utils.js +1 -0
- package/clis/reuters/article-detail.js +1 -0
- package/clis/reuters/auth.js +39 -0
- package/clis/reuters/search.js +1 -0
- package/clis/reuters/utils.js +50 -0
- package/clis/rfc/rfc.js +1 -0
- package/clis/rfc/utils.js +1 -0
- package/clis/rubygems/gem.js +1 -0
- package/clis/rubygems/search.js +1 -0
- package/clis/rubygems/utils.js +1 -0
- package/clis/segmentfault/_signed-request.js +43 -0
- package/clis/segmentfault/article.js +3 -0
- package/clis/segmentfault/channels.js +1 -0
- package/clis/segmentfault/login.js +1 -0
- package/clis/segmentfault/stats.js +82 -0
- package/clis/segmentfault/tags.js +1 -0
- package/clis/segmentfault/whoami.js +1 -0
- package/clis/semanticscholar/citations.js +1 -0
- package/clis/semanticscholar/paper.js +1 -0
- package/clis/semanticscholar/recommendations.js +1 -0
- package/clis/semanticscholar/search.js +1 -0
- package/clis/semanticscholar/utils.js +1 -0
- package/clis/sinablog/article.js +1 -0
- package/clis/sinablog/hot.js +1 -0
- package/clis/sinablog/search.js +1 -0
- package/clis/sinablog/user.js +1 -0
- package/clis/sinablog/utils.js +153 -0
- package/clis/sinafinance/news.js +1 -0
- package/clis/sinafinance/rolling-news.js +20 -0
- package/clis/sinafinance/stock-rank.js +41 -0
- package/clis/sinafinance/stock.js +1 -0
- package/clis/slock/attachment-download.js +1 -0
- package/clis/slock/attachment-upload.js +34 -0
- package/clis/slock/attachment-url.js +1 -0
- package/clis/slock/auth-verify.js +1 -0
- package/clis/slock/bookmark-add.js +11 -0
- package/clis/slock/bookmark-list.js +10 -0
- package/clis/slock/bookmark-remove.js +7 -0
- package/clis/slock/channel-action.js +1 -0
- package/clis/slock/channel-archive.js +1 -0
- package/clis/slock/channel-create.js +1 -0
- package/clis/slock/channel-files.js +1 -0
- package/clis/slock/channel-info.js +1 -0
- package/clis/slock/channel-join.js +1 -0
- package/clis/slock/channel-leave.js +1 -0
- package/clis/slock/channel-list.js +1 -0
- package/clis/slock/channel-mark.js +1 -0
- package/clis/slock/channel-members.js +1 -0
- package/clis/slock/channel-unarchive.js +1 -0
- package/clis/slock/dm-list.js +1 -0
- package/clis/slock/errors.js +1 -0
- package/clis/slock/in-page.js +113 -0
- package/clis/slock/inbox-done.js +9 -0
- package/clis/slock/inbox-read-all.js +1 -0
- package/clis/slock/inbox.js +1 -0
- package/clis/slock/login.js +1 -0
- package/clis/slock/message-read.js +61 -0
- package/clis/slock/message-search.js +24 -0
- package/clis/slock/message-send.js +55 -0
- package/clis/slock/reaction-add.js +1 -0
- package/clis/slock/reaction-remove.js +1 -0
- package/clis/slock/resolve.js +1 -0
- package/clis/slock/server-list.js +9 -0
- package/clis/slock/server-use.js +18 -0
- package/clis/slock/shared.js +1 -0
- package/clis/slock/task-claim.js +14 -0
- package/clis/slock/task-convert.js +35 -0
- package/clis/slock/task-create.js +24 -0
- package/clis/slock/task-delete.js +9 -0
- package/clis/slock/task-get.js +11 -0
- package/clis/slock/task-list-server.js +12 -0
- package/clis/slock/task-list.js +14 -0
- package/clis/slock/task-status.js +19 -0
- package/clis/slock/task-unclaim.js +13 -0
- package/clis/slock/thread-done.js +1 -0
- package/clis/slock/thread-follow.js +1 -0
- package/clis/slock/thread-list.js +1 -0
- package/clis/slock/thread-state.js +1 -0
- package/clis/slock/thread-undone.js +1 -0
- package/clis/slock/thread-unfollow.js +1 -0
- package/clis/slock/unread-summary.js +18 -0
- package/clis/slock/whoami.js +1 -0
- package/clis/smzdm/search.js +71 -0
- package/clis/sohu/article.js +1 -0
- package/clis/sohu/attributes.js +1 -0
- package/clis/sohu/categories.js +1 -0
- package/clis/sohu/channels.js +1 -0
- package/clis/sohu/columns.js +1 -0
- package/clis/sohu/login.js +1 -0
- package/clis/sohu/mpbp.js +1 -0
- package/clis/sohu/stats.js +95 -0
- package/clis/sohu/topics.js +1 -0
- package/clis/sohu/whoami.js +1 -0
- package/clis/spotify/spotify.js +1 -0
- package/clis/spotify/utils.js +8 -0
- package/clis/stackoverflow/bounties.js +1 -0
- package/clis/stackoverflow/hot.js +1 -0
- package/clis/stackoverflow/read.js +13 -0
- package/clis/stackoverflow/related.js +1 -0
- package/clis/stackoverflow/search.js +1 -0
- package/clis/stackoverflow/tag.js +1 -0
- package/clis/stackoverflow/unanswered.js +1 -0
- package/clis/stackoverflow/user.js +1 -0
- package/clis/stackoverflow/utils.js +1 -0
- package/clis/steam/app.js +1 -0
- package/clis/steam/search.js +1 -0
- package/clis/steam/top-sellers.js +1 -0
- package/clis/steam/utils.js +1 -0
- package/clis/substack/auth.js +11 -0
- package/clis/substack/feed.js +1 -0
- package/clis/substack/post-utils.js +2 -0
- package/clis/substack/publication.js +1 -0
- package/clis/substack/publish.js +10 -0
- package/clis/substack/search.js +1 -0
- package/clis/substack/utils.js +108 -0
- package/clis/suno/auth.js +21 -0
- package/clis/suno/download.js +17 -0
- package/clis/suno/generate.js +4 -0
- package/clis/suno/list.js +14 -0
- package/clis/suno/status.js +1 -0
- package/clis/suno/utils.js +102 -0
- package/clis/taobao/add-cart.js +93 -0
- package/clis/taobao/auth.js +8 -0
- package/clis/taobao/cart.js +68 -0
- package/clis/taobao/detail.js +48 -0
- package/clis/taobao/reviews.js +52 -0
- package/clis/taobao/search.js +64 -0
- package/clis/tdx/hot-rank.js +25 -0
- package/clis/telegram/send.js +18 -0
- package/clis/telegram/shared.js +21 -0
- package/clis/telegram/whoami.js +1 -0
- package/clis/test-utils.js +1 -0
- package/clis/threads/post.js +152 -0
- package/clis/threads/shared.js +27 -0
- package/clis/threads/whoami.js +1 -0
- package/clis/ths/hot-rank.js +27 -0
- package/clis/tieba/hot.js +16 -0
- package/clis/tieba/posts.js +1 -0
- package/clis/tieba/read.js +84 -0
- package/clis/tieba/search.js +54 -0
- package/clis/tieba/utils.js +1 -0
- package/clis/tiktok/auth.js +30 -0
- package/clis/tiktok/comment.js +69 -0
- package/clis/tiktok/creator-videos.js +45 -0
- package/clis/tiktok/explore.js +76 -0
- package/clis/tiktok/follow.js +49 -0
- package/clis/tiktok/following.js +103 -0
- package/clis/tiktok/friends.js +79 -0
- package/clis/tiktok/like.js +19 -0
- package/clis/tiktok/live.js +79 -0
- package/clis/tiktok/notifications.js +77 -0
- package/clis/tiktok/profile.js +26 -0
- package/clis/tiktok/publish.js +82 -0
- package/clis/tiktok/save.js +15 -0
- package/clis/tiktok/search.js +24 -0
- package/clis/tiktok/unfollow.js +59 -0
- package/clis/tiktok/unlike.js +19 -0
- package/clis/tiktok/unsave.js +17 -0
- package/clis/tiktok/user.js +143 -0
- package/clis/tiktok/utils.js +272 -0
- package/clis/toutiao/article.js +1 -0
- package/clis/toutiao/articles.js +6 -0
- package/clis/toutiao/auth.js +50 -0
- package/clis/toutiao/hot.js +1 -0
- package/clis/toutiao/utils.js +2 -0
- package/clis/trae-cn/activity.js +1 -0
- package/clis/trae-cn/approve.js +1 -0
- package/clis/trae-cn/ask.js +1 -0
- package/clis/trae-cn/dump.js +1 -0
- package/clis/trae-cn/export.js +3 -0
- package/clis/trae-cn/model.js +1 -0
- package/clis/trae-cn/new.js +1 -0
- package/clis/trae-cn/read.js +1 -0
- package/clis/trae-cn/screenshot.js +1 -0
- package/clis/trae-cn/select-model.js +1 -0
- package/clis/trae-cn/send.js +1 -0
- package/clis/trae-cn/setup.js +1 -0
- package/clis/trae-cn/status.js +1 -0
- package/clis/trae-cn/targets.js +1 -0
- package/clis/trae-cn/utils.js +456 -0
- package/clis/trae-cn/watch.js +3 -0
- package/clis/trae-solo/_actions.js +41 -0
- package/clis/trae-solo/_fs.js +6 -0
- package/clis/trae-solo/_state.js +2 -0
- package/clis/trae-solo/automation.js +43 -0
- package/clis/trae-solo/history.js +15 -0
- package/clis/trae-solo/mode.js +31 -0
- package/clis/trae-solo/model.js +50 -0
- package/clis/trae-solo/renderer-storage.js +11 -0
- package/clis/trae-solo/settings.js +1 -0
- package/clis/trae-solo/skill-fs.js +1 -0
- package/clis/trae-solo/skill.js +81 -0
- package/clis/trae-solo/state-fs.js +2 -0
- package/clis/trae-solo/status.js +1 -0
- package/clis/trae-solo/task-fs.js +5 -0
- package/clis/trae-solo/user-rules.js +1 -0
- package/clis/trae-solo/workspaces-fs.js +1 -0
- package/clis/tumblr/auth.js +24 -0
- package/clis/tumblr/publish.js +14 -0
- package/clis/tvmaze/search.js +1 -0
- package/clis/tvmaze/show.js +1 -0
- package/clis/tvmaze/utils.js +1 -0
- package/clis/twitter/accept.js +116 -0
- package/clis/twitter/article.js +116 -0
- package/clis/twitter/auth.js +4 -0
- package/clis/twitter/block.js +62 -0
- package/clis/twitter/bookmark-folder.js +4 -0
- package/clis/twitter/bookmark-folders.js +4 -0
- package/clis/twitter/bookmark.js +44 -0
- package/clis/twitter/bookmarks.js +27 -0
- package/clis/twitter/delete.js +36 -0
- package/clis/twitter/device-follow.js +13 -0
- package/clis/twitter/dm-list.js +1 -0
- package/clis/twitter/dm-read.js +1 -0
- package/clis/twitter/dm-send.js +13 -0
- package/clis/twitter/dm-shared.js +6 -0
- package/clis/twitter/download.js +38 -0
- package/clis/twitter/follow-batch.js +43 -0
- package/clis/twitter/follow.js +39 -0
- package/clis/twitter/followers.js +59 -0
- package/clis/twitter/following.js +4 -0
- package/clis/twitter/hide-reply.js +57 -0
- package/clis/twitter/like.js +48 -0
- package/clis/twitter/likes.js +14 -0
- package/clis/twitter/list-add-batch.js +1 -0
- package/clis/twitter/list-add-core.js +35 -0
- package/clis/twitter/list-add.js +1 -0
- package/clis/twitter/list-batch-utils.js +1 -0
- package/clis/twitter/list-create.js +12 -0
- package/clis/twitter/list-delete.js +36 -0
- package/clis/twitter/list-remove-batch.js +1 -0
- package/clis/twitter/list-remove-core.js +127 -0
- package/clis/twitter/list-remove.js +1 -0
- package/clis/twitter/list-tweets.js +27 -0
- package/clis/twitter/lists.js +27 -0
- package/clis/twitter/notifications.js +4 -0
- package/clis/twitter/post.js +158 -0
- package/clis/twitter/profile.js +66 -0
- package/clis/twitter/quote.js +123 -0
- package/clis/twitter/reply-dm.js +112 -0
- package/clis/twitter/reply.js +97 -0
- package/clis/twitter/retweet.js +62 -0
- package/clis/twitter/schedule.js +96 -0
- package/clis/twitter/scheduled-delete.js +60 -0
- package/clis/twitter/scheduled-list.js +15 -0
- package/clis/twitter/scheduled-utils.js +18 -0
- package/clis/twitter/search.js +12 -0
- package/clis/twitter/shared.js +76 -0
- package/clis/twitter/thread.js +4 -0
- package/clis/twitter/timeline.js +4 -0
- package/clis/twitter/trending.js +18 -0
- package/clis/twitter/tweets.js +12 -0
- package/clis/twitter/unblock.js +45 -0
- package/clis/twitter/unbookmark.js +41 -0
- package/clis/twitter/unfollow.js +45 -0
- package/clis/twitter/unlike.js +48 -0
- package/clis/twitter/unretweet.js +62 -0
- package/clis/twitter/utils.js +55 -0
- package/clis/uisdc/news.js +25 -0
- package/clis/uiverse/_shared.js +257 -0
- package/clis/uiverse/code.js +1 -0
- package/clis/uiverse/preview.js +1 -0
- package/clis/upwork/auth.js +19 -0
- package/clis/upwork/detail.js +22 -0
- package/clis/upwork/feed.js +21 -0
- package/clis/upwork/search.js +21 -0
- package/clis/upwork/utils.js +1 -0
- package/clis/v2ex/auth.js +10 -0
- package/clis/v2ex/daily.js +41 -0
- package/clis/v2ex/hot.js +1 -0
- package/clis/v2ex/latest.js +1 -0
- package/clis/v2ex/me.js +58 -0
- package/clis/v2ex/member.js +1 -0
- package/clis/v2ex/node.js +1 -0
- package/clis/v2ex/nodes.js +1 -0
- package/clis/v2ex/notifications.js +40 -0
- package/clis/v2ex/replies.js +1 -0
- package/clis/v2ex/topic.js +1 -0
- package/clis/v2ex/user.js +1 -0
- package/clis/vk/post.js +1 -0
- package/clis/vk/shared.js +8 -0
- package/clis/vk/whoami.js +1 -0
- package/clis/wanfang/search.js +42 -0
- package/clis/web/read.js +260 -0
- package/clis/wechat-channels/auth.js +31 -0
- package/clis/wechat-channels/publish.js +298 -0
- package/clis/weibo/article.js +1 -0
- package/clis/weibo/auth.js +17 -0
- package/clis/weibo/comments.js +28 -0
- package/clis/weibo/delete.js +84 -0
- package/clis/weibo/favorites.js +27 -0
- package/clis/weibo/feed.js +33 -0
- package/clis/weibo/hot.js +17 -0
- package/clis/weibo/me.js +51 -0
- package/clis/weibo/post.js +46 -0
- package/clis/weibo/publish.js +98 -0
- package/clis/weibo/search.js +47 -0
- package/clis/weibo/user-posts.js +92 -0
- package/clis/weibo/user.js +37 -0
- package/clis/weibo/utils.js +16 -0
- package/clis/weixin/article.js +1 -0
- package/clis/weixin/create-draft.js +152 -0
- package/clis/weixin/download.js +100 -0
- package/clis/weixin/drafts.js +27 -0
- package/clis/weixin/login.js +1 -0
- package/clis/weixin/search.js +44 -0
- package/clis/weixin/stats.js +43 -0
- package/clis/weixin/whoami.js +1 -0
- package/clis/weread/ai-outline.js +2 -0
- package/clis/weread/auth.js +24 -0
- package/clis/weread/book-search.js +2 -0
- package/clis/weread/book.js +3 -0
- package/clis/weread/highlights.js +1 -0
- package/clis/weread/notebooks.js +1 -0
- package/clis/weread/notes.js +1 -0
- package/clis/weread/ranking.js +1 -0
- package/clis/weread/search.js +1 -0
- package/clis/weread/shelf.js +1 -0
- package/clis/weread/utils.js +67 -0
- package/clis/weread-official/book.js +1 -0
- package/clis/weread-official/discover.js +1 -0
- package/clis/weread-official/list-apis.js +1 -0
- package/clis/weread-official/notes.js +1 -0
- package/clis/weread-official/readdata.js +1 -0
- package/clis/weread-official/review.js +1 -0
- package/clis/weread-official/search.js +1 -0
- package/clis/weread-official/shelf.js +1 -0
- package/clis/weread-official/utils.js +1 -0
- package/clis/wikidata/entity.js +1 -0
- package/clis/wikidata/search.js +1 -0
- package/clis/wikidata/utils.js +1 -0
- package/clis/wikipedia/page.js +3 -0
- package/clis/wikipedia/random.js +1 -0
- package/clis/wikipedia/search.js +1 -0
- package/clis/wikipedia/summary.js +1 -0
- package/clis/wikipedia/trending.js +1 -0
- package/clis/wikipedia/utils.js +1 -0
- package/clis/wordpress/login.js +1 -0
- package/clis/wordpress/publish.js +1 -0
- package/clis/wordpress/shared.js +54 -0
- package/clis/wordpress/whoami.js +1 -0
- package/clis/woshipm/article.js +1 -0
- package/clis/woshipm/login.js +1 -0
- package/clis/woshipm/stats.js +52 -0
- package/clis/woshipm/whoami.js +1 -0
- package/clis/wttr/current.js +1 -0
- package/clis/wttr/forecast.js +1 -0
- package/clis/wttr/utils.js +1 -0
- package/clis/xianyu/auth.js +11 -0
- package/clis/xianyu/chat.js +1 -0
- package/clis/xianyu/im.js +240 -0
- package/clis/xianyu/inbox.js +1 -0
- package/clis/xianyu/item.js +97 -0
- package/clis/xianyu/messages.js +1 -0
- package/clis/xianyu/publish.js +245 -0
- package/clis/xianyu/reply.js +1 -0
- package/clis/xianyu/search.js +141 -0
- package/clis/xianyu/utils.js +1 -0
- package/clis/xiaoe/auth.js +10 -0
- package/clis/xiaoe/catalog.js +134 -0
- package/clis/xiaoe/content.js +16 -0
- package/clis/xiaoe/courses.js +43 -0
- package/clis/xiaoe/detail.js +19 -0
- package/clis/xiaoe/play-url.js +97 -0
- package/clis/xiaohongshu/ask.js +130 -0
- package/clis/xiaohongshu/auth.js +13 -0
- package/clis/xiaohongshu/collection-helpers.js +64 -0
- package/clis/xiaohongshu/comments.js +89 -0
- package/clis/xiaohongshu/creator-note-detail.js +80 -0
- package/clis/xiaohongshu/creator-notes-summary.js +1 -0
- package/clis/xiaohongshu/creator-notes.js +107 -0
- package/clis/xiaohongshu/creator-profile.js +13 -0
- package/clis/xiaohongshu/creator-stats.js +13 -0
- package/clis/xiaohongshu/delete-note.js +69 -0
- package/clis/xiaohongshu/download.js +200 -0
- package/clis/xiaohongshu/draft-clear.js +44 -0
- package/clis/xiaohongshu/draft-delete.js +37 -0
- package/clis/xiaohongshu/draft-open.js +1 -0
- package/clis/xiaohongshu/draft-utils.js +36 -0
- package/clis/xiaohongshu/drafts.js +1 -0
- package/clis/xiaohongshu/feed.js +38 -0
- package/clis/xiaohongshu/follow.js +75 -0
- package/clis/xiaohongshu/liked.js +1 -0
- package/clis/xiaohongshu/note-helpers.js +1 -0
- package/clis/xiaohongshu/note.js +32 -0
- package/clis/xiaohongshu/notifications.js +1 -0
- package/clis/xiaohongshu/publish-video.js +87 -0
- package/clis/xiaohongshu/publish.js +637 -0
- package/clis/xiaohongshu/saved.js +1 -0
- package/clis/xiaohongshu/search.js +194 -0
- package/clis/xiaohongshu/unfollow.js +98 -0
- package/clis/xiaohongshu/user-helpers.js +1 -0
- package/clis/xiaohongshu/user.js +30 -0
- package/clis/xiaoyuzhou/auth.js +3 -0
- package/clis/xiaoyuzhou/download.js +1 -0
- package/clis/xiaoyuzhou/episode.js +1 -0
- package/clis/xiaoyuzhou/podcast-episodes.js +1 -0
- package/clis/xiaoyuzhou/podcast.js +1 -0
- package/clis/xiaoyuzhou/transcript.js +1 -0
- package/clis/xiaoyuzhou/utils.js +1 -0
- package/clis/xueqiu/article.js +4 -0
- package/clis/xueqiu/auth.js +27 -0
- package/clis/xueqiu/comments.js +38 -0
- package/clis/xueqiu/danjuan-utils.js +84 -0
- package/clis/xueqiu/earnings-date.js +1 -0
- package/clis/xueqiu/events.js +17 -0
- package/clis/xueqiu/feed.js +1 -0
- package/clis/xueqiu/fund-holdings.js +1 -0
- package/clis/xueqiu/fund-snapshot.js +1 -0
- package/clis/xueqiu/groups.js +1 -0
- package/clis/xueqiu/hashtags.js +26 -0
- package/clis/xueqiu/hot-stock.js +1 -0
- package/clis/xueqiu/hot.js +1 -0
- package/clis/xueqiu/kline.js +1 -0
- package/clis/xueqiu/search.js +1 -0
- package/clis/xueqiu/stock.js +1 -0
- package/clis/xueqiu/stocks.js +13 -0
- package/clis/xueqiu/users.js +12 -0
- package/clis/xueqiu/utils.js +9 -0
- package/clis/xueqiu/watchlist.js +1 -0
- package/clis/yahoo/search.js +21 -0
- package/clis/yahoo-finance/quote.js +50 -0
- package/clis/yollomi/background.js +1 -0
- package/clis/yollomi/edit.js +1 -0
- package/clis/yollomi/face-swap.js +1 -0
- package/clis/yollomi/generate.js +1 -0
- package/clis/yollomi/models.js +1 -0
- package/clis/yollomi/object-remover.js +1 -0
- package/clis/yollomi/remove-bg.js +1 -0
- package/clis/yollomi/restore.js +1 -0
- package/clis/yollomi/try-on.js +1 -0
- package/clis/yollomi/upload.js +17 -0
- package/clis/yollomi/upscale.js +1 -0
- package/clis/yollomi/utils.js +16 -0
- package/clis/yollomi/video.js +1 -0
- package/clis/youdao/note.js +113 -0
- package/clis/youtube/auth.js +20 -0
- package/clis/youtube/channel.js +118 -0
- package/clis/youtube/comments.js +64 -0
- package/clis/youtube/feed.js +89 -0
- package/clis/youtube/history.js +87 -0
- package/clis/youtube/like.js +33 -0
- package/clis/youtube/playlist.js +47 -0
- package/clis/youtube/publish.js +56 -0
- package/clis/youtube/search.js +39 -0
- package/clis/youtube/subscribe.js +42 -0
- package/clis/youtube/subscriptions.js +26 -0
- package/clis/youtube/transcript-group.js +2 -0
- package/clis/youtube/transcript.js +417 -0
- package/clis/youtube/unlike.js +33 -0
- package/clis/youtube/unsubscribe.js +42 -0
- package/clis/youtube/utils.js +34 -0
- package/clis/youtube/video.js +96 -0
- package/clis/youtube/watch-later.js +41 -0
- package/clis/yuanbao/ask.js +145 -0
- package/clis/yuanbao/auth.js +23 -0
- package/clis/yuanbao/detail.js +1 -0
- package/clis/yuanbao/history.js +1 -0
- package/clis/yuanbao/new.js +16 -0
- package/clis/yuanbao/read.js +1 -0
- package/clis/yuanbao/send.js +1 -0
- package/clis/yuanbao/shared.js +127 -0
- package/clis/yuanbao/status.js +1 -0
- package/clis/yuque/article.js +1 -0
- package/clis/yuque/whoami.js +1 -0
- package/clis/zhihu/answer-comments.js +11 -0
- package/clis/zhihu/answer-detail.js +11 -0
- package/clis/zhihu/answer.js +15 -0
- package/clis/zhihu/article-transform.js +1 -0
- package/clis/zhihu/article.js +7 -0
- package/clis/zhihu/auth.js +11 -0
- package/clis/zhihu/collection.js +7 -0
- package/clis/zhihu/collections.js +7 -0
- package/clis/zhihu/comment.js +17 -0
- package/clis/zhihu/download.js +39 -0
- package/clis/zhihu/favorite.js +39 -0
- package/clis/zhihu/follow.js +19 -0
- package/clis/zhihu/followers.js +1 -0
- package/clis/zhihu/following.js +1 -0
- package/clis/zhihu/hot.js +21 -0
- package/clis/zhihu/like.js +16 -0
- package/clis/zhihu/paginate.js +11 -0
- package/clis/zhihu/pin.js +24 -0
- package/clis/zhihu/pins.js +1 -0
- package/clis/zhihu/question.js +7 -0
- package/clis/zhihu/recommend.js +7 -0
- package/clis/zhihu/search.js +11 -0
- package/clis/zhihu/stats.js +41 -0
- package/clis/zhihu/target.js +1 -0
- package/clis/zhihu/text.js +6 -0
- package/clis/zhihu/user-answers.js +1 -0
- package/clis/zhihu/user-arg.js +1 -0
- package/clis/zhihu/user-articles.js +1 -0
- package/clis/zhihu/user.js +11 -0
- package/clis/zhihu/write-shared.js +71 -0
- package/clis/zlibrary/info.js +1 -0
- package/clis/zlibrary/search.js +1 -0
- package/clis/zlibrary/utils.js +48 -0
- package/clis/zsxq/auth.js +33 -0
- package/clis/zsxq/dynamics.js +1 -0
- package/clis/zsxq/groups.js +1 -0
- package/clis/zsxq/search.js +1 -0
- package/clis/zsxq/topic.js +1 -0
- package/clis/zsxq/topics.js +1 -0
- package/clis/zsxq/utils.js +72 -0
- package/dist/src/adapter-shadow.d.ts +11 -0
- package/dist/src/adapter-shadow.js +2 -0
- package/dist/src/adapter-shadow.test.d.ts +1 -0
- package/dist/src/adapter-source.d.ts +11 -0
- package/dist/src/adapter-source.js +1 -0
- package/dist/src/adapter-source.test.d.ts +1 -0
- package/dist/src/browser/analyze.d.ts +118 -0
- package/dist/src/browser/analyze.js +1 -0
- package/dist/src/browser/analyze.test.d.ts +1 -0
- package/dist/src/browser/article-extract.d.ts +57 -0
- package/dist/src/browser/article-extract.e2e.test.d.ts +1 -0
- package/dist/src/browser/article-extract.js +2 -0
- package/dist/src/browser/article-extract.test.d.ts +1 -0
- package/dist/src/browser/ax-snapshot.d.ts +37 -0
- package/dist/src/browser/ax-snapshot.js +2 -0
- package/dist/src/browser/ax-snapshot.test.d.ts +1 -0
- package/dist/src/browser/base-page.d.ts +151 -0
- package/dist/src/browser/base-page.js +225 -0
- package/dist/src/browser/base-page.test.d.ts +1 -0
- package/dist/src/browser/bridge-readiness.d.ts +14 -0
- package/dist/src/browser/bridge-readiness.js +1 -0
- package/dist/src/browser/bridge-readiness.test.d.ts +1 -0
- package/dist/src/browser/bridge.d.ts +26 -0
- package/dist/src/browser/bridge.js +1 -0
- package/dist/src/browser/cdp-click-fixture.test.d.ts +1 -0
- package/dist/src/browser/cdp.d.ts +51 -0
- package/dist/src/browser/cdp.js +1 -0
- package/dist/src/browser/cdp.test.d.ts +1 -0
- package/dist/src/browser/compound.d.ts +59 -0
- package/dist/src/browser/compound.js +82 -0
- package/dist/src/browser/compound.test.d.ts +1 -0
- package/dist/src/browser/config.d.ts +2 -0
- package/dist/src/browser/config.js +1 -0
- package/dist/src/browser/daemon-client.d.ts +79 -0
- package/dist/src/browser/daemon-client.js +1 -0
- package/dist/src/browser/daemon-client.test.d.ts +1 -0
- package/dist/src/browser/daemon-lifecycle.d.ts +37 -0
- package/dist/src/browser/daemon-lifecycle.js +12 -0
- package/dist/src/browser/daemon-transport.d.ts +55 -0
- package/dist/src/browser/daemon-transport.js +1 -0
- package/dist/src/browser/daemon-version.d.ts +4 -0
- package/dist/src/browser/daemon-version.js +2 -0
- package/dist/src/browser/dom-helpers.d.ts +41 -0
- package/dist/src/browser/dom-helpers.js +166 -0
- package/dist/src/browser/dom-helpers.test.d.ts +1 -0
- package/dist/src/browser/dom-snapshot.d.ts +93 -0
- package/dist/src/browser/dom-snapshot.js +809 -0
- package/dist/src/browser/dom-snapshot.test.d.ts +11 -0
- package/dist/src/browser/errors.d.ts +38 -0
- package/dist/src/browser/errors.js +5 -0
- package/dist/src/browser/errors.test.d.ts +1 -0
- package/dist/src/browser/extract.d.ts +69 -0
- package/dist/src/browser/extract.js +42 -0
- package/dist/src/browser/extract.test.d.ts +1 -0
- package/dist/src/browser/find.d.ts +84 -0
- package/dist/src/browser/find.js +328 -0
- package/dist/src/browser/find.test.d.ts +1 -0
- package/dist/src/browser/fingerprint.d.ts +44 -0
- package/dist/src/browser/fingerprint.js +82 -0
- package/dist/src/browser/html-tree.d.ts +75 -0
- package/dist/src/browser/html-tree.js +61 -0
- package/dist/src/browser/html-tree.test.d.ts +1 -0
- package/dist/src/browser/index.d.ts +14 -0
- package/dist/src/browser/index.js +1 -0
- package/dist/src/browser/managed-chrome.d.ts +89 -0
- package/dist/src/browser/managed-chrome.js +1 -0
- package/dist/src/browser/network-cache.d.ts +49 -0
- package/dist/src/browser/network-cache.js +1 -0
- package/dist/src/browser/network-cache.test.d.ts +1 -0
- package/dist/src/browser/network-key.d.ts +22 -0
- package/dist/src/browser/network-key.js +1 -0
- package/dist/src/browser/network-key.test.d.ts +1 -0
- package/dist/src/browser/page.d.ts +83 -0
- package/dist/src/browser/page.js +15 -0
- package/dist/src/browser/page.test.d.ts +1 -0
- package/dist/src/browser/profile.d.ts +96 -0
- package/dist/src/browser/profile.js +2 -0
- package/dist/src/browser/proxy-test.d.ts +28 -0
- package/dist/src/browser/proxy-test.js +12 -0
- package/dist/src/browser/shape-filter.d.ts +52 -0
- package/dist/src/browser/shape-filter.js +1 -0
- package/dist/src/browser/shape-filter.test.d.ts +1 -0
- package/dist/src/browser/shape.d.ts +23 -0
- package/dist/src/browser/shape.js +1 -0
- package/dist/src/browser/shape.test.d.ts +1 -0
- package/dist/src/browser/stealth.d.ts +18 -0
- package/dist/src/browser/stealth.js +391 -0
- package/dist/src/browser/stealth.test.d.ts +1 -0
- package/dist/src/browser/tabs.d.ts +13 -0
- package/dist/src/browser/tabs.js +2 -0
- package/dist/src/browser/target-errors.d.ts +39 -0
- package/dist/src/browser/target-errors.js +1 -0
- package/dist/src/browser/target-errors.test.d.ts +1 -0
- package/dist/src/browser/target-resolver.d.ts +158 -0
- package/dist/src/browser/target-resolver.js +423 -0
- package/dist/src/browser/target-resolver.test.d.ts +1 -0
- package/dist/src/browser/trace.d.ts +21 -0
- package/dist/src/browser/trace.js +2 -0
- package/dist/src/browser/utils.d.ts +20 -0
- package/dist/src/browser/utils.js +1 -0
- package/dist/src/browser/utils.test.d.ts +1 -0
- package/dist/src/browser/verify-fixture.d.ts +65 -0
- package/dist/src/browser/verify-fixture.js +2 -0
- package/dist/src/browser/verify-fixture.test.d.ts +1 -0
- package/dist/src/browser/visual-refs.d.ts +11 -0
- package/dist/src/browser/visual-refs.js +94 -0
- package/dist/src/browser-session-lock.d.ts +13 -0
- package/dist/src/browser-session-lock.js +1 -0
- package/dist/src/browser-session-lock.test.d.ts +1 -0
- package/dist/src/browser.test.d.ts +1 -0
- package/dist/src/build-manifest.d.ts +103 -0
- package/dist/src/build-manifest.js +16 -0
- package/dist/src/build-manifest.test.d.ts +1 -0
- package/dist/src/capabilityRouting.d.ts +19 -0
- package/dist/src/capabilityRouting.js +1 -0
- package/dist/src/capabilityRouting.test.d.ts +1 -0
- package/dist/src/cli-argv-preprocess.d.ts +63 -0
- package/dist/src/cli-argv-preprocess.js +1 -0
- package/dist/src/cli-argv-preprocess.test.d.ts +1 -0
- package/dist/src/cli.d.ts +79 -0
- package/dist/src/cli.js +132 -0
- package/dist/src/cli.test.d.ts +1 -0
- package/dist/src/commanderAdapter.d.ts +21 -0
- package/dist/src/commanderAdapter.js +3 -0
- package/dist/src/commanderAdapter.test.d.ts +1 -0
- package/dist/src/commands/auth.d.ts +40 -0
- package/dist/src/commands/auth.js +2 -0
- package/dist/src/commands/auth.test.d.ts +1 -0
- package/dist/src/commands/daemon.d.ts +25 -0
- package/dist/src/commands/daemon.js +1 -0
- package/dist/src/commands/daemon.test.d.ts +1 -0
- package/dist/src/completion-fast.d.ts +22 -0
- package/dist/src/completion-fast.js +1 -0
- package/dist/src/completion-shared.d.ts +13 -0
- package/dist/src/completion-shared.js +30 -0
- package/dist/src/completion.d.ts +21 -0
- package/dist/src/completion.js +1 -0
- package/dist/src/completion.test.d.ts +1 -0
- package/dist/src/constants.d.ts +22 -0
- package/dist/src/constants.js +1 -0
- package/dist/src/convention-audit.d.ts +50 -0
- package/dist/src/convention-audit.js +2 -0
- package/dist/src/convention-audit.test.d.ts +1 -0
- package/dist/src/daemon-utils.d.ts +18 -0
- package/dist/src/daemon-utils.js +1 -0
- package/dist/src/daemon.d.ts +22 -0
- package/dist/src/daemon.js +1 -0
- package/dist/src/daemon.test.d.ts +1 -0
- package/dist/src/discovery.d.ts +43 -0
- package/dist/src/discovery.js +2 -0
- package/dist/src/doctor.d.ts +38 -0
- package/dist/src/doctor.js +13 -0
- package/dist/src/doctor.test.d.ts +1 -0
- package/dist/src/download/article-download.d.ts +72 -0
- package/dist/src/download/article-download.js +21 -0
- package/dist/src/download/article-download.test.d.ts +1 -0
- package/dist/src/download/index.d.ts +71 -0
- package/dist/src/download/index.js +7 -0
- package/dist/src/download/index.test.d.ts +1 -0
- package/dist/src/download/media-download.d.ts +49 -0
- package/dist/src/download/media-download.js +1 -0
- package/dist/src/download/media-download.test.d.ts +1 -0
- package/dist/src/download/progress.d.ts +36 -0
- package/dist/src/download/progress.js +5 -0
- package/dist/src/download/progress.test.d.ts +1 -0
- package/dist/src/electron-apps.d.ts +31 -0
- package/dist/src/electron-apps.js +1 -0
- package/dist/src/electron-apps.test.d.ts +1 -0
- package/dist/src/engine.test.d.ts +1 -0
- package/dist/src/errors.d.ts +117 -0
- package/dist/src/errors.js +2 -0
- package/dist/src/errors.test.d.ts +1 -0
- package/dist/src/execution.d.ts +24 -0
- package/dist/src/execution.js +2 -0
- package/dist/src/execution.test.d.ts +1 -0
- package/dist/src/extension-manifest-regression.test.d.ts +1 -0
- package/dist/src/external-clis.yaml +109 -0
- package/dist/src/external.d.ts +49 -0
- package/dist/src/external.js +1 -0
- package/dist/src/external.test.d.ts +1 -0
- package/dist/src/help.d.ts +88 -0
- package/dist/src/help.js +8 -0
- package/dist/src/help.test.d.ts +1 -0
- package/dist/src/hooks.d.ts +46 -0
- package/dist/src/hooks.js +1 -0
- package/dist/src/hooks.test.d.ts +4 -0
- package/dist/src/interceptor.d.ts +44 -0
- package/dist/src/interceptor.js +123 -0
- package/dist/src/interceptor.test.d.ts +4 -0
- package/dist/src/launcher.d.ts +41 -0
- package/dist/src/launcher.js +7 -0
- package/dist/src/launcher.test.d.ts +1 -0
- package/dist/src/logger.d.ts +26 -0
- package/dist/src/logger.js +9 -0
- package/dist/src/main.d.ts +5 -0
- package/dist/src/main.js +10 -0
- package/dist/src/manifest-types.d.ts +43 -0
- package/dist/src/manifest-types.js +1 -0
- package/dist/src/node-network.d.ts +10 -0
- package/dist/src/node-network.js +1 -0
- package/dist/src/node-network.test.d.ts +1 -0
- package/dist/src/observation/artifact.d.ts +16 -0
- package/dist/src/observation/artifact.js +8 -0
- package/dist/src/observation/artifact.test.d.ts +1 -0
- package/dist/src/observation/events.d.ts +89 -0
- package/dist/src/observation/events.js +1 -0
- package/dist/src/observation/index.d.ts +7 -0
- package/dist/src/observation/index.js +1 -0
- package/dist/src/observation/manager.d.ts +9 -0
- package/dist/src/observation/manager.js +1 -0
- package/dist/src/observation/manager.test.d.ts +1 -0
- package/dist/src/observation/redaction.d.ts +11 -0
- package/dist/src/observation/redaction.js +2 -0
- package/dist/src/observation/redaction.test.d.ts +1 -0
- package/dist/src/observation/retention.d.ts +32 -0
- package/dist/src/observation/retention.js +1 -0
- package/dist/src/observation/retention.test.d.ts +1 -0
- package/dist/src/observation/ring-buffer.d.ts +22 -0
- package/dist/src/observation/ring-buffer.js +1 -0
- package/dist/src/observation/ring-buffer.test.d.ts +1 -0
- package/dist/src/observation/session.d.ts +25 -0
- package/dist/src/observation/session.js +1 -0
- package/dist/src/output.d.ts +14 -0
- package/dist/src/output.js +2 -0
- package/dist/src/output.test.d.ts +1 -0
- package/dist/src/package-exports.test.d.ts +1 -0
- package/dist/src/package-paths.d.ts +8 -0
- package/dist/src/package-paths.js +1 -0
- package/dist/src/pipeline/executor.d.ts +11 -0
- package/dist/src/pipeline/executor.js +1 -0
- package/dist/src/pipeline/executor.test.d.ts +4 -0
- package/dist/src/pipeline/index.d.ts +5 -0
- package/dist/src/pipeline/index.js +1 -0
- package/dist/src/pipeline/registry.d.ts +28 -0
- package/dist/src/pipeline/registry.js +1 -0
- package/dist/src/pipeline/steps/browser.d.ts +13 -0
- package/dist/src/pipeline/steps/browser.js +1 -0
- package/dist/src/pipeline/steps/download.d.ts +18 -0
- package/dist/src/pipeline/steps/download.js +1 -0
- package/dist/src/pipeline/steps/download.test.d.ts +1 -0
- package/dist/src/pipeline/steps/fetch.d.ts +5 -0
- package/dist/src/pipeline/steps/fetch.js +31 -0
- package/dist/src/pipeline/steps/fetch.test.d.ts +1 -0
- package/dist/src/pipeline/steps/intercept.d.ts +5 -0
- package/dist/src/pipeline/steps/intercept.js +1 -0
- package/dist/src/pipeline/steps/tap.d.ts +12 -0
- package/dist/src/pipeline/steps/tap.js +53 -0
- package/dist/src/pipeline/steps/transform.d.ts +9 -0
- package/dist/src/pipeline/steps/transform.js +1 -0
- package/dist/src/pipeline/template.d.ts +17 -0
- package/dist/src/pipeline/template.js +1 -0
- package/dist/src/pipeline/template.test.d.ts +4 -0
- package/dist/src/pipeline/transform.test.d.ts +4 -0
- package/dist/src/plugin-manifest.d.ts +70 -0
- package/dist/src/plugin-manifest.js +1 -0
- package/dist/src/plugin-manifest.test.d.ts +4 -0
- package/dist/src/plugin-scaffold.d.ts +28 -0
- package/dist/src/plugin-scaffold.js +75 -0
- package/dist/src/plugin-scaffold.test.d.ts +4 -0
- package/dist/src/plugin.d.ts +145 -0
- package/dist/src/plugin.js +20 -0
- package/dist/src/plugin.test.d.ts +4 -0
- package/dist/src/rate-limit.d.ts +15 -0
- package/dist/src/rate-limit.js +2 -0
- package/dist/src/rate-limit.test.d.ts +1 -0
- package/dist/src/registry-api.d.ts +13 -0
- package/dist/src/registry-api.js +1 -0
- package/dist/src/registry.d.ts +130 -0
- package/dist/src/registry.js +1 -0
- package/dist/src/registry.test.d.ts +4 -0
- package/dist/src/runtime-detect.d.ts +31 -0
- package/dist/src/runtime-detect.js +1 -0
- package/dist/src/runtime-detect.test.d.ts +1 -0
- package/dist/src/runtime.d.ts +57 -0
- package/dist/src/runtime.js +1 -0
- package/dist/src/scripts/framework.d.ts +7 -0
- package/dist/src/scripts/framework.js +1 -0
- package/dist/src/scripts/interact.d.ts +4 -0
- package/dist/src/scripts/interact.js +1 -0
- package/dist/src/scripts/store.d.ts +13 -0
- package/dist/src/scripts/store.js +1 -0
- package/dist/src/serialization.d.ts +42 -0
- package/dist/src/serialization.js +4 -0
- package/dist/src/serialization.test.d.ts +1 -0
- package/dist/src/skills.d.ts +14 -0
- package/dist/src/skills.js +6 -0
- package/dist/src/skills.test.d.ts +1 -0
- package/dist/src/snapshotFormatter.d.ts +11 -0
- package/dist/src/snapshotFormatter.js +3 -0
- package/dist/src/snapshotFormatter.test.d.ts +7 -0
- package/dist/src/tui.d.ts +28 -0
- package/dist/src/tui.js +16 -0
- package/dist/src/tui.test.d.ts +1 -0
- package/dist/src/types.d.ts +236 -0
- package/dist/src/types.js +1 -0
- package/dist/src/utils.d.ts +57 -0
- package/dist/src/utils.js +38 -0
- package/dist/src/utils.test.d.ts +1 -0
- package/dist/src/validate.d.ts +21 -0
- package/dist/src/validate.js +3 -0
- package/dist/src/validate.test.d.ts +9 -0
- package/dist/src/verify.d.ts +27 -0
- package/dist/src/verify.js +2 -0
- package/dist/src/verify.test.d.ts +8 -0
- package/dist/src/version.d.ts +4 -0
- package/dist/src/version.js +1 -0
- package/dist/src/weixin-download.test.d.ts +1 -0
- package/docs/guide/browser-bridge.md +94 -0
- package/docs/guide/electron-app-cli.md +199 -0
- package/docs/guide/exit-codes.md +24 -0
- package/docs/guide/extending-opencli.md +134 -0
- package/docs/guide/getting-started.md +81 -0
- package/docs/guide/installation.md +52 -0
- package/docs/guide/plugins.md +226 -0
- package/docs/guide/remote-orchestration.md +116 -0
- package/docs/guide/troubleshooting.md +69 -0
- package/package.json +116 -0
- package/scripts/check-doc-coverage.sh +81 -0
- package/scripts/check-listing-id-pairing.mjs +193 -0
- package/scripts/check-silent-column-drop.mjs +105 -0
- package/scripts/check-typed-error-lint.mjs +118 -0
- package/scripts/clean-dist.cjs +13 -0
- package/scripts/copy-yaml.cjs +12 -0
- package/scripts/fetch-adapters.js +293 -0
- package/scripts/minify-release.mjs +115 -0
- package/scripts/postinstall.js +174 -0
- package/scripts/silent-column-drop-baseline.json +910 -0
- package/scripts/typed-error-lint-baseline.json +1098 -0
- package/skills/opencli-adapter-author/SKILL.md +256 -0
- package/skills/opencli-adapter-author/references/adapter-template.md +471 -0
- package/skills/opencli-adapter-author/references/api-discovery.md +295 -0
- package/skills/opencli-adapter-author/references/coverage-matrix.md +81 -0
- package/skills/opencli-adapter-author/references/field-conventions.md +172 -0
- package/skills/opencli-adapter-author/references/field-decode-playbook.md +181 -0
- package/skills/opencli-adapter-author/references/jsdom-fixture-pattern.md +196 -0
- package/skills/opencli-adapter-author/references/output-design.md +149 -0
- package/skills/opencli-adapter-author/references/site-memory/bilibili.md +70 -0
- package/skills/opencli-adapter-author/references/site-memory/eastmoney.md +70 -0
- package/skills/opencli-adapter-author/references/site-memory/tonghuashun.md +51 -0
- package/skills/opencli-adapter-author/references/site-memory/xueqiu.md +58 -0
- package/skills/opencli-adapter-author/references/site-memory.md +231 -0
- package/skills/opencli-adapter-author/references/site-recon.md +134 -0
- package/skills/opencli-adapter-author/references/strategy-selection.md +169 -0
- package/skills/opencli-adapter-author/references/success-rate-pitfalls.md +162 -0
- package/skills/opencli-adapter-author/references/typed-errors.md +234 -0
- package/skills/opencli-autofix/SKILL.md +297 -0
- package/skills/opencli-browser/SKILL.md +468 -0
- package/skills/opencli-browser-sitemap/SKILL.md +96 -0
- package/skills/opencli-sitemap-author/SKILL.md +161 -0
- package/skills/opencli-sitemap-author/references/sitemap-schema.md +660 -0
- package/skills/opencli-usage/SKILL.md +168 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as s,Strategy as d}from"@jackwener/opencli/registry";import{ArgumentError as c}from"@jackwener/opencli/errors";import{ensureApplet as p,ggbEval as m,normalizeLabel as a,normalizeNumber as b,requireGgbSuccess as f}from"./utils.js";s({site:"geogebra",name:"add-circle",access:"write",description:"Create a circle by center+radius or center+point",domain:"www.geogebra.org",strategy:d.PUBLIC,browser:!0,navigateBefore:!1,example:"opencli geogebra add-circle --center A --radius 3",args:[{name:"center",required:!0,help:"Center point label (e.g. A)"},{name:"radius",required:!1,help:"Radius value (number) or a point label on the circle"},{name:"point",required:!1,help:"Alternative: a point label on the circle (use instead of --radius for Circle(center,point))"}],columns:["label","center","radius"],func:async(l,e)=>{const r=a(e.center,"center");if(e.point&&e.radius!==void 0)throw new c("Use either --point or --radius, not both");const t=e.point?a(e.point,"point"):"",n=e.radius;let i;if(t)i=`Circle(${r},${t})`;else if(n!==void 0){const o=String(n).trim(),u=Number(o);i=Number.isFinite(u)?`Circle(${r},${b(o,"radius",{positive:!0})})`:`Circle(${r},${a(o,"radius point")})`}else throw new c("Provide --radius (number or point label) or --point (point on circle)");await p(l);return[{label:f(await m(l,i),`Failed to create circle: ${i}`).label,center:r,radius:t||n}]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as i,Strategy as s}from"@jackwener/opencli/registry";import{ArgumentError as l}from"@jackwener/opencli/errors";import{ensureApplet as p,ggbEval as m,normalizeLabelList as g,requireGgbSuccess as c}from"./utils.js";i({site:"geogebra",name:"add-line",access:"write",description:"Create a line through two points or a segment between two points",domain:"www.geogebra.org",strategy:s.PUBLIC,browser:!0,navigateBefore:!1,example:"opencli geogebra add-line --points A,B --type segment",args:[{name:"points",required:!0,help:'Two point labels separated by comma (e.g. "A,B")'},{name:"type",required:!1,choices:["line","segment","ray"],default:"line",help:"Type: line, segment, or ray (default: line)"}],columns:["label","type","points"],func:async(a,o)=>{const[e,t]=g(o.points,"points",2,2),n=o.type||"line",r={line:`Line(${e},${t})`,segment:`Segment(${e},${t})`,ray:`Ray(${e},${t})`}[n];if(!r)throw new l("type must be one of: line, segment, ray");await p(a);return[{label:c(await m(a,r),`Failed to create ${n}: ${r}`).label,type:n,points:`${e},${t}`}]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as i,Strategy as s}from"@jackwener/opencli/registry";import{ensureApplet as c,ggbEval as m,normalizeCoords as l,normalizeLabel as d,requireGgbSuccess as g}from"./utils.js";i({site:"geogebra",name:"add-point",access:"write",description:"Create a point with given label and coordinates",domain:"www.geogebra.org",strategy:s.PUBLIC,browser:!0,navigateBefore:!1,example:"opencli geogebra add-point --name A --coords 1,2",args:[{name:"name",required:!0,help:"Point label (e.g. A, B, P1)"},{name:"coords",required:!0,help:'Coordinates as x,y (e.g. "1,2")'}],columns:["name","x","y"],func:async(e,a)=>{const o=d(a.name,"name"),[r,n]=l(a.coords),t=`${o}=(${r},${n})`;await c(e);const p=g(await m(e,t),`Failed to create point: ${t}`);return[{name:o,x:r,y:n}]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as r,Strategy as s}from"@jackwener/opencli/registry";import{ensureApplet as i,ggbEval as l,normalizeLabelList as n,requireGgbSuccess as g}from"./utils.js";r({site:"geogebra",name:"add-polygon",access:"write",description:"Create a polygon from a list of point labels",domain:"www.geogebra.org",strategy:s.PUBLIC,browser:!0,navigateBefore:!1,example:"opencli geogebra add-polygon --points A,B,C",args:[{name:"points",required:!0,help:'Comma-separated point labels (e.g. "A,B,C" or "A,B,C,D")'}],columns:["label","vertices"],func:async(e,t)=>{const o=n(t.points,"points",3,50),a=`Polygon(${o.join(",")})`;await i(e);return[{label:g(await l(e,a),`Failed to create polygon: ${a}`).label,vertices:o.join(",")}]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as m,Strategy as s}from"@jackwener/opencli/registry";import{ArgumentError as c}from"@jackwener/opencli/errors";import{ensureApplet as i,ggbEval as l,requireGgbSuccess as u}from"./utils.js";m({site:"geogebra",name:"eval",access:"write",description:"Execute one or more GeoGebra command strings (semicolon-separated)",domain:"www.geogebra.org",strategy:s.PUBLIC,browser:!0,navigateBefore:!1,example:'opencli geogebra eval "A=(0,0);B=(4,0);c=Circle(A,B);d=Circle(B,A);C=Intersect(c,d,1);Polygon(A,B,C)"',args:[{name:"command",positional:!0,required:!0,help:"GeoGebra command string (use ; to chain multiple commands)"}],columns:["command","result"],func:async(o,t)=>{const r=String(t.command).split(";").map((e)=>e.trim()).filter(Boolean);if(r.length===0)throw new c("command must contain at least one GeoGebra command");await i(o);const a=[];for(const e of r){const n=u(await l(o,e),`Failed to execute GeoGebra command: ${e}`);a.push({command:e,result:`ok (${n.label||"no label"})`})}return a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as Z,Strategy as _}from"@jackwener/opencli/registry";import{CommandExecutionError as $}from"@jackwener/opencli/errors";import A from"node:os";import D from"node:path";import{ensureApplet as F,ggbEval as Q,ggbListObjects as L,ggbWaitForObjectCount as N,normalizeNumber as W,requireGgbSuccess as R}from"./utils.js";Z({site:"geogebra",name:"hexagon",access:"write",description:"Draw a regular hexagon centered at the origin",domain:"www.geogebra.org",strategy:_.PUBLIC,browser:!0,navigateBefore:!1,example:"opencli geogebra hexagon --size 3",args:[{name:"size",required:!1,default:"2",help:"Radius of the hexagon (default: 2)"}],columns:["step","result"],func:async(H,T)=>{const f=W(T.size,"size",{defaultValue:2,positive:!0});await F(H);const I=[],U=[["V1",`(${f},0)`],["V2",`(${f}*cos(pi/3),${f}*sin(pi/3))`],["V3",`(${f}*cos(2*pi/3),${f}*sin(2*pi/3))`],["V4",`(-${f},0)`],["V5",`(${f}*cos(4*pi/3),${f}*sin(4*pi/3))`],["V6",`(${f}*cos(5*pi/3),${f}*sin(5*pi/3))`]];for(const[B,M]of U){const Y=R(await Q(H,`${B}=${M}`),`Failed to create point ${B}`);I.push({step:`${B}=${M}`,result:`ok (${Y.label||B})`})}const V=R(await Q(H,"Hexagon=Polygon(V1,V2,V3,V4,V5,V6)"),"Failed to create hexagon polygon");I.push({step:"Hexagon=Polygon(V1,V2,V3,V4,V5,V6)",result:`ok (${V.label||"hexagon created"})`});const X=await N(H,7),J=await L(H),K=D.join(A.tmpdir(),"opencli-geogebra-hexagon.png");try{await H.screenshot({path:K})}catch(B){throw new $(`Failed to capture GeoGebra screenshot: ${B?.message||B}`)}if(Array.isArray(J)&&J.length>0)I.push({step:`canvas has ${X} objects`,result:J.map((B)=>`${B.name}(${B.type})`).join(", ")});I.push({step:"screenshot",result:K});return I}});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{cli as Q,Strategy as T}from"@jackwener/opencli/registry";import{CommandExecutionError as I,EmptyResultError as U}from"@jackwener/opencli/errors";import{ensureApplet as V,ggbGetProperty as J,normalizeLabel as W,unwrapBridgeEnvelope as X}from"./utils.js";Q({site:"geogebra",name:"info",access:"read",description:"Get detailed properties of a GeoGebra object",domain:"www.geogebra.org",strategy:T.PUBLIC,browser:!0,navigateBefore:!1,example:"opencli geogebra info --name A",args:[{name:"name",required:!0,help:"Object label (e.g. A, c1, poly1)"}],columns:["property","value"],func:async(D,M)=>{const h=W(M.name,"name");await V(D);let f;try{f=X(await D.evaluate(`
|
|
2
|
+
(name => {
|
|
3
|
+
try {
|
|
4
|
+
if (typeof ggbApplet === 'undefined' || typeof ggbApplet.getObjectType !== 'function') {
|
|
5
|
+
return { error: 'ggbApplet is not ready' };
|
|
6
|
+
}
|
|
7
|
+
return { ok: true, exists: ggbApplet.getObjectType(name) !== '' };
|
|
8
|
+
} catch (err) {
|
|
9
|
+
return { error: err?.message || String(err) };
|
|
10
|
+
}
|
|
11
|
+
})
|
|
12
|
+
(${JSON.stringify(h)})
|
|
13
|
+
`))}catch(q){throw new I(`Failed to inspect GeoGebra object: ${q?.message||q}`)}if(!f||typeof f!=="object"||Array.isArray(f))throw new I("GeoGebra object existence probe returned malformed result");if(f.error)throw new I(`Failed to inspect GeoGebra object: ${f.error}`);if(f.ok!==!0||typeof f.exists!=="boolean")throw new I("GeoGebra object existence probe returned malformed result");if(f.exists===!1)throw new U(`geogebra info ${h}`,`Object "${h}" not found on the canvas.`);const O=["type","value","definition","command","caption","visible","color"],H=[];for(const q of O){const K=await J(D,h,q);H.push({property:q,value:String(K??"")})}if(await J(D,h,"type")==="point"){const q=await J(D,h,"xcoord"),K=await J(D,h,"ycoord");H.push({property:"x",value:String(q??"")});H.push({property:"y",value:String(K??"")})}return H}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as a,Strategy as s}from"@jackwener/opencli/registry";import{ArgumentError as n,EmptyResultError as i}from"@jackwener/opencli/errors";import{ensureApplet as l,ggbListObjects as c}from"./utils.js";a({site:"geogebra",name:"list",access:"read",description:"List all geometric objects on the GeoGebra canvas",domain:"www.geogebra.org",strategy:s.PUBLIC,browser:!0,navigateBefore:!1,args:[{name:"type",required:!1,help:'Filter by object type (e.g. "point", "line", "circle")'}],columns:["name","type","value","visible"],func:async(o,e)=>{const t=e.type==null||e.type===""?"":String(e.type).trim().toLowerCase();if(t&&!/^[a-z-]+$/.test(t))throw new n("type must be a GeoGebra object type like point, line, or circle");await l(o);const r=await c(o,t);if(!Array.isArray(r)||r.length===0)throw new i("geogebra list",'No objects found on the canvas. Fresh runs start a blank session; use one "eval" call, or inspect an already-bound tab through the browser workspace commands.');return r}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as h,Strategy as w}from"@jackwener/opencli/registry";import{CommandExecutionError as f}from"@jackwener/opencli/errors";import C from"node:os";import B from"node:path";import{ensureApplet as $,ggbEval as r,ggbListObjects as A,ggbWaitForObjectCount as y,normalizeNumber as F,requireGgbSuccess as a}from"./utils.js";h({site:"geogebra",name:"triangle",access:"write",description:"Draw an equilateral triangle from a horizontal base segment",domain:"www.geogebra.org",strategy:w.PUBLIC,browser:!0,navigateBefore:!1,example:"opencli geogebra triangle --size 4",args:[{name:"size",required:!1,default:"2",help:"Side length of the triangle (default: 2)"}],columns:["step","result"],func:async(e,l)=>{const o=F(l.size,"size",{defaultValue:2,positive:!0});await $(e);const t=[],c=a(await r(e,"A=(0,0)"),"Failed to create point A");t.push({step:"base point A=(0,0)",result:`ok (${c.label||"A"})`});const n=a(await r(e,`B=(${o},0)`),"Failed to create point B");t.push({step:`base point B=(${o},0)`,result:`ok (${n.label||"B"})`});const u=a(await r(e,"c=Circle(A,B)"),"Failed to create circle c");t.push({step:"c=Circle(A,B)",result:`ok (${u.label||"c"})`});const p=a(await r(e,"d=Circle(B,A)"),"Failed to create circle d");t.push({step:"d=Circle(B,A)",result:`ok (${p.label||"d"})`});const g=a(await r(e,"C=Intersect(c,d,1)"),"Failed to create point C");t.push({step:"C=Intersect(c,d,1)",result:`ok (${g.label||"C"})`});const m=a(await r(e,"Polygon(A,B,C)"),"Failed to create triangle polygon");t.push({step:"Polygon(A,B,C)",result:`ok (${m.label||"triangle created"})`});const b=await y(e,5),d=await A(e),i=B.join(C.tmpdir(),"opencli-geogebra-triangle.png");try{await e.screenshot({path:i})}catch(s){throw new f(`Failed to capture GeoGebra screenshot: ${s?.message||s}`)}t.push({step:`canvas has ${b} objects`,result:d.map((s)=>`${s.name}(${s.type})`).join(", ")});t.push({step:"screenshot",result:i});return t}});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import{ArgumentError as Y,CommandExecutionError as J}from"@jackwener/opencli/errors";const $="https://www.geogebra.org/geometry",k=15000;export function unwrapBridgeEnvelope(h){if(h&&typeof h==="object"&&"data"in h&&"session"in h)return h.data;return h}function Z(h){return h&&typeof h==="object"&&!Array.isArray(h)}export function normalizeLabel(h,H="label"){const D=String(h??"").trim();if(!/^[A-Za-z][A-Za-z0-9_]*$/.test(D))throw new Y(`${H} must be an ASCII GeoGebra label like A, B1, or poly_1`);return D}export function normalizeLabelList(h,H,D,q=1/0){const K=String(h??"").split(",").map((Q)=>Q.trim()).filter(Boolean);if(K.length<D||K.length>q)throw new Y(`${H} must contain ${D===q?D:`${D}-${q}`} comma-separated labels`);return K.map((Q,X)=>normalizeLabel(Q,`${H}[${X+1}]`))}export function normalizeNumber(h,H,{defaultValue:D,positive:q=!1}={}){const K=h==null||h===""?D:h,Q=Number(K);if(!Number.isFinite(Q)||q&&Q<=0)throw new Y(`${H} must be a ${q?"positive ":""}finite number`);return Q}export function normalizeCoords(h){const H=String(h??"").split(",").map((D)=>D.trim());if(H.length!==2)throw new Y('coords must be in "x,y" format (e.g. "1,2")');return H.map((D,q)=>normalizeNumber(D,q===0?"x":"y"))}export function requireGgbSuccess(h,H){if(!Z(h))throw new J(`${H}: malformed GeoGebra result`);if(!h.ok)throw new J(h.error||H);return h}export async function ensureApplet(h){let H="";try{H=await h.getCurrentUrl()}catch{H=""}if(H?.includes("geogebra.org/geometry"))try{if(unwrapBridgeEnvelope(await h.evaluate("typeof ggbApplet !== 'undefined' && typeof ggbApplet.evalCommand === 'function'")))return}catch(q){throw new J(`Failed to detect GeoGebra applet: ${q?.message||q}`)}try{await h.goto($)}catch(q){throw new J(`Failed to load GeoGebra Geometry: ${q?.message||q}`)}let D;try{D=unwrapBridgeEnvelope(await h.evaluate(`
|
|
2
|
+
(async () => {
|
|
3
|
+
const deadline = Date.now() + ${k};
|
|
4
|
+
while (Date.now() < deadline) {
|
|
5
|
+
if (typeof ggbApplet !== 'undefined' && typeof ggbApplet.evalCommand === 'function') {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
await new Promise(r => setTimeout(r, 500));
|
|
9
|
+
}
|
|
10
|
+
return false;
|
|
11
|
+
})()
|
|
12
|
+
`))}catch(q){throw new J(`Failed to detect GeoGebra applet: ${q?.message||q}`)}if(D!==!0)throw new J("ggbApplet not available after waiting. Make sure the GeoGebra Geometry page is fully loaded.")}export async function ggbEval(h,H){let D;try{D=unwrapBridgeEnvelope(await h.evaluate(`
|
|
13
|
+
(cmd => {
|
|
14
|
+
if (typeof ggbApplet === 'undefined' || typeof ggbApplet.evalCommandGetLabels !== 'function') {
|
|
15
|
+
return { ok: false, label: '', beforeCount: 0, afterCount: 0, error: 'ggbApplet is not ready' };
|
|
16
|
+
}
|
|
17
|
+
const collectNames = () => {
|
|
18
|
+
let names = ggbApplet.getAllObjectNames();
|
|
19
|
+
if (typeof names === 'string') {
|
|
20
|
+
names = names.split(',').map(s => s.trim()).filter(Boolean);
|
|
21
|
+
}
|
|
22
|
+
return Array.isArray(names) ? names : [];
|
|
23
|
+
};
|
|
24
|
+
const beforeCount = collectNames().length;
|
|
25
|
+
const label = ggbApplet.evalCommandGetLabels(cmd);
|
|
26
|
+
const afterCount = collectNames().length;
|
|
27
|
+
const dialogText = [...document.querySelectorAll('[role="dialog"], .gwt-DialogBox')]
|
|
28
|
+
.map(node => node.textContent?.trim() || '')
|
|
29
|
+
.find(text => /error|unknown command|错误|未知的指令/i.test(text)) || '';
|
|
30
|
+
return {
|
|
31
|
+
ok: label !== '' || afterCount > beforeCount,
|
|
32
|
+
label,
|
|
33
|
+
beforeCount,
|
|
34
|
+
afterCount,
|
|
35
|
+
error: dialogText || null,
|
|
36
|
+
};
|
|
37
|
+
})(${JSON.stringify(H)})
|
|
38
|
+
`))}catch(q){throw new J(`Failed to execute GeoGebra command: ${q?.message||q}`)}if(!Z(D)||typeof D.ok!=="boolean")throw new J("GeoGebra command returned malformed result");return D}export async function ggbListObjects(h,H){const D=H?String(H).toLowerCase():"";let q;try{q=unwrapBridgeEnvelope(await h.evaluate(`
|
|
39
|
+
(filterType => {
|
|
40
|
+
const api = ggbApplet;
|
|
41
|
+
let names = api.getAllObjectNames();
|
|
42
|
+
if (typeof names === 'string') {
|
|
43
|
+
names = names.split(',').map(s => s.trim()).filter(Boolean);
|
|
44
|
+
}
|
|
45
|
+
if (!Array.isArray(names)) return { error: 'Object names are not an array' };
|
|
46
|
+
const result = [];
|
|
47
|
+
for (const name of names) {
|
|
48
|
+
try {
|
|
49
|
+
const type = api.getObjectType(name);
|
|
50
|
+
if (!type) return { error: 'Object has no type', name };
|
|
51
|
+
if (filterType && type.toLowerCase() !== filterType) continue;
|
|
52
|
+
result.push({
|
|
53
|
+
name,
|
|
54
|
+
type,
|
|
55
|
+
value: api.getValueString(name) || '',
|
|
56
|
+
visible: api.getVisible(name),
|
|
57
|
+
});
|
|
58
|
+
} catch (err) {
|
|
59
|
+
return { error: err?.message || String(err), name };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return result;
|
|
63
|
+
})(${JSON.stringify(D)})
|
|
64
|
+
`))}catch(K){throw new J(`Failed to list GeoGebra objects: ${K?.message||K}`)}if(q&&typeof q==="object"&&!Array.isArray(q)&&q.error){const K=q.name?` for ${q.name}`:"";throw new J(`Failed to list GeoGebra objects${K}: ${q.error}`)}if(!Array.isArray(q))throw new J("GeoGebra object list returned malformed result");return q}export async function ggbWaitForObjectCount(h,H,D=4000){const q=normalizeNumber(H,"minCount",{positive:!0}),K=normalizeNumber(D,"timeoutMs",{positive:!0});let Q;try{Q=unwrapBridgeEnvelope(await h.evaluate(`
|
|
65
|
+
(async () => {
|
|
66
|
+
const deadline = Date.now() + ${K};
|
|
67
|
+
while (Date.now() < deadline) {
|
|
68
|
+
let names = ggbApplet.getAllObjectNames();
|
|
69
|
+
if (typeof names === 'string') {
|
|
70
|
+
names = names.split(',').map(s => s.trim()).filter(Boolean);
|
|
71
|
+
}
|
|
72
|
+
if (Array.isArray(names) && names.length >= ${q}) {
|
|
73
|
+
return names.length;
|
|
74
|
+
}
|
|
75
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
76
|
+
}
|
|
77
|
+
let names = ggbApplet.getAllObjectNames();
|
|
78
|
+
if (typeof names === 'string') {
|
|
79
|
+
names = names.split(',').map(s => s.trim()).filter(Boolean);
|
|
80
|
+
}
|
|
81
|
+
return Array.isArray(names) ? names.length : 0;
|
|
82
|
+
})()
|
|
83
|
+
`))}catch(X){throw new J(`Failed waiting for GeoGebra object count: ${X?.message||X}`)}if(!Number.isFinite(Number(Q)))throw new J("GeoGebra object count returned malformed result");return Number(Q)}export async function ggbGetProperty(h,H,D){try{return unwrapBridgeEnvelope(await h.evaluate(`
|
|
84
|
+
(objName, property) => {
|
|
85
|
+
const api = ggbApplet;
|
|
86
|
+
switch (property) {
|
|
87
|
+
case 'type': return api.getObjectType(objName);
|
|
88
|
+
case 'value': return api.getValueString(objName);
|
|
89
|
+
case 'color': return api.getColor(objName);
|
|
90
|
+
case 'visible': return api.getVisible(objName);
|
|
91
|
+
case 'caption': return api.getCaption(objName) || '';
|
|
92
|
+
case 'xcoord': return api.getXcoord(objName);
|
|
93
|
+
case 'ycoord': return api.getYcoord(objName);
|
|
94
|
+
case 'definition': return api.getDefinitionString(objName);
|
|
95
|
+
case 'command': return api.getCommandString(objName);
|
|
96
|
+
default: return null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`,H,D))}catch(q){throw new J(`Failed to read GeoGebra object property: ${q?.message||q}`)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as m,Strategy as d}from"@jackwener/opencli/registry";import{CliError as a}from"@jackwener/opencli/errors";import{readFileSync as u}from"node:fs";import{normalizeContent as p}from"../_shared/article/format.js";import{getGhostConfig as f,ghostRequest as c}from"./shared.js";const h=["draft","published"];m({site:"ghost",name:"publish",access:"write",description:"Publish a post to a Ghost site via the Admin API. A Markdown body is converted to HTML automatically (sent with ?source=html). Defaults to a draft for safety — pass --status published to go live.",domain:"ghost.org",strategy:d.LOCAL,browser:!1,args:[{name:"title",required:!0,help:"Post title"},{name:"content",help:"Post body (Markdown or HTML). Or use --file."},{name:"file",help:"Read the post body from a local file instead of --content"},{name:"markup",default:"auto",choices:["auto","markdown","html"],help:"How to interpret the body: auto-detect (default), markdown, or html"},{name:"status",default:"draft",choices:h,help:"Post status (default: draft)"},{name:"excerpt",help:"Optional custom excerpt"},{name:"slug",help:"Optional URL slug"},{name:"tags",help:"Comma-separated tag names (created if missing)"}],columns:["id","status","title","url"],func:async(t)=>{const n=f();let i=typeof t.content==="string"?t.content:"";if(t.file)try{i=u(String(t.file),"utf8")}catch(o){throw new a("CONFIG",`Cannot read --file ${t.file}: ${o?.message??o}`,"Pass a readable UTF-8 text file.")}if(!i.trim())throw new a("CONFIG","Post body is empty",'Pass --content "..." or --file <path>.');const l=p(i,{format:t.markup}).html,e={title:String(t.title),html:l,status:String(t.status)};if(t.excerpt)e.custom_excerpt=String(t.excerpt);if(t.slug)e.slug=String(t.slug);if(t.tags)e.tags=String(t.tags).split(",").map((o)=>o.trim()).filter(Boolean).map((o)=>({name:o}));const r=await c(n,"/posts/?source=html",{method:"POST",body:{posts:[e]},label:"Ghost publish"}),s=Array.isArray(r?.posts)?r.posts[0]:void 0;if(!s?.id)throw new a("PARSE_ERROR","Ghost did not return a created post","The Admin API response was missing posts[0].id.");return[{id:s.id,status:s.status??e.status,title:s.title??e.title,url:s.url??""}]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CliError as X}from"@jackwener/opencli/errors";const B="ghost-admin-api-session";function J(Q,L){const D=Q?.trim().replace(/\/+$/,"");if(!D)throw new X("CONFIG",`Missing ${L}`,`Set ${L}, e.g. https://your-site.com (your Ghost site root URL).`);let V;try{V=new URL(D)}catch{throw new X("CONFIG",`Invalid ${L}: ${D}`,"Use an absolute http(s) URL.")}if(V.protocol!=="http:"&&V.protocol!=="https:")throw new X("CONFIG",`Invalid ${L}: ${D}`,"Use an http(s) URL.");return{baseUrl:D,origin:V.origin}}function j(Q){const L=Q?.trim();if(!L)return"";const D=`${B}=`;if(L.startsWith(D))return L.slice(D.length).split(";")[0].trim();return L}export function getGhostConfig(Q=process.env){const{baseUrl:L,origin:D}=J(Q.GHOST_SITE_URL??Q.GHOST_ADMIN_URL,"GHOST_SITE_URL"),V=j(Q.GHOST_SESSION_COOKIE);if(!V)throw new X("AUTH_REQUIRED","Ghost session cookie missing","Connect your Ghost site first: the desktop opens {siteUrl}/ghost/ so you can log in, then captures the session cookie automatically.");return{baseUrl:L,origin:D,session:V}}export async function ghostRequest(Q,L,D={}){const V=L.startsWith("/")?L:`/${L}`,F=`${Q.baseUrl}/ghost/api/admin${V}`,Z=D.label||`Ghost ${D.method||"GET"} ${V}`;let W;try{W=await fetch(F,{method:D.method||"GET",headers:{Cookie:`${B}=${Q.session}`,Origin:Q.origin,Accept:"application/json","Accept-Version":"v5.0",...D.body!==void 0?{"Content-Type":"application/json"}:{},...D.headers||{}},body:D.body!==void 0?JSON.stringify(D.body):void 0})}catch($){throw new X("FETCH_ERROR",`${Z} failed: ${$?.message??$}`,"Check the site URL is reachable and that it is a Ghost site.")}const y=await W.text();let Y=null;try{Y=y?JSON.parse(y):null}catch{Y=null}if(W.status===401||W.status===403)throw new X("AUTH_REQUIRED",`${Z} returned HTTP ${W.status} (unauthorized)`,"The Ghost session has expired or the Origin was rejected. Re-connect the site (log in again through the desktop) and retry.");if(W.status===404)throw new X("NOT_FOUND",`${Z} returned HTTP 404`,"Check the site URL points at a Ghost site (the Admin API lives under /ghost/api/admin).");if(!W.ok){const $=Array.isArray(Y?.errors)&&Y.errors[0]?.message?`: ${Y.errors[0].message}`:W.statusText?`: ${W.statusText}`:"";throw new X("HTTP_ERROR",`${Z} returned HTTP ${W.status}${$}`)}return Y}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as A,Strategy as B}from"@jackwener/opencli/registry";import{CliError as z}from"@jackwener/opencli/errors";import{getGhostConfig as D,ghostRequest as F}from"./shared.js";A({site:"ghost",name:"whoami",access:"read",description:"Check whether the connected Ghost site session is valid (GET /ghost/api/admin/site). Returns logged_in true when the site info comes back, false when the session is missing/expired.",domain:"ghost.org",strategy:B.LOCAL,browser:!1,columns:["logged_in","site","title"],func:async()=>{let m;try{m=D()}catch(b){if(b instanceof z&&b.code==="AUTH_REQUIRED")return[{logged_in:!1,site:"",title:""}];throw b}try{const v=(await F(m,"/site/",{label:"Ghost whoami"}))?.site??{};return[{logged_in:!!v.title,site:v.url??m.baseUrl,title:v.title??""}]}catch(b){if(b instanceof z&&b.code==="AUTH_REQUIRED")return[{logged_in:!1,site:m.baseUrl,title:""}];throw b}}});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{AuthRequiredError as J,CommandExecutionError as F}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as L}from"../_shared/site-auth.js";const K=`(async () => {
|
|
2
|
+
try {
|
|
3
|
+
const r = await fetch('/api/v5/user', { credentials: 'include', headers: { Accept: 'application/json' } });
|
|
4
|
+
if (r.status === 401 || r.status === 403) return { kind: 'auth', detail: 'Gitee /api/v5/user HTTP ' + r.status };
|
|
5
|
+
if (!r.ok) return { kind: 'http', httpStatus: r.status };
|
|
6
|
+
const d = await r.json();
|
|
7
|
+
if (!d || !d.id || !d.login) return { kind: 'auth', detail: 'Gitee /api/v5/user has no id/login — anonymous' };
|
|
8
|
+
return { ok: true, user_id: String(d.id), username: String(d.login), name: String(d.name || '') };
|
|
9
|
+
} catch (e) {
|
|
10
|
+
return { kind: 'exception', detail: String(e && e.message || e) };
|
|
11
|
+
}
|
|
12
|
+
})()`;async function N(D){await D.goto("https://gitee.com/");await D.wait(1);const z=await D.evaluate(K);if(z?.kind==="auth")throw new J("gitee.com",z.detail);if(z?.kind==="http")throw new F(`HTTP ${z.httpStatus} from Gitee /api/v5/user`);if(z?.kind==="exception")throw new F(`Gitee whoami failed: ${z.detail}`);if(!z?.ok)throw new F(`Unexpected Gitee probe: ${JSON.stringify(z)}`);return{user_id:z.user_id,username:z.username,name:z.name}}L({site:"gitee",domain:"gitee.com",loginUrl:"https://gitee.com/login",columns:["user_id","username","name"],verify:N,poll:async(D)=>{const z=await D.evaluate(K);if(!z?.ok)throw new J("gitee.com","Waiting for Gitee login");return{user_id:z.user_id,username:z.username,name:z.name}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./trending.js";import"./search.js";import"./user.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CliError as c}from"@jackwener/opencli/errors";import{cli as R,Strategy as T}from"@jackwener/opencli/registry";const U="https://gitee.com/search",N="wong1slagnlmzwvsu5ya",G=`https://so.gitee.com/v1/search/widget/${N}`,_=50;function L(e){const t=Number(e);if(Number.isNaN(t))return 10;return Math.max(1,Math.min(t,_))}function h(e){return e.replace(/\s+/g," ").trim()}function P(e){let t="";if(typeof e==="number")t=String(e);else if(typeof e==="string")t=e;else if(Array.isArray(e)&&e.length>0)t=String(e[0]??"");const r=h(t).replace(/\s+/g,"");if(!r)return"-";const n=r.match(/\d+(?:[.,]\d+)?(?:[kKmMwW]|\u4E07)?/);return n?n[0]:"-"}function f(e){if(typeof e==="string")return e;if(typeof e==="number")return String(e);if(Array.isArray(e)){for(const t of e)if(typeof t==="string"||typeof t==="number")return String(t)}return""}function m(e){if(!e||typeof e!=="object"||Array.isArray(e))return null;return e}function b(e){try{const t=new URL(e,"https://gitee.com"),r=t.hostname.toLowerCase();if(r!=="gitee.com"&&r!=="www.gitee.com")return null;const n=t.pathname.split("/").filter(Boolean);if(n.length!==2)return null;return`https://gitee.com/${n[0]}/${n[1]}`}catch{return null}}R({site:"gitee",name:"search",access:"read",description:"Search repositories on Gitee",domain:"gitee.com",strategy:T.PUBLIC,browser:!0,args:[{name:"keyword",positional:!0,required:!0,help:"Search keyword"},{name:"limit",type:"int",default:10,help:"Number of results (max 50)"}],columns:["rank","name","language","stars","description","url"],func:async(e,t)=>{const r=String(t.keyword??"").trim();if(!r)throw new c("INVALID_ARGUMENT","Keyword is required","Provide a search keyword");const n=L(t.limit),A=encodeURIComponent(r),u=`${U}?q=${A}&type=repository`,S=Math.max(10,n),i=new URL(G);i.searchParams.set("q",r);i.searchParams.set("from","0");i.searchParams.set("size",String(S));await e.goto(u);await e.wait(2);const l=await fetch(i.toString(),{headers:{Accept:"application/json","User-Agent":"Mozilla/5.0",Referer:u}});if(!l.ok)throw new c("REQUEST_FAILED",`Failed to request Gitee search API: ${l.status}`,"Try again later or verify network access to so.gitee.com");const E=await l.json(),I=m(E),g=m(I?.hits),d=Array.isArray(g?.hits)?g.hits:[];if(d.length===0)throw new c("NOT_FOUND","No Gitee repository search results found","Try a different keyword or check whether Gitee search API changed");const w=new Set,s=[];for(let p=0;p<d.length&&s.length<n;p++){const k=m(d[p]),o=m(k?.fields);if(!o)continue;const y=h(f(o.title)),a=b(f(o.url));if(!y||!a)continue;if(w.has(a))continue;w.add(a);s.push({rank:s.length+1,name:y,language:h(f(o.langs))||"",description:h(f(o.description))||"",stars:P(o["count.star"]),url:a})}if(s.length===0)throw new c("NOT_FOUND","No valid Gitee repository results parsed","Try a different keyword or check whether Gitee search API changed");return s}});
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import{CliError as h}from"@jackwener/opencli/errors";import{cli as C,Strategy as x}from"@jackwener/opencli/registry";import{isRecord as y}from"@jackwener/opencli/utils";const k="https://gitee.com/explore",S=50,g=48,b=new Set(["gitee.com","www.gitee.com"]),w=new Set(["about","account","ai","all","api","apps","blog","contact","dashboard","docs","enterprise","enterprises","explore","features","help","issues","login","marketplace","organizations","pricing","pulls","security","settings","signup","sitemap","stars","support","terms","users"]),N=["stars","star","stars_count","star_count","stargazers_count","stargazer_count","watch_count","watchers_count"];function l(t){return t.replace(/\s+/g," ").trim()}function d(t){const e=l(t).replace(/\s+/g,"");if(!e)return"-";const r=e.match(/\d+(?:[.,]\d+)?(?:[kKmMwW]|\u4E07)?/);return r?r[0]:e}function _(t){const e=l(t);if(!e||e==="-")return"-";if(e.length<=g)return e;return`${e.slice(0,g-3)}...`}function R(t){const e=Number(t);if(Number.isNaN(e))return 20;return Math.max(1,Math.min(e,S))}function p(t){try{const e=new URL(t,"https://gitee.com");if(!b.has(e.hostname.toLowerCase()))return null;const r=e.pathname.split("/").filter(Boolean);if(r.length!==2)return null;const s=r[0],o=r[1];if(w.has(s.toLowerCase())||w.has(o.toLowerCase()))return null;return`https://gitee.com/${s}/${o}`}catch{return null}}function A(t){const e=t.trim().replace(/^\/+|\/+$/g,"");if(!e.includes("/"))return null;return p(`https://gitee.com/${e}`)}function z(t){const e=[],r=(i)=>{if(typeof i!=="string")return;const c=p(i)??A(i);if(c)e.push(c)};r(t.url);r(t.html_url);r(t.project_url);r(t.web_url);r(t.path_with_namespace);r(t.name_with_namespace);r(t.full_name);r(t.fullName);r(t.path);const s=e[0];if(!s)return null;let o="";const a=[t.name_with_namespace,t.full_name,t.fullName,t.path_with_namespace,t.name].find((i)=>typeof i==="string"&&i.trim());if(typeof a==="string")o=l(a.replace(/\s*\/\s*/g,"/"));let n="";const f=[t.description,t.desc,t.summary,t.project_description,t.intro,t.tagline].find((i)=>typeof i==="string"&&i.trim());if(typeof f==="string")n=l(f);let u="";for(const i of N){const c=t[i];if(typeof c==="number"&&Number.isFinite(c)){u=String(c);break}if(typeof c==="string"&&c.trim()){u=c;break}}return{url:s,name:o||void 0,description:n||void 0,stars:u?d(u):void 0}}function D(t){const e=t.trim();if(!e||!e.startsWith("{")&&!e.startsWith("["))return null;try{return JSON.parse(e)}catch{const r=Math.max(e.lastIndexOf("}"),e.lastIndexOf("]"));if(r<=0)return null;const s=e.slice(0,r+1);try{return JSON.parse(s)}catch{return null}}}function T(t){if(!y(t))return null;const e=typeof t.responsePreview==="string"?t.responsePreview:"";if(!e||e.startsWith("base64:"))return null;const r=typeof t.responseContentType==="string"?t.responseContentType.toLowerCase():"";if(r&&!r.includes("json")&&!r.includes("javascript")&&!r.includes("text"))return null;return D(e)}function E(t,e){if(!e||e==="-")return t;if(!t||t==="-")return e;return e.length>t.length?e:t}function m(t,e,r,s){if(s>8||t===null||t===void 0||typeof t!=="object")return;if(r.has(t))return;r.add(t);if(Array.isArray(t)){for(const n of t)m(n,e,r,s+1);return}const o=t,a=z(o);if(a){const n=e.get(a.url);if(!n)e.set(a.url,a);else e.set(a.url,{url:a.url,name:E(n.name,a.name),description:E(n.description,a.description),stars:n.stars&&n.stars!=="-"?n.stars:a.stars})}for(const n of Object.values(o))m(n,e,r,s+1)}function j(t){const e=new Map,r=new Set;for(const s of t){const o=T(s);if(o!==null)m(o,e,r,0)}return e}function M(t){if(!t||typeof t!=="object")return null;const e=t,r=typeof e.name==="string"?l(e.name):"",s=typeof e.url==="string"?e.url.trim():"",o=p(s);if(!r||!o)return null;const a=typeof e.description==="string"?l(e.description):"",n=typeof e.stars==="string"?d(e.stars):"-";return{name:r,description:a||"-",stars:n,url:o}}function F(t,e){if(!e)return t;const r=e.name?l(e.name):"",s=e.description?l(e.description):"",o=e.stars?d(e.stars):"-";return{name:r&&r.length<=120?r:t.name,description:t.description!=="-"?t.description:s||"-",stars:t.stars!=="-"?t.stars:o,url:t.url}}C({site:"gitee",name:"trending",access:"read",description:"Recommended open-source projects on Gitee Explore",domain:"gitee.com",strategy:x.PUBLIC,browser:!0,args:[{name:"limit",type:"int",default:20,help:"Number of projects (max 50)"}],columns:["name","description","stars","url"],func:async(t,e)=>{const r=R(e.limit);let s=new Map;if(t.startNetworkCapture)try{await t.startNetworkCapture("gitee.com")}catch{}await t.goto(k);await t.wait(3);if(t.readNetworkCapture)try{const n=await t.readNetworkCapture();s=j(n)}catch{}const o=await t.evaluate(`
|
|
2
|
+
(() => {
|
|
3
|
+
const RESERVED = new Set([
|
|
4
|
+
'about',
|
|
5
|
+
'account',
|
|
6
|
+
'ai',
|
|
7
|
+
'all',
|
|
8
|
+
'api',
|
|
9
|
+
'apps',
|
|
10
|
+
'blog',
|
|
11
|
+
'contact',
|
|
12
|
+
'dashboard',
|
|
13
|
+
'docs',
|
|
14
|
+
'enterprise',
|
|
15
|
+
'enterprises',
|
|
16
|
+
'explore',
|
|
17
|
+
'features',
|
|
18
|
+
'help',
|
|
19
|
+
'issues',
|
|
20
|
+
'login',
|
|
21
|
+
'marketplace',
|
|
22
|
+
'organizations',
|
|
23
|
+
'pricing',
|
|
24
|
+
'pulls',
|
|
25
|
+
'security',
|
|
26
|
+
'settings',
|
|
27
|
+
'signup',
|
|
28
|
+
'sitemap',
|
|
29
|
+
'stars',
|
|
30
|
+
'support',
|
|
31
|
+
'terms',
|
|
32
|
+
'users',
|
|
33
|
+
]);
|
|
34
|
+
|
|
35
|
+
const KEYWORDS = [
|
|
36
|
+
'\\u63A8\\u8350\\u5F00\\u6E90\\u9879\\u76EE',
|
|
37
|
+
'\\u63A8\\u8350\\u9879\\u76EE',
|
|
38
|
+
'\\u63A8\\u8350\\u4ED3\\u5E93',
|
|
39
|
+
'Recommended Projects',
|
|
40
|
+
];
|
|
41
|
+
const STAR_TOKEN = /(\\d+(?:[.,]\\d+)?(?:\\s*[kKmMwW\\u4E07])?)/;
|
|
42
|
+
|
|
43
|
+
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
44
|
+
|
|
45
|
+
const toRepoUrl = (href) => {
|
|
46
|
+
if (!href) return '';
|
|
47
|
+
try {
|
|
48
|
+
const url = new URL(href, location.origin);
|
|
49
|
+
if (url.origin !== location.origin) return '';
|
|
50
|
+
|
|
51
|
+
const parts = url.pathname.split('/').filter(Boolean);
|
|
52
|
+
if (parts.length !== 2) return '';
|
|
53
|
+
|
|
54
|
+
const owner = parts[0].toLowerCase();
|
|
55
|
+
const repo = parts[1].toLowerCase();
|
|
56
|
+
if (RESERVED.has(owner) || RESERVED.has(repo)) return '';
|
|
57
|
+
|
|
58
|
+
return url.origin + '/' + parts[0] + '/' + parts[1];
|
|
59
|
+
} catch {
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const scoreCard = (node) => {
|
|
65
|
+
const text = normalize(node.textContent || '');
|
|
66
|
+
const linkCount = node.querySelectorAll('a[href]').length;
|
|
67
|
+
if (!text || linkCount > 45) return -Infinity;
|
|
68
|
+
|
|
69
|
+
const hasDesc = !!node.querySelector('.project-desc, .project-description, .description, .desc, [class*="desc"], [class*="intro"], [class*="summary"], p');
|
|
70
|
+
const hasMetric = !!node.querySelector('a[href*="stargazers"], a[href*="stars"], [class*="star"], [class*="collect"], [class*="watch"], [aria-label*="star" i], [title*="star" i]');
|
|
71
|
+
let score = Math.min(text.length, 1200) - linkCount * 6;
|
|
72
|
+
if (hasDesc) score += 260;
|
|
73
|
+
if (hasMetric) score += 360;
|
|
74
|
+
if (/(?:stars?|star|stargazers?|\\u6536\\u85CF|\\u5173\\u6CE8|\\u70B9\\u8D5E|★|⭐)/i.test(text)) score += 220;
|
|
75
|
+
return score;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const pickCard = (link) => {
|
|
79
|
+
let best = link;
|
|
80
|
+
let bestScore = scoreCard(link);
|
|
81
|
+
let node = link;
|
|
82
|
+
for (let i = 0; i < 7 && node.parentElement; i++) {
|
|
83
|
+
node = node.parentElement;
|
|
84
|
+
const score = scoreCard(node);
|
|
85
|
+
if (score > bestScore) {
|
|
86
|
+
best = node;
|
|
87
|
+
bestScore = score;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return best;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const extractStars = (card) => {
|
|
94
|
+
const classToken = /(star|stargazer|collect|watch)/i;
|
|
95
|
+
const metricNodes = card.querySelectorAll(
|
|
96
|
+
'a[href*="stargazers"], a[href*="stars"], [class*="star"], [class*="collect"], [class*="watch"], [aria-label*="star" i], [title*="star" i], span, strong, small, em, div'
|
|
97
|
+
);
|
|
98
|
+
for (const node of metricNodes) {
|
|
99
|
+
const className = String(node.className || '');
|
|
100
|
+
const raw = normalize([
|
|
101
|
+
node.textContent || '',
|
|
102
|
+
node.getAttribute?.('title') || '',
|
|
103
|
+
node.getAttribute?.('aria-label') || '',
|
|
104
|
+
node.nextElementSibling?.textContent || '',
|
|
105
|
+
].join(' '));
|
|
106
|
+
if (!raw) continue;
|
|
107
|
+
if (!/(?:stars?|star|stargazers?|\\u6536\\u85CF|\\u5173\\u6CE8|\\u70B9\\u8D5E|★|⭐)/i.test(raw) && !classToken.test(className)) continue;
|
|
108
|
+
const match = raw.match(STAR_TOKEN);
|
|
109
|
+
if (match) return match[1].replace(/\\s+/g, '');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const directStar = card.querySelector(
|
|
113
|
+
'.project-stars-count-box .stars-count, .stars-count, [class*="stars-count"], [class*="starsCount"]'
|
|
114
|
+
);
|
|
115
|
+
const directStarText = normalize(directStar?.textContent || '');
|
|
116
|
+
const directMatch = directStarText.match(STAR_TOKEN);
|
|
117
|
+
if (directMatch) return directMatch[1].replace(/\\s+/g, '');
|
|
118
|
+
|
|
119
|
+
const text = normalize(card.textContent || '');
|
|
120
|
+
const patterns = [
|
|
121
|
+
/(?:stars?|star|stargazers?|\\u6536\\u85CF|\\u5173\\u6CE8|\\u70B9\\u8D5E)\\s*[::]?\\s*(\\d+(?:[.,]\\d+)?(?:\\s*[kKmMwW\\u4E07])?)/i,
|
|
122
|
+
/(\\d+(?:[.,]\\d+)?(?:\\s*[kKmMwW\\u4E07])?)\\s*(?:stars?|star|stargazers?|\\u6536\\u85CF|\\u5173\\u6CE8|\\u70B9\\u8D5E)/i,
|
|
123
|
+
/[★⭐]\\s*(\\d+(?:[.,]\\d+)?(?:\\s*[kKmMwW\\u4E07])?)/,
|
|
124
|
+
];
|
|
125
|
+
|
|
126
|
+
for (const pattern of patterns) {
|
|
127
|
+
const match = text.match(pattern);
|
|
128
|
+
if (match) return match[1].replace(/\\s+/g, '');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return '';
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const pickDescription = (card, name) => {
|
|
135
|
+
const directNodes = Array.from(
|
|
136
|
+
card.querySelectorAll('.project-desc, .project-description, .description, .desc, [class*="description"], [class*="desc"], [class*="intro"], [class*="summary"], p')
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
const seen = new Set();
|
|
140
|
+
const candidates = [];
|
|
141
|
+
for (const node of directNodes) {
|
|
142
|
+
const textCandidates = [
|
|
143
|
+
node.textContent || '',
|
|
144
|
+
node.getAttribute?.('title') || '',
|
|
145
|
+
node.getAttribute?.('aria-label') || '',
|
|
146
|
+
].map((value) => normalize(value || '')).filter(Boolean);
|
|
147
|
+
|
|
148
|
+
for (const text of textCandidates) {
|
|
149
|
+
if (!text || text === name || seen.has(text)) continue;
|
|
150
|
+
if (text.length < 6 || text.length > 320) continue;
|
|
151
|
+
if (/^(?:stars?|star|fork|issues?|\\u6536\\u85CF|\\u5173\\u6CE8|\\u70B9\\u8D5E|\\d+(?:[.,]\\d+)?)$/i.test(text)) continue;
|
|
152
|
+
seen.add(text);
|
|
153
|
+
candidates.push(text);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (candidates.length > 0) {
|
|
157
|
+
candidates.sort((left, right) => right.length - left.length);
|
|
158
|
+
return candidates[0];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const text = normalize(card.textContent || '')
|
|
162
|
+
.replace(/window\\.gon\\._errorText\\s*=\\s*"[^"]*"/g, '');
|
|
163
|
+
if (!text) return '-';
|
|
164
|
+
const cleaned = text
|
|
165
|
+
.replace(name, '')
|
|
166
|
+
.replace(/(?:stars?|star|stargazers?|fork|issues?|\\u6536\\u85CF|\\u5173\\u6CE8|\\u70B9\\u8D5E)\\s*[::]?\\s*\\d+(?:[.,]\\d+)?(?:\\s*[kKmMwW\\u4E07])?/ig, '')
|
|
167
|
+
.replace(/\\d+(?:[.,]\\d+)?(?:\\s*[kKmMwW\\u4E07])?\\s*(?:stars?|star|stargazers?|\\u6536\\u85CF|\\u5173\\u6CE8|\\u70B9\\u8D5E)/ig, '')
|
|
168
|
+
.replace(/\\|\\s*\\d+\\s*(?:\\u79D2\\u524D|\\u5206\\u949F\\u524D|\\u5C0F\\u65F6\\u524D|\\u5929\\u524D)/g, '')
|
|
169
|
+
.replace(/\\s+/g, ' ')
|
|
170
|
+
.trim();
|
|
171
|
+
return cleaned ? cleaned.slice(0, 300) : '-';
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const countRepoLinks = (root) => {
|
|
175
|
+
const links = root.querySelectorAll('a[href]');
|
|
176
|
+
let count = 0;
|
|
177
|
+
for (const link of links) {
|
|
178
|
+
if (toRepoUrl(link.getAttribute('href') || '')) count++;
|
|
179
|
+
}
|
|
180
|
+
return count;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
let root = document;
|
|
184
|
+
const headingNodes = Array.from(document.querySelectorAll('h1, h2, h3, h4, h5, div, span'))
|
|
185
|
+
.filter((node) => {
|
|
186
|
+
const text = normalize(node.textContent || '');
|
|
187
|
+
if (!text || text.length > 20) return false;
|
|
188
|
+
return KEYWORDS.some((keyword) => text.includes(keyword));
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
let bestCount = 0;
|
|
192
|
+
for (const heading of headingNodes) {
|
|
193
|
+
let candidate = heading;
|
|
194
|
+
for (let i = 0; i < 4 && candidate.parentElement; i++) {
|
|
195
|
+
candidate = candidate.parentElement;
|
|
196
|
+
const count = countRepoLinks(candidate);
|
|
197
|
+
if (count > bestCount) {
|
|
198
|
+
bestCount = count;
|
|
199
|
+
root = candidate;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const seen = new Set();
|
|
205
|
+
const projects = [];
|
|
206
|
+
const collect = (scope) => {
|
|
207
|
+
const links = scope.querySelectorAll('a[href]');
|
|
208
|
+
for (const link of links) {
|
|
209
|
+
const url = toRepoUrl(link.getAttribute('href') || '');
|
|
210
|
+
if (!url || seen.has(url)) continue;
|
|
211
|
+
|
|
212
|
+
const card = pickCard(link);
|
|
213
|
+
const titleAttr = normalize(link.getAttribute('title') || '');
|
|
214
|
+
const nameText = normalize(link.textContent || '');
|
|
215
|
+
const pathParts = new URL(url).pathname.split('/').filter(Boolean);
|
|
216
|
+
const fallbackName = pathParts.join('/');
|
|
217
|
+
const nameCandidate = titleAttr || nameText;
|
|
218
|
+
const name = (nameCandidate && nameCandidate.length <= 120
|
|
219
|
+
? nameCandidate.replace(/\\s*\\/\\s*/g, '/')
|
|
220
|
+
: fallbackName) || fallbackName;
|
|
221
|
+
if (!name) continue;
|
|
222
|
+
|
|
223
|
+
projects.push({
|
|
224
|
+
name,
|
|
225
|
+
description: pickDescription(card, name),
|
|
226
|
+
stars: extractStars(card),
|
|
227
|
+
url,
|
|
228
|
+
});
|
|
229
|
+
seen.add(url);
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
collect(root);
|
|
234
|
+
if (projects.length < 8 && root !== document) {
|
|
235
|
+
collect(document);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return projects;
|
|
239
|
+
})()
|
|
240
|
+
`);if(!Array.isArray(o))throw new h("FETCH_ERROR","Failed to parse Gitee Explore page","Gitee may have changed its page structure");const a=o.map(M).filter((n)=>n!==null).map((n)=>F(n,s.get(n.url))).map((n)=>({...n,description:_(n.description)})).slice(0,r);if(a.length===0)throw new h("NOT_FOUND","No recommended projects found on Gitee Explore","Gitee may be blocking this request or the page structure changed");return a}});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import{CliError as a}from"@jackwener/opencli/errors";import{cli as k,Strategy as h}from"@jackwener/opencli/registry";const y="https://gitee.com",A="https://gitee.com/api/v5/users";function _(e){return e.replace(/\s+/g," ").trim()}function C(e){return e.trim().replace(/^@+/,"").replace(/^\/+|\/+$/g,"")}function m(e){if(!e||typeof e!=="object"||Array.isArray(e))return null;return e}function l(e){if(typeof e==="string")return _(e);if(typeof e==="number"&&Number.isFinite(e))return String(e);if(Array.isArray(e))for(const n of e){const t=l(n);if(t)return t}return""}function s(e){const n=l(e);if(!n)return"";const o=n.replace(/,/g,"").match(/\d+(?:[.]\d+)?(?:[kKmMwW]|\u4E07)?/);if(o)return o[0];return""}function d(...e){for(const n of e)if(typeof n==="string"&&n.trim())return n.trim();return""}function I(e){if(!e)return"";const n=["gitee_index","giteeIndex","index","score","contribution_score","contributionScore","contribution_index","contributionIndex"];for(const t of n){const o=s(e[t]);if(o)return o}return""}k({site:"gitee",name:"user",access:"read",description:"Show a Gitee user profile panel",domain:"gitee.com",strategy:h.PUBLIC,browser:!0,args:[{name:"username",positional:!0,required:!0,help:"Gitee username"}],columns:["field","value"],func:async(e,n)=>{const t=C(String(n.username??""));if(!t)throw new a("INVALID_ARGUMENT","Username is required","Use: opencli gitee user <username>");const o=`${y}/${encodeURIComponent(t)}`;await e.goto(o);await e.wait(2);const f=await e.evaluate(`
|
|
2
|
+
(() => {
|
|
3
|
+
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim();
|
|
4
|
+
const extractCount = (value) => {
|
|
5
|
+
const text = normalize(value).replace(/,/g, '');
|
|
6
|
+
if (!text) return '';
|
|
7
|
+
const match = text.match(/\\d+(?:[.]\\d+)?(?:\\s*[kKmMwW\\u4E07])?/);
|
|
8
|
+
return match ? match[0].replace(/\\s+/g, '') : '';
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const title = normalize(document.title || '');
|
|
12
|
+
const bodyText = normalize(document.body?.innerText || '');
|
|
13
|
+
const notFound = /404|页面不存在|资源不存在|page not found/i.test(title + ' ' + bodyText);
|
|
14
|
+
const blocked = /访问受限|没有访问权限|forbidden|denied/i.test(bodyText);
|
|
15
|
+
|
|
16
|
+
const nicknameCandidates = Array.from(
|
|
17
|
+
document.querySelectorAll('.users__personal-name h2 span[title], .users__personal-name h2 [title], .users__personal-name h2 span, .users__personal-name h2, h1'),
|
|
18
|
+
);
|
|
19
|
+
const nicknameNode = nicknameCandidates.find((node) => {
|
|
20
|
+
const titleAttr = node && node.getAttribute ? node.getAttribute('title') : '';
|
|
21
|
+
const text = normalize((titleAttr || node.textContent || '').replace(/\\(\\s*备注名\\s*\\)/g, ''));
|
|
22
|
+
return !!text && !/备注名/.test(text);
|
|
23
|
+
}) || null;
|
|
24
|
+
const nicknameFromAttr = nicknameNode && nicknameNode.getAttribute ? nicknameNode.getAttribute('title') : '';
|
|
25
|
+
const nickname = normalize((nicknameFromAttr || nicknameNode?.textContent || '').replace(/\\(\\s*备注名\\s*\\)/g, ''));
|
|
26
|
+
|
|
27
|
+
let followers = extractCount(document.querySelector('#followers-number .social-count, #followers-number .follow-num')?.textContent || '');
|
|
28
|
+
if (!followers) {
|
|
29
|
+
const card = Array.from(document.querySelectorAll('.users__personal-socials .four.wide.column, .users__personal-socials [class*="column"]'))
|
|
30
|
+
.find((el) => /followers/i.test(normalize(el.textContent || '')));
|
|
31
|
+
if (card) followers = extractCount(card.textContent || '');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let publicRepos = '';
|
|
35
|
+
const projectLink = Array.from(document.querySelectorAll('a[href]'))
|
|
36
|
+
.find((el) => /\\/[^/?#]+\\/projects(?:$|[/?#])/i.test(el.getAttribute('href') || ''));
|
|
37
|
+
if (projectLink) publicRepos = extractCount(projectLink.textContent || '');
|
|
38
|
+
|
|
39
|
+
let giteeIndex = '';
|
|
40
|
+
const indexNodes = Array.from(
|
|
41
|
+
document.querySelectorAll('.users__personal-info *, .users__personal-container *, [class*="index" i], [id*="index" i], [class*="score" i], [id*="score" i]'),
|
|
42
|
+
);
|
|
43
|
+
for (const node of indexNodes) {
|
|
44
|
+
const text = normalize(node.textContent || '');
|
|
45
|
+
if (!/(码云指数|gitee\\s*index|gitee\\s*指数)/i.test(text)) continue;
|
|
46
|
+
|
|
47
|
+
const direct = text.match(/(?:码云指数|gitee\\s*index|gitee\\s*指数)[::]?\\s*(\\d+(?:[.]\\d+)?(?:\\s*[kKmMwW\\u4E07])?)/i);
|
|
48
|
+
if (direct?.[1]) {
|
|
49
|
+
giteeIndex = direct[1].replace(/\\s+/g, '');
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const siblingText = normalize(node.nextElementSibling?.textContent || '');
|
|
54
|
+
const parentText = normalize(node.parentElement?.textContent || '');
|
|
55
|
+
const around = extractCount(siblingText + ' ' + parentText);
|
|
56
|
+
if (around) {
|
|
57
|
+
giteeIndex = around;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
notFound,
|
|
64
|
+
blocked,
|
|
65
|
+
nickname,
|
|
66
|
+
followers,
|
|
67
|
+
publicRepos,
|
|
68
|
+
giteeIndex,
|
|
69
|
+
};
|
|
70
|
+
})()
|
|
71
|
+
`),r=m(f),i={notFound:r?.notFound===!0,blocked:r?.blocked===!0,nickname:l(r?.nickname),followers:s(r?.followers),publicRepos:s(r?.publicRepos),giteeIndex:s(r?.giteeIndex)};if(i.notFound)throw new a("NOT_FOUND",`Gitee user "${t}" does not exist`,"Check the username and retry: opencli gitee user <username>");if(i.blocked)throw new a("FORBIDDEN",`Gitee user page "${t}" is not accessible`,"The profile may be private/restricted, or the account may be unavailable");const p=`${A}/${encodeURIComponent(t)}`,u=await fetch(p,{headers:{Accept:"application/json","User-Agent":"Mozilla/5.0",Referer:o}});if(u.status===404)throw new a("NOT_FOUND",`Gitee user "${t}" does not exist`,"Check the username and retry: opencli gitee user <username>");if(!u.ok)throw new a("REQUEST_FAILED",`Failed to read Gitee user profile API: ${u.status}`,"Try again later or verify network access to gitee.com");const c=m(await u.json()),x=d(i.nickname,l(c?.name),l(c?.login),t),g=d(i.followers,s(c?.followers),"-"),b=d(i.publicRepos,s(c?.public_repos),"-"),w=d(i.giteeIndex,I(c),"-");return[{field:"Nickname",value:x},{field:"Followers",value:g},{field:"Public Repositories",value:b},{field:"Gitee Index",value:w},{field:"URL",value:o}]}});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{AuthRequiredError as n}from"@jackwener/opencli/errors";import{registerSiteAuthCommands as s}from"../_shared/site-auth.js";async function r(t){const e=await t.getCookies({url:"https://github.com"}),o=new Set(e.filter((i)=>i.value).map((i)=>i.name));return o.has("user_session")||o.has("dotcom_user")||o.has("logged_in")}async function a(t){await t.goto("https://github.com/settings/profile");await t.wait(1);const e=await t.evaluate(`() => {
|
|
2
|
+
const meta = (name) => document.querySelector('meta[name="' + name + '"]')?.getAttribute('content') || '';
|
|
3
|
+
const username = meta('octolytics-actor-login');
|
|
4
|
+
const id = meta('octolytics-actor-id');
|
|
5
|
+
const name = document.querySelector('input#user_profile_name')?.value || '';
|
|
6
|
+
return { username, id, name, url: location.href };
|
|
7
|
+
}`);if(!e?.username||/\/login(?:\?|$)/.test(String(e?.url??"")))throw new n("github.com","Could not detect a logged-in GitHub account");return{id:e.id||"",username:e.username,name:e.name||"",url:`https://github.com/${e.username}`}}s({site:"github",domain:"github.com",loginUrl:"https://github.com/login",columns:["id","username","name","url"],quickCheck:r,verify:a,poll:async(t)=>{if(!await r(t))throw new n("github.com","Waiting for GitHub session cookies");return a(t)}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as $,Strategy as E}from"@jackwener/opencli/registry";import{ArgumentError as d,CommandExecutionError as c,EmptyResultError as x}from"@jackwener/opencli/errors";const k={daily:"daily",weekly:"weekly",monthly:"monthly"};function f(t){return String(t??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�?39;/g,"'").replace(/'/gi,"'").replace(/ /g," ")}function g(t){return String(t??"").replace(/<[^>]*>/g,"")}function T(t){if(t==null)return null;const s=String(t).replace(/[,\s]/g,"");if(!/^\d+$/.test(s))return null;return Number(s)}function M(t){return String(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(t,s,o){const e=T(t);if(e==null)throw new c(`github-trending parser drift: missing ${s} for ${o}`);return e}function A(t){return/don.t have any trending repositories/i.test(g(t))||/no trending repositories/i.test(g(t))}function C(t,s){const o=Array.from(String(t??"").matchAll(/<article\b[^>]*class="[^"]*\bBox-row\b[^"]*"[^>]*>([\s\S]*?)<\/article>/g)).map((l)=>l[1]),e=[];if(o.length===0){if(A(t))return e;throw new c("github-trending parser drift: no repository rows found")}for(const l of o){const n=l,p=n.match(/<h2\b[\s\S]*?href="\/([^"/?#]+\/[^"/?#]+)"/);if(!p)throw new c("github-trending parser drift: missing repository link");const i=f(p[1]).trim();if(!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(i))throw new c(`github-trending parser drift: invalid repository identity "${i}"`);const a=n.match(/<p class="col-9 color-fg-muted[^"]*">([\s\S]*?)<\/p>/),h=a?f(g(a[1]).replace(/\s+/g," ")).trim():"",u=n.match(/<span itemprop="programmingLanguage">([\s\S]*?)<\/span>/),r=u?f(g(u[1])).trim():null,m=M(i),y=n.match(new RegExp(`<a\\b[^>]*href="/${m}/stargazers"[^>]*>([\\s\\S]*?)</a>`)),w=n.match(new RegExp(`<a\\b[^>]*href="/${m}/forks"[^>]*>([\\s\\S]*?)</a>`)),S=n.match(/([\d,]+)\s+stars\s+(?:today|this week|this month)/i);e.push({repo:i,description:h,language:r,stars:b(y?g(y[1]):null,"stars",i),forks:b(w?g(w[1]):null,"forks",i),starsSince:b(S?.[1],"period stars",i),url:`https://github.com/${i}`});if(e.length>=s)break}return e}$({site:"github-trending",name:"repos",access:"read",description:"GitHub Trending repositories (public, no login). Filter by --language and --since.",domain:"github.com",strategy:E.PUBLIC,browser:!1,args:[{name:"since",type:"string",default:"daily",help:"Time range: daily / weekly / monthly"},{name:"language",type:"string",default:"",help:'Filter by programming language slug, e.g. python, rust, "c++"'},{name:"limit",type:"int",default:25,help:"Number of repositories to return (max 25)"}],columns:["rank","repo","description","language","stars","forks","starsSince","url"],func:async(t)=>{const s=String(t.since??"daily").toLowerCase(),o=k[s];if(!o)throw new d(`Unknown --since "${s}". Valid: ${Object.keys(k).join(", ")}`);const e=Number(t.limit??25);if(!Number.isInteger(e)||e<=0)throw new d("--limit must be a positive integer");if(e>25)throw new d("--limit must be <= 25 (GitHub Trending lists at most 25 repositories)");const l=e,n=String(t.language??"").trim(),p=n?`/trending/${encodeURIComponent(n)}`:"/trending",i=new URL(`https://github.com${p}`);i.searchParams.set("since",o);let a;try{a=await fetch(i,{headers:{"User-Agent":"Mozilla/5.0 (compatible; opencli/github-trending)",Accept:"text/html"}})}catch(r){throw new c(`github-trending request failed: ${r?.message||r}`)}if(!a.ok)throw new c(`github-trending request failed: HTTP ${a.status}`);const h=await a.text(),u=C(h,l);if(u.length===0)throw new x("github-trending",n?`no trending repositories for language "${n}" (${o})`:`no trending repositories (${o})`);return u.map((r,m)=>({rank:m+1,repo:r.repo,description:r.description,language:r.language,stars:r.stars,forks:r.forks,starsSince:r.starsSince,url:r.url}))}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cli as N,Strategy as O}from"@jackwener/opencli/registry";import{CliError as J}from"@jackwener/opencli/errors";import{parseRssItems as P}from"./utils.js";N({site:"google",name:"news",access:"read",description:"Get Google News headlines",strategy:O.PUBLIC,browser:!1,args:[{name:"keyword",positional:!0,help:"Search query (omit for top stories)"},{name:"limit",type:"int",default:10,help:"Number of results"},{name:"lang",default:"en",help:"Language short code (e.g. en, zh)"},{name:"region",default:"US",help:"Region code (e.g. US, CN)"}],columns:["title","source","date","url"],func:async(h)=>{const K=Math.max(1,Math.min(Number(h.limit),100)),D=encodeURIComponent(h.lang),F=encodeURIComponent(h.region),G=`${h.region}:${h.lang}`,L=h.keyword?`https://news.google.com/rss/search?q=${encodeURIComponent(h.keyword)}&hl=${D}&gl=${F}&ceid=${G}`:`https://news.google.com/rss?hl=${D}&gl=${F}&ceid=${G}`,z=await fetch(L);if(!z.ok)throw new J("FETCH_ERROR",`HTTP ${z.status}`,"Check your network connection");const M=await z.text(),H=P(M,["title","link","pubDate","source"]);if(!H.length)throw new J("NOT_FOUND","No news articles found","Try a different keyword or region");return H.slice(0,K).map((v)=>{let q=v.title||"",A=v.source||"";if(!A){const B=q.lastIndexOf(" - ");if(B!==-1){A=q.slice(B+3);q=q.slice(0,B)}}return{title:q,source:A,date:v.pubDate||"",url:v.link||""}})}});
|