@upstash/redis 1.16.1-rc.1 → 1.16.1-rc.2
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/esm/pkg/http.js +2 -3
- package/package.json +1 -1
- package/script/pkg/http.js +2 -3
- package/types/pkg/http.d.ts +1 -1
package/esm/pkg/http.js
CHANGED
|
@@ -84,7 +84,6 @@ export class HttpClient {
|
|
|
84
84
|
throw new UpstashError(body.error);
|
|
85
85
|
}
|
|
86
86
|
if (this.options?.responseEncoding === "base64") {
|
|
87
|
-
console.log("decoding base64");
|
|
88
87
|
return Array.isArray(body) ? body.map(decode) : decode(body);
|
|
89
88
|
}
|
|
90
89
|
return body;
|
|
@@ -105,14 +104,14 @@ function base64decode(b64) {
|
|
|
105
104
|
dec = new TextDecoder().decode(bytes);
|
|
106
105
|
}
|
|
107
106
|
catch (e) {
|
|
108
|
-
console.warn(`Unable to decode base64 [${
|
|
107
|
+
console.warn(`Unable to decode base64 [${b64}]: ${e.message}`);
|
|
109
108
|
return b64;
|
|
110
109
|
}
|
|
111
110
|
try {
|
|
112
111
|
return decodeURIComponent(dec);
|
|
113
112
|
}
|
|
114
113
|
catch (e) {
|
|
115
|
-
console.warn(`Unable to decode
|
|
114
|
+
console.warn(`Unable to decode URIComponent [${dec}]: ${e.message}`);
|
|
116
115
|
return dec;
|
|
117
116
|
}
|
|
118
117
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"main": "./script/platforms/nodejs.js",
|
|
4
4
|
"types": "./types/platforms/nodejs.d.ts",
|
|
5
5
|
"name": "@upstash/redis",
|
|
6
|
-
"version": "v1.16.1-rc.
|
|
6
|
+
"version": "v1.16.1-rc.2",
|
|
7
7
|
"description": "An HTTP/REST based Redis client built on top of Upstash REST API.",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
package/script/pkg/http.js
CHANGED
|
@@ -87,7 +87,6 @@ class HttpClient {
|
|
|
87
87
|
throw new error_js_1.UpstashError(body.error);
|
|
88
88
|
}
|
|
89
89
|
if (this.options?.responseEncoding === "base64") {
|
|
90
|
-
console.log("decoding base64");
|
|
91
90
|
return Array.isArray(body) ? body.map(decode) : decode(body);
|
|
92
91
|
}
|
|
93
92
|
return body;
|
|
@@ -109,14 +108,14 @@ function base64decode(b64) {
|
|
|
109
108
|
dec = new TextDecoder().decode(bytes);
|
|
110
109
|
}
|
|
111
110
|
catch (e) {
|
|
112
|
-
console.warn(`Unable to decode base64 [${
|
|
111
|
+
console.warn(`Unable to decode base64 [${b64}]: ${e.message}`);
|
|
113
112
|
return b64;
|
|
114
113
|
}
|
|
115
114
|
try {
|
|
116
115
|
return decodeURIComponent(dec);
|
|
117
116
|
}
|
|
118
117
|
catch (e) {
|
|
119
|
-
console.warn(`Unable to decode
|
|
118
|
+
console.warn(`Unable to decode URIComponent [${dec}]: ${e.message}`);
|
|
120
119
|
return dec;
|
|
121
120
|
}
|
|
122
121
|
}
|
package/types/pkg/http.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export declare type HttpClientConfig = {
|
|
|
71
71
|
export declare class HttpClient implements Requester {
|
|
72
72
|
baseUrl: string;
|
|
73
73
|
headers: Record<string, string>;
|
|
74
|
-
readonly options
|
|
74
|
+
readonly options: {
|
|
75
75
|
backend?: string;
|
|
76
76
|
agent: any;
|
|
77
77
|
responseEncoding?: false | "base64";
|