@gregoriusrippenstein/node-red-contrib-nodedev 0.5.6 → 0.5.8
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.
|
@@ -0,0 +1,2223 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "d0506e991d512ace",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "[NodeDev] install,publish,push",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "::: aim\n\nProvide a backbone for the development nodes within Node-RED.\n\n:::\n\n::: requirements\n\n- [nodedev node package](https://flows.nodered.org/node/@gregoriusrippenstein/node-red-contrib-nodedev)\n- the [holistic JSON schema validator](https://flows.nodered.org/node/@gregoriusrippenstein/node-red-contrib-validation-and-documentation)\n\n- For GitHub commits, the repository has to be created and one commit needs to have been done.\n- GITHUB_TOKEN set in the env, details described in the [GitHub Base functionality](https://flowhub.org/f/390ee0021ded4910)\n\n- For NPM publish, there needs to be an env variable `NPM_AUTH_TOKEN` that needs to be defined.\n- For NPM publish, authentication is assumed to be OTP (one time password) and the OTP has to be entered, the flow deployed and then the button pressed. So an OTP with longer expiry might be good.\n\n::: \n\n\n<!--\n// [] aba9a5d741241f1c [group] \"entry point\"\n// [] f3879ed58795ea91 [group] \"example message\"\n// [] 8c02f3fe5cd0a0a9 [group] \"GitHub API Functionality\"\n// [] d8867a43abe7260c [group] \"Entry points\"\n// [] 3ccaf963f1e72024 [group] \"\"\n// [] 56b55d2b5d03f424 [group] \"Node-RED local installation\"\n// [] 5d202e6481e451cb [group] \"GitHub functionality\"\n// [] 94fb93c898275493 [group] \"NPM Publish\"\n// [] 88aca7ba3d72dff1 [group] \"NPM Unpublish\"\n-->\n\n\n\n::: background\n\nThis flow provides the following functionality:\n\n- <a class=\"ahl-group-only\" data-ids=\"56b55d2b5d03f424\">Local installation</a> of node code developed using the [nodedev](https://flows.nodered.org/node/@gregoriusrippenstein/node-red-contrib-nodedev) node package\n- <a class=\"ahl-group-only\" data-ids=\"5d202e6481e451cb\">GitHub commit</a> functionality so that all package files are committed in the correct repo structure.\n- <a class=\"ahl-group-only\" data-ids=\"94fb93c898275493\">NPM Publish</a> to bring the node package to market, and\n- <a class=\"ahl-group-only\" data-ids=\"88aca7ba3d72dff1\">NPM Unpublish</a> in cases of mistakes.\n\nValidation of the `msg` object and example of required properties are <a class=\"ahl-group-only\" data-ids=\"3ccaf963f1e72024\">also provided</a>.\n\n:::\n\n\n### Assumption\n\nThat the package name is scoped with a username, i.e. `@username/node-red-contrib-XYZ`.\n\nThe registry to publish to is assumed to be `https://registry.npmjs.org`.\n\nAlso some requirements as defined in the [creating your own node](https://nodered.org/docs/creating-nodes/packaging) have been enforced by the <a class=\"ahl-node-only\" data-ids=\"2a7132258cbcf313\">package validation node</a>.\n\n::: discussion \n\nIf I want to extend my Emacs, I don't open Vi to create my extensions, I do this in Emacs. I extend Emacs *with* Emacs.\n\nWhy should this be any different in Node-RED? This flow is part of demonstrating how that idea *could* work in Node-RED.\n\n:::\n\n### Related flows\n\n- [nodedev node package development](https://flowhub.org/f/b92be5062203ff69)\n\n### Usage examples\n\n- [Neural-Network Builder](https://flowhub.org/f/f7e009091ef2d6b0)\n- [JSON Schema Validation + Documentation](https://flowhub.org/f/a7a81bcd7159a826)\n- [Introspection package](https://flowhub.org/f/d73d76db3df96ba2)\n- [FlowHub nodes](https://flowhub.org/f/4a831589774ecb04)\n\n",
|
|
8
|
+
"env": []
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "aba9a5d741241f1c",
|
|
12
|
+
"type": "group",
|
|
13
|
+
"z": "d0506e991d512ace",
|
|
14
|
+
"name": "entry point",
|
|
15
|
+
"style": {
|
|
16
|
+
"label": true,
|
|
17
|
+
"fill": "#c8e7a7",
|
|
18
|
+
"fill-opacity": "0.83"
|
|
19
|
+
},
|
|
20
|
+
"nodes": [
|
|
21
|
+
"963dfb765b0d9849"
|
|
22
|
+
],
|
|
23
|
+
"x": 133.285888671875,
|
|
24
|
+
"y": 1211.4662322998047,
|
|
25
|
+
"w": 82,
|
|
26
|
+
"h": 82
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "3ccaf963f1e72024",
|
|
30
|
+
"type": "group",
|
|
31
|
+
"z": "d0506e991d512ace",
|
|
32
|
+
"name": "",
|
|
33
|
+
"style": {
|
|
34
|
+
"fill": "#ffffbf",
|
|
35
|
+
"fill-opacity": "0.58",
|
|
36
|
+
"label": true
|
|
37
|
+
},
|
|
38
|
+
"nodes": [
|
|
39
|
+
"992dea9edfe05367",
|
|
40
|
+
"f3879ed58795ea91"
|
|
41
|
+
],
|
|
42
|
+
"x": 317.9999771118164,
|
|
43
|
+
"y": 1096.2857598236628,
|
|
44
|
+
"w": 452,
|
|
45
|
+
"h": 197.18047247614186
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "56b55d2b5d03f424",
|
|
49
|
+
"type": "group",
|
|
50
|
+
"z": "d0506e991d512ace",
|
|
51
|
+
"name": "Node-RED local installation",
|
|
52
|
+
"style": {
|
|
53
|
+
"label": true
|
|
54
|
+
},
|
|
55
|
+
"nodes": [
|
|
56
|
+
"f07d2d09465ca725",
|
|
57
|
+
"3a0d53eb62336e62",
|
|
58
|
+
"2c515ea1f3cf8411"
|
|
59
|
+
],
|
|
60
|
+
"x": 1779,
|
|
61
|
+
"y": 887,
|
|
62
|
+
"w": 212,
|
|
63
|
+
"h": 205
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "5d202e6481e451cb",
|
|
67
|
+
"type": "group",
|
|
68
|
+
"z": "d0506e991d512ace",
|
|
69
|
+
"name": "GitHub functionality",
|
|
70
|
+
"style": {
|
|
71
|
+
"label": true
|
|
72
|
+
},
|
|
73
|
+
"nodes": [
|
|
74
|
+
"25f729f47986b0f8",
|
|
75
|
+
"971ddff1a67a201f",
|
|
76
|
+
"732f4fa715c2fa78",
|
|
77
|
+
"255cf2c177f684a9",
|
|
78
|
+
"79b43c9ce292f151",
|
|
79
|
+
"0cb6ad0a57a95eee",
|
|
80
|
+
"bfe2775a7cf26d83",
|
|
81
|
+
"cd99083510c1fa1e",
|
|
82
|
+
"0f865b51b0f7997d",
|
|
83
|
+
"7f0881a1f1e17458",
|
|
84
|
+
"945ff83ff12b2cf5",
|
|
85
|
+
"856405ba78a11b7a",
|
|
86
|
+
"decde30c099b3701",
|
|
87
|
+
"2905451093154a24",
|
|
88
|
+
"a827fb86b27503a3",
|
|
89
|
+
"10a5e33f8ca3f848",
|
|
90
|
+
"1d0e09e64d59771e",
|
|
91
|
+
"30ee1ba5389219eb",
|
|
92
|
+
"551504329d997bad",
|
|
93
|
+
"ccb92d03a6cda7df",
|
|
94
|
+
"777b0b7476a82755",
|
|
95
|
+
"5fdf835cef66f3f2",
|
|
96
|
+
"f45011cdb6c9405b"
|
|
97
|
+
],
|
|
98
|
+
"x": 2089,
|
|
99
|
+
"y": 218,
|
|
100
|
+
"w": 992,
|
|
101
|
+
"h": 1072
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "94fb93c898275493",
|
|
105
|
+
"type": "group",
|
|
106
|
+
"z": "d0506e991d512ace",
|
|
107
|
+
"name": "NPM Publish",
|
|
108
|
+
"style": {
|
|
109
|
+
"label": true,
|
|
110
|
+
"label-position": "ne"
|
|
111
|
+
},
|
|
112
|
+
"nodes": [
|
|
113
|
+
"fbe982a35d27d99b",
|
|
114
|
+
"33093265f4dfec9d",
|
|
115
|
+
"de9fefd043701d43",
|
|
116
|
+
"5ca98f63115bf9ad"
|
|
117
|
+
],
|
|
118
|
+
"x": 1908,
|
|
119
|
+
"y": 1657,
|
|
120
|
+
"w": 292,
|
|
121
|
+
"h": 237.375
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "88aca7ba3d72dff1",
|
|
125
|
+
"type": "group",
|
|
126
|
+
"z": "d0506e991d512ace",
|
|
127
|
+
"name": "NPM Unpublish",
|
|
128
|
+
"style": {
|
|
129
|
+
"label": true
|
|
130
|
+
},
|
|
131
|
+
"nodes": [
|
|
132
|
+
"3f9377f9c6c4572b",
|
|
133
|
+
"3a58f10bf6055793",
|
|
134
|
+
"2328dce09b97de9e"
|
|
135
|
+
],
|
|
136
|
+
"x": 1790,
|
|
137
|
+
"y": 1354.8125,
|
|
138
|
+
"w": 292,
|
|
139
|
+
"h": 180.37493896484375
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "de7cfeb5612cf008",
|
|
143
|
+
"type": "group",
|
|
144
|
+
"z": "d0506e991d512ace",
|
|
145
|
+
"name": "Write & download package tgz file ",
|
|
146
|
+
"style": {
|
|
147
|
+
"label": true
|
|
148
|
+
},
|
|
149
|
+
"nodes": [
|
|
150
|
+
"a5f68eb9247d3b1a",
|
|
151
|
+
"cfd5edb34e3df477",
|
|
152
|
+
"d2b7368e1c55b208",
|
|
153
|
+
"4744f729aa18f631",
|
|
154
|
+
"7f2310f2e93bd28f"
|
|
155
|
+
],
|
|
156
|
+
"x": 1494,
|
|
157
|
+
"y": 1657.402587890625,
|
|
158
|
+
"w": 403,
|
|
159
|
+
"h": 284.597412109375
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "1f5fb00661db27e0",
|
|
163
|
+
"type": "group",
|
|
164
|
+
"z": "d0506e991d512ace",
|
|
165
|
+
"name": "Node-RED uninstall package",
|
|
166
|
+
"style": {
|
|
167
|
+
"label": true
|
|
168
|
+
},
|
|
169
|
+
"nodes": [
|
|
170
|
+
"0ad0c578fcb647a1",
|
|
171
|
+
"43f0f04922b1ecd9"
|
|
172
|
+
],
|
|
173
|
+
"x": 1476,
|
|
174
|
+
"y": 888,
|
|
175
|
+
"w": 253,
|
|
176
|
+
"h": 140
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "16d4e4d85e6a7e60",
|
|
180
|
+
"type": "group",
|
|
181
|
+
"z": "d0506e991d512ace",
|
|
182
|
+
"name": "update flows.flowhub.org",
|
|
183
|
+
"style": {
|
|
184
|
+
"label": true
|
|
185
|
+
},
|
|
186
|
+
"nodes": [
|
|
187
|
+
"b3f710d3656ec0bd",
|
|
188
|
+
"7134a0a01a78b0a4",
|
|
189
|
+
"d7bb19775d60ba5f",
|
|
190
|
+
"329cb745ab148644",
|
|
191
|
+
"8b4462e71d18d914",
|
|
192
|
+
"c447b660ffb100b7",
|
|
193
|
+
"24a6bdedc55adb51",
|
|
194
|
+
"e045b2b86c04bede",
|
|
195
|
+
"5096c688782c5d5b",
|
|
196
|
+
"4260147961b82058",
|
|
197
|
+
"f4dc513b63d2486a",
|
|
198
|
+
"3210b2328892fb83",
|
|
199
|
+
"2782388af7e4a3e3",
|
|
200
|
+
"1567d317341f29d7",
|
|
201
|
+
"f58a3097c0ec980c"
|
|
202
|
+
],
|
|
203
|
+
"x": 1469,
|
|
204
|
+
"y": 1987,
|
|
205
|
+
"w": 1750,
|
|
206
|
+
"h": 341.5
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"id": "792e5b24ee0a810b",
|
|
210
|
+
"type": "group",
|
|
211
|
+
"z": "d0506e991d512ace",
|
|
212
|
+
"name": "create the control center flow.",
|
|
213
|
+
"style": {
|
|
214
|
+
"label": true
|
|
215
|
+
},
|
|
216
|
+
"nodes": [
|
|
217
|
+
"e51aa8c50e251fa1",
|
|
218
|
+
"b3b1bcc40a8919a0",
|
|
219
|
+
"cbc70f2e73b7903b"
|
|
220
|
+
],
|
|
221
|
+
"x": 1419,
|
|
222
|
+
"y": 2383,
|
|
223
|
+
"w": 934,
|
|
224
|
+
"h": 82
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"id": "f3879ed58795ea91",
|
|
228
|
+
"type": "group",
|
|
229
|
+
"z": "d0506e991d512ace",
|
|
230
|
+
"g": "3ccaf963f1e72024",
|
|
231
|
+
"name": "example message",
|
|
232
|
+
"style": {
|
|
233
|
+
"fill": "#addb7b",
|
|
234
|
+
"label": true
|
|
235
|
+
},
|
|
236
|
+
"nodes": [
|
|
237
|
+
"9c62729b0ebd76ad"
|
|
238
|
+
],
|
|
239
|
+
"x": 371.5716323852539,
|
|
240
|
+
"y": 1122.2857598236628,
|
|
241
|
+
"w": 332,
|
|
242
|
+
"h": 82
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"id": "5fdf835cef66f3f2",
|
|
246
|
+
"type": "group",
|
|
247
|
+
"z": "d0506e991d512ace",
|
|
248
|
+
"g": "5d202e6481e451cb",
|
|
249
|
+
"name": "generate a collection of PkgFile nodes for a github repo",
|
|
250
|
+
"style": {
|
|
251
|
+
"label": true
|
|
252
|
+
},
|
|
253
|
+
"nodes": [
|
|
254
|
+
"5d7f01a1ad913039",
|
|
255
|
+
"d101de4d53a9432d",
|
|
256
|
+
"d5d4f3a794acac21",
|
|
257
|
+
"4f0f2c8426c173c1",
|
|
258
|
+
"c025c3fe56571a85",
|
|
259
|
+
"62dcb20fb8c8ac41",
|
|
260
|
+
"ecbad6c4f4f47ba1",
|
|
261
|
+
"9e44d92c288df764"
|
|
262
|
+
],
|
|
263
|
+
"x": 2528,
|
|
264
|
+
"y": 761,
|
|
265
|
+
"w": 527,
|
|
266
|
+
"h": 302
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"id": "893f316ea815e2b1",
|
|
270
|
+
"type": "junction",
|
|
271
|
+
"z": "d0506e991d512ace",
|
|
272
|
+
"x": 1371.9389214515686,
|
|
273
|
+
"y": 1243,
|
|
274
|
+
"wires": [
|
|
275
|
+
[
|
|
276
|
+
"2328dce09b97de9e",
|
|
277
|
+
"5ca98f63115bf9ad",
|
|
278
|
+
"2c515ea1f3cf8411",
|
|
279
|
+
"cfd5edb34e3df477",
|
|
280
|
+
"43f0f04922b1ecd9",
|
|
281
|
+
"f58a3097c0ec980c",
|
|
282
|
+
"e51aa8c50e251fa1",
|
|
283
|
+
"92db66ab26c22ab8"
|
|
284
|
+
]
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "2a7132258cbcf313",
|
|
289
|
+
"type": "function",
|
|
290
|
+
"z": "d0506e991d512ace",
|
|
291
|
+
"name": "Package.json validator",
|
|
292
|
+
"func": "/* must have a package.json */\n\nvar pkgjson = msg.contents.filter((d) => {\n return d.name == \"package.json\"\n});\n\nif ( pkgjson.length != 1 ) {\n if ( pkgjson.length > 1 ) {\n node.error(\"multiple package.json files found\", msg)\n } else {\n node.error(\"no package.json file found\", msg)\n }\n node.done();\n return;\n}\n\n/* name must be scoped */\n\nvar manifest = JSON.parse(pkgjson[0].contents);\n\nvar pdetails = manifest.name.split(\"/\")\n\nif (pdetails.length < 2 || pdetails[0][0] != '@') {\n node.error(\"package name not scoped: \" + manifest.name, msg)\n node.done();\n return\n}\n\n/* need to provide an node-red supported engine version */\n\nif ( !manifest[\"node-red\"] || !manifest[\"node-red\"].version ) {\n msg.error = {\n message: \"Node-RED supported version missing in package.json, see https://nodered.org/docs/creating-nodes/packaging for more details\"\n }\n node.error(\"Node-RED supported engine version not supplied in package.json\", msg)\n node.done();\n return\n}\n\n/* also ensure there is an nodejs engine supported version salvo */\n\nif ( !manifest.engines || !manifest.engines.node ) {\n msg.error = {\n message: \"Nodejs supported version missing in package.json, see https://docs.npmjs.com/cli/v7/configuring-npm/package-json#engines for more details\"\n }\n node.error(\"Nodejs supported engine version not supplied in package.json\", msg)\n node.done();\n return\n}\n\n/* ensure contents is not empty */\n\nmsg.contents.forEach( (d) => {\n if ( !d.contents || d.contents.trim() == \"\" ) {\n node.error(\"file empty: \" + d.name, msg)\n node.done();\n return\n }\n});\n\n/* DON'T NEED TO: ensure that the homepage points to an existing file */\n/*\nvar hsh = (Url.parse(manifest.homepage).hash || \"\").substr(1)\nvar rdme = msg.contents.filter((d) => { return d.name == hsh || d.name.replace(/\\.md$/i, '').toLowerCase() == hsh })\n\nif (rdme.length == 0) {\n msg.error = {\n message: \"Package.json homepage url does not link to a file in this package, this needs to be the case for nodered.org.\"\n }\n node.error(\"Package.json homepage url does not link to a file in this package, this needs to be the case for nodered.org.\", msg)\n node.done();\n return\n}\n*/\n\nreturn msg;",
|
|
293
|
+
"outputs": 1,
|
|
294
|
+
"timeout": "",
|
|
295
|
+
"noerr": 0,
|
|
296
|
+
"initialize": "",
|
|
297
|
+
"finalize": "",
|
|
298
|
+
"libs": [
|
|
299
|
+
{
|
|
300
|
+
"var": "Ajv",
|
|
301
|
+
"module": "ajv"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"var": "Url",
|
|
305
|
+
"module": "url"
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
"x": 1121.14306640625,
|
|
309
|
+
"y": 1378.12158203125,
|
|
310
|
+
"wires": [
|
|
311
|
+
[
|
|
312
|
+
"893f316ea815e2b1"
|
|
313
|
+
]
|
|
314
|
+
],
|
|
315
|
+
"outputLabels": [
|
|
316
|
+
"ok"
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"id": "9c62729b0ebd76ad",
|
|
321
|
+
"type": "inject",
|
|
322
|
+
"z": "d0506e991d512ace",
|
|
323
|
+
"g": "f3879ed58795ea91",
|
|
324
|
+
"name": "example contents for message",
|
|
325
|
+
"props": [
|
|
326
|
+
{
|
|
327
|
+
"p": "pname",
|
|
328
|
+
"v": "@gregoriusrippenstein/node-red-contrib-nodedev",
|
|
329
|
+
"vt": "str"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"p": "pversion",
|
|
333
|
+
"v": "0.0.3",
|
|
334
|
+
"vt": "str"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"p": "noderedinstall",
|
|
338
|
+
"v": "true",
|
|
339
|
+
"vt": "bool"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"p": "gitcommit",
|
|
343
|
+
"v": "false",
|
|
344
|
+
"vt": "bool"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"p": "githubowner",
|
|
348
|
+
"v": "gorenje",
|
|
349
|
+
"vt": "str"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"p": "githubrepo",
|
|
353
|
+
"v": "node-red-contrib-nodedev",
|
|
354
|
+
"vt": "str"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"p": "githubbranch",
|
|
358
|
+
"v": "main",
|
|
359
|
+
"vt": "str"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"p": "commit_message",
|
|
363
|
+
"v": "nice commit message",
|
|
364
|
+
"vt": "str"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"p": "githubauthor",
|
|
368
|
+
"v": "Gerrit Riessen",
|
|
369
|
+
"vt": "str"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"p": "githubauthoremail",
|
|
373
|
+
"v": "gerrit@openmindmap.org",
|
|
374
|
+
"vt": "str"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"p": "npmpublish",
|
|
378
|
+
"v": "false",
|
|
379
|
+
"vt": "bool"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"p": "npmunpublish",
|
|
383
|
+
"v": "false",
|
|
384
|
+
"vt": "bool"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"p": "npmotp",
|
|
388
|
+
"v": "123456",
|
|
389
|
+
"vt": "str"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"p": "contents",
|
|
393
|
+
"v": "{}",
|
|
394
|
+
"vt": "json"
|
|
395
|
+
}
|
|
396
|
+
],
|
|
397
|
+
"repeat": "",
|
|
398
|
+
"crontab": "",
|
|
399
|
+
"once": false,
|
|
400
|
+
"onceDelay": 0.1,
|
|
401
|
+
"topic": "",
|
|
402
|
+
"x": 547.5716323852539,
|
|
403
|
+
"y": 1163.2857598236628,
|
|
404
|
+
"wires": [
|
|
405
|
+
[]
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"id": "f07d2d09465ca725",
|
|
410
|
+
"type": "NodeRedInstall",
|
|
411
|
+
"z": "d0506e991d512ace",
|
|
412
|
+
"g": "56b55d2b5d03f424",
|
|
413
|
+
"name": "",
|
|
414
|
+
"x": 1894.71044921875,
|
|
415
|
+
"y": 928,
|
|
416
|
+
"wires": []
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"id": "3a0d53eb62336e62",
|
|
420
|
+
"type": "NpmTarBall",
|
|
421
|
+
"z": "d0506e991d512ace",
|
|
422
|
+
"g": "56b55d2b5d03f424",
|
|
423
|
+
"name": "",
|
|
424
|
+
"x": 1894.71044921875,
|
|
425
|
+
"y": 988.3969020843506,
|
|
426
|
+
"wires": [
|
|
427
|
+
[
|
|
428
|
+
"f07d2d09465ca725"
|
|
429
|
+
]
|
|
430
|
+
]
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"id": "fbe982a35d27d99b",
|
|
434
|
+
"type": "NpmTarBall",
|
|
435
|
+
"z": "d0506e991d512ace",
|
|
436
|
+
"g": "94fb93c898275493",
|
|
437
|
+
"name": "",
|
|
438
|
+
"x": 2054,
|
|
439
|
+
"y": 1802.5973510742188,
|
|
440
|
+
"wires": [
|
|
441
|
+
[
|
|
442
|
+
"33093265f4dfec9d"
|
|
443
|
+
]
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"id": "33093265f4dfec9d",
|
|
448
|
+
"type": "NpmPublish",
|
|
449
|
+
"z": "d0506e991d512ace",
|
|
450
|
+
"g": "94fb93c898275493",
|
|
451
|
+
"name": "",
|
|
452
|
+
"otp": "",
|
|
453
|
+
"action": "publish",
|
|
454
|
+
"authToken": "NPM_AUTH_TOKEN",
|
|
455
|
+
"authTokenType": "env",
|
|
456
|
+
"x": 2054,
|
|
457
|
+
"y": 1853.375,
|
|
458
|
+
"wires": [
|
|
459
|
+
[
|
|
460
|
+
"2f4b14f27919dfab"
|
|
461
|
+
]
|
|
462
|
+
]
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"id": "2f4b14f27919dfab",
|
|
466
|
+
"type": "debug",
|
|
467
|
+
"z": "d0506e991d512ace",
|
|
468
|
+
"name": "result of npm publish",
|
|
469
|
+
"active": true,
|
|
470
|
+
"tosidebar": true,
|
|
471
|
+
"console": false,
|
|
472
|
+
"tostatus": false,
|
|
473
|
+
"complete": "payload",
|
|
474
|
+
"targetType": "msg",
|
|
475
|
+
"statusVal": "",
|
|
476
|
+
"statusType": "auto",
|
|
477
|
+
"x": 3317,
|
|
478
|
+
"y": 1856.375,
|
|
479
|
+
"wires": []
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"id": "3f9377f9c6c4572b",
|
|
483
|
+
"type": "NpmPublish",
|
|
484
|
+
"z": "d0506e991d512ace",
|
|
485
|
+
"g": "88aca7ba3d72dff1",
|
|
486
|
+
"name": "Npm Unpublish",
|
|
487
|
+
"otp": "",
|
|
488
|
+
"action": "unpublish",
|
|
489
|
+
"authToken": "NPM_AUTH_TOKEN",
|
|
490
|
+
"authTokenType": "env",
|
|
491
|
+
"x": 1937,
|
|
492
|
+
"y": 1494.1874389648438,
|
|
493
|
+
"wires": [
|
|
494
|
+
[
|
|
495
|
+
"76a74cea5b85bef5"
|
|
496
|
+
]
|
|
497
|
+
]
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"id": "3a58f10bf6055793",
|
|
501
|
+
"type": "JsonSchemaValidatorWithDocu",
|
|
502
|
+
"z": "d0506e991d512ace",
|
|
503
|
+
"g": "88aca7ba3d72dff1",
|
|
504
|
+
"name": "",
|
|
505
|
+
"property": "",
|
|
506
|
+
"propertyType": "fullmsg",
|
|
507
|
+
"checkentireobject": true,
|
|
508
|
+
"func": "{\n \"title\": \"Check `msg` for NPM unpublish\",\n \"type\": \"object\",\n \"required\": [\n \"npmotp\",\n \"npmauthtokenvalue\"\n ],\n \"properties\": {\n \"npmotp\": {\n \"type\": \"string\",\n \"description\": \"One Time Password for NPM.\"\n },\n \"npmauthtokenvalue\": {\n \"type\": \"string\",\n \"description\": \"NPM auth token.\"\n }\n }\n}",
|
|
509
|
+
"schematitle": "Check `msg` for NPM publish",
|
|
510
|
+
"x": 1936,
|
|
511
|
+
"y": 1444.28271484375,
|
|
512
|
+
"wires": [
|
|
513
|
+
[
|
|
514
|
+
"3f9377f9c6c4572b"
|
|
515
|
+
]
|
|
516
|
+
],
|
|
517
|
+
"info": "## Check \\`msg\\` for NPM publish Type\n\n`object` ([Check \\`msg\\` for NPM publish](definition.md))\n\n# Check \\`msg\\` for NPM publish Properties\n\n| Property | Type | Required | Nullable | Defined by |\n| :---------------- | :------- | :------- | :------------- | :---------------------------------------------------------------------------------------------- |\n| [npmotp](#npmotp) | `string` | Required | cannot be null | [Check \\`msg\\` for NPM publish](definition-properties-npmotp.md \"undefined#/properties/npmotp\") |\n\n## npmotp\n\nOne Time Password for NPM.\n\n`npmotp`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` for NPM publish](definition-properties-npmotp.md \"undefined#/properties/npmotp\")\n\n### npmotp Type\n\n`string`\n\n---\n## npmotp Type\n\n`string`\n"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"id": "25f729f47986b0f8",
|
|
521
|
+
"type": "JsonSchemaValidatorWithDocu",
|
|
522
|
+
"z": "d0506e991d512ace",
|
|
523
|
+
"g": "5d202e6481e451cb",
|
|
524
|
+
"name": "Check `msg` object for github action requirements",
|
|
525
|
+
"property": "",
|
|
526
|
+
"propertyType": "fullmsg",
|
|
527
|
+
"checkentireobject": true,
|
|
528
|
+
"func": "{\n \"title\": \"Check `msg` object for GitHub action.\",\n \"type\": \"object\",\n \n \"required\": [\n \"githubowner\",\n \"githubrepo\",\n \"githubbranch\"\n ],\n\n \"properties\": {\n \"githubowner\": {\n \"type\": \"string\",\n \"description\": \"GitHub username.\"\n },\n \"githubrepo\": {\n \"type\": \"string\",\n \"description\": \"Repository upon which we are acting.\"\n },\n \"githubbranch\": {\n \"type\": \"string\",\n \"description\": \"The branch on which the commit should be done.\"\n }\n }\n}\n",
|
|
529
|
+
"schematitle": "Check `msg` object for GitHub commit.",
|
|
530
|
+
"x": 2305,
|
|
531
|
+
"y": 1090.3133544921875,
|
|
532
|
+
"wires": [
|
|
533
|
+
[
|
|
534
|
+
"30ee1ba5389219eb"
|
|
535
|
+
]
|
|
536
|
+
],
|
|
537
|
+
"info": "## Check \\`msg\\` object for GitHub commit. Type\n\n`object` ([Check \\`msg\\` object for GitHub commit.](definition.md))\n\n# Check \\`msg\\` object for GitHub commit. Properties\n\n| Property | Type | Required | Nullable | Defined by |\n| :-------------------------------------- | :-------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------ |\n| [commit\\_message](#commit_message) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-commit_message.md \"undefined#/properties/commit_message\") |\n| [githubowner](#githubowner) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubowner.md \"undefined#/properties/githubowner\") |\n| [githubrepo](#githubrepo) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubrepo.md \"undefined#/properties/githubrepo\") |\n| [githubbranch](#githubbranch) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubbranch.md \"undefined#/properties/githubbranch\") |\n| [githubauthor](#githubauthor) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubauthor.md \"undefined#/properties/githubauthor\") |\n| [githubauthoremail](#githubauthoremail) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubauthoremail.md \"undefined#/properties/githubauthoremail\") |\n| [gitcheckforchange](#gitcheckforchange) | `boolean` | Optional | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-gitcheckforchange.md \"undefined#/properties/gitcheckforchange\") |\n\n## commit\\_message\n\nMessage for the commit.\n\n`commit_message`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-commit_message.md \"undefined#/properties/commit_message\")\n\n### commit\\_message Type\n\n`string`\n\n## githubowner\n\nGitHub username.\n\n`githubowner`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubowner.md \"undefined#/properties/githubowner\")\n\n### githubowner Type\n\n`string`\n\n## githubrepo\n\nRepository upon which we are acting.\n\n`githubrepo`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubrepo.md \"undefined#/properties/githubrepo\")\n\n### githubrepo Type\n\n`string`\n\n## githubbranch\n\nThe branch on which the commit should be done.\n\n`githubbranch`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubbranch.md \"undefined#/properties/githubbranch\")\n\n### githubbranch Type\n\n`string`\n\n## githubauthor\n\nFull name of the author of the commit.\n\n`githubauthor`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubauthor.md \"undefined#/properties/githubauthor\")\n\n### githubauthor Type\n\n`string`\n\n## githubauthoremail\n\nEmail of the author for the commit message.\n\n`githubauthoremail`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubauthoremail.md \"undefined#/properties/githubauthoremail\")\n\n### githubauthoremail Type\n\n`string`\n\n## gitcheckforchange\n\nDo not commit just check whether there are changes.\n\n`gitcheckforchange`\n\n* is optional\n\n* Type: `boolean`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-gitcheckforchange.md \"undefined#/properties/gitcheckforchange\")\n\n### gitcheckforchange Type\n\n`boolean`\n\n---\n## commit\\_message Type\n\n`string`\n\n---\n## githubowner Type\n\n`string`\n\n---\n## githubrepo Type\n\n`string`\n\n---\n## githubbranch Type\n\n`string`\n\n---\n## githubauthor Type\n\n`string`\n\n---\n## githubauthoremail Type\n\n`string`\n\n---\n## gitcheckforchange Type\n\n`boolean`\n"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"id": "992dea9edfe05367",
|
|
541
|
+
"type": "JsonSchemaValidatorWithDocu",
|
|
542
|
+
"z": "d0506e991d512ace",
|
|
543
|
+
"g": "3ccaf963f1e72024",
|
|
544
|
+
"name": "",
|
|
545
|
+
"property": "",
|
|
546
|
+
"propertyType": "fullmsg",
|
|
547
|
+
"checkentireobject": true,
|
|
548
|
+
"func": "{\n \"title\": \"Basic requirements for `msg` object to utilise this flow.\",\n \"$id\": \"docid\",\n \"type\": \"object\",\n \"required\": [\n \"noderedinstall\",\n \"gitcommit\",\n \"npmpublish\",\n \"npmunpublish\"\n ],\n \"$defs\": {\n \"content\": {\n \"type\": \"object\",\n \"required\": [\n \"name\",\n \"contents\"\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Name of the file to be included in the package.\"\n },\n \"contents\": {\n \"type\": \"string\",\n \"description\": \"Contents of the file to be included in the package. Binary data should be encoded in base64.\"\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"Value describes the type of the content, default is utf-8.\",\n \"enum\": [\n \"text\",\n \"utf-8\",\n \"html\",\n \"javascript\",\n \"typescript\",\n \"markdown\",\n \"json\",\n \"base64\",\n \"yaml\",\n \"css\",\n \"xml\"\n ]\n }\n }\n }\n },\n \"properties\": {\n \"noderedinstall\": {\n \"type\": \"boolean\",\n \"description\": \"Install the node into Node-RED.\"\n },\n \"gitcommit\": {\n \"type\": \"boolean\",\n \"description\": \"Perform a GitHub commit with the package files.\"\n },\n \"npmpublish\": {\n \"type\": \"boolean\",\n \"description\": \"Publish package to NPM.\"\n },\n \"npmunpublish\": {\n \"type\": \"boolean\",\n \"description\": \"Unpublish package to NPM.\"\n },\n \"contents\": {\n \"type\": \"array\",\n \"description\": \"Contents of the package, all names should be prefixed with package/. Minimum: LICENSE, README and package.json --> 3.\",\n \"minItems\": 3,\n \"items\": {\n \"$ref\": \"docid#/$defs/content\"\n }\n }\n }\n}",
|
|
549
|
+
"schematitle": "Basic requirements for `msg` object to utilise this flow.",
|
|
550
|
+
"strictMode": false,
|
|
551
|
+
"removeDollarSchema": false,
|
|
552
|
+
"sendOnInvalid": false,
|
|
553
|
+
"x": 543.9999771118164,
|
|
554
|
+
"y": 1252.4662322998047,
|
|
555
|
+
"wires": [
|
|
556
|
+
[
|
|
557
|
+
"d485bbfece99d118"
|
|
558
|
+
]
|
|
559
|
+
],
|
|
560
|
+
"info": "## Basic requirements for \\`msg\\` object to utilise this flow. Type\n\n`object` ([Basic requirements for \\`msg\\` object to utilise this flow.](definition.md))\n\n# Basic requirements for \\`msg\\` object to utilise this flow. Properties\n\n| Property | Type | Required | Nullable | Defined by |\n| :-------------------------------- | :-------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |\n| [noderedinstall](#noderedinstall) | `boolean` | Required | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-noderedinstall.md \"docid#/properties/noderedinstall\") |\n| [gitcommit](#gitcommit) | `boolean` | Required | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-gitcommit.md \"docid#/properties/gitcommit\") |\n| [npmpublish](#npmpublish) | `boolean` | Required | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-npmpublish.md \"docid#/properties/npmpublish\") |\n| [npmunpublish](#npmunpublish) | `boolean` | Required | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-npmunpublish.md \"docid#/properties/npmunpublish\") |\n| [contents](#contents) | `array` | Optional | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-contents.md \"docid#/properties/contents\") |\n\n## noderedinstall\n\nInstall the node into Node-RED.\n\n`noderedinstall`\n\n* is required\n\n* Type: `boolean`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-noderedinstall.md \"docid#/properties/noderedinstall\")\n\n### noderedinstall Type\n\n`boolean`\n\n## gitcommit\n\nPerform a GitHub commit with the package files.\n\n`gitcommit`\n\n* is required\n\n* Type: `boolean`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-gitcommit.md \"docid#/properties/gitcommit\")\n\n### gitcommit Type\n\n`boolean`\n\n## npmpublish\n\nPublish package to NPM.\n\n`npmpublish`\n\n* is required\n\n* Type: `boolean`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-npmpublish.md \"docid#/properties/npmpublish\")\n\n### npmpublish Type\n\n`boolean`\n\n## npmunpublish\n\nUnpublish package to NPM.\n\n`npmunpublish`\n\n* is required\n\n* Type: `boolean`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-npmunpublish.md \"docid#/properties/npmunpublish\")\n\n### npmunpublish Type\n\n`boolean`\n\n## contents\n\nContents of the package, all names should be prefixed with package/. Minimum: LICENSE, README and package.json --> 3.\n\n`contents`\n\n* is optional\n\n* Type: `object[]` ([Details](definition-properties-contents-items.md))\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-properties-contents.md \"docid#/properties/contents\")\n\n### contents Type\n\n`object[]` ([Details](definition-properties-contents-items.md))\n\n### contents Constraints\n\n**minimum number of items**: the minimum number of items for this array is: `3`\n\n# Basic requirements for \\`msg\\` object to utilise this flow. Definitions\n\n## Definitions group content\n\nReference this group by using\n\n```json\n{\"$ref\":\"docid#/$defs/content\"}\n```\n\n| Property | Type | Required | Nullable | Defined by |\n| :---------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [name](#name) | `string` | Required | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-name.md \"docid#/$defs/content/properties/name\") |\n| [contents](#contents-1) | `string` | Required | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-contents.md \"docid#/$defs/content/properties/contents\") |\n| [type](#type) | `string` | Optional | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-type.md \"docid#/$defs/content/properties/type\") |\n\n### name\n\nName of the file to be included in the package.\n\n`name`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-name.md \"docid#/$defs/content/properties/name\")\n\n#### name Type\n\n`string`\n\n### contents\n\nContents of the file to be included in the package. Binary data should be encoded in base64.\n\n`contents`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-contents.md \"docid#/$defs/content/properties/contents\")\n\n#### contents Type\n\n`string`\n\n### type\n\nValue describes the type of the content, default is utf-8.\n\n`type`\n\n* is optional\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-type.md \"docid#/$defs/content/properties/type\")\n\n#### type Type\n\n`string`\n\n#### type Constraints\n\n**enum**: the value of this property must be equal to one of the following values:\n\n| Value | Explanation |\n| :------------- | :---------- |\n| `\"text\"` | |\n| `\"utf-8\"` | |\n| `\"html\"` | |\n| `\"javascript\"` | |\n| `\"typescript\"` | |\n| `\"markdown\"` | |\n| `\"json\"` | |\n| `\"base64\"` | |\n| `\"yaml\"` | |\n| `\"css\"` | |\n| `\"xml\"` | |\n\n---\n## $defs Type\n\nunknown\n\n---\n## items Type\n\n`object` ([Details](definition-defs-content.md))\n\n# items Properties\n\n| Property | Type | Required | Nullable | Defined by |\n| :-------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [name](#name) | `string` | Required | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-name.md \"docid#/$defs/content/properties/name\") |\n| [contents](#contents) | `string` | Required | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-contents.md \"docid#/$defs/content/properties/contents\") |\n| [type](#type) | `string` | Optional | cannot be null | [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-type.md \"docid#/$defs/content/properties/type\") |\n\n## name\n\nName of the file to be included in the package.\n\n`name`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-name.md \"docid#/$defs/content/properties/name\")\n\n### name Type\n\n`string`\n\n## contents\n\nContents of the file to be included in the package. Binary data should be encoded in base64.\n\n`contents`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-contents.md \"docid#/$defs/content/properties/contents\")\n\n### contents Type\n\n`string`\n\n## type\n\nValue describes the type of the content, default is utf-8.\n\n`type`\n\n* is optional\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Basic requirements for \\`msg\\` object to utilise this flow.](definition-defs-content-properties-type.md \"docid#/$defs/content/properties/type\")\n\n### type Type\n\n`string`\n\n### type Constraints\n\n**enum**: the value of this property must be equal to one of the following values:\n\n| Value | Explanation |\n| :------------- | :---------- |\n| `\"text\"` | |\n| `\"utf-8\"` | |\n| `\"html\"` | |\n| `\"javascript\"` | |\n| `\"typescript\"` | |\n| `\"markdown\"` | |\n| `\"json\"` | |\n| `\"base64\"` | |\n| `\"yaml\"` | |\n| `\"css\"` | |\n| `\"xml\"` | |\n\n---\n## name Type\n\n`string`\n\n---\n## contents Type\n\n`string`\n\n---\n## type Type\n\n`string`\n\n## type Constraints\n\n**enum**: the value of this property must be equal to one of the following values:\n\n| Value | Explanation |\n| :------------- | :---------- |\n| `\"text\"` | |\n| `\"utf-8\"` | |\n| `\"html\"` | |\n| `\"javascript\"` | |\n| `\"typescript\"` | |\n| `\"markdown\"` | |\n| `\"json\"` | |\n| `\"base64\"` | |\n| `\"yaml\"` | |\n| `\"css\"` | |\n| `\"xml\"` | |\n\n---\n## noderedinstall Type\n\n`boolean`\n\n---\n## gitcommit Type\n\n`boolean`\n\n---\n## npmpublish Type\n\n`boolean`\n\n---\n## npmunpublish Type\n\n`boolean`\n\n---\n## contents Type\n\n`object[]` ([Details](definition-defs-content.md))\n\n## contents Constraints\n\n**minimum number of items**: the minimum number of items for this array is: `3`\n"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"id": "de9fefd043701d43",
|
|
564
|
+
"type": "JsonSchemaValidatorWithDocu",
|
|
565
|
+
"z": "d0506e991d512ace",
|
|
566
|
+
"g": "94fb93c898275493",
|
|
567
|
+
"name": "",
|
|
568
|
+
"property": "",
|
|
569
|
+
"propertyType": "fullmsg",
|
|
570
|
+
"checkentireobject": true,
|
|
571
|
+
"func": "{\n \"title\": \"Check `msg` for NPM publish\",\n \"type\": \"object\",\n \"required\": [\n \"npmotp\",\n \"npmauthtokenvalue\"\n ],\n \"properties\": {\n \"npmotp\": {\n \"type\": \"string\",\n \"description\": \"One Time Password for NPM.\"\n },\n \"npmauthtokenvalue\": {\n \"type\": \"string\",\n \"description\": \"NPM auth token.\"\n }\n }\n}",
|
|
572
|
+
"schematitle": "Check `msg` for NPM publish",
|
|
573
|
+
"x": 2054,
|
|
574
|
+
"y": 1751.8197021484375,
|
|
575
|
+
"wires": [
|
|
576
|
+
[
|
|
577
|
+
"fbe982a35d27d99b"
|
|
578
|
+
]
|
|
579
|
+
],
|
|
580
|
+
"info": "## Check \\`msg\\` for NPM publish Type\n\n`object` ([Check \\`msg\\` for NPM publish](definition.md))\n\n# Check \\`msg\\` for NPM publish Properties\n\n| Property | Type | Required | Nullable | Defined by |\n| :---------------- | :------- | :------- | :------------- | :---------------------------------------------------------------------------------------------- |\n| [npmotp](#npmotp) | `string` | Required | cannot be null | [Check \\`msg\\` for NPM publish](definition-properties-npmotp.md \"undefined#/properties/npmotp\") |\n\n## npmotp\n\nOne Time Password for NPM.\n\n`npmotp`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` for NPM publish](definition-properties-npmotp.md \"undefined#/properties/npmotp\")\n\n### npmotp Type\n\n`string`\n\n---\n## npmotp Type\n\n`string`\n"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"id": "963dfb765b0d9849",
|
|
584
|
+
"type": "link in",
|
|
585
|
+
"z": "d0506e991d512ace",
|
|
586
|
+
"g": "aba9a5d741241f1c",
|
|
587
|
+
"name": "[nodedev-backend] entry point",
|
|
588
|
+
"links": [
|
|
589
|
+
"2a2c48992b03300b",
|
|
590
|
+
"3ebeb43268fc2432",
|
|
591
|
+
"df76a54b11ea3484",
|
|
592
|
+
"52984a25cd97deb2",
|
|
593
|
+
"e58d2a33281f6043",
|
|
594
|
+
"f21980c40abc3811",
|
|
595
|
+
"4777fe6c081ec7e5",
|
|
596
|
+
"4244c03f684c560a",
|
|
597
|
+
"773d3e13bbf669a0",
|
|
598
|
+
"c2c1a523f9950852",
|
|
599
|
+
"87c2fbfd417c695a",
|
|
600
|
+
"9de976451f6bc348",
|
|
601
|
+
"f3d9caa7c6d135b1",
|
|
602
|
+
"d69293191d11dcaa",
|
|
603
|
+
"0e755b624f666969",
|
|
604
|
+
"28242e21524d03f2"
|
|
605
|
+
],
|
|
606
|
+
"x": 174.285888671875,
|
|
607
|
+
"y": 1252.4662322998047,
|
|
608
|
+
"wires": [
|
|
609
|
+
[
|
|
610
|
+
"992dea9edfe05367"
|
|
611
|
+
]
|
|
612
|
+
]
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"id": "f7125db69297187e",
|
|
616
|
+
"type": "debug",
|
|
617
|
+
"z": "d0506e991d512ace",
|
|
618
|
+
"name": "github no changes",
|
|
619
|
+
"active": true,
|
|
620
|
+
"tosidebar": true,
|
|
621
|
+
"console": false,
|
|
622
|
+
"tostatus": true,
|
|
623
|
+
"complete": "payload",
|
|
624
|
+
"targetType": "msg",
|
|
625
|
+
"statusVal": "payload",
|
|
626
|
+
"statusType": "auto",
|
|
627
|
+
"x": 3307,
|
|
628
|
+
"y": 467,
|
|
629
|
+
"wires": []
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"id": "971ddff1a67a201f",
|
|
633
|
+
"type": "function",
|
|
634
|
+
"z": "d0506e991d512ace",
|
|
635
|
+
"g": "5d202e6481e451cb",
|
|
636
|
+
"name": "get enitre tree for sha",
|
|
637
|
+
"func": "try {\n var octokit = new octokitRest.Octokit({ \n auth: process.env.GITHUB_TOKEN \n });\n} catch(e) {\n node.error(\"init octokit\", {\n ...msg,\n error: e\n })\n return undefined;\n}\n\n/**\n * Msg attributes:\n * - owner: github repo owner\n * - repo: github repo name\n * - payload: sha of tree (i.e. directory)\n * \n * Return:\n * - payload: tree of the sha, this will be an array with one entry per member of tree\n */\n\ntry {\n \n octokit.request(\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}?recursive=true\", {\n owner: msg.owner,\n repo: msg.repo,\n tree_sha: msg.payload\n }).then( (resp) => {\n node.send({ ...msg, payload: resp.data.tree})\n }).catch(function (e) {\n node.error(\"obtaining tree\", { ...msg, error: e })\n });\n\n} catch (e) {\n node.error(\"something went wrong\", { ...msg, error: e})\n}\n",
|
|
638
|
+
"outputs": 1,
|
|
639
|
+
"timeout": "",
|
|
640
|
+
"noerr": 0,
|
|
641
|
+
"initialize": "",
|
|
642
|
+
"finalize": "",
|
|
643
|
+
"libs": [
|
|
644
|
+
{
|
|
645
|
+
"var": "octokitRest",
|
|
646
|
+
"module": "@octokit/rest"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"var": "process",
|
|
650
|
+
"module": "process"
|
|
651
|
+
}
|
|
652
|
+
],
|
|
653
|
+
"x": 2310,
|
|
654
|
+
"y": 846.9914615855496,
|
|
655
|
+
"wires": [
|
|
656
|
+
[
|
|
657
|
+
"732f4fa715c2fa78"
|
|
658
|
+
]
|
|
659
|
+
]
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"id": "732f4fa715c2fa78",
|
|
663
|
+
"type": "change",
|
|
664
|
+
"z": "d0506e991d512ace",
|
|
665
|
+
"g": "5d202e6481e451cb",
|
|
666
|
+
"name": "",
|
|
667
|
+
"rules": [
|
|
668
|
+
{
|
|
669
|
+
"t": "set",
|
|
670
|
+
"p": "current_shas",
|
|
671
|
+
"pt": "msg",
|
|
672
|
+
"to": "payload",
|
|
673
|
+
"tot": "msg",
|
|
674
|
+
"dc": true
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"t": "set",
|
|
678
|
+
"p": "payload",
|
|
679
|
+
"pt": "msg",
|
|
680
|
+
"to": "parent_sha",
|
|
681
|
+
"tot": "msg"
|
|
682
|
+
}
|
|
683
|
+
],
|
|
684
|
+
"action": "",
|
|
685
|
+
"property": "",
|
|
686
|
+
"from": "",
|
|
687
|
+
"to": "",
|
|
688
|
+
"reg": false,
|
|
689
|
+
"x": 2310,
|
|
690
|
+
"y": 788.6609743903664,
|
|
691
|
+
"wires": [
|
|
692
|
+
[
|
|
693
|
+
"551504329d997bad"
|
|
694
|
+
]
|
|
695
|
+
]
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"id": "255cf2c177f684a9",
|
|
699
|
+
"type": "function",
|
|
700
|
+
"z": "d0506e991d512ace",
|
|
701
|
+
"g": "5d202e6481e451cb",
|
|
702
|
+
"name": "check for changes",
|
|
703
|
+
"func": "var shaLookup = {};\n\nfor ( var idx = 0 ; idx < msg.current_shas.length ; idx++ ) {\n shaLookup[msg.current_shas[idx].path] = msg.current_shas[idx].sha\n}\n\nmsg.changes = msg.payload.filter( (d) => {\n return d.sha != shaLookup[d.path]\n})\n\nif ( msg.changes.length > 0 ) {\n return [msg, undefined];\n} else {\n msg.payload = \"github: no changes\"\n return [undefined, msg];\n}\n",
|
|
704
|
+
"outputs": 2,
|
|
705
|
+
"timeout": "",
|
|
706
|
+
"noerr": 0,
|
|
707
|
+
"initialize": "",
|
|
708
|
+
"finalize": "",
|
|
709
|
+
"libs": [],
|
|
710
|
+
"x": 2310,
|
|
711
|
+
"y": 457.4331970214844,
|
|
712
|
+
"wires": [
|
|
713
|
+
[
|
|
714
|
+
"79b43c9ce292f151"
|
|
715
|
+
],
|
|
716
|
+
[
|
|
717
|
+
"f7125db69297187e"
|
|
718
|
+
]
|
|
719
|
+
],
|
|
720
|
+
"outputLabels": [
|
|
721
|
+
"sha differ",
|
|
722
|
+
"no change"
|
|
723
|
+
]
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"id": "79b43c9ce292f151",
|
|
727
|
+
"type": "switch",
|
|
728
|
+
"z": "d0506e991d512ace",
|
|
729
|
+
"g": "5d202e6481e451cb",
|
|
730
|
+
"name": "gitcheckforchange",
|
|
731
|
+
"property": "gitcheckforchange",
|
|
732
|
+
"propertyType": "msg",
|
|
733
|
+
"rules": [
|
|
734
|
+
{
|
|
735
|
+
"t": "true"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"t": "else"
|
|
739
|
+
}
|
|
740
|
+
],
|
|
741
|
+
"checkall": "true",
|
|
742
|
+
"repair": false,
|
|
743
|
+
"outputs": 2,
|
|
744
|
+
"x": 2326,
|
|
745
|
+
"y": 265,
|
|
746
|
+
"wires": [
|
|
747
|
+
[
|
|
748
|
+
"0cb6ad0a57a95eee"
|
|
749
|
+
],
|
|
750
|
+
[
|
|
751
|
+
"7f0881a1f1e17458"
|
|
752
|
+
]
|
|
753
|
+
]
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"id": "0cb6ad0a57a95eee",
|
|
757
|
+
"type": "change",
|
|
758
|
+
"z": "d0506e991d512ace",
|
|
759
|
+
"g": "5d202e6481e451cb",
|
|
760
|
+
"name": "",
|
|
761
|
+
"rules": [
|
|
762
|
+
{
|
|
763
|
+
"t": "set",
|
|
764
|
+
"p": "payload",
|
|
765
|
+
"pt": "msg",
|
|
766
|
+
"to": "changes",
|
|
767
|
+
"tot": "msg"
|
|
768
|
+
}
|
|
769
|
+
],
|
|
770
|
+
"action": "",
|
|
771
|
+
"property": "",
|
|
772
|
+
"from": "",
|
|
773
|
+
"to": "",
|
|
774
|
+
"reg": false,
|
|
775
|
+
"x": 2552,
|
|
776
|
+
"y": 259,
|
|
777
|
+
"wires": [
|
|
778
|
+
[
|
|
779
|
+
"3ca095a5abd3abf2"
|
|
780
|
+
]
|
|
781
|
+
]
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"id": "3ca095a5abd3abf2",
|
|
785
|
+
"type": "debug",
|
|
786
|
+
"z": "d0506e991d512ace",
|
|
787
|
+
"name": "github changes",
|
|
788
|
+
"active": true,
|
|
789
|
+
"tosidebar": true,
|
|
790
|
+
"console": false,
|
|
791
|
+
"tostatus": false,
|
|
792
|
+
"complete": "payload",
|
|
793
|
+
"targetType": "msg",
|
|
794
|
+
"statusVal": "",
|
|
795
|
+
"statusType": "auto",
|
|
796
|
+
"x": 3297,
|
|
797
|
+
"y": 262,
|
|
798
|
+
"wires": []
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"id": "bfe2775a7cf26d83",
|
|
802
|
+
"type": "switch",
|
|
803
|
+
"z": "d0506e991d512ace",
|
|
804
|
+
"g": "5d202e6481e451cb",
|
|
805
|
+
"name": "gitcheckforchange",
|
|
806
|
+
"property": "gitcheckforchange",
|
|
807
|
+
"propertyType": "msg",
|
|
808
|
+
"rules": [
|
|
809
|
+
{
|
|
810
|
+
"t": "true"
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"t": "else"
|
|
814
|
+
}
|
|
815
|
+
],
|
|
816
|
+
"checkall": "false",
|
|
817
|
+
"repair": false,
|
|
818
|
+
"outputs": 2,
|
|
819
|
+
"x": 2241,
|
|
820
|
+
"y": 1236,
|
|
821
|
+
"wires": [
|
|
822
|
+
[
|
|
823
|
+
"25f729f47986b0f8"
|
|
824
|
+
],
|
|
825
|
+
[
|
|
826
|
+
"777b0b7476a82755"
|
|
827
|
+
]
|
|
828
|
+
]
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"id": "d485bbfece99d118",
|
|
832
|
+
"type": "switch",
|
|
833
|
+
"z": "d0506e991d512ace",
|
|
834
|
+
"name": "\"ignore package check\" check",
|
|
835
|
+
"property": "ignore_package_check",
|
|
836
|
+
"propertyType": "msg",
|
|
837
|
+
"rules": [
|
|
838
|
+
{
|
|
839
|
+
"t": "true"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"t": "else"
|
|
843
|
+
}
|
|
844
|
+
],
|
|
845
|
+
"checkall": "false",
|
|
846
|
+
"repair": false,
|
|
847
|
+
"outputs": 2,
|
|
848
|
+
"x": 940,
|
|
849
|
+
"y": 1252.4662322998047,
|
|
850
|
+
"wires": [
|
|
851
|
+
[
|
|
852
|
+
"893f316ea815e2b1"
|
|
853
|
+
],
|
|
854
|
+
[
|
|
855
|
+
"fb7a6a038d9bea0d"
|
|
856
|
+
]
|
|
857
|
+
]
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"id": "cd99083510c1fa1e",
|
|
861
|
+
"type": "function",
|
|
862
|
+
"z": "d0506e991d512ace",
|
|
863
|
+
"g": "5d202e6481e451cb",
|
|
864
|
+
"name": "updating head on repo at branch - aka committing commit",
|
|
865
|
+
"func": "try {\n var octokit = new octokitRest.Octokit({\n auth: process.env.GITHUB_TOKEN\n });\n} catch (e) {\n node.error(\"init octokit\", {\n ...msg,\n error: e\n })\n return undefined;\n}\n\n/**\n * Msg attributes:\n * - owner: github repo owner\n * - repo: github repo name\n * - branch: github repo branch to update with the new commit sha\n * - payload: the sha of the commit created\n * \n * Return:\n * - payload: new sha of the branch\n * \n * Source:\n * - https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#update-a-reference\n */\n\ntry {\n msg.new_commit_sha = msg.payload;\n\n octokit.request(\"PATCH /repos/:owner/:repo/git/refs/heads/:branch\", {\n owner: msg.owner,\n repo: msg.repo,\n branch: msg.branch,\n sha: msg.payload\n }).then(function (resp) {\n node.send({ \n ...msg, \n payload: resp.data.object.sha,\n })\n }).catch(function (e) {\n node.error(\"committing commit\", { ...msg, error: e })\n });\n\n} catch (e) {\n node.error(\"something went wrong\", { ...msg, error: e })\n}\n",
|
|
866
|
+
"outputs": 1,
|
|
867
|
+
"noerr": 0,
|
|
868
|
+
"initialize": "",
|
|
869
|
+
"finalize": "",
|
|
870
|
+
"libs": [
|
|
871
|
+
{
|
|
872
|
+
"var": "octokitRest",
|
|
873
|
+
"module": "@octokit/rest"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"var": "process",
|
|
877
|
+
"module": "process"
|
|
878
|
+
}
|
|
879
|
+
],
|
|
880
|
+
"x": 2692,
|
|
881
|
+
"y": 403,
|
|
882
|
+
"wires": [
|
|
883
|
+
[
|
|
884
|
+
"4621debd1d2a4ad8"
|
|
885
|
+
]
|
|
886
|
+
]
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
"id": "0f865b51b0f7997d",
|
|
890
|
+
"type": "function",
|
|
891
|
+
"z": "d0506e991d512ace",
|
|
892
|
+
"g": "5d202e6481e451cb",
|
|
893
|
+
"name": "create commit",
|
|
894
|
+
"func": "try {\n var octokit = new octokitRest.Octokit({\n auth: process.env.GITHUB_TOKEN\n });\n} catch (e) {\n node.error(\"init octokit\", {\n ...msg,\n error: e\n })\n return undefined;\n}\n\n/**\n * Msg attributes:\n * - owner: github repo owner\n * - repo: github repo name\n * - payload: the sha of the tree to commit\n * - parent_sha: the current sha of the repo, the return value of current repo revision\n * - author: an object with the following:\n * - name: name of the author of the commit\n * - email: email of the author of the commit\n * - message: commit message\n * \n * Return:\n * - payload: sha of newly commit\n * \n * Source:\n * - https://docs.github.com/en/rest/git/commits?apiVersion=2022-11-28#create-a-commit\n */\n\ntry {\n \n octokit.request(\"POST /repos/:owner/:repo/git/commits\", {\n owner: msg.owner,\n repo: msg.repo, \n message: msg.message,\n author: {\n name: msg.author.name,\n email: msg.author.email\n },\n parents: [\n msg.parent_sha\n ],\n tree: msg.payload\n }).then((resp) => {\n node.send({ ...msg, payload: resp.data.sha })\n }).catch(function (e) {\n node.error(\"creating commit\", { ...msg, error: e })\n });\n\n} catch (e) {\n node.error(\"something went wrong\", { ...msg, error: e })\n}\n",
|
|
895
|
+
"outputs": 1,
|
|
896
|
+
"noerr": 0,
|
|
897
|
+
"initialize": "",
|
|
898
|
+
"finalize": "",
|
|
899
|
+
"libs": [
|
|
900
|
+
{
|
|
901
|
+
"var": "octokitRest",
|
|
902
|
+
"module": "@octokit/rest"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"var": "process",
|
|
906
|
+
"module": "process"
|
|
907
|
+
}
|
|
908
|
+
],
|
|
909
|
+
"x": 2552,
|
|
910
|
+
"y": 355,
|
|
911
|
+
"wires": [
|
|
912
|
+
[
|
|
913
|
+
"cd99083510c1fa1e"
|
|
914
|
+
]
|
|
915
|
+
]
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"id": "7f0881a1f1e17458",
|
|
919
|
+
"type": "function",
|
|
920
|
+
"z": "d0506e991d512ace",
|
|
921
|
+
"g": "5d202e6481e451cb",
|
|
922
|
+
"name": "create tree for blobs",
|
|
923
|
+
"func": "try {\n var octokit = new octokitRest.Octokit({ \n auth: process.env.GITHUB_TOKEN \n });\n} catch(e) {\n node.error(\"init octokit\", {\n ...msg,\n error: e\n })\n return undefined;\n}\n\n/**\n * Msg attributes:\n * - owner: github repo owner\n * - repo: github repo name\n * - payload: array of blobs, each blob is an object with:\n * - path: filename of the blob in the repo, with path, i.e., dir1/dir2/filename.txt\n * - sha: the sha of the blob created initially using the create blob function\n * - parent_sha: the current sha of the repo, the return value of current repo revision\n * \n * Return:\n * - payload: sha of newly created tree\n */\n\ntry {\n var tree = msg.payload.map(function(blb){\n return {\n ...blb,\n mode: \"100644\",\n type: \"blob\"\n }\n });\n\n octokit.request(\"POST /repos/:owner/:repo/git/trees\", {\n owner: msg.owner,\n repo: msg.repo,\n base_tree: msg.parent_sha,\n tree: tree\n }).then((resp) => {\n node.send({ ...msg, payload: resp.data.sha })\n }).catch(function (e) {\n node.error(\"creating commit\", { ...msg, error: e })\n });\n \n} catch (e) {\n node.error(\"something went wrong\", { ...msg, error: e})\n}\n",
|
|
924
|
+
"outputs": 1,
|
|
925
|
+
"timeout": "",
|
|
926
|
+
"noerr": 0,
|
|
927
|
+
"initialize": "",
|
|
928
|
+
"finalize": "",
|
|
929
|
+
"libs": [
|
|
930
|
+
{
|
|
931
|
+
"var": "octokitRest",
|
|
932
|
+
"module": "@octokit/rest"
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"var": "process",
|
|
936
|
+
"module": "process"
|
|
937
|
+
}
|
|
938
|
+
],
|
|
939
|
+
"x": 2572,
|
|
940
|
+
"y": 307,
|
|
941
|
+
"wires": [
|
|
942
|
+
[
|
|
943
|
+
"0f865b51b0f7997d"
|
|
944
|
+
]
|
|
945
|
+
]
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"id": "945ff83ff12b2cf5",
|
|
949
|
+
"type": "function",
|
|
950
|
+
"z": "d0506e991d512ace",
|
|
951
|
+
"g": "5d202e6481e451cb",
|
|
952
|
+
"name": "create blob",
|
|
953
|
+
"func": "try {\n var octokit = new octokitRest.Octokit({ \n auth: process.env.GITHUB_TOKEN \n });\n} catch(e) {\n node.error(\"init octokit\", {\n ...msg,\n error: e\n })\n return undefined;\n}\n/**\n * Msg attributes:\n * - owner: github repo owner\n * - repo: github repo name\n * - payload: base64 encoded content for blob\n * \n * Return:\n * - payload: sha of newly created blob\n */\n\ntry {\n \n octokit.request(\"POST /repos/:owner/:repo/git/blobs\", {\n owner: msg.owner,\n repo: msg.repo,\n content: msg.payload,\n encoding: \"base64\"\n }).then( (resp) => {\n node.send({ ...msg, payload: resp.data.sha})\n }).catch(function (e) {\n node.error(\"creating blob\", { ...msg, error: e })\n });\n\n} catch (e) {\n node.error(\"something went wrong\", { ...msg, error: e})\n}\n",
|
|
954
|
+
"outputs": 1,
|
|
955
|
+
"timeout": "",
|
|
956
|
+
"noerr": 0,
|
|
957
|
+
"initialize": "",
|
|
958
|
+
"finalize": "",
|
|
959
|
+
"libs": [
|
|
960
|
+
{
|
|
961
|
+
"var": "octokitRest",
|
|
962
|
+
"module": "@octokit/rest"
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"var": "process",
|
|
966
|
+
"module": "process"
|
|
967
|
+
}
|
|
968
|
+
],
|
|
969
|
+
"x": 2542,
|
|
970
|
+
"y": 615.5,
|
|
971
|
+
"wires": [
|
|
972
|
+
[
|
|
973
|
+
"a827fb86b27503a3"
|
|
974
|
+
]
|
|
975
|
+
]
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"id": "3a610d385636a5ad",
|
|
979
|
+
"type": "debug",
|
|
980
|
+
"z": "d0506e991d512ace",
|
|
981
|
+
"name": "Exceptions Will Happen",
|
|
982
|
+
"active": true,
|
|
983
|
+
"tosidebar": true,
|
|
984
|
+
"console": false,
|
|
985
|
+
"tostatus": false,
|
|
986
|
+
"complete": "true",
|
|
987
|
+
"targetType": "full",
|
|
988
|
+
"statusVal": "",
|
|
989
|
+
"statusType": "auto",
|
|
990
|
+
"x": 3327,
|
|
991
|
+
"y": 1396.285659790039,
|
|
992
|
+
"wires": []
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"id": "856405ba78a11b7a",
|
|
996
|
+
"type": "function",
|
|
997
|
+
"z": "d0506e991d512ace",
|
|
998
|
+
"g": "5d202e6481e451cb",
|
|
999
|
+
"name": "current repo revision (sha)",
|
|
1000
|
+
"func": "try {\n var octokit = new octokitRest.Octokit({ \n auth: process.env.GITHUB_TOKEN \n });\n} catch(e) {\n node.error(\"init octokit\", {\n ...msg,\n error: e\n })\n return undefined;\n}\n\n/**\n * Msg attributes:\n * - owner: github repo owner\n * - repo: github repo name\n * - branch: branch name\n * \n * Return:\n * - payload: current revision of repo\n * \n * Source:\n * - https://docs.github.com/en/rest/branches/branches?apiVersion=2022-11-28#get-a-branch\n */\n\ntry {\n\n octokit.request(\"GET /repos/:owner/:repo/branches/:branch\", {\n owner: msg.owner,\n repo: msg.repo,\n branch: msg.branch,\n }).then( (resp) => {\n node.send({ ...msg, payload: resp.data.commit.sha})\n }).catch(function (e) {\n node.error(\"obtaining latest sha\", { ...msg, error: e })\n });\n\n} catch (e) {\n node.error(\"request failure\", { ...msg, error: e})\n}\n",
|
|
1001
|
+
"outputs": 1,
|
|
1002
|
+
"timeout": "",
|
|
1003
|
+
"noerr": 0,
|
|
1004
|
+
"initialize": "",
|
|
1005
|
+
"finalize": "",
|
|
1006
|
+
"libs": [
|
|
1007
|
+
{
|
|
1008
|
+
"var": "octokitRest",
|
|
1009
|
+
"module": "@octokit/rest"
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"var": "process",
|
|
1013
|
+
"module": "process"
|
|
1014
|
+
}
|
|
1015
|
+
],
|
|
1016
|
+
"x": 2310,
|
|
1017
|
+
"y": 963.652435975916,
|
|
1018
|
+
"wires": [
|
|
1019
|
+
[
|
|
1020
|
+
"decde30c099b3701"
|
|
1021
|
+
]
|
|
1022
|
+
]
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"id": "ae6cb62b1c841870",
|
|
1026
|
+
"type": "catch",
|
|
1027
|
+
"z": "d0506e991d512ace",
|
|
1028
|
+
"name": "",
|
|
1029
|
+
"scope": null,
|
|
1030
|
+
"uncaught": false,
|
|
1031
|
+
"x": 2203,
|
|
1032
|
+
"y": 1396.285659790039,
|
|
1033
|
+
"wires": [
|
|
1034
|
+
[
|
|
1035
|
+
"3a610d385636a5ad"
|
|
1036
|
+
]
|
|
1037
|
+
]
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"id": "76a74cea5b85bef5",
|
|
1041
|
+
"type": "debug",
|
|
1042
|
+
"z": "d0506e991d512ace",
|
|
1043
|
+
"name": "result of npm unpublish",
|
|
1044
|
+
"active": true,
|
|
1045
|
+
"tosidebar": true,
|
|
1046
|
+
"console": false,
|
|
1047
|
+
"tostatus": false,
|
|
1048
|
+
"complete": "payload",
|
|
1049
|
+
"targetType": "msg",
|
|
1050
|
+
"statusVal": "",
|
|
1051
|
+
"statusType": "auto",
|
|
1052
|
+
"x": 3327,
|
|
1053
|
+
"y": 1494.1874389648438,
|
|
1054
|
+
"wires": []
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"id": "2328dce09b97de9e",
|
|
1058
|
+
"type": "switch",
|
|
1059
|
+
"z": "d0506e991d512ace",
|
|
1060
|
+
"g": "88aca7ba3d72dff1",
|
|
1061
|
+
"name": "npmunpublish",
|
|
1062
|
+
"property": "npmunpublish",
|
|
1063
|
+
"propertyType": "msg",
|
|
1064
|
+
"rules": [
|
|
1065
|
+
{
|
|
1066
|
+
"t": "true"
|
|
1067
|
+
}
|
|
1068
|
+
],
|
|
1069
|
+
"checkall": "true",
|
|
1070
|
+
"repair": false,
|
|
1071
|
+
"outputs": 1,
|
|
1072
|
+
"x": 1939.432373046875,
|
|
1073
|
+
"y": 1395.8125,
|
|
1074
|
+
"wires": [
|
|
1075
|
+
[
|
|
1076
|
+
"3a58f10bf6055793"
|
|
1077
|
+
]
|
|
1078
|
+
]
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"id": "4621debd1d2a4ad8",
|
|
1082
|
+
"type": "debug",
|
|
1083
|
+
"z": "d0506e991d512ace",
|
|
1084
|
+
"name": "new github commit revision",
|
|
1085
|
+
"active": true,
|
|
1086
|
+
"tosidebar": true,
|
|
1087
|
+
"console": false,
|
|
1088
|
+
"tostatus": true,
|
|
1089
|
+
"complete": "payload",
|
|
1090
|
+
"targetType": "msg",
|
|
1091
|
+
"statusVal": "payload",
|
|
1092
|
+
"statusType": "auto",
|
|
1093
|
+
"x": 3337,
|
|
1094
|
+
"y": 406,
|
|
1095
|
+
"wires": []
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
"id": "decde30c099b3701",
|
|
1099
|
+
"type": "change",
|
|
1100
|
+
"z": "d0506e991d512ace",
|
|
1101
|
+
"g": "5d202e6481e451cb",
|
|
1102
|
+
"name": "",
|
|
1103
|
+
"rules": [
|
|
1104
|
+
{
|
|
1105
|
+
"t": "set",
|
|
1106
|
+
"p": "parent_sha",
|
|
1107
|
+
"pt": "msg",
|
|
1108
|
+
"to": "payload",
|
|
1109
|
+
"tot": "msg"
|
|
1110
|
+
}
|
|
1111
|
+
],
|
|
1112
|
+
"action": "",
|
|
1113
|
+
"property": "",
|
|
1114
|
+
"from": "",
|
|
1115
|
+
"to": "",
|
|
1116
|
+
"reg": false,
|
|
1117
|
+
"x": 2310,
|
|
1118
|
+
"y": 905.3219487807328,
|
|
1119
|
+
"wires": [
|
|
1120
|
+
[
|
|
1121
|
+
"971ddff1a67a201f"
|
|
1122
|
+
]
|
|
1123
|
+
]
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
"id": "2905451093154a24",
|
|
1127
|
+
"type": "join",
|
|
1128
|
+
"z": "d0506e991d512ace",
|
|
1129
|
+
"g": "5d202e6481e451cb",
|
|
1130
|
+
"name": "",
|
|
1131
|
+
"mode": "auto",
|
|
1132
|
+
"build": "object",
|
|
1133
|
+
"property": "payload",
|
|
1134
|
+
"propertyType": "msg",
|
|
1135
|
+
"key": "topic",
|
|
1136
|
+
"joiner": "\\n",
|
|
1137
|
+
"joinerType": "str",
|
|
1138
|
+
"accumulate": "false",
|
|
1139
|
+
"timeout": "",
|
|
1140
|
+
"count": "",
|
|
1141
|
+
"reduceRight": false,
|
|
1142
|
+
"x": 2310,
|
|
1143
|
+
"y": 502,
|
|
1144
|
+
"wires": [
|
|
1145
|
+
[
|
|
1146
|
+
"255cf2c177f684a9"
|
|
1147
|
+
]
|
|
1148
|
+
]
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
"id": "a827fb86b27503a3",
|
|
1152
|
+
"type": "change",
|
|
1153
|
+
"z": "d0506e991d512ace",
|
|
1154
|
+
"g": "5d202e6481e451cb",
|
|
1155
|
+
"name": "",
|
|
1156
|
+
"rules": [
|
|
1157
|
+
{
|
|
1158
|
+
"t": "set",
|
|
1159
|
+
"p": "payload",
|
|
1160
|
+
"pt": "msg",
|
|
1161
|
+
"to": "{\t \"path\": $$.filename,\t \"sha\": $$.payload\t}",
|
|
1162
|
+
"tot": "jsonata"
|
|
1163
|
+
}
|
|
1164
|
+
],
|
|
1165
|
+
"action": "",
|
|
1166
|
+
"property": "",
|
|
1167
|
+
"from": "",
|
|
1168
|
+
"to": "",
|
|
1169
|
+
"reg": false,
|
|
1170
|
+
"x": 2552,
|
|
1171
|
+
"y": 560,
|
|
1172
|
+
"wires": [
|
|
1173
|
+
[
|
|
1174
|
+
"2905451093154a24"
|
|
1175
|
+
]
|
|
1176
|
+
]
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
"id": "10a5e33f8ca3f848",
|
|
1180
|
+
"type": "change",
|
|
1181
|
+
"z": "d0506e991d512ace",
|
|
1182
|
+
"g": "5d202e6481e451cb",
|
|
1183
|
+
"name": "",
|
|
1184
|
+
"rules": [
|
|
1185
|
+
{
|
|
1186
|
+
"t": "set",
|
|
1187
|
+
"p": "filename",
|
|
1188
|
+
"pt": "msg",
|
|
1189
|
+
"to": "payload.name",
|
|
1190
|
+
"tot": "msg"
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
"t": "set",
|
|
1194
|
+
"p": "payload",
|
|
1195
|
+
"pt": "msg",
|
|
1196
|
+
"to": "payload.contents",
|
|
1197
|
+
"tot": "msg"
|
|
1198
|
+
}
|
|
1199
|
+
],
|
|
1200
|
+
"action": "",
|
|
1201
|
+
"property": "",
|
|
1202
|
+
"from": "",
|
|
1203
|
+
"to": "",
|
|
1204
|
+
"reg": false,
|
|
1205
|
+
"x": 2552,
|
|
1206
|
+
"y": 671,
|
|
1207
|
+
"wires": [
|
|
1208
|
+
[
|
|
1209
|
+
"945ff83ff12b2cf5"
|
|
1210
|
+
]
|
|
1211
|
+
]
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"id": "1d0e09e64d59771e",
|
|
1215
|
+
"type": "split",
|
|
1216
|
+
"z": "d0506e991d512ace",
|
|
1217
|
+
"g": "5d202e6481e451cb",
|
|
1218
|
+
"name": "",
|
|
1219
|
+
"splt": "\\n",
|
|
1220
|
+
"spltType": "str",
|
|
1221
|
+
"arraySplt": 1,
|
|
1222
|
+
"arraySpltType": "len",
|
|
1223
|
+
"stream": false,
|
|
1224
|
+
"addname": "",
|
|
1225
|
+
"x": 2310,
|
|
1226
|
+
"y": 672,
|
|
1227
|
+
"wires": [
|
|
1228
|
+
[
|
|
1229
|
+
"10a5e33f8ca3f848"
|
|
1230
|
+
]
|
|
1231
|
+
]
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
"id": "30ee1ba5389219eb",
|
|
1235
|
+
"type": "change",
|
|
1236
|
+
"z": "d0506e991d512ace",
|
|
1237
|
+
"g": "5d202e6481e451cb",
|
|
1238
|
+
"name": "owner, repo, branch, author",
|
|
1239
|
+
"rules": [
|
|
1240
|
+
{
|
|
1241
|
+
"t": "set",
|
|
1242
|
+
"p": "owner",
|
|
1243
|
+
"pt": "msg",
|
|
1244
|
+
"to": "githubowner",
|
|
1245
|
+
"tot": "msg"
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
"t": "set",
|
|
1249
|
+
"p": "repo",
|
|
1250
|
+
"pt": "msg",
|
|
1251
|
+
"to": "githubrepo",
|
|
1252
|
+
"tot": "msg"
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"t": "set",
|
|
1256
|
+
"p": "branch",
|
|
1257
|
+
"pt": "msg",
|
|
1258
|
+
"to": "githubbranch",
|
|
1259
|
+
"tot": "msg"
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
"t": "set",
|
|
1263
|
+
"p": "author",
|
|
1264
|
+
"pt": "msg",
|
|
1265
|
+
"to": "{\t \"name\": $$.githubauthor,\t \"email\": $$.githubauthoremail\t}",
|
|
1266
|
+
"tot": "jsonata"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"t": "set",
|
|
1270
|
+
"p": "message",
|
|
1271
|
+
"pt": "msg",
|
|
1272
|
+
"to": "commit_message",
|
|
1273
|
+
"tot": "msg"
|
|
1274
|
+
}
|
|
1275
|
+
],
|
|
1276
|
+
"action": "",
|
|
1277
|
+
"property": "",
|
|
1278
|
+
"from": "",
|
|
1279
|
+
"to": "",
|
|
1280
|
+
"reg": false,
|
|
1281
|
+
"x": 2310,
|
|
1282
|
+
"y": 1021.9829231710992,
|
|
1283
|
+
"wires": [
|
|
1284
|
+
[
|
|
1285
|
+
"5d7f01a1ad913039",
|
|
1286
|
+
"856405ba78a11b7a"
|
|
1287
|
+
]
|
|
1288
|
+
]
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"id": "551504329d997bad",
|
|
1292
|
+
"type": "function",
|
|
1293
|
+
"z": "d0506e991d512ace",
|
|
1294
|
+
"g": "5d202e6481e451cb",
|
|
1295
|
+
"name": "prepare tree",
|
|
1296
|
+
"func": "msg.payload = msg.contents.map( (elem) => {\n var newelem = { ...elem};\n \n if ( elem.type != \"base64\") {\n // @ts-ignore\n newelem.contents = RED.util.ensureBuffer(elem.contents).toString('base64')\n }\n\n delete newelem.type;\n return newelem;\n})\n\nreturn msg;",
|
|
1297
|
+
"outputs": 1,
|
|
1298
|
+
"timeout": "",
|
|
1299
|
+
"noerr": 0,
|
|
1300
|
+
"initialize": "",
|
|
1301
|
+
"finalize": "",
|
|
1302
|
+
"libs": [],
|
|
1303
|
+
"x": 2310,
|
|
1304
|
+
"y": 730.3304871951832,
|
|
1305
|
+
"wires": [
|
|
1306
|
+
[
|
|
1307
|
+
"1d0e09e64d59771e"
|
|
1308
|
+
]
|
|
1309
|
+
]
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
"id": "5ca98f63115bf9ad",
|
|
1313
|
+
"type": "switch",
|
|
1314
|
+
"z": "d0506e991d512ace",
|
|
1315
|
+
"g": "94fb93c898275493",
|
|
1316
|
+
"name": "npmpublish",
|
|
1317
|
+
"property": "npmpublish",
|
|
1318
|
+
"propertyType": "msg",
|
|
1319
|
+
"rules": [
|
|
1320
|
+
{
|
|
1321
|
+
"t": "true"
|
|
1322
|
+
}
|
|
1323
|
+
],
|
|
1324
|
+
"checkall": "true",
|
|
1325
|
+
"repair": false,
|
|
1326
|
+
"outputs": 1,
|
|
1327
|
+
"x": 2057,
|
|
1328
|
+
"y": 1698,
|
|
1329
|
+
"wires": [
|
|
1330
|
+
[
|
|
1331
|
+
"de9fefd043701d43"
|
|
1332
|
+
]
|
|
1333
|
+
]
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
"id": "ccb92d03a6cda7df",
|
|
1337
|
+
"type": "switch",
|
|
1338
|
+
"z": "d0506e991d512ace",
|
|
1339
|
+
"g": "5d202e6481e451cb",
|
|
1340
|
+
"name": "gitcommit",
|
|
1341
|
+
"property": "gitcommit",
|
|
1342
|
+
"propertyType": "msg",
|
|
1343
|
+
"rules": [
|
|
1344
|
+
{
|
|
1345
|
+
"t": "true"
|
|
1346
|
+
}
|
|
1347
|
+
],
|
|
1348
|
+
"checkall": "false",
|
|
1349
|
+
"repair": false,
|
|
1350
|
+
"outputs": 1,
|
|
1351
|
+
"x": 2695,
|
|
1352
|
+
"y": 1249,
|
|
1353
|
+
"wires": [
|
|
1354
|
+
[
|
|
1355
|
+
"f45011cdb6c9405b"
|
|
1356
|
+
]
|
|
1357
|
+
]
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
"id": "2c515ea1f3cf8411",
|
|
1361
|
+
"type": "switch",
|
|
1362
|
+
"z": "d0506e991d512ace",
|
|
1363
|
+
"g": "56b55d2b5d03f424",
|
|
1364
|
+
"name": "noderedinstall",
|
|
1365
|
+
"property": "noderedinstall",
|
|
1366
|
+
"propertyType": "msg",
|
|
1367
|
+
"rules": [
|
|
1368
|
+
{
|
|
1369
|
+
"t": "true"
|
|
1370
|
+
}
|
|
1371
|
+
],
|
|
1372
|
+
"checkall": "true",
|
|
1373
|
+
"repair": false,
|
|
1374
|
+
"outputs": 1,
|
|
1375
|
+
"x": 1885,
|
|
1376
|
+
"y": 1051,
|
|
1377
|
+
"wires": [
|
|
1378
|
+
[
|
|
1379
|
+
"3a0d53eb62336e62"
|
|
1380
|
+
]
|
|
1381
|
+
]
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
"id": "a5f68eb9247d3b1a",
|
|
1385
|
+
"type": "NpmTarBall",
|
|
1386
|
+
"z": "d0506e991d512ace",
|
|
1387
|
+
"g": "de7cfeb5612cf008",
|
|
1388
|
+
"name": "",
|
|
1389
|
+
"x": 1619,
|
|
1390
|
+
"y": 1767,
|
|
1391
|
+
"wires": [
|
|
1392
|
+
[
|
|
1393
|
+
"d2b7368e1c55b208",
|
|
1394
|
+
"7f2310f2e93bd28f"
|
|
1395
|
+
]
|
|
1396
|
+
]
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
"id": "cfd5edb34e3df477",
|
|
1400
|
+
"type": "switch",
|
|
1401
|
+
"z": "d0506e991d512ace",
|
|
1402
|
+
"g": "de7cfeb5612cf008",
|
|
1403
|
+
"name": "writetgzfile",
|
|
1404
|
+
"property": "writetgzfile",
|
|
1405
|
+
"propertyType": "msg",
|
|
1406
|
+
"rules": [
|
|
1407
|
+
{
|
|
1408
|
+
"t": "true"
|
|
1409
|
+
}
|
|
1410
|
+
],
|
|
1411
|
+
"checkall": "true",
|
|
1412
|
+
"repair": false,
|
|
1413
|
+
"outputs": 1,
|
|
1414
|
+
"x": 1590,
|
|
1415
|
+
"y": 1698.402587890625,
|
|
1416
|
+
"wires": [
|
|
1417
|
+
[
|
|
1418
|
+
"a5f68eb9247d3b1a"
|
|
1419
|
+
]
|
|
1420
|
+
]
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"id": "d2b7368e1c55b208",
|
|
1424
|
+
"type": "file",
|
|
1425
|
+
"z": "d0506e991d512ace",
|
|
1426
|
+
"g": "de7cfeb5612cf008",
|
|
1427
|
+
"name": "",
|
|
1428
|
+
"filename": "\"/data/\" & $split($$.pname, \"/\")[1] & \"-\" & $$.pversion & \".tgz\"",
|
|
1429
|
+
"filenameType": "jsonata",
|
|
1430
|
+
"appendNewline": false,
|
|
1431
|
+
"createDir": false,
|
|
1432
|
+
"overwriteFile": "true",
|
|
1433
|
+
"encoding": "none",
|
|
1434
|
+
"x": 1811,
|
|
1435
|
+
"y": 1768,
|
|
1436
|
+
"wires": [
|
|
1437
|
+
[]
|
|
1438
|
+
]
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"id": "777b0b7476a82755",
|
|
1442
|
+
"type": "switch",
|
|
1443
|
+
"z": "d0506e991d512ace",
|
|
1444
|
+
"g": "5d202e6481e451cb",
|
|
1445
|
+
"name": "githubgettar",
|
|
1446
|
+
"property": "githubgettar",
|
|
1447
|
+
"propertyType": "msg",
|
|
1448
|
+
"rules": [
|
|
1449
|
+
{
|
|
1450
|
+
"t": "true"
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
"t": "else"
|
|
1454
|
+
}
|
|
1455
|
+
],
|
|
1456
|
+
"checkall": "false",
|
|
1457
|
+
"repair": false,
|
|
1458
|
+
"outputs": 2,
|
|
1459
|
+
"x": 2467,
|
|
1460
|
+
"y": 1242,
|
|
1461
|
+
"wires": [
|
|
1462
|
+
[
|
|
1463
|
+
"25f729f47986b0f8"
|
|
1464
|
+
],
|
|
1465
|
+
[
|
|
1466
|
+
"ccb92d03a6cda7df"
|
|
1467
|
+
]
|
|
1468
|
+
]
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"id": "5d7f01a1ad913039",
|
|
1472
|
+
"type": "switch",
|
|
1473
|
+
"z": "d0506e991d512ace",
|
|
1474
|
+
"g": "5fdf835cef66f3f2",
|
|
1475
|
+
"name": "githubgettar",
|
|
1476
|
+
"property": "githubgettar",
|
|
1477
|
+
"propertyType": "msg",
|
|
1478
|
+
"rules": [
|
|
1479
|
+
{
|
|
1480
|
+
"t": "true"
|
|
1481
|
+
}
|
|
1482
|
+
],
|
|
1483
|
+
"checkall": "false",
|
|
1484
|
+
"repair": false,
|
|
1485
|
+
"outputs": 1,
|
|
1486
|
+
"x": 2624,
|
|
1487
|
+
"y": 1022,
|
|
1488
|
+
"wires": [
|
|
1489
|
+
[
|
|
1490
|
+
"d101de4d53a9432d"
|
|
1491
|
+
]
|
|
1492
|
+
]
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
"id": "d101de4d53a9432d",
|
|
1496
|
+
"type": "function",
|
|
1497
|
+
"z": "d0506e991d512ace",
|
|
1498
|
+
"g": "5fdf835cef66f3f2",
|
|
1499
|
+
"name": "get tarball",
|
|
1500
|
+
"func": "try {\n var octokit = new octokitRest.Octokit({ \n auth: (msg.github && msg.github.access_token) || process.env.GITHUB_TOKEN \n });\n} catch(e) {\n node.error(\"init octokit\", {\n ...msg,\n error: e\n })\n return undefined;\n}\n\n/**\n * Msg attributes:\n * - owner: github repo owner\n * - repo: github repo name\n * - branch: github branch\n * \n * Return:\n * - payload: arrayBuffer of tarball content\n * \n * Discussion:\n * \n * This request returns a redirect URL that octokit \n * automagically follows.\n * \n */\n\ntry {\n \n octokit.request(\"GET /repos/:owner/:repo/tarball/:branch\", {\n owner: msg.owner,\n repo: msg.repo,\n branch: msg.branch\n }).then( (resp) => {\n node.send({ \n ...msg, \n payload: resp.data, \n dirname: resp.headers[\"content-disposition\"].replace(/^.+filename=/,\"\").replace(/.tar.gz$/,'/') \n })\n }).catch(function (e) {\n node.error(\"obtaining tree\", { ...msg, error: e })\n });\n\n} catch (e) {\n node.error(\"something went wrong\", { ...msg, error: e})\n}\n",
|
|
1501
|
+
"outputs": 1,
|
|
1502
|
+
"timeout": "",
|
|
1503
|
+
"noerr": 0,
|
|
1504
|
+
"initialize": "",
|
|
1505
|
+
"finalize": "",
|
|
1506
|
+
"libs": [
|
|
1507
|
+
{
|
|
1508
|
+
"var": "octokitRest",
|
|
1509
|
+
"module": "@octokit/rest"
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"var": "process",
|
|
1513
|
+
"module": "process"
|
|
1514
|
+
}
|
|
1515
|
+
],
|
|
1516
|
+
"x": 2614,
|
|
1517
|
+
"y": 978,
|
|
1518
|
+
"wires": [
|
|
1519
|
+
[
|
|
1520
|
+
"4f0f2c8426c173c1"
|
|
1521
|
+
]
|
|
1522
|
+
]
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"id": "d5d4f3a794acac21",
|
|
1526
|
+
"type": "NodeFactory",
|
|
1527
|
+
"z": "d0506e991d512ace",
|
|
1528
|
+
"g": "5fdf835cef66f3f2",
|
|
1529
|
+
"name": "",
|
|
1530
|
+
"nodename": "ddd",
|
|
1531
|
+
"color": "#e5e4ef",
|
|
1532
|
+
"hasbutton": false,
|
|
1533
|
+
"minify": false,
|
|
1534
|
+
"hasinput": true,
|
|
1535
|
+
"outputcount": 1,
|
|
1536
|
+
"category": "",
|
|
1537
|
+
"summary": "dd",
|
|
1538
|
+
"description": "dd",
|
|
1539
|
+
"icon": "font-awesome/fa-industry",
|
|
1540
|
+
"frt2bakcomm": false,
|
|
1541
|
+
"bak2frtcomm": false,
|
|
1542
|
+
"createmanifest": false,
|
|
1543
|
+
"isplugin": false,
|
|
1544
|
+
"isrealplugin": false,
|
|
1545
|
+
"x": 2959,
|
|
1546
|
+
"y": 802,
|
|
1547
|
+
"wires": [
|
|
1548
|
+
[]
|
|
1549
|
+
]
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"id": "4f0f2c8426c173c1",
|
|
1553
|
+
"type": "tarball",
|
|
1554
|
+
"z": "d0506e991d512ace",
|
|
1555
|
+
"g": "5fdf835cef66f3f2",
|
|
1556
|
+
"name": "",
|
|
1557
|
+
"x": 2604,
|
|
1558
|
+
"y": 934,
|
|
1559
|
+
"wires": [
|
|
1560
|
+
[
|
|
1561
|
+
"9e44d92c288df764"
|
|
1562
|
+
]
|
|
1563
|
+
]
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
"id": "c025c3fe56571a85",
|
|
1567
|
+
"type": "join",
|
|
1568
|
+
"z": "d0506e991d512ace",
|
|
1569
|
+
"g": "5fdf835cef66f3f2",
|
|
1570
|
+
"name": "",
|
|
1571
|
+
"mode": "custom",
|
|
1572
|
+
"build": "array",
|
|
1573
|
+
"property": "",
|
|
1574
|
+
"propertyType": "full",
|
|
1575
|
+
"key": "topic",
|
|
1576
|
+
"joiner": "\\n",
|
|
1577
|
+
"joinerType": "str",
|
|
1578
|
+
"useparts": true,
|
|
1579
|
+
"accumulate": false,
|
|
1580
|
+
"timeout": "",
|
|
1581
|
+
"count": "",
|
|
1582
|
+
"reduceRight": false,
|
|
1583
|
+
"reduceExp": "",
|
|
1584
|
+
"reduceInit": "",
|
|
1585
|
+
"reduceInitType": "",
|
|
1586
|
+
"reduceFixup": "",
|
|
1587
|
+
"x": 2604,
|
|
1588
|
+
"y": 846,
|
|
1589
|
+
"wires": [
|
|
1590
|
+
[
|
|
1591
|
+
"62dcb20fb8c8ac41"
|
|
1592
|
+
]
|
|
1593
|
+
]
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"id": "62dcb20fb8c8ac41",
|
|
1597
|
+
"type": "function",
|
|
1598
|
+
"z": "d0506e991d512ace",
|
|
1599
|
+
"g": "5fdf835cef66f3f2",
|
|
1600
|
+
"name": "filter out empty paths",
|
|
1601
|
+
"func": "msg.payload = msg.payload.filter( e => {\n return e.path != \"\"\n})\n\nreturn msg;",
|
|
1602
|
+
"outputs": 1,
|
|
1603
|
+
"timeout": 0,
|
|
1604
|
+
"noerr": 0,
|
|
1605
|
+
"initialize": "",
|
|
1606
|
+
"finalize": "",
|
|
1607
|
+
"libs": [],
|
|
1608
|
+
"x": 2830,
|
|
1609
|
+
"y": 846,
|
|
1610
|
+
"wires": [
|
|
1611
|
+
[
|
|
1612
|
+
"ecbad6c4f4f47ba1"
|
|
1613
|
+
]
|
|
1614
|
+
]
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"id": "ecbad6c4f4f47ba1",
|
|
1618
|
+
"type": "tarball",
|
|
1619
|
+
"z": "d0506e991d512ace",
|
|
1620
|
+
"g": "5fdf835cef66f3f2",
|
|
1621
|
+
"name": "",
|
|
1622
|
+
"x": 2604,
|
|
1623
|
+
"y": 802,
|
|
1624
|
+
"wires": [
|
|
1625
|
+
[
|
|
1626
|
+
"d5d4f3a794acac21"
|
|
1627
|
+
]
|
|
1628
|
+
]
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
"id": "9e44d92c288df764",
|
|
1632
|
+
"type": "function",
|
|
1633
|
+
"z": "d0506e991d512ace",
|
|
1634
|
+
"g": "5fdf835cef66f3f2",
|
|
1635
|
+
"name": "remove top level directory from paths",
|
|
1636
|
+
"func": "if ( !msg.complete ) {\n msg.path = msg.path.replace(msg.dirname,\"\")\n}\n\nreturn msg;",
|
|
1637
|
+
"outputs": 1,
|
|
1638
|
+
"timeout": 0,
|
|
1639
|
+
"noerr": 0,
|
|
1640
|
+
"initialize": "",
|
|
1641
|
+
"finalize": "",
|
|
1642
|
+
"libs": [],
|
|
1643
|
+
"x": 2704,
|
|
1644
|
+
"y": 890,
|
|
1645
|
+
"wires": [
|
|
1646
|
+
[
|
|
1647
|
+
"c025c3fe56571a85"
|
|
1648
|
+
]
|
|
1649
|
+
]
|
|
1650
|
+
},
|
|
1651
|
+
{
|
|
1652
|
+
"id": "0ad0c578fcb647a1",
|
|
1653
|
+
"type": "ClientCode",
|
|
1654
|
+
"z": "d0506e991d512ace",
|
|
1655
|
+
"g": "1f5fb00661db27e0",
|
|
1656
|
+
"name": "Node-RED Uninstall",
|
|
1657
|
+
"clientcode": "let pkgname = msg.pname\nlet origmsg = msg;\nlet nde = node;\n\n$.ajax({\n url: 'nodes/' + pkgname,\n data: data,\n cache: false,\n contentType: false,\n processData: false,\n method: 'DELETE',\n}).always(function (data, textStatus, xhr) {\n}).success(function(d) {\n RED.notify(\"Removed package: \" + pkgname, { type: \"success\"})\n nde.send(origmsg)\n}).fail(function (xhr, textStatus, err) {\n var message = textStatus;\n if (xhr.responseJSON) {\n message = xhr.responseJSON.message;\n }\n \n var notification = RED.notify(RED._('palette.editor.errors.removeFailed', { module: pkgname, message: message }), {\n type: 'error',\n modal: true,\n fixed: true,\n buttons: [\n {\n text: RED._(\"common.label.close\"),\n click: function () {\n notification.close();\n }\n }, {\n text: RED._(\"eventLog.view\"),\n click: function () {\n notification.close();\n RED.actions.invoke(\"core:show-event-log\");\n }\n }\n ]\n });\n})",
|
|
1658
|
+
"format": "javascript",
|
|
1659
|
+
"x": 1603,
|
|
1660
|
+
"y": 929,
|
|
1661
|
+
"wires": [
|
|
1662
|
+
[]
|
|
1663
|
+
]
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
"id": "43f0f04922b1ecd9",
|
|
1667
|
+
"type": "switch",
|
|
1668
|
+
"z": "d0506e991d512ace",
|
|
1669
|
+
"g": "1f5fb00661db27e0",
|
|
1670
|
+
"name": "nodered_uninstall",
|
|
1671
|
+
"property": "nodered_uninstall",
|
|
1672
|
+
"propertyType": "msg",
|
|
1673
|
+
"rules": [
|
|
1674
|
+
{
|
|
1675
|
+
"t": "true"
|
|
1676
|
+
}
|
|
1677
|
+
],
|
|
1678
|
+
"checkall": "false",
|
|
1679
|
+
"repair": false,
|
|
1680
|
+
"outputs": 1,
|
|
1681
|
+
"x": 1592,
|
|
1682
|
+
"y": 987,
|
|
1683
|
+
"wires": [
|
|
1684
|
+
[
|
|
1685
|
+
"0ad0c578fcb647a1"
|
|
1686
|
+
]
|
|
1687
|
+
]
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
"id": "f45011cdb6c9405b",
|
|
1691
|
+
"type": "JsonSchemaValidatorWithDocu",
|
|
1692
|
+
"z": "d0506e991d512ace",
|
|
1693
|
+
"g": "5d202e6481e451cb",
|
|
1694
|
+
"name": "",
|
|
1695
|
+
"property": "",
|
|
1696
|
+
"propertyType": "fullmsg",
|
|
1697
|
+
"checkentireobject": true,
|
|
1698
|
+
"func": "{\n \"title\": \"Check `msg` for GitHub commit.\",\n \"type\": \"object\",\n \"required\": [\n \"githubauthtokenvalue\",\n \"commit_message\",\n \"githubauthor\",\n \"githubauthoremail\"\n ],\n \"properties\": {\n \"githubauthtokenvalue\": {\n \"type\": \"string\",\n \"description\": \"GitHub auth tokent.\"\n },\n \"commit_message\": {\n \"type\": \"string\",\n \"description\": \"Message for the commit.\"\n },\n \"githubauthor\": {\n \"type\": \"string\",\n \"description\": \"Full name of the author of the commit.\"\n },\n \"githubauthoremail\": {\n \"type\": \"string\",\n \"description\": \"Email of the author for the commit message.\"\n }\n }\n}\n",
|
|
1699
|
+
"schematitle": "Check `msg` object for GitHub commit.",
|
|
1700
|
+
"x": 2702,
|
|
1701
|
+
"y": 1144,
|
|
1702
|
+
"wires": [
|
|
1703
|
+
[
|
|
1704
|
+
"25f729f47986b0f8"
|
|
1705
|
+
]
|
|
1706
|
+
],
|
|
1707
|
+
"info": "## Check \\`msg\\` object for GitHub commit. Type\n\n`object` ([Check \\`msg\\` object for GitHub commit.](definition.md))\n\n# Check \\`msg\\` object for GitHub commit. Properties\n\n| Property | Type | Required | Nullable | Defined by |\n| :-------------------------------------- | :-------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------ |\n| [commit\\_message](#commit_message) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-commit_message.md \"undefined#/properties/commit_message\") |\n| [githubowner](#githubowner) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubowner.md \"undefined#/properties/githubowner\") |\n| [githubrepo](#githubrepo) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubrepo.md \"undefined#/properties/githubrepo\") |\n| [githubbranch](#githubbranch) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubbranch.md \"undefined#/properties/githubbranch\") |\n| [githubauthor](#githubauthor) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubauthor.md \"undefined#/properties/githubauthor\") |\n| [githubauthoremail](#githubauthoremail) | `string` | Required | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-githubauthoremail.md \"undefined#/properties/githubauthoremail\") |\n| [gitcheckforchange](#gitcheckforchange) | `boolean` | Optional | cannot be null | [Check \\`msg\\` object for GitHub commit.](definition-properties-gitcheckforchange.md \"undefined#/properties/gitcheckforchange\") |\n\n## commit\\_message\n\nMessage for the commit.\n\n`commit_message`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-commit_message.md \"undefined#/properties/commit_message\")\n\n### commit\\_message Type\n\n`string`\n\n## githubowner\n\nGitHub username.\n\n`githubowner`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubowner.md \"undefined#/properties/githubowner\")\n\n### githubowner Type\n\n`string`\n\n## githubrepo\n\nRepository upon which we are acting.\n\n`githubrepo`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubrepo.md \"undefined#/properties/githubrepo\")\n\n### githubrepo Type\n\n`string`\n\n## githubbranch\n\nThe branch on which the commit should be done.\n\n`githubbranch`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubbranch.md \"undefined#/properties/githubbranch\")\n\n### githubbranch Type\n\n`string`\n\n## githubauthor\n\nFull name of the author of the commit.\n\n`githubauthor`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubauthor.md \"undefined#/properties/githubauthor\")\n\n### githubauthor Type\n\n`string`\n\n## githubauthoremail\n\nEmail of the author for the commit message.\n\n`githubauthoremail`\n\n* is required\n\n* Type: `string`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-githubauthoremail.md \"undefined#/properties/githubauthoremail\")\n\n### githubauthoremail Type\n\n`string`\n\n## gitcheckforchange\n\nDo not commit just check whether there are changes.\n\n`gitcheckforchange`\n\n* is optional\n\n* Type: `boolean`\n\n* cannot be null\n\n* defined in: [Check \\`msg\\` object for GitHub commit.](definition-properties-gitcheckforchange.md \"undefined#/properties/gitcheckforchange\")\n\n### gitcheckforchange Type\n\n`boolean`\n\n---\n## commit\\_message Type\n\n`string`\n\n---\n## githubowner Type\n\n`string`\n\n---\n## githubrepo Type\n\n`string`\n\n---\n## githubbranch Type\n\n`string`\n\n---\n## githubauthor Type\n\n`string`\n\n---\n## githubauthoremail Type\n\n`string`\n\n---\n## gitcheckforchange Type\n\n`boolean`\n"
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
"id": "b3f710d3656ec0bd",
|
|
1711
|
+
"type": "exec",
|
|
1712
|
+
"z": "d0506e991d512ace",
|
|
1713
|
+
"g": "16d4e4d85e6a7e60",
|
|
1714
|
+
"command": "rm -f /tmp/cookies.txt",
|
|
1715
|
+
"addpay": "",
|
|
1716
|
+
"append": "",
|
|
1717
|
+
"useSpawn": "false",
|
|
1718
|
+
"timer": "",
|
|
1719
|
+
"winHide": false,
|
|
1720
|
+
"oldrc": false,
|
|
1721
|
+
"name": "",
|
|
1722
|
+
"x": 2091,
|
|
1723
|
+
"y": 2099,
|
|
1724
|
+
"wires": [
|
|
1725
|
+
[],
|
|
1726
|
+
[],
|
|
1727
|
+
[
|
|
1728
|
+
"7134a0a01a78b0a4"
|
|
1729
|
+
]
|
|
1730
|
+
]
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"id": "7134a0a01a78b0a4",
|
|
1734
|
+
"type": "switch",
|
|
1735
|
+
"z": "d0506e991d512ace",
|
|
1736
|
+
"g": "16d4e4d85e6a7e60",
|
|
1737
|
+
"name": "",
|
|
1738
|
+
"property": "payload.code",
|
|
1739
|
+
"propertyType": "msg",
|
|
1740
|
+
"rules": [
|
|
1741
|
+
{
|
|
1742
|
+
"t": "eq",
|
|
1743
|
+
"v": "0",
|
|
1744
|
+
"vt": "num"
|
|
1745
|
+
}
|
|
1746
|
+
],
|
|
1747
|
+
"checkall": "true",
|
|
1748
|
+
"repair": false,
|
|
1749
|
+
"outputs": 1,
|
|
1750
|
+
"x": 2133,
|
|
1751
|
+
"y": 2164,
|
|
1752
|
+
"wires": [
|
|
1753
|
+
[
|
|
1754
|
+
"d7bb19775d60ba5f"
|
|
1755
|
+
]
|
|
1756
|
+
]
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"id": "d7bb19775d60ba5f",
|
|
1760
|
+
"type": "change",
|
|
1761
|
+
"z": "d0506e991d512ace",
|
|
1762
|
+
"g": "16d4e4d85e6a7e60",
|
|
1763
|
+
"name": "",
|
|
1764
|
+
"rules": [
|
|
1765
|
+
{
|
|
1766
|
+
"t": "set",
|
|
1767
|
+
"p": "payload",
|
|
1768
|
+
"pt": "msg",
|
|
1769
|
+
"to": "curl -s -c /tmp/cookies.txt -b /tmp/cookies.txt -XGET 'https://flows.nodered.org/add/node'",
|
|
1770
|
+
"tot": "str"
|
|
1771
|
+
}
|
|
1772
|
+
],
|
|
1773
|
+
"action": "",
|
|
1774
|
+
"property": "",
|
|
1775
|
+
"from": "",
|
|
1776
|
+
"to": "",
|
|
1777
|
+
"reg": false,
|
|
1778
|
+
"x": 2247,
|
|
1779
|
+
"y": 2219,
|
|
1780
|
+
"wires": [
|
|
1781
|
+
[
|
|
1782
|
+
"329cb745ab148644"
|
|
1783
|
+
]
|
|
1784
|
+
]
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"id": "329cb745ab148644",
|
|
1788
|
+
"type": "exec",
|
|
1789
|
+
"z": "d0506e991d512ace",
|
|
1790
|
+
"g": "16d4e4d85e6a7e60",
|
|
1791
|
+
"command": "",
|
|
1792
|
+
"addpay": "payload",
|
|
1793
|
+
"append": "",
|
|
1794
|
+
"useSpawn": "false",
|
|
1795
|
+
"timer": "",
|
|
1796
|
+
"winHide": false,
|
|
1797
|
+
"oldrc": false,
|
|
1798
|
+
"name": "",
|
|
1799
|
+
"x": 2353,
|
|
1800
|
+
"y": 2280,
|
|
1801
|
+
"wires": [
|
|
1802
|
+
[
|
|
1803
|
+
"8b4462e71d18d914"
|
|
1804
|
+
],
|
|
1805
|
+
[],
|
|
1806
|
+
[]
|
|
1807
|
+
]
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
"id": "8b4462e71d18d914",
|
|
1811
|
+
"type": "switch",
|
|
1812
|
+
"z": "d0506e991d512ace",
|
|
1813
|
+
"g": "16d4e4d85e6a7e60",
|
|
1814
|
+
"name": "",
|
|
1815
|
+
"property": "rc.code",
|
|
1816
|
+
"propertyType": "msg",
|
|
1817
|
+
"rules": [
|
|
1818
|
+
{
|
|
1819
|
+
"t": "eq",
|
|
1820
|
+
"v": "0",
|
|
1821
|
+
"vt": "num"
|
|
1822
|
+
}
|
|
1823
|
+
],
|
|
1824
|
+
"checkall": "true",
|
|
1825
|
+
"repair": false,
|
|
1826
|
+
"outputs": 1,
|
|
1827
|
+
"x": 2505,
|
|
1828
|
+
"y": 2286,
|
|
1829
|
+
"wires": [
|
|
1830
|
+
[
|
|
1831
|
+
"c447b660ffb100b7"
|
|
1832
|
+
]
|
|
1833
|
+
]
|
|
1834
|
+
},
|
|
1835
|
+
{
|
|
1836
|
+
"id": "c447b660ffb100b7",
|
|
1837
|
+
"type": "split",
|
|
1838
|
+
"z": "d0506e991d512ace",
|
|
1839
|
+
"g": "16d4e4d85e6a7e60",
|
|
1840
|
+
"name": "",
|
|
1841
|
+
"splt": "\\n",
|
|
1842
|
+
"spltType": "str",
|
|
1843
|
+
"arraySplt": 1,
|
|
1844
|
+
"arraySpltType": "len",
|
|
1845
|
+
"stream": false,
|
|
1846
|
+
"addname": "",
|
|
1847
|
+
"x": 2585,
|
|
1848
|
+
"y": 2230,
|
|
1849
|
+
"wires": [
|
|
1850
|
+
[
|
|
1851
|
+
"24a6bdedc55adb51"
|
|
1852
|
+
]
|
|
1853
|
+
]
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
"id": "24a6bdedc55adb51",
|
|
1857
|
+
"type": "switch",
|
|
1858
|
+
"z": "d0506e991d512ace",
|
|
1859
|
+
"g": "16d4e4d85e6a7e60",
|
|
1860
|
+
"name": "",
|
|
1861
|
+
"property": "payload",
|
|
1862
|
+
"propertyType": "msg",
|
|
1863
|
+
"rules": [
|
|
1864
|
+
{
|
|
1865
|
+
"t": "regex",
|
|
1866
|
+
"v": "name=\"_csrf\" type=\"hidden\" value=\"(.+)\">",
|
|
1867
|
+
"vt": "str",
|
|
1868
|
+
"case": false
|
|
1869
|
+
}
|
|
1870
|
+
],
|
|
1871
|
+
"checkall": "true",
|
|
1872
|
+
"repair": false,
|
|
1873
|
+
"outputs": 1,
|
|
1874
|
+
"x": 2654,
|
|
1875
|
+
"y": 2176,
|
|
1876
|
+
"wires": [
|
|
1877
|
+
[
|
|
1878
|
+
"e045b2b86c04bede"
|
|
1879
|
+
]
|
|
1880
|
+
]
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
"id": "e045b2b86c04bede",
|
|
1884
|
+
"type": "change",
|
|
1885
|
+
"z": "d0506e991d512ace",
|
|
1886
|
+
"g": "16d4e4d85e6a7e60",
|
|
1887
|
+
"name": "",
|
|
1888
|
+
"rules": [
|
|
1889
|
+
{
|
|
1890
|
+
"t": "set",
|
|
1891
|
+
"p": "payload",
|
|
1892
|
+
"pt": "msg",
|
|
1893
|
+
"to": "$substringBefore( $substringAfter($$.payload, \"value=\\\"\"), \"\\\">\")",
|
|
1894
|
+
"tot": "jsonata"
|
|
1895
|
+
}
|
|
1896
|
+
],
|
|
1897
|
+
"action": "",
|
|
1898
|
+
"property": "",
|
|
1899
|
+
"from": "",
|
|
1900
|
+
"to": "",
|
|
1901
|
+
"reg": false,
|
|
1902
|
+
"x": 2711,
|
|
1903
|
+
"y": 2122,
|
|
1904
|
+
"wires": [
|
|
1905
|
+
[
|
|
1906
|
+
"5096c688782c5d5b"
|
|
1907
|
+
]
|
|
1908
|
+
]
|
|
1909
|
+
},
|
|
1910
|
+
{
|
|
1911
|
+
"id": "5096c688782c5d5b",
|
|
1912
|
+
"type": "change",
|
|
1913
|
+
"z": "d0506e991d512ace",
|
|
1914
|
+
"g": "16d4e4d85e6a7e60",
|
|
1915
|
+
"name": "",
|
|
1916
|
+
"rules": [
|
|
1917
|
+
{
|
|
1918
|
+
"t": "set",
|
|
1919
|
+
"p": "data_string",
|
|
1920
|
+
"pt": "msg",
|
|
1921
|
+
"to": "\"module=\" & $$.module_name & \"&_csrf=\" & $$.payload",
|
|
1922
|
+
"tot": "jsonata"
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
"t": "set",
|
|
1926
|
+
"p": "payload",
|
|
1927
|
+
"pt": "msg",
|
|
1928
|
+
"to": "\"curl -v -XPOST 'https://flows.nodered.org/add/node' -c /tmp/cookies.txt -b /tmp/cookies.txt -H 'referer: https://flows.nodered.org/node/\" & $$.module_name & \"' -H 'Content-Type: application/x-www-form-urlencoded' -H 'x-requested-with: XMLHttpRequest' -d '\" & $$.data_string & \"'\"",
|
|
1929
|
+
"tot": "jsonata"
|
|
1930
|
+
}
|
|
1931
|
+
],
|
|
1932
|
+
"action": "",
|
|
1933
|
+
"property": "",
|
|
1934
|
+
"from": "",
|
|
1935
|
+
"to": "",
|
|
1936
|
+
"reg": false,
|
|
1937
|
+
"x": 2806,
|
|
1938
|
+
"y": 2064,
|
|
1939
|
+
"wires": [
|
|
1940
|
+
[
|
|
1941
|
+
"4260147961b82058"
|
|
1942
|
+
]
|
|
1943
|
+
]
|
|
1944
|
+
},
|
|
1945
|
+
{
|
|
1946
|
+
"id": "4260147961b82058",
|
|
1947
|
+
"type": "exec",
|
|
1948
|
+
"z": "d0506e991d512ace",
|
|
1949
|
+
"g": "16d4e4d85e6a7e60",
|
|
1950
|
+
"command": "",
|
|
1951
|
+
"addpay": "payload",
|
|
1952
|
+
"append": "",
|
|
1953
|
+
"useSpawn": "false",
|
|
1954
|
+
"timer": "",
|
|
1955
|
+
"winHide": false,
|
|
1956
|
+
"oldrc": false,
|
|
1957
|
+
"name": "",
|
|
1958
|
+
"x": 2926,
|
|
1959
|
+
"y": 2194,
|
|
1960
|
+
"wires": [
|
|
1961
|
+
[
|
|
1962
|
+
"f4dc513b63d2486a"
|
|
1963
|
+
],
|
|
1964
|
+
[
|
|
1965
|
+
"3210b2328892fb83"
|
|
1966
|
+
],
|
|
1967
|
+
[
|
|
1968
|
+
"2782388af7e4a3e3"
|
|
1969
|
+
]
|
|
1970
|
+
]
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
"id": "f4dc513b63d2486a",
|
|
1974
|
+
"type": "debug",
|
|
1975
|
+
"z": "d0506e991d512ace",
|
|
1976
|
+
"g": "16d4e4d85e6a7e60",
|
|
1977
|
+
"name": "debug 345",
|
|
1978
|
+
"active": true,
|
|
1979
|
+
"tosidebar": true,
|
|
1980
|
+
"console": false,
|
|
1981
|
+
"tostatus": false,
|
|
1982
|
+
"complete": "payload",
|
|
1983
|
+
"targetType": "msg",
|
|
1984
|
+
"statusVal": "",
|
|
1985
|
+
"statusType": "auto",
|
|
1986
|
+
"x": 3100,
|
|
1987
|
+
"y": 2143,
|
|
1988
|
+
"wires": []
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
"id": "3210b2328892fb83",
|
|
1992
|
+
"type": "debug",
|
|
1993
|
+
"z": "d0506e991d512ace",
|
|
1994
|
+
"g": "16d4e4d85e6a7e60",
|
|
1995
|
+
"name": "debug 346",
|
|
1996
|
+
"active": false,
|
|
1997
|
+
"tosidebar": true,
|
|
1998
|
+
"console": false,
|
|
1999
|
+
"tostatus": false,
|
|
2000
|
+
"complete": "true",
|
|
2001
|
+
"targetType": "full",
|
|
2002
|
+
"statusVal": "",
|
|
2003
|
+
"statusType": "auto",
|
|
2004
|
+
"x": 3103,
|
|
2005
|
+
"y": 2194,
|
|
2006
|
+
"wires": []
|
|
2007
|
+
},
|
|
2008
|
+
{
|
|
2009
|
+
"id": "2782388af7e4a3e3",
|
|
2010
|
+
"type": "debug",
|
|
2011
|
+
"z": "d0506e991d512ace",
|
|
2012
|
+
"g": "16d4e4d85e6a7e60",
|
|
2013
|
+
"name": "debug 347",
|
|
2014
|
+
"active": false,
|
|
2015
|
+
"tosidebar": true,
|
|
2016
|
+
"console": false,
|
|
2017
|
+
"tostatus": false,
|
|
2018
|
+
"complete": "true",
|
|
2019
|
+
"targetType": "full",
|
|
2020
|
+
"statusVal": "",
|
|
2021
|
+
"statusType": "auto",
|
|
2022
|
+
"x": 3100,
|
|
2023
|
+
"y": 2250,
|
|
2024
|
+
"wires": []
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
"id": "f58a3097c0ec980c",
|
|
2028
|
+
"type": "switch",
|
|
2029
|
+
"z": "d0506e991d512ace",
|
|
2030
|
+
"g": "16d4e4d85e6a7e60",
|
|
2031
|
+
"name": "flowsnoderedorg_update",
|
|
2032
|
+
"property": "flowsnoderedorg_update",
|
|
2033
|
+
"propertyType": "msg",
|
|
2034
|
+
"rules": [
|
|
2035
|
+
{
|
|
2036
|
+
"t": "true"
|
|
2037
|
+
}
|
|
2038
|
+
],
|
|
2039
|
+
"checkall": "true",
|
|
2040
|
+
"repair": false,
|
|
2041
|
+
"outputs": 1,
|
|
2042
|
+
"x": 1605,
|
|
2043
|
+
"y": 2028,
|
|
2044
|
+
"wires": [
|
|
2045
|
+
[
|
|
2046
|
+
"1567d317341f29d7"
|
|
2047
|
+
]
|
|
2048
|
+
]
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
"id": "1567d317341f29d7",
|
|
2052
|
+
"type": "change",
|
|
2053
|
+
"z": "d0506e991d512ace",
|
|
2054
|
+
"g": "16d4e4d85e6a7e60",
|
|
2055
|
+
"name": "",
|
|
2056
|
+
"rules": [
|
|
2057
|
+
{
|
|
2058
|
+
"t": "set",
|
|
2059
|
+
"p": "module_name",
|
|
2060
|
+
"pt": "msg",
|
|
2061
|
+
"to": "pname",
|
|
2062
|
+
"tot": "msg"
|
|
2063
|
+
}
|
|
2064
|
+
],
|
|
2065
|
+
"action": "",
|
|
2066
|
+
"property": "",
|
|
2067
|
+
"from": "",
|
|
2068
|
+
"to": "",
|
|
2069
|
+
"reg": false,
|
|
2070
|
+
"x": 1988,
|
|
2071
|
+
"y": 2028,
|
|
2072
|
+
"wires": [
|
|
2073
|
+
[
|
|
2074
|
+
"b3f710d3656ec0bd"
|
|
2075
|
+
]
|
|
2076
|
+
]
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
"id": "4744f729aa18f631",
|
|
2080
|
+
"type": "ClientCode",
|
|
2081
|
+
"z": "d0506e991d512ace",
|
|
2082
|
+
"g": "de7cfeb5612cf008",
|
|
2083
|
+
"name": "download package",
|
|
2084
|
+
"clientcode": "var downloadLink = document.createElement(\"a\");\ndownloadLink.href = \"data:application/x-tar;base64,\" + msg.payload;\ndownloadLink.download = `${msg.pname.split(\"/\")[1]}-${msg.pversion}.tgz`;\ndocument.body.appendChild(downloadLink);\ndownloadLink.click();\ndocument.body.removeChild(downloadLink);\n",
|
|
2085
|
+
"format": "javascript",
|
|
2086
|
+
"x": 1755,
|
|
2087
|
+
"y": 1901,
|
|
2088
|
+
"wires": [
|
|
2089
|
+
[]
|
|
2090
|
+
]
|
|
2091
|
+
},
|
|
2092
|
+
{
|
|
2093
|
+
"id": "7f2310f2e93bd28f",
|
|
2094
|
+
"type": "base64",
|
|
2095
|
+
"z": "d0506e991d512ace",
|
|
2096
|
+
"g": "de7cfeb5612cf008",
|
|
2097
|
+
"name": "",
|
|
2098
|
+
"action": "str",
|
|
2099
|
+
"property": "payload",
|
|
2100
|
+
"x": 1671,
|
|
2101
|
+
"y": 1831,
|
|
2102
|
+
"wires": [
|
|
2103
|
+
[
|
|
2104
|
+
"4744f729aa18f631"
|
|
2105
|
+
]
|
|
2106
|
+
]
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
"id": "fb7a6a038d9bea0d",
|
|
2110
|
+
"type": "switch",
|
|
2111
|
+
"z": "d0506e991d512ace",
|
|
2112
|
+
"name": "create control center flow ?",
|
|
2113
|
+
"property": "create_control_center",
|
|
2114
|
+
"propertyType": "msg",
|
|
2115
|
+
"rules": [
|
|
2116
|
+
{
|
|
2117
|
+
"t": "true"
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
"t": "else"
|
|
2121
|
+
}
|
|
2122
|
+
],
|
|
2123
|
+
"checkall": "false",
|
|
2124
|
+
"repair": false,
|
|
2125
|
+
"outputs": 2,
|
|
2126
|
+
"x": 1030,
|
|
2127
|
+
"y": 1319,
|
|
2128
|
+
"wires": [
|
|
2129
|
+
[
|
|
2130
|
+
"893f316ea815e2b1"
|
|
2131
|
+
],
|
|
2132
|
+
[
|
|
2133
|
+
"2a7132258cbcf313"
|
|
2134
|
+
]
|
|
2135
|
+
]
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
"id": "e51aa8c50e251fa1",
|
|
2139
|
+
"type": "switch",
|
|
2140
|
+
"z": "d0506e991d512ace",
|
|
2141
|
+
"g": "792e5b24ee0a810b",
|
|
2142
|
+
"name": "create_control_center",
|
|
2143
|
+
"property": "create_control_center",
|
|
2144
|
+
"propertyType": "msg",
|
|
2145
|
+
"rules": [
|
|
2146
|
+
{
|
|
2147
|
+
"t": "true"
|
|
2148
|
+
}
|
|
2149
|
+
],
|
|
2150
|
+
"checkall": "false",
|
|
2151
|
+
"repair": false,
|
|
2152
|
+
"outputs": 1,
|
|
2153
|
+
"x": 1545,
|
|
2154
|
+
"y": 2424,
|
|
2155
|
+
"wires": [
|
|
2156
|
+
[
|
|
2157
|
+
"b3b1bcc40a8919a0"
|
|
2158
|
+
]
|
|
2159
|
+
]
|
|
2160
|
+
},
|
|
2161
|
+
{
|
|
2162
|
+
"id": "b3b1bcc40a8919a0",
|
|
2163
|
+
"type": "template",
|
|
2164
|
+
"z": "d0506e991d512ace",
|
|
2165
|
+
"g": "792e5b24ee0a810b",
|
|
2166
|
+
"name": "control center template",
|
|
2167
|
+
"field": "payload",
|
|
2168
|
+
"fieldType": "msg",
|
|
2169
|
+
"format": "json",
|
|
2170
|
+
"syntax": "mustache",
|
|
2171
|
+
"template": "[\n {\n \"id\": \"b530cec9760a6b5b\",\n \"type\": \"group\",\n \"z\": \"8e598f0f47194617\",\n \"name\": \"development control center\",\n \"style\": {\n \"label\": true\n },\n \"nodes\": [\n \"c97dc8b2a62fba9e\",\n \"a68437f69d2e2f46\",\n \"6bd697ade407914b\",\n \"f3529428bda5925e\",\n \"51617905c2fbcf09\",\n \"ee18d43ee7e057c2\",\n \"1cde490929dfdf8f\",\n \"97c92317fd615776\",\n \"99bcdcb3de7fb8cd\",\n \"0a2159feaa7fdeba\",\n \"fececfc3f97f1a50\",\n \"ce883179a0c0d99d\",\n \"83e6d9a9326fb569\",\n \"1fe30e18f536fe5a\",\n \"f4c2336074210c1d\"\n ],\n \"x\": 90,\n \"y\": 189,\n \"w\": 1050.4370999336243,\n \"h\": 385\n },\n {\n \"id\": \"c97dc8b2a62fba9e\",\n \"type\": \"change\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"set package version\",\n \"rules\": [\n {\n \"t\": \"set\",\n \"p\": \"pversion\",\n \"pt\": \"msg\",\n \"to\": \"{{{ pversion }}}\",\n \"tot\": \"str\"\n }\n ],\n \"action\": \"\",\n \"property\": \"\",\n \"from\": \"\",\n \"to\": \"\",\n \"reg\": false,\n \"x\": 735.5714111328125,\n \"y\": 318.0000203450521,\n \"wires\": [\n [\n \"a68437f69d2e2f46\"\n ]\n ]\n },\n {\n \"id\": \"a68437f69d2e2f46\",\n \"type\": \"switch\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"\",\n \"property\": \"githubmessage\",\n \"propertyType\": \"msg\",\n \"rules\": [\n {\n \"t\": \"eq\",\n \"v\": \"__replaced__\",\n \"vt\": \"str\"\n },\n {\n \"t\": \"else\"\n }\n ],\n \"checkall\": \"false\",\n \"repair\": false,\n \"outputs\": 2,\n \"x\": 785.5714111328125,\n \"y\": 374.8333536783854,\n \"wires\": [\n [\n \"6bd697ade407914b\"\n ],\n [\n \"99bcdcb3de7fb8cd\"\n ]\n ]\n },\n {\n \"id\": \"6bd697ade407914b\",\n \"type\": \"change\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"\",\n \"rules\": [\n {\n \"t\": \"set\",\n \"p\": \"githubmessage\",\n \"pt\": \"msg\",\n \"to\": \"\\\"version bump to \\\" & $$.pversion\",\n \"tot\": \"jsonata\"\n },\n {\n \"t\": \"set\",\n \"p\": \"commit_message\",\n \"pt\": \"msg\",\n \"to\": \"githubmessage\",\n \"tot\": \"msg\"\n }\n ],\n \"action\": \"\",\n \"property\": \"\",\n \"from\": \"\",\n \"to\": \"\",\n \"reg\": false,\n \"x\": 755.5714111328125,\n \"y\": 431.66668701171875,\n \"wires\": [\n [\n \"99bcdcb3de7fb8cd\"\n ]\n ]\n },\n {\n \"id\": \"f3529428bda5925e\",\n \"type\": \"NodeDevOps\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"Locally Upgrade Package with random version\",\n \"pname\": \"{{{ pname }}}\",\n \"pversion\": \"__ignored__\",\n \"pauthorname\": \"{{{ pauthorname }}}\",\n \"pauthoremail\": \"{{{ pauthoremail }}}\",\n \"pdescription\": \"{{{ pdescription }}}\",\n \"noderedinstall\": true,\n \"randompackagename\": true,\n \"nodered_uninstall\": false,\n \"ignore_package_check\": false,\n \"gitcommit\": false,\n \"gitcheckforchange\": false,\n \"githubowner\": \"{{{ githubowner }}}\",\n \"githubrepo\": \"{{{ githubrepo }}}\",\n \"githubbranch\": \"main\",\n \"githubauthor\": \"{{{ githubauthor }}}\",\n \"githubauthoremail\": \"{{{ githubauthoremail }}}\",\n \"githubmessage\": \"version bump to 0.1.9\",\n \"githubgettar\": false,\n \"githubtoken\": \"\",\n \"githubtokenType\": \"env\",\n \"npmpublish\": false,\n \"npmunpublish\": false,\n \"npmotp\": \"111999\",\n \"npmtoken\": \"\",\n \"npmtokenType\": \"env\",\n \"flowsnoderedorg_update\": false,\n \"writetgzfile\": false,\n \"x\": 689,\n \"y\": 272.6666259765625,\n \"wires\": [\n [\n \"99bcdcb3de7fb8cd\",\n \"0a2159feaa7fdeba\"\n ]\n ]\n },\n {\n \"id\": \"51617905c2fbcf09\",\n \"type\": \"NodeDevOps\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"Commit To GIthub\",\n \"pname\": \"{{{ pname }}}\",\n \"pversion\": \"__ignored__\",\n \"pauthorname\": \"{{{ pauthorname }}}\",\n \"pauthoremail\": \"{{{ pauthoremail }}}\",\n \"pdescription\": \"{{{ pdescription }}}\",\n \"noderedinstall\": false,\n \"randompackagename\": false,\n \"nodered_uninstall\": false,\n \"ignore_package_check\": false,\n \"gitcommit\": true,\n \"gitcheckforchange\": false,\n \"githubowner\": \"{{{ githubowner }}}\",\n \"githubrepo\": \"{{{ githubrepo }}}\",\n \"githubbranch\": \"main\",\n \"githubauthor\": \"{{{ githubauthor }}}\",\n \"githubauthoremail\": \"{{{ githubauthoremail }}}\",\n \"githubmessage\": \"improved UI for state diagram/machine definition\",\n \"githubgettar\": false,\n \"githubtoken\": \"GITHUB_TOKEN\",\n \"githubtokenType\": \"env\",\n \"npmpublish\": false,\n \"npmunpublish\": false,\n \"npmotp\": \"111999\",\n \"npmtoken\": \"\",\n \"npmtokenType\": \"env\",\n \"flowsnoderedorg_update\": false,\n \"writetgzfile\": false,\n \"x\": 246,\n \"y\": 314,\n \"wires\": [\n [\n \"c97dc8b2a62fba9e\"\n ]\n ]\n },\n {\n \"id\": \"ee18d43ee7e057c2\",\n \"type\": \"NodeDevOps\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"Whatchanged @ GitHub\",\n \"pname\": \"{{{ pname }}}\",\n \"pversion\": \"__ignored__\",\n \"pauthorname\": \"{{{ pauthorname }}}\",\n \"pauthoremail\": \"{{{ pauthoremail }}}\",\n \"pdescription\": \"{{{ pdescription }}}\",\n \"noderedinstall\": false,\n \"randompackagename\": false,\n \"nodered_uninstall\": false,\n \"ignore_package_check\": false,\n \"gitcommit\": false,\n \"gitcheckforchange\": true,\n \"githubowner\": \"{{{ githubowner }}}\",\n \"githubrepo\": \"{{{ githubrepo }}}\",\n \"githubbranch\": \"main\",\n \"githubauthor\": \"{{{ githubauthor }}}\",\n \"githubauthoremail\": \"{{{ githubauthoremail }}}\",\n \"githubmessage\": \"version bump to 0.1.9\",\n \"githubgettar\": false,\n \"githubtoken\": \"GITHUB_TOKEN\",\n \"githubtokenType\": \"env\",\n \"npmpublish\": false,\n \"npmunpublish\": false,\n \"npmotp\": \"111999\",\n \"npmtoken\": \"\",\n \"npmtokenType\": \"env\",\n \"flowsnoderedorg_update\": false,\n \"writetgzfile\": false,\n \"x\": 244,\n \"y\": 272,\n \"wires\": [\n [\n \"c97dc8b2a62fba9e\"\n ]\n ]\n },\n {\n \"id\": \"1cde490929dfdf8f\",\n \"type\": \"NodeDevOps\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"Locally Install Package\",\n \"pname\": \"{{{ pname }}}\",\n \"pversion\": \"__ignored__\",\n \"pauthorname\": \"{{{ pauthorname }}}\",\n \"pauthoremail\": \"{{{ pauthoremail }}}\",\n \"pdescription\": \"{{{ pdescription }}}\",\n \"noderedinstall\": true,\n \"randompackagename\": false,\n \"ignore_package_check\": false,\n \"gitcommit\": false,\n \"gitcheckforchange\": false,\n \"githubowner\": \"{{{ githubowner }}}\",\n \"githubrepo\": \"{{{ githubrepo }}}\",\n \"githubbranch\": \"main\",\n \"githubauthor\": \"{{{ githubauthor }}}\",\n \"githubauthoremail\": \"{{{ githubauthoremail }}}\",\n \"githubmessage\": \"version bump to 0.1.9\",\n \"npmpublish\": false,\n \"npmunpublish\": false,\n \"npmotp\": \"111999\",\n \"x\": 518,\n \"y\": 533,\n \"wires\": [\n [\n \"c97dc8b2a62fba9e\",\n \"0a2159feaa7fdeba\"\n ]\n ]\n },\n {\n \"id\": \"97c92317fd615776\",\n \"type\": \"NodeDevOps\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"Publish to NPMjs & Commit\",\n \"pname\": \"{{{ pname }}}\",\n \"pversion\": \"__ignored__\",\n \"pauthorname\": \"{{{ pauthorname }}}\",\n \"pauthoremail\": \"{{{ pauthoremail }}}\",\n \"pdescription\": \"{{{ pdescription }}}\",\n \"noderedinstall\": false,\n \"randompackagename\": false,\n \"nodered_uninstall\": false,\n \"ignore_package_check\": false,\n \"gitcommit\": true,\n \"gitcheckforchange\": false,\n \"githubowner\": \"{{{ githubowner }}}\",\n \"githubrepo\": \"{{{ githubrepo }}}\",\n \"githubbranch\": \"main\",\n \"githubauthor\": \"{{{ githubauthor }}}\",\n \"githubauthoremail\": \"{{{ githubauthoremail }}}\",\n \"githubmessage\": \"__replaced__\",\n \"githubgettar\": false,\n \"githubtoken\": \"GITHUB_TOKEN\",\n \"githubtokenType\": \"env\",\n \"npmpublish\": true,\n \"npmunpublish\": false,\n \"npmotp\": \"111999\",\n \"npmtoken\": \"NPM_AUTH_TOKEN\",\n \"npmtokenType\": \"env\",\n \"flowsnoderedorg_update\": false,\n \"writetgzfile\": false,\n \"x\": 256,\n \"y\": 359,\n \"wires\": [\n [\n \"ce883179a0c0d99d\"\n ]\n ]\n },\n {\n \"id\": \"99bcdcb3de7fb8cd\",\n \"type\": \"junction\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"x\": 1114.4370999336243,\n \"y\": 381.9319887161255,\n \"wires\": [\n [\n \"c8fc2feb38924f0a\"\n ]\n ]\n },\n {\n \"id\": \"0a2159feaa7fdeba\",\n \"type\": \"delay\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"\",\n \"pauseType\": \"delay\",\n \"timeout\": \"7\",\n \"timeoutUnits\": \"seconds\",\n \"rate\": \"1\",\n \"nbRateUnits\": \"1\",\n \"rateUnits\": \"second\",\n \"randomFirst\": \"1\",\n \"randomLast\": \"5\",\n \"randomUnits\": \"seconds\",\n \"drop\": false,\n \"allowrate\": false,\n \"outputs\": 1,\n \"x\": 983,\n \"y\": 533,\n \"wires\": [\n [\n \"fececfc3f97f1a50\"\n ]\n ]\n },\n {\n \"id\": \"fececfc3f97f1a50\",\n \"type\": \"link out\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"trigger restart\",\n \"mode\": \"link\",\n \"links\": [\n \"069d9a4193e371ab\"\n ],\n \"x\": 1099,\n \"y\": 533,\n \"wires\": []\n },\n {\n \"id\": \"ce883179a0c0d99d\",\n \"type\": \"OTPGenerate\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"generate NPMjs OTP\",\n \"otptype\": \"totp\",\n \"secret\": \"NPM_OTP_SECRET\",\n \"secretType\": \"env\",\n \"issuer\": \"\",\n \"label\": \"\",\n \"digits\": 6,\n \"period\": 30,\n \"algorithm\": \"SHA1\",\n \"counter\": 0,\n \"property\": \"npmotp\",\n \"propertyType\": \"msg\",\n \"x\": 334,\n \"y\": 406,\n \"wires\": [\n [\n \"c97dc8b2a62fba9e\"\n ]\n ]\n },\n {\n \"id\": \"83e6d9a9326fb569\",\n \"type\": \"NodeDevOps\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"Download local random version\",\n \"pname\": \"{{{ pname }}}\",\n \"pversion\": \"__ignored__\",\n \"pauthorname\": \"{{{ pauthorname }}}\",\n \"pauthoremail\": \"{{{ pauthoremail }}}\",\n \"pdescription\": \"{{{ pdescription }}}\",\n \"noderedinstall\": false,\n \"randompackagename\": true,\n \"nodered_uninstall\": false,\n \"ignore_package_check\": false,\n \"gitcommit\": false,\n \"gitcheckforchange\": false,\n \"githubowner\": \"{{{ githubowner }}}\",\n \"githubrepo\": \"{{{ githubrepo }}}\",\n \"githubbranch\": \"main\",\n \"githubauthor\": \"{{{ githubauthor }}}\",\n \"githubauthoremail\": \"{{{ githubauthoremail }}}\",\n \"githubmessage\": \"version bump to 0.1.9\",\n \"githubgettar\": false,\n \"githubtoken\": \"\",\n \"githubtokenType\": \"env\",\n \"npmpublish\": false,\n \"npmunpublish\": false,\n \"npmotp\": \"111999\",\n \"npmtoken\": \"\",\n \"npmtokenType\": \"env\",\n \"flowsnoderedorg_update\": false,\n \"writetgzfile\": true,\n \"x\": 753,\n \"y\": 230,\n \"wires\": [\n [\n \"99bcdcb3de7fb8cd\"\n ]\n ]\n },\n {\n \"id\": \"1fe30e18f536fe5a\",\n \"type\": \"NodeDevOps\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"Download local version\",\n \"pname\": \"{{{ pname }}}\",\n \"pversion\": \"__ignored__\",\n \"pauthorname\": \"{{{ pauthorname }}}\",\n \"pauthoremail\": \"{{{ pauthoremail }}}\",\n \"pdescription\": \"{{{ pdescription }}}\",\n \"noderedinstall\": false,\n \"randompackagename\": false,\n \"nodered_uninstall\": false,\n \"ignore_package_check\": false,\n \"gitcommit\": false,\n \"gitcheckforchange\": false,\n \"githubowner\": \"{{{ githubowner }}}\",\n \"githubrepo\": \"{{{ githubrepo }}}\",\n \"githubbranch\": \"main\",\n \"githubauthor\": \"{{{ githubauthor }}}\",\n \"githubauthoremail\": \"{{{ githubauthoremail }}}\",\n \"githubmessage\": \"version bump to 0.1.9\",\n \"githubgettar\": false,\n \"githubtoken\": \"\",\n \"githubtokenType\": \"env\",\n \"npmpublish\": false,\n \"npmunpublish\": false,\n \"npmotp\": \"111999\",\n \"npmtoken\": \"\",\n \"npmtokenType\": \"env\",\n \"flowsnoderedorg_update\": false,\n \"writetgzfile\": true,\n \"x\": 404,\n \"y\": 492,\n \"wires\": [\n [\n \"c97dc8b2a62fba9e\"\n ]\n ]\n },\n {\n \"id\": \"f4c2336074210c1d\",\n \"type\": \"NodeDevOps\",\n \"z\": \"8e598f0f47194617\",\n \"g\": \"b530cec9760a6b5b\",\n \"name\": \"Update flows.nodered.org\",\n \"pname\": \"{{{ pname }}}\",\n \"pversion\": \"__ignored__\",\n \"pauthorname\": \"{{{ pauthorname }}}\",\n \"pauthoremail\": \"{{{ pauthoremail }}}\",\n \"pdescription\": \"{{{ pdescription }}}\",\n \"noderedinstall\": false,\n \"randompackagename\": false,\n \"nodered_uninstall\": false,\n \"ignore_package_check\": false,\n \"gitcommit\": false,\n \"gitcheckforchange\": false,\n \"githubowner\": \"{{{ githubowner }}}\",\n \"githubrepo\": \"{{{ githubrepo }}}\",\n \"githubbranch\": \"main\",\n \"githubauthor\": \"{{{ githubauthor }}}\",\n \"githubauthoremail\": \"{{{ githubauthoremail }}}\",\n \"githubmessage\": \"added specific mermaid node for labeling links and defining shapes\",\n \"githubgettar\": false,\n \"githubtoken\": \"GITHUB_TOKEN\",\n \"githubtokenType\": \"env\",\n \"npmpublish\": false,\n \"npmunpublish\": false,\n \"npmotp\": \"111999\",\n \"npmtoken\": \"\",\n \"npmtokenType\": \"env\",\n \"flowsnoderedorg_update\": true,\n \"writetgzfile\": false,\n \"x\": 341,\n \"y\": 454,\n \"wires\": [\n [\n \"c97dc8b2a62fba9e\"\n ]\n ]\n }\n \n]",
|
|
2172
|
+
"output": "json",
|
|
2173
|
+
"x": 1873,
|
|
2174
|
+
"y": 2424,
|
|
2175
|
+
"wires": [
|
|
2176
|
+
[
|
|
2177
|
+
"cbc70f2e73b7903b"
|
|
2178
|
+
]
|
|
2179
|
+
]
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
"id": "cbc70f2e73b7903b",
|
|
2183
|
+
"type": "ClientCode",
|
|
2184
|
+
"z": "d0506e991d512ace",
|
|
2185
|
+
"g": "792e5b24ee0a810b",
|
|
2186
|
+
"name": "generate control center",
|
|
2187
|
+
"clientcode": "let examplePackageJson = {\n \"id\": \"c8fc2feb38924f0a\",\n \"type\": \"PkgFile\",\n \"z\": \"d0506e991d512ace\",\n \"name\": \"package.json\",\n \"filename\": \"package.json\",\n \"format\": \"json\",\n \"syntax\": \"mustache\",\n \"template\": \"{\\n \\\"name\\\" : \\\"{{{ pname }}}\\\",\\n \\\"version\\\": \\\"{{{ pversion }}}\\\",\\n \\\"dependencies\\\": {\\n \\\"is-utf8\\\": \\\"0.2.1\\\"\\n },\\n\\n \\\"description\\\": \\\"{{{ pdescription }}}\\\",\\n \\\"keywords\\\": [\\n \\\"node-red\\\"\\n ],\\n\\n \\\"license\\\": \\\"Don't do evil.\\\",\\n \\\"homepage\\\": \\\"https://github.com/{{ githubowner }}/{{ githubrepo }}#readme\\\",\\n \\\"author\\\": \\\"{{{ pauthorname }}} <{{{ pauthoremail }}}>\\\",\\n \\\"engines\\\": {\\n \\\"node\\\": \\\">=14\\\"\\n },\\n\\n \\\"node-red\\\" : {\\n \\\"version\\\": \\\">=3.0.0\\\",\\n \\\"nodes\\\": {\\n \\\"execwithpipe\\\": \\\"nodes/execwithpipe.js\\\"\\n }\\n },\\n\\n \\\"repository\\\": {\\n \\\"type\\\": \\\"git\\\",\\n \\\"url\\\": \\\"https://github.com/{{ githubowner }}/{{ githubrepo }}.git\\\"\\n },\\n \\\"bugs\\\": {\\n \\\"url\\\": \\\"https://github.com/{{ githubowner }}/{{ githubrepo }}\\\"\\n }\\n}\\n\",\n \"output\": \"str\",\n \"x\": 1300,\n \"y\": 450,\n \"wires\": [\n [\"d661356ef69e3ddb\"]\n ]\n}\n\nlet linkToFlow = \n {\n \"id\": \"d661356ef69e3ddb\",\n \"type\": \"link out\",\n \"z\": \"d0506e991d512ace\",\n \"name\": \"link out 20\",\n \"mode\": \"link\",\n \"links\": [\n \"963dfb765b0d9849\"\n ],\n \"x\": 1384,\n \"y\": 598,\n \"wires\": []\n }\n\n\nmsg.payload.push(examplePackageJson)\nmsg.payload.push(linkToFlow)\n\nRED.view.importNodes(msg.payload, {generateIds: true, addFlow: false })",
|
|
2188
|
+
"format": "javascript",
|
|
2189
|
+
"x": 2217,
|
|
2190
|
+
"y": 2424,
|
|
2191
|
+
"wires": [
|
|
2192
|
+
[]
|
|
2193
|
+
]
|
|
2194
|
+
},
|
|
2195
|
+
{
|
|
2196
|
+
"id": "92db66ab26c22ab8",
|
|
2197
|
+
"type": "switch",
|
|
2198
|
+
"z": "d0506e991d512ace",
|
|
2199
|
+
"name": "create_control_center",
|
|
2200
|
+
"property": "create_control_center",
|
|
2201
|
+
"propertyType": "msg",
|
|
2202
|
+
"rules": [
|
|
2203
|
+
{
|
|
2204
|
+
"t": "true"
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
"t": "else"
|
|
2208
|
+
}
|
|
2209
|
+
],
|
|
2210
|
+
"checkall": "false",
|
|
2211
|
+
"repair": false,
|
|
2212
|
+
"outputs": 2,
|
|
2213
|
+
"x": 1961,
|
|
2214
|
+
"y": 1243,
|
|
2215
|
+
"wires": [
|
|
2216
|
+
[],
|
|
2217
|
+
[
|
|
2218
|
+
"bfe2775a7cf26d83"
|
|
2219
|
+
]
|
|
2220
|
+
],
|
|
2221
|
+
"info": "This is here because gitcommit is also set to true but we don't want to generate a git commit - so stop here if the control center flow should be created."
|
|
2222
|
+
}
|
|
2223
|
+
]
|