@jackwener/opencli 1.6.3 → 1.6.4
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/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/src/discovery.js +5 -0
- package/dist/src/version.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,11 +132,11 @@ git clone git@github.com:jackwener/opencli.git && cd opencli && npm install && n
|
|
|
132
132
|
| **hupu** | `hot` `search` `detail` `mentions` `reply` `like` `unlike` |
|
|
133
133
|
| **twitter** | `trending` `search` `timeline` `bookmarks` `post` `download` `profile` `article` `like` `likes` `notifications` `reply` `reply-dm` `thread` `follow` `unfollow` `followers` `following` `block` `unblock` `bookmark` `unbookmark` `delete` `hide-reply` `accept` |
|
|
134
134
|
| **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `upvoted` `save` `saved` `comment` `subscribe` |
|
|
135
|
-
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases`
|
|
135
|
+
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` |
|
|
136
136
|
| **1688** | `search` `item` `store` |
|
|
137
137
|
| **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` |
|
|
138
138
|
| **yuanbao** | `new` `ask` |
|
|
139
|
-
| **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `
|
|
139
|
+
| **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` |
|
|
140
140
|
| **spotify** | `auth` `status` `play` `pause` `next` `prev` `volume` `search` `queue` `shuffle` `repeat` |
|
|
141
141
|
| **xianyu** | `search` `item` `chat` |
|
|
142
142
|
| **xiaoe** | `courses` `detail` `catalog` `play-url` `content` |
|
package/README.zh-CN.md
CHANGED
|
@@ -185,11 +185,11 @@ npx skills add jackwener/opencli --skill opencli-oneshot # 快速命令参
|
|
|
185
185
|
| **douban** | `search` `top250` `subject` `photos` `download` `marks` `reviews` `movie-hot` `book-hot` | 浏览器 |
|
|
186
186
|
| **facebook** | `feed` `profile` `search` `friends` `groups` `events` `notifications` `memories` `add-friend` `join-group` | 浏览器 |
|
|
187
187
|
| **google** | `news` `search` `suggest` `trends` | 公开 |
|
|
188
|
-
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases`
|
|
188
|
+
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` | 浏览器 |
|
|
189
189
|
| **1688** | `search` `item` `store` | 浏览器 |
|
|
190
190
|
| **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` | 浏览器 |
|
|
191
191
|
| **spotify** | `auth` `status` `play` `pause` `next` `prev` `volume` `search` `queue` `shuffle` `repeat` | OAuth API |
|
|
192
|
-
| **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `
|
|
192
|
+
| **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` | 浏览器 |
|
|
193
193
|
| **36kr** | `news` `hot` `search` `article` | 公开 / 浏览器 |
|
|
194
194
|
| **imdb** | `search` `title` `top` `trending` `person` `reviews` | 公开 |
|
|
195
195
|
| **producthunt** | `posts` `today` `hot` `browse` | 公开 / 浏览器 |
|
package/dist/src/discovery.js
CHANGED
|
@@ -95,11 +95,16 @@ export async function ensureUserCliCompatShims(baseDir = USER_OPENCLI_DIR) {
|
|
|
95
95
|
];
|
|
96
96
|
const writes = [];
|
|
97
97
|
// Root-level shims (both with and without .js extension)
|
|
98
|
+
// Also generate src/ shims: adapters import ../../src/registry.js etc., which
|
|
99
|
+
// resolve to ~/.opencli/src/registry.js when running from ~/.opencli/clis/<site>/
|
|
100
|
+
const srcDir = path.join(baseDir, 'src');
|
|
101
|
+
await fs.promises.mkdir(srcDir, { recursive: true });
|
|
98
102
|
for (const [shimName, moduleName] of rootShims) {
|
|
99
103
|
const url = pathToFileURL(resolveHostRuntimeModulePath(moduleName)).href;
|
|
100
104
|
const content = `export * from '${url}';\n`;
|
|
101
105
|
writes.push(writeCompatShimIfNeeded(path.join(baseDir, shimName), content));
|
|
102
106
|
writes.push(writeCompatShimIfNeeded(path.join(baseDir, `${shimName}.js`), content));
|
|
107
|
+
writes.push(writeCompatShimIfNeeded(path.join(srcDir, `${shimName}.js`), content));
|
|
103
108
|
}
|
|
104
109
|
// Subdirectory shims
|
|
105
110
|
for (const [subdir, filename, runtimePath] of subdirShims) {
|
package/dist/src/version.js
CHANGED
|
@@ -5,7 +5,13 @@ import * as fs from 'node:fs';
|
|
|
5
5
|
import * as path from 'node:path';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
|
|
8
|
+
// Dev: __dirname is src/ (one level to root).
|
|
9
|
+
// Prod: __dirname is dist/src/ (two levels to root).
|
|
10
|
+
let _pkgDir = path.resolve(__dirname, '..');
|
|
11
|
+
if (!fs.existsSync(path.join(_pkgDir, 'package.json'))) {
|
|
12
|
+
_pkgDir = path.resolve(_pkgDir, '..');
|
|
13
|
+
}
|
|
14
|
+
const pkgJsonPath = path.join(_pkgDir, 'package.json');
|
|
9
15
|
export const PKG_VERSION = (() => {
|
|
10
16
|
try {
|
|
11
17
|
return JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8')).version;
|