n8n-nodes-bozonx-redis-sugar 1.7.0
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/README.md +130 -0
- package/dist/credentials/BozonxRedis.credentials.d.ts +8 -0
- package/dist/credentials/BozonxRedis.credentials.js +68 -0
- package/dist/credentials/BozonxRedis.credentials.js.map +1 -0
- package/dist/nodes/RedisCache/BozonxRedisCache.node.d.ts +10 -0
- package/dist/nodes/RedisCache/BozonxRedisCache.node.js +380 -0
- package/dist/nodes/RedisCache/BozonxRedisCache.node.js.map +1 -0
- package/dist/nodes/RedisCache/redis-cache.dark.svg +19 -0
- package/dist/nodes/RedisCache/redis-cache.svg +24 -0
- package/dist/nodes/RedisCache/redisClient.d.ts +20 -0
- package/dist/nodes/RedisCache/redisClient.js +95 -0
- package/dist/nodes/RedisCache/redisClient.js.map +1 -0
- package/dist/nodes/RedisStreamProducer/BozonxRedisStreamProducer.node.d.ts +5 -0
- package/dist/nodes/RedisStreamProducer/BozonxRedisStreamProducer.node.js +315 -0
- package/dist/nodes/RedisStreamProducer/BozonxRedisStreamProducer.node.js.map +1 -0
- package/dist/nodes/RedisStreamProducer/redis-stream-producer.dark.svg +18 -0
- package/dist/nodes/RedisStreamProducer/redis-stream-producer.svg +18 -0
- package/dist/nodes/RedisStreamProducer/redisClient.d.ts +9 -0
- package/dist/nodes/RedisStreamProducer/redisClient.js +70 -0
- package/dist/nodes/RedisStreamProducer/redisClient.js.map +1 -0
- package/dist/nodes/RedisStreamTrigger/BozonxRedisStreamTrigger.node.d.ts +5 -0
- package/dist/nodes/RedisStreamTrigger/BozonxRedisStreamTrigger.node.js +277 -0
- package/dist/nodes/RedisStreamTrigger/BozonxRedisStreamTrigger.node.js.map +1 -0
- package/dist/nodes/RedisStreamTrigger/redis-stream-trigger.dark.svg +19 -0
- package/dist/nodes/RedisStreamTrigger/redis-stream-trigger.svg +19 -0
- package/dist/package.json +53 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# n8n Nodes: Bozonx Redis Nodes (Cache + Streams)
|
|
2
|
+
|
|
3
|
+
Community nodes for n8n to work with Redis:
|
|
4
|
+
|
|
5
|
+
- Redis Cache: read/write JSON values with optional TTL
|
|
6
|
+
- Redis Pub: append entries to Redis Streams (XADD)
|
|
7
|
+
- Redis Stream Trigger: emit items from Redis Streams (XREAD)
|
|
8
|
+
|
|
9
|
+
n8n is a fair-code licensed workflow automation platform: https://n8n.io/
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Follow the official community nodes installation guide: https://docs.n8n.io/integrations/community-nodes/installation/
|
|
14
|
+
|
|
15
|
+
Package name: `n8n-nodes-bozonx-redis-nodes`
|
|
16
|
+
|
|
17
|
+
## Credentials
|
|
18
|
+
|
|
19
|
+
All nodes use the same credentials: Redis
|
|
20
|
+
|
|
21
|
+
- Host (default: `localhost`)
|
|
22
|
+
- Port (default: `6379`)
|
|
23
|
+
- Username (optional)
|
|
24
|
+
- Password (optional)
|
|
25
|
+
- TLS (boolean)
|
|
26
|
+
- DB Index (default: `0`)
|
|
27
|
+
|
|
28
|
+
You can use expressions and env vars, e.g. `{{$env.REDIS_HOST}}`, `{{$env.REDIS_PASSWORD}}`.
|
|
29
|
+
|
|
30
|
+
## Nodes
|
|
31
|
+
|
|
32
|
+
### 1) Redis Cache
|
|
33
|
+
|
|
34
|
+
- Mode: Write or Read
|
|
35
|
+
- Key: Redis key
|
|
36
|
+
- Write → Payload Type: JSON or Custom Fields
|
|
37
|
+
- TTL: value + unit (0 disables expiration)
|
|
38
|
+
|
|
39
|
+
Write result: `{ ok: true, key, ttlSeconds, data }`
|
|
40
|
+
|
|
41
|
+
Read result hit: `{ found: true, key, data }`
|
|
42
|
+
|
|
43
|
+
Read result miss: `{ found: false, key }`
|
|
44
|
+
|
|
45
|
+
Details:
|
|
46
|
+
- When Payload Type is JSON, a valid JSON string is required.
|
|
47
|
+
- When Payload Type is Data Fields, you can add multiple fields with a selected value type (string, number, boolean, json, null). JSON values are validated and stringified.
|
|
48
|
+
- TTL is optional; set to 0 to store without expiration. Units supported: seconds, minutes, hours, days.
|
|
49
|
+
|
|
50
|
+
### 2) Redis Pub (Streams)
|
|
51
|
+
|
|
52
|
+
- Event name: Redis stream key
|
|
53
|
+
- Payload Mode: Text, JSON, or Key-Value
|
|
54
|
+
- Stream trimming: `MAXLEN ~ 1000000`
|
|
55
|
+
- Stream TTL: `EXPIRE 86400` seconds
|
|
56
|
+
|
|
57
|
+
Output item example:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{ "payload": <parsed_payload>, "_stream": "mystream", "_id": "1728666000000-0" }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Details:
|
|
64
|
+
- Text mode sends a single field "payload" with the provided text.
|
|
65
|
+
- JSON mode sends a single field "data". If left empty, the incoming item is used and stringified.
|
|
66
|
+
- Key-Value mode lets you define typed fields (string, number, boolean, json, null). Invalid JSON values are rejected.
|
|
67
|
+
|
|
68
|
+
### 3) Redis Stream Trigger (Streams)
|
|
69
|
+
|
|
70
|
+
- Stream Key
|
|
71
|
+
- Allowed Stale (Seconds): if > 0, on start emit recent entries; 0 → only new
|
|
72
|
+
- Blocking read: `BLOCK 10000`, batch size: `COUNT 50`
|
|
73
|
+
- Persists last ID in workflow static data
|
|
74
|
+
|
|
75
|
+
Emitted item example:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{ "payload": <parsed_payload_or_fields>, "_stream": "mystream", "_id": "1728666000000-0" }
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Quick Start
|
|
82
|
+
|
|
83
|
+
1. Create Redis credentials in n8n
|
|
84
|
+
2. Redis Cache (Write): set key, payload JSON, TTL
|
|
85
|
+
3. Redis Cache (Read): set same key
|
|
86
|
+
4. Redis Pub: set stream key and payload
|
|
87
|
+
5. Redis Stream Trigger: set same stream key, optional Allowed Stale
|
|
88
|
+
|
|
89
|
+
## Usage Examples
|
|
90
|
+
|
|
91
|
+
- Redis Cache (Write JSON):
|
|
92
|
+
- Mode: Write
|
|
93
|
+
- Key: `cache:user:42`
|
|
94
|
+
- Payload Type: JSON
|
|
95
|
+
- Data: `{ "id": 42, "name": "Ada" }`
|
|
96
|
+
- TTL Unit: hours, TTL Value: 24
|
|
97
|
+
|
|
98
|
+
- Redis Cache (Read):
|
|
99
|
+
- Mode: Read
|
|
100
|
+
- Key: `cache:user:42`
|
|
101
|
+
|
|
102
|
+
- Redis Pub (JSON):
|
|
103
|
+
- Stream Key: `my-service:main`
|
|
104
|
+
- Payload Mode: JSON
|
|
105
|
+
- Payload: leave empty to send the incoming item as JSON
|
|
106
|
+
|
|
107
|
+
- Redis Stream Trigger:
|
|
108
|
+
- Stream Key: `my-service:main`
|
|
109
|
+
- Allowed Stale (Seconds): `0` for only new entries
|
|
110
|
+
|
|
111
|
+
## Development
|
|
112
|
+
|
|
113
|
+
- Install deps: `pnpm install`
|
|
114
|
+
- Lint: `pnpm lint`
|
|
115
|
+
- Build: `pnpm build`
|
|
116
|
+
- Dev (watch): `pnpm dev` or `pnpm run build:watch`
|
|
117
|
+
|
|
118
|
+
Before publishing, the CLI will run `n8n-node prerelease` automatically.
|
|
119
|
+
|
|
120
|
+
Publishing options:
|
|
121
|
+
- n8n Community Node flow: `pnpm release:n8n`
|
|
122
|
+
- Plain npm publish (without n8n flow): see `dev_docs/publish.md`
|
|
123
|
+
|
|
124
|
+
## Compatibility
|
|
125
|
+
|
|
126
|
+
Built and tested with n8n 1.60.0+ and node-redis 5.x.
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
MIT
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BozonxRedis = void 0;
|
|
4
|
+
class BozonxRedis {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'bozonxRedis';
|
|
7
|
+
this.displayName = 'Redis';
|
|
8
|
+
this.documentationUrl = 'https://github.com/bozonx/ivan-k-automation-tools/tree/main/n8n-nodes-bozonx-redis-nodes#readme';
|
|
9
|
+
this.icon = {
|
|
10
|
+
light: 'file:../nodes/RedisCache/redis-cache.svg',
|
|
11
|
+
dark: 'file:../nodes/RedisCache/redis-cache.dark.svg',
|
|
12
|
+
};
|
|
13
|
+
this.properties = [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'Host',
|
|
16
|
+
name: 'host',
|
|
17
|
+
type: 'string',
|
|
18
|
+
default: 'localhost',
|
|
19
|
+
required: true,
|
|
20
|
+
placeholder: 'localhost',
|
|
21
|
+
description: 'Redis host name or IP address',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
displayName: 'Port',
|
|
25
|
+
name: 'port',
|
|
26
|
+
type: 'number',
|
|
27
|
+
typeOptions: { minValue: 1, maxValue: 65535 },
|
|
28
|
+
default: 6379,
|
|
29
|
+
required: true,
|
|
30
|
+
description: 'Redis TCP port number',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Username',
|
|
34
|
+
name: 'username',
|
|
35
|
+
type: 'string',
|
|
36
|
+
default: '',
|
|
37
|
+
placeholder: 'myuser',
|
|
38
|
+
description: 'Redis ACL username (leave empty if not required)',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
displayName: 'Password',
|
|
42
|
+
name: 'password',
|
|
43
|
+
type: 'string',
|
|
44
|
+
typeOptions: { password: true },
|
|
45
|
+
default: '',
|
|
46
|
+
placeholder: '********',
|
|
47
|
+
description: 'Password for authentication (leave empty if not required)',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
displayName: 'TLS',
|
|
51
|
+
name: 'tls',
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
default: false,
|
|
54
|
+
description: 'Enable TLS/SSL encryption for the connection',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'DB Index',
|
|
58
|
+
name: 'db',
|
|
59
|
+
type: 'number',
|
|
60
|
+
typeOptions: { minValue: 0, maxValue: 15 },
|
|
61
|
+
default: 0,
|
|
62
|
+
description: 'Database index number (0 by default)',
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.BozonxRedis = BozonxRedis;
|
|
68
|
+
//# sourceMappingURL=BozonxRedis.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BozonxRedis.credentials.js","sourceRoot":"","sources":["../../credentials/BozonxRedis.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAG,OAAO,CAAC;QACtB,qBAAgB,GACf,iGAAiG,CAAC;QACnG,SAAI,GAAS;YACZ,KAAK,EAAE,0CAA0C;YACjD,IAAI,EAAE,+CAA+C;SACrD,CAAC;QACF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,WAAW;gBACpB,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,WAAW;gBACxB,WAAW,EAAE,+BAA+B;aAC5C;YACD;gBACC,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAC7C,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,uBAAuB;aACpC;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,QAAQ;gBACrB,WAAW,EAAE,kDAAkD;aAC/D;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,UAAU;gBACvB,WAAW,EAAE,2DAA2D;aACxE;YACD;gBACC,WAAW,EAAE,KAAK;gBAClB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,8CAA8C;aAC3D;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;gBAC1C,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,sCAAsC;aACnD;SACD,CAAC;IACH,CAAC;CAAA;AA7DD,kCA6DC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type IExecuteFunctions, type INodeExecutionData, type INodeType, type INodeTypeDescription, type ICredentialTestFunctions, type INodeCredentialTestResult, type ICredentialsDecrypted } from 'n8n-workflow';
|
|
2
|
+
export declare class BozonxRedisCache implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
credentialTest: {
|
|
6
|
+
bozonxRedis(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BozonxRedisCache = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const redisClient_1 = require("./redisClient");
|
|
6
|
+
class BozonxRedisCache {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.description = {
|
|
9
|
+
displayName: 'Redis Cache',
|
|
10
|
+
name: 'bozonxRedisCache',
|
|
11
|
+
group: ['transform'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '={{$parameter["mode"] + ": " + $parameter["key"]}}',
|
|
14
|
+
description: 'Read and write JSON values in Redis',
|
|
15
|
+
defaults: { name: 'Redis Cache' },
|
|
16
|
+
icon: 'file:redis-cache.svg',
|
|
17
|
+
inputs: ['main'],
|
|
18
|
+
outputs: ['main'],
|
|
19
|
+
documentationUrl: 'https://github.com/bozonx/ivan-k-automation-tools/tree/main/n8n-nodes-bozonx-redis-nodes#readme',
|
|
20
|
+
credentials: [
|
|
21
|
+
{
|
|
22
|
+
name: 'bozonxRedis',
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
properties: [
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Mode',
|
|
29
|
+
name: 'mode',
|
|
30
|
+
type: 'options',
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Write',
|
|
34
|
+
value: 'write',
|
|
35
|
+
description: 'Store JSON under the given key (optional TTL)',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Read',
|
|
39
|
+
value: 'read',
|
|
40
|
+
description: 'Fetch and parse JSON stored under the key',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
default: 'write',
|
|
44
|
+
description: 'Choose whether to write to or read from Redis',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Key',
|
|
48
|
+
name: 'key',
|
|
49
|
+
type: 'string',
|
|
50
|
+
default: '',
|
|
51
|
+
required: true,
|
|
52
|
+
placeholder: 'cache:my-key',
|
|
53
|
+
description: 'Redis key to write to or read from',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Payload Type',
|
|
57
|
+
name: 'payloadType',
|
|
58
|
+
type: 'options',
|
|
59
|
+
options: [
|
|
60
|
+
{ name: 'Data Fields', value: 'fields' },
|
|
61
|
+
{ name: 'JSON', value: 'json' },
|
|
62
|
+
],
|
|
63
|
+
default: 'fields',
|
|
64
|
+
description: 'Choose how you will provide the data to store',
|
|
65
|
+
displayOptions: { show: { mode: ['write'] } },
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
displayName: 'Data (JSON)',
|
|
69
|
+
name: 'data',
|
|
70
|
+
type: 'string',
|
|
71
|
+
typeOptions: { rows: 5 },
|
|
72
|
+
default: '',
|
|
73
|
+
required: true,
|
|
74
|
+
placeholder: '{ "foo": "bar" }',
|
|
75
|
+
description: 'JSON to store at the key. Must be valid JSON.',
|
|
76
|
+
displayOptions: { show: { mode: ['write'], payloadType: ['json'] } },
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Fields',
|
|
80
|
+
name: 'fields',
|
|
81
|
+
type: 'fixedCollection',
|
|
82
|
+
typeOptions: { multipleValues: true },
|
|
83
|
+
default: {},
|
|
84
|
+
placeholder: 'Add Field',
|
|
85
|
+
description: 'Define fields that will be composed into a JSON object',
|
|
86
|
+
displayOptions: { show: { mode: ['write'], payloadType: ['fields'] } },
|
|
87
|
+
options: [
|
|
88
|
+
{
|
|
89
|
+
name: 'field',
|
|
90
|
+
displayName: 'Field',
|
|
91
|
+
values: [
|
|
92
|
+
{
|
|
93
|
+
displayName: 'Boolean Value',
|
|
94
|
+
name: 'valueBoolean',
|
|
95
|
+
type: 'boolean',
|
|
96
|
+
default: false,
|
|
97
|
+
description: 'Whether the field value is true or false',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
displayName: 'JSON Value',
|
|
101
|
+
name: 'valueJson',
|
|
102
|
+
type: 'string',
|
|
103
|
+
default: '',
|
|
104
|
+
placeholder: '{ \'nested\': true }',
|
|
105
|
+
description: 'Provide valid JSON to be parsed as the field value (e.g. object or array)',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
displayName: 'Key',
|
|
109
|
+
name: 'key',
|
|
110
|
+
type: 'string',
|
|
111
|
+
default: '',
|
|
112
|
+
required: true,
|
|
113
|
+
placeholder: 'userId',
|
|
114
|
+
description: 'Field name in the resulting JSON object',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
displayName: 'Number Value',
|
|
118
|
+
name: 'valueNumber',
|
|
119
|
+
type: 'number',
|
|
120
|
+
default: 0,
|
|
121
|
+
placeholder: '42',
|
|
122
|
+
description: 'Numeric value for the field',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
displayName: 'String Value',
|
|
126
|
+
name: 'valueString',
|
|
127
|
+
type: 'string',
|
|
128
|
+
default: '',
|
|
129
|
+
placeholder: 'john.doe',
|
|
130
|
+
description: 'Text value for the field',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
displayName: 'Type',
|
|
134
|
+
name: 'valueType',
|
|
135
|
+
type: 'options',
|
|
136
|
+
options: [
|
|
137
|
+
{
|
|
138
|
+
name: 'Boolean',
|
|
139
|
+
value: 'boolean',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'JSON',
|
|
143
|
+
value: 'json',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'Null',
|
|
147
|
+
value: 'null',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'Number',
|
|
151
|
+
value: 'number',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'String',
|
|
155
|
+
value: 'string',
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
default: 'string',
|
|
159
|
+
description: 'Type of the value to serialize into JSON',
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
displayName: 'TTL Unit',
|
|
167
|
+
name: 'ttlUnit',
|
|
168
|
+
type: 'options',
|
|
169
|
+
options: [
|
|
170
|
+
{ name: 'Seconds', value: 'seconds' },
|
|
171
|
+
{ name: 'Minutes', value: 'minutes' },
|
|
172
|
+
{ name: 'Hours', value: 'hours' },
|
|
173
|
+
{ name: 'Days', value: 'days' },
|
|
174
|
+
],
|
|
175
|
+
default: 'hours',
|
|
176
|
+
description: 'Time unit for the TTL',
|
|
177
|
+
displayOptions: { show: { mode: ['write'] } },
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
displayName: 'TTL Value',
|
|
181
|
+
name: 'ttl',
|
|
182
|
+
type: 'number',
|
|
183
|
+
typeOptions: { minValue: 0 },
|
|
184
|
+
default: 1,
|
|
185
|
+
placeholder: '0',
|
|
186
|
+
description: 'Time-to-live value. Set 0 for no expiration.',
|
|
187
|
+
displayOptions: { show: { mode: ['write'] } },
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
usableAsTool: true,
|
|
191
|
+
};
|
|
192
|
+
this.methods = {
|
|
193
|
+
credentialTest: {
|
|
194
|
+
async bozonxRedis(credential) {
|
|
195
|
+
var _a, _b;
|
|
196
|
+
try {
|
|
197
|
+
const creds = credential.data;
|
|
198
|
+
const options = {
|
|
199
|
+
host: creds.host || 'localhost',
|
|
200
|
+
port: (_a = creds.port) !== null && _a !== void 0 ? _a : 6379,
|
|
201
|
+
username: creds.username || undefined,
|
|
202
|
+
password: creds.password || undefined,
|
|
203
|
+
tls: Boolean(creds.tls),
|
|
204
|
+
db: (_b = creds.db) !== null && _b !== void 0 ? _b : 0,
|
|
205
|
+
};
|
|
206
|
+
const client = await (0, redisClient_1.createRedisClientConnected)(options);
|
|
207
|
+
await client.quit();
|
|
208
|
+
return { status: 'OK', message: 'Connection successful' };
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
return { status: 'Error', message: error.message };
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
async execute() {
|
|
218
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
219
|
+
const items = this.getInputData();
|
|
220
|
+
const returnData = [];
|
|
221
|
+
const creds = await this.getCredentials('bozonxRedis');
|
|
222
|
+
const options = {
|
|
223
|
+
host: (creds === null || creds === void 0 ? void 0 : creds.host) || 'localhost',
|
|
224
|
+
port: (_a = creds === null || creds === void 0 ? void 0 : creds.port) !== null && _a !== void 0 ? _a : 6379,
|
|
225
|
+
username: (creds === null || creds === void 0 ? void 0 : creds.username) || undefined,
|
|
226
|
+
password: (creds === null || creds === void 0 ? void 0 : creds.password) || undefined,
|
|
227
|
+
tls: Boolean(creds === null || creds === void 0 ? void 0 : creds.tls),
|
|
228
|
+
db: (_b = creds === null || creds === void 0 ? void 0 : creds.db) !== null && _b !== void 0 ? _b : 0,
|
|
229
|
+
};
|
|
230
|
+
let client;
|
|
231
|
+
try {
|
|
232
|
+
client = await (0, redisClient_1.createRedisClientConnected)(options);
|
|
233
|
+
for (let i = 0; i < items.length; i++) {
|
|
234
|
+
try {
|
|
235
|
+
const mode = this.getNodeParameter('mode', i);
|
|
236
|
+
const key = this.getNodeParameter('key', i).trim();
|
|
237
|
+
if (!key) {
|
|
238
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Key must not be empty', { itemIndex: i });
|
|
239
|
+
}
|
|
240
|
+
if (mode === 'write') {
|
|
241
|
+
const payloadType = this.getNodeParameter('payloadType', i, 'json');
|
|
242
|
+
let normalized;
|
|
243
|
+
let payloadObj;
|
|
244
|
+
if (payloadType === 'json') {
|
|
245
|
+
const dataStr = this.getNodeParameter('data', i);
|
|
246
|
+
if (!dataStr) {
|
|
247
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Data (JSON) is required', {
|
|
248
|
+
itemIndex: i,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
try {
|
|
252
|
+
const parsed = JSON.parse(dataStr);
|
|
253
|
+
normalized = JSON.stringify(parsed);
|
|
254
|
+
payloadObj = parsed;
|
|
255
|
+
}
|
|
256
|
+
catch {
|
|
257
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid JSON provided in Data', {
|
|
258
|
+
itemIndex: i,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
const fields = this.getNodeParameter('fields', i, {}) || {};
|
|
264
|
+
const pairs = (_c = fields.field) !== null && _c !== void 0 ? _c : [];
|
|
265
|
+
const obj = {};
|
|
266
|
+
for (const pair of pairs) {
|
|
267
|
+
const k = String((_d = pair.key) !== null && _d !== void 0 ? _d : '').trim();
|
|
268
|
+
if (!k) {
|
|
269
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Field key must not be empty', {
|
|
270
|
+
itemIndex: i,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
const type = ((_e = pair.valueType) !== null && _e !== void 0 ? _e : 'string');
|
|
274
|
+
let value;
|
|
275
|
+
switch (type) {
|
|
276
|
+
case 'number': {
|
|
277
|
+
const raw = pair.valueNumber;
|
|
278
|
+
const n = Number(raw);
|
|
279
|
+
if (!Number.isFinite(n)) {
|
|
280
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid number for field "${k}"`, { itemIndex: i });
|
|
281
|
+
}
|
|
282
|
+
value = n;
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
case 'boolean': {
|
|
286
|
+
value = Boolean(pair.valueBoolean);
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
case 'null': {
|
|
290
|
+
value = null;
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
case 'json': {
|
|
294
|
+
const raw = pair.valueJson;
|
|
295
|
+
try {
|
|
296
|
+
value = raw ? JSON.parse(raw) : null;
|
|
297
|
+
}
|
|
298
|
+
catch {
|
|
299
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid JSON for field "${k}"`, { itemIndex: i });
|
|
300
|
+
}
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
case 'string':
|
|
304
|
+
default: {
|
|
305
|
+
value = (_f = pair.valueString) !== null && _f !== void 0 ? _f : '';
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
obj[k] = value;
|
|
310
|
+
}
|
|
311
|
+
normalized = JSON.stringify(obj);
|
|
312
|
+
payloadObj = obj;
|
|
313
|
+
}
|
|
314
|
+
const ttl = this.getNodeParameter('ttl', i, 0);
|
|
315
|
+
if (ttl < 0) {
|
|
316
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'TTL must be >= 0', { itemIndex: i });
|
|
317
|
+
}
|
|
318
|
+
const ttlUnit = this.getNodeParameter('ttlUnit', i, 'hours');
|
|
319
|
+
const ttlSeconds = (0, redisClient_1.ttlToSeconds)(ttl, ttlUnit);
|
|
320
|
+
if (ttlSeconds > 0) {
|
|
321
|
+
await client.set(key, normalized, { EX: ttlSeconds });
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
await client.set(key, normalized);
|
|
325
|
+
}
|
|
326
|
+
returnData.push({
|
|
327
|
+
json: { ok: true, key, ttlSeconds, data: payloadObj },
|
|
328
|
+
pairedItem: { item: i },
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
const value = await client.get(key);
|
|
333
|
+
if (value === null) {
|
|
334
|
+
returnData.push({
|
|
335
|
+
json: { found: false, key },
|
|
336
|
+
pairedItem: { item: i },
|
|
337
|
+
});
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
try {
|
|
341
|
+
const parsed = JSON.parse(value);
|
|
342
|
+
returnData.push({
|
|
343
|
+
json: { found: true, key, data: parsed },
|
|
344
|
+
pairedItem: { item: i },
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
catch {
|
|
348
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Stored value is not valid JSON', {
|
|
349
|
+
itemIndex: i,
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
catch (error) {
|
|
355
|
+
if (this.continueOnFail()) {
|
|
356
|
+
returnData.push({
|
|
357
|
+
json: { error: error.message },
|
|
358
|
+
pairedItem: { item: i },
|
|
359
|
+
});
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
throw error;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
finally {
|
|
367
|
+
if (client) {
|
|
368
|
+
try {
|
|
369
|
+
await client.quit();
|
|
370
|
+
}
|
|
371
|
+
catch {
|
|
372
|
+
(_g = client.destroy) === null || _g === void 0 ? void 0 : _g.call(client);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return [returnData];
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
exports.BozonxRedisCache = BozonxRedisCache;
|
|
380
|
+
//# sourceMappingURL=BozonxRedisCache.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BozonxRedisCache.node.js","sourceRoot":"","sources":["../../../nodes/RedisCache/BozonxRedisCache.node.ts"],"names":[],"mappings":";;;AAAA,+CAUsB;AAEtB,+CAIuB;AAWvB,MAAa,gBAAgB;IAA7B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,oDAAoD;YAC9D,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;YACjC,IAAI,EAAE,sBAAsB;YAC5B,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,gBAAgB,EACf,iGAAiG;YAClG,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,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M,CAAC,IAAI,EAAE,CAAC;gBACrB,CAAC;gBAAC,MAAM,CAAC;oBAER,MAAA,MAAM,CAAC,OAAO,sDAAI,CAAC;gBACpB,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AA3YD,4CA2YC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Redis Cache icon (dark)">
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="g" x1="0" y1="0" x2="0" y2="1">
|
|
5
|
+
<stop offset="0%" stop-color="#b22f2f"/>
|
|
6
|
+
<stop offset="100%" stop-color="#7a1d1d"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<g fill="none" fill-rule="evenodd">
|
|
10
|
+
<ellipse cx="32" cy="16" rx="22" ry="8" fill="url(#g)"/>
|
|
11
|
+
<path d="M10 16v14c0 4.418 9.85 8 22 8s22-3.582 22-8V16c0 4.418-9.85 8-22 8S10 20.418 10 16z" fill="#8e2424"/>
|
|
12
|
+
<ellipse cx="32" cy="30" rx="22" ry="8" fill="url(#g)"/>
|
|
13
|
+
<path d="M10 30v14c0 4.418 9.85 8 22 8s22-3.582 22-8V30c0 4.418-9.85 8-22 8S10 34.418 10 30z" fill="#6d1a1a"/>
|
|
14
|
+
<polygon points="32,12 34,15 38,16 35,18 36,22 32,20 28,22 29,18 26,16 30,15" fill="#ddd" opacity="0.85"/>
|
|
15
|
+
<text x="32" y="44" text-anchor="middle" font-family="Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif" font-size="10" font-weight="700" fill="#ffffff" stroke="#000000" stroke-width="0.8" paint-order="stroke">
|
|
16
|
+
cache
|
|
17
|
+
</text>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|