node-red-contrib-test-kido 0.0.0-stage → 0.1.1
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 +8 -2
- package/package.json +15 -4
- package/subflow.js +9 -0
- package/subflow.json +103 -0
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# node-red-contrib-test-kido
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Node-RED node generated from subflow Test
|
|
4
|
+
|
|
5
|
+
## Instalación
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install node-red-contrib-test-kido
|
|
9
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-test-kido",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Node-RED node generated from subflow Test",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"node-red",
|
|
7
|
+
"subflow"
|
|
8
|
+
],
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"author": "Vicente Rodriguez",
|
|
11
|
+
"dependencies": {},
|
|
12
|
+
"node-red": {
|
|
13
|
+
"nodes": {
|
|
14
|
+
"test": "subflow.js"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/subflow.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
|
|
4
|
+
module.exports = function (RED) {
|
|
5
|
+
const subflowFile = path.join(__dirname, "subflow.json");
|
|
6
|
+
const subflowContents = fs.readFileSync(subflowFile, "utf8");
|
|
7
|
+
const subflowJSON = JSON.parse(subflowContents);
|
|
8
|
+
RED.nodes.registerSubflow(subflowJSON);
|
|
9
|
+
};
|
package/subflow.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "942a1be5267d843e",
|
|
3
|
+
"type": "subflow",
|
|
4
|
+
"name": "Test",
|
|
5
|
+
"info": "",
|
|
6
|
+
"category": "",
|
|
7
|
+
"in": [
|
|
8
|
+
{
|
|
9
|
+
"x": 100,
|
|
10
|
+
"y": 140,
|
|
11
|
+
"wires": [
|
|
12
|
+
{
|
|
13
|
+
"id": "a65114f1bda3df9e"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"out": [
|
|
19
|
+
{
|
|
20
|
+
"x": 620,
|
|
21
|
+
"y": 140,
|
|
22
|
+
"wires": [
|
|
23
|
+
{
|
|
24
|
+
"id": "a65114f1bda3df9e",
|
|
25
|
+
"port": 0
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"env": [
|
|
31
|
+
{
|
|
32
|
+
"name": "Test",
|
|
33
|
+
"type": "str",
|
|
34
|
+
"value": "",
|
|
35
|
+
"ui": {
|
|
36
|
+
"label": {
|
|
37
|
+
"es-ES": "Test"
|
|
38
|
+
},
|
|
39
|
+
"type": "input",
|
|
40
|
+
"opts": {
|
|
41
|
+
"types": [
|
|
42
|
+
"str",
|
|
43
|
+
"num",
|
|
44
|
+
"bool",
|
|
45
|
+
"json",
|
|
46
|
+
"bin",
|
|
47
|
+
"env",
|
|
48
|
+
"conf-types"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"meta": {},
|
|
55
|
+
"color": "#DDAA99",
|
|
56
|
+
"flow": [
|
|
57
|
+
{
|
|
58
|
+
"id": "a65114f1bda3df9e",
|
|
59
|
+
"type": "change",
|
|
60
|
+
"z": "942a1be5267d843e",
|
|
61
|
+
"name": "",
|
|
62
|
+
"rules": [
|
|
63
|
+
{
|
|
64
|
+
"t": "set",
|
|
65
|
+
"p": "payload",
|
|
66
|
+
"pt": "msg",
|
|
67
|
+
"to": "Test",
|
|
68
|
+
"tot": "env"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"action": "",
|
|
72
|
+
"property": "",
|
|
73
|
+
"from": "",
|
|
74
|
+
"to": "",
|
|
75
|
+
"reg": false,
|
|
76
|
+
"x": 400,
|
|
77
|
+
"y": 140,
|
|
78
|
+
"wires": [
|
|
79
|
+
[]
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "02b36c5d5e47a0a8",
|
|
84
|
+
"type": "subflow:942a1be5267d843e",
|
|
85
|
+
"z": "ff311e6777219c04",
|
|
86
|
+
"name": "",
|
|
87
|
+
"env": [
|
|
88
|
+
{
|
|
89
|
+
"name": "Test",
|
|
90
|
+
"value": "holaaaa",
|
|
91
|
+
"type": "str"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"x": 430,
|
|
95
|
+
"y": 140,
|
|
96
|
+
"wires": [
|
|
97
|
+
[
|
|
98
|
+
"b341ecb2194a9f45"
|
|
99
|
+
]
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|