@mcp-use/client 2.4.5 → 2.4.6-canary.0
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/index-browser.js +7 -17
- package/dist/index-browser.js.map +1 -1
- package/dist/index.js +7 -17
- 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/index.js
CHANGED
|
@@ -1659,7 +1659,7 @@ init_connector_telemetry();
|
|
|
1659
1659
|
init_logging();
|
|
1660
1660
|
|
|
1661
1661
|
// src/utils/version.ts
|
|
1662
|
-
var VERSION = "2.4.
|
|
1662
|
+
var VERSION = "2.4.6-canary.0";
|
|
1663
1663
|
function getPackageVersion() {
|
|
1664
1664
|
return VERSION;
|
|
1665
1665
|
}
|
|
@@ -2306,27 +2306,17 @@ import { validateClientMetadataUrl } from "@modelcontextprotocol/client";
|
|
|
2306
2306
|
|
|
2307
2307
|
// src/auth/url.ts
|
|
2308
2308
|
function sanitizeUrl(raw) {
|
|
2309
|
-
const abort = () => {
|
|
2310
|
-
throw new Error(`Invalid url to pass to open(): ${raw}`);
|
|
2311
|
-
};
|
|
2312
2309
|
let url;
|
|
2313
2310
|
try {
|
|
2314
2311
|
url = new URL(raw);
|
|
2315
|
-
} catch
|
|
2316
|
-
|
|
2317
|
-
}
|
|
2318
|
-
if (url.protocol !== "
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
if (url.password) url.password = encodeURIComponent(url.password);
|
|
2322
|
-
url.pathname = url.pathname.slice(0, 1) + encodeURIComponent(url.pathname.slice(1)).replace(/%2f/gi, "/");
|
|
2323
|
-
url.search = url.search.slice(0, 1) + Array.from(url.searchParams.entries()).map(sanitizeParam).join("&");
|
|
2324
|
-
url.hash = url.hash.slice(0, 1) + encodeURIComponent(url.hash.slice(1));
|
|
2312
|
+
} catch {
|
|
2313
|
+
throw new Error(`Invalid url to pass to open(): ${raw}`);
|
|
2314
|
+
}
|
|
2315
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
2316
|
+
throw new Error(`Invalid url to pass to open(): ${raw}`);
|
|
2317
|
+
}
|
|
2325
2318
|
return url.href;
|
|
2326
2319
|
}
|
|
2327
|
-
function sanitizeParam([k, v]) {
|
|
2328
|
-
return `${encodeURIComponent(k)}${v.length > 0 ? `=${encodeURIComponent(v)}` : ""}`;
|
|
2329
|
-
}
|
|
2330
2320
|
|
|
2331
2321
|
// src/auth/session-store.ts
|
|
2332
2322
|
var OAuthSessionStore = class _OAuthSessionStore {
|