@gregoriusrippenstein/node-red-contrib-nodedev 0.1.0 → 0.1.2

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.
@@ -16,10 +16,10 @@
16
16
  "fc620efcbaf77846",
17
17
  "d981181116ccfb16"
18
18
  ],
19
- "x": 504,
20
- "y": 489.2857666015625,
21
- "w": 1037.857177734375,
22
- "h": 363.7142333984375
19
+ "x": 458,
20
+ "y": 493.2857666015625,
21
+ "w": 1099.857177734375,
22
+ "h": 378.7142333984375
23
23
  },
24
24
  {
25
25
  "id": "ea7b1b985ba6ac70",
@@ -32,13 +32,15 @@
32
32
  "hasbutton": false,
33
33
  "hasinput": true,
34
34
  "outputcount": 1,
35
- "autoimport": true,
36
35
  "category": "",
37
36
  "summary": "",
38
37
  "description": "",
39
38
  "icon": "font-awesome/fa-industry",
40
- "x": 1445.857177734375,
41
- "y": 532.2857666015625,
39
+ "frt2bakcomm": false,
40
+ "bak2frtcomm": false,
41
+ "createmanifest": false,
42
+ "x": 1461.857177734375,
43
+ "y": 574.2857666015625,
42
44
  "wires": [
43
45
  []
44
46
  ]
@@ -56,8 +58,8 @@
56
58
  "sendError": false,
57
59
  "encoding": "none",
58
60
  "allProps": false,
59
- "x": 1100.857177734375,
60
- "y": 590.2857666015625,
61
+ "x": 1018.857177734375,
62
+ "y": 579.2857666015625,
61
63
  "wires": [
62
64
  [
63
65
  "ea7b1b985ba6ac70"
@@ -76,8 +78,8 @@
76
78
  "once": false,
77
79
  "onceDelay": 0.1,
78
80
  "topic": "",
79
- "x": 780.857177734375,
80
- "y": 530.2857666015625,
81
+ "x": 595.857177734375,
82
+ "y": 534.2857666015625,
81
83
  "wires": [
82
84
  [
83
85
  "24b26f5122abf1bb"
@@ -107,8 +109,8 @@
107
109
  "once": false,
108
110
  "onceDelay": 0.1,
109
111
  "topic": "",
110
- "x": 650,
111
- "y": 647,
112
+ "x": 604,
113
+ "y": 669,
112
114
  "wires": [
113
115
  [
114
116
  "96278268709caba6"
@@ -123,7 +125,6 @@
123
125
  "name": "retrieve tgz URL for package",
124
126
  "func": "pacote.manifest(\n msg.packagename + \"@\" + msg.packageversion\n).then(manifest => {\n msg.payload = manifest._resolved\n node.send(msg)\n}).catch( err => {\n msg.error = err\n node.error(\"failed to get url\", msg)\n})\n\n\n",
125
127
  "outputs": 1,
126
- "timeout": 0,
127
128
  "noerr": 0,
128
129
  "initialize": "",
129
130
  "finalize": "",
@@ -133,8 +134,8 @@
133
134
  "module": "pacote"
134
135
  }
135
136
  ],
136
- "x": 822,
137
- "y": 812,
137
+ "x": 807,
138
+ "y": 825,
138
139
  "wires": [
139
140
  [
140
141
  "fc620efcbaf77846"
@@ -161,8 +162,8 @@
161
162
  "from": "",
162
163
  "to": "",
163
164
  "reg": false,
164
- "x": 1128,
165
- "y": 770,
165
+ "x": 1032,
166
+ "y": 695,
166
167
  "wires": [
167
168
  [
168
169
  "d981181116ccfb16"
@@ -186,8 +187,8 @@
186
187
  "authType": "",
187
188
  "senderr": false,
188
189
  "headers": [],
189
- "x": 1316,
190
- "y": 689,
190
+ "x": 1313,
191
+ "y": 831,
191
192
  "wires": [
192
193
  [
193
194
  "ea7b1b985ba6ac70"
@@ -2,7 +2,7 @@
2
2
  {
3
3
  "id": "2b6bc676aaa603ad",
4
4
  "type": "group",
5
- "z": "b92be5062203ff69",
5
+ "z": "7bece6814c033925",
6
6
  "style": {
7
7
  "stroke": "#999999",
8
8
  "stroke-opacity": "1",
@@ -24,15 +24,15 @@
24
24
  "b103106ae655b460",
25
25
  "77bf2cb0aa2f60ff"
26
26
  ],
27
- "x": 1872,
28
- "y": 317,
27
+ "x": 396,
28
+ "y": 187,
29
29
  "w": 1423,
30
30
  "h": 860
31
31
  },
32
32
  {
33
33
  "id": "d4c53464a044324a",
34
34
  "type": "PkgFile",
35
- "z": "b92be5062203ff69",
35
+ "z": "7bece6814c033925",
36
36
  "g": "2b6bc676aaa603ad",
37
37
  "name": "LICENSE",
38
38
  "filename": "LICENSE",
@@ -40,8 +40,8 @@
40
40
  "syntax": "mustache",
41
41
  "template": "Nothing, nope, can't do a thing. ",
42
42
  "output": "str",
43
- "x": 2215,
44
- "y": 628,
43
+ "x": 739,
44
+ "y": 498,
45
45
  "wires": [
46
46
  [
47
47
  "fece8b2f1459b822"
@@ -51,7 +51,7 @@
51
51
  {
52
52
  "id": "fece8b2f1459b822",
53
53
  "type": "PkgFile",
54
- "z": "b92be5062203ff69",
54
+ "z": "7bece6814c033925",
55
55
  "g": "2b6bc676aaa603ad",
56
56
  "name": "README",
57
57
  "filename": "README.md",
@@ -59,8 +59,8 @@
59
59
  "syntax": "mustache",
60
60
  "template": "## What does this package do?\n\n## Why does it exist?\n\n## Where will it go?\n\n",
61
61
  "output": "str",
62
- "x": 2217,
63
- "y": 674,
62
+ "x": 741,
63
+ "y": 544,
64
64
  "wires": [
65
65
  [
66
66
  "0e9d26e2b43ca0f5"
@@ -70,11 +70,11 @@
70
70
  {
71
71
  "id": "5dea66e11691c1f2",
72
72
  "type": "NpmTarBall",
73
- "z": "b92be5062203ff69",
73
+ "z": "7bece6814c033925",
74
74
  "g": "2b6bc676aaa603ad",
75
75
  "name": "",
76
- "x": 2930,
77
- "y": 1109,
76
+ "x": 1454,
77
+ "y": 979,
78
78
  "wires": [
79
79
  [
80
80
  "9f4584bc1aeabf43",
@@ -86,11 +86,11 @@
86
86
  {
87
87
  "id": "9f4584bc1aeabf43",
88
88
  "type": "NodeRedInstall",
89
- "z": "b92be5062203ff69",
89
+ "z": "7bece6814c033925",
90
90
  "g": "2b6bc676aaa603ad",
91
91
  "name": "",
92
- "x": 3200,
93
- "y": 821,
92
+ "x": 1724,
93
+ "y": 691,
94
94
  "wires": [
95
95
  []
96
96
  ]
@@ -98,7 +98,7 @@
98
98
  {
99
99
  "id": "8a667fa50ad9b9ee",
100
100
  "type": "NodeFactory",
101
- "z": "b92be5062203ff69",
101
+ "z": "7bece6814c033925",
102
102
  "d": true,
103
103
  "g": "2b6bc676aaa603ad",
104
104
  "name": "",
@@ -107,13 +107,15 @@
107
107
  "hasbutton": false,
108
108
  "hasinput": true,
109
109
  "outputcount": 1,
110
- "autoimport": true,
111
110
  "category": "",
112
111
  "summary": "",
113
112
  "description": "",
114
113
  "icon": "font-awesome/fa-industry",
115
- "x": 3199,
116
- "y": 670,
114
+ "frt2bakcomm": false,
115
+ "bak2frtcomm": false,
116
+ "createmanifest": false,
117
+ "x": 1723,
118
+ "y": 540,
117
119
  "wires": [
118
120
  []
119
121
  ]
@@ -121,7 +123,7 @@
121
123
  {
122
124
  "id": "42a101dda45403ee",
123
125
  "type": "NpmPublish",
124
- "z": "b92be5062203ff69",
126
+ "z": "7bece6814c033925",
125
127
  "d": true,
126
128
  "g": "2b6bc676aaa603ad",
127
129
  "name": "",
@@ -129,8 +131,8 @@
129
131
  "action": "publish",
130
132
  "authToken": "NPM_AUTH_TOKEN",
131
133
  "authTokenType": "env",
132
- "x": 3190,
133
- "y": 529,
134
+ "x": 1714,
135
+ "y": 399,
134
136
  "wires": [
135
137
  []
136
138
  ]
@@ -138,7 +140,7 @@
138
140
  {
139
141
  "id": "a301a4a721a507d9",
140
142
  "type": "group",
141
- "z": "b92be5062203ff69",
143
+ "z": "7bece6814c033925",
142
144
  "g": "2b6bc676aaa603ad",
143
145
  "name": "Step 1: create node templates",
144
146
  "style": {
@@ -148,15 +150,15 @@
148
150
  "5798e7102230c00f",
149
151
  "6ab6fc44537f08e4"
150
152
  ],
151
- "x": 2342,
152
- "y": 343,
153
- "w": 352,
153
+ "x": 886,
154
+ "y": 213,
155
+ "w": 332,
154
156
  "h": 144
155
157
  },
156
158
  {
157
159
  "id": "5798e7102230c00f",
158
160
  "type": "NodeFactory",
159
- "z": "b92be5062203ff69",
161
+ "z": "7bece6814c033925",
160
162
  "g": "a301a4a721a507d9",
161
163
  "name": "Node with 4 outputs and a button",
162
164
  "nodename": "NodeWithFour",
@@ -164,13 +166,15 @@
164
166
  "hasbutton": true,
165
167
  "hasinput": false,
166
168
  "outputcount": "4",
167
- "autoimport": true,
168
169
  "category": "nodedev-background",
169
170
  "summary": "This is the short summary of what this node does.",
170
171
  "description": "This is a long and descriptive version of the summary. Rather boring and tedious to write but nonetheless, we try our best.",
171
172
  "icon": "node-red/inject.svg",
172
- "x": 2528,
173
- "y": 384,
173
+ "frt2bakcomm": false,
174
+ "bak2frtcomm": false,
175
+ "createmanifest": false,
176
+ "x": 1052,
177
+ "y": 254,
174
178
  "wires": [
175
179
  []
176
180
  ]
@@ -178,7 +182,7 @@
178
182
  {
179
183
  "id": "6ab6fc44537f08e4",
180
184
  "type": "NodeFactory",
181
- "z": "b92be5062203ff69",
185
+ "z": "7bece6814c033925",
182
186
  "g": "a301a4a721a507d9",
183
187
  "name": "Node with Input and Output",
184
188
  "nodename": "NodeWithOne",
@@ -186,13 +190,15 @@
186
190
  "hasbutton": false,
187
191
  "hasinput": true,
188
192
  "outputcount": "1",
189
- "autoimport": true,
190
193
  "category": "nodedev-background",
191
194
  "summary": "This node only has one input",
192
195
  "description": "And does even less.",
193
196
  "icon": "node-red/inject.svg",
194
- "x": 2508,
195
- "y": 446,
197
+ "frt2bakcomm": false,
198
+ "bak2frtcomm": false,
199
+ "createmanifest": false,
200
+ "x": 1032,
201
+ "y": 316,
196
202
  "wires": [
197
203
  []
198
204
  ]
@@ -200,7 +206,7 @@
200
206
  {
201
207
  "id": "1fa5af4c7e44a739",
202
208
  "type": "group",
203
- "z": "b92be5062203ff69",
209
+ "z": "7bece6814c033925",
204
210
  "g": "2b6bc676aaa603ad",
205
211
  "name": "Step 2: include the node templates within a package structure",
206
212
  "style": {
@@ -212,15 +218,15 @@
212
218
  "cd9766062675838b",
213
219
  "392e75983c1c894d"
214
220
  ],
215
- "x": 2333,
216
- "y": 903,
221
+ "x": 857,
222
+ "y": 773,
217
223
  "w": 396,
218
224
  "h": 248
219
225
  },
220
226
  {
221
227
  "id": "38d7ab2facd1efd0",
222
228
  "type": "PkgFile",
223
- "z": "b92be5062203ff69",
229
+ "z": "7bece6814c033925",
224
230
  "g": "1fa5af4c7e44a739",
225
231
  "name": "NodeWithFour.js",
226
232
  "filename": "nodes/nodewithfour.js",
@@ -228,8 +234,8 @@
228
234
  "syntax": "mustache",
229
235
  "template": "module.exports = function(RED) {\n function NodeWithFourFunctionality(config) {\n RED.nodes.createNode(this,config);\n\n var node = this;\n var cfg = config;\n\n node.on('close', function() {\n node.status({});\n });\n\n node.on(\"input\", function(msg, send, done) {\n send(msg);\n done();\n });\n }\n RED.nodes.registerType(\"NodeWithFour\", NodeWithFourFunctionality);\n}\n",
230
236
  "output": "str",
231
- "x": 2449,
232
- "y": 944,
237
+ "x": 973,
238
+ "y": 814,
233
239
  "wires": [
234
240
  [
235
241
  "29fc98b9e556085c"
@@ -239,7 +245,7 @@
239
245
  {
240
246
  "id": "29fc98b9e556085c",
241
247
  "type": "PkgFile",
242
- "z": "b92be5062203ff69",
248
+ "z": "7bece6814c033925",
243
249
  "g": "1fa5af4c7e44a739",
244
250
  "name": "NodeWithFour.html",
245
251
  "filename": "nodes/nodewithfour.html",
@@ -247,8 +253,8 @@
247
253
  "syntax": "mustache",
248
254
  "template": "<script type=\"text/javascript\">\n RED.nodes.registerType('NodeWithFour',{\n color: '#87A980',\n icon: \"node-red/inject.svg\",\n category: 'nodedev-background',\n defaults: {\n name: {\n value:\"\",\n },\n },\n\n inputs: 0,\n\n outputs: 4,\n\n label: function() {\n return (this.name || this._def.paletteLabel);\n },\n\n labelStyle: function() {\n return this.name?\"node_label_italic\":\"\";\n },\n\n onpaletteadd: function() {\n },\n\n oneditprepare: function() {\n },\n\n oneditcancel: function() {\n },\n\n oneditsave: function() {\n },\n\n button: {\n enabled: function() {\n return !this.changed\n },\n\n onclick: function () {\n if (this.changed) {\n return RED.notify(RED._(\"notification.warning\", {\n message: RED._(\"notification.warnings.undeployedChanges\")\n }), \"warning\");\n }\n }\n },\n\n });\n</script>\n\n<script type=\"text/html\" data-template-name=\"NodeWithFour\">\n <div class=\"form-row\">\n <label for=\"node-input-name\"><i class=\"fa fa-tag\"></i> Name</label>\n <input type=\"text\" id=\"node-input-name\" placeholder=\"Name\">\n </div>\n</script>\n\n<script type=\"text/html\" data-help-name=\"NodeWithFour\">\n <p>This is the short summary of what this node does.</p>\n This is a long and descriptive version of the summary. Rather boring and tedious to write but nonetheless, we try our best.\n</script>\n",
249
255
  "output": "str",
250
- "x": 2449,
251
- "y": 994,
256
+ "x": 973,
257
+ "y": 864,
252
258
  "wires": [
253
259
  [
254
260
  "cd9766062675838b"
@@ -258,7 +264,7 @@
258
264
  {
259
265
  "id": "cd9766062675838b",
260
266
  "type": "PkgFile",
261
- "z": "b92be5062203ff69",
267
+ "z": "7bece6814c033925",
262
268
  "g": "1fa5af4c7e44a739",
263
269
  "name": "NodeWithOne.js",
264
270
  "filename": "nodes/nodewithone.js",
@@ -266,8 +272,8 @@
266
272
  "syntax": "mustache",
267
273
  "template": "module.exports = function(RED) {\n function NodeWithOneFunctionality(config) {\n RED.nodes.createNode(this,config);\n\n var node = this;\n var cfg = config;\n\n node.on('close', function() {\n node.status({});\n });\n\n node.on(\"input\", function(msg, send, done) {\n send(msg);\n done();\n });\n }\n RED.nodes.registerType(\"NodeWithOne\", NodeWithOneFunctionality);\n}\n",
268
274
  "output": "str",
269
- "x": 2454,
270
- "y": 1060,
275
+ "x": 978,
276
+ "y": 930,
271
277
  "wires": [
272
278
  [
273
279
  "392e75983c1c894d"
@@ -277,7 +283,7 @@
277
283
  {
278
284
  "id": "392e75983c1c894d",
279
285
  "type": "PkgFile",
280
- "z": "b92be5062203ff69",
286
+ "z": "7bece6814c033925",
281
287
  "g": "1fa5af4c7e44a739",
282
288
  "name": "NodeWithOne.html",
283
289
  "filename": "nodes/nodewithone.html",
@@ -285,8 +291,8 @@
285
291
  "syntax": "mustache",
286
292
  "template": "<script type=\"text/javascript\">\n RED.nodes.registerType('NodeWithOne',{\n color: '#F3B567',\n icon: \"node-red/inject.svg\",\n category: 'nodedev-background',\n defaults: {\n name: {\n value:\"\",\n },\n },\n\n inputs: 1,\n\n outputs: 1,\n\n label: function() {\n return (this.name || this._def.paletteLabel);\n },\n\n labelStyle: function() {\n return this.name?\"node_label_italic\":\"\";\n },\n\n onpaletteadd: function() {\n },\n\n oneditprepare: function() {\n },\n\n oneditcancel: function() {\n },\n\n oneditsave: function() {\n },\n\n\n });\n</script>\n\n<script type=\"text/html\" data-template-name=\"NodeWithOne\">\n <div class=\"form-row\">\n <label for=\"node-input-name\"><i class=\"fa fa-tag\"></i> Name</label>\n <input type=\"text\" id=\"node-input-name\" placeholder=\"Name\">\n </div>\n</script>\n\n<script type=\"text/html\" data-help-name=\"NodeWithOne\">\n <p>This node only has one input</p>\n And does even less.\n</script>\n",
287
293
  "output": "str",
288
- "x": 2454,
289
- "y": 1110,
294
+ "x": 978,
295
+ "y": 980,
290
296
  "wires": [
291
297
  [
292
298
  "5dea66e11691c1f2"
@@ -296,7 +302,7 @@
296
302
  {
297
303
  "id": "b103106ae655b460",
298
304
  "type": "group",
299
- "z": "b92be5062203ff69",
305
+ "z": "7bece6814c033925",
300
306
  "g": "2b6bc676aaa603ad",
301
307
  "name": "Step 3: ensure package.json includes the nodes - only the .js file",
302
308
  "style": {
@@ -305,15 +311,15 @@
305
311
  "nodes": [
306
312
  "0e9d26e2b43ca0f5"
307
313
  ],
308
- "x": 2120,
309
- "y": 777,
314
+ "x": 644,
315
+ "y": 647,
310
316
  "w": 411,
311
317
  "h": 82
312
318
  },
313
319
  {
314
320
  "id": "0e9d26e2b43ca0f5",
315
321
  "type": "PkgFile",
316
- "z": "b92be5062203ff69",
322
+ "z": "7bece6814c033925",
317
323
  "g": "b103106ae655b460",
318
324
  "name": "package.json",
319
325
  "filename": "package.json",
@@ -321,8 +327,8 @@
321
327
  "syntax": "mustache",
322
328
  "template": "{\n \"name\" : \"\",\n \"version\": \"\",\n \"dependencies\": {\n },\n\n \"keywords\": [\n \"node-red\"\n ],\n\n \"homepage\": \"https://github.com/username/node-red-contrib-test\",\n \"license\": \"Don't do evil.\",\n \"author\": \"Joe Blog <joe.blog@spreads-the.love>\",\n \"engines\": {\n \"node\": \">=16\"\n },\n\n \"node-red\" : {\n \"version\": \">=3.0.0\",\n \"nodes\": {\n \"nodewithfour\": \"nodes/nodewithfour.js\",\n \"nodewithone\": \"nodes/nodewithone.js\"\n }\n },\n\n \"description\": \"Description of what these nodes do.\",\n \"repository\": {\n \"type\": \"github\",\n \"url\": \"git+https://github.com/username/node-red-contrib-test.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/username/node-red-contrib-test\"\n }\n}\n",
323
329
  "output": "str",
324
- "x": 2216,
325
- "y": 818,
330
+ "x": 740,
331
+ "y": 688,
326
332
  "wires": [
327
333
  [
328
334
  "38d7ab2facd1efd0"
@@ -332,7 +338,7 @@
332
338
  {
333
339
  "id": "77bf2cb0aa2f60ff",
334
340
  "type": "group",
335
- "z": "b92be5062203ff69",
341
+ "z": "7bece6814c033925",
336
342
  "g": "2b6bc676aaa603ad",
337
343
  "name": "Step 4: install into Node-RED to test the nodes",
338
344
  "style": {
@@ -341,15 +347,15 @@
341
347
  "nodes": [
342
348
  "af227f8a9f44c79d"
343
349
  ],
344
- "x": 1898,
345
- "y": 434,
350
+ "x": 422,
351
+ "y": 304,
346
352
  "w": 301,
347
353
  "h": 82
348
354
  },
349
355
  {
350
356
  "id": "af227f8a9f44c79d",
351
357
  "type": "inject",
352
- "z": "b92be5062203ff69",
358
+ "z": "7bece6814c033925",
353
359
  "g": "77bf2cb0aa2f60ff",
354
360
  "name": "",
355
361
  "props": [
@@ -369,8 +375,8 @@
369
375
  "once": false,
370
376
  "onceDelay": 0.1,
371
377
  "topic": "",
372
- "x": 1994,
373
- "y": 475,
378
+ "x": 518,
379
+ "y": 345,
374
380
  "wires": [
375
381
  [
376
382
  "d4c53464a044324a"
@@ -0,0 +1,386 @@
1
+ [
2
+ {
3
+ "id": "2b6bc676aaa603ad",
4
+ "type": "group",
5
+ "z": "7bece6814c033925",
6
+ "style": {
7
+ "stroke": "#999999",
8
+ "stroke-opacity": "1",
9
+ "fill": "none",
10
+ "fill-opacity": "1",
11
+ "label": true,
12
+ "label-position": "nw",
13
+ "color": "#a4a4a4"
14
+ },
15
+ "nodes": [
16
+ "d4c53464a044324a",
17
+ "fece8b2f1459b822",
18
+ "5dea66e11691c1f2",
19
+ "9f4584bc1aeabf43",
20
+ "8a667fa50ad9b9ee",
21
+ "42a101dda45403ee",
22
+ "a301a4a721a507d9",
23
+ "1fa5af4c7e44a739",
24
+ "b103106ae655b460",
25
+ "77bf2cb0aa2f60ff"
26
+ ],
27
+ "x": 396,
28
+ "y": 187,
29
+ "w": 1423,
30
+ "h": 860
31
+ },
32
+ {
33
+ "id": "d4c53464a044324a",
34
+ "type": "PkgFile",
35
+ "z": "7bece6814c033925",
36
+ "g": "2b6bc676aaa603ad",
37
+ "name": "LICENSE",
38
+ "filename": "LICENSE",
39
+ "format": "text",
40
+ "syntax": "mustache",
41
+ "template": "Nothing, nope, can't do a thing. ",
42
+ "output": "str",
43
+ "x": 739,
44
+ "y": 498,
45
+ "wires": [
46
+ [
47
+ "fece8b2f1459b822"
48
+ ]
49
+ ]
50
+ },
51
+ {
52
+ "id": "fece8b2f1459b822",
53
+ "type": "PkgFile",
54
+ "z": "7bece6814c033925",
55
+ "g": "2b6bc676aaa603ad",
56
+ "name": "README",
57
+ "filename": "README.md",
58
+ "format": "markdown",
59
+ "syntax": "mustache",
60
+ "template": "## What does this package do?\n\n## Why does it exist?\n\n## Where will it go?\n\n",
61
+ "output": "str",
62
+ "x": 741,
63
+ "y": 544,
64
+ "wires": [
65
+ [
66
+ "0e9d26e2b43ca0f5"
67
+ ]
68
+ ]
69
+ },
70
+ {
71
+ "id": "5dea66e11691c1f2",
72
+ "type": "NpmTarBall",
73
+ "z": "7bece6814c033925",
74
+ "g": "2b6bc676aaa603ad",
75
+ "name": "",
76
+ "x": 1454,
77
+ "y": 979,
78
+ "wires": [
79
+ [
80
+ "9f4584bc1aeabf43",
81
+ "8a667fa50ad9b9ee",
82
+ "42a101dda45403ee"
83
+ ]
84
+ ]
85
+ },
86
+ {
87
+ "id": "9f4584bc1aeabf43",
88
+ "type": "NodeRedInstall",
89
+ "z": "7bece6814c033925",
90
+ "g": "2b6bc676aaa603ad",
91
+ "name": "",
92
+ "x": 1724,
93
+ "y": 691,
94
+ "wires": [
95
+ []
96
+ ]
97
+ },
98
+ {
99
+ "id": "8a667fa50ad9b9ee",
100
+ "type": "NodeFactory",
101
+ "z": "7bece6814c033925",
102
+ "d": true,
103
+ "g": "2b6bc676aaa603ad",
104
+ "name": "",
105
+ "nodename": "",
106
+ "color": "#e5e4ef",
107
+ "hasbutton": false,
108
+ "hasinput": true,
109
+ "outputcount": 1,
110
+ "category": "",
111
+ "summary": "",
112
+ "description": "",
113
+ "icon": "font-awesome/fa-industry",
114
+ "frt2bakcomm": false,
115
+ "bak2frtcomm": false,
116
+ "createmanifest": false,
117
+ "x": 1723,
118
+ "y": 540,
119
+ "wires": [
120
+ []
121
+ ]
122
+ },
123
+ {
124
+ "id": "42a101dda45403ee",
125
+ "type": "NpmPublish",
126
+ "z": "7bece6814c033925",
127
+ "d": true,
128
+ "g": "2b6bc676aaa603ad",
129
+ "name": "",
130
+ "otp": "",
131
+ "action": "publish",
132
+ "authToken": "NPM_AUTH_TOKEN",
133
+ "authTokenType": "env",
134
+ "x": 1714,
135
+ "y": 399,
136
+ "wires": [
137
+ []
138
+ ]
139
+ },
140
+ {
141
+ "id": "a301a4a721a507d9",
142
+ "type": "group",
143
+ "z": "7bece6814c033925",
144
+ "g": "2b6bc676aaa603ad",
145
+ "name": "Step 1: create node templates",
146
+ "style": {
147
+ "label": true
148
+ },
149
+ "nodes": [
150
+ "5798e7102230c00f",
151
+ "6ab6fc44537f08e4"
152
+ ],
153
+ "x": 886,
154
+ "y": 213,
155
+ "w": 332,
156
+ "h": 144
157
+ },
158
+ {
159
+ "id": "5798e7102230c00f",
160
+ "type": "NodeFactory",
161
+ "z": "7bece6814c033925",
162
+ "g": "a301a4a721a507d9",
163
+ "name": "Node with 4 outputs and a button",
164
+ "nodename": "NodeWithFour",
165
+ "color": "#87A980",
166
+ "hasbutton": true,
167
+ "hasinput": false,
168
+ "outputcount": "4",
169
+ "category": "nodedev-background",
170
+ "summary": "This is the short summary of what this node does.",
171
+ "description": "This is a long and descriptive version of the summary. Rather boring and tedious to write but nonetheless, we try our best.",
172
+ "icon": "node-red/inject.svg",
173
+ "frt2bakcomm": false,
174
+ "bak2frtcomm": false,
175
+ "createmanifest": false,
176
+ "x": 1052,
177
+ "y": 254,
178
+ "wires": [
179
+ []
180
+ ]
181
+ },
182
+ {
183
+ "id": "6ab6fc44537f08e4",
184
+ "type": "NodeFactory",
185
+ "z": "7bece6814c033925",
186
+ "g": "a301a4a721a507d9",
187
+ "name": "Node with Input and Output",
188
+ "nodename": "NodeWithOne",
189
+ "color": "#F3B567",
190
+ "hasbutton": false,
191
+ "hasinput": true,
192
+ "outputcount": "1",
193
+ "category": "nodedev-background",
194
+ "summary": "This node only has one input",
195
+ "description": "And does even less.",
196
+ "icon": "node-red/inject.svg",
197
+ "frt2bakcomm": false,
198
+ "bak2frtcomm": false,
199
+ "createmanifest": false,
200
+ "x": 1032,
201
+ "y": 316,
202
+ "wires": [
203
+ []
204
+ ]
205
+ },
206
+ {
207
+ "id": "1fa5af4c7e44a739",
208
+ "type": "group",
209
+ "z": "7bece6814c033925",
210
+ "g": "2b6bc676aaa603ad",
211
+ "name": "Step 2: include the node templates within a package structure",
212
+ "style": {
213
+ "label": true
214
+ },
215
+ "nodes": [
216
+ "38d7ab2facd1efd0",
217
+ "29fc98b9e556085c",
218
+ "cd9766062675838b",
219
+ "392e75983c1c894d"
220
+ ],
221
+ "x": 857,
222
+ "y": 773,
223
+ "w": 396,
224
+ "h": 248
225
+ },
226
+ {
227
+ "id": "38d7ab2facd1efd0",
228
+ "type": "PkgFile",
229
+ "z": "7bece6814c033925",
230
+ "g": "1fa5af4c7e44a739",
231
+ "name": "NodeWithFour.js",
232
+ "filename": "nodes/nodewithfour.js",
233
+ "format": "javascript",
234
+ "syntax": "mustache",
235
+ "template": "module.exports = function(RED) {\n function NodeWithFourFunctionality(config) {\n RED.nodes.createNode(this,config);\n\n var node = this;\n var cfg = config;\n\n node.on('close', function() {\n node.status({});\n });\n\n node.on(\"input\", function(msg, send, done) {\n send(msg);\n done();\n });\n }\n RED.nodes.registerType(\"NodeWithFour\", NodeWithFourFunctionality);\n}\n",
236
+ "output": "str",
237
+ "x": 973,
238
+ "y": 814,
239
+ "wires": [
240
+ [
241
+ "29fc98b9e556085c"
242
+ ]
243
+ ]
244
+ },
245
+ {
246
+ "id": "29fc98b9e556085c",
247
+ "type": "PkgFile",
248
+ "z": "7bece6814c033925",
249
+ "g": "1fa5af4c7e44a739",
250
+ "name": "NodeWithFour.html",
251
+ "filename": "nodes/nodewithfour.html",
252
+ "format": "html",
253
+ "syntax": "mustache",
254
+ "template": "<script type=\"text/javascript\">\n RED.nodes.registerType('NodeWithFour',{\n color: '#87A980',\n icon: \"node-red/inject.svg\",\n category: 'nodedev-background',\n defaults: {\n name: {\n value:\"\",\n },\n },\n\n inputs: 0,\n\n outputs: 4,\n\n label: function() {\n return (this.name || this._def.paletteLabel);\n },\n\n labelStyle: function() {\n return this.name?\"node_label_italic\":\"\";\n },\n\n onpaletteadd: function() {\n },\n\n oneditprepare: function() {\n },\n\n oneditcancel: function() {\n },\n\n oneditsave: function() {\n },\n\n button: {\n enabled: function() {\n return !this.changed\n },\n\n onclick: function () {\n if (this.changed) {\n return RED.notify(RED._(\"notification.warning\", {\n message: RED._(\"notification.warnings.undeployedChanges\")\n }), \"warning\");\n }\n }\n },\n\n });\n</script>\n\n<script type=\"text/html\" data-template-name=\"NodeWithFour\">\n <div class=\"form-row\">\n <label for=\"node-input-name\"><i class=\"fa fa-tag\"></i> Name</label>\n <input type=\"text\" id=\"node-input-name\" placeholder=\"Name\">\n </div>\n</script>\n\n<script type=\"text/html\" data-help-name=\"NodeWithFour\">\n <p>This is the short summary of what this node does.</p>\n This is a long and descriptive version of the summary. Rather boring and tedious to write but nonetheless, we try our best.\n</script>\n",
255
+ "output": "str",
256
+ "x": 973,
257
+ "y": 864,
258
+ "wires": [
259
+ [
260
+ "cd9766062675838b"
261
+ ]
262
+ ]
263
+ },
264
+ {
265
+ "id": "cd9766062675838b",
266
+ "type": "PkgFile",
267
+ "z": "7bece6814c033925",
268
+ "g": "1fa5af4c7e44a739",
269
+ "name": "NodeWithOne.js",
270
+ "filename": "nodes/nodewithone.js",
271
+ "format": "javascript",
272
+ "syntax": "mustache",
273
+ "template": "module.exports = function(RED) {\n function NodeWithOneFunctionality(config) {\n RED.nodes.createNode(this,config);\n\n var node = this;\n var cfg = config;\n\n node.on('close', function() {\n node.status({});\n });\n\n node.on(\"input\", function(msg, send, done) {\n send(msg);\n done();\n });\n }\n RED.nodes.registerType(\"NodeWithOne\", NodeWithOneFunctionality);\n}\n",
274
+ "output": "str",
275
+ "x": 978,
276
+ "y": 930,
277
+ "wires": [
278
+ [
279
+ "392e75983c1c894d"
280
+ ]
281
+ ]
282
+ },
283
+ {
284
+ "id": "392e75983c1c894d",
285
+ "type": "PkgFile",
286
+ "z": "7bece6814c033925",
287
+ "g": "1fa5af4c7e44a739",
288
+ "name": "NodeWithOne.html",
289
+ "filename": "nodes/nodewithone.html",
290
+ "format": "html",
291
+ "syntax": "mustache",
292
+ "template": "<script type=\"text/javascript\">\n RED.nodes.registerType('NodeWithOne',{\n color: '#F3B567',\n icon: \"node-red/inject.svg\",\n category: 'nodedev-background',\n defaults: {\n name: {\n value:\"\",\n },\n },\n\n inputs: 1,\n\n outputs: 1,\n\n label: function() {\n return (this.name || this._def.paletteLabel);\n },\n\n labelStyle: function() {\n return this.name?\"node_label_italic\":\"\";\n },\n\n onpaletteadd: function() {\n },\n\n oneditprepare: function() {\n },\n\n oneditcancel: function() {\n },\n\n oneditsave: function() {\n },\n\n\n });\n</script>\n\n<script type=\"text/html\" data-template-name=\"NodeWithOne\">\n <div class=\"form-row\">\n <label for=\"node-input-name\"><i class=\"fa fa-tag\"></i> Name</label>\n <input type=\"text\" id=\"node-input-name\" placeholder=\"Name\">\n </div>\n</script>\n\n<script type=\"text/html\" data-help-name=\"NodeWithOne\">\n <p>This node only has one input</p>\n And does even less.\n</script>\n",
293
+ "output": "str",
294
+ "x": 978,
295
+ "y": 980,
296
+ "wires": [
297
+ [
298
+ "5dea66e11691c1f2"
299
+ ]
300
+ ]
301
+ },
302
+ {
303
+ "id": "b103106ae655b460",
304
+ "type": "group",
305
+ "z": "7bece6814c033925",
306
+ "g": "2b6bc676aaa603ad",
307
+ "name": "Step 3: ensure package.json includes the nodes - only the .js file",
308
+ "style": {
309
+ "label": true
310
+ },
311
+ "nodes": [
312
+ "0e9d26e2b43ca0f5"
313
+ ],
314
+ "x": 644,
315
+ "y": 647,
316
+ "w": 411,
317
+ "h": 82
318
+ },
319
+ {
320
+ "id": "0e9d26e2b43ca0f5",
321
+ "type": "PkgFile",
322
+ "z": "7bece6814c033925",
323
+ "g": "b103106ae655b460",
324
+ "name": "package.json",
325
+ "filename": "package.json",
326
+ "format": "json",
327
+ "syntax": "mustache",
328
+ "template": "{\n \"name\" : \"\",\n \"version\": \"\",\n \"dependencies\": {\n },\n\n \"keywords\": [\n \"node-red\"\n ],\n\n \"homepage\": \"https://github.com/username/node-red-contrib-test\",\n \"license\": \"Don't do evil.\",\n \"author\": \"Joe Blog <joe.blog@spreads-the.love>\",\n \"engines\": {\n \"node\": \">=16\"\n },\n\n \"node-red\" : {\n \"version\": \">=3.0.0\",\n \"nodes\": {\n \"nodewithfour\": \"nodes/nodewithfour.js\",\n \"nodewithone\": \"nodes/nodewithone.js\"\n }\n },\n\n \"description\": \"Description of what these nodes do.\",\n \"repository\": {\n \"type\": \"github\",\n \"url\": \"git+https://github.com/username/node-red-contrib-test.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/username/node-red-contrib-test\"\n }\n}\n",
329
+ "output": "str",
330
+ "x": 740,
331
+ "y": 688,
332
+ "wires": [
333
+ [
334
+ "38d7ab2facd1efd0"
335
+ ]
336
+ ]
337
+ },
338
+ {
339
+ "id": "77bf2cb0aa2f60ff",
340
+ "type": "group",
341
+ "z": "7bece6814c033925",
342
+ "g": "2b6bc676aaa603ad",
343
+ "name": "Step 4: install into Node-RED to test the nodes",
344
+ "style": {
345
+ "label": true
346
+ },
347
+ "nodes": [
348
+ "af227f8a9f44c79d"
349
+ ],
350
+ "x": 422,
351
+ "y": 304,
352
+ "w": 301,
353
+ "h": 82
354
+ },
355
+ {
356
+ "id": "af227f8a9f44c79d",
357
+ "type": "inject",
358
+ "z": "7bece6814c033925",
359
+ "g": "77bf2cb0aa2f60ff",
360
+ "name": "",
361
+ "props": [
362
+ {
363
+ "p": "packagename",
364
+ "v": "@username/node-red-contrib-test",
365
+ "vt": "str"
366
+ },
367
+ {
368
+ "p": "packageversion",
369
+ "v": "0.0.1",
370
+ "vt": "str"
371
+ }
372
+ ],
373
+ "repeat": "",
374
+ "crontab": "",
375
+ "once": false,
376
+ "onceDelay": 0.1,
377
+ "topic": "",
378
+ "x": 518,
379
+ "y": 345,
380
+ "wires": [
381
+ [
382
+ "d4c53464a044324a"
383
+ ]
384
+ ]
385
+ }
386
+ ]
@@ -104,7 +104,7 @@
104
104
 
105
105
  RED.nodes.registerType('NodeRedInstall',{
106
106
  color: '#e5e4ef',
107
- icon: "icons/subflow.svg",
107
+ icon: "nodedevsubflow.svg",
108
108
  category: 'nodedev',
109
109
  paletteLabel: 'NRInstall',
110
110
  defaults: {
@@ -0,0 +1 @@
1
+ <svg width="40" height="60" viewBox="0, 0, 40, 60" xmlns="http://www.w3.org/2000/svg"><path d="M25 25.94h7c.58 0 1-.42 1-1v-2c0-.58-.42-1-1-1h-7c-.58 0-1 .42-1 1v2c0 .58.42 1 1 1zm-17 12h7c.58 0 1-.42 1-1v-2c0-.58-.42-1-1-1H8c-.58 0-1 .42-1 1v2c0 .58.42 1 1 1zm-.416 11C5.624 48.94 4 47.315 4 45.356V14.522c0-1.96 1.625-3.582 3.584-3.582h24.832c1.96 0 3.584 1.623 3.584 3.582v30.834c0 1.96-1.625 3.584-3.584 3.584zM32 36.94H19c0 2.19-1.81 4-4 4H7v4.416c0 .35.235.584.584.584h24.832c.35 0 .584-.235.584-.584v-8.417zm1-2v-6h-8c-2.19 0-4-1.81-4-4h-1c-4.333-.002-8.667.004-13 0v6h8c2.19 0 4 1.81 4 4h13zm0-16v-4.418c0-.35-.235-.582-.584-.582H7.584c-.35 0-.584.233-.584.582v8.417c4.333.002 8.667.001 13 .001h1c0-2.19 1.81-4 4-4h8z" color="#000" fill="#fff"/></svg>
@@ -145,6 +145,6 @@
145
145
  </script>
146
146
 
147
147
  <script type="text/html" data-help-name="{{ node.name }}">
148
- <p>{{ node.summary }}</p>
149
- {{ node.description }}
148
+ <p>{{{ node.summary }}}</p>
149
+ {{{ node.description }}}
150
150
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name" : "@gregoriusrippenstein/node-red-contrib-nodedev",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "dependencies": {
5
5
  "pako": "latest",
6
6
  "tar-stream": "latest",
@@ -13,7 +13,7 @@
13
13
  "node-red", "node development", "introspection", "bootstrapping", "recursion"
14
14
  ],
15
15
 
16
- "homepage": "https://github.com/gorenje/node-red-contrib-nodedev#README.md",
16
+ "homepage": "https://github.com/gorenje/node-red-contrib-nodedev#readme",
17
17
  "license": "Don't do evil.",
18
18
  "author": "Gerrit Riessen <does.anyone@spread-the.love> (https://spread-the.love)",
19
19
  "engines": {