@mcp-use/client 2.4.5 → 2.4.6-canary.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/dist/.tsbuildinfo +1 -1
- package/dist/auth/url.d.ts +2 -3
- package/dist/auth/url.d.ts.map +1 -1
- package/dist/code-mode/executor-vm.d.ts.map +1 -1
- package/dist/index-browser.js +7 -17
- package/dist/index-browser.js.map +1 -1
- package/dist/index.js +46 -22
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +7 -17
- package/dist/react/index.js.map +1 -1
- package/package.json +2 -2
package/dist/react/index.js
CHANGED
|
@@ -1979,7 +1979,7 @@ var HttpConnector = class extends BaseConnector {
|
|
|
1979
1979
|
};
|
|
1980
1980
|
|
|
1981
1981
|
// src/utils/version.ts
|
|
1982
|
-
var VERSION = "2.4.
|
|
1982
|
+
var VERSION = "2.4.6-canary.1";
|
|
1983
1983
|
function getPackageVersion() {
|
|
1984
1984
|
return VERSION;
|
|
1985
1985
|
}
|
|
@@ -2237,27 +2237,17 @@ import { validateClientMetadataUrl } from "@modelcontextprotocol/client";
|
|
|
2237
2237
|
|
|
2238
2238
|
// src/auth/url.ts
|
|
2239
2239
|
function sanitizeUrl(raw) {
|
|
2240
|
-
const abort = () => {
|
|
2241
|
-
throw new Error(`Invalid url to pass to open(): ${raw}`);
|
|
2242
|
-
};
|
|
2243
2240
|
let url;
|
|
2244
2241
|
try {
|
|
2245
2242
|
url = new URL(raw);
|
|
2246
|
-
} catch
|
|
2247
|
-
|
|
2248
|
-
}
|
|
2249
|
-
if (url.protocol !== "
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
if (url.password) url.password = encodeURIComponent(url.password);
|
|
2253
|
-
url.pathname = url.pathname.slice(0, 1) + encodeURIComponent(url.pathname.slice(1)).replace(/%2f/gi, "/");
|
|
2254
|
-
url.search = url.search.slice(0, 1) + Array.from(url.searchParams.entries()).map(sanitizeParam).join("&");
|
|
2255
|
-
url.hash = url.hash.slice(0, 1) + encodeURIComponent(url.hash.slice(1));
|
|
2243
|
+
} catch {
|
|
2244
|
+
throw new Error(`Invalid url to pass to open(): ${raw}`);
|
|
2245
|
+
}
|
|
2246
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
2247
|
+
throw new Error(`Invalid url to pass to open(): ${raw}`);
|
|
2248
|
+
}
|
|
2256
2249
|
return url.href;
|
|
2257
2250
|
}
|
|
2258
|
-
function sanitizeParam([k, v]) {
|
|
2259
|
-
return `${encodeURIComponent(k)}${v.length > 0 ? `=${encodeURIComponent(v)}` : ""}`;
|
|
2260
|
-
}
|
|
2261
2251
|
|
|
2262
2252
|
// src/auth/session-store.ts
|
|
2263
2253
|
var OAuthSessionStore = class _OAuthSessionStore {
|