@upstash/react-redis-browser 0.2.17 → 0.2.18
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/dist/index.js +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8581,7 +8581,11 @@ var QueryWizardPopover = ({ onClose }) => {
|
|
|
8581
8581
|
const data = await redis.json.get(key);
|
|
8582
8582
|
return { key, data };
|
|
8583
8583
|
} else if (index.dataType === "hash") {
|
|
8584
|
-
const
|
|
8584
|
+
const raw = await redis.hgetall(key);
|
|
8585
|
+
const data = Array.isArray(raw) ? raw.reduce((obj, value, i, arr) => {
|
|
8586
|
+
if (i % 2 === 0) obj[String(value)] = arr[i + 1];
|
|
8587
|
+
return obj;
|
|
8588
|
+
}, {}) : raw;
|
|
8585
8589
|
return { key, data };
|
|
8586
8590
|
} else {
|
|
8587
8591
|
const data = await redis.get(key);
|
package/dist/index.mjs
CHANGED
|
@@ -8581,7 +8581,11 @@ var QueryWizardPopover = ({ onClose }) => {
|
|
|
8581
8581
|
const data = await redis.json.get(key);
|
|
8582
8582
|
return { key, data };
|
|
8583
8583
|
} else if (index.dataType === "hash") {
|
|
8584
|
-
const
|
|
8584
|
+
const raw = await redis.hgetall(key);
|
|
8585
|
+
const data = Array.isArray(raw) ? raw.reduce((obj, value, i, arr) => {
|
|
8586
|
+
if (i % 2 === 0) obj[String(value)] = arr[i + 1];
|
|
8587
|
+
return obj;
|
|
8588
|
+
}, {}) : raw;
|
|
8585
8589
|
return { key, data };
|
|
8586
8590
|
} else {
|
|
8587
8591
|
const data = await redis.get(key);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@upstash/react-redis-browser", "version": "0.2.
|
|
1
|
+
{ "name": "@upstash/react-redis-browser", "version": "0.2.18", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", "private": false, "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "git@github.com:upstash/react-redis-browser.git" }, "bugs": { "url": "https://github.com/upstash/react-redis-browser/issues" }, "homepage": "https://github.com/upstash/react-redis-browser", "files": [ "./dist/**" ], "scripts": { "build": "tsup", "dev": "vite", "lint": "tsc && eslint", "fmt": "prettier --write ./src", "test": "bun test src", "test:e2e": "playwright test", "prepare": "husky" }, "lint-staged": { "**/*.{js,ts,tsx}": [ "prettier --write", "eslint --fix" ] }, "dependencies": { "@dnd-kit/core": "^6.3.1", "@dnd-kit/modifiers": "^9.0.0", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@ianvs/prettier-plugin-sort-imports": "^4.7.1", "@monaco-editor/react": "^4.6.0", "@radix-ui/react-context-menu": "^2.2.16", "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-label": "^2.1.8", "@radix-ui/react-popover": "^1.1.15", "@radix-ui/react-portal": "^1.1.10", "@radix-ui/react-progress": "^1.1.8", "@radix-ui/react-scroll-area": "^1.2.10", "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-separator": "^1.1.8", "@radix-ui/react-slot": "^1.2.4", "@radix-ui/react-switch": "^1.2.6", "@radix-ui/react-toast": "^1.2.15", "@radix-ui/react-tooltip": "^1.2.8", "@tabler/icons-react": "^3.19.0", "@tanstack/react-query": "^5.32.0", "@types/bytes": "^3.1.4", "@upstash/redis": "1.37.0", "bytes": "^3.1.2", "cmdk": "^1.1.1", "react-hook-form": "^7.53.0", "react-resizable-panels": "^2.1.4", "zustand": "5.0.0" }, "devDependencies": { "@playwright/test": "^1.56.1", "@types/bun": "^1.3.7", "@types/node": "^22.8.4", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@typescript-eslint/eslint-plugin": "8.4.0", "@typescript-eslint/parser": "8.4.0", "@vitejs/plugin-react": "^4.1.0", "autoprefixer": "^10.4.14", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "dotenv": "^16.5.0", "eslint": "9.10.0", "eslint-plugin-unicorn": "55.0.0", "husky": "^9.1.7", "lint-staged": "^16.2.7", "postcss": "^8.4.31", "postcss-prefix-selector": "^2.1.0", "prettier": "^3.0.3", "prettier-plugin-tailwindcss": "^0.5.5", "react": "^18.3.1", "react-dom": "^18.3.1", "tailwind-merge": "^2.5.4", "tailwindcss": "^3.4.14", "tailwindcss-animate": "^1.0.7", "tsup": "^8.3.5", "typescript": "^5.0.4", "vite": "^5.4.10", "vite-tsconfig-paths": "^5.0.1" }, "peerDependencies": { "react": "^18.2.0 || ^19", "react-dom": "^18.2.0 || ^19" } }
|