mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	merge 0.19
This commit is contained in:
		
							
								
								
									
										4
									
								
								.github/ISSUE_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/ISSUE_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							| @@ -8,7 +8,9 @@ If your issue is: | ||||
|   - a feature request or suggestion for a change, | ||||
|   - or problems with 3rd party (`node-red-contrib-`) nodes | ||||
|  | ||||
| please use the [mailing list](https://groups.google.com/forum/#!forum/node-red), [slack team](https://nodered.org/slack) or ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`. | ||||
| please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack). | ||||
|  | ||||
| You could also consider asking a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`. | ||||
|  | ||||
| That way the whole Node-RED user community can help, rather than rely on the core development team. | ||||
|  | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							| @@ -16,7 +16,7 @@ Put an `x` in the boxes that apply | ||||
| <!-- | ||||
| If you want to raise a pull-request with a new feature, or a refactoring | ||||
| of existing code, it **may well get rejected** if it hasn't been discussed on | ||||
| the [mailing list](https://groups.google.com/forum/#!forum/node-red) or | ||||
| the [forum](https://discourse.nodered.org) or | ||||
| [slack team](https://nodered.org/slack) first. | ||||
|  | ||||
| --> | ||||
|   | ||||
							
								
								
									
										12
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -1,3 +1,15 @@ | ||||
| #### 0.18.6: Maintenance Release | ||||
|  | ||||
| Editor Fixes | ||||
|  | ||||
|  - Handle a node having wires in the editor on ports it no longer has Fixes #1724 | ||||
|  - Add missing ACE snippet files | ||||
|  - Fix wireClippedNodes is not defined Fixes #1726 | ||||
|  - Split node html to isolate bad nodes when loading | ||||
|  - Avoid unnecessary use of .html() where .text() will do | ||||
|  | ||||
|  - Add editorTheme.projects.enabled to default settings.js" | ||||
|  | ||||
| #### 0.18.5: Maintenance Release | ||||
|  | ||||
| Projects | ||||
|   | ||||
| @@ -30,13 +30,13 @@ At a minimum, please include: | ||||
|  | ||||
| ## Feature requests | ||||
|  | ||||
| For feature requests, please raise them on the [mailing list](https://groups.google.com/forum/#!forum/node-red). | ||||
| For feature requests, please raise them on the [forum](https://discourse.nodered.org). | ||||
|  | ||||
| ## Pull-Requests | ||||
|  | ||||
| If you want to raise a pull-request with a new feature, or a refactoring | ||||
| of existing code, it may well get rejected if you haven't discussed it on | ||||
| the [mailing list](https://groups.google.com/forum/#!forum/node-red) first. | ||||
| the [forum](https://discourse.nodered.org) first. | ||||
|  | ||||
| All contributors need to sign the JS Foundation's Contributor License Agreement. | ||||
| It is an online process and quick to do. You can read the details of the agreement | ||||
|   | ||||
| @@ -22,8 +22,7 @@ started. | ||||
|  | ||||
| More documentation can be found [here](http://nodered.org/docs). | ||||
|  | ||||
| For further help, or general discussion, please use the | ||||
| [mailing list](https://groups.google.com/forum/#!forum/node-red). | ||||
| For further help, or general discussion, please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack). | ||||
|  | ||||
| ## Developers | ||||
|  | ||||
|   | ||||
| @@ -491,7 +491,9 @@ RED.nodes = (function() { | ||||
|             for (var j=0;j<wires.length;j++) { | ||||
|                 var w = wires[j]; | ||||
|                 if (w.target.type != "subflow") { | ||||
|                     node.wires[w.sourcePort].push(w.target.id); | ||||
|                     if (w.sourcePort < node.wires.length) { | ||||
|                         node.wires[w.sourcePort].push(w.target.id); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|   | ||||
							
								
								
									
										1
									
								
								editor/vendor/ace/snippets/json.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								editor/vendor/ace/snippets/json.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| ace.define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="json"}) | ||||
							
								
								
									
										1
									
								
								editor/vendor/ace/snippets/sql.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								editor/vendor/ace/snippets/sql.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| ace.define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n	create table ${1:table} (\n		${2:columns}\n	);\nsnippet col\n	${1:name}	${2:type}	${3:default ''}	${4:not null}\nsnippet ccol\n	${1:name}	varchar2(${2:size})	${3:default ''}	${4:not null}\nsnippet ncol\n	${1:name}	number	${3:default 0}	${4:not null}\nsnippet dcol\n	${1:name}	date	${3:default sysdate}	${4:not null}\nsnippet ind\n	create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n	create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n	comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n	comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n	alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n	create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n	select * from ${1:table}\n",t.scope="sql"}) | ||||
							
								
								
									
										1
									
								
								editor/vendor/ace/snippets/swift.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								editor/vendor/ace/snippets/swift.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| ace.define("ace/snippets/swift",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swift"}) | ||||
| @@ -52,6 +52,12 @@ | ||||
|     <p>The Catch node can also be used to handle errors. To invoke a Catch node, | ||||
|     pass <code>msg</code> as a second argument to <code>node.error</code>:</p> | ||||
|     <pre>node.error("Error",msg);</pre> | ||||
|     <h4>Referring Node Information</h4> | ||||
|     <p>In the function block, id and name of the node can be referenced using the following properties:</p> | ||||
|     <ul> | ||||
|         <li><code>node.id</code> - id of the node</li> | ||||
|         <li><code>node.name</code> - name of the node</li> | ||||
|     </ul> | ||||
| </script> | ||||
|  | ||||
| <script type="text/javascript"> | ||||
|   | ||||
| @@ -62,6 +62,8 @@ module.exports = function(RED) { | ||||
|                            "results = (function(msg){ "+ | ||||
|                               "var __msgid__ = msg._msgid;"+ | ||||
|                               "var node = {"+ | ||||
|                                  "id:__node__.id,"+ | ||||
|                                  "name:__node__.name,"+ | ||||
|                                  "log:__node__.log,"+ | ||||
|                                  "error:__node__.error,"+ | ||||
|                                  "warn:__node__.warn,"+ | ||||
| @@ -84,6 +86,8 @@ module.exports = function(RED) { | ||||
|                 util: RED.util | ||||
|             }, | ||||
|             __node__: { | ||||
|                 id: node.id, | ||||
|                 name: node.name, | ||||
|                 log: function() { | ||||
|                     node.log.apply(node, arguments); | ||||
|                 }, | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|     "name": "node-red", | ||||
|     "version": "0.18.5", | ||||
|     "version": "0.18.6", | ||||
|     "description": "A visual tool for wiring the Internet of Things", | ||||
|     "homepage": "http://nodered.org", | ||||
|     "license": "Apache-2.0", | ||||
| @@ -36,7 +36,7 @@ | ||||
|     "dependencies": { | ||||
|         "basic-auth": "2.0.0", | ||||
|         "bcryptjs": "2.4.3", | ||||
|         "body-parser": "1.18.2", | ||||
|         "body-parser": "1.18.3", | ||||
|         "cheerio": "0.22.0", | ||||
|         "clone": "2.1.1", | ||||
|         "cookie": "0.3.1", | ||||
| @@ -58,7 +58,7 @@ | ||||
|         "media-typer": "0.3.0", | ||||
|         "memorystore": "1.6.0", | ||||
|         "mime": "1.4.1", | ||||
|         "mqtt": "2.17.0", | ||||
|         "mqtt": "2.18.0", | ||||
|         "multer": "1.3.0", | ||||
|         "mustache": "2.3.0", | ||||
|         "node-red-node-email": "0.1.*", | ||||
| @@ -74,7 +74,7 @@ | ||||
|         "raw-body": "2.3.3", | ||||
|         "semver": "5.5.0", | ||||
|         "sentiment": "2.1.0", | ||||
|         "uglify-js": "3.3.24", | ||||
|         "uglify-js": "3.3.25", | ||||
|         "when": "3.7.8", | ||||
|         "ws": "1.1.5", | ||||
|         "xml2js": "0.4.19" | ||||
|   | ||||
| @@ -233,5 +233,13 @@ module.exports = { | ||||
|             // Whether or not to include audit events in the log output | ||||
|             audit: false | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     // Customising the editor | ||||
|     editorTheme: { | ||||
|         projects: { | ||||
|             // To enable the Projects feature, set this value to true | ||||
|             enabled: false | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -508,6 +508,34 @@ describe('function node', function() { | ||||
|         }); | ||||
|     }); | ||||
|  | ||||
|     it('should allow accessing node.id', function(done) { | ||||
|         var flow = [{id:"n1",type:"function",wires:[["n2"]],func:"msg.payload = node.id; return msg;"}, | ||||
|                     {id:"n2", type:"helper"}]; | ||||
|         helper.load(functionNode, flow, function() { | ||||
|             var n1 = helper.getNode("n1"); | ||||
|             var n2 = helper.getNode("n2"); | ||||
|             n2.on("input", function(msg) { | ||||
|                 msg.should.have.property('payload', n1.id); | ||||
|                 done(); | ||||
|             }); | ||||
|             n1.receive({payload:"foo",topicb: "bar"}); | ||||
|         }); | ||||
|     }); | ||||
|  | ||||
|     it('should allow accessing node.name', function(done) { | ||||
|         var flow = [{id:"n1",type:"function",wires:[["n2"]],func:"msg.payload = node.name; return msg;", "name":"name of node"}, | ||||
|                     {id:"n2", type:"helper"}]; | ||||
|         helper.load(functionNode, flow, function() { | ||||
|             var n1 = helper.getNode("n1"); | ||||
|             var n2 = helper.getNode("n2"); | ||||
|             n2.on("input", function(msg) { | ||||
|                 msg.should.have.property('payload', n1.name); | ||||
|                 done(); | ||||
|             }); | ||||
|             n1.receive({payload:"foo",topicb: "bar"}); | ||||
|         }); | ||||
|     }); | ||||
|  | ||||
|     describe('Logger', function () { | ||||
|         it('should log an Info Message', function (done) { | ||||
|             var flow = [{id: "n1", type: "function", wires: [["n2"]], func: "node.log('test');"}]; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user