{"_id":"@autexis/node-red-context-redis","_rev":"4-7030b83bb9fe96e2f281a1a4d80c7640","name":"@autexis/node-red-context-redis","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0-rc1":{"name":"@autexis/node-red-context-redis","version":"1.0.0-rc1","keywords":["node-red","redis"],"license":"Apache-2.0","_id":"@autexis/node-red-context-redis@1.0.0-rc1","maintainers":[{"name":"joel.wasmer.autexis","email":"joel.wasmer@autexis.com"},{"name":"remo_koethe","email":"remo.koethe@autexis.com"},{"name":"atx-dgr","email":"david.grimbichler@autexis.com"},{"name":"thomas.frei.autexis","email":"thomas.frei@autexis.com"}],"dist":{"shasum":"08e2c6b69c580628db00e53032700e1834b73b2d","tarball":"https://registry.npmjs.org/@autexis/node-red-context-redis/-/node-red-context-redis-1.0.0-rc1.tgz","fileCount":6,"integrity":"sha512-XN6oQLIeK4HQPULCZ0ntnre2swvrNE1Cs0e1MMrV6oOHlqqPwCEnkZ6wxezBowkMx/TXPyawmef+73OCOXK6rw==","signatures":[{"sig":"MEYCIQC0K7oE8/n7fVTre54tU/TCjy34/xVEzFarcuAGc2kK8AIhAJM4G6cBn8oj4ig2BGqXL8iqAs5++R8LtTAuCdrI8J95","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62882},"main":"index.js","engines":{"node":">=8"},"gitHead":"7a320f4fa6c99354d903a7e44fcb39ac35567f2c","private":false,"scripts":{"test":"nyc --cache mocha ./test/_spec.js --timeout=8000","coverage":"nyc report --reporter=lcov --reporter=html"},"_npmUser":{"name":"atx-dgr","email":"david.grimbichler@autexis.com"},"_npmVersion":"10.8.2","description":"A Node-RED Context store plugin backed by Redis","directories":{},"_nodeVersion":"18.20.8","dependencies":{"redis":"^5.6.0","@node-red/util":"^4.0.9","json-stringify-safe":"^5.0.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^17.1.0","chai":"^4.5.0","mocha":"^11.7.1","sinon":"^21.0.0","should":"^13.2.3","should-sinon":"^0.0.6"},"_npmOperationalInternal":{"tmp":"tmp/node-red-context-redis_1.0.0-rc1_1754905578592_0.9048498123160298","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-rc2":{"name":"@autexis/node-red-context-redis","version":"1.0.0-rc2","keywords":["node-red","redis"],"license":"Apache-2.0","_id":"@autexis/node-red-context-redis@1.0.0-rc2","maintainers":[{"name":"joel.wasmer.autexis","email":"joel.wasmer@autexis.com"},{"name":"remo_koethe","email":"remo.koethe@autexis.com"},{"name":"atx-dgr","email":"david.grimbichler@autexis.com"},{"name":"thomas.frei.autexis","email":"thomas.frei@autexis.com"}],"dist":{"shasum":"02083d09c9634b794ca32a3435674f7b46ae96d2","tarball":"https://registry.npmjs.org/@autexis/node-red-context-redis/-/node-red-context-redis-1.0.0-rc2.tgz","fileCount":6,"integrity":"sha512-/S4Z0DQkkt1jlgHe+qcANSplj0kw404ZhSih36ds0UiE2LtPvSfABWAAMU+r2p6GPON9MH1Jxg3Zf+3s2rOlug==","signatures":[{"sig":"MEUCIQC0HFeU5B6+5Gw4L4/IcYa/7HIiTq94YKM3xTuwvHX0DgIgWffasGGbNXQOZoB2DjmxTakl+SA4eaO9B9S0awaYNHA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62882},"main":"index.js","engines":{"node":">=8"},"gitHead":"4e22f3bc8eb43614fe63ec751d7d122e819209cb","private":false,"scripts":{"test":"nyc --cache mocha ./test/_spec.js --timeout=8000","coverage":"nyc report --reporter=lcov --reporter=html"},"_npmUser":{"name":"atx-dgr","email":"david.grimbichler@autexis.com"},"_npmVersion":"10.8.2","description":"A Node-RED Context store plugin backed by Redis","directories":{},"_nodeVersion":"18.20.8","dependencies":{"redis":"^5.6.0","@node-red/util":"^4.0.9","json-stringify-safe":"^5.0.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^17.1.0","chai":"^4.5.0","mocha":"^11.7.1","sinon":"^21.0.0","should":"^13.2.3","should-sinon":"^0.0.6"},"_npmOperationalInternal":{"tmp":"tmp/node-red-context-redis_1.0.0-rc2_1754906537239_0.8549623711054966","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@autexis/node-red-context-redis","version":"1.0.0","keywords":["node-red","redis"],"license":"Apache-2.0","_id":"@autexis/node-red-context-redis@1.0.0","maintainers":[{"name":"joel.wasmer.autexis","email":"joel.wasmer@autexis.com"},{"name":"remo_koethe","email":"remo.koethe@autexis.com"},{"name":"atx-dgr","email":"david.grimbichler@autexis.com"},{"name":"thomas.frei.autexis","email":"thomas.frei@autexis.com"}],"dist":{"shasum":"d9bef127ff043699ed94d4cbcc0077727da60ed1","tarball":"https://registry.npmjs.org/@autexis/node-red-context-redis/-/node-red-context-redis-1.0.0.tgz","fileCount":6,"integrity":"sha512-lz5gaLhTq0Gp0dBZrvLEl6AaKGvSlGowByMuYk1mO4yvuBjyWgtx8ZSnxcsj7XtAx2H3K/JBTYkLC6K3yaQU4w==","signatures":[{"sig":"MEUCIHqm665fUzEDMNCXqu7rLTgKixUR1BlnjhkbW0GpZ5s/AiEAyuc4PyCfgTuRGF79c95nL43S/TMbjMK+iVMk8oktL1I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62878},"main":"index.js","engines":{"node":">=8"},"gitHead":"97f6a2c94e4328e504ff4596ee0c962e7588c89e","private":false,"scripts":{"test":"nyc --cache mocha ./test/_spec.js --timeout=8000","coverage":"nyc report --reporter=lcov --reporter=html"},"_npmUser":{"name":"atx-dgr","email":"david.grimbichler@autexis.com"},"_npmVersion":"10.8.2","description":"A Node-RED Context store plugin backed by Redis","directories":{},"_nodeVersion":"18.20.8","dependencies":{"redis":"^5.6.0","@node-red/util":"^4.0.9","json-stringify-safe":"^5.0.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^17.1.0","chai":"^4.5.0","mocha":"^11.7.1","sinon":"^21.0.0","should":"^13.2.3","should-sinon":"^0.0.6"},"_npmOperationalInternal":{"tmp":"tmp/node-red-context-redis_1.0.0_1754906824034_0.5287664064447759","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@autexis/node-red-context-redis","version":"1.0.1","description":"A Node-RED Context store plugin backed by Redis","main":"index.js","private":false,"scripts":{"test":"nyc --cache mocha ./test/_spec.js --timeout=8000","coverage":"nyc report --reporter=lcov --reporter=html"},"license":"Apache-2.0","dependencies":{"@node-red/util":"^4.0.9","json-stringify-safe":"^5.0.1","redis":"^5.6.0"},"devDependencies":{"chai":"^4.5.0","mocha":"^11.7.1","nyc":"^17.1.0","should":"^13.2.3","should-sinon":"^0.0.6","sinon":"^21.0.0"},"keywords":["node-red","redis"],"engines":{"node":">=8"},"_id":"@autexis/node-red-context-redis@1.0.1","gitHead":"52d7fec333978a232af48b022524ed16c6dc9c7e","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-LBGlS/iLK2icc8HZUraAfsmkzThjGiWGOubWviUdxVqpZr8C/mHELePQsjKHWT/jthrpMbPuWz/KdwjxrccQOw==","shasum":"b5c7910729044eaa42c8c41437fb5964e15d6b34","tarball":"https://registry.npmjs.org/@autexis/node-red-context-redis/-/node-red-context-redis-1.0.1.tgz","fileCount":6,"unpackedSize":63204,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDLa7u62gu87qf/YEAlzqLYG7URA47RNv6Z5J2Aao7pnwIga+XVVEylcITwkMhApraymRgE4K+hCrKOZS/+At0z9Cg="}]},"_npmUser":{"name":"atx-dgr","email":"david.grimbichler@autexis.com"},"directories":{},"maintainers":[{"name":"joel.wasmer.autexis","email":"joel.wasmer@autexis.com"},{"name":"remo_koethe","email":"remo.koethe@autexis.com"},{"name":"atx-dgr","email":"david.grimbichler@autexis.com"},{"name":"thomas.frei.autexis","email":"thomas.frei@autexis.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-red-context-redis_1.0.1_1755535406967_0.03531087494004859"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-11T09:46:18.522Z","modified":"2025-08-18T16:43:27.418Z","1.0.0-rc1":"2025-08-11T09:46:18.797Z","1.0.0-rc2":"2025-08-11T10:02:17.434Z","1.0.0":"2025-08-11T10:07:04.224Z","1.0.1":"2025-08-18T16:43:27.191Z"},"license":"Apache-2.0","keywords":["node-red","redis"],"description":"A Node-RED Context store plugin backed by Redis","maintainers":[{"name":"joel.wasmer.autexis","email":"joel.wasmer@autexis.com"},{"name":"remo_koethe","email":"remo.koethe@autexis.com"},{"name":"atx-dgr","email":"david.grimbichler@autexis.com"},{"name":"thomas.frei.autexis","email":"thomas.frei@autexis.com"}],"readme":"# Redis plugin (Autexis fork)\n\nThe Redis plugin holds context data in the Redis or a Redis Sentinel cluster.\n\n## Pre-requisite\n\nTo run this you need a Redis server running. For details see <a href=\"http://redis.io/\" target=\"_new\">the Redis site</a>.\n\n## Install\n\n1. Run the following command in your Node-RED user directory - typically `~/.node-red`\n\n    npm install git+https://github.com/node-red/node-red-context-redis\n\n1. Add a configuration in settings.js:\n\n```javascript\ncontextStorage: {\n    redis: {\n        module: require(\"node-red-context-redis\"),\n        config: {\n            // see below options\n        }\n    }\n}\n```\n\n### Options\n\nThis plugin exposes some options defined in [node_redis](https://github.com/NodeRedis/node_redis) as itself options.\nIt needs following configuration options:\n\n| Options        | Description                                                                                                 |\n| -------------- | ----------------------------------------------------------------------------------------------------------- |\n| host           | The IP address of the Redis server.    `Default: \"127.0.0.1\"`                                               |\n| port           | The port of the Redis server.          `Default: 6379`                                                      |\n| db             | The Redis logical database to connect. `Default: 0`                                                         |\n| prefix         | If set, the string used to prefix all used keys.                                                            |\n| password       | If set, the plugin will run Redis AUTH command on connect. *Note: the password will be sent as plaintext.*  |\n| tls            | An object containing options to pass to tls.connect to set up a TLS connection to the server.               |\n| retry_strategy | Specifies a function to reconnect if the connection to Redis is lost.                                       |\n|                | `default: undefined (Use the default retry strategy)`                                                       |\n\nsee https://github.com/NodeRedis/node_redis#options-object-properties\n\n## Data Model\n\n```text\nNode-RED                      Redis\n+-------------------+         +-------------------------------+\n| global context    |         | logical database              |\n| +---------------+ |         | +---------------------------+ |\n| | +-----+-----+ | |         | | +-----------------+-----+ | |\n| | | key |value| | | <-----> | | | global:key      |value| | |\n| | +-----+-----+ | |         | | +-----------------+-----+ | |\n| +---------------+ |         | |                           | |\n|                   |         | |                           | |\n| flow context      |         | |                           | |\n| +---------------+ |         | |                           | |\n| | +-----+-----+ | |         | | +-----------------+-----+ | |\n| | | key |value| | | <-----> | | | <flow's id>:key |value| | |\n| | +-----+-----+ | |         | | +-----------------+-----+ | |\n| +---------------+ |         | |                           | |\n|                   |         | |                           | |\n| node context      |         | |                           | |\n| +---------------+ |         | |                           | |\n| | +-----+-----+ | |         | | +-----------------+-----+ | |\n| | | key |value| | | <-----> | | | <node's id>:key |value| | |\n| | +-----+-----+ | |         | | +-----------------+-----+ | |\n| +---------------+ |         | +---------------------------+ |\n+-------------------+         +-------------------------------+\n```\n\n- This plugin uses a Redis logical database for all context scope.\n- This plugin prefixes all used keys with context scope in order to identify the scope of the key.\n  - The keys of `global context` will be prefixed with `global:` .\n    e.g.  Set `\"foo\"` to hold `\"bar\"` in the global context -> Set `\"global:foo\"` to hold `\"bar\"` in the Redis logical database.\n  - The keys of `flow context` will be prefixed with `<id of the flow>:` .\n    e.g.  Set `\"foo\"` to hold `\"bar\"` in the flow context whose id is `8588e4b8.784b38` -> Set `\"8588e4b8.784b38:foo\"` to hold `\"bar\"` in the Redis.\n  - The keys of `node context` will be prefixed with `<id of the node>:` .\n    e.g.  Set `\"foo\"` to hold `\"bar\"` in the node context whose id is `80d8039e.2b82:8588e4b8.784b38` -> Set `\"80d8039e.2b82:8588e4b8.784b38:foo\"` to hold `\"bar\"` in the Redis.\n\n## Data Structure\n\n- This plugin converts a value of context to JSON and stores it as string type to the Redis.\n- After getting a value from the Redis, the plugin also converts the value to an object or a primitive value.\n\n```text\nNode-RED                                 Redis\n+------------------------------+         +---------------------------------------------+\n| global context               |         | logical database                            |\n| +--------------------------+ |         | +-----------------------------------------+ |\n| | +--------+-------------+ | |         | | +---------------+---------------------+ | |\n| | | str    | \"foo\"       | | | <-----> | | | global:str    | \"\\\"foo\\\"\"           | | |\n| | +--------+-------------+ | |         | | +---------------+---------------------+ | |\n| | | num    | 1           | | | <-----> | | | global:num    | \"1\"                 | | |\n| | +--------+-------------+ | |         | | +---------------+---------------------+ | |\n| | | nstr   | \"10\"        | | | <-----> | | | global:nstr   | \"\\\"10\\\"\"            | | |\n| | +--------+-------------+ | |         | | +---------------+---------------------+ | |\n| | | bool   | false       | | | <-----> | | | global:bool   | \"false\"             | | |\n| | +--------+-------------+ | |         | | +---------------+---------------------+ | |\n| | | arr    | [\"a\",\"b\"]   | | | <-----> | | | global:arr    | \"[\\\"a\\\",\\\"b\\\"]\"     | | |\n| | +--------+-------------+ | |         | | +---------------+---------------------+ | |\n| | | obj    | {foo,\"bar\"} | | | <-----> | | | global:obj    | \"{\\\"foo\\\",\\\"bar\\\"}\" | | |\n| | +--------+-------------+ | |         | | +---------------+---------------------+ | |\n| +--------------------------+ |         | +-----------------------------------------+ |\n+------------------------------+         +---------------------------------------------+\n```\n\nOther Redis client(e.g. redis-cli) can get the value stored by Node-RED like followings.\n\nNode-RED\n\n```javascript\nglobal.set(\"foo\",\"bar\",\"redis\");\nglobal.set(\"obj\",{key:\"value\"},\"redis\");\n```\n\nredis-cli\n\n```console\nredis> GET global:foo\n\"\\\"var\\\"\"\nredis> GET global:obj\n\"{\\\"key\\\":\\\"value\\\"}\"\nredis>\n```\n","readmeFilename":"Readme.md"}