@mcp-use/client 2.4.5-canary.1 → 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.
@@ -1979,7 +1979,7 @@ var HttpConnector = class extends BaseConnector {
1979
1979
  };
1980
1980
 
1981
1981
  // src/utils/version.ts
1982
- var VERSION = "2.4.5-canary.1";
1982
+ var VERSION = "2.4.6-canary.0";
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
- abort();
2248
- }
2249
- if (url.protocol !== "https:" && url.protocol !== "http:") abort();
2250
- if (url.hostname !== encodeURIComponent(url.hostname)) abort();
2251
- if (url.username) url.username = encodeURIComponent(url.username);
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 {