@upstash/redis 0.0.0-ci.fe7ec0544f213f3f58bb19e23dfafafab828c00c-20241107145222 → 0.0.0-ci.ff91bb10adb82f9d009471b11db70c40b6dbf5f8-20251205205412

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/nodejs.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Redis,
4
4
  VERSION,
5
5
  error_exports
6
- } from "./chunk-VQ5Q3VDK.mjs";
6
+ } from "./chunk-WTYE7OV3.mjs";
7
7
 
8
8
  // platforms/nodejs.ts
9
9
  if (typeof atob === "undefined") {
@@ -63,7 +63,7 @@ var Redis2 = class _Redis extends Redis {
63
63
  });
64
64
  super(client, {
65
65
  automaticDeserialization: configOrRequester.automaticDeserialization,
66
- enableTelemetry: !process.env.UPSTASH_DISABLE_TELEMETRY,
66
+ enableTelemetry: configOrRequester.enableTelemetry ?? !process.env.UPSTASH_DISABLE_TELEMETRY,
67
67
  latencyLogging: configOrRequester.latencyLogging,
68
68
  enableAutoPipelining: configOrRequester.enableAutoPipelining
69
69
  });
@@ -72,7 +72,7 @@ var Redis2 = class _Redis extends Redis {
72
72
  // @ts-expect-error to silence compiler
73
73
  typeof EdgeRuntime === "string" ? "edge-light" : `node@${process.version}`
74
74
  ),
75
- platform: process.env.VERCEL ? "vercel" : process.env.AWS_REGION ? "aws" : "unknown",
75
+ platform: process.env.UPSTASH_CONSOLE ? "console" : process.env.VERCEL ? "vercel" : process.env.AWS_REGION ? "aws" : "unknown",
76
76
  sdk: `@upstash/redis@${VERSION}`
77
77
  });
78
78
  if (this.enableAutoPipelining) {
@@ -85,8 +85,12 @@ var Redis2 = class _Redis extends Redis {
85
85
  * Use this to automatically load connection secrets from your environment
86
86
  * variables. For instance when using the Vercel integration.
87
87
  *
88
- * This tries to load `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` from
89
- * your environment using `process.env`.
88
+ * This tries to load connection details from your environment using `process.env`:
89
+ * - URL: `UPSTASH_REDIS_REST_URL` or fallback to `KV_REST_API_URL`
90
+ * - Token: `UPSTASH_REDIS_REST_TOKEN` or fallback to `KV_REST_API_TOKEN`
91
+ *
92
+ * The fallback variables provide compatibility with Vercel KV and other platforms
93
+ * that may use different naming conventions.
90
94
  */
91
95
  static fromEnv(config) {
92
96
  if (process.env === void 0) {
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@upstash/redis","version":"v0.0.0-ci.fe7ec0544f213f3f58bb19e23dfafafab828c00c-20241107145222","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","@types/crypto-js":"^4.1.3","@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":{"crypto-js":"^4.2.0"}}
1
+ {"name":"@upstash/redis","version":"v0.0.0-ci.ff91bb10adb82f9d009471b11db70c40b6dbf5f8-20251205205412","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"}}