{"_id":"@asenajs/asena-redis","_rev":"7-6531d70df1e898c3a23c2520c831d115","name":"@asenajs/asena-redis","dist-tags":{"latest":"4.0.0"},"versions":{"1.0.0":{"name":"@asenajs/asena-redis","version":"1.0.0","keywords":["redis","asena","asenajs","bun","websocket","transport","ioc","dependency-injection","pub-sub","cache"],"author":{"name":"LibirSoft"},"license":"MIT","_id":"@asenajs/asena-redis@1.0.0","maintainers":[{"name":"libir","email":"libirsoft@gmail.com"}],"homepage":"https://asena.sh","bugs":{"url":"https://github.com/AsenaJs/asena-redis/issues"},"dist":{"shasum":"8bc0f1c5ce0e0b0f911e34ee4eab23b6873fe2ab","tarball":"https://registry.npmjs.org/@asenajs/asena-redis/-/asena-redis-1.0.0.tgz","fileCount":36,"integrity":"sha512-WKzf2GilTJintqdeCivh6qf45gusg6myPE/+iIjjcgOF/ThSMNnYw+kJdc7lgQw3FKvRyrcQKlfb20fTnTSwHQ==","signatures":[{"sig":"MEMCIA7btGqPIehxXoVedW7z1Tx4GC5IDXBFLbGOgEwag7h1Ah8VMrPZaWGCYkvoPyfGIZzNgKR02YX6j1+U9jisE8bL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62079},"main":"dist/index.js","types":"dist/index.d.ts","module":"index.ts","gitHead":"c582ec6a05c5f332bda9418a1e04b39d658e1ea3","scripts":{"test":"bun test","build":"bun run clean && tsc","clean":"rm -rf dist","release":"bun run build && changeset publish","version":"changeset version","changeset":"changeset","test:watch":"bun test --watch","test:coverage":"bun test --coverage","prepublishOnly":"bun run build"},"_npmUser":{"name":"libir","email":"libirsoft@gmail.com"},"repository":{"url":"git+https://github.com/AsenaJs/asena-redis.git","type":"git"},"_npmVersion":"11.12.1","description":"Redis integration for AsenaJS - service client and multi-pod WebSocket transport","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.5.3","@types/bun":"latest","@asenajs/asena":"^0.7.0","@changesets/cli":"^2.29.3","eslint-plugin-n":"^16.6.2","reflect-metadata":"^0.2.2","eslint-config-alloy":"^5.1.2","eslint-plugin-alloy":"^1.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-promise":"^6.6.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.4.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"peerDependencies":{"redis":"^5.11.0","typescript":"^5.8.2","@asenajs/asena":"^0.7.0","reflect-metadata":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/asena-redis_1.0.0_1775602585134_0.4003732503100059","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@asenajs/asena-redis","version":"1.1.0","keywords":["redis","asena","asenajs","bun","websocket","transport","ioc","dependency-injection","pub-sub","cache"],"author":{"name":"LibirSoft"},"license":"MIT","_id":"@asenajs/asena-redis@1.1.0","maintainers":[{"name":"libir","email":"libirsoft@gmail.com"}],"homepage":"https://asena.sh","bugs":{"url":"https://github.com/AsenaJs/asena-redis/issues"},"dist":{"shasum":"3d1c0d0741ce05b2dbd518988c9fce7baf200c52","tarball":"https://registry.npmjs.org/@asenajs/asena-redis/-/asena-redis-1.1.0.tgz","fileCount":45,"integrity":"sha512-KHGCruz6UMEy1C7XLQHHvy6bP6cuLyqM3RoRPySwHg+iYG7jMMLtZ2++ZhgwkDSgq1mUSNUZqaDijaxXqLoTYA==","signatures":[{"sig":"MEUCIQDUWPyVfs5pmFBB3BBIUvIR+W+DFRArNJWLcCU6F8tAngIgIJLr2rlp1nKBxWxUWHKsVExB4bcWW+18NP/TEQMz3iE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164728},"main":"dist/index.js","types":"dist/index.d.ts","module":"index.ts","gitHead":"d33ae3c055f0a385c27009081e494c9e97c2e926","scripts":{"test":"bun test","build":"bun run clean && tsc","clean":"rm -rf dist","release":"bun run build && changeset publish","version":"changeset version","changeset":"changeset","test:watch":"bun test --watch","test:coverage":"bun test --coverage","prepublishOnly":"bun run build"},"_npmUser":{"name":"libir","email":"libirsoft@gmail.com"},"repository":{"url":"git+https://github.com/AsenaJs/asena-redis.git","type":"git"},"_npmVersion":"12.0.1","description":"Redis integration for AsenaJS - service client and multi-pod WebSocket transport","directories":{},"_nodeVersion":"26.5.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.9.6","@types/bun":"latest","@asenajs/asena":"^0.8.0","@changesets/cli":"^2.31.1","eslint-plugin-n":"^16.6.2","reflect-metadata":"^0.2.2","eslint-config-alloy":"^5.1.2","eslint-plugin-alloy":"^1.2.1","eslint-plugin-import":"^2.32.0","eslint-plugin-promise":"^6.6.0","eslint-config-prettier":"^9.1.2","eslint-plugin-prettier":"^5.5.6","@typescript-eslint/eslint-plugin":"^6.21.0"},"peerDependencies":{"redis":"^5.12.1","typescript":"^5.9.3","@asenajs/asena":"^0.8.0","reflect-metadata":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/asena-redis_1.1.0_1785006192281_0.22746213312019714","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@asenajs/asena-redis","version":"2.0.0","keywords":["redis","asena","asenajs","bun","websocket","transport","ioc","dependency-injection","pub-sub","cache"],"author":{"name":"LibirSoft"},"license":"MIT","_id":"@asenajs/asena-redis@2.0.0","maintainers":[{"name":"libir","email":"libirsoft@gmail.com"}],"homepage":"https://asena.sh","bugs":{"url":"https://github.com/AsenaJs/asena-redis/issues"},"dist":{"shasum":"291fd36f5686585e1020806fa9f26911a5d27a8e","tarball":"https://registry.npmjs.org/@asenajs/asena-redis/-/asena-redis-2.0.0.tgz","fileCount":45,"integrity":"sha512-KvLQao5yTa6vdTwhTVMGN7ES5shh32IQscFLzYIvN98ULO2goQ00Inmy3yUzZy9Ovm/eTv8d6SEUmfuFHGqbCA==","signatures":[{"sig":"MEQCIEdssai5ydOn/7FF7Hzo8XGiCO3N0kLGWZJI4ionhlYtAiB3FGm87dcLUZiPig61N5vufSLAwIgho9YiONhny/166g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181579},"main":"dist/index.js","types":"dist/index.d.ts","module":"index.ts","engines":{"bun":">=1.3.12"},"gitHead":"dd7732370e9e2796fa1795f22632523d0481b2f3","scripts":{"lint":"eslint . --ext .ts","test":"bun test","build":"bun run clean && tsc","check":"bun run lint && bun run format:check","clean":"rm -rf dist","format":"prettier --write .","release":"bun run build && changeset publish","version":"changeset version","lint:fix":"eslint . --ext .ts --fix","changeset":"changeset","check:fix":"bun run lint:fix && bun run format","typecheck":"tsc -p tsconfig.typecheck.json","test:watch":"bun test --watch","format:check":"prettier --check .","test:coverage":"bun test --coverage","prepublishOnly":"bun run build"},"_npmUser":{"name":"libir","email":"libirsoft@gmail.com"},"repository":{"url":"git+https://github.com/AsenaJs/asena-redis.git","type":"git"},"_npmVersion":"12.0.1","description":"Redis integration for AsenaJS - service client and multi-pod WebSocket transport","directories":{},"_nodeVersion":"26.5.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.9.6","@types/bun":"latest","@asenajs/asena":"^0.9.0","@changesets/cli":"^2.31.1","eslint-plugin-n":"^16.6.2","reflect-metadata":"^0.2.2","eslint-config-alloy":"^5.1.2","eslint-plugin-alloy":"^1.2.1","eslint-plugin-import":"^2.32.0","eslint-plugin-promise":"^6.6.0","eslint-config-prettier":"^9.1.2","eslint-plugin-prettier":"^5.5.6","@typescript-eslint/eslint-plugin":"^6.21.0"},"peerDependencies":{"redis":"^5.12.1","typescript":"^5.9.3","@asenajs/asena":"^0.9.0","reflect-metadata":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/asena-redis_2.0.0_1785197983214_0.3595886134413242","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@asenajs/asena-redis","version":"3.0.0","keywords":["redis","asena","asenajs","bun","websocket","transport","ioc","dependency-injection","pub-sub","cache"],"author":{"name":"LibirSoft"},"license":"MIT","_id":"@asenajs/asena-redis@3.0.0","maintainers":[{"name":"libir","email":"libirsoft@gmail.com"}],"homepage":"https://asena.sh","bugs":{"url":"https://github.com/AsenaJs/asena-redis/issues"},"dist":{"shasum":"291661af02ee085cfcc35e16d9d87d91afe3a6b6","tarball":"https://registry.npmjs.org/@asenajs/asena-redis/-/asena-redis-3.0.0.tgz","fileCount":45,"integrity":"sha512-H4SG0x8yt/mBMxLzksQQEHXFJ2GdKnKBDZzHRPzR7UoxUiD4h8xVCqm0dLvrMVFddVSj7JUrsWaKjEjLf8NtnQ==","signatures":[{"sig":"MEUCIGL1O/lIqeiglilBxa9UdJv3YA/5JBTgUVCUEclgPO74AiEAirw5but1GXYCEWZERUdv1V9cplseekT4JlrWpYZxi5Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187314},"main":"dist/index.js","types":"dist/index.d.ts","module":"index.ts","engines":{"bun":">=1.3.12"},"gitHead":"bd9cb3d0b2c5b70f228b291c9d8d2996be42d20b","scripts":{"lint":"eslint . --ext .ts","test":"bun test","build":"bun run clean && tsc","check":"bun run lint && bun run format:check","clean":"rm -rf dist","format":"prettier --write .","release":"bun run build && changeset publish","version":"changeset version","lint:fix":"eslint . --ext .ts --fix","changeset":"changeset","check:fix":"bun run lint:fix && bun run format","typecheck":"tsc -p tsconfig.typecheck.json","test:watch":"bun test --watch","format:check":"prettier --check .","test:coverage":"bun test --coverage","prepublishOnly":"bun run build"},"_npmUser":{"name":"libir","email":"libirsoft@gmail.com"},"repository":{"url":"git+https://github.com/AsenaJs/asena-redis.git","type":"git"},"_npmVersion":"12.0.1","description":"Redis integration for AsenaJS - service client and multi-pod WebSocket transport","directories":{},"_nodeVersion":"26.5.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.9.6","@types/bun":"latest","@asenajs/asena":"^0.10.0","@changesets/cli":"^2.31.1","eslint-plugin-n":"^16.6.2","reflect-metadata":"^0.2.2","eslint-config-alloy":"^5.1.2","eslint-plugin-alloy":"^1.2.1","eslint-plugin-import":"^2.32.0","eslint-plugin-promise":"^6.6.0","eslint-config-prettier":"^9.1.2","eslint-plugin-prettier":"^5.5.6","@typescript-eslint/eslint-plugin":"^6.21.0"},"peerDependencies":{"redis":"^5.12.1","typescript":"^5.9.3","@asenajs/asena":"^0.10.0","reflect-metadata":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/asena-redis_3.0.0_1785354148565_0.7466342718974299","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@asenajs/asena-redis","version":"3.1.0","keywords":["redis","asena","asenajs","bun","websocket","transport","ioc","dependency-injection","pub-sub","cache"],"author":"LibirSoft","license":"MIT","_id":"@asenajs/asena-redis@3.1.0","maintainers":[{"name":"libir","email":"libirsoft@gmail.com"}],"homepage":"https://asena.sh","bugs":{"url":"https://github.com/AsenaJs/asena-redis/issues"},"dist":{"shasum":"070e081369002ddd30af9581573c75de008778bf","tarball":"https://registry.npmjs.org/@asenajs/asena-redis/-/asena-redis-3.1.0.tgz","fileCount":45,"integrity":"sha512-OX/18izFyOPJwBQhS2hcFeRYopvKR2Rf74CYuZmpGARfHYS4w5UOy+yYh0Akx76UMGREhZu/RMKla170E2xdIg==","signatures":[{"sig":"MEQCIDM7x/Rls0nshNXqgCgnmCmpAuPfma819WHAGOK56eM0AiBmXBttxp4YHon065zAhDUqgu/8ezt2Wa/EmM/Jc0P7WQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":189174},"main":"dist/index.js","types":"dist/index.d.ts","module":"index.ts","shasum":"070e081369002ddd30af9581573c75de008778bf","engines":{"bun":">=1.3.12"},"scripts":{"lint":"eslint . --ext .ts","test":"bun test","build":"bun run clean && tsc","check":"bun run lint && bun run format:check","clean":"rm -rf dist","format":"prettier --write .","release":"bun run build && changeset publish","version":"changeset version","lint:fix":"eslint . --ext .ts --fix","changeset":"changeset","check:fix":"bun run lint:fix && bun run format","typecheck":"tsc -p tsconfig.typecheck.json","test:watch":"bun test --watch","format:check":"prettier --check .","test:coverage":"bun test --coverage","prepublishOnly":"bun run build"},"_npmUser":{"name":"libir","email":"libirsoft@gmail.com"},"_integrity":"sha512-OX/18izFyOPJwBQhS2hcFeRYopvKR2Rf74CYuZmpGARfHYS4w5UOy+yYh0Akx76UMGREhZu/RMKla170E2xdIg==","repository":{"url":"https://github.com/AsenaJs/asena-redis.git","type":"git"},"_npmVersion":"10.8.3","description":"Redis integration for AsenaJS - service client and multi-pod WebSocket transport","directories":{},"_nodeVersion":"24.3.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.9.6","@types/bun":"latest","@asenajs/asena":"^0.10.0","@changesets/cli":"^2.31.1","eslint-plugin-n":"^16.6.2","reflect-metadata":"^0.2.2","eslint-config-alloy":"^5.1.2","eslint-plugin-alloy":"^1.2.1","eslint-plugin-import":"^2.32.0","eslint-plugin-promise":"^6.6.0","eslint-config-prettier":"^9.1.2","eslint-plugin-prettier":"^5.5.6","@typescript-eslint/eslint-plugin":"^6.21.0"},"peerDependencies":{"redis":"^5.12.1","typescript":"^5.9.3","@asenajs/asena":"^0.10.0","reflect-metadata":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/asena-redis_3.1.0_1786917508733_0.970863881488649","host":"s3://npm-registry-packages-npm-production"}},"3.1.1":{"name":"@asenajs/asena-redis","version":"3.1.1","keywords":["redis","asena","asenajs","bun","websocket","transport","ioc","dependency-injection","pub-sub","cache"],"author":{"name":"LibirSoft"},"license":"MIT","_id":"@asenajs/asena-redis@3.1.1","maintainers":[{"name":"libir","email":"libirsoft@gmail.com"}],"homepage":"https://asena.sh","bugs":{"url":"https://github.com/AsenaJs/asena-redis/issues"},"dist":{"shasum":"732b7775e392fbcf76628b089c52fd2aecf3c33f","tarball":"https://registry.npmjs.org/@asenajs/asena-redis/-/asena-redis-3.1.1.tgz","fileCount":45,"integrity":"sha512-6uGFL7247wOIwPRE6/m8zgSg9GrP5AA9UXIJJcH2hL4fAram/COYMwg/Q6BYiz1nz9iLpQdD+uzYk3E9TR9fJA==","signatures":[{"sig":"MEUCIQC3VVjW8EC8yBQaU4+ZmKGYACpeXhq7kJZLed+xgbZMmQIgJGYN6uHncK134c5pvK3sODEOKALUmu934WLFWJWj6O4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":190821},"main":"dist/index.js","types":"dist/index.d.ts","module":"index.ts","engines":{"bun":">=1.3.12"},"gitHead":"975dff40adb944c6fb7702ea37e8dcbc20a2b91d","scripts":{"lint":"eslint . --ext .ts","test":"bun test","build":"bun run clean && tsc","check":"bun run lint && bun run format:check","clean":"rm -rf dist","format":"prettier --write .","release":"bun run build && changeset publish","version":"changeset version","lint:fix":"eslint . --ext .ts --fix","changeset":"changeset","check:fix":"bun run lint:fix && bun run format","typecheck":"tsc -p tsconfig.typecheck.json","test:watch":"bun test --watch","format:check":"prettier --check .","test:coverage":"bun test --coverage","prepublishOnly":"bun run build"},"_npmUser":{"name":"libir","email":"libirsoft@gmail.com"},"repository":{"url":"git+https://github.com/AsenaJs/asena-redis.git","type":"git"},"_npmVersion":"12.0.2","description":"Redis integration for AsenaJS - service client and multi-pod WebSocket transport","directories":{},"_nodeVersion":"26.7.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","prettier":"^3.9.6","@types/bun":"latest","@asenajs/asena":"^0.10.1","@changesets/cli":"^2.31.1","eslint-plugin-n":"^16.6.2","reflect-metadata":"^0.2.2","eslint-config-alloy":"^5.1.2","eslint-plugin-alloy":"^1.2.1","eslint-plugin-import":"^2.32.0","eslint-plugin-promise":"^6.6.0","eslint-config-prettier":"^9.1.2","eslint-plugin-prettier":"^5.5.6","@typescript-eslint/eslint-plugin":"^6.21.0"},"peerDependencies":{"redis":"^5.12.1","typescript":"^5.9.3","@asenajs/asena":"^0.10.0","reflect-metadata":"^0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/asena-redis_3.1.1_1787396369106_0.331997421928109","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"name":"@asenajs/asena-redis","version":"4.0.0","author":{"name":"LibirSoft"},"description":"Redis integration for AsenaJS - service client and multi-pod WebSocket transport","main":"dist/index.js","module":"index.ts","types":"dist/index.d.ts","license":"MIT","engines":{"bun":">=1.4.0"},"keywords":["redis","asena","asenajs","bun","websocket","transport","ioc","dependency-injection","pub-sub","cache"],"repository":{"type":"git","url":"git+https://github.com/AsenaJs/asena-redis.git"},"bugs":{"url":"https://github.com/AsenaJs/asena-redis/issues"},"homepage":"https://asena.sh","scripts":{"test":"bun test","test:watch":"bun test --watch","test:coverage":"bun test --coverage","build":"bun run clean && tsc","typecheck":"tsc -p tsconfig.typecheck.json","clean":"rm -rf dist","prepublishOnly":"bun run build","changeset":"changeset","version":"changeset version","release":"bun run build && changeset publish","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","format":"prettier --write .","format:check":"prettier --check .","check":"bun run lint && bun run format:check","check:fix":"bun run lint:fix && bun run format"},"devDependencies":{"@asenajs/asena":"^0.11.0","@changesets/cli":"^2.31.1","@types/bun":"latest","@typescript-eslint/eslint-plugin":"^6.21.0","eslint":"^8.57.1","eslint-config-alloy":"^5.1.2","eslint-config-prettier":"^9.1.2","eslint-plugin-alloy":"^1.2.1","eslint-plugin-import":"^2.32.0","eslint-plugin-n":"^16.6.2","eslint-plugin-prettier":"^5.5.6","eslint-plugin-promise":"^6.6.0","prettier":"^3.9.6","reflect-metadata":"^0.2.2"},"peerDependencies":{"@asenajs/asena":"^0.11.0","redis":"^5.12.1","reflect-metadata":"^0.2.2","typescript":"^5.9.3"},"gitHead":"ca0ab194e2e288f3d8d0281dcb34da961d6767f9","_id":"@asenajs/asena-redis@4.0.0","_nodeVersion":"26.7.0","_npmVersion":"12.0.2","dist":{"integrity":"sha512-gU5Ep9ZiJ2PIlzIlKfU0AezC+x3ATxXY2pe97AXsSRQoYpFQueCBA8Do9YIZSFY8q2xdSqmEOYrXhE7iP07IaQ==","shasum":"479b70c8a801d4822f8f3fb12fde36b9450e54c3","tarball":"https://registry.npmjs.org/@asenajs/asena-redis/-/asena-redis-4.0.0.tgz","fileCount":45,"unpackedSize":197799,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGn1SWRl9N7t6XGFi0cJn5g/g5O9sJTtn7LcTobUlvyUAiB8xxslS5M3CbArW+h5B0tJn3O4n++fbZ21f99YG+fA9w=="}]},"_npmUser":{"name":"libir","email":"libirsoft@gmail.com"},"directories":{},"maintainers":[{"name":"libir","email":"libirsoft@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/asena-redis_4.0.0_1787695672018_0.46643693877476644"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-07T22:56:25.036Z","modified":"2026-08-25T22:07:52.399Z","1.0.0":"2026-04-07T22:56:25.287Z","1.1.0":"2026-07-25T19:03:12.413Z","2.0.0":"2026-07-28T00:19:43.368Z","3.0.0":"2026-07-29T19:42:28.701Z","3.1.0":"2026-08-16T21:58:28.864Z","3.1.1":"2026-08-22T10:59:29.265Z","4.0.0":"2026-08-25T22:07:52.211Z"},"bugs":{"url":"https://github.com/AsenaJs/asena-redis/issues"},"author":{"name":"LibirSoft"},"license":"MIT","homepage":"https://asena.sh","keywords":["redis","asena","asenajs","bun","websocket","transport","ioc","dependency-injection","pub-sub","cache"],"repository":{"type":"git","url":"git+https://github.com/AsenaJs/asena-redis.git"},"description":"Redis integration for AsenaJS - service client and multi-pod WebSocket transport","maintainers":[{"name":"libir","email":"libirsoft@gmail.com"}],"readme":"<p width=\"%100\" align=\"center\">\n  <img src=\"https://avatars.githubusercontent.com/u/179836938?s=200&v=4\" width=\"150\" align=\"center\"/>\n</p>\n\n# @asenajs/asena-redis\n\n[![Version](https://img.shields.io/badge/version-4.0.0-blue.svg)](https://github.com/AsenaJs/asena-redis)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Bun Version](https://img.shields.io/badge/Bun-1.4%2B-blueviolet)](https://bun.sh)\n\nRedis integration for AsenaJS — service client with built-in multi-pod WebSocket transport.\n\nYour existing `@Redis` decorated service gives you full Redis operations with automatic IoC registration. For multi-pod deployments, `RedisTransport` synchronizes WebSocket messages across instances via Redis pub/sub.\n\n## Features\n\n- **Decorator-Based Setup** - `@Redis` decorator handles IoC registration and connection lifecycle\n- **Dual Adapter Support** - Bun native `RedisClient` (default) and `redis` (node-redis) package\n- **Multi-Pod WebSocket Transport** - Synchronize WebSocket messages across pods via Redis pub/sub\n- **Full Redis Operations** - String, Hash, Set, Key, and raw command support\n- **Binary Data Support** - ArrayBuffer and Uint8Array transport with Base64 encoding\n- **Zero Runtime Dependencies** - Only peer deps (asena, reflect-metadata)\n\n## Requirements\n\n- [Bun](https://bun.sh) v1.4 or higher\n- [@asenajs/asena](https://github.com/AsenaJs/Asena) v0.11.0 or higher\n\n## Installation\n\n```bash\nbun add @asenajs/asena-redis\n```\n\nFor node-redis adapter (optional):\n```bash\nbun add @asenajs/asena-redis redis\n```\n\n## Quick Start\n\n```typescript\nimport { Redis, AsenaRedisService } from '@asenajs/asena-redis';\n\n@Redis({\n  config: { url: 'redis://localhost:6379' },\n  name: 'AppRedis',\n})\nexport class AppRedis extends AsenaRedisService {\n\n  async getOrSet(key: string, factory: () => Promise<string>, ttl?: number): Promise<string> {\n    const cached = await this.get(key);\n\n    if (cached) return cached;\n\n    const value = await factory();\n    await this.set(key, value, ttl);\n\n    return value;\n  }\n\n}\n```\n\nAsena automatically discovers it — that's it.\n\nNow inject and use:\n\n```typescript\nimport { Service } from '@asenajs/asena/decorators';\nimport { Inject } from '@asenajs/asena/decorators/ioc';\n\n@Service('CacheService')\nexport class CacheService {\n\n  @Inject('AppRedis')\n  private redis: AppRedis;\n\n  async getUserName(id: string): Promise<string> {\n    return this.redis.getOrSet(`user:${id}`, async () => {\n      // fetch from database...\n      return 'John';\n    }, 60);\n  }\n\n}\n```\n\n## Adapter Selection\n\nBy default, `@asenajs/asena-redis` uses Bun's native `RedisClient`. For environments requiring the `redis` (node-redis) package:\n\n```typescript\n@Redis({\n  config: { url: 'redis://localhost:6379' },\n  adapter: 'node-redis',\n})\nexport class AppRedis extends AsenaRedisService {}\n```\n\n| Adapter | Package | Best For |\n|---------|---------|----------|\n| `'bun'` (default) | None (Bun built-in) | Bun runtime, maximum performance |\n| `'node-redis'` | `redis` ^5.11.0 | Node.js compatibility, Redis modules |\n\n## Multi-Pod WebSocket Transport\n\n`RedisTransport` synchronizes WebSocket messages across multiple server instances using Redis pub/sub.\n\n### Setup\n\n```typescript\nimport { Config } from '@asenajs/asena/decorators';\nimport { Inject } from '@asenajs/asena/decorators/ioc';\nimport { RedisTransport } from '@asenajs/asena-redis';\n\n@Config()\nexport class AppConfig {\n\n  @Inject('AppRedis')\n  private redis: AppRedis;\n\n  transport() {\n    return new RedisTransport(this.redis);\n  }\n\n}\n```\n\nOr without an existing Redis service:\n\n```typescript\ntransport() {\n  return new RedisTransport({ url: 'redis://localhost:6379' });\n}\n```\n\n### How It Works\n\nEach server instance gets a unique pod ID. When a message is published through the server\n(`socket.to()` / `socket.in()`):\n\n1. The message is delivered locally via `server.publish()`\n2. The message is sent to Redis pub/sub with the originating pod ID\n3. Other pods receive the message and deliver it to their local sockets\n4. Messages from the same pod are deduplicated automatically\n\n`socket.publish()` takes a different route: it excludes the sender, so it does local delivery\nitself with `ws.publish()` and asks the transport only for step 2 onwards via `publishRemote()`.\nSteps 3 and 4 are unchanged. This requires `@asenajs/asena` 0.11.0 or newer.\n\n### Options\n\n```typescript\nnew RedisTransport(source, {\n  channel: 'asena:ws:transport', // Redis pub/sub channel (default)\n});\n```\n\n## Configuration\n\n```typescript\ninterface RedisConfig {\n  // Connection\n  url?: string;               // redis[s]://[[username][:password]@][host][:port][/db]\n  host?: string;               // default: 'localhost'\n  port?: number;               // default: 6379\n  username?: string;\n  password?: string;\n  db?: number;\n\n  // Timeouts & Reconnection\n  connectionTimeout?: number;  // Connection timeout in ms (default: 10000)\n  idleTimeout?: number;        // Idle timeout in ms (Bun only, default: 0)\n  autoReconnect?: boolean;     // Auto-reconnect on disconnect (default: true)\n  maxRetries?: number;         // Max reconnection attempts (default: 10)\n\n  // Behavior\n  enableOfflineQueue?: boolean;     // Queue commands when disconnected (default: true)\n  enableAutoPipelining?: boolean;   // Automatic command pipelining (Bun only, default: true)\n\n  // TLS\n  tls?: boolean | TLSOptions;\n\n  // Identification\n  name?: string;               // Service name for logging\n}\n```\n\n> **Note:** `idleTimeout` and `enableAutoPipelining` are Bun-only features and are silently ignored when using the `node-redis` adapter.\n\n## API Reference\n\n### Service Methods\n\n#### String Operations\n- `get(key)` - Get string value\n- `set(key, value, ttl?)` - Set string value with optional TTL (seconds)\n- `del(...keys)` - Delete keys, returns count\n- `exists(key)` - Check if key exists\n- `incr(key)` / `decr(key)` - Increment/decrement counter\n- `expire(key, seconds)` - Set expiration\n- `ttl(key)` - Get remaining TTL\n- `keys(pattern)` - Find keys by pattern\n\n#### Hash Operations\n- `hget(key, field)` - Get hash field\n- `hmset(key, fields)` - Set multiple hash fields (`['f1', 'v1', 'f2', 'v2']`)\n- `hmget(key, fields)` - Get multiple hash fields\n\n#### Set Operations\n- `sadd(key, member)` - Add member to set\n- `srem(key, member)` - Remove member from set\n- `smembers(key)` - Get all members\n- `sismember(key, member)` - Check membership\n\n#### Raw & Lifecycle\n- `send(command, args)` - Execute raw Redis command\n- `ping(timeoutMs?)` - Send PING and resolve with `'PONG'`, or reject after `timeoutMs` (default 1000)\n- `client` - Access underlying `RedisClientAdapter`\n- `createSubscriber()` - Create a duplicate connection for pub/sub\n- `testConnection()` - Returns `true` if connected\n- `disconnect()` - Close the main connection (subscribers stay open)\n\n`server.stop()` closes the service connection **and** every subscriber `createSubscriber()` handed\nout - no manual teardown needed.\n\n## Contributing\n\nContributions are welcome! Please follow these guidelines:\n\n1. Maintain test coverage for critical paths\n2. Follow existing code style and linting rules\n3. Test with both Bun and node-redis adapters\n\nSubmit a Pull Request on [GitHub](https://github.com/AsenaJs/asena-redis).\n\n## License\n\nMIT\n\n## Support\n\nIssues or questions? Open an issue on [GitHub](https://github.com/AsenaJs/asena-redis/issues).","readmeFilename":"README.md"}