@scorehub/mcp-server 0.2.13 → 0.2.14
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/auth.js +10 -28
- package/package.json +3 -2
package/dist/auth.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.loadTokens = loadTokens;
|
|
4
7
|
exports.saveTokens = saveTokens;
|
|
@@ -17,7 +20,7 @@ const node_fs_1 = require("node:fs");
|
|
|
17
20
|
const node_path_1 = require("node:path");
|
|
18
21
|
const node_os_1 = require("node:os");
|
|
19
22
|
const node_crypto_1 = require("node:crypto");
|
|
20
|
-
const
|
|
23
|
+
const open_1 = __importDefault(require("open"));
|
|
21
24
|
const callback_pages_js_1 = require("./pages/callback-pages.js");
|
|
22
25
|
class CallbackError extends Error {
|
|
23
26
|
page;
|
|
@@ -204,35 +207,14 @@ function generateState(length = 16) {
|
|
|
204
207
|
}
|
|
205
208
|
// ── Browser Launch ───────────────────────────────────────────
|
|
206
209
|
function openBrowser(url) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
else if (platform === "win32") {
|
|
213
|
-
try {
|
|
214
|
-
(0, node_child_process_1.execFileSync)("powershell.exe", [
|
|
215
|
-
"-NoProfile",
|
|
216
|
-
"-NonInteractive",
|
|
217
|
-
"-ExecutionPolicy",
|
|
218
|
-
"Bypass",
|
|
219
|
-
"-Command",
|
|
220
|
-
"Start-Process -FilePath ([string]$args[0])",
|
|
221
|
-
url,
|
|
222
|
-
], { stdio: "ignore", timeout: 3000 });
|
|
223
|
-
}
|
|
224
|
-
catch {
|
|
225
|
-
(0, node_child_process_1.execFileSync)("cmd.exe", ["/c", "start", "", `"${url}"`], { stdio: "ignore", timeout: 3000 });
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
(0, node_child_process_1.execFileSync)("xdg-open", [url], { stdio: "ignore", timeout: 3000 });
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
catch {
|
|
210
|
+
// Delegate to `open`, which spawns the platform launcher with the URL as a
|
|
211
|
+
// single argument. This avoids shell interpretation of `&`/`?` — the source
|
|
212
|
+
// of the earlier Windows bugs (cmd `start` truncating at `&`, PowerShell
|
|
213
|
+
// `$args` not populating under -Command and treating the URL as a file path).
|
|
214
|
+
void (0, open_1.default)(url).catch(() => {
|
|
233
215
|
console.error("[scorehub] Could not open browser automatically.");
|
|
234
216
|
console.error(`[scorehub] Please visit this URL manually:\n ${url}`);
|
|
235
|
-
}
|
|
217
|
+
});
|
|
236
218
|
}
|
|
237
219
|
// ── Full OAuth Flow ──────────────────────────────────────────
|
|
238
220
|
async function authorize(params) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scorehub/mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "ScoreHub local MCP proxy — OAuth login, token caching, and tool forwarding to remote MCP endpoint",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18"
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
],
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
33
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
34
|
+
"open": "^8.4.2"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"@types/node": "^22.0.0",
|