@smithery/sdk 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/dist/config.d.ts CHANGED
@@ -1 +1 @@
1
- export declare function createSmitheryUrl(baseUrl: string, config?: object): URL;
1
+ export declare function createSmitheryUrl(baseUrl: string, config?: object, apiKey?: string): URL;
package/dist/config.js CHANGED
@@ -1,4 +1,4 @@
1
- export function createSmitheryUrl(baseUrl, config) {
1
+ export function createSmitheryUrl(baseUrl, config, apiKey) {
2
2
  const url = new URL(baseUrl);
3
3
  if (config) {
4
4
  const param = typeof window !== "undefined"
@@ -6,5 +6,8 @@ export function createSmitheryUrl(baseUrl, config) {
6
6
  : Buffer.from(JSON.stringify(config)).toString("base64");
7
7
  url.searchParams.set("config", param);
8
8
  }
9
+ if (apiKey) {
10
+ url.searchParams.set("api_key", apiKey);
11
+ }
9
12
  return url;
10
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithery/sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Connect language models to Model Context Protocols",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",