node-red 3.1.0-beta.2 → 3.1.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,68 @@
1
+ #### 3.1.0-beta.4: Beta Release
2
+
3
+ Editor
4
+
5
+ - Add Japanese translation for 3.1.0 (#4252) @kazuhitoyokoi
6
+ - Improve Catalogue visibility (#4248) @Steve-Mcl
7
+ - Add support for wiring and moving junctions on touch device (#4244) @Steve-Mcl
8
+ - Show errors and statuses of config nodes in the sidebar when no catch node is available (#4231) @bvmensvoort
9
+ - Improve wiring for horizontally aligned nodes (#4232) @knolleary
10
+ - French translation of Welcome Tours (#4200) @GogoVega
11
+ - French translation of v3.1.0-beta.3 changes (#4199) @GogoVega
12
+ - add Japanese message for 3.1.0 beta 3 (#4209) @HiroyasuNishiyama
13
+ - Dont clone the group nodes `node` array when saving edits (#4208) @Steve-Mcl
14
+
15
+ Runtime
16
+
17
+ - Add NR_SUBFLOW_NAME/ID/PATH env vars (#4250) @knolleary
18
+ - Evaluate all env vars as part of async flow start (#4230) @knolleary
19
+ - Add support for httpStatic middleware (#4229) @knolleary
20
+
21
+ Nodes
22
+
23
+ - Fix JSONata in file nodes (#4246) @kazuhitoyokoi
24
+ - Fix timeout icon in function and link call nodes (#4253) @kazuhitoyokoi
25
+ - Fix connection keep-alive in http request node (#4228) @knolleary
26
+ - adding timeout attribute to function node (#4177) @k1ln
27
+ - Fix manual mode join when multiple sequences being handled (#4143) @BitCaesar
28
+ - Fix delay node flush issue (#4203) @dceejay
29
+ - Update status and catch node labels in group mode (#4207) @Steve-Mcl
30
+
31
+ #### 3.1.0-beta.3: Beta Release
32
+
33
+ Editor
34
+
35
+ - Select the item that is specified in a deep link URL (#4113) @Steve-Mcl
36
+ - Update to Monaco 0.38.0 (#4189) @Steve-Mcl
37
+ - Place subflow outputs/inputs relative to current view (#4183) @knolleary
38
+ - Enable RED.view.select to select group by id (#4184) @knolleary
39
+ - Combine existing env vars when merging groups (#4182) @knolleary
40
+ - Avoid creating empty global-config node if not needed (#4153) @knolleary
41
+ - Fix group selection when using lasso (#4108) @knolleary
42
+ - Use editor path in generating localStorage keys (#4151) @mw75
43
+ - Ensure no node credentials are included when exporting to clipboard (#4112) @knolleary
44
+ - Fix jsonata expression test ui (#4097) @knolleary
45
+ - Fix search button in palette popover (#4096) @knolleary
46
+
47
+ Runtime
48
+
49
+ - Allow options object on each httpStatic configuration (#4109) @kevinGodell
50
+ - Ensure non-zero exit codes for errors (#4181) @knolleary
51
+ - Ensure external modules are installed synchronously (#4180) @knolleary
52
+ - Update dependecies include got (#4155) @knolleary
53
+ - Add Japanese translations for v3.1 beta.2 (#4158) @kazuhitoyokoi
54
+ - Ensure express server options are applied consistently (#4178) @knolleary
55
+ - Remove version info from theme endpoint (#4179) @knolleary
56
+ - Add Japanese translations for welcome tour of 3.1.0 beta.2 (#4145) @kazuhitoyokoi
57
+ - Added SHA-256 and SHA-512-256 digest authentication (#4100) @sroebert
58
+ - Add "timers" types to known types (#4103) @Steve-Mcl
59
+
60
+ Nodes
61
+
62
+ - Allow Catch/Status nodes to be scoped to their group (#4185) @NetHans
63
+ - MQTT: Option to disable MQTT topic unsubscribe on disconnect (#4078) @flying7eleven
64
+
65
+
1
66
  #### 3.1.0-beta.2: Beta Release
2
67
 
3
68
  Editor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red",
3
- "version": "3.1.0-beta.2",
3
+ "version": "3.1.0-beta.4",
4
4
  "description": "Low-code programming for event-driven applications",
5
5
  "homepage": "http://nodered.org",
6
6
  "license": "Apache-2.0",
@@ -31,17 +31,17 @@
31
31
  "flow"
32
32
  ],
33
33
  "dependencies": {
34
- "@node-red/editor-api": "3.1.0-beta.2",
35
- "@node-red/runtime": "3.1.0-beta.2",
36
- "@node-red/util": "3.1.0-beta.2",
37
- "@node-red/nodes": "3.1.0-beta.2",
34
+ "@node-red/editor-api": "3.1.0-beta.4",
35
+ "@node-red/runtime": "3.1.0-beta.4",
36
+ "@node-red/util": "3.1.0-beta.4",
37
+ "@node-red/nodes": "3.1.0-beta.4",
38
38
  "basic-auth": "2.0.1",
39
39
  "bcryptjs": "2.4.3",
40
40
  "express": "4.18.2",
41
- "fs-extra": "10.1.0",
41
+ "fs-extra": "11.1.1",
42
42
  "node-red-admin": "^3.0.0",
43
43
  "nopt": "5.0.0",
44
- "semver": "7.3.8"
44
+ "semver": "7.5.0"
45
45
  },
46
46
  "optionalDependencies": {
47
47
  "bcrypt": "5.1.0"
package/red.js CHANGED
@@ -148,7 +148,7 @@ try {
148
148
  } else {
149
149
  console.log(err);
150
150
  }
151
- process.exit();
151
+ process.exit(1);
152
152
  }
153
153
 
154
154
  if (parsedArgs.define) {
@@ -182,7 +182,7 @@ if (parsedArgs.define) {
182
182
  }
183
183
  } catch (e) {
184
184
  console.log("Error processing -D option: "+e.message);
185
- process.exit();
185
+ process.exit(1);
186
186
  }
187
187
  }
188
188
 
@@ -302,7 +302,7 @@ httpsPromise.then(function(startupHttps) {
302
302
  settings.httpNodeAuth = settings.httpNodeAuth || settings.httpAuth;
303
303
  }
304
304
 
305
- if(settings.httpStatic) {
305
+ if (settings.httpStatic) {
306
306
  settings.httpStaticRoot = formatRoot(settings.httpStaticRoot || "/");
307
307
  const statics = Array.isArray(settings.httpStatic) ? settings.httpStatic : [settings.httpStatic];
308
308
  const sanitised = [];
@@ -316,10 +316,10 @@ httpsPromise.then(function(startupHttps) {
316
316
  } else {
317
317
  continue;
318
318
  }
319
- sp.subRoot = formatRoot(sp.root);
319
+ sp.subRoot = formatRoot(sp.root || "/");
320
320
  sp.root = formatRoot(path.posix.join(settings.httpStaticRoot,sp.subRoot));
321
321
  }
322
- settings.httpStatic = sanitised.length ? sanitised : false;
322
+ settings.httpStatic = sanitised.length ? sanitised : false;
323
323
  }
324
324
 
325
325
  // if we got a port from command line, use it (even if 0)
@@ -414,19 +414,15 @@ httpsPromise.then(function(startupHttps) {
414
414
  if (settings.httpNodeRoot !== false) {
415
415
  app.use(settings.httpNodeRoot,RED.httpNode);
416
416
  }
417
- // if (settings.httpStatic) {
418
- // settings.httpStaticAuth = settings.httpStaticAuth || settings.httpAuth;
419
- // if (settings.httpStaticAuth) {
420
- // app.use("/",basicAuthMiddleware(settings.httpStaticAuth.user,settings.httpStaticAuth.pass));
421
- // }
422
- // app.use("/",express.static(settings.httpStatic));
423
- // }
417
+
424
418
  if (settings.httpStatic) {
425
419
  let appUseMem = {};
426
420
  for (let si = 0; si < settings.httpStatic.length; si++) {
427
421
  const sp = settings.httpStatic[si];
428
422
  const filePath = sp.path;
429
423
  const thisRoot = sp.root || "/";
424
+ const options = sp.options;
425
+ const middleware = sp.middleware;
430
426
  if(appUseMem[filePath + "::" + thisRoot]) {
431
427
  continue;// this path and root already registered!
432
428
  }
@@ -434,7 +430,10 @@ httpsPromise.then(function(startupHttps) {
434
430
  if (settings.httpStaticAuth) {
435
431
  app.use(thisRoot, basicAuthMiddleware(settings.httpStaticAuth.user, settings.httpStaticAuth.pass));
436
432
  }
437
- app.use(thisRoot, express.static(filePath));
433
+ if (middleware) {
434
+ app.use(thisRoot, middleware)
435
+ }
436
+ app.use(thisRoot, express.static(filePath, options));
438
437
  }
439
438
  }
440
439
 
package/settings.js CHANGED
@@ -223,10 +223,15 @@ module.exports = {
223
223
  * to move httpAdminRoot
224
224
  */
225
225
  //httpStatic: '/home/nol/node-red-static/', //single static source
226
- /* OR multiple static sources can be created using an array of objects... */
226
+ /**
227
+ * OR multiple static sources can be created using an array of objects...
228
+ * Each object can also contain an options object for further configuration.
229
+ * See https://expressjs.com/en/api.html#express.static for available options.
230
+ */
227
231
  //httpStatic: [
228
232
  // {path: '/home/nol/pics/', root: "/img/"},
229
233
  // {path: '/home/nol/reports/', root: "/doc/"},
234
+ // {path: '/home/nol/videos/', root: "/vid/", options: {maxAge: '1d'}}
230
235
  //],
231
236
 
232
237
  /**
@@ -431,7 +436,7 @@ module.exports = {
431
436
  enabled: true
432
437
  }
433
438
  },
434
-
439
+
435
440
  },
436
441
 
437
442
  /*******************************************************************************