@upstash/redis 1.38.0 → 1.38.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-2X4SLXT7.mjs → chunk-S6LIPXJD.mjs} +1 -1
- package/cloudflare.js +11 -6
- package/cloudflare.mjs +11 -6
- package/fastly.js +3 -3
- package/fastly.mjs +3 -3
- package/nodejs.js +7 -5
- package/nodejs.mjs +7 -5
- package/package.json +1 -1
package/cloudflare.js
CHANGED
|
@@ -5442,7 +5442,7 @@ var Redis = class {
|
|
|
5442
5442
|
};
|
|
5443
5443
|
|
|
5444
5444
|
// version.ts
|
|
5445
|
-
var VERSION = "v1.38.
|
|
5445
|
+
var VERSION = "v1.38.1";
|
|
5446
5446
|
|
|
5447
5447
|
// platforms/cloudflare.ts
|
|
5448
5448
|
var Redis2 = class _Redis extends Redis {
|
|
@@ -5460,7 +5460,7 @@ var Redis2 = class _Redis extends Redis {
|
|
|
5460
5460
|
constructor(config, env) {
|
|
5461
5461
|
if (!config.url) {
|
|
5462
5462
|
console.warn(
|
|
5463
|
-
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config
|
|
5463
|
+
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
5464
5464
|
);
|
|
5465
5465
|
} else if (config.url.startsWith(" ") || config.url.endsWith(" ") || /\r|\n/.test(config.url)) {
|
|
5466
5466
|
console.warn(
|
|
@@ -5469,7 +5469,7 @@ var Redis2 = class _Redis extends Redis {
|
|
|
5469
5469
|
}
|
|
5470
5470
|
if (!config.token) {
|
|
5471
5471
|
console.warn(
|
|
5472
|
-
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config
|
|
5472
|
+
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
5473
5473
|
);
|
|
5474
5474
|
} else if (config.token.startsWith(" ") || config.token.endsWith(" ") || /\r|\n/.test(config.token)) {
|
|
5475
5475
|
console.warn(
|
|
@@ -5521,10 +5521,15 @@ var Redis2 = class _Redis extends Redis {
|
|
|
5521
5521
|
// @ts-expect-error These will be defined by cloudflare
|
|
5522
5522
|
UPSTASH_REDIS_REST_TOKEN
|
|
5523
5523
|
) : void 0);
|
|
5524
|
-
const
|
|
5525
|
-
if (
|
|
5524
|
+
const missing = [];
|
|
5525
|
+
if (!url) missing.push("UPSTASH_REDIS_REST_URL");
|
|
5526
|
+
if (!token) missing.push("UPSTASH_REDIS_REST_TOKEN");
|
|
5527
|
+
if (missing.length > 0) {
|
|
5528
|
+
const plural = missing.length > 1;
|
|
5529
|
+
const names = missing.map((name) => `\`${name}\``).join(" and ");
|
|
5530
|
+
const commands = missing.map((name) => `\`wrangler secret put ${name}\``).join(" and ");
|
|
5526
5531
|
console.warn(
|
|
5527
|
-
`[Upstash Redis] ${
|
|
5532
|
+
`[Upstash Redis] Unable to find environment variable${plural ? "s" : ""}: ${names}. Please add ${plural ? "them" : "it"} via ${commands} and provide ${plural ? "them as arguments" : "it as an argument"} to the \`Redis.fromEnv\` function. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
5528
5533
|
);
|
|
5529
5534
|
}
|
|
5530
5535
|
return new _Redis({ ...opts, url, token }, env);
|
package/cloudflare.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
Redis,
|
|
4
4
|
VERSION,
|
|
5
5
|
error_exports
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S6LIPXJD.mjs";
|
|
7
7
|
|
|
8
8
|
// platforms/cloudflare.ts
|
|
9
9
|
var Redis2 = class _Redis extends Redis {
|
|
@@ -21,7 +21,7 @@ var Redis2 = class _Redis extends Redis {
|
|
|
21
21
|
constructor(config, env) {
|
|
22
22
|
if (!config.url) {
|
|
23
23
|
console.warn(
|
|
24
|
-
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config
|
|
24
|
+
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
25
25
|
);
|
|
26
26
|
} else if (config.url.startsWith(" ") || config.url.endsWith(" ") || /\r|\n/.test(config.url)) {
|
|
27
27
|
console.warn(
|
|
@@ -30,7 +30,7 @@ var Redis2 = class _Redis extends Redis {
|
|
|
30
30
|
}
|
|
31
31
|
if (!config.token) {
|
|
32
32
|
console.warn(
|
|
33
|
-
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config
|
|
33
|
+
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
34
34
|
);
|
|
35
35
|
} else if (config.token.startsWith(" ") || config.token.endsWith(" ") || /\r|\n/.test(config.token)) {
|
|
36
36
|
console.warn(
|
|
@@ -82,10 +82,15 @@ var Redis2 = class _Redis extends Redis {
|
|
|
82
82
|
// @ts-expect-error These will be defined by cloudflare
|
|
83
83
|
UPSTASH_REDIS_REST_TOKEN
|
|
84
84
|
) : void 0);
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
85
|
+
const missing = [];
|
|
86
|
+
if (!url) missing.push("UPSTASH_REDIS_REST_URL");
|
|
87
|
+
if (!token) missing.push("UPSTASH_REDIS_REST_TOKEN");
|
|
88
|
+
if (missing.length > 0) {
|
|
89
|
+
const plural = missing.length > 1;
|
|
90
|
+
const names = missing.map((name) => `\`${name}\``).join(" and ");
|
|
91
|
+
const commands = missing.map((name) => `\`wrangler secret put ${name}\``).join(" and ");
|
|
87
92
|
console.warn(
|
|
88
|
-
`[Upstash Redis] ${
|
|
93
|
+
`[Upstash Redis] Unable to find environment variable${plural ? "s" : ""}: ${names}. Please add ${plural ? "them" : "it"} via ${commands} and provide ${plural ? "them as arguments" : "it as an argument"} to the \`Redis.fromEnv\` function. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
89
94
|
);
|
|
90
95
|
}
|
|
91
96
|
return new _Redis({ ...opts, url, token }, env);
|
package/fastly.js
CHANGED
|
@@ -5442,7 +5442,7 @@ var Redis = class {
|
|
|
5442
5442
|
};
|
|
5443
5443
|
|
|
5444
5444
|
// version.ts
|
|
5445
|
-
var VERSION = "v1.38.
|
|
5445
|
+
var VERSION = "v1.38.1";
|
|
5446
5446
|
|
|
5447
5447
|
// platforms/fastly.ts
|
|
5448
5448
|
var Redis2 = class extends Redis {
|
|
@@ -5461,7 +5461,7 @@ var Redis2 = class extends Redis {
|
|
|
5461
5461
|
constructor(config) {
|
|
5462
5462
|
if (!config.url) {
|
|
5463
5463
|
console.warn(
|
|
5464
|
-
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config
|
|
5464
|
+
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
5465
5465
|
);
|
|
5466
5466
|
} else if (config.url.startsWith(" ") || config.url.endsWith(" ") || /\r|\n/.test(config.url)) {
|
|
5467
5467
|
console.warn(
|
|
@@ -5470,7 +5470,7 @@ var Redis2 = class extends Redis {
|
|
|
5470
5470
|
}
|
|
5471
5471
|
if (!config.token) {
|
|
5472
5472
|
console.warn(
|
|
5473
|
-
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config
|
|
5473
|
+
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
5474
5474
|
);
|
|
5475
5475
|
} else if (config.token.startsWith(" ") || config.token.endsWith(" ") || /\r|\n/.test(config.token)) {
|
|
5476
5476
|
console.warn(
|
package/fastly.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
Redis,
|
|
4
4
|
VERSION,
|
|
5
5
|
error_exports
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S6LIPXJD.mjs";
|
|
7
7
|
|
|
8
8
|
// platforms/fastly.ts
|
|
9
9
|
var Redis2 = class extends Redis {
|
|
@@ -22,7 +22,7 @@ var Redis2 = class extends Redis {
|
|
|
22
22
|
constructor(config) {
|
|
23
23
|
if (!config.url) {
|
|
24
24
|
console.warn(
|
|
25
|
-
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config
|
|
25
|
+
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
26
26
|
);
|
|
27
27
|
} else if (config.url.startsWith(" ") || config.url.endsWith(" ") || /\r|\n/.test(config.url)) {
|
|
28
28
|
console.warn(
|
|
@@ -31,7 +31,7 @@ var Redis2 = class extends Redis {
|
|
|
31
31
|
}
|
|
32
32
|
if (!config.token) {
|
|
33
33
|
console.warn(
|
|
34
|
-
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config
|
|
34
|
+
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
35
35
|
);
|
|
36
36
|
} else if (config.token.startsWith(" ") || config.token.endsWith(" ") || /\r|\n/.test(config.token)) {
|
|
37
37
|
console.warn(
|
package/nodejs.js
CHANGED
|
@@ -5444,7 +5444,7 @@ var Redis = class {
|
|
|
5444
5444
|
};
|
|
5445
5445
|
|
|
5446
5446
|
// version.ts
|
|
5447
|
-
var VERSION = "v1.38.
|
|
5447
|
+
var VERSION = "v1.38.1";
|
|
5448
5448
|
|
|
5449
5449
|
// pkg/commands/search/schema-builder.ts
|
|
5450
5450
|
var BUILD = /* @__PURE__ */ Symbol("build");
|
|
@@ -5643,7 +5643,7 @@ var Redis2 = class _Redis extends Redis {
|
|
|
5643
5643
|
}
|
|
5644
5644
|
if (!configOrRequester.url) {
|
|
5645
5645
|
console.warn(
|
|
5646
|
-
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config
|
|
5646
|
+
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
5647
5647
|
);
|
|
5648
5648
|
} else if (configOrRequester.url.startsWith(" ") || configOrRequester.url.endsWith(" ") || /\r|\n/.test(configOrRequester.url)) {
|
|
5649
5649
|
console.warn(
|
|
@@ -5652,7 +5652,7 @@ var Redis2 = class _Redis extends Redis {
|
|
|
5652
5652
|
}
|
|
5653
5653
|
if (!configOrRequester.token) {
|
|
5654
5654
|
console.warn(
|
|
5655
|
-
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config
|
|
5655
|
+
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
5656
5656
|
);
|
|
5657
5657
|
} else if (configOrRequester.token.startsWith(" ") || configOrRequester.token.endsWith(" ") || /\r|\n/.test(configOrRequester.token)) {
|
|
5658
5658
|
console.warn(
|
|
@@ -5711,12 +5711,14 @@ var Redis2 = class _Redis extends Redis {
|
|
|
5711
5711
|
}
|
|
5712
5712
|
const url = process.env.UPSTASH_REDIS_REST_URL || process.env.KV_REST_API_URL;
|
|
5713
5713
|
if (!url) {
|
|
5714
|
-
console.warn(
|
|
5714
|
+
console.warn(
|
|
5715
|
+
"[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis"
|
|
5716
|
+
);
|
|
5715
5717
|
}
|
|
5716
5718
|
const token = process.env.UPSTASH_REDIS_REST_TOKEN || process.env.KV_REST_API_TOKEN;
|
|
5717
5719
|
if (!token) {
|
|
5718
5720
|
console.warn(
|
|
5719
|
-
"[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN
|
|
5721
|
+
"[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis"
|
|
5720
5722
|
);
|
|
5721
5723
|
}
|
|
5722
5724
|
return new _Redis({ ...config, url, token });
|
package/nodejs.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
SearchIndex,
|
|
5
5
|
VERSION,
|
|
6
6
|
error_exports
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-S6LIPXJD.mjs";
|
|
8
8
|
|
|
9
9
|
// pkg/commands/search/schema-builder.ts
|
|
10
10
|
var BUILD = /* @__PURE__ */ Symbol("build");
|
|
@@ -203,7 +203,7 @@ var Redis2 = class _Redis extends Redis {
|
|
|
203
203
|
}
|
|
204
204
|
if (!configOrRequester.url) {
|
|
205
205
|
console.warn(
|
|
206
|
-
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config
|
|
206
|
+
`[Upstash Redis] The 'url' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
207
207
|
);
|
|
208
208
|
} else if (configOrRequester.url.startsWith(" ") || configOrRequester.url.endsWith(" ") || /\r|\n/.test(configOrRequester.url)) {
|
|
209
209
|
console.warn(
|
|
@@ -212,7 +212,7 @@ var Redis2 = class _Redis extends Redis {
|
|
|
212
212
|
}
|
|
213
213
|
if (!configOrRequester.token) {
|
|
214
214
|
console.warn(
|
|
215
|
-
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config
|
|
215
|
+
`[Upstash Redis] The 'token' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`
|
|
216
216
|
);
|
|
217
217
|
} else if (configOrRequester.token.startsWith(" ") || configOrRequester.token.endsWith(" ") || /\r|\n/.test(configOrRequester.token)) {
|
|
218
218
|
console.warn(
|
|
@@ -271,12 +271,14 @@ var Redis2 = class _Redis extends Redis {
|
|
|
271
271
|
}
|
|
272
272
|
const url = process.env.UPSTASH_REDIS_REST_URL || process.env.KV_REST_API_URL;
|
|
273
273
|
if (!url) {
|
|
274
|
-
console.warn(
|
|
274
|
+
console.warn(
|
|
275
|
+
"[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis"
|
|
276
|
+
);
|
|
275
277
|
}
|
|
276
278
|
const token = process.env.UPSTASH_REDIS_REST_TOKEN || process.env.KV_REST_API_TOKEN;
|
|
277
279
|
if (!token) {
|
|
278
280
|
console.warn(
|
|
279
|
-
"[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN
|
|
281
|
+
"[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis"
|
|
280
282
|
);
|
|
281
283
|
}
|
|
282
284
|
return new _Redis({ ...config, url, token });
|