Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dx 1537: Add support for node15 #2

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@ jobs:

- name: Publish
if: "!github.event.release.prerelease"
working-directory: ./dist
run: |
npm pkg delete scripts.prepare
npm publish --access public

- name: Publish release candidate
if: "github.event.release.prerelease"
working-directory: ./dist
run: |
npm pkg delete scripts.prepare
npm publish --access public --tag=canary
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
Loading