@huyuan-ai/cli 1.0.0 → 1.0.1
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 +3 -2
- 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,1030 @@
|
|
|
1
|
+
import * as crypto from 'node:crypto';
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import * as os from 'node:os';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
import { spawnSync } from 'node:child_process';
|
|
6
|
+
import { CommandExecutionError } from '../../../errors.js';
|
|
7
|
+
import { instagramPrivateApiFetch } from './protocol-capture.js';
|
|
8
|
+
import { buildReadInstagramRuntimeInfoJs, } from './runtime-info.js';
|
|
9
|
+
export { buildReadInstagramRuntimeInfoJs, extractInstagramRuntimeInfo, resolveInstagramRuntimeInfo, } from './runtime-info.js';
|
|
10
|
+
const INSTAGRAM_MIN_FEED_ASPECT_RATIO = 4 / 5;
|
|
11
|
+
const INSTAGRAM_MAX_FEED_ASPECT_RATIO = 1.91;
|
|
12
|
+
const INSTAGRAM_MIN_STORY_ASPECT_RATIO = 9 / 16;
|
|
13
|
+
const INSTAGRAM_MAX_STORY_ASPECT_RATIO = 3 / 4;
|
|
14
|
+
const INSTAGRAM_PRIVATE_PAD_COLOR = 'FFFFFF';
|
|
15
|
+
const INSTAGRAM_HOME_URL = 'https://www.instagram.com/';
|
|
16
|
+
const INSTAGRAM_PRIVATE_CAPTURE_PATTERN = '/api/v1/|/graphql/';
|
|
17
|
+
const INSTAGRAM_PRIVATE_CONFIG_RETRY_BUDGET = 2;
|
|
18
|
+
const INSTAGRAM_PRIVATE_UPLOAD_RETRY_BUDGET = 2;
|
|
19
|
+
const INSTAGRAM_PRIVATE_SIDECAR_TRANSCODE_ATTEMPTS = 20;
|
|
20
|
+
const INSTAGRAM_PRIVATE_SIDECAR_TRANSCODE_WAIT_MS = 2000;
|
|
21
|
+
const INSTAGRAM_MAX_STORY_VIDEO_DURATION_MS = 15_000;
|
|
22
|
+
const INSTAGRAM_STORY_SIG_KEY = '19ce5f445dbfd9d29c59dc2a78c616a7fc090a8e018b9267bc4240a30244c53b';
|
|
23
|
+
const INSTAGRAM_STORY_SIG_KEY_VERSION = '4';
|
|
24
|
+
const INSTAGRAM_STORY_DEVICE = {
|
|
25
|
+
manufacturer: 'samsung',
|
|
26
|
+
model: 'SM-G930F',
|
|
27
|
+
android_version: 24,
|
|
28
|
+
android_release: '7.0',
|
|
29
|
+
};
|
|
30
|
+
export function derivePrivateApiContextFromCapture(entries) {
|
|
31
|
+
for (let index = entries.length - 1; index >= 0; index -= 1) {
|
|
32
|
+
const headers = entries[index]?.requestHeaders ?? {};
|
|
33
|
+
const context = {
|
|
34
|
+
asbdId: String(headers['X-ASBD-ID'] || ''),
|
|
35
|
+
csrfToken: String(headers['X-CSRFToken'] || ''),
|
|
36
|
+
igAppId: String(headers['X-IG-App-ID'] || ''),
|
|
37
|
+
igWwwClaim: String(headers['X-IG-WWW-Claim'] || ''),
|
|
38
|
+
instagramAjax: String(headers['X-Instagram-AJAX'] || ''),
|
|
39
|
+
webSessionId: String(headers['X-Web-Session-ID'] || ''),
|
|
40
|
+
};
|
|
41
|
+
if (context.asbdId
|
|
42
|
+
&& context.csrfToken
|
|
43
|
+
&& context.igAppId
|
|
44
|
+
&& context.igWwwClaim
|
|
45
|
+
&& context.instagramAjax
|
|
46
|
+
&& context.webSessionId) {
|
|
47
|
+
return context;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
function derivePartialPrivateApiContextFromCapture(entries) {
|
|
53
|
+
const context = {};
|
|
54
|
+
for (let index = entries.length - 1; index >= 0; index -= 1) {
|
|
55
|
+
const headers = entries[index]?.requestHeaders ?? {};
|
|
56
|
+
if (!context.asbdId && headers['X-ASBD-ID'])
|
|
57
|
+
context.asbdId = String(headers['X-ASBD-ID']);
|
|
58
|
+
if (!context.csrfToken && headers['X-CSRFToken'])
|
|
59
|
+
context.csrfToken = String(headers['X-CSRFToken']);
|
|
60
|
+
if (!context.igAppId && headers['X-IG-App-ID'])
|
|
61
|
+
context.igAppId = String(headers['X-IG-App-ID']);
|
|
62
|
+
if (!context.igWwwClaim && headers['X-IG-WWW-Claim'])
|
|
63
|
+
context.igWwwClaim = String(headers['X-IG-WWW-Claim']);
|
|
64
|
+
if (!context.instagramAjax && headers['X-Instagram-AJAX'])
|
|
65
|
+
context.instagramAjax = String(headers['X-Instagram-AJAX']);
|
|
66
|
+
if (!context.webSessionId && headers['X-Web-Session-ID'])
|
|
67
|
+
context.webSessionId = String(headers['X-Web-Session-ID']);
|
|
68
|
+
}
|
|
69
|
+
return context;
|
|
70
|
+
}
|
|
71
|
+
export function deriveInstagramJazoest(value) {
|
|
72
|
+
if (!value)
|
|
73
|
+
return '';
|
|
74
|
+
const sum = Array.from(value).reduce((total, char) => total + char.charCodeAt(0), 0);
|
|
75
|
+
return `2${sum}`;
|
|
76
|
+
}
|
|
77
|
+
function sleep(ms) {
|
|
78
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
79
|
+
}
|
|
80
|
+
function isTransientPrivateFetchError(error) {
|
|
81
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
82
|
+
return /fetch failed|network|socket hang up|econnreset|etimedout/i.test(message);
|
|
83
|
+
}
|
|
84
|
+
function getCookieValue(cookies, name) {
|
|
85
|
+
return cookies.find((cookie) => cookie.name === name)?.value || '';
|
|
86
|
+
}
|
|
87
|
+
export async function resolveInstagramPrivatePublishConfig(page) {
|
|
88
|
+
let lastError;
|
|
89
|
+
for (let attempt = 0; attempt < INSTAGRAM_PRIVATE_CONFIG_RETRY_BUDGET; attempt += 1) {
|
|
90
|
+
try {
|
|
91
|
+
if (typeof page.startNetworkCapture === 'function') {
|
|
92
|
+
await page.startNetworkCapture(INSTAGRAM_PRIVATE_CAPTURE_PATTERN);
|
|
93
|
+
}
|
|
94
|
+
await page.goto(`${INSTAGRAM_HOME_URL}?__opencli_private_probe=${Date.now()}`);
|
|
95
|
+
await page.wait({ time: 2 });
|
|
96
|
+
const [cookies, runtime, entries] = await Promise.all([
|
|
97
|
+
page.getCookies({ domain: 'instagram.com' }),
|
|
98
|
+
page.evaluate(buildReadInstagramRuntimeInfoJs()),
|
|
99
|
+
typeof page.readNetworkCapture === 'function'
|
|
100
|
+
? page.readNetworkCapture()
|
|
101
|
+
: Promise.resolve([]),
|
|
102
|
+
]);
|
|
103
|
+
const captureEntries = (Array.isArray(entries) ? entries : []);
|
|
104
|
+
const capturedContext = derivePrivateApiContextFromCapture(captureEntries)
|
|
105
|
+
?? derivePartialPrivateApiContextFromCapture(captureEntries);
|
|
106
|
+
const csrfToken = runtime?.csrfToken || getCookieValue(cookies, 'csrftoken') || capturedContext.csrfToken || '';
|
|
107
|
+
const igAppId = runtime?.appId || capturedContext.igAppId || '';
|
|
108
|
+
const instagramAjax = runtime?.instagramAjax || capturedContext.instagramAjax || '';
|
|
109
|
+
if (!csrfToken) {
|
|
110
|
+
throw new CommandExecutionError('Instagram private route could not derive CSRF token from browser session');
|
|
111
|
+
}
|
|
112
|
+
if (!igAppId) {
|
|
113
|
+
throw new CommandExecutionError('Instagram private route could not derive X-IG-App-ID from instagram runtime');
|
|
114
|
+
}
|
|
115
|
+
if (!instagramAjax) {
|
|
116
|
+
throw new CommandExecutionError('Instagram private route could not derive X-Instagram-AJAX from instagram runtime');
|
|
117
|
+
}
|
|
118
|
+
const asbdId = capturedContext.asbdId || '';
|
|
119
|
+
const igWwwClaim = capturedContext.igWwwClaim || '';
|
|
120
|
+
const webSessionId = capturedContext.webSessionId || '';
|
|
121
|
+
return {
|
|
122
|
+
apiContext: {
|
|
123
|
+
asbdId,
|
|
124
|
+
csrfToken,
|
|
125
|
+
igAppId,
|
|
126
|
+
igWwwClaim,
|
|
127
|
+
instagramAjax,
|
|
128
|
+
webSessionId,
|
|
129
|
+
},
|
|
130
|
+
jazoest: deriveInstagramJazoest(csrfToken),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
lastError = error;
|
|
135
|
+
if (!isTransientPrivateFetchError(error) || attempt >= INSTAGRAM_PRIVATE_CONFIG_RETRY_BUDGET - 1) {
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
throw lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
141
|
+
}
|
|
142
|
+
export function buildConfigureBody(input) {
|
|
143
|
+
const body = new URLSearchParams();
|
|
144
|
+
body.set('archive_only', 'false');
|
|
145
|
+
body.set('caption', input.caption);
|
|
146
|
+
body.set('clips_share_preview_to_feed', '1');
|
|
147
|
+
body.set('disable_comments', '0');
|
|
148
|
+
body.set('disable_oa_reuse', 'false');
|
|
149
|
+
body.set('igtv_share_preview_to_feed', '1');
|
|
150
|
+
body.set('is_meta_only_post', '0');
|
|
151
|
+
body.set('is_unified_video', '1');
|
|
152
|
+
body.set('like_and_view_counts_disabled', '0');
|
|
153
|
+
body.set('media_share_flow', 'creation_flow');
|
|
154
|
+
body.set('share_to_facebook', '');
|
|
155
|
+
body.set('share_to_fb_destination_type', 'USER');
|
|
156
|
+
body.set('source_type', 'library');
|
|
157
|
+
body.set('upload_id', input.uploadId);
|
|
158
|
+
body.set('video_subtitles_enabled', '0');
|
|
159
|
+
body.set('jazoest', input.jazoest);
|
|
160
|
+
return body.toString();
|
|
161
|
+
}
|
|
162
|
+
export function buildConfigureSidecarPayload(input) {
|
|
163
|
+
return {
|
|
164
|
+
archive_only: false,
|
|
165
|
+
caption: input.caption,
|
|
166
|
+
children_metadata: input.uploadIds.map((uploadId) => ({ upload_id: uploadId })),
|
|
167
|
+
client_sidecar_id: input.clientSidecarId,
|
|
168
|
+
disable_comments: '0',
|
|
169
|
+
is_meta_only_post: false,
|
|
170
|
+
is_open_to_public_submission: false,
|
|
171
|
+
like_and_view_counts_disabled: 0,
|
|
172
|
+
media_share_flow: 'creation_flow',
|
|
173
|
+
share_to_facebook: '',
|
|
174
|
+
share_to_fb_destination_type: 'USER',
|
|
175
|
+
source_type: 'library',
|
|
176
|
+
jazoest: input.jazoest,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function inferMimeType(filePath) {
|
|
180
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
181
|
+
switch (ext) {
|
|
182
|
+
case '.png':
|
|
183
|
+
return 'image/png';
|
|
184
|
+
case '.webp':
|
|
185
|
+
return 'image/webp';
|
|
186
|
+
case '.jpg':
|
|
187
|
+
case '.jpeg':
|
|
188
|
+
default:
|
|
189
|
+
return 'image/jpeg';
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function readPngDimensions(bytes) {
|
|
193
|
+
if (bytes.length < 24)
|
|
194
|
+
return null;
|
|
195
|
+
if (bytes.subarray(0, 8).toString('hex').toUpperCase() !== '89504E470D0A1A0A')
|
|
196
|
+
return null;
|
|
197
|
+
if (bytes.subarray(12, 16).toString('ascii') !== 'IHDR')
|
|
198
|
+
return null;
|
|
199
|
+
return {
|
|
200
|
+
width: bytes.readUInt32BE(16),
|
|
201
|
+
height: bytes.readUInt32BE(20),
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function readJpegDimensions(bytes) {
|
|
205
|
+
if (bytes.length < 4 || bytes[0] !== 0xff || bytes[1] !== 0xd8)
|
|
206
|
+
return null;
|
|
207
|
+
let offset = 2;
|
|
208
|
+
while (offset + 9 < bytes.length) {
|
|
209
|
+
if (bytes[offset] !== 0xff) {
|
|
210
|
+
offset += 1;
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
const marker = bytes[offset + 1];
|
|
214
|
+
offset += 2;
|
|
215
|
+
if (marker === 0xd8 || marker === 0xd9)
|
|
216
|
+
continue;
|
|
217
|
+
if (offset + 2 > bytes.length)
|
|
218
|
+
break;
|
|
219
|
+
const segmentLength = bytes.readUInt16BE(offset);
|
|
220
|
+
if (segmentLength < 2 || offset + segmentLength > bytes.length)
|
|
221
|
+
break;
|
|
222
|
+
const isStartOfFrame = marker >= 0xc0 && marker <= 0xcf && ![0xc4, 0xc8, 0xcc].includes(marker);
|
|
223
|
+
if (isStartOfFrame && segmentLength >= 7) {
|
|
224
|
+
return {
|
|
225
|
+
height: bytes.readUInt16BE(offset + 3),
|
|
226
|
+
width: bytes.readUInt16BE(offset + 5),
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
offset += segmentLength;
|
|
230
|
+
}
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
function readWebpDimensions(bytes) {
|
|
234
|
+
if (bytes.length < 30)
|
|
235
|
+
return null;
|
|
236
|
+
if (bytes.subarray(0, 4).toString('ascii') !== 'RIFF' || bytes.subarray(8, 12).toString('ascii') !== 'WEBP') {
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
const chunkType = bytes.subarray(12, 16).toString('ascii');
|
|
240
|
+
if (chunkType === 'VP8X' && bytes.length >= 30) {
|
|
241
|
+
return {
|
|
242
|
+
width: 1 + bytes.readUIntLE(24, 3),
|
|
243
|
+
height: 1 + bytes.readUIntLE(27, 3),
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
if (chunkType === 'VP8 ' && bytes.length >= 30) {
|
|
247
|
+
return {
|
|
248
|
+
width: bytes.readUInt16LE(26) & 0x3fff,
|
|
249
|
+
height: bytes.readUInt16LE(28) & 0x3fff,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
if (chunkType === 'VP8L' && bytes.length >= 25) {
|
|
253
|
+
const bits = bytes.readUInt32LE(21);
|
|
254
|
+
return {
|
|
255
|
+
width: (bits & 0x3fff) + 1,
|
|
256
|
+
height: ((bits >> 14) & 0x3fff) + 1,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
function readImageDimensions(filePath, bytes) {
|
|
262
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
263
|
+
const dimensions = ext === '.png'
|
|
264
|
+
? readPngDimensions(bytes)
|
|
265
|
+
: ext === '.webp'
|
|
266
|
+
? readWebpDimensions(bytes)
|
|
267
|
+
: readJpegDimensions(bytes);
|
|
268
|
+
if (!dimensions) {
|
|
269
|
+
throw new CommandExecutionError(`Failed to read image dimensions for ${filePath}`);
|
|
270
|
+
}
|
|
271
|
+
return dimensions;
|
|
272
|
+
}
|
|
273
|
+
export function readImageAsset(filePath) {
|
|
274
|
+
const bytes = fs.readFileSync(filePath);
|
|
275
|
+
const { width, height } = readImageDimensions(filePath, bytes);
|
|
276
|
+
return {
|
|
277
|
+
filePath,
|
|
278
|
+
fileName: path.basename(filePath),
|
|
279
|
+
mimeType: inferMimeType(filePath),
|
|
280
|
+
width,
|
|
281
|
+
height,
|
|
282
|
+
byteLength: bytes.length,
|
|
283
|
+
bytes,
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
export function isInstagramFeedAspectRatioAllowed(width, height) {
|
|
287
|
+
const ratio = width / Math.max(height, 1);
|
|
288
|
+
return ratio >= INSTAGRAM_MIN_FEED_ASPECT_RATIO - 0.001
|
|
289
|
+
&& ratio <= INSTAGRAM_MAX_FEED_ASPECT_RATIO + 0.001;
|
|
290
|
+
}
|
|
291
|
+
export function getInstagramFeedNormalizedDimensions(width, height) {
|
|
292
|
+
const ratio = width / Math.max(height, 1);
|
|
293
|
+
if (ratio < INSTAGRAM_MIN_FEED_ASPECT_RATIO) {
|
|
294
|
+
return {
|
|
295
|
+
width: Math.ceil(height * INSTAGRAM_MIN_FEED_ASPECT_RATIO),
|
|
296
|
+
height,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
if (ratio > INSTAGRAM_MAX_FEED_ASPECT_RATIO) {
|
|
300
|
+
return {
|
|
301
|
+
width,
|
|
302
|
+
height: Math.ceil(width / INSTAGRAM_MAX_FEED_ASPECT_RATIO),
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
export function isInstagramStoryAspectRatioAllowed(width, height) {
|
|
308
|
+
const ratio = width / Math.max(height, 1);
|
|
309
|
+
return ratio >= INSTAGRAM_MIN_STORY_ASPECT_RATIO - 0.001
|
|
310
|
+
&& ratio <= INSTAGRAM_MAX_STORY_ASPECT_RATIO + 0.001;
|
|
311
|
+
}
|
|
312
|
+
export function getInstagramStoryNormalizedDimensions(width, height) {
|
|
313
|
+
const ratio = width / Math.max(height, 1);
|
|
314
|
+
if (ratio < INSTAGRAM_MIN_STORY_ASPECT_RATIO) {
|
|
315
|
+
return {
|
|
316
|
+
width: Math.ceil(height * INSTAGRAM_MIN_STORY_ASPECT_RATIO),
|
|
317
|
+
height,
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
if (ratio > INSTAGRAM_MAX_STORY_ASPECT_RATIO) {
|
|
321
|
+
return {
|
|
322
|
+
width,
|
|
323
|
+
height: Math.ceil(width / INSTAGRAM_MAX_STORY_ASPECT_RATIO),
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
function buildPrivateNormalizedImagePath(filePath) {
|
|
329
|
+
const parsed = path.parse(filePath);
|
|
330
|
+
return path.join(os.tmpdir(), `opencli-instagram-private-${parsed.name}-${crypto.randomUUID()}${parsed.ext || '.png'}`);
|
|
331
|
+
}
|
|
332
|
+
export function prepareImageAssetForPrivateUpload(filePath) {
|
|
333
|
+
const asset = readImageAsset(filePath);
|
|
334
|
+
const normalizedDimensions = getInstagramFeedNormalizedDimensions(asset.width, asset.height);
|
|
335
|
+
if (!normalizedDimensions) {
|
|
336
|
+
return asset;
|
|
337
|
+
}
|
|
338
|
+
if (process.platform !== 'darwin') {
|
|
339
|
+
throw new CommandExecutionError(`Instagram private publish does not support auto-normalizing ${asset.fileName} on ${process.platform}`, `Use images within ${INSTAGRAM_MIN_FEED_ASPECT_RATIO.toFixed(2)}-${INSTAGRAM_MAX_FEED_ASPECT_RATIO.toFixed(2)} aspect ratio, or use the UI route`);
|
|
340
|
+
}
|
|
341
|
+
const outputPath = buildPrivateNormalizedImagePath(filePath);
|
|
342
|
+
const result = spawnSync('sips', [
|
|
343
|
+
'--padToHeightWidth',
|
|
344
|
+
String(normalizedDimensions.height),
|
|
345
|
+
String(normalizedDimensions.width),
|
|
346
|
+
'--padColor',
|
|
347
|
+
INSTAGRAM_PRIVATE_PAD_COLOR,
|
|
348
|
+
filePath,
|
|
349
|
+
'--out',
|
|
350
|
+
outputPath,
|
|
351
|
+
], {
|
|
352
|
+
encoding: 'utf8',
|
|
353
|
+
});
|
|
354
|
+
if (result.error || result.status !== 0 || !fs.existsSync(outputPath)) {
|
|
355
|
+
const detail = [result.error?.message, result.stderr, result.stdout]
|
|
356
|
+
.map((value) => String(value || '').trim())
|
|
357
|
+
.filter(Boolean)
|
|
358
|
+
.join(' ');
|
|
359
|
+
throw new CommandExecutionError(`Instagram private publish failed to normalize ${asset.fileName}`, detail || 'sips padToHeightWidth failed');
|
|
360
|
+
}
|
|
361
|
+
return {
|
|
362
|
+
...readImageAsset(outputPath),
|
|
363
|
+
cleanupPath: outputPath,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
export function prepareImageAssetForPrivateStoryUpload(filePath) {
|
|
367
|
+
const asset = readImageAsset(filePath);
|
|
368
|
+
const normalizedDimensions = getInstagramStoryNormalizedDimensions(asset.width, asset.height);
|
|
369
|
+
if (!normalizedDimensions) {
|
|
370
|
+
return asset;
|
|
371
|
+
}
|
|
372
|
+
if (process.platform !== 'darwin') {
|
|
373
|
+
throw new CommandExecutionError(`Instagram private story publish does not support auto-normalizing ${asset.fileName} on ${process.platform}`, `Use images within ${INSTAGRAM_MIN_STORY_ASPECT_RATIO.toFixed(2)}-${INSTAGRAM_MAX_STORY_ASPECT_RATIO.toFixed(2)} aspect ratio, or use the UI route`);
|
|
374
|
+
}
|
|
375
|
+
const outputPath = buildPrivateNormalizedImagePath(filePath);
|
|
376
|
+
const result = spawnSync('sips', [
|
|
377
|
+
'--padToHeightWidth',
|
|
378
|
+
String(normalizedDimensions.height),
|
|
379
|
+
String(normalizedDimensions.width),
|
|
380
|
+
'--padColor',
|
|
381
|
+
INSTAGRAM_PRIVATE_PAD_COLOR,
|
|
382
|
+
filePath,
|
|
383
|
+
'--out',
|
|
384
|
+
outputPath,
|
|
385
|
+
], {
|
|
386
|
+
encoding: 'utf8',
|
|
387
|
+
});
|
|
388
|
+
if (result.error || result.status !== 0 || !fs.existsSync(outputPath)) {
|
|
389
|
+
const detail = [result.error?.message, result.stderr, result.stdout]
|
|
390
|
+
.map((value) => String(value || '').trim())
|
|
391
|
+
.filter(Boolean)
|
|
392
|
+
.join(' ');
|
|
393
|
+
throw new CommandExecutionError(`Instagram private story publish failed to normalize ${asset.fileName}`, detail || 'sips padToHeightWidth failed');
|
|
394
|
+
}
|
|
395
|
+
return {
|
|
396
|
+
...readImageAsset(outputPath),
|
|
397
|
+
cleanupPath: outputPath,
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
function runSwiftJsonScript(script, args, stage) {
|
|
401
|
+
const scriptPath = path.join(os.tmpdir(), `opencli-instagram-${crypto.randomUUID()}.swift`);
|
|
402
|
+
fs.writeFileSync(scriptPath, script);
|
|
403
|
+
try {
|
|
404
|
+
const result = spawnSync('swift', [scriptPath, ...args], {
|
|
405
|
+
encoding: 'utf8',
|
|
406
|
+
});
|
|
407
|
+
if (result.error || result.status !== 0) {
|
|
408
|
+
const detail = [result.error?.message, result.stderr, result.stdout]
|
|
409
|
+
.map((value) => String(value || '').trim())
|
|
410
|
+
.filter(Boolean)
|
|
411
|
+
.join(' ');
|
|
412
|
+
throw new CommandExecutionError(`Instagram private publish failed to ${stage}`, detail || 'swift helper failed');
|
|
413
|
+
}
|
|
414
|
+
return JSON.parse(String(result.stdout || '{}'));
|
|
415
|
+
}
|
|
416
|
+
catch (error) {
|
|
417
|
+
if (error instanceof CommandExecutionError)
|
|
418
|
+
throw error;
|
|
419
|
+
throw new CommandExecutionError(`Instagram private publish failed to ${stage}`, error instanceof Error ? error.message : String(error));
|
|
420
|
+
}
|
|
421
|
+
finally {
|
|
422
|
+
fs.rmSync(scriptPath, { force: true });
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
function readVideoMetadata(filePath) {
|
|
426
|
+
if (process.platform !== 'darwin') {
|
|
427
|
+
throw new CommandExecutionError(`Instagram private mixed-media publish does not support reading video metadata on ${process.platform}`, 'Use macOS for private mixed-media publishing, or rely on the UI fallback');
|
|
428
|
+
}
|
|
429
|
+
const metadata = runSwiftJsonScript(`
|
|
430
|
+
import AVFoundation
|
|
431
|
+
import Foundation
|
|
432
|
+
|
|
433
|
+
let path = CommandLine.arguments[1]
|
|
434
|
+
let url = URL(fileURLWithPath: path)
|
|
435
|
+
let asset = AVURLAsset(url: url)
|
|
436
|
+
guard let track = asset.tracks(withMediaType: .video).first else {
|
|
437
|
+
fputs("{\\"error\\":\\"missing-video-track\\"}", stderr)
|
|
438
|
+
exit(1)
|
|
439
|
+
}
|
|
440
|
+
let transformed = track.naturalSize.applying(track.preferredTransform)
|
|
441
|
+
let width = Int(abs(transformed.width.rounded()))
|
|
442
|
+
let height = Int(abs(transformed.height.rounded()))
|
|
443
|
+
let durationMs = Int((CMTimeGetSeconds(asset.duration) * 1000.0).rounded())
|
|
444
|
+
let payload: [String: Int] = [
|
|
445
|
+
"width": width,
|
|
446
|
+
"height": height,
|
|
447
|
+
"durationMs": durationMs,
|
|
448
|
+
]
|
|
449
|
+
let data = try JSONSerialization.data(withJSONObject: payload, options: [])
|
|
450
|
+
FileHandle.standardOutput.write(data)
|
|
451
|
+
`, [filePath], 'read video metadata');
|
|
452
|
+
if (!metadata.width || !metadata.height || !metadata.durationMs) {
|
|
453
|
+
throw new CommandExecutionError(`Instagram private publish failed to read video metadata for ${filePath}`);
|
|
454
|
+
}
|
|
455
|
+
return {
|
|
456
|
+
width: metadata.width,
|
|
457
|
+
height: metadata.height,
|
|
458
|
+
durationMs: metadata.durationMs,
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
function buildPrivateVideoCoverPath(filePath) {
|
|
462
|
+
const parsed = path.parse(filePath);
|
|
463
|
+
return path.join(os.tmpdir(), `opencli-instagram-private-video-cover-${parsed.name}-${crypto.randomUUID()}.jpg`);
|
|
464
|
+
}
|
|
465
|
+
function buildPrivateStoryVideoPath(filePath) {
|
|
466
|
+
const parsed = path.parse(filePath);
|
|
467
|
+
return path.join(os.tmpdir(), `opencli-instagram-story-video-${parsed.name}-${crypto.randomUUID()}${parsed.ext || '.mp4'}`);
|
|
468
|
+
}
|
|
469
|
+
function generateVideoCoverImage(filePath) {
|
|
470
|
+
if (process.platform !== 'darwin') {
|
|
471
|
+
throw new CommandExecutionError(`Instagram private mixed-media publish does not support generating video covers on ${process.platform}`, 'Use macOS for private mixed-media publishing, or rely on the UI fallback');
|
|
472
|
+
}
|
|
473
|
+
const outputPath = buildPrivateVideoCoverPath(filePath);
|
|
474
|
+
runSwiftJsonScript(`
|
|
475
|
+
import AVFoundation
|
|
476
|
+
import AppKit
|
|
477
|
+
import Foundation
|
|
478
|
+
|
|
479
|
+
let inputPath = CommandLine.arguments[1]
|
|
480
|
+
let outputPath = CommandLine.arguments[2]
|
|
481
|
+
let asset = AVURLAsset(url: URL(fileURLWithPath: inputPath))
|
|
482
|
+
let generator = AVAssetImageGenerator(asset: asset)
|
|
483
|
+
generator.appliesPreferredTrackTransform = true
|
|
484
|
+
let image = try generator.copyCGImage(at: CMTime(seconds: 0, preferredTimescale: 600), actualTime: nil)
|
|
485
|
+
let rep = NSBitmapImageRep(cgImage: image)
|
|
486
|
+
guard let data = rep.representation(using: .jpeg, properties: [.compressionFactor: 0.9]) else {
|
|
487
|
+
fputs("{\\"error\\":\\"jpeg-encode-failed\\"}", stderr)
|
|
488
|
+
exit(1)
|
|
489
|
+
}
|
|
490
|
+
try data.write(to: URL(fileURLWithPath: outputPath))
|
|
491
|
+
let payload = ["ok": true]
|
|
492
|
+
let json = try JSONSerialization.data(withJSONObject: payload, options: [])
|
|
493
|
+
FileHandle.standardOutput.write(json)
|
|
494
|
+
`, [filePath, outputPath], 'generate video cover');
|
|
495
|
+
return {
|
|
496
|
+
...readImageAsset(outputPath),
|
|
497
|
+
cleanupPath: outputPath,
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
export function readVideoAsset(filePath) {
|
|
501
|
+
const bytes = fs.readFileSync(filePath);
|
|
502
|
+
const metadata = readVideoMetadata(filePath);
|
|
503
|
+
const coverImage = generateVideoCoverImage(filePath);
|
|
504
|
+
return {
|
|
505
|
+
filePath,
|
|
506
|
+
fileName: path.basename(filePath),
|
|
507
|
+
mimeType: 'video/mp4',
|
|
508
|
+
width: metadata.width,
|
|
509
|
+
height: metadata.height,
|
|
510
|
+
durationMs: metadata.durationMs,
|
|
511
|
+
byteLength: bytes.length,
|
|
512
|
+
bytes,
|
|
513
|
+
coverImage,
|
|
514
|
+
cleanupPaths: coverImage.cleanupPath ? [coverImage.cleanupPath] : [],
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function trimVideoForInstagramStory(filePath, maxDurationMs) {
|
|
518
|
+
if (process.platform !== 'darwin') {
|
|
519
|
+
throw new CommandExecutionError(`Instagram private story publish does not support trimming long videos on ${process.platform}`, 'Use macOS for private story video publishing, or trim the video to 15 seconds first');
|
|
520
|
+
}
|
|
521
|
+
const outputPath = buildPrivateStoryVideoPath(filePath);
|
|
522
|
+
runSwiftJsonScript(`
|
|
523
|
+
import AVFoundation
|
|
524
|
+
import Foundation
|
|
525
|
+
|
|
526
|
+
let inputPath = CommandLine.arguments[1]
|
|
527
|
+
let outputPath = CommandLine.arguments[2]
|
|
528
|
+
let durationMs = Int(CommandLine.arguments[3]) ?? 15000
|
|
529
|
+
let asset = AVURLAsset(url: URL(fileURLWithPath: inputPath))
|
|
530
|
+
guard let exportSession = AVAssetExportSession(asset: asset, presetName: AVAssetExportPresetHighestQuality) else {
|
|
531
|
+
fputs("{\\"error\\":\\"missing-export-session\\"}", stderr)
|
|
532
|
+
exit(1)
|
|
533
|
+
}
|
|
534
|
+
exportSession.outputURL = URL(fileURLWithPath: outputPath)
|
|
535
|
+
exportSession.outputFileType = .mp4
|
|
536
|
+
exportSession.shouldOptimizeForNetworkUse = true
|
|
537
|
+
exportSession.timeRange = CMTimeRange(
|
|
538
|
+
start: .zero,
|
|
539
|
+
duration: CMTime(seconds: Double(durationMs) / 1000.0, preferredTimescale: 600)
|
|
540
|
+
)
|
|
541
|
+
let semaphore = DispatchSemaphore(value: 0)
|
|
542
|
+
exportSession.exportAsynchronously {
|
|
543
|
+
semaphore.signal()
|
|
544
|
+
}
|
|
545
|
+
semaphore.wait()
|
|
546
|
+
if exportSession.status != .completed {
|
|
547
|
+
let message = exportSession.error?.localizedDescription ?? "export-failed"
|
|
548
|
+
fputs(message, stderr)
|
|
549
|
+
exit(1)
|
|
550
|
+
}
|
|
551
|
+
let payload = ["ok": true]
|
|
552
|
+
let json = try JSONSerialization.data(withJSONObject: payload, options: [])
|
|
553
|
+
FileHandle.standardOutput.write(json)
|
|
554
|
+
`, [filePath, outputPath, String(maxDurationMs)], 'trim story video');
|
|
555
|
+
return outputPath;
|
|
556
|
+
}
|
|
557
|
+
function prepareVideoAssetForPrivateStoryUpload(filePath) {
|
|
558
|
+
const asset = readVideoAsset(filePath);
|
|
559
|
+
if (asset.durationMs <= INSTAGRAM_MAX_STORY_VIDEO_DURATION_MS) {
|
|
560
|
+
return asset;
|
|
561
|
+
}
|
|
562
|
+
const trimmedPath = trimVideoForInstagramStory(filePath, INSTAGRAM_MAX_STORY_VIDEO_DURATION_MS);
|
|
563
|
+
const trimmedAsset = readVideoAsset(trimmedPath);
|
|
564
|
+
return {
|
|
565
|
+
...trimmedAsset,
|
|
566
|
+
cleanupPaths: [
|
|
567
|
+
...(trimmedAsset.cleanupPaths || []),
|
|
568
|
+
trimmedPath,
|
|
569
|
+
],
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
function toUnixSeconds(now) {
|
|
573
|
+
const value = now();
|
|
574
|
+
return value > 10_000_000_000 ? Math.floor(value / 1000) : Math.floor(value);
|
|
575
|
+
}
|
|
576
|
+
export function buildConfigureToStoryPhotoPayload(input) {
|
|
577
|
+
const now = input.now ?? (() => Date.now());
|
|
578
|
+
const timestamp = toUnixSeconds(now);
|
|
579
|
+
return {
|
|
580
|
+
source_type: '4',
|
|
581
|
+
upload_id: input.uploadId,
|
|
582
|
+
story_media_creation_date: String(timestamp - 17),
|
|
583
|
+
client_shared_at: String(timestamp - 5),
|
|
584
|
+
client_timestamp: String(timestamp),
|
|
585
|
+
configure_mode: 1,
|
|
586
|
+
edits: {
|
|
587
|
+
crop_original_size: [input.width, input.height],
|
|
588
|
+
crop_center: [0, 0],
|
|
589
|
+
crop_zoom: 1.3333334,
|
|
590
|
+
},
|
|
591
|
+
extra: {
|
|
592
|
+
source_width: input.width,
|
|
593
|
+
source_height: input.height,
|
|
594
|
+
},
|
|
595
|
+
jazoest: input.jazoest,
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
export function buildConfigureToStoryVideoPayload(input) {
|
|
599
|
+
const now = input.now ?? (() => Date.now());
|
|
600
|
+
const timestamp = toUnixSeconds(now);
|
|
601
|
+
const durationSeconds = Number((input.durationMs / 1000).toFixed(3));
|
|
602
|
+
return {
|
|
603
|
+
source_type: '4',
|
|
604
|
+
upload_id: input.uploadId,
|
|
605
|
+
story_media_creation_date: String(timestamp - 17),
|
|
606
|
+
client_shared_at: String(timestamp - 5),
|
|
607
|
+
client_timestamp: String(timestamp),
|
|
608
|
+
configure_mode: 1,
|
|
609
|
+
poster_frame_index: 0,
|
|
610
|
+
length: durationSeconds,
|
|
611
|
+
audio_muted: false,
|
|
612
|
+
filter_type: '0',
|
|
613
|
+
video_result: 'deprecated',
|
|
614
|
+
extra: {
|
|
615
|
+
source_width: input.width,
|
|
616
|
+
source_height: input.height,
|
|
617
|
+
},
|
|
618
|
+
jazoest: input.jazoest,
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
function buildFormEncodedBodyFromPayload(payload) {
|
|
622
|
+
const body = new URLSearchParams();
|
|
623
|
+
for (const [key, value] of Object.entries(payload)) {
|
|
624
|
+
if (value === undefined || value === null)
|
|
625
|
+
continue;
|
|
626
|
+
if (typeof value === 'object') {
|
|
627
|
+
body.set(key, JSON.stringify(value));
|
|
628
|
+
continue;
|
|
629
|
+
}
|
|
630
|
+
body.set(key, String(value));
|
|
631
|
+
}
|
|
632
|
+
return body.toString();
|
|
633
|
+
}
|
|
634
|
+
function buildSignedBody(payload) {
|
|
635
|
+
const jsonPayload = JSON.stringify(payload);
|
|
636
|
+
const signature = crypto
|
|
637
|
+
.createHmac('sha256', INSTAGRAM_STORY_SIG_KEY)
|
|
638
|
+
.update(jsonPayload)
|
|
639
|
+
.digest('hex');
|
|
640
|
+
const body = new URLSearchParams();
|
|
641
|
+
body.set('ig_sig_key_version', INSTAGRAM_STORY_SIG_KEY_VERSION);
|
|
642
|
+
body.set('signed_body', `${signature}.${jsonPayload}`);
|
|
643
|
+
return body.toString();
|
|
644
|
+
}
|
|
645
|
+
function buildPrivateApiHeaders(context) {
|
|
646
|
+
return Object.fromEntries(Object.entries({
|
|
647
|
+
'X-ASBD-ID': context.asbdId,
|
|
648
|
+
'X-CSRFToken': context.csrfToken,
|
|
649
|
+
'X-IG-App-ID': context.igAppId,
|
|
650
|
+
'X-IG-WWW-Claim': context.igWwwClaim,
|
|
651
|
+
'X-Instagram-AJAX': context.instagramAjax,
|
|
652
|
+
'X-Web-Session-ID': context.webSessionId,
|
|
653
|
+
}).filter(([, value]) => !!value));
|
|
654
|
+
}
|
|
655
|
+
function buildRuploadHeaders(asset, uploadId, context) {
|
|
656
|
+
return {
|
|
657
|
+
...buildPrivateApiHeaders(context),
|
|
658
|
+
'Accept': '*/*',
|
|
659
|
+
'Content-Type': asset.mimeType,
|
|
660
|
+
'Offset': '0',
|
|
661
|
+
'X-Entity-Length': String(asset.byteLength),
|
|
662
|
+
'X-Entity-Name': `fb_uploader_${uploadId}`,
|
|
663
|
+
'X-Entity-Type': asset.mimeType,
|
|
664
|
+
'X-Instagram-Rupload-Params': JSON.stringify({
|
|
665
|
+
media_type: 1,
|
|
666
|
+
upload_id: uploadId,
|
|
667
|
+
upload_media_height: asset.height,
|
|
668
|
+
upload_media_width: asset.width,
|
|
669
|
+
}),
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
function buildVideoEditParams(asset) {
|
|
673
|
+
const cropSize = Math.min(asset.width, asset.height);
|
|
674
|
+
const trimEndSeconds = Number((asset.durationMs / 1000).toFixed(3));
|
|
675
|
+
return {
|
|
676
|
+
crop_height: cropSize,
|
|
677
|
+
crop_width: cropSize,
|
|
678
|
+
crop_x1: Math.max(0, Math.floor((asset.width - cropSize) / 2)),
|
|
679
|
+
crop_y1: Math.max(0, Math.floor((asset.height - cropSize) / 2)),
|
|
680
|
+
mute: false,
|
|
681
|
+
trim_end: trimEndSeconds,
|
|
682
|
+
trim_start: 0,
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
function buildVideoRuploadHeaders(asset, uploadId, context) {
|
|
686
|
+
return {
|
|
687
|
+
...buildPrivateApiHeaders(context),
|
|
688
|
+
'Accept': '*/*',
|
|
689
|
+
'Offset': '0',
|
|
690
|
+
'X-Entity-Length': String(asset.byteLength),
|
|
691
|
+
'X-Entity-Name': `fb_uploader_${uploadId}`,
|
|
692
|
+
'X-Instagram-Rupload-Params': JSON.stringify({
|
|
693
|
+
'client-passthrough': '1',
|
|
694
|
+
'is_unified_video': '0',
|
|
695
|
+
'is_sidecar': '1',
|
|
696
|
+
'media_type': 2,
|
|
697
|
+
'for_album': false,
|
|
698
|
+
'video_format': '',
|
|
699
|
+
'upload_id': uploadId,
|
|
700
|
+
'upload_media_duration_ms': asset.durationMs,
|
|
701
|
+
'upload_media_height': asset.height,
|
|
702
|
+
'upload_media_width': asset.width,
|
|
703
|
+
'video_transform': null,
|
|
704
|
+
'video_edit_params': buildVideoEditParams(asset),
|
|
705
|
+
}),
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
function buildStoryVideoRuploadHeaders(asset, uploadId, context) {
|
|
709
|
+
return {
|
|
710
|
+
...buildPrivateApiHeaders(context),
|
|
711
|
+
'Accept': '*/*',
|
|
712
|
+
'Offset': '0',
|
|
713
|
+
'X-Entity-Length': String(asset.byteLength),
|
|
714
|
+
'X-Entity-Name': `fb_uploader_${uploadId}`,
|
|
715
|
+
'X-Instagram-Rupload-Params': JSON.stringify({
|
|
716
|
+
'client-passthrough': '1',
|
|
717
|
+
'media_type': 2,
|
|
718
|
+
'upload_id': uploadId,
|
|
719
|
+
'upload_media_duration_ms': asset.durationMs,
|
|
720
|
+
'upload_media_height': asset.height,
|
|
721
|
+
'upload_media_width': asset.width,
|
|
722
|
+
'video_transform': null,
|
|
723
|
+
'video_edit_params': buildVideoEditParams(asset),
|
|
724
|
+
}),
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
function buildVideoCoverRuploadHeaders(asset, uploadId, context) {
|
|
728
|
+
return {
|
|
729
|
+
...buildPrivateApiHeaders(context),
|
|
730
|
+
'Accept': '*/*',
|
|
731
|
+
'Content-Type': asset.coverImage.mimeType,
|
|
732
|
+
'Offset': '0',
|
|
733
|
+
'X-Entity-Length': String(asset.coverImage.byteLength),
|
|
734
|
+
'X-Entity-Name': `fb_uploader_${uploadId}`,
|
|
735
|
+
'X-Entity-Type': asset.coverImage.mimeType,
|
|
736
|
+
'X-Instagram-Rupload-Params': JSON.stringify({
|
|
737
|
+
media_type: 2,
|
|
738
|
+
upload_id: uploadId,
|
|
739
|
+
upload_media_height: asset.height,
|
|
740
|
+
upload_media_width: asset.width,
|
|
741
|
+
}),
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
async function parseJsonResponse(response, stage) {
|
|
745
|
+
const text = await response.text();
|
|
746
|
+
let data;
|
|
747
|
+
try {
|
|
748
|
+
data = text ? JSON.parse(text) : {};
|
|
749
|
+
}
|
|
750
|
+
catch {
|
|
751
|
+
throw new CommandExecutionError(`Instagram private publish ${stage} returned invalid JSON`);
|
|
752
|
+
}
|
|
753
|
+
if (!response.ok) {
|
|
754
|
+
const detail = text ? ` ${text.slice(0, 500)}` : '';
|
|
755
|
+
throw new CommandExecutionError(`Instagram private publish ${stage} failed: ${response.status}${detail}`);
|
|
756
|
+
}
|
|
757
|
+
return data;
|
|
758
|
+
}
|
|
759
|
+
async function fetchPrivateUploadWithRetry(fetcher, url, init) {
|
|
760
|
+
let lastError;
|
|
761
|
+
for (let attempt = 0; attempt < INSTAGRAM_PRIVATE_UPLOAD_RETRY_BUDGET; attempt += 1) {
|
|
762
|
+
try {
|
|
763
|
+
return await fetcher(url, init);
|
|
764
|
+
}
|
|
765
|
+
catch (error) {
|
|
766
|
+
lastError = error;
|
|
767
|
+
if (!isTransientPrivateFetchError(error) || attempt >= INSTAGRAM_PRIVATE_UPLOAD_RETRY_BUDGET - 1) {
|
|
768
|
+
throw error;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
throw lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
773
|
+
}
|
|
774
|
+
async function prepareInstagramMediaAsset(item) {
|
|
775
|
+
if (item.type === 'video') {
|
|
776
|
+
return {
|
|
777
|
+
type: 'video',
|
|
778
|
+
asset: readVideoAsset(item.filePath),
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
return {
|
|
782
|
+
type: 'image',
|
|
783
|
+
asset: prepareImageAssetForPrivateUpload(item.filePath),
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
function cleanupPreparedMediaAssets(assets) {
|
|
787
|
+
for (const prepared of assets) {
|
|
788
|
+
if (prepared.type === 'image') {
|
|
789
|
+
if (prepared.asset.cleanupPath) {
|
|
790
|
+
fs.rmSync(prepared.asset.cleanupPath, { force: true });
|
|
791
|
+
}
|
|
792
|
+
continue;
|
|
793
|
+
}
|
|
794
|
+
for (const cleanupPath of prepared.asset.cleanupPaths || []) {
|
|
795
|
+
fs.rmSync(cleanupPath, { force: true });
|
|
796
|
+
}
|
|
797
|
+
if (prepared.asset.coverImage.cleanupPath) {
|
|
798
|
+
fs.rmSync(prepared.asset.coverImage.cleanupPath, { force: true });
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
async function uploadPreparedMediaAsset(fetcher, prepared, uploadId, context, mode = 'feed') {
|
|
803
|
+
if (prepared.type === 'image') {
|
|
804
|
+
const response = await fetchPrivateUploadWithRetry(fetcher, `https://i.instagram.com/rupload_igphoto/fb_uploader_${uploadId}`, {
|
|
805
|
+
method: 'POST',
|
|
806
|
+
headers: buildRuploadHeaders(prepared.asset, uploadId, context),
|
|
807
|
+
body: prepared.asset.bytes,
|
|
808
|
+
});
|
|
809
|
+
const json = await parseJsonResponse(response, 'upload');
|
|
810
|
+
if (String(json?.status || '') !== 'ok') {
|
|
811
|
+
throw new CommandExecutionError(`Instagram private publish upload failed for ${prepared.asset.fileName}`);
|
|
812
|
+
}
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
const videoResponse = await fetchPrivateUploadWithRetry(fetcher, `https://i.instagram.com/rupload_igvideo/fb_uploader_${uploadId}`, {
|
|
816
|
+
method: 'POST',
|
|
817
|
+
headers: mode === 'story'
|
|
818
|
+
? buildStoryVideoRuploadHeaders(prepared.asset, uploadId, context)
|
|
819
|
+
: buildVideoRuploadHeaders(prepared.asset, uploadId, context),
|
|
820
|
+
body: prepared.asset.bytes,
|
|
821
|
+
});
|
|
822
|
+
const videoJson = await parseJsonResponse(videoResponse, 'video upload');
|
|
823
|
+
if (String(videoJson?.status || '') !== 'ok') {
|
|
824
|
+
throw new CommandExecutionError(`Instagram private publish video upload failed for ${prepared.asset.fileName}`);
|
|
825
|
+
}
|
|
826
|
+
const coverResponse = await fetchPrivateUploadWithRetry(fetcher, `https://i.instagram.com/rupload_igphoto/fb_uploader_${uploadId}`, {
|
|
827
|
+
method: 'POST',
|
|
828
|
+
headers: buildVideoCoverRuploadHeaders(prepared.asset, uploadId, context),
|
|
829
|
+
body: prepared.asset.coverImage.bytes,
|
|
830
|
+
});
|
|
831
|
+
const coverJson = await parseJsonResponse(coverResponse, 'video cover upload');
|
|
832
|
+
if (String(coverJson?.status || '') !== 'ok') {
|
|
833
|
+
throw new CommandExecutionError(`Instagram private publish video cover upload failed for ${prepared.asset.fileName}`);
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
async function publishSidecarWithRetry(input) {
|
|
837
|
+
const waitMs = input.waitMs ?? sleep;
|
|
838
|
+
const requestInit = {
|
|
839
|
+
method: 'POST',
|
|
840
|
+
headers: {
|
|
841
|
+
...buildPrivateApiHeaders(input.apiContext),
|
|
842
|
+
'Content-Type': 'application/json',
|
|
843
|
+
},
|
|
844
|
+
body: JSON.stringify(input.payload),
|
|
845
|
+
};
|
|
846
|
+
for (let attempt = 0; attempt < INSTAGRAM_PRIVATE_SIDECAR_TRANSCODE_ATTEMPTS; attempt += 1) {
|
|
847
|
+
const response = await input.fetcher('https://www.instagram.com/api/v1/media/configure_sidecar/', requestInit);
|
|
848
|
+
const text = await response.text();
|
|
849
|
+
let json = {};
|
|
850
|
+
try {
|
|
851
|
+
json = text ? JSON.parse(text) : {};
|
|
852
|
+
}
|
|
853
|
+
catch {
|
|
854
|
+
throw new CommandExecutionError('Instagram private publish configure_sidecar returned invalid JSON');
|
|
855
|
+
}
|
|
856
|
+
if (!response.ok) {
|
|
857
|
+
const detail = text ? ` ${text.slice(0, 500)}` : '';
|
|
858
|
+
throw new CommandExecutionError(`Instagram private publish configure_sidecar failed: ${response.status}${detail}`);
|
|
859
|
+
}
|
|
860
|
+
const message = String(json?.message || '');
|
|
861
|
+
if (response.status === 202
|
|
862
|
+
|| /transcode not finished yet/i.test(message)) {
|
|
863
|
+
if (attempt >= INSTAGRAM_PRIVATE_SIDECAR_TRANSCODE_ATTEMPTS - 1) {
|
|
864
|
+
throw new CommandExecutionError('Instagram private publish configure_sidecar timed out waiting for video transcode', text.slice(0, 500));
|
|
865
|
+
}
|
|
866
|
+
await waitMs(INSTAGRAM_PRIVATE_SIDECAR_TRANSCODE_WAIT_MS);
|
|
867
|
+
continue;
|
|
868
|
+
}
|
|
869
|
+
if (String(json?.status || '').toLowerCase() === 'fail') {
|
|
870
|
+
throw new CommandExecutionError('Instagram private publish configure_sidecar failed', message || text.slice(0, 500));
|
|
871
|
+
}
|
|
872
|
+
return { code: json?.media?.code };
|
|
873
|
+
}
|
|
874
|
+
throw new CommandExecutionError('Instagram private publish configure_sidecar failed');
|
|
875
|
+
}
|
|
876
|
+
export async function publishMediaViaPrivateApi(input) {
|
|
877
|
+
const now = input.now ?? (() => Date.now());
|
|
878
|
+
const clientSidecarId = String(now());
|
|
879
|
+
const uploadIds = input.mediaItems.length > 1
|
|
880
|
+
? input.mediaItems.map((_, index) => String(now() + index + 1))
|
|
881
|
+
: [String(now())];
|
|
882
|
+
const fetcher = input.fetcher ?? ((url, init) => instagramPrivateApiFetch(input.page, url, init));
|
|
883
|
+
const prepareMediaAsset = input.prepareMediaAsset ?? prepareInstagramMediaAsset;
|
|
884
|
+
const assets = await Promise.all(input.mediaItems.map((item) => prepareMediaAsset(item)));
|
|
885
|
+
try {
|
|
886
|
+
for (let index = 0; index < assets.length; index += 1) {
|
|
887
|
+
const asset = assets[index];
|
|
888
|
+
const uploadId = uploadIds[index];
|
|
889
|
+
await uploadPreparedMediaAsset(fetcher, asset, uploadId, input.apiContext);
|
|
890
|
+
}
|
|
891
|
+
if (uploadIds.length === 1) {
|
|
892
|
+
if (assets[0]?.type !== 'image') {
|
|
893
|
+
throw new CommandExecutionError('Instagram private publish only supports single-video uploads through instagram reel');
|
|
894
|
+
}
|
|
895
|
+
const response = await fetcher('https://www.instagram.com/api/v1/media/configure/', {
|
|
896
|
+
method: 'POST',
|
|
897
|
+
headers: {
|
|
898
|
+
...buildPrivateApiHeaders(input.apiContext),
|
|
899
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
900
|
+
},
|
|
901
|
+
body: buildConfigureBody({
|
|
902
|
+
uploadId: uploadIds[0],
|
|
903
|
+
caption: input.caption,
|
|
904
|
+
jazoest: input.jazoest,
|
|
905
|
+
}),
|
|
906
|
+
});
|
|
907
|
+
const json = await parseJsonResponse(response, 'configure');
|
|
908
|
+
return { code: json?.media?.code, uploadIds };
|
|
909
|
+
}
|
|
910
|
+
const result = await publishSidecarWithRetry({
|
|
911
|
+
fetcher,
|
|
912
|
+
payload: buildConfigureSidecarPayload({
|
|
913
|
+
uploadIds,
|
|
914
|
+
caption: input.caption,
|
|
915
|
+
clientSidecarId,
|
|
916
|
+
jazoest: input.jazoest,
|
|
917
|
+
}),
|
|
918
|
+
apiContext: input.apiContext,
|
|
919
|
+
waitMs: input.waitMs,
|
|
920
|
+
});
|
|
921
|
+
return { code: result.code, uploadIds };
|
|
922
|
+
}
|
|
923
|
+
finally {
|
|
924
|
+
cleanupPreparedMediaAssets(assets);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
export async function publishImagesViaPrivateApi(input) {
|
|
928
|
+
return publishMediaViaPrivateApi({
|
|
929
|
+
page: input.page,
|
|
930
|
+
mediaItems: input.imagePaths.map((filePath) => ({ type: 'image', filePath })),
|
|
931
|
+
caption: input.caption,
|
|
932
|
+
apiContext: input.apiContext,
|
|
933
|
+
jazoest: input.jazoest,
|
|
934
|
+
now: input.now,
|
|
935
|
+
fetcher: input.fetcher,
|
|
936
|
+
waitMs: input.waitMs,
|
|
937
|
+
prepareMediaAsset: input.prepareAsset
|
|
938
|
+
? async (item) => ({
|
|
939
|
+
type: 'image',
|
|
940
|
+
asset: await input.prepareAsset(item.filePath),
|
|
941
|
+
})
|
|
942
|
+
: undefined,
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
export async function publishStoryViaPrivateApi(input) {
|
|
946
|
+
const now = input.now ?? (() => Date.now());
|
|
947
|
+
const uploadId = String(now());
|
|
948
|
+
const fetcher = input.fetcher ?? ((url, init) => instagramPrivateApiFetch(input.page, url, init));
|
|
949
|
+
const prepareMediaAsset = input.prepareMediaAsset ?? (async (item) => item.type === 'video'
|
|
950
|
+
? { type: 'video', asset: prepareVideoAssetForPrivateStoryUpload(item.filePath) }
|
|
951
|
+
: { type: 'image', asset: prepareImageAssetForPrivateStoryUpload(item.filePath) });
|
|
952
|
+
const prepared = await prepareMediaAsset(input.mediaItem);
|
|
953
|
+
const currentUserId = input.currentUserId
|
|
954
|
+
|| ('getCookies' in input.page
|
|
955
|
+
? String((await (input.page.getCookies?.({ domain: 'instagram.com' }) ?? Promise.resolve([])))
|
|
956
|
+
.find((cookie) => cookie.name === 'ds_user_id')?.value || '')
|
|
957
|
+
: '');
|
|
958
|
+
if (!currentUserId) {
|
|
959
|
+
throw new CommandExecutionError('Instagram story publish could not derive current user id from browser session');
|
|
960
|
+
}
|
|
961
|
+
const signedPayloadBase = {
|
|
962
|
+
_csrftoken: input.apiContext.csrfToken,
|
|
963
|
+
_uid: currentUserId,
|
|
964
|
+
_uuid: crypto.randomUUID(),
|
|
965
|
+
device: INSTAGRAM_STORY_DEVICE,
|
|
966
|
+
};
|
|
967
|
+
const buildSignedStoryPhotoBody = (width, height) => buildSignedBody({
|
|
968
|
+
...buildConfigureToStoryPhotoPayload({
|
|
969
|
+
uploadId,
|
|
970
|
+
width,
|
|
971
|
+
height,
|
|
972
|
+
now,
|
|
973
|
+
jazoest: input.jazoest,
|
|
974
|
+
}),
|
|
975
|
+
...signedPayloadBase,
|
|
976
|
+
});
|
|
977
|
+
const buildSignedStoryVideoBody = (width, height, durationMs) => buildSignedBody({
|
|
978
|
+
...buildConfigureToStoryVideoPayload({
|
|
979
|
+
uploadId,
|
|
980
|
+
width,
|
|
981
|
+
height,
|
|
982
|
+
durationMs,
|
|
983
|
+
now,
|
|
984
|
+
jazoest: input.jazoest,
|
|
985
|
+
}),
|
|
986
|
+
...signedPayloadBase,
|
|
987
|
+
});
|
|
988
|
+
try {
|
|
989
|
+
await uploadPreparedMediaAsset(fetcher, prepared, uploadId, input.apiContext, 'story');
|
|
990
|
+
if (prepared.type === 'image') {
|
|
991
|
+
const response = await fetcher('https://i.instagram.com/api/v1/media/configure_to_story/', {
|
|
992
|
+
method: 'POST',
|
|
993
|
+
headers: {
|
|
994
|
+
...buildPrivateApiHeaders(input.apiContext),
|
|
995
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
996
|
+
},
|
|
997
|
+
body: buildSignedStoryPhotoBody(prepared.asset.width, prepared.asset.height),
|
|
998
|
+
});
|
|
999
|
+
const json = await parseJsonResponse(response, 'configure_to_story');
|
|
1000
|
+
return {
|
|
1001
|
+
mediaPk: String(json?.media?.pk || json?.media?.id || '').split('_')[0] || undefined,
|
|
1002
|
+
uploadId,
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
await parseJsonResponse(await fetcher('https://i.instagram.com/api/v1/media/configure_to_story/', {
|
|
1006
|
+
method: 'POST',
|
|
1007
|
+
headers: {
|
|
1008
|
+
...buildPrivateApiHeaders(input.apiContext),
|
|
1009
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
1010
|
+
},
|
|
1011
|
+
body: buildSignedStoryPhotoBody(prepared.asset.width, prepared.asset.height),
|
|
1012
|
+
}), 'configure_to_story cover');
|
|
1013
|
+
const response = await fetcher('https://i.instagram.com/api/v1/media/configure_to_story/?video=1', {
|
|
1014
|
+
method: 'POST',
|
|
1015
|
+
headers: {
|
|
1016
|
+
...buildPrivateApiHeaders(input.apiContext),
|
|
1017
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
1018
|
+
},
|
|
1019
|
+
body: buildSignedStoryVideoBody(prepared.asset.width, prepared.asset.height, prepared.asset.durationMs),
|
|
1020
|
+
});
|
|
1021
|
+
const json = await parseJsonResponse(response, 'configure_to_story');
|
|
1022
|
+
return {
|
|
1023
|
+
mediaPk: String(json?.media?.pk || json?.media?.id || '').split('_')[0] || undefined,
|
|
1024
|
+
uploadId,
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
finally {
|
|
1028
|
+
cleanupPreparedMediaAssets([prepared]);
|
|
1029
|
+
}
|
|
1030
|
+
}
|