mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge 08fcbd46af3a54dda9f7878ac30ee53619cf711d into 2a4fb7123dfaf4a284eaee875da63b4045da2acc
This commit is contained in:
commit
0ae5043866
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -88,10 +88,10 @@ RED.notifications = (function() {
|
||||
if (currentNotifications.length > 4) {
|
||||
var ll = currentNotifications.length;
|
||||
for (var i = 0;ll > 4 && i<currentNotifications.length;i+=1) {
|
||||
var notifiction = currentNotifications[i];
|
||||
if (!notifiction.fixed) {
|
||||
window.clearTimeout(notifiction.timeoutid);
|
||||
notifiction.close();
|
||||
var notification = currentNotifications[i];
|
||||
if (!notification.fixed) {
|
||||
window.clearTimeout(notification.timeoutid);
|
||||
notification.close();
|
||||
ll -= 1;
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ interface ErrorConstructor {
|
||||
* *
|
||||
------------------------------------------------*/
|
||||
|
||||
// For backwards compability
|
||||
// For backwards compatibility
|
||||
interface NodeRequire extends NodeJS.Require { }
|
||||
interface RequireResolve extends NodeJS.RequireResolve { }
|
||||
interface NodeModule extends NodeJS.Module { }
|
||||
|
@ -66,7 +66,7 @@ declare module 'timers' {
|
||||
}
|
||||
}
|
||||
function setTimeout<TArgs extends any[]>(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<TArgs extends any[]>(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<TArgs extends any[]>(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 {
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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"]]}]
|
||||
[{"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"]]}]
|
@ -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"]]}]
|
||||
[{"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"]]}]
|
File diff suppressed because one or more lines are too long
@ -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,
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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未満のポート番号にアクセスできる必要があります",
|
||||
|
@ -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미만의 포트번호에 액세스할 필요가 있습니다",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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以下的端口",
|
||||
|
@ -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以下的埠",
|
||||
|
@ -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
|
||||
|
@ -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:[]}];
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
|
@ -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() {
|
||||
|
@ -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() {
|
||||
|
@ -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() {
|
||||
|
@ -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 */
|
||||
|
@ -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:{
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user