Skip to content

Commit

Permalink
support node 15
Browse files Browse the repository at this point in the history
  • Loading branch information
ytkimirti committed Jan 7, 2025
1 parent 87d2664 commit 55e8be4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@modelcontextprotocol/sdk": "^1.0.3",
"chalk": "^5.3.0",
"dotenv": "^16.4.7",
"node-fetch": "^3.3.2",
"zod": "^3.24.1",
"zod-to-json-schema": "^3.24.1"
}
Expand Down
5 changes: 4 additions & 1 deletion src/http.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { config } from "./config";
import { log } from "./log";
import { applyMiddlewares } from "./middlewares";
import fetch from "node-fetch";

export type UpstashRequest = {
method: string;
Expand Down Expand Up @@ -54,11 +55,13 @@ class HttpClient {
}

const url = [this.baseUrl, ...req.path].join("/");
const token = [config.email, config.apiKey].join(":");

const init: RequestInit = {
method: req.method,
headers: {
"Content-Type": "application/json",
Authorization: `Basic ${btoa([config.email, config.apiKey].join(":"))}`,
Authorization: `Basic ${Buffer.from(token).toString("base64")}`,
},
};

Expand Down
1 change: 1 addition & 0 deletions src/tools/redis/command.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { z } from "zod";
import { json, tool } from "..";
import { log } from "../../log";
import fetch from "node-fetch";

type RedisCommandResult =
| {
Expand Down

0 comments on commit 55e8be4

Please sign in to comment.