@upstash/redis 1.36.0 → 1.36.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/{chunk-4AG3JMXU.mjs → chunk-LLI2WIYN.mjs} +9 -3
- package/cloudflare.js +9 -3
- package/cloudflare.mjs +1 -1
- package/fastly.js +9 -3
- package/fastly.mjs +1 -1
- package/nodejs.js +9 -3
- package/nodejs.mjs +1 -1
- package/package.json +1 -1
|
@@ -88,6 +88,7 @@ function kvArrayToObject(v) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// pkg/http.ts
|
|
91
|
+
var MAX_BUFFER_SIZE = 1024 * 1024;
|
|
91
92
|
var HttpClient = class {
|
|
92
93
|
baseUrl;
|
|
93
94
|
headers;
|
|
@@ -211,11 +212,16 @@ var HttpClient = class {
|
|
|
211
212
|
const decoder = new TextDecoder();
|
|
212
213
|
(async () => {
|
|
213
214
|
try {
|
|
215
|
+
let buffer = "";
|
|
214
216
|
while (true) {
|
|
215
217
|
const { value, done } = await reader.read();
|
|
216
218
|
if (done) break;
|
|
217
|
-
|
|
218
|
-
const lines =
|
|
219
|
+
buffer += decoder.decode(value, { stream: true });
|
|
220
|
+
const lines = buffer.split("\n");
|
|
221
|
+
buffer = lines.pop() || "";
|
|
222
|
+
if (buffer.length > MAX_BUFFER_SIZE) {
|
|
223
|
+
throw new Error("Buffer size exceeded (1MB)");
|
|
224
|
+
}
|
|
219
225
|
for (const line of lines) {
|
|
220
226
|
if (line.startsWith("data: ")) {
|
|
221
227
|
const data = line.slice(6);
|
|
@@ -4683,7 +4689,7 @@ var Redis = class {
|
|
|
4683
4689
|
};
|
|
4684
4690
|
|
|
4685
4691
|
// version.ts
|
|
4686
|
-
var VERSION = "v1.36.
|
|
4692
|
+
var VERSION = "v1.36.1";
|
|
4687
4693
|
|
|
4688
4694
|
export {
|
|
4689
4695
|
error_exports,
|
package/cloudflare.js
CHANGED
|
@@ -109,6 +109,7 @@ function kvArrayToObject(v) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// pkg/http.ts
|
|
112
|
+
var MAX_BUFFER_SIZE = 1024 * 1024;
|
|
112
113
|
var HttpClient = class {
|
|
113
114
|
baseUrl;
|
|
114
115
|
headers;
|
|
@@ -232,11 +233,16 @@ var HttpClient = class {
|
|
|
232
233
|
const decoder = new TextDecoder();
|
|
233
234
|
(async () => {
|
|
234
235
|
try {
|
|
236
|
+
let buffer = "";
|
|
235
237
|
while (true) {
|
|
236
238
|
const { value, done } = await reader.read();
|
|
237
239
|
if (done) break;
|
|
238
|
-
|
|
239
|
-
const lines =
|
|
240
|
+
buffer += decoder.decode(value, { stream: true });
|
|
241
|
+
const lines = buffer.split("\n");
|
|
242
|
+
buffer = lines.pop() || "";
|
|
243
|
+
if (buffer.length > MAX_BUFFER_SIZE) {
|
|
244
|
+
throw new Error("Buffer size exceeded (1MB)");
|
|
245
|
+
}
|
|
240
246
|
for (const line of lines) {
|
|
241
247
|
if (line.startsWith("data: ")) {
|
|
242
248
|
const data = line.slice(6);
|
|
@@ -4704,7 +4710,7 @@ var Redis = class {
|
|
|
4704
4710
|
};
|
|
4705
4711
|
|
|
4706
4712
|
// version.ts
|
|
4707
|
-
var VERSION = "v1.36.
|
|
4713
|
+
var VERSION = "v1.36.1";
|
|
4708
4714
|
|
|
4709
4715
|
// platforms/cloudflare.ts
|
|
4710
4716
|
var Redis2 = class _Redis extends Redis {
|
package/cloudflare.mjs
CHANGED
package/fastly.js
CHANGED
|
@@ -109,6 +109,7 @@ function kvArrayToObject(v) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// pkg/http.ts
|
|
112
|
+
var MAX_BUFFER_SIZE = 1024 * 1024;
|
|
112
113
|
var HttpClient = class {
|
|
113
114
|
baseUrl;
|
|
114
115
|
headers;
|
|
@@ -232,11 +233,16 @@ var HttpClient = class {
|
|
|
232
233
|
const decoder = new TextDecoder();
|
|
233
234
|
(async () => {
|
|
234
235
|
try {
|
|
236
|
+
let buffer = "";
|
|
235
237
|
while (true) {
|
|
236
238
|
const { value, done } = await reader.read();
|
|
237
239
|
if (done) break;
|
|
238
|
-
|
|
239
|
-
const lines =
|
|
240
|
+
buffer += decoder.decode(value, { stream: true });
|
|
241
|
+
const lines = buffer.split("\n");
|
|
242
|
+
buffer = lines.pop() || "";
|
|
243
|
+
if (buffer.length > MAX_BUFFER_SIZE) {
|
|
244
|
+
throw new Error("Buffer size exceeded (1MB)");
|
|
245
|
+
}
|
|
240
246
|
for (const line of lines) {
|
|
241
247
|
if (line.startsWith("data: ")) {
|
|
242
248
|
const data = line.slice(6);
|
|
@@ -4704,7 +4710,7 @@ var Redis = class {
|
|
|
4704
4710
|
};
|
|
4705
4711
|
|
|
4706
4712
|
// version.ts
|
|
4707
|
-
var VERSION = "v1.36.
|
|
4713
|
+
var VERSION = "v1.36.1";
|
|
4708
4714
|
|
|
4709
4715
|
// platforms/fastly.ts
|
|
4710
4716
|
var Redis2 = class extends Redis {
|
package/fastly.mjs
CHANGED
package/nodejs.js
CHANGED
|
@@ -109,6 +109,7 @@ function kvArrayToObject(v) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// pkg/http.ts
|
|
112
|
+
var MAX_BUFFER_SIZE = 1024 * 1024;
|
|
112
113
|
var HttpClient = class {
|
|
113
114
|
baseUrl;
|
|
114
115
|
headers;
|
|
@@ -232,11 +233,16 @@ var HttpClient = class {
|
|
|
232
233
|
const decoder = new TextDecoder();
|
|
233
234
|
(async () => {
|
|
234
235
|
try {
|
|
236
|
+
let buffer = "";
|
|
235
237
|
while (true) {
|
|
236
238
|
const { value, done } = await reader.read();
|
|
237
239
|
if (done) break;
|
|
238
|
-
|
|
239
|
-
const lines =
|
|
240
|
+
buffer += decoder.decode(value, { stream: true });
|
|
241
|
+
const lines = buffer.split("\n");
|
|
242
|
+
buffer = lines.pop() || "";
|
|
243
|
+
if (buffer.length > MAX_BUFFER_SIZE) {
|
|
244
|
+
throw new Error("Buffer size exceeded (1MB)");
|
|
245
|
+
}
|
|
240
246
|
for (const line of lines) {
|
|
241
247
|
if (line.startsWith("data: ")) {
|
|
242
248
|
const data = line.slice(6);
|
|
@@ -4704,7 +4710,7 @@ var Redis = class {
|
|
|
4704
4710
|
};
|
|
4705
4711
|
|
|
4706
4712
|
// version.ts
|
|
4707
|
-
var VERSION = "v1.36.
|
|
4713
|
+
var VERSION = "v1.36.1";
|
|
4708
4714
|
|
|
4709
4715
|
// platforms/nodejs.ts
|
|
4710
4716
|
if (typeof atob === "undefined") {
|
package/nodejs.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@upstash/redis","version":"v1.36.
|
|
1
|
+
{"name":"@upstash/redis","version":"v1.36.1","main":"./nodejs.js","module":"./nodejs.mjs","types":"./nodejs.d.ts","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.mjs":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.mjs":{"import":"./fastly.mjs","require":"./fastly.js"}},"description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./*"],"scripts":{"build":"tsup && cp package.json README.md LICENSE dist/","test":"bun test pkg","fmt":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","lint":"eslint \"**/*.{js,ts,tsx}\" --quiet --fix","format":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","format:check":"prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"","lint:fix":"eslint . -c .ts,.tsx,.js,.jsx --fix","commit":"cz","lint:format":"bun run lint:fix && bun run format","check-exports":"bun run build && cd dist && attw -P"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","devDependencies":{"@biomejs/biome":"latest","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0","bun-types":"1.0.33","eslint":"9.10.0","eslint-plugin-unicorn":"55.0.0","husky":"^9.1.1","prettier":"^3.3.3","tsup":"^8.2.3","typescript":"latest"},"dependencies":{"uncrypto":"^0.1.3"}}
|