File tree 5 files changed +6
-5
lines changed
5 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,10 @@ jobs:
35
35
36
36
- name : Publish
37
37
if : " !github.event.release.prerelease"
38
- working-directory : ./dist
39
38
run : |
40
- npm pkg delete scripts.prepare
41
39
npm publish --access public
42
40
43
41
- name : Publish release candidate
44
42
if : " github.event.release.prerelease"
45
- working-directory : ./dist
46
43
run : |
47
- npm pkg delete scripts.prepare
48
44
npm publish --access public --tag=canary
Original file line number Diff line number Diff line change 40
40
"@modelcontextprotocol/sdk" : " ^1.0.3" ,
41
41
"chalk" : " ^5.3.0" ,
42
42
"dotenv" : " ^16.4.7" ,
43
+ "node-fetch" : " ^3.3.2" ,
43
44
"zod" : " ^3.24.1" ,
44
45
"zod-to-json-schema" : " ^3.24.1"
45
46
}
Original file line number Diff line number Diff line change 1
1
import { config } from "./config" ;
2
2
import { log } from "./log" ;
3
3
import { applyMiddlewares } from "./middlewares" ;
4
+ import fetch from "node-fetch" ;
4
5
5
6
export type UpstashRequest = {
6
7
method : string ;
@@ -54,11 +55,13 @@ class HttpClient {
54
55
}
55
56
56
57
const url = [ this . baseUrl , ...req . path ] . join ( "/" ) ;
58
+ const token = [ config . email , config . apiKey ] . join ( ":" ) ;
59
+
57
60
const init : RequestInit = {
58
61
method : req . method ,
59
62
headers : {
60
63
"Content-Type" : "application/json" ,
61
- Authorization : `Basic ${ btoa ( [ config . email , config . apiKey ] . join ( ":" ) ) } ` ,
64
+ Authorization : `Basic ${ Buffer . from ( token ) . toString ( "base64" ) } ` ,
62
65
} ,
63
66
} ;
64
67
Original file line number Diff line number Diff line change 1
1
import { z } from "zod" ;
2
2
import { json , tool } from ".." ;
3
3
import { log } from "../../log" ;
4
+ import fetch from "node-fetch" ;
4
5
5
6
type RedisCommandResult =
6
7
| {
You can’t perform that action at this time.
0 commit comments