@upstash/redis 1.38.3 → 1.38.4

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.
@@ -136,6 +136,9 @@ var HttpClient = class {
136
136
  this.headers = merge(this.headers, "Upstash-Telemetry-Sdk", telemetry.sdk);
137
137
  }
138
138
  async request(req) {
139
+ if (this.readYourWrites) {
140
+ this.headers["upstash-sync-token"] = this.upstashSyncToken;
141
+ }
139
142
  const requestHeaders = mergeHeaders(this.headers, req.headers ?? {});
140
143
  const requestUrl = [this.baseUrl, ...req.path ?? []].join("/");
141
144
  const isEventStream = requestHeaders.Accept === "text/event-stream";
@@ -159,10 +162,6 @@ var HttpClient = class {
159
162
  "[Upstash Redis] Redis client was initialized without url or token. Failed to execute command."
160
163
  );
161
164
  }
162
- if (this.readYourWrites) {
163
- const newHeader = this.upstashSyncToken;
164
- this.headers["upstash-sync-token"] = newHeader;
165
- }
166
165
  let res = null;
167
166
  let error = null;
168
167
  for (let i = 0; i <= this.retry.attempts; i++) {
@@ -5431,7 +5430,7 @@ var Redis = class {
5431
5430
  };
5432
5431
 
5433
5432
  // version.ts
5434
- var VERSION = "v1.38.3";
5433
+ var VERSION = "v1.38.4";
5435
5434
 
5436
5435
  export {
5437
5436
  error_exports,
package/cloudflare.js CHANGED
@@ -157,6 +157,9 @@ var HttpClient = class {
157
157
  this.headers = merge(this.headers, "Upstash-Telemetry-Sdk", telemetry.sdk);
158
158
  }
159
159
  async request(req) {
160
+ if (this.readYourWrites) {
161
+ this.headers["upstash-sync-token"] = this.upstashSyncToken;
162
+ }
160
163
  const requestHeaders = mergeHeaders(this.headers, req.headers ?? {});
161
164
  const requestUrl = [this.baseUrl, ...req.path ?? []].join("/");
162
165
  const isEventStream = requestHeaders.Accept === "text/event-stream";
@@ -180,10 +183,6 @@ var HttpClient = class {
180
183
  "[Upstash Redis] Redis client was initialized without url or token. Failed to execute command."
181
184
  );
182
185
  }
183
- if (this.readYourWrites) {
184
- const newHeader = this.upstashSyncToken;
185
- this.headers["upstash-sync-token"] = newHeader;
186
- }
187
186
  let res = null;
188
187
  let error = null;
189
188
  for (let i = 0; i <= this.retry.attempts; i++) {
@@ -5452,7 +5451,7 @@ var Redis = class {
5452
5451
  };
5453
5452
 
5454
5453
  // version.ts
5455
- var VERSION = "v1.38.3";
5454
+ var VERSION = "v1.38.4";
5456
5455
 
5457
5456
  // platforms/cloudflare.ts
5458
5457
  var Redis2 = class _Redis extends Redis {
package/cloudflare.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Redis,
4
4
  VERSION,
5
5
  error_exports
6
- } from "./chunk-YQDELQHC.mjs";
6
+ } from "./chunk-2JFYL2VL.mjs";
7
7
 
8
8
  // platforms/cloudflare.ts
9
9
  var Redis2 = class _Redis extends Redis {
package/fastly.js CHANGED
@@ -157,6 +157,9 @@ var HttpClient = class {
157
157
  this.headers = merge(this.headers, "Upstash-Telemetry-Sdk", telemetry.sdk);
158
158
  }
159
159
  async request(req) {
160
+ if (this.readYourWrites) {
161
+ this.headers["upstash-sync-token"] = this.upstashSyncToken;
162
+ }
160
163
  const requestHeaders = mergeHeaders(this.headers, req.headers ?? {});
161
164
  const requestUrl = [this.baseUrl, ...req.path ?? []].join("/");
162
165
  const isEventStream = requestHeaders.Accept === "text/event-stream";
@@ -180,10 +183,6 @@ var HttpClient = class {
180
183
  "[Upstash Redis] Redis client was initialized without url or token. Failed to execute command."
181
184
  );
182
185
  }
183
- if (this.readYourWrites) {
184
- const newHeader = this.upstashSyncToken;
185
- this.headers["upstash-sync-token"] = newHeader;
186
- }
187
186
  let res = null;
188
187
  let error = null;
189
188
  for (let i = 0; i <= this.retry.attempts; i++) {
@@ -5452,7 +5451,7 @@ var Redis = class {
5452
5451
  };
5453
5452
 
5454
5453
  // version.ts
5455
- var VERSION = "v1.38.3";
5454
+ var VERSION = "v1.38.4";
5456
5455
 
5457
5456
  // platforms/fastly.ts
5458
5457
  var Redis2 = class extends Redis {
package/fastly.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Redis,
4
4
  VERSION,
5
5
  error_exports
6
- } from "./chunk-YQDELQHC.mjs";
6
+ } from "./chunk-2JFYL2VL.mjs";
7
7
 
8
8
  // platforms/fastly.ts
9
9
  var Redis2 = class extends Redis {
package/nodejs.js CHANGED
@@ -159,6 +159,9 @@ var HttpClient = class {
159
159
  this.headers = merge(this.headers, "Upstash-Telemetry-Sdk", telemetry.sdk);
160
160
  }
161
161
  async request(req) {
162
+ if (this.readYourWrites) {
163
+ this.headers["upstash-sync-token"] = this.upstashSyncToken;
164
+ }
162
165
  const requestHeaders = mergeHeaders(this.headers, req.headers ?? {});
163
166
  const requestUrl = [this.baseUrl, ...req.path ?? []].join("/");
164
167
  const isEventStream = requestHeaders.Accept === "text/event-stream";
@@ -182,10 +185,6 @@ var HttpClient = class {
182
185
  "[Upstash Redis] Redis client was initialized without url or token. Failed to execute command."
183
186
  );
184
187
  }
185
- if (this.readYourWrites) {
186
- const newHeader = this.upstashSyncToken;
187
- this.headers["upstash-sync-token"] = newHeader;
188
- }
189
188
  let res = null;
190
189
  let error = null;
191
190
  for (let i = 0; i <= this.retry.attempts; i++) {
@@ -5454,7 +5453,7 @@ var Redis = class {
5454
5453
  };
5455
5454
 
5456
5455
  // version.ts
5457
- var VERSION = "v1.38.3";
5456
+ var VERSION = "v1.38.4";
5458
5457
 
5459
5458
  // pkg/commands/search/schema-builder.ts
5460
5459
  var BUILD = /* @__PURE__ */ Symbol("build");
package/nodejs.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  SearchIndex,
5
5
  VERSION,
6
6
  error_exports
7
- } from "./chunk-YQDELQHC.mjs";
7
+ } from "./chunk-2JFYL2VL.mjs";
8
8
 
9
9
  // pkg/commands/search/schema-builder.ts
10
10
  var BUILD = /* @__PURE__ */ Symbol("build");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upstash/redis",
3
- "version": "1.38.3",
3
+ "version": "1.38.4",
4
4
  "main": "./nodejs.js",
5
5
  "module": "./nodejs.mjs",
6
6
  "types": "./nodejs.d.ts",