@huyuan-ai/cli 1.0.0 → 1.0.2
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/package.json +14 -6
- package/vendor/opencli/dist/analysis.d.ts +38 -0
- package/vendor/opencli/dist/analysis.js +166 -0
- package/vendor/opencli/dist/browser/base-page.d.ts +50 -0
- package/vendor/opencli/dist/browser/base-page.js +193 -0
- package/vendor/opencli/dist/browser/bridge.d.ts +21 -0
- package/vendor/opencli/dist/browser/bridge.js +109 -0
- package/vendor/opencli/dist/browser/cdp.d.ts +40 -0
- package/vendor/opencli/dist/browser/cdp.js +310 -0
- package/vendor/opencli/dist/browser/cdp.test.d.ts +1 -0
- package/vendor/opencli/dist/browser/cdp.test.js +52 -0
- package/vendor/opencli/dist/browser/daemon-client.d.ts +74 -0
- package/vendor/opencli/dist/browser/daemon-client.js +113 -0
- package/vendor/opencli/dist/browser/daemon-client.test.d.ts +1 -0
- package/vendor/opencli/dist/browser/daemon-client.test.js +77 -0
- package/vendor/opencli/dist/browser/discover.d.ts +15 -0
- package/vendor/opencli/dist/browser/discover.js +19 -0
- package/vendor/opencli/dist/browser/dom-helpers.d.ts +41 -0
- package/vendor/opencli/dist/browser/dom-helpers.js +227 -0
- package/vendor/opencli/dist/browser/dom-helpers.test.d.ts +1 -0
- package/vendor/opencli/dist/browser/dom-helpers.test.js +105 -0
- package/vendor/opencli/dist/browser/dom-snapshot.d.ts +86 -0
- package/vendor/opencli/dist/browser/dom-snapshot.js +804 -0
- package/vendor/opencli/dist/browser/dom-snapshot.test.d.ts +11 -0
- package/vendor/opencli/dist/browser/dom-snapshot.test.js +248 -0
- package/vendor/opencli/dist/browser/errors.d.ts +13 -0
- package/vendor/opencli/dist/browser/errors.js +40 -0
- package/vendor/opencli/dist/browser/index.d.ts +13 -0
- package/vendor/opencli/dist/browser/index.js +12 -0
- package/vendor/opencli/dist/browser/page.d.ts +62 -0
- package/vendor/opencli/dist/browser/page.js +304 -0
- package/vendor/opencli/dist/browser/page.test.d.ts +1 -0
- package/vendor/opencli/dist/browser/page.test.js +44 -0
- package/vendor/opencli/dist/browser/stealth.d.ts +16 -0
- package/vendor/opencli/dist/browser/stealth.js +353 -0
- package/vendor/opencli/dist/browser/stealth.test.d.ts +1 -0
- package/vendor/opencli/dist/browser/stealth.test.js +134 -0
- package/vendor/opencli/dist/browser/tabs.d.ts +13 -0
- package/vendor/opencli/dist/browser/tabs.js +70 -0
- package/vendor/opencli/dist/browser/utils.d.ts +10 -0
- package/vendor/opencli/dist/browser/utils.js +27 -0
- package/vendor/opencli/dist/browser.test.d.ts +1 -0
- package/vendor/opencli/dist/browser.test.js +159 -0
- package/vendor/opencli/dist/build-manifest.d.ts +47 -0
- package/vendor/opencli/dist/build-manifest.js +225 -0
- package/vendor/opencli/dist/build-manifest.test.d.ts +1 -0
- package/vendor/opencli/dist/build-manifest.test.js +176 -0
- package/vendor/opencli/dist/capabilityRouting.d.ts +4 -0
- package/vendor/opencli/dist/capabilityRouting.js +31 -0
- package/vendor/opencli/dist/capabilityRouting.test.d.ts +1 -0
- package/vendor/opencli/dist/capabilityRouting.test.js +42 -0
- package/vendor/opencli/dist/cascade.d.ts +46 -0
- package/vendor/opencli/dist/cascade.js +149 -0
- package/vendor/opencli/dist/cli-manifest.json +16706 -0
- package/vendor/opencli/dist/cli.d.ts +9 -0
- package/vendor/opencli/dist/cli.js +953 -0
- package/vendor/opencli/dist/cli.test.d.ts +1 -0
- package/vendor/opencli/dist/cli.test.js +88 -0
- package/vendor/opencli/dist/clis/1688/item.d.ts +70 -0
- package/vendor/opencli/dist/clis/1688/item.js +187 -0
- package/vendor/opencli/dist/clis/1688/item.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/1688/item.test.js +67 -0
- package/vendor/opencli/dist/clis/1688/search.d.ts +56 -0
- package/vendor/opencli/dist/clis/1688/search.js +309 -0
- package/vendor/opencli/dist/clis/1688/search.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/1688/search.test.js +75 -0
- package/vendor/opencli/dist/clis/1688/shared.d.ts +112 -0
- package/vendor/opencli/dist/clis/1688/shared.js +514 -0
- package/vendor/opencli/dist/clis/1688/shared.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/1688/shared.test.js +57 -0
- package/vendor/opencli/dist/clis/1688/store.d.ts +45 -0
- package/vendor/opencli/dist/clis/1688/store.js +226 -0
- package/vendor/opencli/dist/clis/1688/store.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/1688/store.test.js +62 -0
- package/vendor/opencli/dist/clis/36kr/article.d.ts +1 -0
- package/vendor/opencli/dist/clis/36kr/article.js +62 -0
- package/vendor/opencli/dist/clis/36kr/hot.d.ts +3 -0
- package/vendor/opencli/dist/clis/36kr/hot.js +80 -0
- package/vendor/opencli/dist/clis/36kr/hot.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/36kr/hot.test.js +15 -0
- package/vendor/opencli/dist/clis/36kr/news.d.ts +1 -0
- package/vendor/opencli/dist/clis/36kr/news.js +51 -0
- package/vendor/opencli/dist/clis/36kr/news.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/36kr/news.test.js +85 -0
- package/vendor/opencli/dist/clis/36kr/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/36kr/search.js +72 -0
- package/vendor/opencli/dist/clis/_shared/common.d.ts +8 -0
- package/vendor/opencli/dist/clis/_shared/common.js +10 -0
- package/vendor/opencli/dist/clis/_shared/desktop-commands.d.ts +22 -0
- package/vendor/opencli/dist/clis/_shared/desktop-commands.js +108 -0
- package/vendor/opencli/dist/clis/amazon/bestsellers.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/bestsellers.js +7 -0
- package/vendor/opencli/dist/clis/amazon/bestsellers.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/bestsellers.test.js +29 -0
- package/vendor/opencli/dist/clis/amazon/discussion.d.ts +20 -0
- package/vendor/opencli/dist/clis/amazon/discussion.js +91 -0
- package/vendor/opencli/dist/clis/amazon/discussion.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/discussion.test.js +36 -0
- package/vendor/opencli/dist/clis/amazon/movers-shakers.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/movers-shakers.js +7 -0
- package/vendor/opencli/dist/clis/amazon/new-releases.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/new-releases.js +7 -0
- package/vendor/opencli/dist/clis/amazon/offer.d.ts +23 -0
- package/vendor/opencli/dist/clis/amazon/offer.js +140 -0
- package/vendor/opencli/dist/clis/amazon/offer.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/offer.test.js +29 -0
- package/vendor/opencli/dist/clis/amazon/product.d.ts +18 -0
- package/vendor/opencli/dist/clis/amazon/product.js +92 -0
- package/vendor/opencli/dist/clis/amazon/product.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/product.test.js +24 -0
- package/vendor/opencli/dist/clis/amazon/rankings.d.ts +59 -0
- package/vendor/opencli/dist/clis/amazon/rankings.js +226 -0
- package/vendor/opencli/dist/clis/amazon/rankings.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/rankings.test.js +41 -0
- package/vendor/opencli/dist/clis/amazon/search.d.ts +18 -0
- package/vendor/opencli/dist/clis/amazon/search.js +87 -0
- package/vendor/opencli/dist/clis/amazon/search.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/search.test.js +22 -0
- package/vendor/opencli/dist/clis/amazon/shared.d.ts +75 -0
- package/vendor/opencli/dist/clis/amazon/shared.js +365 -0
- package/vendor/opencli/dist/clis/amazon/shared.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/amazon/shared.test.js +44 -0
- package/vendor/opencli/dist/clis/antigravity/dump.d.ts +1 -0
- package/vendor/opencli/dist/clis/antigravity/dump.js +28 -0
- package/vendor/opencli/dist/clis/antigravity/extract-code.d.ts +1 -0
- package/vendor/opencli/dist/clis/antigravity/extract-code.js +32 -0
- package/vendor/opencli/dist/clis/antigravity/model.d.ts +1 -0
- package/vendor/opencli/dist/clis/antigravity/model.js +44 -0
- package/vendor/opencli/dist/clis/antigravity/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/antigravity/new.js +25 -0
- package/vendor/opencli/dist/clis/antigravity/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/antigravity/read.js +34 -0
- package/vendor/opencli/dist/clis/antigravity/send.d.ts +1 -0
- package/vendor/opencli/dist/clis/antigravity/send.js +35 -0
- package/vendor/opencli/dist/clis/antigravity/serve.d.ts +14 -0
- package/vendor/opencli/dist/clis/antigravity/serve.js +512 -0
- package/vendor/opencli/dist/clis/antigravity/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/antigravity/status.js +18 -0
- package/vendor/opencli/dist/clis/antigravity/watch.d.ts +1 -0
- package/vendor/opencli/dist/clis/antigravity/watch.js +41 -0
- package/vendor/opencli/dist/clis/apple-podcasts/commands.test.d.ts +2 -0
- package/vendor/opencli/dist/clis/apple-podcasts/commands.test.js +99 -0
- package/vendor/opencli/dist/clis/apple-podcasts/episodes.d.ts +1 -0
- package/vendor/opencli/dist/clis/apple-podcasts/episodes.js +28 -0
- package/vendor/opencli/dist/clis/apple-podcasts/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/apple-podcasts/search.js +30 -0
- package/vendor/opencli/dist/clis/apple-podcasts/top.d.ts +1 -0
- package/vendor/opencli/dist/clis/apple-podcasts/top.js +44 -0
- package/vendor/opencli/dist/clis/apple-podcasts/utils.d.ts +11 -0
- package/vendor/opencli/dist/clis/apple-podcasts/utils.js +30 -0
- package/vendor/opencli/dist/clis/apple-podcasts/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/apple-podcasts/utils.test.js +57 -0
- package/vendor/opencli/dist/clis/arxiv/paper.d.ts +1 -0
- package/vendor/opencli/dist/clis/arxiv/paper.js +21 -0
- package/vendor/opencli/dist/clis/arxiv/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/arxiv/search.js +24 -0
- package/vendor/opencli/dist/clis/arxiv/utils.d.ts +18 -0
- package/vendor/opencli/dist/clis/arxiv/utils.js +49 -0
- package/vendor/opencli/dist/clis/band/bands.d.ts +1 -0
- package/vendor/opencli/dist/clis/band/bands.js +72 -0
- package/vendor/opencli/dist/clis/band/mentions.d.ts +1 -0
- package/vendor/opencli/dist/clis/band/mentions.js +127 -0
- package/vendor/opencli/dist/clis/band/post.d.ts +1 -0
- package/vendor/opencli/dist/clis/band/post.js +175 -0
- package/vendor/opencli/dist/clis/band/posts.d.ts +1 -0
- package/vendor/opencli/dist/clis/band/posts.js +94 -0
- package/vendor/opencli/dist/clis/barchart/flow.d.ts +1 -0
- package/vendor/opencli/dist/clis/barchart/flow.js +115 -0
- package/vendor/opencli/dist/clis/barchart/greeks.d.ts +1 -0
- package/vendor/opencli/dist/clis/barchart/greeks.js +119 -0
- package/vendor/opencli/dist/clis/barchart/options.d.ts +1 -0
- package/vendor/opencli/dist/clis/barchart/options.js +106 -0
- package/vendor/opencli/dist/clis/barchart/quote.d.ts +1 -0
- package/vendor/opencli/dist/clis/barchart/quote.js +133 -0
- package/vendor/opencli/dist/clis/bbc/news.d.ts +1 -0
- package/vendor/opencli/dist/clis/bbc/news.js +41 -0
- package/vendor/opencli/dist/clis/bilibili/comments.d.ts +5 -0
- package/vendor/opencli/dist/clis/bilibili/comments.js +40 -0
- package/vendor/opencli/dist/clis/bilibili/comments.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/comments.test.js +83 -0
- package/vendor/opencli/dist/clis/bilibili/download.d.ts +10 -0
- package/vendor/opencli/dist/clis/bilibili/download.js +81 -0
- package/vendor/opencli/dist/clis/bilibili/dynamic.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/dynamic.js +33 -0
- package/vendor/opencli/dist/clis/bilibili/dynamic.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/dynamic.test.js +68 -0
- package/vendor/opencli/dist/clis/bilibili/favorite.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/favorite.js +41 -0
- package/vendor/opencli/dist/clis/bilibili/feed.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/feed.js +64 -0
- package/vendor/opencli/dist/clis/bilibili/following.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/following.js +42 -0
- package/vendor/opencli/dist/clis/bilibili/history.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/history.js +44 -0
- package/vendor/opencli/dist/clis/bilibili/hot.yaml +38 -0
- package/vendor/opencli/dist/clis/bilibili/me.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/me.js +13 -0
- package/vendor/opencli/dist/clis/bilibili/ranking.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/ranking.js +24 -0
- package/vendor/opencli/dist/clis/bilibili/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/search.js +24 -0
- package/vendor/opencli/dist/clis/bilibili/subtitle.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/subtitle.js +92 -0
- package/vendor/opencli/dist/clis/bilibili/subtitle.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/subtitle.test.js +49 -0
- package/vendor/opencli/dist/clis/bilibili/user-videos.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/user-videos.js +38 -0
- package/vendor/opencli/dist/clis/bilibili/utils.d.ts +19 -0
- package/vendor/opencli/dist/clis/bilibili/utils.js +126 -0
- package/vendor/opencli/dist/clis/bilibili/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/bilibili/utils.test.js +17 -0
- package/vendor/opencli/dist/clis/bloomberg/businessweek.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/businessweek.js +17 -0
- package/vendor/opencli/dist/clis/bloomberg/economics.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/economics.js +17 -0
- package/vendor/opencli/dist/clis/bloomberg/feeds.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/feeds.js +15 -0
- package/vendor/opencli/dist/clis/bloomberg/industries.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/industries.js +17 -0
- package/vendor/opencli/dist/clis/bloomberg/main.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/main.js +17 -0
- package/vendor/opencli/dist/clis/bloomberg/markets.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/markets.js +17 -0
- package/vendor/opencli/dist/clis/bloomberg/news.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/news.js +105 -0
- package/vendor/opencli/dist/clis/bloomberg/opinions.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/opinions.js +17 -0
- package/vendor/opencli/dist/clis/bloomberg/politics.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/politics.js +17 -0
- package/vendor/opencli/dist/clis/bloomberg/tech.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/tech.js +17 -0
- package/vendor/opencli/dist/clis/bloomberg/utils.d.ts +34 -0
- package/vendor/opencli/dist/clis/bloomberg/utils.js +364 -0
- package/vendor/opencli/dist/clis/bloomberg/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/bloomberg/utils.test.js +129 -0
- package/vendor/opencli/dist/clis/bluesky/feeds.yaml +29 -0
- package/vendor/opencli/dist/clis/bluesky/followers.yaml +33 -0
- package/vendor/opencli/dist/clis/bluesky/following.yaml +33 -0
- package/vendor/opencli/dist/clis/bluesky/profile.yaml +27 -0
- package/vendor/opencli/dist/clis/bluesky/search.yaml +34 -0
- package/vendor/opencli/dist/clis/bluesky/starter-packs.yaml +34 -0
- package/vendor/opencli/dist/clis/bluesky/thread.yaml +32 -0
- package/vendor/opencli/dist/clis/bluesky/trending.yaml +27 -0
- package/vendor/opencli/dist/clis/bluesky/user.yaml +34 -0
- package/vendor/opencli/dist/clis/boss/batchgreet.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/batchgreet.js +60 -0
- package/vendor/opencli/dist/clis/boss/chatlist.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/chatlist.js +33 -0
- package/vendor/opencli/dist/clis/boss/chatmsg.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/chatmsg.js +42 -0
- package/vendor/opencli/dist/clis/boss/detail.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/detail.js +62 -0
- package/vendor/opencli/dist/clis/boss/exchange.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/exchange.js +45 -0
- package/vendor/opencli/dist/clis/boss/greet.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/greet.js +48 -0
- package/vendor/opencli/dist/clis/boss/invite.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/invite.js +63 -0
- package/vendor/opencli/dist/clis/boss/joblist.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/joblist.js +30 -0
- package/vendor/opencli/dist/clis/boss/mark.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/mark.js +69 -0
- package/vendor/opencli/dist/clis/boss/recommend.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/recommend.js +44 -0
- package/vendor/opencli/dist/clis/boss/resume.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/resume.js +149 -0
- package/vendor/opencli/dist/clis/boss/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/search.js +155 -0
- package/vendor/opencli/dist/clis/boss/send.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/send.js +43 -0
- package/vendor/opencli/dist/clis/boss/stats.d.ts +1 -0
- package/vendor/opencli/dist/clis/boss/stats.js +65 -0
- package/vendor/opencli/dist/clis/boss/utils.d.ts +92 -0
- package/vendor/opencli/dist/clis/boss/utils.js +223 -0
- package/vendor/opencli/dist/clis/chaoxing/assignments.d.ts +1 -0
- package/vendor/opencli/dist/clis/chaoxing/assignments.js +75 -0
- package/vendor/opencli/dist/clis/chaoxing/exams.d.ts +1 -0
- package/vendor/opencli/dist/clis/chaoxing/exams.js +74 -0
- package/vendor/opencli/dist/clis/chaoxing/utils.d.ts +58 -0
- package/vendor/opencli/dist/clis/chaoxing/utils.js +223 -0
- package/vendor/opencli/dist/clis/chaoxing/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/chaoxing/utils.test.js +45 -0
- package/vendor/opencli/dist/clis/chatgpt/ask.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatgpt/ask.js +88 -0
- package/vendor/opencli/dist/clis/chatgpt/ax.d.ts +7 -0
- package/vendor/opencli/dist/clis/chatgpt/ax.js +249 -0
- package/vendor/opencli/dist/clis/chatgpt/model.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatgpt/model.js +24 -0
- package/vendor/opencli/dist/clis/chatgpt/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatgpt/new.js +27 -0
- package/vendor/opencli/dist/clis/chatgpt/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatgpt/read.js +31 -0
- package/vendor/opencli/dist/clis/chatgpt/send.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatgpt/send.js +52 -0
- package/vendor/opencli/dist/clis/chatgpt/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatgpt/status.js +25 -0
- package/vendor/opencli/dist/clis/chatwise/ask.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatwise/ask.js +80 -0
- package/vendor/opencli/dist/clis/chatwise/export.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatwise/export.js +46 -0
- package/vendor/opencli/dist/clis/chatwise/history.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatwise/history.js +60 -0
- package/vendor/opencli/dist/clis/chatwise/model.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatwise/model.js +84 -0
- package/vendor/opencli/dist/clis/chatwise/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatwise/new.js +2 -0
- package/vendor/opencli/dist/clis/chatwise/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatwise/read.js +39 -0
- package/vendor/opencli/dist/clis/chatwise/screenshot.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatwise/screenshot.js +2 -0
- package/vendor/opencli/dist/clis/chatwise/send.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatwise/send.js +49 -0
- package/vendor/opencli/dist/clis/chatwise/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/chatwise/status.js +2 -0
- package/vendor/opencli/dist/clis/codex/ask.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/ask.js +71 -0
- package/vendor/opencli/dist/clis/codex/dump.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/dump.js +2 -0
- package/vendor/opencli/dist/clis/codex/export.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/export.js +37 -0
- package/vendor/opencli/dist/clis/codex/extract-diff.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/extract-diff.js +44 -0
- package/vendor/opencli/dist/clis/codex/history.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/history.js +43 -0
- package/vendor/opencli/dist/clis/codex/model.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/model.js +55 -0
- package/vendor/opencli/dist/clis/codex/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/new.js +2 -0
- package/vendor/opencli/dist/clis/codex/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/read.js +34 -0
- package/vendor/opencli/dist/clis/codex/screenshot.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/screenshot.js +2 -0
- package/vendor/opencli/dist/clis/codex/send.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/send.js +43 -0
- package/vendor/opencli/dist/clis/codex/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/codex/status.js +2 -0
- package/vendor/opencli/dist/clis/coupang/add-to-cart.d.ts +1 -0
- package/vendor/opencli/dist/clis/coupang/add-to-cart.js +140 -0
- package/vendor/opencli/dist/clis/coupang/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/coupang/search.js +451 -0
- package/vendor/opencli/dist/clis/coupang/utils.d.ts +24 -0
- package/vendor/opencli/dist/clis/coupang/utils.js +262 -0
- package/vendor/opencli/dist/clis/coupang/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/coupang/utils.test.js +62 -0
- package/vendor/opencli/dist/clis/ctrip/search.d.ts +14 -0
- package/vendor/opencli/dist/clis/ctrip/search.js +86 -0
- package/vendor/opencli/dist/clis/ctrip/search.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/ctrip/search.test.js +64 -0
- package/vendor/opencli/dist/clis/cursor/ask.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/ask.js +70 -0
- package/vendor/opencli/dist/clis/cursor/composer.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/composer.js +42 -0
- package/vendor/opencli/dist/clis/cursor/dump.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/dump.js +2 -0
- package/vendor/opencli/dist/clis/cursor/export.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/export.js +51 -0
- package/vendor/opencli/dist/clis/cursor/extract-code.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/extract-code.js +35 -0
- package/vendor/opencli/dist/clis/cursor/history.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/history.js +43 -0
- package/vendor/opencli/dist/clis/cursor/model.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/model.js +53 -0
- package/vendor/opencli/dist/clis/cursor/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/new.js +2 -0
- package/vendor/opencli/dist/clis/cursor/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/read.js +44 -0
- package/vendor/opencli/dist/clis/cursor/screenshot.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/screenshot.js +2 -0
- package/vendor/opencli/dist/clis/cursor/send.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/send.js +40 -0
- package/vendor/opencli/dist/clis/cursor/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/cursor/status.js +2 -0
- package/vendor/opencli/dist/clis/devto/tag.yaml +34 -0
- package/vendor/opencli/dist/clis/devto/top.yaml +29 -0
- package/vendor/opencli/dist/clis/devto/user.yaml +33 -0
- package/vendor/opencli/dist/clis/dictionary/examples.yaml +25 -0
- package/vendor/opencli/dist/clis/dictionary/search.yaml +27 -0
- package/vendor/opencli/dist/clis/dictionary/synonyms.yaml +25 -0
- package/vendor/opencli/dist/clis/discord-app/channels.d.ts +1 -0
- package/vendor/opencli/dist/clis/discord-app/channels.js +57 -0
- package/vendor/opencli/dist/clis/discord-app/members.d.ts +1 -0
- package/vendor/opencli/dist/clis/discord-app/members.js +38 -0
- package/vendor/opencli/dist/clis/discord-app/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/discord-app/read.js +45 -0
- package/vendor/opencli/dist/clis/discord-app/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/discord-app/search.js +56 -0
- package/vendor/opencli/dist/clis/discord-app/send.d.ts +1 -0
- package/vendor/opencli/dist/clis/discord-app/send.js +27 -0
- package/vendor/opencli/dist/clis/discord-app/servers.d.ts +1 -0
- package/vendor/opencli/dist/clis/discord-app/servers.js +36 -0
- package/vendor/opencli/dist/clis/discord-app/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/discord-app/status.js +16 -0
- package/vendor/opencli/dist/clis/douban/book-hot.d.ts +1 -0
- package/vendor/opencli/dist/clis/douban/book-hot.js +14 -0
- package/vendor/opencli/dist/clis/douban/download.d.ts +1 -0
- package/vendor/opencli/dist/clis/douban/download.js +67 -0
- package/vendor/opencli/dist/clis/douban/download.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douban/download.test.js +170 -0
- package/vendor/opencli/dist/clis/douban/marks.d.ts +1 -0
- package/vendor/opencli/dist/clis/douban/marks.js +115 -0
- package/vendor/opencli/dist/clis/douban/movie-hot.d.ts +1 -0
- package/vendor/opencli/dist/clis/douban/movie-hot.js +14 -0
- package/vendor/opencli/dist/clis/douban/photos.d.ts +1 -0
- package/vendor/opencli/dist/clis/douban/photos.js +34 -0
- package/vendor/opencli/dist/clis/douban/reviews.d.ts +1 -0
- package/vendor/opencli/dist/clis/douban/reviews.js +106 -0
- package/vendor/opencli/dist/clis/douban/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/douban/search.js +16 -0
- package/vendor/opencli/dist/clis/douban/subject.yaml +107 -0
- package/vendor/opencli/dist/clis/douban/top250.yaml +70 -0
- package/vendor/opencli/dist/clis/douban/utils.d.ts +63 -0
- package/vendor/opencli/dist/clis/douban/utils.js +389 -0
- package/vendor/opencli/dist/clis/douban/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douban/utils.test.js +64 -0
- package/vendor/opencli/dist/clis/doubao/ask.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/ask.js +35 -0
- package/vendor/opencli/dist/clis/doubao/detail.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/detail.js +33 -0
- package/vendor/opencli/dist/clis/doubao/detail.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/detail.test.js +42 -0
- package/vendor/opencli/dist/clis/doubao/history.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/history.js +28 -0
- package/vendor/opencli/dist/clis/doubao/history.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/history.test.js +37 -0
- package/vendor/opencli/dist/clis/doubao/meeting-summary.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/meeting-summary.js +39 -0
- package/vendor/opencli/dist/clis/doubao/meeting-transcript.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/meeting-transcript.js +36 -0
- package/vendor/opencli/dist/clis/doubao/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/new.js +20 -0
- package/vendor/opencli/dist/clis/doubao/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/read.js +19 -0
- package/vendor/opencli/dist/clis/doubao/send.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/send.js +22 -0
- package/vendor/opencli/dist/clis/doubao/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/status.js +24 -0
- package/vendor/opencli/dist/clis/doubao/utils.d.ts +50 -0
- package/vendor/opencli/dist/clis/doubao/utils.js +901 -0
- package/vendor/opencli/dist/clis/doubao/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao/utils.test.js +24 -0
- package/vendor/opencli/dist/clis/doubao-app/ask.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao-app/ask.js +53 -0
- package/vendor/opencli/dist/clis/doubao-app/dump.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao-app/dump.js +24 -0
- package/vendor/opencli/dist/clis/doubao-app/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao-app/new.js +20 -0
- package/vendor/opencli/dist/clis/doubao-app/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao-app/read.js +18 -0
- package/vendor/opencli/dist/clis/doubao-app/screenshot.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao-app/screenshot.js +18 -0
- package/vendor/opencli/dist/clis/doubao-app/send.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao-app/send.js +27 -0
- package/vendor/opencli/dist/clis/doubao-app/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/doubao-app/status.js +16 -0
- package/vendor/opencli/dist/clis/doubao-app/utils.d.ts +37 -0
- package/vendor/opencli/dist/clis/doubao-app/utils.js +110 -0
- package/vendor/opencli/dist/clis/douyin/_shared/browser-fetch.d.ts +10 -0
- package/vendor/opencli/dist/clis/douyin/_shared/browser-fetch.js +30 -0
- package/vendor/opencli/dist/clis/douyin/_shared/browser-fetch.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/_shared/browser-fetch.test.js +30 -0
- package/vendor/opencli/dist/clis/douyin/_shared/creation-id.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/_shared/creation-id.js +5 -0
- package/vendor/opencli/dist/clis/douyin/_shared/creation-id.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/_shared/creation-id.test.js +22 -0
- package/vendor/opencli/dist/clis/douyin/_shared/imagex-upload.d.ts +20 -0
- package/vendor/opencli/dist/clis/douyin/_shared/imagex-upload.js +53 -0
- package/vendor/opencli/dist/clis/douyin/_shared/imagex-upload.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/_shared/imagex-upload.test.js +87 -0
- package/vendor/opencli/dist/clis/douyin/_shared/public-api.d.ts +33 -0
- package/vendor/opencli/dist/clis/douyin/_shared/public-api.js +29 -0
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.d.ts +8 -0
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.js +21 -0
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.test.js +27 -0
- package/vendor/opencli/dist/clis/douyin/_shared/text-extra.d.ts +18 -0
- package/vendor/opencli/dist/clis/douyin/_shared/text-extra.js +15 -0
- package/vendor/opencli/dist/clis/douyin/_shared/text-extra.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/_shared/text-extra.test.js +37 -0
- package/vendor/opencli/dist/clis/douyin/_shared/timing.d.ts +2 -0
- package/vendor/opencli/dist/clis/douyin/_shared/timing.js +22 -0
- package/vendor/opencli/dist/clis/douyin/_shared/timing.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/_shared/timing.test.js +28 -0
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload-short-read.test.d.ts +11 -0
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload-short-read.test.js +83 -0
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload.d.ts +53 -0
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload.js +295 -0
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload.test.js +229 -0
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.d.ts +27 -0
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.js +45 -0
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.test.js +91 -0
- package/vendor/opencli/dist/clis/douyin/_shared/types.d.ts +26 -0
- package/vendor/opencli/dist/clis/douyin/_shared/types.js +1 -0
- package/vendor/opencli/dist/clis/douyin/activities.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/activities.js +22 -0
- package/vendor/opencli/dist/clis/douyin/activities.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/activities.test.js +55 -0
- package/vendor/opencli/dist/clis/douyin/collections.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/collections.js +22 -0
- package/vendor/opencli/dist/clis/douyin/collections.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/collections.test.js +45 -0
- package/vendor/opencli/dist/clis/douyin/delete.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/delete.js +18 -0
- package/vendor/opencli/dist/clis/douyin/delete.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/delete.test.js +11 -0
- package/vendor/opencli/dist/clis/douyin/draft.d.ts +11 -0
- package/vendor/opencli/dist/clis/douyin/draft.js +354 -0
- package/vendor/opencli/dist/clis/douyin/draft.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/draft.test.js +364 -0
- package/vendor/opencli/dist/clis/douyin/drafts.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/drafts.js +23 -0
- package/vendor/opencli/dist/clis/douyin/drafts.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/drafts.test.js +11 -0
- package/vendor/opencli/dist/clis/douyin/hashtag.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/hashtag.js +52 -0
- package/vendor/opencli/dist/clis/douyin/hashtag.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/hashtag.test.js +58 -0
- package/vendor/opencli/dist/clis/douyin/location.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/location.js +24 -0
- package/vendor/opencli/dist/clis/douyin/location.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/location.test.js +23 -0
- package/vendor/opencli/dist/clis/douyin/profile.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/profile.js +28 -0
- package/vendor/opencli/dist/clis/douyin/profile.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/profile.test.js +46 -0
- package/vendor/opencli/dist/clis/douyin/publish.d.ts +14 -0
- package/vendor/opencli/dist/clis/douyin/publish.js +288 -0
- package/vendor/opencli/dist/clis/douyin/publish.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/publish.test.js +38 -0
- package/vendor/opencli/dist/clis/douyin/stats.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/stats.js +27 -0
- package/vendor/opencli/dist/clis/douyin/stats.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/stats.test.js +22 -0
- package/vendor/opencli/dist/clis/douyin/update.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/update.js +31 -0
- package/vendor/opencli/dist/clis/douyin/update.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/update.test.js +11 -0
- package/vendor/opencli/dist/clis/douyin/user-videos.d.ts +5 -0
- package/vendor/opencli/dist/clis/douyin/user-videos.js +74 -0
- package/vendor/opencli/dist/clis/douyin/user-videos.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/user-videos.test.js +108 -0
- package/vendor/opencli/dist/clis/douyin/videos.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/videos.js +51 -0
- package/vendor/opencli/dist/clis/douyin/videos.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/douyin/videos.test.js +54 -0
- package/vendor/opencli/dist/clis/facebook/add-friend.yaml +43 -0
- package/vendor/opencli/dist/clis/facebook/events.yaml +44 -0
- package/vendor/opencli/dist/clis/facebook/feed.yaml +63 -0
- package/vendor/opencli/dist/clis/facebook/friends.yaml +42 -0
- package/vendor/opencli/dist/clis/facebook/groups.yaml +50 -0
- package/vendor/opencli/dist/clis/facebook/join-group.yaml +44 -0
- package/vendor/opencli/dist/clis/facebook/memories.yaml +39 -0
- package/vendor/opencli/dist/clis/facebook/notifications.yaml +40 -0
- package/vendor/opencli/dist/clis/facebook/profile.yaml +37 -0
- package/vendor/opencli/dist/clis/facebook/search.test.d.ts +5 -0
- package/vendor/opencli/dist/clis/facebook/search.test.js +58 -0
- package/vendor/opencli/dist/clis/facebook/search.yaml +47 -0
- package/vendor/opencli/dist/clis/gemini/ask.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/ask.js +46 -0
- package/vendor/opencli/dist/clis/gemini/ask.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/ask.test.js +100 -0
- package/vendor/opencli/dist/clis/gemini/image.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/image.js +105 -0
- package/vendor/opencli/dist/clis/gemini/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/new.js +20 -0
- package/vendor/opencli/dist/clis/gemini/reply-state.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/reply-state.test.js +641 -0
- package/vendor/opencli/dist/clis/gemini/utils.d.ts +77 -0
- package/vendor/opencli/dist/clis/gemini/utils.js +930 -0
- package/vendor/opencli/dist/clis/gemini/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/utils.test.js +178 -0
- package/vendor/opencli/dist/clis/google/news.d.ts +5 -0
- package/vendor/opencli/dist/clis/google/news.js +58 -0
- package/vendor/opencli/dist/clis/google/search.d.ts +10 -0
- package/vendor/opencli/dist/clis/google/search.js +127 -0
- package/vendor/opencli/dist/clis/google/suggest.d.ts +5 -0
- package/vendor/opencli/dist/clis/google/suggest.js +34 -0
- package/vendor/opencli/dist/clis/google/trends.d.ts +5 -0
- package/vendor/opencli/dist/clis/google/trends.js +38 -0
- package/vendor/opencli/dist/clis/google/utils.d.ts +9 -0
- package/vendor/opencli/dist/clis/google/utils.js +23 -0
- package/vendor/opencli/dist/clis/google/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/google/utils.test.js +75 -0
- package/vendor/opencli/dist/clis/grok/ask.d.ts +19 -0
- package/vendor/opencli/dist/clis/grok/ask.js +292 -0
- package/vendor/opencli/dist/clis/grok/ask.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/grok/ask.test.js +54 -0
- package/vendor/opencli/dist/clis/hackernews/ask.yaml +38 -0
- package/vendor/opencli/dist/clis/hackernews/best.yaml +38 -0
- package/vendor/opencli/dist/clis/hackernews/jobs.yaml +36 -0
- package/vendor/opencli/dist/clis/hackernews/new.yaml +38 -0
- package/vendor/opencli/dist/clis/hackernews/search.yaml +44 -0
- package/vendor/opencli/dist/clis/hackernews/show.yaml +38 -0
- package/vendor/opencli/dist/clis/hackernews/top.yaml +38 -0
- package/vendor/opencli/dist/clis/hackernews/user.yaml +25 -0
- package/vendor/opencli/dist/clis/hf/top.d.ts +1 -0
- package/vendor/opencli/dist/clis/hf/top.js +119 -0
- package/vendor/opencli/dist/clis/hupu/detail.d.ts +1 -0
- package/vendor/opencli/dist/clis/hupu/detail.js +72 -0
- package/vendor/opencli/dist/clis/hupu/hot.yaml +43 -0
- package/vendor/opencli/dist/clis/hupu/like.d.ts +1 -0
- package/vendor/opencli/dist/clis/hupu/like.js +75 -0
- package/vendor/opencli/dist/clis/hupu/reply.d.ts +1 -0
- package/vendor/opencli/dist/clis/hupu/reply.js +71 -0
- package/vendor/opencli/dist/clis/hupu/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/hupu/search.js +59 -0
- package/vendor/opencli/dist/clis/hupu/unlike.d.ts +1 -0
- package/vendor/opencli/dist/clis/hupu/unlike.js +75 -0
- package/vendor/opencli/dist/clis/hupu/utils.d.ts +20 -0
- package/vendor/opencli/dist/clis/hupu/utils.js +319 -0
- package/vendor/opencli/dist/clis/imdb/person.d.ts +1 -0
- package/vendor/opencli/dist/clis/imdb/person.js +203 -0
- package/vendor/opencli/dist/clis/imdb/reviews.d.ts +1 -0
- package/vendor/opencli/dist/clis/imdb/reviews.js +88 -0
- package/vendor/opencli/dist/clis/imdb/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/imdb/search.js +161 -0
- package/vendor/opencli/dist/clis/imdb/title.d.ts +1 -0
- package/vendor/opencli/dist/clis/imdb/title.js +93 -0
- package/vendor/opencli/dist/clis/imdb/top.d.ts +1 -0
- package/vendor/opencli/dist/clis/imdb/top.js +53 -0
- package/vendor/opencli/dist/clis/imdb/trending.d.ts +1 -0
- package/vendor/opencli/dist/clis/imdb/trending.js +52 -0
- package/vendor/opencli/dist/clis/imdb/utils.d.ts +46 -0
- package/vendor/opencli/dist/clis/imdb/utils.js +285 -0
- package/vendor/opencli/dist/clis/imdb/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/imdb/utils.test.js +88 -0
- package/vendor/opencli/dist/clis/instagram/_shared/private-publish.d.ts +138 -0
- package/vendor/opencli/dist/clis/instagram/_shared/private-publish.js +1030 -0
- package/vendor/opencli/dist/clis/instagram/_shared/private-publish.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/_shared/private-publish.test.js +705 -0
- package/vendor/opencli/dist/clis/instagram/_shared/protocol-capture.d.ts +26 -0
- package/vendor/opencli/dist/clis/instagram/_shared/protocol-capture.js +282 -0
- package/vendor/opencli/dist/clis/instagram/_shared/protocol-capture.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/_shared/protocol-capture.test.js +114 -0
- package/vendor/opencli/dist/clis/instagram/_shared/runtime-info.d.ts +9 -0
- package/vendor/opencli/dist/clis/instagram/_shared/runtime-info.js +81 -0
- package/vendor/opencli/dist/clis/instagram/comment.yaml +52 -0
- package/vendor/opencli/dist/clis/instagram/download.d.ts +16 -0
- package/vendor/opencli/dist/clis/instagram/download.js +225 -0
- package/vendor/opencli/dist/clis/instagram/download.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/download.test.js +118 -0
- package/vendor/opencli/dist/clis/instagram/explore.yaml +43 -0
- package/vendor/opencli/dist/clis/instagram/follow.yaml +41 -0
- package/vendor/opencli/dist/clis/instagram/followers.yaml +51 -0
- package/vendor/opencli/dist/clis/instagram/following.yaml +51 -0
- package/vendor/opencli/dist/clis/instagram/like.yaml +46 -0
- package/vendor/opencli/dist/clis/instagram/note.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/note.js +222 -0
- package/vendor/opencli/dist/clis/instagram/note.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/note.test.js +81 -0
- package/vendor/opencli/dist/clis/instagram/post.d.ts +4 -0
- package/vendor/opencli/dist/clis/instagram/post.js +1496 -0
- package/vendor/opencli/dist/clis/instagram/post.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/post.test.js +1647 -0
- package/vendor/opencli/dist/clis/instagram/profile.yaml +42 -0
- package/vendor/opencli/dist/clis/instagram/reel.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/reel.js +826 -0
- package/vendor/opencli/dist/clis/instagram/reel.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/reel.test.js +167 -0
- package/vendor/opencli/dist/clis/instagram/save.yaml +46 -0
- package/vendor/opencli/dist/clis/instagram/saved.yaml +40 -0
- package/vendor/opencli/dist/clis/instagram/search.yaml +44 -0
- package/vendor/opencli/dist/clis/instagram/story.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/story.js +115 -0
- package/vendor/opencli/dist/clis/instagram/story.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/instagram/story.test.js +167 -0
- package/vendor/opencli/dist/clis/instagram/unfollow.yaml +38 -0
- package/vendor/opencli/dist/clis/instagram/unlike.yaml +46 -0
- package/vendor/opencli/dist/clis/instagram/unsave.yaml +46 -0
- package/vendor/opencli/dist/clis/instagram/user.yaml +54 -0
- package/vendor/opencli/dist/clis/jd/item.d.ts +5 -0
- package/vendor/opencli/dist/clis/jd/item.js +97 -0
- package/vendor/opencli/dist/clis/jd/item.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/jd/item.test.js +43 -0
- package/vendor/opencli/dist/clis/jike/comment.d.ts +1 -0
- package/vendor/opencli/dist/clis/jike/comment.js +106 -0
- package/vendor/opencli/dist/clis/jike/create.d.ts +1 -0
- package/vendor/opencli/dist/clis/jike/create.js +105 -0
- package/vendor/opencli/dist/clis/jike/feed.d.ts +1 -0
- package/vendor/opencli/dist/clis/jike/feed.js +66 -0
- package/vendor/opencli/dist/clis/jike/like.d.ts +1 -0
- package/vendor/opencli/dist/clis/jike/like.js +60 -0
- package/vendor/opencli/dist/clis/jike/notifications.d.ts +1 -0
- package/vendor/opencli/dist/clis/jike/notifications.js +168 -0
- package/vendor/opencli/dist/clis/jike/post.yaml +59 -0
- package/vendor/opencli/dist/clis/jike/repost.d.ts +1 -0
- package/vendor/opencli/dist/clis/jike/repost.js +102 -0
- package/vendor/opencli/dist/clis/jike/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/jike/search.js +66 -0
- package/vendor/opencli/dist/clis/jike/topic.yaml +53 -0
- package/vendor/opencli/dist/clis/jike/user.yaml +52 -0
- package/vendor/opencli/dist/clis/jike/utils.d.ts +19 -0
- package/vendor/opencli/dist/clis/jike/utils.js +25 -0
- package/vendor/opencli/dist/clis/jimeng/generate.yaml +85 -0
- package/vendor/opencli/dist/clis/jimeng/history.yaml +46 -0
- package/vendor/opencli/dist/clis/linkedin/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/linkedin/search.js +367 -0
- package/vendor/opencli/dist/clis/linkedin/timeline.d.ts +21 -0
- package/vendor/opencli/dist/clis/linkedin/timeline.js +503 -0
- package/vendor/opencli/dist/clis/linkedin/timeline.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/linkedin/timeline.test.js +81 -0
- package/vendor/opencli/dist/clis/linux-do/categories.yaml +70 -0
- package/vendor/opencli/dist/clis/linux-do/category.d.ts +1 -0
- package/vendor/opencli/dist/clis/linux-do/category.js +36 -0
- package/vendor/opencli/dist/clis/linux-do/feed.d.ts +45 -0
- package/vendor/opencli/dist/clis/linux-do/feed.js +397 -0
- package/vendor/opencli/dist/clis/linux-do/feed.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/linux-do/feed.test.js +118 -0
- package/vendor/opencli/dist/clis/linux-do/hot.d.ts +1 -0
- package/vendor/opencli/dist/clis/linux-do/hot.js +25 -0
- package/vendor/opencli/dist/clis/linux-do/latest.d.ts +1 -0
- package/vendor/opencli/dist/clis/linux-do/latest.js +18 -0
- package/vendor/opencli/dist/clis/linux-do/search.yaml +48 -0
- package/vendor/opencli/dist/clis/linux-do/tags.yaml +41 -0
- package/vendor/opencli/dist/clis/linux-do/topic.yaml +77 -0
- package/vendor/opencli/dist/clis/linux-do/user-posts.yaml +67 -0
- package/vendor/opencli/dist/clis/linux-do/user-topics.yaml +54 -0
- package/vendor/opencli/dist/clis/lobsters/active.yaml +29 -0
- package/vendor/opencli/dist/clis/lobsters/hot.yaml +29 -0
- package/vendor/opencli/dist/clis/lobsters/newest.yaml +29 -0
- package/vendor/opencli/dist/clis/lobsters/tag.yaml +34 -0
- package/vendor/opencli/dist/clis/medium/feed.d.ts +1 -0
- package/vendor/opencli/dist/clis/medium/feed.js +15 -0
- package/vendor/opencli/dist/clis/medium/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/medium/search.js +15 -0
- package/vendor/opencli/dist/clis/medium/user.d.ts +1 -0
- package/vendor/opencli/dist/clis/medium/user.js +15 -0
- package/vendor/opencli/dist/clis/medium/utils.d.ts +5 -0
- package/vendor/opencli/dist/clis/medium/utils.js +79 -0
- package/vendor/opencli/dist/clis/notebooklm/compat.test.d.ts +3 -0
- package/vendor/opencli/dist/clis/notebooklm/compat.test.js +16 -0
- package/vendor/opencli/dist/clis/notebooklm/current.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/current.js +27 -0
- package/vendor/opencli/dist/clis/notebooklm/get.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/get.js +36 -0
- package/vendor/opencli/dist/clis/notebooklm/history.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/history.js +24 -0
- package/vendor/opencli/dist/clis/notebooklm/history.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/history.test.js +58 -0
- package/vendor/opencli/dist/clis/notebooklm/list.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/list.js +35 -0
- package/vendor/opencli/dist/clis/notebooklm/note-list.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/note-list.js +27 -0
- package/vendor/opencli/dist/clis/notebooklm/note-list.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/note-list.test.js +56 -0
- package/vendor/opencli/dist/clis/notebooklm/notes-get.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/notes-get.js +46 -0
- package/vendor/opencli/dist/clis/notebooklm/notes-get.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/notes-get.test.js +72 -0
- package/vendor/opencli/dist/clis/notebooklm/open.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/open.js +41 -0
- package/vendor/opencli/dist/clis/notebooklm/open.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/open.test.js +63 -0
- package/vendor/opencli/dist/clis/notebooklm/rpc.d.ts +36 -0
- package/vendor/opencli/dist/clis/notebooklm/rpc.js +189 -0
- package/vendor/opencli/dist/clis/notebooklm/rpc.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/rpc.test.js +105 -0
- package/vendor/opencli/dist/clis/notebooklm/shared.d.ts +87 -0
- package/vendor/opencli/dist/clis/notebooklm/shared.js +3 -0
- package/vendor/opencli/dist/clis/notebooklm/source-fulltext.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/source-fulltext.js +43 -0
- package/vendor/opencli/dist/clis/notebooklm/source-fulltext.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/source-fulltext.test.js +106 -0
- package/vendor/opencli/dist/clis/notebooklm/source-get.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/source-get.js +39 -0
- package/vendor/opencli/dist/clis/notebooklm/source-get.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/source-get.test.js +84 -0
- package/vendor/opencli/dist/clis/notebooklm/source-guide.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/source-guide.js +43 -0
- package/vendor/opencli/dist/clis/notebooklm/source-guide.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/source-guide.test.js +104 -0
- package/vendor/opencli/dist/clis/notebooklm/source-list.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/source-list.js +29 -0
- package/vendor/opencli/dist/clis/notebooklm/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/status.js +30 -0
- package/vendor/opencli/dist/clis/notebooklm/summary.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/summary.js +29 -0
- package/vendor/opencli/dist/clis/notebooklm/summary.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/summary.test.js +78 -0
- package/vendor/opencli/dist/clis/notebooklm/utils.d.ts +38 -0
- package/vendor/opencli/dist/clis/notebooklm/utils.js +738 -0
- package/vendor/opencli/dist/clis/notebooklm/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/notebooklm/utils.test.js +390 -0
- package/vendor/opencli/dist/clis/notion/export.d.ts +1 -0
- package/vendor/opencli/dist/clis/notion/export.js +31 -0
- package/vendor/opencli/dist/clis/notion/favorites.d.ts +1 -0
- package/vendor/opencli/dist/clis/notion/favorites.js +84 -0
- package/vendor/opencli/dist/clis/notion/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/notion/new.js +34 -0
- package/vendor/opencli/dist/clis/notion/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/notion/read.js +30 -0
- package/vendor/opencli/dist/clis/notion/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/notion/search.js +46 -0
- package/vendor/opencli/dist/clis/notion/sidebar.d.ts +1 -0
- package/vendor/opencli/dist/clis/notion/sidebar.js +41 -0
- package/vendor/opencli/dist/clis/notion/status.d.ts +1 -0
- package/vendor/opencli/dist/clis/notion/status.js +16 -0
- package/vendor/opencli/dist/clis/notion/write.d.ts +1 -0
- package/vendor/opencli/dist/clis/notion/write.js +40 -0
- package/vendor/opencli/dist/clis/ones/common.d.ts +32 -0
- package/vendor/opencli/dist/clis/ones/common.js +144 -0
- package/vendor/opencli/dist/clis/ones/enrich-tasks.d.ts +5 -0
- package/vendor/opencli/dist/clis/ones/enrich-tasks.js +37 -0
- package/vendor/opencli/dist/clis/ones/login.d.ts +1 -0
- package/vendor/opencli/dist/clis/ones/login.js +80 -0
- package/vendor/opencli/dist/clis/ones/logout.d.ts +1 -0
- package/vendor/opencli/dist/clis/ones/logout.js +17 -0
- package/vendor/opencli/dist/clis/ones/me.d.ts +1 -0
- package/vendor/opencli/dist/clis/ones/me.js +30 -0
- package/vendor/opencli/dist/clis/ones/my-tasks.d.ts +1 -0
- package/vendor/opencli/dist/clis/ones/my-tasks.js +120 -0
- package/vendor/opencli/dist/clis/ones/resolve-labels.d.ts +10 -0
- package/vendor/opencli/dist/clis/ones/resolve-labels.js +64 -0
- package/vendor/opencli/dist/clis/ones/task-helpers.d.ts +29 -0
- package/vendor/opencli/dist/clis/ones/task-helpers.js +212 -0
- package/vendor/opencli/dist/clis/ones/task-helpers.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/ones/task-helpers.test.js +12 -0
- package/vendor/opencli/dist/clis/ones/task.d.ts +1 -0
- package/vendor/opencli/dist/clis/ones/task.js +66 -0
- package/vendor/opencli/dist/clis/ones/tasks.d.ts +1 -0
- package/vendor/opencli/dist/clis/ones/tasks.js +79 -0
- package/vendor/opencli/dist/clis/ones/token-info.d.ts +1 -0
- package/vendor/opencli/dist/clis/ones/token-info.js +42 -0
- package/vendor/opencli/dist/clis/ones/worklog.d.ts +11 -0
- package/vendor/opencli/dist/clis/ones/worklog.js +267 -0
- package/vendor/opencli/dist/clis/ones/worklog.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/ones/worklog.test.js +20 -0
- package/vendor/opencli/dist/clis/paperreview/commands.test.d.ts +3 -0
- package/vendor/opencli/dist/clis/paperreview/commands.test.js +243 -0
- package/vendor/opencli/dist/clis/paperreview/feedback.d.ts +1 -0
- package/vendor/opencli/dist/clis/paperreview/feedback.js +52 -0
- package/vendor/opencli/dist/clis/paperreview/review.d.ts +1 -0
- package/vendor/opencli/dist/clis/paperreview/review.js +37 -0
- package/vendor/opencli/dist/clis/paperreview/submit.d.ts +1 -0
- package/vendor/opencli/dist/clis/paperreview/submit.js +85 -0
- package/vendor/opencli/dist/clis/paperreview/utils.d.ts +46 -0
- package/vendor/opencli/dist/clis/paperreview/utils.js +197 -0
- package/vendor/opencli/dist/clis/paperreview/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/paperreview/utils.test.js +49 -0
- package/vendor/opencli/dist/clis/pixiv/detail.yaml +49 -0
- package/vendor/opencli/dist/clis/pixiv/download.d.ts +7 -0
- package/vendor/opencli/dist/clis/pixiv/download.js +78 -0
- package/vendor/opencli/dist/clis/pixiv/download.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/pixiv/download.test.js +87 -0
- package/vendor/opencli/dist/clis/pixiv/illusts.d.ts +8 -0
- package/vendor/opencli/dist/clis/pixiv/illusts.js +65 -0
- package/vendor/opencli/dist/clis/pixiv/illusts.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/pixiv/illusts.test.js +99 -0
- package/vendor/opencli/dist/clis/pixiv/ranking.yaml +53 -0
- package/vendor/opencli/dist/clis/pixiv/search.d.ts +6 -0
- package/vendor/opencli/dist/clis/pixiv/search.js +43 -0
- package/vendor/opencli/dist/clis/pixiv/search.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/pixiv/search.test.js +83 -0
- package/vendor/opencli/dist/clis/pixiv/test-utils.d.ts +12 -0
- package/vendor/opencli/dist/clis/pixiv/test-utils.js +23 -0
- package/vendor/opencli/dist/clis/pixiv/user.yaml +46 -0
- package/vendor/opencli/dist/clis/pixiv/utils.d.ts +27 -0
- package/vendor/opencli/dist/clis/pixiv/utils.js +49 -0
- package/vendor/opencli/dist/clis/producthunt/browse.d.ts +1 -0
- package/vendor/opencli/dist/clis/producthunt/browse.js +99 -0
- package/vendor/opencli/dist/clis/producthunt/hot.d.ts +1 -0
- package/vendor/opencli/dist/clis/producthunt/hot.js +110 -0
- package/vendor/opencli/dist/clis/producthunt/posts.d.ts +1 -0
- package/vendor/opencli/dist/clis/producthunt/posts.js +28 -0
- package/vendor/opencli/dist/clis/producthunt/today.d.ts +1 -0
- package/vendor/opencli/dist/clis/producthunt/today.js +35 -0
- package/vendor/opencli/dist/clis/producthunt/utils.d.ts +29 -0
- package/vendor/opencli/dist/clis/producthunt/utils.js +99 -0
- package/vendor/opencli/dist/clis/producthunt/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/producthunt/utils.test.js +64 -0
- package/vendor/opencli/dist/clis/reddit/comment.d.ts +1 -0
- package/vendor/opencli/dist/clis/reddit/comment.js +57 -0
- package/vendor/opencli/dist/clis/reddit/frontpage.yaml +30 -0
- package/vendor/opencli/dist/clis/reddit/hot.yaml +47 -0
- package/vendor/opencli/dist/clis/reddit/popular.yaml +40 -0
- package/vendor/opencli/dist/clis/reddit/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/reddit/read.js +184 -0
- package/vendor/opencli/dist/clis/reddit/read.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/reddit/read.test.js +28 -0
- package/vendor/opencli/dist/clis/reddit/save.d.ts +1 -0
- package/vendor/opencli/dist/clis/reddit/save.js +51 -0
- package/vendor/opencli/dist/clis/reddit/saved.d.ts +1 -0
- package/vendor/opencli/dist/clis/reddit/saved.js +49 -0
- package/vendor/opencli/dist/clis/reddit/search.yaml +61 -0
- package/vendor/opencli/dist/clis/reddit/subreddit.yaml +50 -0
- package/vendor/opencli/dist/clis/reddit/subscribe.d.ts +1 -0
- package/vendor/opencli/dist/clis/reddit/subscribe.js +50 -0
- package/vendor/opencli/dist/clis/reddit/upvote.d.ts +1 -0
- package/vendor/opencli/dist/clis/reddit/upvote.js +64 -0
- package/vendor/opencli/dist/clis/reddit/upvoted.d.ts +1 -0
- package/vendor/opencli/dist/clis/reddit/upvoted.js +49 -0
- package/vendor/opencli/dist/clis/reddit/user-comments.yaml +46 -0
- package/vendor/opencli/dist/clis/reddit/user-posts.yaml +44 -0
- package/vendor/opencli/dist/clis/reddit/user.yaml +40 -0
- package/vendor/opencli/dist/clis/reuters/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/reuters/search.js +51 -0
- package/vendor/opencli/dist/clis/sinablog/article.d.ts +1 -0
- package/vendor/opencli/dist/clis/sinablog/article.js +14 -0
- package/vendor/opencli/dist/clis/sinablog/hot.d.ts +1 -0
- package/vendor/opencli/dist/clis/sinablog/hot.js +14 -0
- package/vendor/opencli/dist/clis/sinablog/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/sinablog/search.js +51 -0
- package/vendor/opencli/dist/clis/sinablog/user.d.ts +1 -0
- package/vendor/opencli/dist/clis/sinablog/user.js +15 -0
- package/vendor/opencli/dist/clis/sinablog/utils.d.ts +7 -0
- package/vendor/opencli/dist/clis/sinablog/utils.js +186 -0
- package/vendor/opencli/dist/clis/sinafinance/news.d.ts +7 -0
- package/vendor/opencli/dist/clis/sinafinance/news.js +61 -0
- package/vendor/opencli/dist/clis/sinafinance/rolling-news.d.ts +4 -0
- package/vendor/opencli/dist/clis/sinafinance/rolling-news.js +40 -0
- package/vendor/opencli/dist/clis/sinafinance/stock-rank.d.ts +4 -0
- package/vendor/opencli/dist/clis/sinafinance/stock-rank.js +65 -0
- package/vendor/opencli/dist/clis/sinafinance/stock.d.ts +8 -0
- package/vendor/opencli/dist/clis/sinafinance/stock.js +117 -0
- package/vendor/opencli/dist/clis/smzdm/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/smzdm/search.js +54 -0
- package/vendor/opencli/dist/clis/spotify/spotify.d.ts +1 -0
- package/vendor/opencli/dist/clis/spotify/spotify.js +316 -0
- package/vendor/opencli/dist/clis/spotify/utils.d.ts +21 -0
- package/vendor/opencli/dist/clis/spotify/utils.js +66 -0
- package/vendor/opencli/dist/clis/spotify/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/spotify/utils.test.js +67 -0
- package/vendor/opencli/dist/clis/stackoverflow/bounties.yaml +29 -0
- package/vendor/opencli/dist/clis/stackoverflow/hot.yaml +28 -0
- package/vendor/opencli/dist/clis/stackoverflow/search.yaml +33 -0
- package/vendor/opencli/dist/clis/stackoverflow/unanswered.yaml +28 -0
- package/vendor/opencli/dist/clis/steam/top-sellers.yaml +29 -0
- package/vendor/opencli/dist/clis/substack/feed.d.ts +1 -0
- package/vendor/opencli/dist/clis/substack/feed.js +15 -0
- package/vendor/opencli/dist/clis/substack/publication.d.ts +1 -0
- package/vendor/opencli/dist/clis/substack/publication.js +15 -0
- package/vendor/opencli/dist/clis/substack/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/substack/search.js +78 -0
- package/vendor/opencli/dist/clis/substack/utils.d.ts +8 -0
- package/vendor/opencli/dist/clis/substack/utils.js +136 -0
- package/vendor/opencli/dist/clis/substack/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/substack/utils.test.js +44 -0
- package/vendor/opencli/dist/clis/tieba/commands.test.d.ts +4 -0
- package/vendor/opencli/dist/clis/tieba/commands.test.js +79 -0
- package/vendor/opencli/dist/clis/tieba/hot.d.ts +1 -0
- package/vendor/opencli/dist/clis/tieba/hot.js +48 -0
- package/vendor/opencli/dist/clis/tieba/posts.d.ts +1 -0
- package/vendor/opencli/dist/clis/tieba/posts.js +85 -0
- package/vendor/opencli/dist/clis/tieba/read.d.ts +1 -0
- package/vendor/opencli/dist/clis/tieba/read.js +140 -0
- package/vendor/opencli/dist/clis/tieba/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/tieba/search.js +108 -0
- package/vendor/opencli/dist/clis/tieba/utils.d.ts +101 -0
- package/vendor/opencli/dist/clis/tieba/utils.js +240 -0
- package/vendor/opencli/dist/clis/tieba/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/tieba/utils.test.js +290 -0
- package/vendor/opencli/dist/clis/tiktok/comment.yaml +66 -0
- package/vendor/opencli/dist/clis/tiktok/explore.yaml +39 -0
- package/vendor/opencli/dist/clis/tiktok/follow.yaml +39 -0
- package/vendor/opencli/dist/clis/tiktok/following.yaml +46 -0
- package/vendor/opencli/dist/clis/tiktok/friends.yaml +47 -0
- package/vendor/opencli/dist/clis/tiktok/like.yaml +38 -0
- package/vendor/opencli/dist/clis/tiktok/live.yaml +51 -0
- package/vendor/opencli/dist/clis/tiktok/notifications.yaml +52 -0
- package/vendor/opencli/dist/clis/tiktok/profile.yaml +45 -0
- package/vendor/opencli/dist/clis/tiktok/save.yaml +34 -0
- package/vendor/opencli/dist/clis/tiktok/search.yaml +47 -0
- package/vendor/opencli/dist/clis/tiktok/unfollow.yaml +44 -0
- package/vendor/opencli/dist/clis/tiktok/unlike.yaml +38 -0
- package/vendor/opencli/dist/clis/tiktok/unsave.yaml +36 -0
- package/vendor/opencli/dist/clis/tiktok/user.yaml +44 -0
- package/vendor/opencli/dist/clis/twitter/accept.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/accept.js +203 -0
- package/vendor/opencli/dist/clis/twitter/article.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/article.js +163 -0
- package/vendor/opencli/dist/clis/twitter/block.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/block.js +89 -0
- package/vendor/opencli/dist/clis/twitter/bookmark.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/bookmark.js +64 -0
- package/vendor/opencli/dist/clis/twitter/bookmarks.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/bookmarks.js +172 -0
- package/vendor/opencli/dist/clis/twitter/delete.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/delete.js +73 -0
- package/vendor/opencli/dist/clis/twitter/download.d.ts +8 -0
- package/vendor/opencli/dist/clis/twitter/download.js +110 -0
- package/vendor/opencli/dist/clis/twitter/follow.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/follow.js +66 -0
- package/vendor/opencli/dist/clis/twitter/followers.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/followers.js +102 -0
- package/vendor/opencli/dist/clis/twitter/following.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/following.js +95 -0
- package/vendor/opencli/dist/clis/twitter/hide-reply.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/hide-reply.js +67 -0
- package/vendor/opencli/dist/clis/twitter/like.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/like.js +69 -0
- package/vendor/opencli/dist/clis/twitter/likes.d.ts +24 -0
- package/vendor/opencli/dist/clis/twitter/likes.js +217 -0
- package/vendor/opencli/dist/clis/twitter/likes.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/likes.test.js +85 -0
- package/vendor/opencli/dist/clis/twitter/notifications.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/notifications.js +127 -0
- package/vendor/opencli/dist/clis/twitter/post.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/post.js +98 -0
- package/vendor/opencli/dist/clis/twitter/post.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/post.test.js +116 -0
- package/vendor/opencli/dist/clis/twitter/profile.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/profile.js +103 -0
- package/vendor/opencli/dist/clis/twitter/reply-dm.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/reply-dm.js +182 -0
- package/vendor/opencli/dist/clis/twitter/reply.d.ts +13 -0
- package/vendor/opencli/dist/clis/twitter/reply.js +280 -0
- package/vendor/opencli/dist/clis/twitter/reply.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/reply.test.js +151 -0
- package/vendor/opencli/dist/clis/twitter/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/search.js +169 -0
- package/vendor/opencli/dist/clis/twitter/search.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/search.test.js +236 -0
- package/vendor/opencli/dist/clis/twitter/shared.d.ts +6 -0
- package/vendor/opencli/dist/clis/twitter/shared.js +35 -0
- package/vendor/opencli/dist/clis/twitter/thread.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/thread.js +151 -0
- package/vendor/opencli/dist/clis/twitter/timeline.d.ts +24 -0
- package/vendor/opencli/dist/clis/twitter/timeline.js +204 -0
- package/vendor/opencli/dist/clis/twitter/timeline.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/timeline.test.js +102 -0
- package/vendor/opencli/dist/clis/twitter/trending.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/trending.js +60 -0
- package/vendor/opencli/dist/clis/twitter/unblock.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/unblock.js +72 -0
- package/vendor/opencli/dist/clis/twitter/unbookmark.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/unbookmark.js +63 -0
- package/vendor/opencli/dist/clis/twitter/unfollow.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/unfollow.js +72 -0
- package/vendor/opencli/dist/clis/v2ex/daily.d.ts +1 -0
- package/vendor/opencli/dist/clis/v2ex/daily.js +98 -0
- package/vendor/opencli/dist/clis/v2ex/hot.yaml +28 -0
- package/vendor/opencli/dist/clis/v2ex/latest.yaml +28 -0
- package/vendor/opencli/dist/clis/v2ex/me.d.ts +1 -0
- package/vendor/opencli/dist/clis/v2ex/me.js +99 -0
- package/vendor/opencli/dist/clis/v2ex/member.yaml +29 -0
- package/vendor/opencli/dist/clis/v2ex/node.yaml +34 -0
- package/vendor/opencli/dist/clis/v2ex/nodes.yaml +31 -0
- package/vendor/opencli/dist/clis/v2ex/notifications.d.ts +1 -0
- package/vendor/opencli/dist/clis/v2ex/notifications.js +71 -0
- package/vendor/opencli/dist/clis/v2ex/replies.yaml +32 -0
- package/vendor/opencli/dist/clis/v2ex/topic.yaml +33 -0
- package/vendor/opencli/dist/clis/v2ex/user.yaml +34 -0
- package/vendor/opencli/dist/clis/web/read.d.ts +16 -0
- package/vendor/opencli/dist/clis/web/read.js +202 -0
- package/vendor/opencli/dist/clis/weibo/comments.d.ts +1 -0
- package/vendor/opencli/dist/clis/weibo/comments.js +53 -0
- package/vendor/opencli/dist/clis/weibo/feed.d.ts +1 -0
- package/vendor/opencli/dist/clis/weibo/feed.js +56 -0
- package/vendor/opencli/dist/clis/weibo/hot.d.ts +1 -0
- package/vendor/opencli/dist/clis/weibo/hot.js +39 -0
- package/vendor/opencli/dist/clis/weibo/me.d.ts +1 -0
- package/vendor/opencli/dist/clis/weibo/me.js +76 -0
- package/vendor/opencli/dist/clis/weibo/post.d.ts +1 -0
- package/vendor/opencli/dist/clis/weibo/post.js +75 -0
- package/vendor/opencli/dist/clis/weibo/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/weibo/search.js +73 -0
- package/vendor/opencli/dist/clis/weibo/user.d.ts +1 -0
- package/vendor/opencli/dist/clis/weibo/user.js +63 -0
- package/vendor/opencli/dist/clis/weibo/utils.d.ts +6 -0
- package/vendor/opencli/dist/clis/weibo/utils.js +30 -0
- package/vendor/opencli/dist/clis/weixin/download.d.ts +38 -0
- package/vendor/opencli/dist/clis/weixin/download.js +321 -0
- package/vendor/opencli/dist/clis/weread/book.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/book.js +219 -0
- package/vendor/opencli/dist/clis/weread/commands.test.d.ts +3 -0
- package/vendor/opencli/dist/clis/weread/commands.test.js +374 -0
- package/vendor/opencli/dist/clis/weread/highlights.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/highlights.js +23 -0
- package/vendor/opencli/dist/clis/weread/notebooks.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/notebooks.js +21 -0
- package/vendor/opencli/dist/clis/weread/notes.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/notes.js +29 -0
- package/vendor/opencli/dist/clis/weread/private-api-regression.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/private-api-regression.test.js +369 -0
- package/vendor/opencli/dist/clis/weread/ranking.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/ranking.js +28 -0
- package/vendor/opencli/dist/clis/weread/search-regression.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/search-regression.test.js +407 -0
- package/vendor/opencli/dist/clis/weread/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/search.js +162 -0
- package/vendor/opencli/dist/clis/weread/shelf.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/shelf.js +65 -0
- package/vendor/opencli/dist/clis/weread/utils.d.ts +76 -0
- package/vendor/opencli/dist/clis/weread/utils.js +321 -0
- package/vendor/opencli/dist/clis/weread/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/weread/utils.test.js +128 -0
- package/vendor/opencli/dist/clis/wikipedia/random.d.ts +1 -0
- package/vendor/opencli/dist/clis/wikipedia/random.js +19 -0
- package/vendor/opencli/dist/clis/wikipedia/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/wikipedia/search.js +30 -0
- package/vendor/opencli/dist/clis/wikipedia/summary.d.ts +1 -0
- package/vendor/opencli/dist/clis/wikipedia/summary.js +23 -0
- package/vendor/opencli/dist/clis/wikipedia/trending.d.ts +1 -0
- package/vendor/opencli/dist/clis/wikipedia/trending.js +35 -0
- package/vendor/opencli/dist/clis/wikipedia/utils.d.ts +36 -0
- package/vendor/opencli/dist/clis/wikipedia/utils.js +31 -0
- package/vendor/opencli/dist/clis/xianyu/chat.d.ts +7 -0
- package/vendor/opencli/dist/clis/xianyu/chat.js +146 -0
- package/vendor/opencli/dist/clis/xianyu/chat.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xianyu/chat.test.js +15 -0
- package/vendor/opencli/dist/clis/xianyu/item.d.ts +7 -0
- package/vendor/opencli/dist/clis/xianyu/item.js +152 -0
- package/vendor/opencli/dist/clis/xianyu/item.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xianyu/item.test.js +56 -0
- package/vendor/opencli/dist/clis/xianyu/search.d.ts +10 -0
- package/vendor/opencli/dist/clis/xianyu/search.js +134 -0
- package/vendor/opencli/dist/clis/xianyu/search.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xianyu/search.test.js +17 -0
- package/vendor/opencli/dist/clis/xianyu/utils.d.ts +1 -0
- package/vendor/opencli/dist/clis/xianyu/utils.js +8 -0
- package/vendor/opencli/dist/clis/xiaoe/catalog.yaml +129 -0
- package/vendor/opencli/dist/clis/xiaoe/content.yaml +43 -0
- package/vendor/opencli/dist/clis/xiaoe/courses.yaml +73 -0
- package/vendor/opencli/dist/clis/xiaoe/detail.yaml +39 -0
- package/vendor/opencli/dist/clis/xiaoe/play-url.yaml +124 -0
- package/vendor/opencli/dist/clis/xiaohongshu/comments.d.ts +8 -0
- package/vendor/opencli/dist/clis/xiaohongshu/comments.js +133 -0
- package/vendor/opencli/dist/clis/xiaohongshu/comments.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/comments.test.js +139 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.d.ts +84 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.js +341 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.test.js +259 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes-summary.d.ts +28 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes-summary.js +92 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes-summary.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes-summary.test.js +49 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.d.ts +24 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.js +227 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.test.js +192 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-profile.d.ts +10 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-profile.js +53 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-stats.d.ts +10 -0
- package/vendor/opencli/dist/clis/xiaohongshu/creator-stats.js +73 -0
- package/vendor/opencli/dist/clis/xiaohongshu/download.d.ts +10 -0
- package/vendor/opencli/dist/clis/xiaohongshu/download.js +167 -0
- package/vendor/opencli/dist/clis/xiaohongshu/download.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/download.test.js +73 -0
- package/vendor/opencli/dist/clis/xiaohongshu/feed.yaml +31 -0
- package/vendor/opencli/dist/clis/xiaohongshu/note-helpers.d.ts +12 -0
- package/vendor/opencli/dist/clis/xiaohongshu/note-helpers.js +23 -0
- package/vendor/opencli/dist/clis/xiaohongshu/note.d.ts +7 -0
- package/vendor/opencli/dist/clis/xiaohongshu/note.js +87 -0
- package/vendor/opencli/dist/clis/xiaohongshu/note.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/note.test.js +183 -0
- package/vendor/opencli/dist/clis/xiaohongshu/notifications.yaml +37 -0
- package/vendor/opencli/dist/clis/xiaohongshu/publish.d.ts +18 -0
- package/vendor/opencli/dist/clis/xiaohongshu/publish.js +531 -0
- package/vendor/opencli/dist/clis/xiaohongshu/publish.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/publish.test.js +195 -0
- package/vendor/opencli/dist/clis/xiaohongshu/search.d.ts +15 -0
- package/vendor/opencli/dist/clis/xiaohongshu/search.js +131 -0
- package/vendor/opencli/dist/clis/xiaohongshu/search.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/search.test.js +160 -0
- package/vendor/opencli/dist/clis/xiaohongshu/user-helpers.d.ts +16 -0
- package/vendor/opencli/dist/clis/xiaohongshu/user-helpers.js +69 -0
- package/vendor/opencli/dist/clis/xiaohongshu/user-helpers.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/user-helpers.test.js +99 -0
- package/vendor/opencli/dist/clis/xiaohongshu/user.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaohongshu/user.js +56 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/episode.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/episode.js +28 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/podcast-episodes.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/podcast-episodes.js +36 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/podcast.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/podcast.js +27 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/utils.d.ts +16 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/utils.js +55 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xiaoyuzhou/utils.test.js +99 -0
- package/vendor/opencli/dist/clis/xueqiu/comments.d.ts +118 -0
- package/vendor/opencli/dist/clis/xueqiu/comments.js +354 -0
- package/vendor/opencli/dist/clis/xueqiu/comments.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xueqiu/comments.test.js +696 -0
- package/vendor/opencli/dist/clis/xueqiu/danjuan-utils.d.ts +55 -0
- package/vendor/opencli/dist/clis/xueqiu/danjuan-utils.js +126 -0
- package/vendor/opencli/dist/clis/xueqiu/danjuan-utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/xueqiu/danjuan-utils.test.js +41 -0
- package/vendor/opencli/dist/clis/xueqiu/earnings-date.yaml +69 -0
- package/vendor/opencli/dist/clis/xueqiu/feed.yaml +53 -0
- package/vendor/opencli/dist/clis/xueqiu/fund-holdings.d.ts +1 -0
- package/vendor/opencli/dist/clis/xueqiu/fund-holdings.js +28 -0
- package/vendor/opencli/dist/clis/xueqiu/fund-snapshot.d.ts +1 -0
- package/vendor/opencli/dist/clis/xueqiu/fund-snapshot.js +25 -0
- package/vendor/opencli/dist/clis/xueqiu/hot-stock.yaml +49 -0
- package/vendor/opencli/dist/clis/xueqiu/hot.yaml +46 -0
- package/vendor/opencli/dist/clis/xueqiu/search.yaml +55 -0
- package/vendor/opencli/dist/clis/xueqiu/stock.yaml +69 -0
- package/vendor/opencli/dist/clis/xueqiu/watchlist.yaml +46 -0
- package/vendor/opencli/dist/clis/yahoo-finance/quote.d.ts +1 -0
- package/vendor/opencli/dist/clis/yahoo-finance/quote.js +72 -0
- package/vendor/opencli/dist/clis/yollomi/background.d.ts +4 -0
- package/vendor/opencli/dist/clis/yollomi/background.js +45 -0
- package/vendor/opencli/dist/clis/yollomi/edit.d.ts +5 -0
- package/vendor/opencli/dist/clis/yollomi/edit.js +56 -0
- package/vendor/opencli/dist/clis/yollomi/face-swap.d.ts +5 -0
- package/vendor/opencli/dist/clis/yollomi/face-swap.js +43 -0
- package/vendor/opencli/dist/clis/yollomi/generate.d.ts +9 -0
- package/vendor/opencli/dist/clis/yollomi/generate.js +100 -0
- package/vendor/opencli/dist/clis/yollomi/models.d.ts +1 -0
- package/vendor/opencli/dist/clis/yollomi/models.js +33 -0
- package/vendor/opencli/dist/clis/yollomi/object-remover.d.ts +4 -0
- package/vendor/opencli/dist/clis/yollomi/object-remover.js +42 -0
- package/vendor/opencli/dist/clis/yollomi/remove-bg.d.ts +4 -0
- package/vendor/opencli/dist/clis/yollomi/remove-bg.js +38 -0
- package/vendor/opencli/dist/clis/yollomi/restore.d.ts +4 -0
- package/vendor/opencli/dist/clis/yollomi/restore.js +38 -0
- package/vendor/opencli/dist/clis/yollomi/try-on.d.ts +4 -0
- package/vendor/opencli/dist/clis/yollomi/try-on.js +46 -0
- package/vendor/opencli/dist/clis/yollomi/upload.d.ts +7 -0
- package/vendor/opencli/dist/clis/yollomi/upload.js +71 -0
- package/vendor/opencli/dist/clis/yollomi/upscale.d.ts +4 -0
- package/vendor/opencli/dist/clis/yollomi/upscale.js +53 -0
- package/vendor/opencli/dist/clis/yollomi/utils.d.ts +45 -0
- package/vendor/opencli/dist/clis/yollomi/utils.js +180 -0
- package/vendor/opencli/dist/clis/yollomi/video.d.ts +5 -0
- package/vendor/opencli/dist/clis/yollomi/video.js +56 -0
- package/vendor/opencli/dist/clis/youtube/channel.d.ts +1 -0
- package/vendor/opencli/dist/clis/youtube/channel.js +150 -0
- package/vendor/opencli/dist/clis/youtube/comments.d.ts +1 -0
- package/vendor/opencli/dist/clis/youtube/comments.js +95 -0
- package/vendor/opencli/dist/clis/youtube/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/youtube/search.js +99 -0
- package/vendor/opencli/dist/clis/youtube/transcript-group.d.ts +44 -0
- package/vendor/opencli/dist/clis/youtube/transcript-group.js +226 -0
- package/vendor/opencli/dist/clis/youtube/transcript-group.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/youtube/transcript-group.test.js +99 -0
- package/vendor/opencli/dist/clis/youtube/transcript.d.ts +1 -0
- package/vendor/opencli/dist/clis/youtube/transcript.js +263 -0
- package/vendor/opencli/dist/clis/youtube/utils.d.ts +17 -0
- package/vendor/opencli/dist/clis/youtube/utils.js +92 -0
- package/vendor/opencli/dist/clis/youtube/utils.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/youtube/utils.test.js +37 -0
- package/vendor/opencli/dist/clis/youtube/video.d.ts +1 -0
- package/vendor/opencli/dist/clis/youtube/video.js +116 -0
- package/vendor/opencli/dist/clis/yuanbao/ask.d.ts +21 -0
- package/vendor/opencli/dist/clis/yuanbao/ask.js +427 -0
- package/vendor/opencli/dist/clis/yuanbao/ask.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/yuanbao/ask.test.js +124 -0
- package/vendor/opencli/dist/clis/yuanbao/new.d.ts +1 -0
- package/vendor/opencli/dist/clis/yuanbao/new.js +70 -0
- package/vendor/opencli/dist/clis/yuanbao/new.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/yuanbao/new.test.js +30 -0
- package/vendor/opencli/dist/clis/yuanbao/shared.d.ts +13 -0
- package/vendor/opencli/dist/clis/yuanbao/shared.js +49 -0
- package/vendor/opencli/dist/clis/zhihu/download.d.ts +7 -0
- package/vendor/opencli/dist/clis/zhihu/download.js +79 -0
- package/vendor/opencli/dist/clis/zhihu/download.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/zhihu/download.test.js +12 -0
- package/vendor/opencli/dist/clis/zhihu/hot.yaml +46 -0
- package/vendor/opencli/dist/clis/zhihu/question.d.ts +1 -0
- package/vendor/opencli/dist/clis/zhihu/question.js +53 -0
- package/vendor/opencli/dist/clis/zhihu/question.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/zhihu/question.test.js +72 -0
- package/vendor/opencli/dist/clis/zhihu/search.yaml +59 -0
- package/vendor/opencli/dist/clis/zsxq/dynamics.d.ts +1 -0
- package/vendor/opencli/dist/clis/zsxq/dynamics.js +47 -0
- package/vendor/opencli/dist/clis/zsxq/groups.d.ts +1 -0
- package/vendor/opencli/dist/clis/zsxq/groups.js +32 -0
- package/vendor/opencli/dist/clis/zsxq/search.d.ts +1 -0
- package/vendor/opencli/dist/clis/zsxq/search.js +43 -0
- package/vendor/opencli/dist/clis/zsxq/search.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/zsxq/search.test.js +24 -0
- package/vendor/opencli/dist/clis/zsxq/topic.d.ts +1 -0
- package/vendor/opencli/dist/clis/zsxq/topic.js +47 -0
- package/vendor/opencli/dist/clis/zsxq/topic.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/zsxq/topic.test.js +29 -0
- package/vendor/opencli/dist/clis/zsxq/topics.d.ts +1 -0
- package/vendor/opencli/dist/clis/zsxq/topics.js +25 -0
- package/vendor/opencli/dist/clis/zsxq/topics.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/zsxq/topics.test.js +24 -0
- package/vendor/opencli/dist/clis/zsxq/utils.d.ts +97 -0
- package/vendor/opencli/dist/clis/zsxq/utils.js +230 -0
- package/vendor/opencli/dist/commanderAdapter.d.ts +22 -0
- package/vendor/opencli/dist/commanderAdapter.js +301 -0
- package/vendor/opencli/dist/commanderAdapter.test.d.ts +1 -0
- package/vendor/opencli/dist/commanderAdapter.test.js +244 -0
- package/vendor/opencli/dist/commands/daemon.d.ts +9 -0
- package/vendor/opencli/dist/commands/daemon.js +85 -0
- package/vendor/opencli/dist/commands/daemon.test.d.ts +1 -0
- package/vendor/opencli/dist/commands/daemon.test.js +160 -0
- package/vendor/opencli/dist/completion.d.ts +21 -0
- package/vendor/opencli/dist/completion.js +120 -0
- package/vendor/opencli/dist/completion.test.d.ts +1 -0
- package/vendor/opencli/dist/completion.test.js +23 -0
- package/vendor/opencli/dist/constants.d.ts +17 -0
- package/vendor/opencli/dist/constants.js +34 -0
- package/vendor/opencli/dist/daemon.d.ts +21 -0
- package/vendor/opencli/dist/daemon.js +303 -0
- package/vendor/opencli/dist/daemon.test.d.ts +1 -0
- package/vendor/opencli/dist/daemon.test.js +65 -0
- package/vendor/opencli/dist/discovery.d.ts +31 -0
- package/vendor/opencli/dist/discovery.js +330 -0
- package/vendor/opencli/dist/doctor.d.ts +38 -0
- package/vendor/opencli/dist/doctor.js +126 -0
- package/vendor/opencli/dist/doctor.test.d.ts +1 -0
- package/vendor/opencli/dist/doctor.test.js +91 -0
- package/vendor/opencli/dist/download/article-download.d.ts +59 -0
- package/vendor/opencli/dist/download/article-download.js +178 -0
- package/vendor/opencli/dist/download/index.d.ts +71 -0
- package/vendor/opencli/dist/download/index.js +345 -0
- package/vendor/opencli/dist/download/index.test.d.ts +1 -0
- package/vendor/opencli/dist/download/index.test.js +118 -0
- package/vendor/opencli/dist/download/media-download.d.ts +49 -0
- package/vendor/opencli/dist/download/media-download.js +114 -0
- package/vendor/opencli/dist/download/progress.d.ts +36 -0
- package/vendor/opencli/dist/download/progress.js +111 -0
- package/vendor/opencli/dist/electron-apps.d.ts +31 -0
- package/vendor/opencli/dist/electron-apps.js +71 -0
- package/vendor/opencli/dist/electron-apps.test.d.ts +1 -0
- package/vendor/opencli/dist/electron-apps.test.js +43 -0
- package/vendor/opencli/dist/engine.test.d.ts +1 -0
- package/vendor/opencli/dist/engine.test.js +297 -0
- package/vendor/opencli/dist/errors.d.ts +76 -0
- package/vendor/opencli/dist/errors.js +119 -0
- package/vendor/opencli/dist/errors.test.d.ts +1 -0
- package/vendor/opencli/dist/errors.test.js +59 -0
- package/vendor/opencli/dist/execution.d.ts +14 -0
- package/vendor/opencli/dist/execution.js +209 -0
- package/vendor/opencli/dist/execution.test.d.ts +1 -0
- package/vendor/opencli/dist/execution.test.js +40 -0
- package/vendor/opencli/dist/explore.d.ts +101 -0
- package/vendor/opencli/dist/explore.js +379 -0
- package/vendor/opencli/dist/extension-manifest-regression.test.d.ts +1 -0
- package/vendor/opencli/dist/extension-manifest-regression.test.js +13 -0
- package/vendor/opencli/dist/external-clis.yaml +56 -0
- package/vendor/opencli/dist/external.d.ts +40 -0
- package/vendor/opencli/dist/external.js +209 -0
- package/vendor/opencli/dist/external.test.d.ts +1 -0
- package/vendor/opencli/dist/external.test.js +68 -0
- package/vendor/opencli/dist/generate.d.ts +41 -0
- package/vendor/opencli/dist/generate.js +121 -0
- package/vendor/opencli/dist/hooks.d.ts +46 -0
- package/vendor/opencli/dist/hooks.js +58 -0
- package/vendor/opencli/dist/hooks.test.d.ts +4 -0
- package/vendor/opencli/dist/hooks.test.js +92 -0
- package/vendor/opencli/dist/idle-manager.d.ts +19 -0
- package/vendor/opencli/dist/idle-manager.js +54 -0
- package/vendor/opencli/dist/interceptor.d.ts +42 -0
- package/vendor/opencli/dist/interceptor.js +186 -0
- package/vendor/opencli/dist/interceptor.test.d.ts +4 -0
- package/vendor/opencli/dist/interceptor.test.js +81 -0
- package/vendor/opencli/dist/launcher.d.ts +40 -0
- package/vendor/opencli/dist/launcher.js +208 -0
- package/vendor/opencli/dist/launcher.test.d.ts +1 -0
- package/vendor/opencli/dist/launcher.test.js +138 -0
- package/vendor/opencli/dist/logger.d.ts +22 -0
- package/vendor/opencli/dist/logger.js +47 -0
- package/vendor/opencli/dist/main.d.ts +5 -0
- package/vendor/opencli/dist/main.js +60 -0
- package/vendor/opencli/dist/node-network.d.ts +10 -0
- package/vendor/opencli/dist/node-network.js +174 -0
- package/vendor/opencli/dist/node-network.test.d.ts +1 -0
- package/vendor/opencli/dist/node-network.test.js +55 -0
- package/vendor/opencli/dist/output.d.ts +14 -0
- package/vendor/opencli/dist/output.js +147 -0
- package/vendor/opencli/dist/output.test.d.ts +1 -0
- package/vendor/opencli/dist/output.test.js +62 -0
- package/vendor/opencli/dist/pipeline/executor.d.ts +11 -0
- package/vendor/opencli/dist/pipeline/executor.js +93 -0
- package/vendor/opencli/dist/pipeline/executor.test.d.ts +4 -0
- package/vendor/opencli/dist/pipeline/executor.test.js +173 -0
- package/vendor/opencli/dist/pipeline/index.d.ts +5 -0
- package/vendor/opencli/dist/pipeline/index.js +5 -0
- package/vendor/opencli/dist/pipeline/registry.d.ts +19 -0
- package/vendor/opencli/dist/pipeline/registry.js +43 -0
- package/vendor/opencli/dist/pipeline/steps/browser.d.ts +12 -0
- package/vendor/opencli/dist/pipeline/steps/browser.js +76 -0
- package/vendor/opencli/dist/pipeline/steps/download.d.ts +34 -0
- package/vendor/opencli/dist/pipeline/steps/download.js +263 -0
- package/vendor/opencli/dist/pipeline/steps/download.test.d.ts +1 -0
- package/vendor/opencli/dist/pipeline/steps/download.test.js +100 -0
- package/vendor/opencli/dist/pipeline/steps/fetch.d.ts +5 -0
- package/vendor/opencli/dist/pipeline/steps/fetch.js +142 -0
- package/vendor/opencli/dist/pipeline/steps/fetch.test.d.ts +1 -0
- package/vendor/opencli/dist/pipeline/steps/fetch.test.js +123 -0
- package/vendor/opencli/dist/pipeline/steps/intercept.d.ts +5 -0
- package/vendor/opencli/dist/pipeline/steps/intercept.js +50 -0
- package/vendor/opencli/dist/pipeline/steps/tap.d.ts +12 -0
- package/vendor/opencli/dist/pipeline/steps/tap.js +92 -0
- package/vendor/opencli/dist/pipeline/steps/transform.d.ts +9 -0
- package/vendor/opencli/dist/pipeline/steps/transform.js +70 -0
- package/vendor/opencli/dist/pipeline/template.d.ts +16 -0
- package/vendor/opencli/dist/pipeline/template.js +276 -0
- package/vendor/opencli/dist/pipeline/template.test.d.ts +4 -0
- package/vendor/opencli/dist/pipeline/template.test.js +172 -0
- package/vendor/opencli/dist/pipeline/transform.test.d.ts +4 -0
- package/vendor/opencli/dist/pipeline/transform.test.js +119 -0
- package/vendor/opencli/dist/plugin-manifest.d.ts +70 -0
- package/vendor/opencli/dist/plugin-manifest.js +160 -0
- package/vendor/opencli/dist/plugin-manifest.test.d.ts +4 -0
- package/vendor/opencli/dist/plugin-manifest.test.js +179 -0
- package/vendor/opencli/dist/plugin-scaffold.d.ts +28 -0
- package/vendor/opencli/dist/plugin-scaffold.js +142 -0
- package/vendor/opencli/dist/plugin-scaffold.test.d.ts +4 -0
- package/vendor/opencli/dist/plugin-scaffold.test.js +83 -0
- package/vendor/opencli/dist/plugin.d.ts +145 -0
- package/vendor/opencli/dist/plugin.js +1221 -0
- package/vendor/opencli/dist/plugin.test.d.ts +4 -0
- package/vendor/opencli/dist/plugin.test.js +1312 -0
- package/vendor/opencli/dist/record.d.ts +97 -0
- package/vendor/opencli/dist/record.js +694 -0
- package/vendor/opencli/dist/record.test.d.ts +1 -0
- package/vendor/opencli/dist/record.test.js +293 -0
- package/vendor/opencli/dist/registry-api.d.ts +13 -0
- package/vendor/opencli/dist/registry-api.js +10 -0
- package/vendor/opencli/dist/registry.d.ts +81 -0
- package/vendor/opencli/dist/registry.js +78 -0
- package/vendor/opencli/dist/registry.test.d.ts +4 -0
- package/vendor/opencli/dist/registry.test.js +113 -0
- package/vendor/opencli/dist/runtime-detect.d.ts +21 -0
- package/vendor/opencli/dist/runtime-detect.js +32 -0
- package/vendor/opencli/dist/runtime-detect.test.d.ts +1 -0
- package/vendor/opencli/dist/runtime-detect.test.js +27 -0
- package/vendor/opencli/dist/runtime.d.ts +36 -0
- package/vendor/opencli/dist/runtime.js +61 -0
- package/vendor/opencli/dist/scripts/framework.d.ts +4 -0
- package/vendor/opencli/dist/scripts/framework.js +21 -0
- package/vendor/opencli/dist/scripts/interact.d.ts +4 -0
- package/vendor/opencli/dist/scripts/interact.js +20 -0
- package/vendor/opencli/dist/scripts/store.d.ts +9 -0
- package/vendor/opencli/dist/scripts/store.js +44 -0
- package/vendor/opencli/dist/serialization.d.ts +38 -0
- package/vendor/opencli/dist/serialization.js +78 -0
- package/vendor/opencli/dist/serialization.test.d.ts +1 -0
- package/vendor/opencli/dist/serialization.test.js +39 -0
- package/vendor/opencli/dist/snapshotFormatter.d.ts +11 -0
- package/vendor/opencli/dist/snapshotFormatter.js +338 -0
- package/vendor/opencli/dist/snapshotFormatter.test.d.ts +7 -0
- package/vendor/opencli/dist/snapshotFormatter.test.js +521 -0
- package/vendor/opencli/dist/synthesize.d.ts +103 -0
- package/vendor/opencli/dist/synthesize.js +216 -0
- package/vendor/opencli/dist/tui.d.ts +29 -0
- package/vendor/opencli/dist/tui.js +192 -0
- package/vendor/opencli/dist/tui.test.d.ts +1 -0
- package/vendor/opencli/dist/tui.test.js +19 -0
- package/vendor/opencli/dist/types.d.ts +98 -0
- package/vendor/opencli/dist/types.js +7 -0
- package/vendor/opencli/dist/update-check.d.ts +22 -0
- package/vendor/opencli/dist/update-check.js +112 -0
- package/vendor/opencli/dist/utils.d.ts +11 -0
- package/vendor/opencli/dist/utils.js +33 -0
- package/vendor/opencli/dist/validate.d.ts +14 -0
- package/vendor/opencli/dist/validate.js +96 -0
- package/vendor/opencli/dist/verify.d.ts +26 -0
- package/vendor/opencli/dist/verify.js +67 -0
- package/vendor/opencli/dist/version.d.ts +4 -0
- package/vendor/opencli/dist/version.js +16 -0
- package/vendor/opencli/dist/weixin-download.test.d.ts +1 -0
- package/vendor/opencli/dist/weixin-download.test.js +44 -0
- package/vendor/opencli/dist/yaml-schema.d.ts +29 -0
- package/vendor/opencli/dist/yaml-schema.js +22 -0
|
@@ -0,0 +1,1221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin management: install, uninstall, and list plugins.
|
|
3
|
+
*
|
|
4
|
+
* Plugins live in ~/.opencli/plugins/<name>/.
|
|
5
|
+
* Monorepo clones live in ~/.opencli/monorepos/<repo-name>/.
|
|
6
|
+
* Install source format: "github:user/repo", "github:user/repo/subplugin",
|
|
7
|
+
* "https://github.com/user/repo", "file:///local/plugin", or a local directory path.
|
|
8
|
+
*/
|
|
9
|
+
import * as fs from 'node:fs';
|
|
10
|
+
import * as os from 'node:os';
|
|
11
|
+
import * as path from 'node:path';
|
|
12
|
+
import { execSync, execFileSync } from 'node:child_process';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
|
+
import { PLUGINS_DIR } from './discovery.js';
|
|
15
|
+
import { getErrorMessage } from './errors.js';
|
|
16
|
+
import { log } from './logger.js';
|
|
17
|
+
import { readPluginManifest, isMonorepo, getEnabledPlugins, checkCompatibility, } from './plugin-manifest.js';
|
|
18
|
+
const isWindows = process.platform === 'win32';
|
|
19
|
+
const LOCAL_PLUGIN_SOURCE_PREFIX = 'local:';
|
|
20
|
+
/** Get home directory, respecting HOME environment variable for test isolation. */
|
|
21
|
+
function getHomeDir() {
|
|
22
|
+
return process.env.HOME || process.env.USERPROFILE || os.homedir();
|
|
23
|
+
}
|
|
24
|
+
/** Path to the lock file that tracks installed plugin versions. */
|
|
25
|
+
export function getLockFilePath() {
|
|
26
|
+
return path.join(getHomeDir(), '.opencli', 'plugins.lock.json');
|
|
27
|
+
}
|
|
28
|
+
/** Monorepo clones directory: ~/.opencli/monorepos/ */
|
|
29
|
+
export function getMonoreposDir() {
|
|
30
|
+
return path.join(getHomeDir(), '.opencli', 'monorepos');
|
|
31
|
+
}
|
|
32
|
+
function parseStoredPluginSource(source) {
|
|
33
|
+
if (!source)
|
|
34
|
+
return undefined;
|
|
35
|
+
if (source.startsWith(LOCAL_PLUGIN_SOURCE_PREFIX)) {
|
|
36
|
+
return {
|
|
37
|
+
kind: 'local',
|
|
38
|
+
path: path.resolve(source.slice(LOCAL_PLUGIN_SOURCE_PREFIX.length)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return { kind: 'git', url: source };
|
|
42
|
+
}
|
|
43
|
+
function isLocalPluginSource(source) {
|
|
44
|
+
return parseStoredPluginSource(source)?.kind === 'local';
|
|
45
|
+
}
|
|
46
|
+
function toStoredPluginSource(source) {
|
|
47
|
+
if (source.kind === 'local') {
|
|
48
|
+
return `${LOCAL_PLUGIN_SOURCE_PREFIX}${path.resolve(source.path)}`;
|
|
49
|
+
}
|
|
50
|
+
return source.url;
|
|
51
|
+
}
|
|
52
|
+
function toLocalPluginSource(pluginDir) {
|
|
53
|
+
return toStoredPluginSource({ kind: 'local', path: pluginDir });
|
|
54
|
+
}
|
|
55
|
+
function isRecord(value) {
|
|
56
|
+
return typeof value === 'object' && value !== null;
|
|
57
|
+
}
|
|
58
|
+
function normalizeLegacyMonorepo(value) {
|
|
59
|
+
if (!isRecord(value))
|
|
60
|
+
return undefined;
|
|
61
|
+
if (typeof value.name !== 'string' || typeof value.subPath !== 'string')
|
|
62
|
+
return undefined;
|
|
63
|
+
return { name: value.name, subPath: value.subPath };
|
|
64
|
+
}
|
|
65
|
+
function normalizePluginSource(source, legacyMonorepo) {
|
|
66
|
+
if (typeof source === 'string') {
|
|
67
|
+
const parsed = parseStoredPluginSource(source);
|
|
68
|
+
if (!parsed)
|
|
69
|
+
return undefined;
|
|
70
|
+
if (parsed.kind === 'git' && legacyMonorepo) {
|
|
71
|
+
return {
|
|
72
|
+
kind: 'monorepo',
|
|
73
|
+
url: parsed.url,
|
|
74
|
+
repoName: legacyMonorepo.name,
|
|
75
|
+
subPath: legacyMonorepo.subPath,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
return parsed;
|
|
79
|
+
}
|
|
80
|
+
if (!isRecord(source) || typeof source.kind !== 'string')
|
|
81
|
+
return undefined;
|
|
82
|
+
switch (source.kind) {
|
|
83
|
+
case 'git':
|
|
84
|
+
return typeof source.url === 'string'
|
|
85
|
+
? { kind: 'git', url: source.url }
|
|
86
|
+
: undefined;
|
|
87
|
+
case 'local':
|
|
88
|
+
return typeof source.path === 'string'
|
|
89
|
+
? { kind: 'local', path: path.resolve(source.path) }
|
|
90
|
+
: undefined;
|
|
91
|
+
case 'monorepo':
|
|
92
|
+
return typeof source.url === 'string'
|
|
93
|
+
&& typeof source.repoName === 'string'
|
|
94
|
+
&& typeof source.subPath === 'string'
|
|
95
|
+
? {
|
|
96
|
+
kind: 'monorepo',
|
|
97
|
+
url: source.url,
|
|
98
|
+
repoName: source.repoName,
|
|
99
|
+
subPath: source.subPath,
|
|
100
|
+
}
|
|
101
|
+
: undefined;
|
|
102
|
+
default:
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function normalizeLockEntry(value) {
|
|
107
|
+
if (!isRecord(value))
|
|
108
|
+
return undefined;
|
|
109
|
+
const legacyMonorepo = normalizeLegacyMonorepo(value.monorepo);
|
|
110
|
+
const source = normalizePluginSource(value.source, legacyMonorepo);
|
|
111
|
+
if (!source)
|
|
112
|
+
return undefined;
|
|
113
|
+
if (typeof value.commitHash !== 'string' || typeof value.installedAt !== 'string') {
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
const entry = {
|
|
117
|
+
source,
|
|
118
|
+
commitHash: value.commitHash,
|
|
119
|
+
installedAt: value.installedAt,
|
|
120
|
+
};
|
|
121
|
+
if (typeof value.updatedAt === 'string') {
|
|
122
|
+
entry.updatedAt = value.updatedAt;
|
|
123
|
+
}
|
|
124
|
+
return entry;
|
|
125
|
+
}
|
|
126
|
+
function resolvePluginSource(lockEntry, pluginDir) {
|
|
127
|
+
if (lockEntry) {
|
|
128
|
+
return lockEntry.source;
|
|
129
|
+
}
|
|
130
|
+
return parseStoredPluginSource(getPluginSource(pluginDir));
|
|
131
|
+
}
|
|
132
|
+
function resolveStoredPluginSource(lockEntry, pluginDir) {
|
|
133
|
+
const source = resolvePluginSource(lockEntry, pluginDir);
|
|
134
|
+
return source ? toStoredPluginSource(source) : undefined;
|
|
135
|
+
}
|
|
136
|
+
function moveDir(src, dest, fsOps = fs) {
|
|
137
|
+
try {
|
|
138
|
+
fsOps.renameSync(src, dest);
|
|
139
|
+
}
|
|
140
|
+
catch (err) {
|
|
141
|
+
if (err.code === 'EXDEV') {
|
|
142
|
+
try {
|
|
143
|
+
fsOps.cpSync(src, dest, { recursive: true });
|
|
144
|
+
}
|
|
145
|
+
catch (copyErr) {
|
|
146
|
+
try {
|
|
147
|
+
fsOps.rmSync(dest, { recursive: true, force: true });
|
|
148
|
+
}
|
|
149
|
+
catch { }
|
|
150
|
+
throw copyErr;
|
|
151
|
+
}
|
|
152
|
+
fsOps.rmSync(src, { recursive: true, force: true });
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
throw err;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function createSiblingTempPath(dest, kind) {
|
|
160
|
+
const suffix = `${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
161
|
+
return path.join(path.dirname(dest), `.${path.basename(dest)}.${kind}-${suffix}`);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Promote a prepared staging directory into its final location.
|
|
165
|
+
* The final path is only exposed after the directory has been fully prepared.
|
|
166
|
+
*/
|
|
167
|
+
function promoteDir(stagingDir, dest, fsOps = fs) {
|
|
168
|
+
if (fsOps.existsSync(dest)) {
|
|
169
|
+
throw new Error(`Destination already exists: ${dest}`);
|
|
170
|
+
}
|
|
171
|
+
fsOps.mkdirSync(path.dirname(dest), { recursive: true });
|
|
172
|
+
const tempDest = createSiblingTempPath(dest, 'tmp');
|
|
173
|
+
try {
|
|
174
|
+
moveDir(stagingDir, tempDest, fsOps);
|
|
175
|
+
fsOps.renameSync(tempDest, dest);
|
|
176
|
+
}
|
|
177
|
+
catch (err) {
|
|
178
|
+
try {
|
|
179
|
+
fsOps.rmSync(tempDest, { recursive: true, force: true });
|
|
180
|
+
}
|
|
181
|
+
catch { }
|
|
182
|
+
throw err;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
function replaceDir(stagingDir, dest, fsOps = fs) {
|
|
186
|
+
const replacement = beginReplaceDir(stagingDir, dest, fsOps);
|
|
187
|
+
replacement.finalize();
|
|
188
|
+
}
|
|
189
|
+
function cloneRepoToTemp(cloneUrl) {
|
|
190
|
+
const tmpCloneDir = path.join(os.tmpdir(), `opencli-clone-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`);
|
|
191
|
+
try {
|
|
192
|
+
execFileSync('git', ['clone', '--depth', '1', cloneUrl, tmpCloneDir], {
|
|
193
|
+
encoding: 'utf-8',
|
|
194
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
throw new Error(`Failed to clone plugin: ${getErrorMessage(err)}`);
|
|
199
|
+
}
|
|
200
|
+
return tmpCloneDir;
|
|
201
|
+
}
|
|
202
|
+
function withTempClone(cloneUrl, work) {
|
|
203
|
+
const tmpCloneDir = cloneRepoToTemp(cloneUrl);
|
|
204
|
+
try {
|
|
205
|
+
return work(tmpCloneDir);
|
|
206
|
+
}
|
|
207
|
+
finally {
|
|
208
|
+
try {
|
|
209
|
+
fs.rmSync(tmpCloneDir, { recursive: true, force: true });
|
|
210
|
+
}
|
|
211
|
+
catch { }
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function resolveRemotePluginSource(lockEntry, dir) {
|
|
215
|
+
const source = resolvePluginSource(lockEntry, dir);
|
|
216
|
+
if (!source || source.kind === 'local') {
|
|
217
|
+
throw new Error(`Unable to determine remote source for plugin at ${dir}`);
|
|
218
|
+
}
|
|
219
|
+
return source.url;
|
|
220
|
+
}
|
|
221
|
+
function pathExistsSync(p) {
|
|
222
|
+
try {
|
|
223
|
+
fs.lstatSync(p);
|
|
224
|
+
return true;
|
|
225
|
+
}
|
|
226
|
+
catch {
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function removePathSync(p) {
|
|
231
|
+
try {
|
|
232
|
+
const stat = fs.lstatSync(p);
|
|
233
|
+
if (stat.isSymbolicLink()) {
|
|
234
|
+
fs.unlinkSync(p);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
fs.rmSync(p, { recursive: true, force: true });
|
|
238
|
+
}
|
|
239
|
+
catch { }
|
|
240
|
+
}
|
|
241
|
+
class Transaction {
|
|
242
|
+
#handles = [];
|
|
243
|
+
#settled = false;
|
|
244
|
+
track(handle) {
|
|
245
|
+
this.#handles.push(handle);
|
|
246
|
+
return handle;
|
|
247
|
+
}
|
|
248
|
+
commit() {
|
|
249
|
+
if (this.#settled)
|
|
250
|
+
return;
|
|
251
|
+
this.#settled = true;
|
|
252
|
+
for (const handle of this.#handles) {
|
|
253
|
+
handle.finalize();
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
rollback() {
|
|
257
|
+
if (this.#settled)
|
|
258
|
+
return;
|
|
259
|
+
this.#settled = true;
|
|
260
|
+
for (const handle of [...this.#handles].reverse()) {
|
|
261
|
+
handle.rollback();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function runTransaction(work) {
|
|
266
|
+
const tx = new Transaction();
|
|
267
|
+
try {
|
|
268
|
+
const result = work(tx);
|
|
269
|
+
tx.commit();
|
|
270
|
+
return result;
|
|
271
|
+
}
|
|
272
|
+
catch (err) {
|
|
273
|
+
tx.rollback();
|
|
274
|
+
throw err;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function beginReplaceDir(stagingDir, dest, fsOps = fs) {
|
|
278
|
+
const destExisted = fsOps.existsSync(dest);
|
|
279
|
+
fsOps.mkdirSync(path.dirname(dest), { recursive: true });
|
|
280
|
+
const tempDest = createSiblingTempPath(dest, 'tmp');
|
|
281
|
+
const backupDest = destExisted ? createSiblingTempPath(dest, 'bak') : null;
|
|
282
|
+
let settled = false;
|
|
283
|
+
try {
|
|
284
|
+
moveDir(stagingDir, tempDest, fsOps);
|
|
285
|
+
if (backupDest) {
|
|
286
|
+
fsOps.renameSync(dest, backupDest);
|
|
287
|
+
}
|
|
288
|
+
fsOps.renameSync(tempDest, dest);
|
|
289
|
+
}
|
|
290
|
+
catch (err) {
|
|
291
|
+
try {
|
|
292
|
+
fsOps.rmSync(tempDest, { recursive: true, force: true });
|
|
293
|
+
}
|
|
294
|
+
catch { }
|
|
295
|
+
if (backupDest && !fsOps.existsSync(dest)) {
|
|
296
|
+
try {
|
|
297
|
+
fsOps.renameSync(backupDest, dest);
|
|
298
|
+
}
|
|
299
|
+
catch { }
|
|
300
|
+
}
|
|
301
|
+
throw err;
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
finalize() {
|
|
305
|
+
if (settled)
|
|
306
|
+
return;
|
|
307
|
+
settled = true;
|
|
308
|
+
if (backupDest) {
|
|
309
|
+
try {
|
|
310
|
+
fsOps.rmSync(backupDest, { recursive: true, force: true });
|
|
311
|
+
}
|
|
312
|
+
catch { }
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
rollback() {
|
|
316
|
+
if (settled)
|
|
317
|
+
return;
|
|
318
|
+
settled = true;
|
|
319
|
+
try {
|
|
320
|
+
fsOps.rmSync(dest, { recursive: true, force: true });
|
|
321
|
+
}
|
|
322
|
+
catch { }
|
|
323
|
+
if (backupDest) {
|
|
324
|
+
try {
|
|
325
|
+
fsOps.renameSync(backupDest, dest);
|
|
326
|
+
}
|
|
327
|
+
catch { }
|
|
328
|
+
}
|
|
329
|
+
try {
|
|
330
|
+
fsOps.rmSync(tempDest, { recursive: true, force: true });
|
|
331
|
+
}
|
|
332
|
+
catch { }
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
function beginReplaceSymlink(target, linkPath) {
|
|
337
|
+
const linkExists = pathExistsSync(linkPath);
|
|
338
|
+
if (linkExists && !isSymlinkSync(linkPath)) {
|
|
339
|
+
throw new Error(`Expected monorepo plugin link at ${linkPath} to be a symlink`);
|
|
340
|
+
}
|
|
341
|
+
fs.mkdirSync(path.dirname(linkPath), { recursive: true });
|
|
342
|
+
const tempLink = createSiblingTempPath(linkPath, 'tmp');
|
|
343
|
+
const backupLink = linkExists ? createSiblingTempPath(linkPath, 'bak') : null;
|
|
344
|
+
const linkType = isWindows ? 'junction' : 'dir';
|
|
345
|
+
let settled = false;
|
|
346
|
+
try {
|
|
347
|
+
fs.symlinkSync(target, tempLink, linkType);
|
|
348
|
+
if (backupLink) {
|
|
349
|
+
fs.renameSync(linkPath, backupLink);
|
|
350
|
+
}
|
|
351
|
+
fs.renameSync(tempLink, linkPath);
|
|
352
|
+
}
|
|
353
|
+
catch (err) {
|
|
354
|
+
removePathSync(tempLink);
|
|
355
|
+
if (backupLink && !pathExistsSync(linkPath)) {
|
|
356
|
+
try {
|
|
357
|
+
fs.renameSync(backupLink, linkPath);
|
|
358
|
+
}
|
|
359
|
+
catch { }
|
|
360
|
+
}
|
|
361
|
+
throw err;
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
finalize() {
|
|
365
|
+
if (settled)
|
|
366
|
+
return;
|
|
367
|
+
settled = true;
|
|
368
|
+
if (backupLink) {
|
|
369
|
+
removePathSync(backupLink);
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
rollback() {
|
|
373
|
+
if (settled)
|
|
374
|
+
return;
|
|
375
|
+
settled = true;
|
|
376
|
+
removePathSync(linkPath);
|
|
377
|
+
if (backupLink && !pathExistsSync(linkPath)) {
|
|
378
|
+
try {
|
|
379
|
+
fs.renameSync(backupLink, linkPath);
|
|
380
|
+
}
|
|
381
|
+
catch { }
|
|
382
|
+
}
|
|
383
|
+
removePathSync(tempLink);
|
|
384
|
+
},
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
// ── Lock file helpers ───────────────────────────────────────────────────────
|
|
388
|
+
function readLockFileWithWriter(writeLock = writeLockFile) {
|
|
389
|
+
try {
|
|
390
|
+
const raw = fs.readFileSync(getLockFilePath(), 'utf-8');
|
|
391
|
+
const parsed = JSON.parse(raw);
|
|
392
|
+
if (!isRecord(parsed))
|
|
393
|
+
return {};
|
|
394
|
+
const lock = {};
|
|
395
|
+
let changed = false;
|
|
396
|
+
for (const [name, entry] of Object.entries(parsed)) {
|
|
397
|
+
const normalized = normalizeLockEntry(entry);
|
|
398
|
+
if (!normalized) {
|
|
399
|
+
changed = true;
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
lock[name] = normalized;
|
|
403
|
+
if (JSON.stringify(entry) !== JSON.stringify(normalized)) {
|
|
404
|
+
changed = true;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
if (changed) {
|
|
408
|
+
try {
|
|
409
|
+
writeLock(lock);
|
|
410
|
+
}
|
|
411
|
+
catch { }
|
|
412
|
+
}
|
|
413
|
+
return lock;
|
|
414
|
+
}
|
|
415
|
+
catch {
|
|
416
|
+
return {};
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
export function readLockFile() {
|
|
420
|
+
return readLockFileWithWriter(writeLockFile);
|
|
421
|
+
}
|
|
422
|
+
function writeLockFileWithFs(lock, fsOps = fs) {
|
|
423
|
+
const lockPath = getLockFilePath();
|
|
424
|
+
fsOps.mkdirSync(path.dirname(lockPath), { recursive: true });
|
|
425
|
+
const tempPath = createSiblingTempPath(lockPath, 'tmp');
|
|
426
|
+
try {
|
|
427
|
+
fsOps.writeFileSync(tempPath, JSON.stringify(lock, null, 2) + '\n');
|
|
428
|
+
fsOps.renameSync(tempPath, lockPath);
|
|
429
|
+
}
|
|
430
|
+
catch (err) {
|
|
431
|
+
try {
|
|
432
|
+
fsOps.rmSync(tempPath, { force: true });
|
|
433
|
+
}
|
|
434
|
+
catch { }
|
|
435
|
+
throw err;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
export function writeLockFile(lock) {
|
|
439
|
+
writeLockFileWithFs(lock, fs);
|
|
440
|
+
}
|
|
441
|
+
/** Get the HEAD commit hash of a git repo directory. */
|
|
442
|
+
export function getCommitHash(dir) {
|
|
443
|
+
try {
|
|
444
|
+
return execFileSync('git', ['rev-parse', 'HEAD'], {
|
|
445
|
+
cwd: dir,
|
|
446
|
+
encoding: 'utf-8',
|
|
447
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
448
|
+
}).trim();
|
|
449
|
+
}
|
|
450
|
+
catch {
|
|
451
|
+
return undefined;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Validate that a downloaded plugin directory is a structurally valid plugin.
|
|
456
|
+
* Checks for at least one command file (.yaml, .yml, .ts, .js) and a valid
|
|
457
|
+
* package.json if it contains .ts files.
|
|
458
|
+
*/
|
|
459
|
+
export function validatePluginStructure(pluginDir) {
|
|
460
|
+
const errors = [];
|
|
461
|
+
if (!fs.existsSync(pluginDir)) {
|
|
462
|
+
return { valid: false, errors: ['Plugin directory does not exist'] };
|
|
463
|
+
}
|
|
464
|
+
const files = fs.readdirSync(pluginDir);
|
|
465
|
+
const hasYaml = files.some(f => f.endsWith('.yaml') || f.endsWith('.yml'));
|
|
466
|
+
const hasTs = files.some(f => f.endsWith('.ts') && !f.endsWith('.d.ts') && !f.endsWith('.test.ts'));
|
|
467
|
+
const hasJs = files.some(f => f.endsWith('.js') && !f.endsWith('.d.js'));
|
|
468
|
+
if (!hasYaml && !hasTs && !hasJs) {
|
|
469
|
+
errors.push('No command files found in plugin directory. A plugin must contain at least one .yaml, .ts, or .js command file.');
|
|
470
|
+
}
|
|
471
|
+
if (hasTs) {
|
|
472
|
+
const pkgJsonPath = path.join(pluginDir, 'package.json');
|
|
473
|
+
if (!fs.existsSync(pkgJsonPath)) {
|
|
474
|
+
errors.push('Plugin contains .ts files but no package.json. A package.json with "type": "module" and "@jackwener/opencli" peer dependency is required for TS plugins.');
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
try {
|
|
478
|
+
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8'));
|
|
479
|
+
if (pkg.type !== 'module') {
|
|
480
|
+
errors.push('Plugin package.json must have "type": "module" for TypeScript plugins.');
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
catch {
|
|
484
|
+
errors.push('Plugin package.json is malformed or invalid JSON.');
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
return { valid: errors.length === 0, errors };
|
|
489
|
+
}
|
|
490
|
+
function installDependencies(dir) {
|
|
491
|
+
const pkgJsonPath = path.join(dir, 'package.json');
|
|
492
|
+
if (!fs.existsSync(pkgJsonPath))
|
|
493
|
+
return;
|
|
494
|
+
try {
|
|
495
|
+
execFileSync('npm', ['install', '--omit=dev'], {
|
|
496
|
+
cwd: dir,
|
|
497
|
+
encoding: 'utf-8',
|
|
498
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
499
|
+
...(isWindows && { shell: true }),
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
catch (err) {
|
|
503
|
+
throw new Error(`npm install failed in ${dir}: ${getErrorMessage(err)}`);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
function finalizePluginRuntime(pluginDir) {
|
|
507
|
+
// Symlink host opencli so TS plugins resolve '@jackwener/opencli/registry'
|
|
508
|
+
// against the running host, not a stale npm-published version.
|
|
509
|
+
linkHostOpencli(pluginDir);
|
|
510
|
+
// Transpile .ts → .js via esbuild (production node can't load .ts directly).
|
|
511
|
+
transpilePluginTs(pluginDir);
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Shared post-install lifecycle for standalone plugins.
|
|
515
|
+
*/
|
|
516
|
+
function postInstallLifecycle(pluginDir) {
|
|
517
|
+
installDependencies(pluginDir);
|
|
518
|
+
finalizePluginRuntime(pluginDir);
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Monorepo lifecycle: install shared deps once at repo root, then finalize each sub-plugin.
|
|
522
|
+
*/
|
|
523
|
+
function postInstallMonorepoLifecycle(repoDir, pluginDirs) {
|
|
524
|
+
installDependencies(repoDir);
|
|
525
|
+
for (const pluginDir of pluginDirs) {
|
|
526
|
+
finalizePluginRuntime(pluginDir);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
function ensureStandalonePluginReady(pluginDir) {
|
|
530
|
+
const validation = validatePluginStructure(pluginDir);
|
|
531
|
+
if (!validation.valid) {
|
|
532
|
+
throw new Error(`Invalid plugin structure:\n- ${validation.errors.join('\n- ')}`);
|
|
533
|
+
}
|
|
534
|
+
postInstallLifecycle(pluginDir);
|
|
535
|
+
}
|
|
536
|
+
function upsertLockEntry(lock, name, entry) {
|
|
537
|
+
lock[name] = {
|
|
538
|
+
...entry,
|
|
539
|
+
installedAt: entry.installedAt ?? new Date().toISOString(),
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
function publishStandalonePlugin(stagingDir, targetDir, writeLock) {
|
|
543
|
+
runTransaction((tx) => {
|
|
544
|
+
tx.track(beginReplaceDir(stagingDir, targetDir));
|
|
545
|
+
writeLock(getCommitHash(targetDir));
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
function publishMonorepoPlugins(repoDir, pluginsDir, plugins, publishRepo, writeLock) {
|
|
549
|
+
runTransaction((tx) => {
|
|
550
|
+
if (publishRepo) {
|
|
551
|
+
fs.mkdirSync(publishRepo.parentDir, { recursive: true });
|
|
552
|
+
tx.track(beginReplaceDir(publishRepo.stagingDir, repoDir));
|
|
553
|
+
}
|
|
554
|
+
const commitHash = getCommitHash(repoDir);
|
|
555
|
+
for (const plugin of plugins) {
|
|
556
|
+
const linkPath = path.join(pluginsDir, plugin.name);
|
|
557
|
+
const subDir = path.join(repoDir, plugin.subPath);
|
|
558
|
+
tx.track(beginReplaceSymlink(subDir, linkPath));
|
|
559
|
+
}
|
|
560
|
+
writeLock?.(commitHash);
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Install a plugin from a source.
|
|
565
|
+
* Supports:
|
|
566
|
+
* "github:user/repo" — single plugin or full monorepo
|
|
567
|
+
* "github:user/repo/subplugin" — specific sub-plugin from a monorepo
|
|
568
|
+
* "https://github.com/user/repo"
|
|
569
|
+
* "file:///absolute/path" — local plugin directory (symlinked)
|
|
570
|
+
* "/absolute/path" — local plugin directory (symlinked)
|
|
571
|
+
*
|
|
572
|
+
* Returns the installed plugin name(s).
|
|
573
|
+
*/
|
|
574
|
+
export function installPlugin(source) {
|
|
575
|
+
const parsed = parseSource(source);
|
|
576
|
+
if (!parsed) {
|
|
577
|
+
throw new Error(`Invalid plugin source: "${source}"\n` +
|
|
578
|
+
`Supported formats:\n` +
|
|
579
|
+
` github:user/repo\n` +
|
|
580
|
+
` github:user/repo/subplugin\n` +
|
|
581
|
+
` https://github.com/user/repo\n` +
|
|
582
|
+
` https://<host>/<path>/repo.git\n` +
|
|
583
|
+
` ssh://git@<host>/<path>/repo.git\n` +
|
|
584
|
+
` git@<host>:user/repo.git\n` +
|
|
585
|
+
` file:///absolute/path\n` +
|
|
586
|
+
` /absolute/path`);
|
|
587
|
+
}
|
|
588
|
+
const { name: repoName, subPlugin } = parsed;
|
|
589
|
+
if (parsed.type === 'local') {
|
|
590
|
+
return installLocalPlugin(parsed.localPath, repoName);
|
|
591
|
+
}
|
|
592
|
+
return withTempClone(parsed.cloneUrl, (tmpCloneDir) => {
|
|
593
|
+
const manifest = readPluginManifest(tmpCloneDir);
|
|
594
|
+
// Check top-level compatibility
|
|
595
|
+
if (manifest?.opencli && !checkCompatibility(manifest.opencli)) {
|
|
596
|
+
throw new Error(`Plugin requires opencli ${manifest.opencli}, but current version is incompatible.`);
|
|
597
|
+
}
|
|
598
|
+
if (manifest && isMonorepo(manifest)) {
|
|
599
|
+
return installMonorepo(tmpCloneDir, parsed.cloneUrl, repoName, manifest, subPlugin);
|
|
600
|
+
}
|
|
601
|
+
// Single plugin mode
|
|
602
|
+
return installSinglePlugin(tmpCloneDir, parsed.cloneUrl, repoName, manifest);
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
/** Install a single (non-monorepo) plugin. */
|
|
606
|
+
function installSinglePlugin(cloneDir, cloneUrl, name, manifest) {
|
|
607
|
+
const pluginName = manifest?.name ?? name;
|
|
608
|
+
const targetDir = path.join(PLUGINS_DIR, pluginName);
|
|
609
|
+
if (fs.existsSync(targetDir)) {
|
|
610
|
+
throw new Error(`Plugin "${pluginName}" is already installed at ${targetDir}`);
|
|
611
|
+
}
|
|
612
|
+
ensureStandalonePluginReady(cloneDir);
|
|
613
|
+
publishStandalonePlugin(cloneDir, targetDir, (commitHash) => {
|
|
614
|
+
const lock = readLockFile();
|
|
615
|
+
if (commitHash) {
|
|
616
|
+
upsertLockEntry(lock, pluginName, {
|
|
617
|
+
source: { kind: 'git', url: cloneUrl },
|
|
618
|
+
commitHash,
|
|
619
|
+
});
|
|
620
|
+
writeLockFile(lock);
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
return pluginName;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Install a local plugin by creating a symlink.
|
|
627
|
+
* Used for plugin development: the source directory is symlinked into
|
|
628
|
+
* the plugins dir so changes are reflected immediately.
|
|
629
|
+
*/
|
|
630
|
+
function installLocalPlugin(localPath, name) {
|
|
631
|
+
if (!fs.existsSync(localPath)) {
|
|
632
|
+
throw new Error(`Local plugin path does not exist: ${localPath}`);
|
|
633
|
+
}
|
|
634
|
+
const stat = fs.statSync(localPath);
|
|
635
|
+
if (!stat.isDirectory()) {
|
|
636
|
+
throw new Error(`Local plugin path is not a directory: ${localPath}`);
|
|
637
|
+
}
|
|
638
|
+
const manifest = readPluginManifest(localPath);
|
|
639
|
+
if (manifest?.opencli && !checkCompatibility(manifest.opencli)) {
|
|
640
|
+
throw new Error(`Plugin requires opencli ${manifest.opencli}, but current version is incompatible.`);
|
|
641
|
+
}
|
|
642
|
+
const pluginName = manifest?.name ?? name;
|
|
643
|
+
const targetDir = path.join(PLUGINS_DIR, pluginName);
|
|
644
|
+
if (fs.existsSync(targetDir)) {
|
|
645
|
+
throw new Error(`Plugin "${pluginName}" is already installed at ${targetDir}`);
|
|
646
|
+
}
|
|
647
|
+
const validation = validatePluginStructure(localPath);
|
|
648
|
+
if (!validation.valid) {
|
|
649
|
+
throw new Error(`Invalid plugin structure:\n- ${validation.errors.join('\n- ')}`);
|
|
650
|
+
}
|
|
651
|
+
fs.mkdirSync(PLUGINS_DIR, { recursive: true });
|
|
652
|
+
const resolvedPath = path.resolve(localPath);
|
|
653
|
+
const linkType = isWindows ? 'junction' : 'dir';
|
|
654
|
+
fs.symlinkSync(resolvedPath, targetDir, linkType);
|
|
655
|
+
installDependencies(localPath);
|
|
656
|
+
finalizePluginRuntime(localPath);
|
|
657
|
+
const lock = readLockFile();
|
|
658
|
+
const commitHash = getCommitHash(localPath);
|
|
659
|
+
upsertLockEntry(lock, pluginName, {
|
|
660
|
+
source: { kind: 'local', path: resolvedPath },
|
|
661
|
+
commitHash: commitHash ?? 'local',
|
|
662
|
+
});
|
|
663
|
+
writeLockFile(lock);
|
|
664
|
+
return pluginName;
|
|
665
|
+
}
|
|
666
|
+
function updateLocalPlugin(name, targetDir, lock, lockEntry) {
|
|
667
|
+
const pluginDir = fs.realpathSync(targetDir);
|
|
668
|
+
const validation = validatePluginStructure(pluginDir);
|
|
669
|
+
if (!validation.valid) {
|
|
670
|
+
log.warn(`Plugin "${name}" structure invalid:\n- ${validation.errors.join('\n- ')}`);
|
|
671
|
+
}
|
|
672
|
+
postInstallLifecycle(pluginDir);
|
|
673
|
+
upsertLockEntry(lock, name, {
|
|
674
|
+
source: lockEntry?.source ?? { kind: 'local', path: pluginDir },
|
|
675
|
+
commitHash: getCommitHash(pluginDir) ?? 'local',
|
|
676
|
+
installedAt: lockEntry?.installedAt ?? new Date().toISOString(),
|
|
677
|
+
updatedAt: new Date().toISOString(),
|
|
678
|
+
});
|
|
679
|
+
writeLockFile(lock);
|
|
680
|
+
}
|
|
681
|
+
/** Install sub-plugins from a monorepo. */
|
|
682
|
+
function installMonorepo(cloneDir, cloneUrl, repoName, manifest, subPlugin) {
|
|
683
|
+
const monoreposDir = getMonoreposDir();
|
|
684
|
+
const repoDir = path.join(monoreposDir, repoName);
|
|
685
|
+
const repoAlreadyInstalled = fs.existsSync(repoDir);
|
|
686
|
+
const repoRoot = repoAlreadyInstalled ? repoDir : cloneDir;
|
|
687
|
+
const effectiveManifest = repoAlreadyInstalled ? readPluginManifest(repoDir) : manifest;
|
|
688
|
+
if (!effectiveManifest || !isMonorepo(effectiveManifest)) {
|
|
689
|
+
throw new Error(`Monorepo manifest missing or invalid at ${repoRoot}`);
|
|
690
|
+
}
|
|
691
|
+
let pluginsToInstall = getEnabledPlugins(effectiveManifest);
|
|
692
|
+
// If a specific sub-plugin was requested, filter to just that one
|
|
693
|
+
if (subPlugin) {
|
|
694
|
+
pluginsToInstall = pluginsToInstall.filter((p) => p.name === subPlugin);
|
|
695
|
+
if (pluginsToInstall.length === 0) {
|
|
696
|
+
// Check if it exists but is disabled
|
|
697
|
+
const disabled = effectiveManifest.plugins?.[subPlugin];
|
|
698
|
+
if (disabled) {
|
|
699
|
+
throw new Error(`Sub-plugin "${subPlugin}" is disabled in the manifest.`);
|
|
700
|
+
}
|
|
701
|
+
throw new Error(`Sub-plugin "${subPlugin}" not found in monorepo. Available: ${Object.keys(effectiveManifest.plugins ?? {}).join(', ')}`);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
const installedNames = [];
|
|
705
|
+
const lock = readLockFile();
|
|
706
|
+
const eligiblePlugins = [];
|
|
707
|
+
fs.mkdirSync(PLUGINS_DIR, { recursive: true });
|
|
708
|
+
for (const { name, entry } of pluginsToInstall) {
|
|
709
|
+
// Check sub-plugin level compatibility (overrides top-level)
|
|
710
|
+
if (entry.opencli && !checkCompatibility(entry.opencli)) {
|
|
711
|
+
log.warn(`Skipping "${name}": requires opencli ${entry.opencli}`);
|
|
712
|
+
continue;
|
|
713
|
+
}
|
|
714
|
+
const subDir = path.join(repoRoot, entry.path);
|
|
715
|
+
if (!fs.existsSync(subDir)) {
|
|
716
|
+
log.warn(`Skipping "${name}": path "${entry.path}" not found in repo.`);
|
|
717
|
+
continue;
|
|
718
|
+
}
|
|
719
|
+
const validation = validatePluginStructure(subDir);
|
|
720
|
+
if (!validation.valid) {
|
|
721
|
+
log.warn(`Skipping "${name}": invalid structure — ${validation.errors.join(', ')}`);
|
|
722
|
+
continue;
|
|
723
|
+
}
|
|
724
|
+
const linkPath = path.join(PLUGINS_DIR, name);
|
|
725
|
+
if (fs.existsSync(linkPath)) {
|
|
726
|
+
log.warn(`Skipping "${name}": already installed at ${linkPath}`);
|
|
727
|
+
continue;
|
|
728
|
+
}
|
|
729
|
+
eligiblePlugins.push({ name, entry });
|
|
730
|
+
}
|
|
731
|
+
if (eligiblePlugins.length === 0) {
|
|
732
|
+
return installedNames;
|
|
733
|
+
}
|
|
734
|
+
const publishPlugins = eligiblePlugins.map(({ name, entry }) => ({ name, subPath: entry.path }));
|
|
735
|
+
if (repoAlreadyInstalled) {
|
|
736
|
+
postInstallMonorepoLifecycle(repoDir, eligiblePlugins.map((p) => path.join(repoDir, p.entry.path)));
|
|
737
|
+
}
|
|
738
|
+
else {
|
|
739
|
+
postInstallMonorepoLifecycle(cloneDir, eligiblePlugins.map((p) => path.join(cloneDir, p.entry.path)));
|
|
740
|
+
}
|
|
741
|
+
publishMonorepoPlugins(repoDir, PLUGINS_DIR, publishPlugins, repoAlreadyInstalled ? undefined : { stagingDir: cloneDir, parentDir: monoreposDir }, (commitHash) => {
|
|
742
|
+
for (const { name, entry } of eligiblePlugins) {
|
|
743
|
+
if (commitHash) {
|
|
744
|
+
upsertLockEntry(lock, name, {
|
|
745
|
+
source: {
|
|
746
|
+
kind: 'monorepo',
|
|
747
|
+
url: cloneUrl,
|
|
748
|
+
repoName,
|
|
749
|
+
subPath: entry.path,
|
|
750
|
+
},
|
|
751
|
+
commitHash,
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
installedNames.push(name);
|
|
755
|
+
}
|
|
756
|
+
writeLockFile(lock);
|
|
757
|
+
});
|
|
758
|
+
return installedNames;
|
|
759
|
+
}
|
|
760
|
+
function collectUpdatedMonorepoPlugins(monoName, lock, manifest, cloneUrl, tmpCloneDir) {
|
|
761
|
+
const updatedPlugins = [];
|
|
762
|
+
for (const [pluginName, entry] of Object.entries(lock)) {
|
|
763
|
+
if (entry.source.kind !== 'monorepo' || entry.source.repoName !== monoName)
|
|
764
|
+
continue;
|
|
765
|
+
const manifestEntry = manifest.plugins?.[pluginName];
|
|
766
|
+
if (!manifestEntry || manifestEntry.disabled) {
|
|
767
|
+
throw new Error(`Installed sub-plugin "${pluginName}" no longer exists in ${cloneUrl}`);
|
|
768
|
+
}
|
|
769
|
+
if (manifestEntry.opencli && !checkCompatibility(manifestEntry.opencli)) {
|
|
770
|
+
throw new Error(`Sub-plugin "${pluginName}" requires opencli ${manifestEntry.opencli}`);
|
|
771
|
+
}
|
|
772
|
+
const subDir = path.join(tmpCloneDir, manifestEntry.path);
|
|
773
|
+
const validation = validatePluginStructure(subDir);
|
|
774
|
+
if (!validation.valid) {
|
|
775
|
+
throw new Error(`Updated sub-plugin "${pluginName}" is invalid:\n- ${validation.errors.join('\n- ')}`);
|
|
776
|
+
}
|
|
777
|
+
updatedPlugins.push({ name: pluginName, lockEntry: entry, manifestEntry });
|
|
778
|
+
}
|
|
779
|
+
return updatedPlugins;
|
|
780
|
+
}
|
|
781
|
+
function updateMonorepoLockEntries(lock, plugins, cloneUrl, monoName, commitHash) {
|
|
782
|
+
for (const plugin of plugins) {
|
|
783
|
+
if (!commitHash)
|
|
784
|
+
continue;
|
|
785
|
+
upsertLockEntry(lock, plugin.name, {
|
|
786
|
+
...plugin.lockEntry,
|
|
787
|
+
source: {
|
|
788
|
+
kind: 'monorepo',
|
|
789
|
+
url: cloneUrl,
|
|
790
|
+
repoName: monoName,
|
|
791
|
+
subPath: plugin.manifestEntry.path,
|
|
792
|
+
},
|
|
793
|
+
commitHash,
|
|
794
|
+
updatedAt: new Date().toISOString(),
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
function updateStandaloneLockEntry(lock, name, cloneUrl, existing, commitHash) {
|
|
799
|
+
if (!commitHash)
|
|
800
|
+
return;
|
|
801
|
+
upsertLockEntry(lock, name, {
|
|
802
|
+
source: { kind: 'git', url: cloneUrl },
|
|
803
|
+
commitHash,
|
|
804
|
+
installedAt: existing?.installedAt ?? new Date().toISOString(),
|
|
805
|
+
updatedAt: new Date().toISOString(),
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Uninstall a plugin by name.
|
|
810
|
+
* For monorepo sub-plugins: removes symlink and cleans up the monorepo
|
|
811
|
+
* directory when no more sub-plugins reference it.
|
|
812
|
+
*/
|
|
813
|
+
export function uninstallPlugin(name) {
|
|
814
|
+
const targetDir = path.join(PLUGINS_DIR, name);
|
|
815
|
+
if (!fs.existsSync(targetDir)) {
|
|
816
|
+
throw new Error(`Plugin "${name}" is not installed.`);
|
|
817
|
+
}
|
|
818
|
+
const lock = readLockFile();
|
|
819
|
+
const lockEntry = lock[name];
|
|
820
|
+
// Check if this is a symlink (monorepo sub-plugin)
|
|
821
|
+
const isSymlink = isSymlinkSync(targetDir);
|
|
822
|
+
if (isSymlink) {
|
|
823
|
+
// Remove symlink only (not the actual directory)
|
|
824
|
+
fs.unlinkSync(targetDir);
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
fs.rmSync(targetDir, { recursive: true, force: true });
|
|
828
|
+
}
|
|
829
|
+
// Clean up monorepo directory if no more sub-plugins reference it
|
|
830
|
+
if (lockEntry?.source.kind === 'monorepo') {
|
|
831
|
+
delete lock[name];
|
|
832
|
+
const monoName = lockEntry.source.repoName;
|
|
833
|
+
const stillReferenced = Object.values(lock).some((entry) => entry.source.kind === 'monorepo' && entry.source.repoName === monoName);
|
|
834
|
+
if (!stillReferenced) {
|
|
835
|
+
const monoDir = path.join(getMonoreposDir(), monoName);
|
|
836
|
+
try {
|
|
837
|
+
fs.rmSync(monoDir, { recursive: true, force: true });
|
|
838
|
+
}
|
|
839
|
+
catch { }
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
else if (lock[name]) {
|
|
843
|
+
delete lock[name];
|
|
844
|
+
}
|
|
845
|
+
writeLockFile(lock);
|
|
846
|
+
}
|
|
847
|
+
/** Synchronous check if a path is a symlink. */
|
|
848
|
+
function isSymlinkSync(p) {
|
|
849
|
+
try {
|
|
850
|
+
return fs.lstatSync(p).isSymbolicLink();
|
|
851
|
+
}
|
|
852
|
+
catch {
|
|
853
|
+
return false;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* Update a plugin by name (git pull + re-install lifecycle).
|
|
858
|
+
* For monorepo sub-plugins: pulls the monorepo root and re-runs lifecycle
|
|
859
|
+
* for all sub-plugins from the same monorepo.
|
|
860
|
+
*/
|
|
861
|
+
export function updatePlugin(name) {
|
|
862
|
+
const targetDir = path.join(PLUGINS_DIR, name);
|
|
863
|
+
if (!fs.existsSync(targetDir)) {
|
|
864
|
+
throw new Error(`Plugin "${name}" is not installed.`);
|
|
865
|
+
}
|
|
866
|
+
const lock = readLockFile();
|
|
867
|
+
const lockEntry = lock[name];
|
|
868
|
+
const source = resolvePluginSource(lockEntry, targetDir);
|
|
869
|
+
if (source?.kind === 'local') {
|
|
870
|
+
updateLocalPlugin(name, targetDir, lock, lockEntry);
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
if (source?.kind === 'monorepo') {
|
|
874
|
+
const monoDir = path.join(getMonoreposDir(), source.repoName);
|
|
875
|
+
const monoName = source.repoName;
|
|
876
|
+
const cloneUrl = source.url;
|
|
877
|
+
withTempClone(cloneUrl, (tmpCloneDir) => {
|
|
878
|
+
const manifest = readPluginManifest(tmpCloneDir);
|
|
879
|
+
if (!manifest || !isMonorepo(manifest)) {
|
|
880
|
+
throw new Error(`Updated source is no longer a monorepo: ${cloneUrl}`);
|
|
881
|
+
}
|
|
882
|
+
if (manifest.opencli && !checkCompatibility(manifest.opencli)) {
|
|
883
|
+
throw new Error(`Plugin requires opencli ${manifest.opencli}, but current version is incompatible.`);
|
|
884
|
+
}
|
|
885
|
+
const updatedPlugins = collectUpdatedMonorepoPlugins(monoName, lock, manifest, cloneUrl, tmpCloneDir);
|
|
886
|
+
if (updatedPlugins.length > 0) {
|
|
887
|
+
postInstallMonorepoLifecycle(tmpCloneDir, updatedPlugins.map((plugin) => path.join(tmpCloneDir, plugin.manifestEntry.path)));
|
|
888
|
+
}
|
|
889
|
+
publishMonorepoPlugins(monoDir, PLUGINS_DIR, updatedPlugins.map((plugin) => ({ name: plugin.name, subPath: plugin.manifestEntry.path })), { stagingDir: tmpCloneDir, parentDir: path.dirname(monoDir) }, (commitHash) => {
|
|
890
|
+
updateMonorepoLockEntries(lock, updatedPlugins, cloneUrl, monoName, commitHash);
|
|
891
|
+
writeLockFile(lock);
|
|
892
|
+
});
|
|
893
|
+
});
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
const cloneUrl = resolveRemotePluginSource(lockEntry, targetDir);
|
|
897
|
+
withTempClone(cloneUrl, (tmpCloneDir) => {
|
|
898
|
+
const manifest = readPluginManifest(tmpCloneDir);
|
|
899
|
+
if (manifest && isMonorepo(manifest)) {
|
|
900
|
+
throw new Error(`Updated source is now a monorepo: ${cloneUrl}`);
|
|
901
|
+
}
|
|
902
|
+
if (manifest?.opencli && !checkCompatibility(manifest.opencli)) {
|
|
903
|
+
throw new Error(`Plugin requires opencli ${manifest.opencli}, but current version is incompatible.`);
|
|
904
|
+
}
|
|
905
|
+
ensureStandalonePluginReady(tmpCloneDir);
|
|
906
|
+
publishStandalonePlugin(tmpCloneDir, targetDir, (commitHash) => {
|
|
907
|
+
updateStandaloneLockEntry(lock, name, cloneUrl, lock[name], commitHash);
|
|
908
|
+
if (commitHash) {
|
|
909
|
+
writeLockFile(lock);
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Update all installed plugins.
|
|
916
|
+
* Continues even if individual plugin updates fail.
|
|
917
|
+
*/
|
|
918
|
+
export function updateAllPlugins() {
|
|
919
|
+
return listPlugins().map((plugin) => {
|
|
920
|
+
try {
|
|
921
|
+
updatePlugin(plugin.name);
|
|
922
|
+
return { name: plugin.name, success: true };
|
|
923
|
+
}
|
|
924
|
+
catch (err) {
|
|
925
|
+
return {
|
|
926
|
+
name: plugin.name,
|
|
927
|
+
success: false,
|
|
928
|
+
error: getErrorMessage(err),
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* List all installed plugins.
|
|
935
|
+
* Reads opencli-plugin.json for description/version when available.
|
|
936
|
+
*/
|
|
937
|
+
export function listPlugins() {
|
|
938
|
+
if (!fs.existsSync(PLUGINS_DIR))
|
|
939
|
+
return [];
|
|
940
|
+
const entries = fs.readdirSync(PLUGINS_DIR, { withFileTypes: true });
|
|
941
|
+
const lock = readLockFile();
|
|
942
|
+
const plugins = [];
|
|
943
|
+
for (const entry of entries) {
|
|
944
|
+
// Accept both real directories and symlinks (monorepo sub-plugins)
|
|
945
|
+
const pluginDir = path.join(PLUGINS_DIR, entry.name);
|
|
946
|
+
const isDir = entry.isDirectory() || isSymlinkSync(pluginDir);
|
|
947
|
+
if (!isDir)
|
|
948
|
+
continue;
|
|
949
|
+
const commands = scanPluginCommands(pluginDir);
|
|
950
|
+
const lockEntry = lock[entry.name];
|
|
951
|
+
// Try to read manifest for metadata
|
|
952
|
+
const manifest = readPluginManifest(pluginDir);
|
|
953
|
+
// For monorepo sub-plugins, also check the monorepo root manifest
|
|
954
|
+
let description = manifest?.description;
|
|
955
|
+
let version = manifest?.version;
|
|
956
|
+
if (lockEntry?.source.kind === 'monorepo' && !description) {
|
|
957
|
+
const monoDir = path.join(getMonoreposDir(), lockEntry.source.repoName);
|
|
958
|
+
const monoManifest = readPluginManifest(monoDir);
|
|
959
|
+
const subEntry = monoManifest?.plugins?.[entry.name];
|
|
960
|
+
if (subEntry) {
|
|
961
|
+
description = description ?? subEntry.description;
|
|
962
|
+
version = version ?? subEntry.version;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
const source = resolveStoredPluginSource(lockEntry, pluginDir);
|
|
966
|
+
plugins.push({
|
|
967
|
+
name: entry.name,
|
|
968
|
+
path: pluginDir,
|
|
969
|
+
commands,
|
|
970
|
+
source,
|
|
971
|
+
version: version ?? lockEntry?.commitHash?.slice(0, 7),
|
|
972
|
+
installedAt: lockEntry?.installedAt,
|
|
973
|
+
monorepoName: lockEntry?.source.kind === 'monorepo' ? lockEntry.source.repoName : undefined,
|
|
974
|
+
description,
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
return plugins;
|
|
978
|
+
}
|
|
979
|
+
/** Scan a plugin directory for command files */
|
|
980
|
+
function scanPluginCommands(dir) {
|
|
981
|
+
try {
|
|
982
|
+
const files = fs.readdirSync(dir);
|
|
983
|
+
const names = new Set(files
|
|
984
|
+
.filter(f => f.endsWith('.yaml') || f.endsWith('.yml') ||
|
|
985
|
+
(f.endsWith('.ts') && !f.endsWith('.d.ts') && !f.endsWith('.test.ts')) ||
|
|
986
|
+
(f.endsWith('.js') && !f.endsWith('.d.js')))
|
|
987
|
+
.map(f => path.basename(f, path.extname(f))));
|
|
988
|
+
return [...names];
|
|
989
|
+
}
|
|
990
|
+
catch {
|
|
991
|
+
return [];
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
/** Get git remote origin URL */
|
|
995
|
+
function getPluginSource(dir) {
|
|
996
|
+
try {
|
|
997
|
+
return execFileSync('git', ['config', '--get', 'remote.origin.url'], {
|
|
998
|
+
cwd: dir,
|
|
999
|
+
encoding: 'utf-8',
|
|
1000
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
1001
|
+
}).trim();
|
|
1002
|
+
}
|
|
1003
|
+
catch {
|
|
1004
|
+
return undefined;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
/** Parse a plugin source string into clone URL, repo name, and optional sub-plugin. */
|
|
1008
|
+
function parseSource(source) {
|
|
1009
|
+
if (source.startsWith('file://')) {
|
|
1010
|
+
try {
|
|
1011
|
+
const localPath = path.resolve(fileURLToPath(source));
|
|
1012
|
+
return {
|
|
1013
|
+
type: 'local',
|
|
1014
|
+
localPath,
|
|
1015
|
+
name: path.basename(localPath).replace(/^opencli-plugin-/, ''),
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1018
|
+
catch {
|
|
1019
|
+
return null;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
if (path.isAbsolute(source)) {
|
|
1023
|
+
const localPath = path.resolve(source);
|
|
1024
|
+
return {
|
|
1025
|
+
type: 'local',
|
|
1026
|
+
localPath,
|
|
1027
|
+
name: path.basename(localPath).replace(/^opencli-plugin-/, ''),
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
// github:user/repo/subplugin (monorepo specific sub-plugin)
|
|
1031
|
+
const githubSubMatch = source.match(/^github:([\w.-]+)\/([\w.-]+)\/([\w.-]+)$/);
|
|
1032
|
+
if (githubSubMatch) {
|
|
1033
|
+
const [, user, repo, sub] = githubSubMatch;
|
|
1034
|
+
const name = repo.replace(/^opencli-plugin-/, '');
|
|
1035
|
+
return {
|
|
1036
|
+
type: 'git',
|
|
1037
|
+
cloneUrl: `https://github.com/${user}/${repo}.git`,
|
|
1038
|
+
name,
|
|
1039
|
+
subPlugin: sub,
|
|
1040
|
+
};
|
|
1041
|
+
}
|
|
1042
|
+
// github:user/repo
|
|
1043
|
+
const githubMatch = source.match(/^github:([\w.-]+)\/([\w.-]+)$/);
|
|
1044
|
+
if (githubMatch) {
|
|
1045
|
+
const [, user, repo] = githubMatch;
|
|
1046
|
+
const name = repo.replace(/^opencli-plugin-/, '');
|
|
1047
|
+
return {
|
|
1048
|
+
type: 'git',
|
|
1049
|
+
cloneUrl: `https://github.com/${user}/${repo}.git`,
|
|
1050
|
+
name,
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
// https://github.com/user/repo (or .git)
|
|
1054
|
+
const urlMatch = source.match(/^https?:\/\/github\.com\/([\w.-]+)\/([\w.-]+?)(?:\.git)?$/);
|
|
1055
|
+
if (urlMatch) {
|
|
1056
|
+
const [, user, repo] = urlMatch;
|
|
1057
|
+
const name = repo.replace(/^opencli-plugin-/, '');
|
|
1058
|
+
return {
|
|
1059
|
+
type: 'git',
|
|
1060
|
+
cloneUrl: `https://github.com/${user}/${repo}.git`,
|
|
1061
|
+
name,
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
// ── Generic git URL support ─────────────────────────────────────────────
|
|
1065
|
+
// ssh://git@host/path/to/repo.git
|
|
1066
|
+
const sshUrlMatch = source.match(/^ssh:\/\/[^/]+\/(.*?)(?:\.git)?$/);
|
|
1067
|
+
if (sshUrlMatch) {
|
|
1068
|
+
const pathPart = sshUrlMatch[1];
|
|
1069
|
+
const segments = pathPart.split('/');
|
|
1070
|
+
const repoSegment = segments.pop();
|
|
1071
|
+
const name = repoSegment.replace(/^opencli-plugin-/, '');
|
|
1072
|
+
return { type: 'git', cloneUrl: source, name };
|
|
1073
|
+
}
|
|
1074
|
+
// git@host:user/repo.git (SCP-style)
|
|
1075
|
+
const scpMatch = source.match(/^git@[^:]+:(.+?)(?:\.git)?$/);
|
|
1076
|
+
if (scpMatch) {
|
|
1077
|
+
const pathPart = scpMatch[1];
|
|
1078
|
+
const segments = pathPart.split('/');
|
|
1079
|
+
const repoSegment = segments.pop();
|
|
1080
|
+
const name = repoSegment.replace(/^opencli-plugin-/, '');
|
|
1081
|
+
return { type: 'git', cloneUrl: source, name };
|
|
1082
|
+
}
|
|
1083
|
+
// Generic https/http git URL (non-GitHub hosts)
|
|
1084
|
+
const genericHttpMatch = source.match(/^https?:\/\/[^/]+\/(.+?)(?:\.git)?$/);
|
|
1085
|
+
if (genericHttpMatch) {
|
|
1086
|
+
const pathPart = genericHttpMatch[1];
|
|
1087
|
+
const segments = pathPart.split('/');
|
|
1088
|
+
const repoSegment = segments.pop();
|
|
1089
|
+
const name = repoSegment.replace(/^opencli-plugin-/, '');
|
|
1090
|
+
// Ensure clone URL ends with .git
|
|
1091
|
+
const cloneUrl = source.endsWith('.git') ? source : `${source}.git`;
|
|
1092
|
+
return { type: 'git', cloneUrl, name };
|
|
1093
|
+
}
|
|
1094
|
+
return null;
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* Symlink the host opencli package into a plugin's node_modules.
|
|
1098
|
+
* This ensures TS plugins resolve '@jackwener/opencli/registry' against
|
|
1099
|
+
* the running host installation rather than a stale npm-published version.
|
|
1100
|
+
*/
|
|
1101
|
+
function linkHostOpencli(pluginDir) {
|
|
1102
|
+
try {
|
|
1103
|
+
// Determine the host opencli package root from this module's location.
|
|
1104
|
+
// Both dev (tsx src/plugin.ts) and prod (node dist/plugin.js) are one level
|
|
1105
|
+
// deep, so path.dirname + '..' always gives us the package root.
|
|
1106
|
+
const thisFile = fileURLToPath(import.meta.url);
|
|
1107
|
+
const hostRoot = path.resolve(path.dirname(thisFile), '..');
|
|
1108
|
+
const targetLink = path.join(pluginDir, 'node_modules', '@jackwener', 'opencli');
|
|
1109
|
+
// Remove existing (npm-installed copy or stale symlink)
|
|
1110
|
+
if (fs.existsSync(targetLink)) {
|
|
1111
|
+
fs.rmSync(targetLink, { recursive: true, force: true });
|
|
1112
|
+
}
|
|
1113
|
+
// Ensure parent directory exists
|
|
1114
|
+
fs.mkdirSync(path.dirname(targetLink), { recursive: true });
|
|
1115
|
+
// Use 'junction' on Windows (doesn't require admin privileges),
|
|
1116
|
+
// 'dir' symlink on other platforms.
|
|
1117
|
+
const linkType = isWindows ? 'junction' : 'dir';
|
|
1118
|
+
fs.symlinkSync(hostRoot, targetLink, linkType);
|
|
1119
|
+
log.debug(`Linked host opencli into plugin: ${targetLink} → ${hostRoot}`);
|
|
1120
|
+
}
|
|
1121
|
+
catch (err) {
|
|
1122
|
+
log.warn(`Failed to link host opencli into plugin: ${getErrorMessage(err)}`);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* Resolve the path to the esbuild CLI executable with fallback strategies.
|
|
1127
|
+
*/
|
|
1128
|
+
export function resolveEsbuildBin() {
|
|
1129
|
+
const thisFile = fileURLToPath(import.meta.url);
|
|
1130
|
+
const hostRoot = path.resolve(path.dirname(thisFile), '..');
|
|
1131
|
+
// Strategy 1 (Windows): prefer the .cmd wrapper which is executable via shell
|
|
1132
|
+
if (isWindows) {
|
|
1133
|
+
const cmdPath = path.join(hostRoot, 'node_modules', '.bin', 'esbuild.cmd');
|
|
1134
|
+
if (fs.existsSync(cmdPath)) {
|
|
1135
|
+
return cmdPath;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
// Strategy 2: resolve esbuild binary via import.meta.resolve
|
|
1139
|
+
// (On Unix, shebang scripts are directly executable; on Windows they are not,
|
|
1140
|
+
// so this strategy is skipped on Windows in favour of the .cmd wrapper above.)
|
|
1141
|
+
if (!isWindows) {
|
|
1142
|
+
try {
|
|
1143
|
+
const pkgUrl = import.meta.resolve('esbuild/package.json');
|
|
1144
|
+
if (pkgUrl.startsWith('file://')) {
|
|
1145
|
+
const pkgPath = fileURLToPath(pkgUrl);
|
|
1146
|
+
const pkgRaw = fs.readFileSync(pkgPath, 'utf8');
|
|
1147
|
+
const pkg = JSON.parse(pkgRaw);
|
|
1148
|
+
if (pkg.bin && typeof pkg.bin === 'object' && pkg.bin.esbuild) {
|
|
1149
|
+
const binPath = path.resolve(path.dirname(pkgPath), pkg.bin.esbuild);
|
|
1150
|
+
if (fs.existsSync(binPath))
|
|
1151
|
+
return binPath;
|
|
1152
|
+
}
|
|
1153
|
+
else if (typeof pkg.bin === 'string') {
|
|
1154
|
+
const binPath = path.resolve(path.dirname(pkgPath), pkg.bin);
|
|
1155
|
+
if (fs.existsSync(binPath))
|
|
1156
|
+
return binPath;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
catch {
|
|
1161
|
+
// ignore package resolution failures
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
// Strategy 3: fallback to node_modules/.bin/esbuild (Unix)
|
|
1165
|
+
const binFallback = path.join(hostRoot, 'node_modules', '.bin', 'esbuild');
|
|
1166
|
+
if (fs.existsSync(binFallback)) {
|
|
1167
|
+
return binFallback;
|
|
1168
|
+
}
|
|
1169
|
+
// Strategy 4: global esbuild in PATH
|
|
1170
|
+
try {
|
|
1171
|
+
const lookupCmd = isWindows ? 'where esbuild' : 'which esbuild';
|
|
1172
|
+
// `where` on Windows may return multiple lines; take only the first match.
|
|
1173
|
+
const globalBin = execSync(lookupCmd, { encoding: 'utf-8', stdio: 'pipe' }).trim().split('\n')[0].trim();
|
|
1174
|
+
if (globalBin && fs.existsSync(globalBin)) {
|
|
1175
|
+
return globalBin;
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
catch {
|
|
1179
|
+
// ignore PATH lookup failures
|
|
1180
|
+
}
|
|
1181
|
+
return null;
|
|
1182
|
+
}
|
|
1183
|
+
/**
|
|
1184
|
+
* Transpile TS plugin files to JS so they work in production mode.
|
|
1185
|
+
* Uses esbuild from the host opencli's node_modules for fast single-file transpilation.
|
|
1186
|
+
*/
|
|
1187
|
+
function transpilePluginTs(pluginDir) {
|
|
1188
|
+
try {
|
|
1189
|
+
const esbuildBin = resolveEsbuildBin();
|
|
1190
|
+
if (!esbuildBin) {
|
|
1191
|
+
log.warn('esbuild not found. TS plugin files will not be transpiled and may fail to load. ' +
|
|
1192
|
+
'Install esbuild (`npm i -g esbuild`) or ensure it is available in the opencli host node_modules.');
|
|
1193
|
+
return;
|
|
1194
|
+
}
|
|
1195
|
+
const files = fs.readdirSync(pluginDir);
|
|
1196
|
+
const tsFiles = files.filter(f => f.endsWith('.ts') && !f.endsWith('.d.ts') && !f.endsWith('.test.ts'));
|
|
1197
|
+
for (const tsFile of tsFiles) {
|
|
1198
|
+
const jsFile = tsFile.replace(/\.ts$/, '.js');
|
|
1199
|
+
const jsPath = path.join(pluginDir, jsFile);
|
|
1200
|
+
// Skip if .js already exists (plugin may ship pre-compiled)
|
|
1201
|
+
if (fs.existsSync(jsPath))
|
|
1202
|
+
continue;
|
|
1203
|
+
try {
|
|
1204
|
+
execFileSync(esbuildBin, [tsFile, `--outfile=${jsFile}`, '--format=esm', '--platform=node'], {
|
|
1205
|
+
cwd: pluginDir,
|
|
1206
|
+
encoding: 'utf-8',
|
|
1207
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
1208
|
+
...(isWindows && { shell: true }),
|
|
1209
|
+
});
|
|
1210
|
+
log.debug(`Transpiled plugin file: ${tsFile} → ${jsFile}`);
|
|
1211
|
+
}
|
|
1212
|
+
catch (err) {
|
|
1213
|
+
log.warn(`Failed to transpile ${tsFile}: ${getErrorMessage(err)}`);
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
catch (err) {
|
|
1218
|
+
log.warn(`TS transpilation setup failed: ${getErrorMessage(err)}`);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
export { resolveEsbuildBin as _resolveEsbuildBin, getCommitHash as _getCommitHash, installDependencies as _installDependencies, parseSource as _parseSource, postInstallMonorepoLifecycle as _postInstallMonorepoLifecycle, readLockFile as _readLockFile, readLockFileWithWriter as _readLockFileWithWriter, updateAllPlugins as _updateAllPlugins, validatePluginStructure as _validatePluginStructure, writeLockFile as _writeLockFile, writeLockFileWithFs as _writeLockFileWithFs, isSymlinkSync as _isSymlinkSync, getMonoreposDir as _getMonoreposDir, installLocalPlugin as _installLocalPlugin, isLocalPluginSource as _isLocalPluginSource, moveDir as _moveDir, promoteDir as _promoteDir, replaceDir as _replaceDir, resolvePluginSource as _resolvePluginSource, resolveStoredPluginSource as _resolveStoredPluginSource, toStoredPluginSource as _toStoredPluginSource, toLocalPluginSource as _toLocalPluginSource, };
|