{"id":45099,"library":"hinos-redis","title":"hinos-redis","description":"Redis connection manager plugin for the hinos framework. Version 2.0.5 provides a simple decorator-based approach to manage multiple Redis connections. It uses TypeScript decorators for dependency injection of Redis instances into classes. The package wraps ioredis and exposes a subset of its API. Stable but niche, with monthly releases.","status":"active","version":"2.0.5","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install hinos-redis","lang":"bash","label":"npm"},{"cmd":"yarn add hinos-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add hinos-redis","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Underlying Redis client library used for all operations","package":"ioredis","optional":false},{"reason":"Designed as a plugin for the hinos framework; core dependency for decorator support","package":"hinos","optional":true}],"imports":[{"note":"ESM default export is not available; use named import.","wrong":"const Redis = require('hinos-redis');","symbol":"Redis","correct":"import { Redis } from 'hinos-redis'"},{"note":"REDIS is a decorator, must be named import.","wrong":"import REDIS from 'hinos-redis';","symbol":"REDIS","correct":"import { REDIS } from 'hinos-redis'"},{"note":"Type import for configuring the Redis connection options.","wrong":"","symbol":"RedisOptions","correct":"import { RedisOptions } from 'hinos-redis'"}],"quickstart":{"code":"import { Redis, REDIS } from 'hinos-redis';\n\n// Initialize default connection\nRedis({ host: 'localhost', port: 6379 });\n\n// Use decorator to inject redis instance\nclass MyService {\n  @REDIS()\n  static redis: import('ioredis').Redis;\n\n  static async store(key: string, value: any) {\n    await this.redis.set(key, JSON.stringify(value), 'EX', 3600);\n  }\n}","lang":"typescript","description":"Shows how to configure and use hinos-redis with TypeScript decorator pattern."},"warnings":[{"fix":"Update decorators to use @REDIS() instead of @Redis()","message":"Version 2.0.0 changed the decorator syntax from @Redis() to @REDIS()","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Always use the Redis() function to initialize connections before using decorators.","message":"The package does not export a default Redis instance; must use the decorator or create connections explicitly.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Pin ioredis to version 4.x or use compatible version.","message":"The ioredis dependency may have breaking changes; check compatibility with ioredis v5+","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'2.0.5':13 'api':48 'approach':20 'base':19 'class':37 'connect':5,25 'decor':18,29 'decorator-bas':17 'depend':31 'expos':43 'framework':11 'hino':2,10 'hinos-redi':1 'inject':32 'instanc':35 'ioredi':41 'javascript':55 'manag':6,22 'month':53 'multipl':23 'nich':51 'packag':39 'plugin':7 'provid':14 'redi':3,4,24,34 'releas':54 'simpl':16 'stabl':49 'subset':45 'typescript':28,56 'use':27 'version':12 'wrap':40","created_at":"2026-06-07T12:53:21.845998+00:00","updated_at":"2026-06-07T12:53:21.845998+00:00","problems":[{"fix":"Ensure Redis({...}) is called before using the decorator, and import REDIS as named.","cause":"Called set method before initializing connection or wrong import","error":"TypeError: redis.set is not a function"},{"fix":"Run 'npm install hinos-redis' and ensure import path is 'hinos-redis' not 'hinos/redis'.","cause":"Package not installed or import path incorrect","error":"Cannot find module 'hinos-redis'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"hinos-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}