@bsbofmusic/cdper-doubao 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cdper-doubao.cjs +0 -0
- package/package.json +13 -4
- package/src/cli.js +2 -0
- package/src/doubao.js +1 -0
- package/src/public-api.d.ts +13 -0
package/bin/cdper-doubao.cjs
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bsbofmusic/cdper-doubao",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Standalone Doubao CLI controlled through a user's real Chrome/Edge via CDP Bridge",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "src/public-api.js",
|
|
7
|
+
"types": "src/public-api.d.ts",
|
|
7
8
|
"exports": {
|
|
8
|
-
".":
|
|
9
|
-
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./src/public-api.d.ts",
|
|
11
|
+
"require": "./src/public-api.js",
|
|
12
|
+
"default": "./src/public-api.js"
|
|
13
|
+
},
|
|
14
|
+
"./api": {
|
|
15
|
+
"types": "./src/public-api.d.ts",
|
|
16
|
+
"require": "./src/public-api.js",
|
|
17
|
+
"default": "./src/public-api.js"
|
|
18
|
+
}
|
|
10
19
|
},
|
|
11
20
|
"bin": {
|
|
12
21
|
"cdper-doubao": "bin/cdper-doubao.cjs"
|
|
@@ -39,7 +48,7 @@
|
|
|
39
48
|
"node": ">=18.0.0"
|
|
40
49
|
},
|
|
41
50
|
"dependencies": {
|
|
42
|
-
"@bsbofmusic/cdper-core": "~1.
|
|
51
|
+
"@bsbofmusic/cdper-core": "~1.3.0",
|
|
43
52
|
"yargs": "^17.7.2"
|
|
44
53
|
}
|
|
45
54
|
}
|
package/src/cli.js
CHANGED
|
@@ -26,6 +26,7 @@ function parseQueryOptions(argv) {
|
|
|
26
26
|
maxWaitMs: argv.maxWaitMs ?? argv.maxWait,
|
|
27
27
|
progressEveryMs: argv.progressEveryMs,
|
|
28
28
|
maxExtends: argv.maxExtends,
|
|
29
|
+
driver: argv.driver,
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -105,6 +106,7 @@ function addQueryOptions(cmd) {
|
|
|
105
106
|
.option('max-wait', { type: 'number', describe: 'Alias for --max-wait-ms' })
|
|
106
107
|
.option('progress-every-ms', { type: 'number', describe: 'Progress snapshot interval' })
|
|
107
108
|
.option('max-extends', { type: 'number', describe: 'Max 60s wait extensions' })
|
|
109
|
+
.option('driver', { choices: ['puppeteer', 'playwright'], describe: 'Browser driver (default: CDPER_DRIVER or playwright)' })
|
|
108
110
|
.option('check', { type: 'boolean', default: true, describe: 'Run environment pre-check before query' })
|
|
109
111
|
.option('quiet', { alias: 'q', type: 'boolean', describe: 'Quiet logs' })
|
|
110
112
|
.option('debug', { alias: 'd', type: 'boolean', describe: 'Debug logs' });
|
package/src/doubao.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { QueryOptions, QueryResult } from '@bsbofmusic/cdper-core/types';
|
|
2
|
+
|
|
3
|
+
declare const manifest: unknown;
|
|
4
|
+
|
|
5
|
+
declare function getCapabilities(): Array<{
|
|
6
|
+
id: string;
|
|
7
|
+
version: string;
|
|
8
|
+
summary: string;
|
|
9
|
+
}>;
|
|
10
|
+
|
|
11
|
+
declare function queryDoubao(text: string, options?: QueryOptions): Promise<QueryResult>;
|
|
12
|
+
|
|
13
|
+
export { manifest, getCapabilities, queryDoubao };
|