ss-mcp-proxy 1.0.1 → 1.0.3
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/index.mjs +6 -6
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const PROXY_BASE = "
|
|
3
|
+
const PROXY_BASE = "https://shadcn-registry-mirror.vercel.app/api/mcp-proxy";
|
|
4
4
|
|
|
5
5
|
const ORIGINAL_HOST = "shadcnstudio.com";
|
|
6
6
|
const _fetch = globalThis.fetch;
|
|
@@ -12,12 +12,12 @@ globalThis.fetch = async function (input, init) {
|
|
|
12
12
|
return _fetch(input, init);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
url.port = proxy.port;
|
|
15
|
+
const path = url.pathname.startsWith("/api/")
|
|
16
|
+
? url.pathname.slice(4)
|
|
17
|
+
: url.pathname;
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
const proxyUrl = PROXY_BASE + path + url.search;
|
|
20
|
+
return _fetch(proxyUrl, init);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
await import("shadcn-studio-mcp/build/index.js");
|