@zegazone_mcp/mcp 2.0.0 → 2.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 +1 -1
- package/scripts/oauth-pair.mjs +5 -3
package/package.json
CHANGED
package/scripts/oauth-pair.mjs
CHANGED
|
@@ -62,7 +62,9 @@ function openBrowser(url) {
|
|
|
62
62
|
} else if (plat === "darwin") {
|
|
63
63
|
spawn("open", [url], detached).unref();
|
|
64
64
|
} else {
|
|
65
|
-
spawn("xdg-open", [url], detached)
|
|
65
|
+
const child = spawn("xdg-open", [url], detached);
|
|
66
|
+
child.on("error", () => {}); // xdg-open absent on WSL — URL already printed above
|
|
67
|
+
child.unref();
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
|
|
@@ -114,9 +116,9 @@ function buildAuthorizeUrl(redirectUri, codeChallenge, state) {
|
|
|
114
116
|
u.searchParams.set("redirect_uri", redirectUri);
|
|
115
117
|
u.searchParams.set("code_challenge", codeChallenge);
|
|
116
118
|
u.searchParams.set("code_challenge_method", "S256");
|
|
117
|
-
u.searchParams.set("scope", SCOPE);
|
|
118
119
|
u.searchParams.set("state", state);
|
|
119
|
-
|
|
120
|
+
const encodedScope = SCOPE.split(" ").map((s) => encodeURIComponent(s)).join("%20");
|
|
121
|
+
return `${u.toString()}&scope=${encodedScope}`;
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
async function main() {
|