diff --git a/.jshintrc b/.jshintrc index 0886c1dc0..c0724b22f 100644 --- a/.jshintrc +++ b/.jshintrc @@ -12,7 +12,7 @@ //"unused": true, // Check for unused functions and variables "loopfunc": true, // allow functions to be defined in loops //"expr": true, // allow ternery operator syntax... - "shadow": true, // allow variable shadowing (re-use of names...) + "shadow": true, // allow variable shadowing (reuse of names...) "sub": true, // don't warn that foo['bar'] should be written as foo.bar "proto": true, // allow setting of __proto__ in node < v0.12, "esversion": 11 // allow es11(ES2020) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00daf9639..df7dfd782 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -141,7 +141,7 @@ Editor - Fix `validateNodeProperty` without validator provided (#4455) @GogoVega - Debounce node-removed notifications (#4453) @knolleary - Don't try to load the parents of the first commit (#4448) @bonanitech - - Allow a theme to specifiy which theme mermaid should use (#4441) @knolleary + - Allow a theme to specify which theme mermaid should use (#4441) @knolleary - Update browser title with flow name if set (#4427) @knolleary - Ensure typeSearch handles undefined node definitions (#4423) @knolleary - Ensure group w/h are imported if present (#4426) @knolleary @@ -270,7 +270,7 @@ Runtime - Allow options object on each httpStatic configuration (#4109) @kevinGodell - Ensure non-zero exit codes for errors (#4181) @knolleary - Ensure external modules are installed synchronously (#4180) @knolleary - - Update dependecies include got (#4155) @knolleary + - Update dependencies include got (#4155) @knolleary - Add Japanese translations for v3.1 beta.2 (#4158) @kazuhitoyokoi - Ensure express server options are applied consistently (#4178) @knolleary - Remove version info from theme endpoint (#4179) @knolleary diff --git a/packages/node_modules/@node-red/editor-api/lib/auth/index.js b/packages/node_modules/@node-red/editor-api/lib/auth/index.js index e39e972db..dd39ee995 100644 --- a/packages/node_modules/@node-red/editor-api/lib/auth/index.js +++ b/packages/node_modules/@node-red/editor-api/lib/auth/index.js @@ -250,7 +250,7 @@ module.exports = { authenticateClient: authenticateClient, getToken: getToken, errorHandler: function(err,req,res,next) { - //TODO: audit log statment + //TODO: audit log statement //console.log(err.stack); //log.log({level:"audit",type:"auth",msg:err.toString()}); return server.errorHandler()(err,req,res,next); diff --git a/packages/node_modules/@node-red/editor-client/src/ace/mode/nrjavascript_worker.js b/packages/node_modules/@node-red/editor-client/src/ace/mode/nrjavascript_worker.js index 310831607..5a0d75012 100644 --- a/packages/node_modules/@node-red/editor-client/src/ace/mode/nrjavascript_worker.js +++ b/packages/node_modules/@node-red/editor-client/src/ace/mode/nrjavascript_worker.js @@ -183,7 +183,7 @@ oop.inherits(NRJavaScriptWorker, Mirror); // This code scans through the original code looking for the first '{' // that is not in a comment or string. // It will incorrectly find a '{' if it is inside a regex... but - // at least the error will be shown somwhere. There are only + // at least the error will be shown somewhere. There are only // so many hours in the day to fix every tiny edge case of an // edge case. var inSingleComment = false; diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js index 6bc4d7f48..bfad4d69c 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js @@ -250,7 +250,7 @@ RED.deploy = (function() { var now = Date.now(); RED.diff.getRemoteDiff(function(diff) { - var ellapsed = Math.max(1000 - (Date.now()-now), 0); + var elapsed = Math.max(1000 - (Date.now()-now), 0); currentDiff = diff; setTimeout(function() { conflictCheck.hide(); @@ -262,7 +262,7 @@ RED.deploy = (function() { conflictManualMerge.show(); } $("#red-ui-deploy-dialog-confirm-deploy-review").removeClass('disabled') - },ellapsed); + },elapsed); }) } function cropList(list) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index 70de4d9ac..96bd55939 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -280,7 +280,7 @@ RED.editor = (function() { /** * Called when the node's properties have changed. * Marks the node as dirty and needing a size check. - * Removes any links to non-existant outputs. + * Removes any links to non-existent outputs. * @param node - the node that has been updated * @param outputMap - (optional) a map of old->new port numbers if wires should be moved * @returns {array} the links that were removed due to this update diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editor.js index b92881764..2d46c73c3 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editor.js @@ -71,7 +71,7 @@ if (this.editor.type === MONACO) { // compatibility (see above note) if (!options.element && !options.id) { - options.id = 'node-backwards-compatability-dummy-editor'; + options.id = 'node-backwards-compatibility-dummy-editor'; } options.element = options.element || $("#" + options.id)[0]; if (!options.element) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js index 9f104faaf..df07f1259 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js @@ -17,7 +17,7 @@ */ /* - The code editor currenlty supports 2 functions init and create. + The code editor currently supports 2 functions init and create. * Init() - setup the editor / must return true * Create() - create an editor instance / returns an editor as generated by the editor lib * To be compatable with the original ace lib (for contrib nodes using it), the object returned by create() must (at minimum) support the following... @@ -53,7 +53,7 @@ RED.editor.codeEditor.monaco = (function() { var initialised = false; const type = "monaco"; - const monacoThemes = ["vs","vs-dark","hc-black"]; //TODO: consider setting hc-black autmatically based on acessability? + const monacoThemes = ["vs","vs-dark","hc-black"]; //TODO: consider setting hc-black automatically based on acessability? let userSelectedTheme; //TODO: get from externalModules.js For now this is enough for feature parity with ACE (and then some). @@ -765,7 +765,7 @@ RED.editor.codeEditor.monaco = (function() { case "protobuf": mode = "proto"; break; - //TODO: add other compatability types. + //TODO: add other compatibility types. } return mode; } @@ -981,7 +981,7 @@ RED.editor.codeEditor.monaco = (function() { ed.addAction(createThemeMenuOption(themeName)); } - //#region "ACE compatability" + //#region "ACE compatibility" ed.selection = {}; ed.session = ed; @@ -1259,13 +1259,13 @@ RED.editor.codeEditor.monaco = (function() { ed.setFontSize = function setFontSize(size) { ed.updateOptions({ fontSize: size }); } - //#endregion "ACE compatability" + //#endregion "ACE compatibility" //final setup ed.focusMemory = options.focus; ed._mode = editorOptions.language; - //as models are signleton, consts and let are avialable to other javascript instances + //as models are singleton, consts and let are avialable to other javascript instances //so when not focused, set editor mode to text temporarily to avoid multiple defs if(editorOptions._language) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js b/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js index 30dcc4bd5..d62fef8c9 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js @@ -88,10 +88,10 @@ RED.notifications = (function() { if (currentNotifications.length > 4) { var ll = currentNotifications.length; for (var i = 0;ll > 4 && i(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout; - // util.promisify no rest args compability + // util.promisify no rest args compatibility // tslint:disable-next-line void-return function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout; namespace setTimeout { @@ -74,7 +74,7 @@ declare module 'timers' { } function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void; function setInterval(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer; - // util.promisify no rest args compability + // util.promisify no rest args compatibility // tslint:disable-next-line void-return function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timer; namespace setInterval { @@ -82,7 +82,7 @@ declare module 'timers' { } function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void; function setImmediate(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate; - // util.promisify no rest args compability + // util.promisify no rest args compatibility // tslint:disable-next-line void-return function setImmediate(callback: (args: void) => void): NodeJS.Immediate; namespace setImmediate { diff --git a/packages/node_modules/@node-red/nodes/core/common/20-inject.html b/packages/node_modules/@node-red/nodes/core/common/20-inject.html index 5895220d3..375a558d4 100644 --- a/packages/node_modules/@node-red/nodes/core/common/20-inject.html +++ b/packages/node_modules/@node-red/nodes/core/common/20-inject.html @@ -163,7 +163,7 @@ height += 16; $("#node-input-property-container").editableList('height',height); } - /** Retrieve editableList items (refactored for re-use in the form inject button)*/ + /** Retrieve editableList items (refactored for reuse in the form inject button)*/ function getProps(el, legacy) { var result = { props: [] @@ -192,7 +192,7 @@ }); return result; } - /** Perform inject, optionally sending a custom msg (refactored for re-use in the form inject button)*/ + /** Perform inject, optionally sending a custom msg (refactored for reuse in the form inject button)*/ function doInject(node, customMsg) { var label = node._def.label.call(node,customMsg?customMsg.__user_inject_props__:undefined); if (label.length > 30) { diff --git a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js index 0d07091b7..e99e48f0a 100644 --- a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js +++ b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js @@ -188,7 +188,7 @@ module.exports = function(RED) { /** * Helper function for applying changes to an objects properties ONLY when the src object actually has the property. - * This avoids setting a `dst` property null/undefined when the `src` object doesnt have the named property. + * This avoids setting a `dst` property null/undefined when the `src` object does not have the named property. * @param {object} src Source object containing properties * @param {object} dst Destination object to set property * @param {string} propName The property name to set in the Destination object diff --git a/packages/node_modules/@node-red/nodes/core/network/32-udp.js b/packages/node_modules/@node-red/nodes/core/network/32-udp.js index d42d3a7c3..bc583cf1d 100644 --- a/packages/node_modules/@node-red/nodes/core/network/32-udp.js +++ b/packages/node_modules/@node-red/nodes/core/network/32-udp.js @@ -84,7 +84,7 @@ module.exports = function(RED) { } else { node.log(RED._("udp.errors.alreadyused",{port:node.port})); - server = udpInputPortsInUse[node.port]; // re-use existing + server = udpInputPortsInUse[node.port]; // reuse existing if (node.iface) { node.status({text:n.iface+" : "+node.iface}); } } @@ -184,7 +184,7 @@ module.exports = function(RED) { sock.setBroadcast(true); sock.setMulticastLoopback(false); } - node.log(RED._("udp.status.re-use",{outport:node.outport,host:node.addr,port:node.port})); + node.log(RED._("udp.status.reuse",{outport:node.outport,host:node.addr,port:node.port})); if (node.iface) { node.status({text:n.iface+" : "+node.iface}); } } else { diff --git a/packages/node_modules/@node-red/nodes/examples/function/function/01 - Send message to output port.json b/packages/node_modules/@node-red/nodes/examples/function/function/01 - Send message to output port.json index 9f3ac36ed..15cbc9d2e 100644 --- a/packages/node_modules/@node-red/nodes/examples/function/function/01 - Send message to output port.json +++ b/packages/node_modules/@node-red/nodes/examples/function/function/01 - Send message to output port.json @@ -1 +1 @@ -[{"id":"ec5a531b.68b65","type":"inject","z":"90acd374.2feda","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"World","payloadType":"str","x":150,"y":100,"wires":[["961abba6.04a028"]]},{"id":"1b0f8c3e.1fd7e4","type":"debug","z":"90acd374.2feda","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":100,"wires":[]},{"id":"4e5bf6b2.b4dd58","type":"comment","z":"90acd374.2feda","name":"send a message to output port","info":"Function node can be used to write JavaScript code to handle messages.\nThe input message can be referrenced by `msg` variable. \nA message returned from body of the function is sent to output port.\n\nSee Node-RED user guide about [functions](https://nodered.org/docs/user-guide/writing-functions).","x":170,"y":40,"wires":[]},{"id":"961abba6.04a028","type":"function","z":"90acd374.2feda","name":"return a message","func":"// returning message send it to output port\nmsg.payload = \"Hello, \"+msg.payload +\"!\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":330,"y":100,"wires":[["1b0f8c3e.1fd7e4"]]}] \ No newline at end of file +[{"id":"ec5a531b.68b65","type":"inject","z":"90acd374.2feda","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"World","payloadType":"str","x":150,"y":100,"wires":[["961abba6.04a028"]]},{"id":"1b0f8c3e.1fd7e4","type":"debug","z":"90acd374.2feda","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":100,"wires":[]},{"id":"4e5bf6b2.b4dd58","type":"comment","z":"90acd374.2feda","name":"send a message to output port","info":"Function node can be used to write JavaScript code to handle messages.\nThe input message can be referenced by `msg` variable. \nA message returned from body of the function is sent to output port.\n\nSee Node-RED user guide about [functions](https://nodered.org/docs/user-guide/writing-functions).","x":170,"y":40,"wires":[]},{"id":"961abba6.04a028","type":"function","z":"90acd374.2feda","name":"return a message","func":"// returning message send it to output port\nmsg.payload = \"Hello, \"+msg.payload +\"!\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":330,"y":100,"wires":[["1b0f8c3e.1fd7e4"]]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/function/function/10 - Asynchronous setup.json b/packages/node_modules/@node-red/nodes/examples/function/function/10 - Asynchronous setup.json index 2f2fee042..ddd75846a 100644 --- a/packages/node_modules/@node-red/nodes/examples/function/function/10 - Asynchronous setup.json +++ b/packages/node_modules/@node-red/nodes/examples/function/function/10 - Asynchronous setup.json @@ -1 +1 @@ -[{"id":"89904b80.4fcd08","type":"inject","z":"d44bc7c8.48eca8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":100,"wires":[["22c235a0.acb41a"]]},{"id":"20fa70dc.7107f","type":"debug","z":"d44bc7c8.48eca8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":100,"wires":[]},{"id":"cddf88c9.9df018","type":"comment","z":"d44bc7c8.48eca8","name":"asynchronous setup","info":"The `Setup` code that performs asynchronous work can return a promise object of the work. The completion of the promise is waited before starting function body.\n\nSee Node-RED user guide about [functions](https://nodered.org/docs/user-guide/writing-functions).","x":150,"y":40,"wires":[]},{"id":"22c235a0.acb41a","type":"function","z":"d44bc7c8.48eca8","name":"async. setup","func":"// retrieve message value\nmsg.payload = global.get('message');\nreturn msg;","outputs":1,"noerr":0,"initialize":"// set initial value of message\nglobal.set(\"message\", \"Initializing, World!\");\n// create promise for async work\nvar promise = new Promise((resolve, reject) => {\n // async work: wait 1s, then set message\n setTimeout(() => {\n global.set(\"message\", \"Hello, World!\");\n // report this work successfuly ended\n resolve();\n }, 1000);\n});\n// return the promise that should be executed before function code\nreturn promise;","finalize":"","x":370,"y":100,"wires":[["20fa70dc.7107f"]]}] \ No newline at end of file +[{"id":"89904b80.4fcd08","type":"inject","z":"d44bc7c8.48eca8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":100,"wires":[["22c235a0.acb41a"]]},{"id":"20fa70dc.7107f","type":"debug","z":"d44bc7c8.48eca8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":100,"wires":[]},{"id":"cddf88c9.9df018","type":"comment","z":"d44bc7c8.48eca8","name":"asynchronous setup","info":"The `Setup` code that performs asynchronous work can return a promise object of the work. The completion of the promise is waited before starting function body.\n\nSee Node-RED user guide about [functions](https://nodered.org/docs/user-guide/writing-functions).","x":150,"y":40,"wires":[]},{"id":"22c235a0.acb41a","type":"function","z":"d44bc7c8.48eca8","name":"async. setup","func":"// retrieve message value\nmsg.payload = global.get('message');\nreturn msg;","outputs":1,"noerr":0,"initialize":"// set initial value of message\nglobal.set(\"message\", \"Initializing, World!\");\n// create promise for async work\nvar promise = new Promise((resolve, reject) => {\n // async work: wait 1s, then set message\n setTimeout(() => {\n global.set(\"message\", \"Hello, World!\");\n // report this work successfully ended\n resolve();\n }, 1000);\n});\n// return the promise that should be executed before function code\nreturn promise;","finalize":"","x":370,"y":100,"wires":[["20fa70dc.7107f"]]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/sequence/join/03 - Reduce sequence mode.json b/packages/node_modules/@node-red/nodes/examples/sequence/join/03 - Reduce sequence mode.json index df2249cf3..cf76113d4 100644 --- a/packages/node_modules/@node-red/nodes/examples/sequence/join/03 - Reduce sequence mode.json +++ b/packages/node_modules/@node-red/nodes/examples/sequence/join/03 - Reduce sequence mode.json @@ -1 +1 @@ -[{"id":"9279b993.ba7ed8","type":"comment","z":"8b096c24.cc6d7","name":"Example: Reduce Mode","info":"Join node can be used to reduce message sequence to single value. In reduce mode, reduce operation for a sequence can be described using JSONata expression with following special variables:\n- `$A`: the accumulated value,\n- `$I`: index of the message in the sequence,\n- `$N`: number of messages in the sequence.\n","x":150,"y":40,"wires":[]},{"id":"e415861b.d82e38","type":"inject","z":"8b096c24.cc6d7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":160,"wires":[["7c8a4816.500ed8"]]},{"id":"7c8a4816.500ed8","type":"template","z":"8b096c24.cc6d7","name":"data","field":"payload","fieldType":"msg","format":"json","syntax":"plain","template":"[\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10\n]","output":"json","x":350,"y":160,"wires":[["7f64da1f.611014"]]},{"id":"5fde318f.23897","type":"join","z":"8b096c24.cc6d7","name":"","mode":"reduce","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"$A+payload","reduceInit":"0","reduceInitType":"num","reduceFixup":"$A/$N","x":630,"y":160,"wires":[["50977eaf.0490b"]]},{"id":"50977eaf.0490b","type":"debug","z":"8b096c24.cc6d7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":160,"wires":[]},{"id":"57bce4bf.38d02c","type":"comment","z":"8b096c24.cc6d7","name":"Calculate average of message sequence","info":"","x":240,"y":100,"wires":[]},{"id":"d33e73a8.5896","type":"comment","z":"8b096c24.cc6d7","name":"↑ split input array data into messages","info":"","x":590,"y":200,"wires":[]},{"id":"34482f62.61abd","type":"comment","z":"8b096c24.cc6d7","name":"↓ reduce sequence to average value","info":"","x":720,"y":120,"wires":[]},{"id":"7f64da1f.611014","type":"split","z":"8b096c24.cc6d7","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":490,"y":160,"wires":[["5fde318f.23897"]]},{"id":"e051fd76.1af1e","type":"inject","z":"8b096c24.cc6d7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":320,"wires":[["14318520.397a9b"]]},{"id":"14318520.397a9b","type":"template","z":"8b096c24.cc6d7","name":"data","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"Apple\nOrange\nBanana\nKiwi","output":"str","x":350,"y":320,"wires":[["41d85177.9b6f1"]]},{"id":"8fac92f8.0974c","type":"join","z":"8b096c24.cc6d7","name":"","mode":"reduce","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"$append($A,[payload])","reduceInit":"[]","reduceInitType":"json","reduceFixup":"","x":630,"y":320,"wires":[["5bf98f81.6db17"]]},{"id":"5bf98f81.6db17","type":"debug","z":"8b096c24.cc6d7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":320,"wires":[]},{"id":"7dc61153.a9062","type":"comment","z":"8b096c24.cc6d7","name":"Convert message sequence to array","info":"","x":220,"y":260,"wires":[]},{"id":"7f14c8b2.d775f8","type":"comment","z":"8b096c24.cc6d7","name":"↑ split input text data into messages","info":"","x":580,"y":360,"wires":[]},{"id":"85a2470f.5b9ce8","type":"comment","z":"8b096c24.cc6d7","name":"↓ reduce sequence to arrray of payloads","info":"","x":740,"y":280,"wires":[]},{"id":"41d85177.9b6f1","type":"split","z":"8b096c24.cc6d7","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":490,"y":320,"wires":[["8fac92f8.0974c"]]},{"id":"ec455af2.e31cb8","type":"inject","z":"8b096c24.cc6d7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":480,"wires":[["693a0274.e62d6c"]]},{"id":"693a0274.e62d6c","type":"template","z":"8b096c24.cc6d7","name":"data","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"Apple\nOrange\nBanana\nKiwi","output":"str","x":350,"y":480,"wires":[["d8374d2d.34863"]]},{"id":"805c900a.c6b7c","type":"join","z":"8b096c24.cc6d7","name":"","mode":"reduce","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":true,"reduceExp":"$append($A,[payload])","reduceInit":"[]","reduceInitType":"json","reduceFixup":"","x":630,"y":480,"wires":[["f8be3623.b8e358"]]},{"id":"f8be3623.b8e358","type":"debug","z":"8b096c24.cc6d7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":480,"wires":[]},{"id":"88fe5fe0.b08ca","type":"comment","z":"8b096c24.cc6d7","name":"Convert message sequence to array in reverse order","info":"","x":270,"y":420,"wires":[]},{"id":"f95fff12.45fda","type":"comment","z":"8b096c24.cc6d7","name":"↑ split input text data into messages","info":"","x":580,"y":520,"wires":[]},{"id":"b7eecb8c.e6b858","type":"comment","z":"8b096c24.cc6d7","name":"↓ reduce sequence to arrray of payloads in reverse order","info":"","x":790,"y":440,"wires":[]},{"id":"d8374d2d.34863","type":"split","z":"8b096c24.cc6d7","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":490,"y":480,"wires":[["805c900a.c6b7c"]]},{"id":"fb404773.0eb728","type":"inject","z":"8b096c24.cc6d7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":640,"wires":[["8139dcd5.2300d"]]},{"id":"8139dcd5.2300d","type":"template","z":"8b096c24.cc6d7","name":"data","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"Apple\nOrange\nBanana\nKiwi","output":"str","x":350,"y":640,"wires":[["c6ff515e.f95fd"]]},{"id":"fcff950d.0f67c8","type":"join","z":"8b096c24.cc6d7","name":"","mode":"reduce","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"$append($A,[{\t \"name\": payload,\t \"index\": $I\t}])","reduceInit":"[]","reduceInitType":"json","reduceFixup":"","x":630,"y":640,"wires":[["6d082a22.2fb214"]]},{"id":"6d082a22.2fb214","type":"debug","z":"8b096c24.cc6d7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":640,"wires":[]},{"id":"19daaf11.40d701","type":"comment","z":"8b096c24.cc6d7","name":"Convert message sequence to array of objects with name and index","info":"","x":320,"y":580,"wires":[]},{"id":"b60f900.592e47","type":"comment","z":"8b096c24.cc6d7","name":"↑ split input text data into messages","info":"","x":580,"y":680,"wires":[]},{"id":"62ffb2e1.28d8ec","type":"comment","z":"8b096c24.cc6d7","name":"↓ reduce sequence to arrray of objects","info":"","x":730,"y":600,"wires":[]},{"id":"c6ff515e.f95fd","type":"split","z":"8b096c24.cc6d7","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":490,"y":640,"wires":[["fcff950d.0f67c8"]]}] \ No newline at end of file +[{"id":"9279b993.ba7ed8","type":"comment","z":"8b096c24.cc6d7","name":"Example: Reduce Mode","info":"Join node can be used to reduce message sequence to single value. In reduce mode, reduce operation for a sequence can be described using JSONata expression with following special variables:\n- `$A`: the accumulated value,\n- `$I`: index of the message in the sequence,\n- `$N`: number of messages in the sequence.\n","x":150,"y":40,"wires":[]},{"id":"e415861b.d82e38","type":"inject","z":"8b096c24.cc6d7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":160,"wires":[["7c8a4816.500ed8"]]},{"id":"7c8a4816.500ed8","type":"template","z":"8b096c24.cc6d7","name":"data","field":"payload","fieldType":"msg","format":"json","syntax":"plain","template":"[\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10\n]","output":"json","x":350,"y":160,"wires":[["7f64da1f.611014"]]},{"id":"5fde318f.23897","type":"join","z":"8b096c24.cc6d7","name":"","mode":"reduce","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"$A+payload","reduceInit":"0","reduceInitType":"num","reduceFixup":"$A/$N","x":630,"y":160,"wires":[["50977eaf.0490b"]]},{"id":"50977eaf.0490b","type":"debug","z":"8b096c24.cc6d7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":160,"wires":[]},{"id":"57bce4bf.38d02c","type":"comment","z":"8b096c24.cc6d7","name":"Calculate average of message sequence","info":"","x":240,"y":100,"wires":[]},{"id":"d33e73a8.5896","type":"comment","z":"8b096c24.cc6d7","name":"↑ split input array data into messages","info":"","x":590,"y":200,"wires":[]},{"id":"34482f62.61abd","type":"comment","z":"8b096c24.cc6d7","name":"↓ reduce sequence to average value","info":"","x":720,"y":120,"wires":[]},{"id":"7f64da1f.611014","type":"split","z":"8b096c24.cc6d7","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":490,"y":160,"wires":[["5fde318f.23897"]]},{"id":"e051fd76.1af1e","type":"inject","z":"8b096c24.cc6d7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":320,"wires":[["14318520.397a9b"]]},{"id":"14318520.397a9b","type":"template","z":"8b096c24.cc6d7","name":"data","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"Apple\nOrange\nBanana\nKiwi","output":"str","x":350,"y":320,"wires":[["41d85177.9b6f1"]]},{"id":"8fac92f8.0974c","type":"join","z":"8b096c24.cc6d7","name":"","mode":"reduce","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"$append($A,[payload])","reduceInit":"[]","reduceInitType":"json","reduceFixup":"","x":630,"y":320,"wires":[["5bf98f81.6db17"]]},{"id":"5bf98f81.6db17","type":"debug","z":"8b096c24.cc6d7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":320,"wires":[]},{"id":"7dc61153.a9062","type":"comment","z":"8b096c24.cc6d7","name":"Convert message sequence to array","info":"","x":220,"y":260,"wires":[]},{"id":"7f14c8b2.d775f8","type":"comment","z":"8b096c24.cc6d7","name":"↑ split input text data into messages","info":"","x":580,"y":360,"wires":[]},{"id":"85a2470f.5b9ce8","type":"comment","z":"8b096c24.cc6d7","name":"↓ reduce sequence to array of payloads","info":"","x":740,"y":280,"wires":[]},{"id":"41d85177.9b6f1","type":"split","z":"8b096c24.cc6d7","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":490,"y":320,"wires":[["8fac92f8.0974c"]]},{"id":"ec455af2.e31cb8","type":"inject","z":"8b096c24.cc6d7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":480,"wires":[["693a0274.e62d6c"]]},{"id":"693a0274.e62d6c","type":"template","z":"8b096c24.cc6d7","name":"data","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"Apple\nOrange\nBanana\nKiwi","output":"str","x":350,"y":480,"wires":[["d8374d2d.34863"]]},{"id":"805c900a.c6b7c","type":"join","z":"8b096c24.cc6d7","name":"","mode":"reduce","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":true,"reduceExp":"$append($A,[payload])","reduceInit":"[]","reduceInitType":"json","reduceFixup":"","x":630,"y":480,"wires":[["f8be3623.b8e358"]]},{"id":"f8be3623.b8e358","type":"debug","z":"8b096c24.cc6d7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":480,"wires":[]},{"id":"88fe5fe0.b08ca","type":"comment","z":"8b096c24.cc6d7","name":"Convert message sequence to array in reverse order","info":"","x":270,"y":420,"wires":[]},{"id":"f95fff12.45fda","type":"comment","z":"8b096c24.cc6d7","name":"↑ split input text data into messages","info":"","x":580,"y":520,"wires":[]},{"id":"b7eecb8c.e6b858","type":"comment","z":"8b096c24.cc6d7","name":"↓ reduce sequence to array of payloads in reverse order","info":"","x":790,"y":440,"wires":[]},{"id":"d8374d2d.34863","type":"split","z":"8b096c24.cc6d7","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":490,"y":480,"wires":[["805c900a.c6b7c"]]},{"id":"fb404773.0eb728","type":"inject","z":"8b096c24.cc6d7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":640,"wires":[["8139dcd5.2300d"]]},{"id":"8139dcd5.2300d","type":"template","z":"8b096c24.cc6d7","name":"data","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"Apple\nOrange\nBanana\nKiwi","output":"str","x":350,"y":640,"wires":[["c6ff515e.f95fd"]]},{"id":"fcff950d.0f67c8","type":"join","z":"8b096c24.cc6d7","name":"","mode":"reduce","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"$append($A,[{\t \"name\": payload,\t \"index\": $I\t}])","reduceInit":"[]","reduceInitType":"json","reduceFixup":"","x":630,"y":640,"wires":[["6d082a22.2fb214"]]},{"id":"6d082a22.2fb214","type":"debug","z":"8b096c24.cc6d7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":640,"wires":[]},{"id":"19daaf11.40d701","type":"comment","z":"8b096c24.cc6d7","name":"Convert message sequence to array of objects with name and index","info":"","x":320,"y":580,"wires":[]},{"id":"b60f900.592e47","type":"comment","z":"8b096c24.cc6d7","name":"↑ split input text data into messages","info":"","x":580,"y":680,"wires":[]},{"id":"62ffb2e1.28d8ec","type":"comment","z":"8b096c24.cc6d7","name":"↓ reduce sequence to array of objects","info":"","x":730,"y":600,"wires":[]},{"id":"c6ff515e.f95fd","type":"split","z":"8b096c24.cc6d7","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":490,"y":640,"wires":[["fcff950d.0f67c8"]]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/storage/write file/02 - Write string to a file specified by property.json b/packages/node_modules/@node-red/nodes/examples/storage/write file/02 - Write string to a file specified by property.json index 109369b9e..bf7cb5579 100644 --- a/packages/node_modules/@node-red/nodes/examples/storage/write file/02 - Write string to a file specified by property.json +++ b/packages/node_modules/@node-red/nodes/examples/storage/write file/02 - Write string to a file specified by property.json @@ -37,7 +37,7 @@ "id": "8e876a75.e9beb8", "type": "comment", "z": "6312c0588348b2d4", - "name": "Write string to a file specied by filename property, the read from the file", + "name": "Write string to a file specified by filename property, the read from the file", "info": "Write file node can target file using `filename` property.", "x": 310, "y": 180, diff --git a/packages/node_modules/@node-red/nodes/locales/de/messages.json b/packages/node_modules/@node-red/nodes/locales/de/messages.json index bc706e1f1..7050bb784 100644 --- a/packages/node_modules/@node-red/nodes/locales/de/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/de/messages.json @@ -644,7 +644,7 @@ "bc-ready": "UDP-Broadcast bereit: __outport__-> __host__:__port__", "ready": "UDP bereit: __outport__-> __host__:__port__", "ready-nolocal": "UDP bereit: __host__:__port__", - "re-use": "UDP Wiederverwendung Socket: __outport__-> __host__:__port__" + "reuse": "UDP Wiederverwendung Socket: __outport__-> __host__:__port__" }, "errors": { "access-error": "UDP-Zugriffsfehler, Sie benötigen möglicherweise Root-Zugriff für Ports unter 1024", diff --git a/packages/node_modules/@node-red/nodes/locales/en-US/messages.json b/packages/node_modules/@node-red/nodes/locales/en-US/messages.json index a7b583878..581e5366f 100644 --- a/packages/node_modules/@node-red/nodes/locales/en-US/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/en-US/messages.json @@ -721,7 +721,7 @@ "bc-ready": "udp broadcast ready: __outport__ -> __host__:__port__", "ready": "udp ready: __outport__ -> __host__:__port__", "ready-nolocal": "udp ready: __host__:__port__", - "re-use": "udp re-use socket: __outport__ -> __host__:__port__" + "reuse": "udp reuse socket: __outport__ -> __host__:__port__" }, "errors": { "access-error": "UDP access error, you may need root access for ports below 1024", diff --git a/packages/node_modules/@node-red/nodes/locales/fr/messages.json b/packages/node_modules/@node-red/nodes/locales/fr/messages.json index c56cc28f1..d290991d8 100644 --- a/packages/node_modules/@node-red/nodes/locales/fr/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/fr/messages.json @@ -718,7 +718,7 @@ "bc-ready": "udp broadcast prêt : __outport__ -> __host__:__port__", "ready": "udp prêt : __outport__ -> __host__:__port__", "ready-nolocal": "udp prêt : __host__:__port__", - "re-use": "socket de réutilisation udp : __outport__ -> __host__:__port__" + "reuse": "socket de réutilisation udp : __outport__ -> __host__:__port__" }, "errors": { "access-error": "Erreur d'accès UDP, vous aurez peut-être besoin d'un accès root pour les ports inférieurs à 1024", diff --git a/packages/node_modules/@node-red/nodes/locales/ja/messages.json b/packages/node_modules/@node-red/nodes/locales/ja/messages.json index c1a3c9262..bba43f99e 100644 --- a/packages/node_modules/@node-red/nodes/locales/ja/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/ja/messages.json @@ -721,7 +721,7 @@ "bc-ready": "udpノードはブロードキャストの準備ができています: __outport__ -> __host__:__port__", "ready": "udpノードは準備ができています: __outport__ -> __host__:__port__", "ready-nolocal": "udpノードは準備ができています: __host__:__port__", - "re-use": "udp再利用ソケット: __outport__ -> __host__:__port__" + "reuse": "udp再利用ソケット: __outport__ -> __host__:__port__" }, "errors": { "access-error": "UDP接続エラー 管理者権限で1024未満のポート番号にアクセスできる必要があります", diff --git a/packages/node_modules/@node-red/nodes/locales/ko/messages.json b/packages/node_modules/@node-red/nodes/locales/ko/messages.json index c0f57591f..4fe615823 100644 --- a/packages/node_modules/@node-red/nodes/locales/ko/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/ko/messages.json @@ -577,7 +577,7 @@ "bc-ready": "udp노드는 브로드캐스트 준비가 끝났습니다: __outport__ -> __host__:__port__", "ready": "udp노드는 준비되었습니다: __outport__ -> __host__:__port__", "ready-nolocal": "udp노드는 준비되었습니다: __host__:__port__", - "re-use": "udp재이용 소켓: __outport__ -> __host__:__port__" + "reuse": "udp재이용 소켓: __outport__ -> __host__:__port__" }, "errors": { "access-error": "UDP접속에러 관리자 권한으로 1024미만의 포트번호에 액세스할 필요가 있습니다", diff --git a/packages/node_modules/@node-red/nodes/locales/pt-BR/messages.json b/packages/node_modules/@node-red/nodes/locales/pt-BR/messages.json index 00058ddf3..cd4db1049 100644 --- a/packages/node_modules/@node-red/nodes/locales/pt-BR/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/pt-BR/messages.json @@ -708,7 +708,7 @@ "bc-ready": "transmissão abrangente udp pronta: __outport__ -> __host __: __ port__", "ready": "udp pronto: __outport__ -> __host __: __ port__", "ready-nolocal": "udp pronto: __host __: __ port__", - "re-use": "udp reutilizar soquete: __outport__ -> __host __: __ port__" + "reuse": "udp reutilizar soquete: __outport__ -> __host __: __ port__" }, "errors": { "access-error": "Erro de acesso UDP, você pode precisar de acesso root para portas abaixo de 1024", diff --git a/packages/node_modules/@node-red/nodes/locales/ru/messages.json b/packages/node_modules/@node-red/nodes/locales/ru/messages.json index 58ccf90fe..73babd675 100644 --- a/packages/node_modules/@node-red/nodes/locales/ru/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/ru/messages.json @@ -604,7 +604,7 @@ "bc-ready": "широковещательная рассылка udp готова: __outport__ -> __host__:__port__", "ready": "udp готов: __outport__ -> __host__:__port__", "ready-nolocal": "udp готов: __host__:__port__", - "re-use": "сокет повторного использования udp: __outport__ -> __host__:__port__" + "reuse": "сокет повторного использования udp: __outport__ -> __host__:__port__" }, "errors": { "access-error": "Ошибка доступа UDP, Вам может потребоваться доступ с правами root для портов ниже 1024", diff --git a/packages/node_modules/@node-red/nodes/locales/zh-CN/messages.json b/packages/node_modules/@node-red/nodes/locales/zh-CN/messages.json index 3d0cf8007..7d3cde570 100644 --- a/packages/node_modules/@node-red/nodes/locales/zh-CN/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/zh-CN/messages.json @@ -711,7 +711,7 @@ "bc-ready": "udp 广播已就绪: __outport__ -> __host__:__port__", "ready": "udp 已就绪: __outport__ -> __host__:__port__", "ready-nolocal": "udp 已就绪: __host__:__port__", - "re-use": "udp 重用套接字: __outport__ -> __host__:__port__" + "reuse": "udp 重用套接字: __outport__ -> __host__:__port__" }, "errors": { "access-error": "UDP 访问错误, 你可能需要root权限才能接入1024以下的端口", diff --git a/packages/node_modules/@node-red/nodes/locales/zh-TW/messages.json b/packages/node_modules/@node-red/nodes/locales/zh-TW/messages.json index d63c47865..1c67b18c6 100644 --- a/packages/node_modules/@node-red/nodes/locales/zh-TW/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/zh-TW/messages.json @@ -598,7 +598,7 @@ "bc-ready": "udp 廣播已準備好: __outport__ -> __host__:__port__", "ready": "udp 已準備好: __outport__ -> __host__:__port__", "ready-nolocal": "udp 已準備好: __host__:__port__", - "re-use": "udp 重用通訊端: __outport__ -> __host__:__port__" + "reuse": "udp 重用通訊端: __outport__ -> __host__:__port__" }, "errors": { "access-error": "UDP 訪問錯誤, 你可能需要root許可權才能接入1024以下的埠", diff --git a/packages/node_modules/@node-red/runtime/lib/api/projects.js b/packages/node_modules/@node-red/runtime/lib/api/projects.js index aef736637..a9fd8613b 100644 --- a/packages/node_modules/@node-red/runtime/lib/api/projects.js +++ b/packages/node_modules/@node-red/runtime/lib/api/projects.js @@ -364,7 +364,7 @@ var api = module.exports = { }, /** - * Reverts changes to a file back to its commited version + * Reverts changes to a file back to its committed version * @param {Object} opts * @param {User} opts.user - the user calling the api * @param {String} opts.id - the id of the project diff --git a/test/nodes/core/function/10-switch_spec.js b/test/nodes/core/function/10-switch_spec.js index 07896a9a4..277f6e98a 100644 --- a/test/nodes/core/function/10-switch_spec.js +++ b/test/nodes/core/function/10-switch_spec.js @@ -675,7 +675,7 @@ describe('switch Node', function() { switchNode1.receive({payload:undefined}); }); }); - it('should treat non-existant msg property conditional as undefined', function(done) { + it('should treat non-existent msg property conditional as undefined', function(done) { var flow = [{"id":"switchNode1","type":"switch","z":"feee1df.c3263e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"this.does.not.exist","vt":"msg"}],"checkall":"true","outputs":1,"x":190,"y":440,"wires":[["helperNode1"]]}, {id:"helperNode1", type:"helper", wires:[]}]; diff --git a/test/nodes/core/function/15-change_spec.js b/test/nodes/core/function/15-change_spec.js index b23c1994a..2e3c3fee0 100644 --- a/test/nodes/core/function/15-change_spec.js +++ b/test/nodes/core/function/15-change_spec.js @@ -898,7 +898,7 @@ describe('change Node', function() { }); }); - it('changes the value and doesnt change type of the message property for partial match', function(done) { + it('changes the value and does not change type of the message property for partial match', function(done) { var flow = [{"id":"changeNode1","type":"change",rules:[{ "t": "change", "p": "payload", "pt": "msg", "from": "123", "fromt": "str", "to": "456", "tot": "num" }],"reg":false,"name":"changeNode","wires":[["helperNode1"]]}, {id:"helperNode1", type:"helper", wires:[]}]; helper.load(changeNode, flow, function() { @@ -1336,7 +1336,7 @@ describe('change Node', function() { }); }); - it('changes the value and doesnt change type of the flow context for partial match', function(done) { + it('changes the value and does not change type of the flow context for partial match', function(done) { var flow = [{"id":"changeNode1","type":"change",rules:[{ "t": "change", "p": "payload", "pt": "flow", "from": "123", "fromt": "str", "to": "456", "tot": "num" }],"reg":false,"name":"changeNode","wires":[["helperNode1"]],"z":"flow"}, {id:"helperNode1", type:"helper", wires:[],"z":"flow"}]; helper.load(changeNode, flow, function() { @@ -1356,7 +1356,7 @@ describe('change Node', function() { }); }); - it('changes the value and doesnt change type of the persistable flow context for partial match', function(done) { + it('changes the value and does not change type of the persistable flow context for partial match', function(done) { var flow = [{"id":"changeNode1","type":"change",rules:[{ "t": "change", "p": "#:(memory1)::payload", "pt": "flow", "from": "123", "fromt": "str", "to": "456", "tot": "num" }],"reg":false,"name":"changeNode","wires":[["helperNode1"]],"z":"flow"}, {id:"helperNode1", type:"helper", wires:[],"z":"flow"}]; helper.load(changeNode, flow, function() { diff --git a/test/nodes/core/function/80-template_spec.js b/test/nodes/core/function/80-template_spec.js index b4f530d05..fef63ec3f 100644 --- a/test/nodes/core/function/80-template_spec.js +++ b/test/nodes/core/function/80-template_spec.js @@ -387,7 +387,7 @@ describe('template node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - // mesage is intact + // message is intact msg.should.have.property('topic', 'bar'); msg.should.have.property('payload', 'foo'); // result is in flow context @@ -405,7 +405,7 @@ describe('template node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - // mesage is intact + // message is intact msg.should.have.property('topic', 'bar'); msg.should.have.property('payload', 'foo'); // result is in flow context @@ -425,7 +425,7 @@ describe('template node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - // mesage is intact + // message is intact msg.should.have.property('topic', 'bar'); msg.should.have.property('payload', 'foo'); // result is in global context @@ -443,7 +443,7 @@ describe('template node', function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); n2.on("input", function(msg) { - // mesage is intact + // message is intact msg.should.have.property('topic', 'bar'); msg.should.have.property('payload', 'foo'); // result is in global context diff --git a/test/nodes/core/function/rbe_spec.js b/test/nodes/core/function/rbe_spec.js index 56a93bdbf..b7d937244 100644 --- a/test/nodes/core/function/rbe_spec.js +++ b/test/nodes/core/function/rbe_spec.js @@ -487,7 +487,7 @@ describe('rbe node', function() { }); }); - it('should send output if gap is 0 and input doesnt change (narrowband)', function(done) { + it('should send output if gap is 0 and input does not change (narrowband)', function(done) { var flow = [{"id":"n1", "type":"rbe", func:"narrowband", gap:"0", wires:[["n2"]] }, {id:"n2", type:"helper"} ]; helper.load(testNode, flow, function() { diff --git a/test/unit/@node-red/editor-api/lib/editor/comms_spec.js b/test/unit/@node-red/editor-api/lib/editor/comms_spec.js index 4197dc469..8005195a0 100644 --- a/test/unit/@node-red/editor-api/lib/editor/comms_spec.js +++ b/test/unit/@node-red/editor-api/lib/editor/comms_spec.js @@ -499,7 +499,7 @@ describe("api/editor/comms", function() { } }); }); - it('rejects connections for non-existant token',function(done) { + it('rejects connections for non-existent token',function(done) { var ws = new WebSocket(url); var received = 0; ws.on('open', function() { diff --git a/test/unit/@node-red/registry/lib/installer_spec.js b/test/unit/@node-red/registry/lib/installer_spec.js index 80b96ecfb..e3aefb824 100644 --- a/test/unit/@node-red/registry/lib/installer_spec.js +++ b/test/unit/@node-red/registry/lib/installer_spec.js @@ -195,7 +195,7 @@ describe('nodes/registry/installer', function() { done(); }).catch(done); }); - it("rejects when non-existant path is provided", function(done) { + it("rejects when non-existent path is provided", function(done) { this.timeout(20000); var resourcesDir = path.resolve(path.join(__dirname,"resources","local","TestNodeModule","node_modules","NonExistant")); installer.installModule(resourcesDir).then(function() { diff --git a/test/unit/@node-red/registry/lib/registry_spec.js b/test/unit/@node-red/registry/lib/registry_spec.js index 5501264a7..81de53801 100644 --- a/test/unit/@node-red/registry/lib/registry_spec.js +++ b/test/unit/@node-red/registry/lib/registry_spec.js @@ -188,7 +188,7 @@ describe("red/nodes/registry/registry",function() { moduleList["test-module"].nodes.should.have.a.property("test-name-2"); }); - it('doesnt add node set types if node set has an error', function() { + it('does not add node set types if node set has an error', function() { typeRegistry.init(settings,null); typeRegistry.getNodeList().should.have.lengthOf(0); typeRegistry.getModuleList().should.eql({}); @@ -204,7 +204,7 @@ describe("red/nodes/registry/registry",function() { should.not.exist(typeRegistry.getTypeId("test-c")); }); - it('doesnt add node set if type already exists', function() { + it('does not add node set if type already exists', function() { typeRegistry.init(settings,null); typeRegistry.getNodeList().should.have.lengthOf(0); typeRegistry.getModuleList().should.eql({}); @@ -329,7 +329,7 @@ describe("red/nodes/registry/registry",function() { typeRegistry.removeModule("test-module/unknown"); }).should.throw("Unrecognised module: test-module/unknown"); }); - it('throws error for unavaiable settings', function() { + it('throws error for unavailable settings', function() { var s = stubSettings({},false,{}); typeRegistry.init(s,null); /*jshint immed: false */ diff --git a/test/unit/@node-red/runtime/lib/nodes/credentials_spec.js b/test/unit/@node-red/runtime/lib/nodes/credentials_spec.js index 0668da3b6..eac230abf 100644 --- a/test/unit/@node-red/runtime/lib/nodes/credentials_spec.js +++ b/test/unit/@node-red/runtime/lib/nodes/credentials_spec.js @@ -158,7 +158,7 @@ describe('red/runtime/nodes/credentials', function() { settings: encryptionDisabledSettings, nodes: { getType: () => function(){} } }); - var defintion = { + var definition = { user1:{type:"text"}, password1:{type:"password"}, user2:{type:"text"}, @@ -167,9 +167,9 @@ describe('red/runtime/nodes/credentials', function() { password3:{type:"password"} }; - credentials.register("test",defintion); + credentials.register("test",definition); var def = credentials.getDefinition("test"); - defintion.should.eql(def); + definition.should.eql(def); credentials.load({"node":{user1:"abc",password1:"123",user2:"def",password2:"456",user3:"ghi",password3:"789"}}).then(function() { var node = {id:"node",type:"test",credentials:{ diff --git a/test/unit/@node-red/runtime/lib/storage/localfilesystem/projects/ssh/index_spec.js b/test/unit/@node-red/runtime/lib/storage/localfilesystem/projects/ssh/index_spec.js index c6d0c533e..445ef70f6 100644 --- a/test/unit/@node-red/runtime/lib/storage/localfilesystem/projects/ssh/index_spec.js +++ b/test/unit/@node-red/runtime/lib/storage/localfilesystem/projects/ssh/index_spec.js @@ -37,7 +37,7 @@ describe("storage/localfilesystem/projects/ssh", function() { beforeEach(function(done) { oldHOME = process.env.HOME; - process.env.HOME = "/tmp/doesnt/exist"; + process.env.HOME = "/tmp/does not/exist"; fs.remove(userDir,function(err) { fs.mkdir(userDir,done); }); diff --git a/test/unit/@node-red/util/lib/util_spec.js b/test/unit/@node-red/util/lib/util_spec.js index 3bab2739a..29faabe60 100644 --- a/test/unit/@node-red/util/lib/util_spec.js +++ b/test/unit/@node-red/util/lib/util_spec.js @@ -637,12 +637,12 @@ describe("@node-red/util/util", function() { var result = util.evaluateJSONataExpression(expr,{}); result.should.eql('2013-11-18T19:55:00+08:00'); }); - it('handles non-existant flow context variable', function() { + it('handles non-existent flow context variable', function() { var expr = util.prepareJSONataExpression('$flowContext("nonExistant")',{context:function() { return {flow:{get: function(key) { return {'foo':'bar'}[key]}}}}}); var result = util.evaluateJSONataExpression(expr,{payload:"hello"}); should.not.exist(result); }); - it('handles non-existant global context variable', function() { + it('handles non-existent global context variable', function() { var expr = util.prepareJSONataExpression('$globalContext("nonExistant")',{context:function() { return {global:{get: function(key) { return {'foo':'bar'}[key]}}}}}); var result = util.evaluateJSONataExpression(expr,{payload:"hello"}); should.not.exist(result);