@kadoa/mcp 0.3.6 → 0.3.7-rc.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/index.js +11 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49071,13 +49071,21 @@ function resolveApiKey(apiKey) {
|
|
|
49071
49071
|
return key;
|
|
49072
49072
|
}
|
|
49073
49073
|
function createKadoaClient(auth) {
|
|
49074
|
+
let client;
|
|
49074
49075
|
if (typeof auth === "object" && auth !== null) {
|
|
49075
49076
|
if ("jwt" in auth) {
|
|
49076
|
-
|
|
49077
|
+
client = new KadoaClient({ bearerToken: auth.jwt });
|
|
49078
|
+
} else {
|
|
49079
|
+
client = new KadoaClient({ apiKey: auth.apiKey });
|
|
49077
49080
|
}
|
|
49078
|
-
|
|
49081
|
+
} else {
|
|
49082
|
+
client = new KadoaClient({ apiKey: resolveApiKey(auth) });
|
|
49079
49083
|
}
|
|
49080
|
-
|
|
49084
|
+
client.axiosInstance.interceptors.request.use((config2) => {
|
|
49085
|
+
config2.headers["x-kadoa-source"] = "mcp";
|
|
49086
|
+
return config2;
|
|
49087
|
+
});
|
|
49088
|
+
return client;
|
|
49081
49089
|
}
|
|
49082
49090
|
var ctxRefreshMutex;
|
|
49083
49091
|
var init_client = __esm(() => {
|