{"_id":"@codingfrog/n8n-nodes-redis-enhanced","name":"@codingfrog/n8n-nodes-redis-enhanced","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@codingfrog/n8n-nodes-redis-enhanced","version":"0.2.0","description":"Enhanced Redis node for n8n with comprehensive operations including pub/sub, lists, sets, sorted sets, hashes, and TTL support","keywords":["n8n-community-node-package","redis","database","cache","pub-sub","key-value","sorted-set"],"license":"MIT","homepage":"https://github.com/codingfrog/n8n-nodes-redis-enhanced","author":{"name":"Romain Eude","email":"romain.eude@gmail.com"},"contributors":[{"name":"Vicente Russo Neto","email":"vicente.russo@gmail.com","url":"https://github.com/vicenterusso"}],"repository":{"type":"git","url":"git+https://github.com/codingfrog/n8n-nodes-redis-enhanced.git"},"engines":{"node":">=20.15"},"main":"index.js","scripts":{"build":"npx rimraf dist && tsc && gulp build:icons","dev":"tsc --watch","format":"prettier nodes credentials --write","lint":"eslint nodes credentials package.json","lintfix":"eslint nodes credentials package.json --fix","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run build && npm run lint -c .eslintrc.prepublish.js nodes credentials package.json && npm test"},"n8n":{"n8nNodesApiVersion":1,"credentials":["dist/credentials/Redis.credentials.js"],"nodes":["dist/nodes/RedisEnhanced/RedisEnhanced.node.js"]},"devDependencies":{"@jest/types":"^30.0.1","@types/jest":"^30.0.0","@typescript-eslint/parser":"~8.32.0","eslint":"^8.57.0","eslint-plugin-n8n-nodes-base":"^1.16.3","gulp":"^5.0.0","jest":"^30.0.4","jest-mock-extended":"^4.0.0","prettier":"^3.5.3","redis-mock":"^0.56.3","ts-jest":"^29.4.0","typescript":"^5.8.2"},"peerDependencies":{"n8n-workflow":"*"},"dependencies":{"@types/lodash":"^4.17.20","@types/redis":"^4.0.11","lodash":"4.17.21","redis":"4.6.14"},"_id":"@codingfrog/n8n-nodes-redis-enhanced@0.2.0","bugs":{"url":"https://github.com/codingfrog/n8n-nodes-redis-enhanced/issues"},"_nodeVersion":"23.9.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-BDMd9RJQLQLqSz8iPF/Nf8Dty3vl7pP4u1yAqlAzxYKvUbwANiFmW3dbcOAGXx+zk2F+kyFNXLd+iquy5t0+CA==","shasum":"45292f822073a00609513fbc5d87a356d2cd82b9","tarball":"https://registry.npmjs.org/@codingfrog/n8n-nodes-redis-enhanced/-/n8n-nodes-redis-enhanced-0.2.0.tgz","fileCount":18,"unpackedSize":139075,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDdNQfS5y6rRqu5Lc+CaedPRl4KhU3JyD/wb2zci0EmwAIhANuQuYrmDHfzFNMsWPdB6ea1bh5M6rEsVyw5XsvTfIBH"}]},"_npmUser":{"name":"codingfrog","email":"romain.eude@gmail.com"},"directories":{},"maintainers":[{"name":"codingfrog","email":"romain.eude@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-redis-enhanced_0.2.0_1764369832616_0.5369455560165863"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-28T22:43:52.500Z","0.2.0":"2025-11-28T22:43:52.828Z","modified":"2025-11-28T22:43:53.102Z"},"maintainers":[{"name":"codingfrog","email":"romain.eude@gmail.com"}],"description":"Enhanced Redis node for n8n with comprehensive operations including pub/sub, lists, sets, sorted sets, hashes, and TTL support","homepage":"https://github.com/codingfrog/n8n-nodes-redis-enhanced","keywords":["n8n-community-node-package","redis","database","cache","pub-sub","key-value","sorted-set"],"repository":{"type":"git","url":"git+https://github.com/codingfrog/n8n-nodes-redis-enhanced.git"},"contributors":[{"name":"Vicente Russo Neto","email":"vicente.russo@gmail.com","url":"https://github.com/vicenterusso"}],"author":{"name":"Romain Eude","email":"romain.eude@gmail.com"},"bugs":{"url":"https://github.com/codingfrog/n8n-nodes-redis-enhanced/issues"},"license":"MIT","readme":"# n8n-nodes-redis-enhanced\n\nThis is an n8n community node that provides comprehensive Redis integration with enhanced operations for your n8n workflows.\n\nRedis Enhanced extends the basic Redis functionality with 35+ operations including atomic operations, bulk operations, advanced data structures (sets, sorted sets, hashes), TTL management, Lua scripting, and pub/sub capabilities.\n\n[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.\n\n[Installation](#installation)  \n[Operations](#operations)  \n[Credentials](#credentials)  \n[Compatibility](#compatibility)  \n[Usage](#usage)  \n[Development](#development)  \n[Testing](#testing)  \n[Resources](#resources)  \n[Version History](#version-history)  \n\n## Installation\n\nFollow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.\n\n### Quick Install\n1. Open your n8n instance\n2. Go to **Settings** → **Community Nodes**\n3. Enter the package name: `@vicenterusso/n8n-nodes-redis-enhanced`\n4. Click **Install**\n5. Restart n8n\n\n### Manual Installation\n```bash\nnpm install @vicenterusso/n8n-nodes-redis-enhanced\n```\n\n## Operations\n\nRedis Enhanced provides 35 comprehensive operations organized by category:\n\n### 🔑 **Basic Operations**\n- **Get** - Retrieve values from Redis with automatic type detection\n- **Set** - Store values with atomic lock support (NX/XX modes) and TTL\n- **Delete** - Remove keys from Redis\n- **Exists** - Check if one or more keys exist\n- **Info** - Get Redis server information and statistics\n\n### 📦 **Bulk Operations**\n- **Multi Get (MGET)** - Retrieve multiple keys in a single operation\n- **Multi Set (MSET)** - Set multiple key-value pairs atomically\n- **Scan** - Production-safe key iteration with pattern matching\n- **Keys** - Find keys matching patterns (with optional value retrieval)\n\n### 🔢 **String Operations**\n- **Increment (INCR)** - Atomic counter operations with optional TTL\n- **Append** - Append values to existing strings\n- **String Length** - Get the length of string values\n- **Get Set** - Atomically set new value and return old value\n\n### 📋 **List Operations**\n- **Push** - Add elements to lists (left/right)\n- **Pop** - Remove elements from lists (left/right)\n- **Blocking Pop Left (BLPOP)** - Blocking pop from list start\n- **Blocking Pop Right (BRPOP)** - Blocking pop from list end  \n- **List Length** - Get the number of elements in a list\n\n### 🎯 **Set Operations**\n- **Set Add (SADD)** - Add members to sets\n- **Set Remove (SREM)** - Remove members from sets\n- **Set Is Member (SISMEMBER)** - Check set membership\n- **Set Cardinality (SCARD)** - Get the number of set members\n\n### 📊 **Sorted Set Operations**\n- **Sorted Set Add (ZADD)** - Add scored members to sorted sets\n- **Sorted Set Range (ZRANGE)** - Get ranges with optional scores\n- **Sorted Set Remove (ZREM)** - Remove members from sorted sets\n- **Sorted Set Cardinality (ZCARD)** - Get sorted set size\n\n### 🗂️ **Hash Operations**\n- **Hash Length (HLEN)** - Get number of hash fields\n- **Hash Keys (HKEYS)** - Get all field names\n- **Hash Values (HVALS)** - Get all hash values\n- **Hash Exists (HEXISTS)** - Check if hash field exists\n\n### ⏰ **TTL Operations**\n- **TTL** - Get time-to-live for keys\n- **Persist** - Remove expiration from keys\n- **Expire At** - Set expiration at specific timestamp\n\n### 🚀 **Advanced Operations**\n- **Eval** - Execute Lua scripts with key/argument support\n- **Publish** - Publish messages to Redis channels\n\n### 🔒 **Enhanced Features**\n- **Atomic Operations** - NX (set if not exists) and XX (set if exists) modes\n- **Bulk Processing** - Space-separated input parsing for multiple keys/values\n- **Type Safety** - Automatic type detection and conversion\n- **Error Handling** - Comprehensive error handling with continue-on-fail support\n- **Production Ready** - Optimized for high-performance production use\n\n## Credentials\n\nTo use Redis Enhanced, you need to set up Redis credentials in n8n:\n\n### Prerequisites\n- A Redis server (local, cloud, or managed service like AWS ElastiCache, Redis Cloud, etc.)\n- Network connectivity from n8n to your Redis instance\n\n### Authentication Setup\n1. In n8n, go to **Credentials** → **Create New**\n2. Search for **Redis Enhanced**\n3. Configure the connection:\n   - **Host**: Your Redis server hostname or IP\n   - **Port**: Redis port (default: 6379)\n   - **Database**: Database number (default: 0)\n   - **Password**: Redis password (if AUTH is enabled)\n   - **User**: Redis username (for Redis 6+ ACL)\n   - **SSL**: Enable for TLS connections\n\n### Supported Authentication Methods\n- **No Authentication** - For development/local Redis instances\n- **Password Authentication** - Traditional Redis AUTH\n- **Username/Password** - Redis 6+ ACL with user accounts\n- **TLS/SSL** - Encrypted connections for production deployments\n\n## Compatibility\n\n- **Minimum n8n version**: 1.0.0+\n- **Redis versions**: 3.0+ (tested up to Redis 7.x)\n- **Node.js**: 20.15+\n- **Tested with**: n8n 1.x, Redis 6.x, Redis 7.x\n\n### Known Compatibility\n- ✅ **n8n Cloud**: Fully compatible\n- ✅ **Self-hosted n8n**: All versions 1.0+\n- ✅ **Docker deployments**: Tested and verified\n- ✅ **Redis Cloud**: Compatible with all major providers\n- ✅ **AWS ElastiCache**: Full compatibility\n- ✅ **Redis Sentinel**: Supported\n- ✅ **Redis Cluster**: Basic operations supported\n\n## Usage\n\n### Basic Example: Caching API Responses\n```yaml\n# Workflow: Cache expensive API calls\n1. HTTP Request (API call)\n2. Redis Enhanced (SET with TTL)\n   - Operation: Set\n   - Key: api:cache:{{$json.id}}\n   - Value: {{$json}}\n   - TTL: 300 seconds\n```\n\n### Advanced Example: Atomic Counters\n```yaml\n# Workflow: Rate limiting with atomic counters\n1. Redis Enhanced (SET with NX)\n   - Operation: Set\n   - Key: rate_limit:{{$json.user_id}}\n   - Value: 1\n   - Set Mode: Set If Not Exists (NX)\n   - TTL: 3600 seconds\n2. If key already exists → Rate limit exceeded\n```\n\n### Bulk Operations Example\n```yaml\n# Workflow: Bulk data processing\n1. Redis Enhanced (MGET)\n   - Operation: Multi Get\n   - Keys: user:1 user:2 user:3 user:4\n2. Redis Enhanced (MSET)\n   - Operation: Multi Set\n   - Key-Value Pairs: updated:1 true updated:2 true\n```\n\n### Production Tips\n- Use **SCAN** instead of **KEYS** for production key iteration\n- Leverage **atomic operations** (NX/XX) for race condition prevention\n- Set appropriate **TTL values** for cache invalidation\n- Use **bulk operations** (MGET/MSET) for better performance\n- Monitor operations with **INFO** for production insights\n\n## Development\n\n### Prerequisites\n- Node.js 20.15+\n- npm or yarn\n- Redis server for testing\n\n### Setup\n```bash\ngit clone https://github.com/vicenterusso/n8n-nodes-redis-enhanced.git\ncd n8n-nodes-redis-enhanced\nnpm install\n```\n\n### Build\n```bash\nnpm run build     # Build the node\nnpm run dev       # Build in watch mode\nnpm run lint      # Check code quality\nnpm run lintfix   # Auto-fix linting issues\n```\n\n## Testing\n\nThe project includes comprehensive test coverage with 31+ tests covering all operations:\n\n```bash\nnpm test              # Run all tests\nnpm run test:watch    # Run tests in watch mode  \nnpm run test:coverage # Run with coverage report\n```\n\n### Test Coverage\n- **31 passing tests** across all operations\n- **42.97% code coverage** with detailed branch coverage\n- **Infrastructure testing** (connection, client setup)\n- **Operation testing** (all 35 operations)\n- **Error handling** (continue-on-fail scenarios)\n- **Parameter validation** (input validation)\n\n### Test Categories\n- ✅ **Connection Tests** - Redis client setup and connectivity\n- ✅ **Basic Operations** - GET, SET, DELETE, EXISTS, INFO\n- ✅ **Bulk Operations** - MGET, MSET, SCAN, KEYS\n- ✅ **Advanced Operations** - Atomic operations, TTL, Lua scripts\n- ✅ **Error Handling** - Comprehensive error scenarios\n- ✅ **Type Safety** - Input/output type validation\n\n## Resources\n\n- [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)\n- [Redis Documentation](https://redis.io/documentation)\n- [Redis Commands Reference](https://redis.io/commands)\n- [n8n Workflow Templates](https://n8n.io/workflows)\n- [Project Repository](https://github.com/vicenterusso/n8n-nodes-redis-enhanced)\n\n## Version History\n\n### v0.1.0 (Current)\n- **Initial Release** with 35 Redis operations\n- **Comprehensive Testing** - 31 tests, 42.97% coverage\n- **Production Ready** - Atomic operations, bulk processing, error handling\n- **Enhanced Features** - NX/XX modes, TTL management, Lua scripting\n- **Full Documentation** - Complete API coverage and examples\n\n#### Features Added:\n- ✅ Basic operations (GET, SET, DELETE, EXISTS, INFO)\n- ✅ Bulk operations (MGET, MSET, SCAN, KEYS)  \n- ✅ String operations (INCR, APPEND, STRLEN, GETSET)\n- ✅ List operations (PUSH, POP, BLPOP, BRPOP, LLEN)\n- ✅ Set operations (SADD, SREM, SISMEMBER, SCARD)\n- ✅ Sorted set operations (ZADD, ZRANGE, ZREM, ZCARD)\n- ✅ Hash operations (HLEN, HKEYS, HVALS, HEXISTS)\n- ✅ TTL operations (TTL, PERSIST, EXPIREAT)\n- ✅ Advanced operations (EVAL, PUBLISH)\n- ✅ Atomic lock support (NX/XX modes)\n- ✅ Comprehensive error handling\n- ✅ Production deployment tools\n\n---\n\n**Author**: Vicente Russo Neto (vicente.russo@gmail.com)  \n**License**: MIT  \n**Repository**: https://github.com/vicenterusso/n8n-nodes-redis-enhanced\n","readmeFilename":"README.md","_rev":"1-ca781111a7f2248bc1dd3ca0b11ef5c6"}