@plaudai/dsh-plugin-feishu 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/browser.js +19 -5
- package/package.json +2 -2
package/dist/core/browser.js
CHANGED
|
@@ -7,12 +7,26 @@ import { spawn } from 'node:child_process';
|
|
|
7
7
|
* pasting it elsewhere.
|
|
8
8
|
*/
|
|
9
9
|
export function openBrowser(url) {
|
|
10
|
-
const [command, args] = process.platform === 'win32'
|
|
11
|
-
? ['cmd', ['/c', 'start', '', url]]
|
|
12
|
-
: process.platform === 'darwin'
|
|
13
|
-
? ['open', [url]]
|
|
14
|
-
: ['xdg-open', [url]];
|
|
15
10
|
try {
|
|
11
|
+
if (process.platform === 'win32') {
|
|
12
|
+
// Node only quotes an argv element when it contains whitespace or a
|
|
13
|
+
// quote, so a bare authorization URL reaches cmd.exe with its `&`
|
|
14
|
+
// separators live and the browser gets everything up to the first query
|
|
15
|
+
// parameter — for Notion that is exactly `?response_type=code`, and the
|
|
16
|
+
// server answers `client_id is required`. Build the command line here and
|
|
17
|
+
// pass it verbatim so the URL keeps its quotes.
|
|
18
|
+
const command = `start "" "${url.replace(/"/g, '')}"`;
|
|
19
|
+
const child = spawn(process.env.comspec ?? 'cmd.exe', ['/d', '/s', '/c', command], {
|
|
20
|
+
detached: true,
|
|
21
|
+
stdio: 'ignore',
|
|
22
|
+
windowsHide: true,
|
|
23
|
+
windowsVerbatimArguments: true,
|
|
24
|
+
});
|
|
25
|
+
child.on('error', () => { });
|
|
26
|
+
child.unref();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const [command, args] = process.platform === 'darwin' ? ['open', [url]] : ['xdg-open', [url]];
|
|
16
30
|
const child = spawn(command, args, { detached: true, stdio: 'ignore', windowsHide: true });
|
|
17
31
|
child.on('error', () => { });
|
|
18
32
|
child.unref();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaudai/dsh-plugin-feishu",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "飞书 / Lark 官方 OpenAPI MCP 接入 DeepSeek Harness",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@plaudai/dsh-mcp-oauth": "^0.1.
|
|
44
|
+
"@plaudai/dsh-mcp-oauth": "^0.1.2"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|