mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Lint mistake - fix mdns node
This commit is contained in:
parent
5dbf104048
commit
87c93dc925
@ -92,7 +92,7 @@
|
|||||||
<li><b>msg.service</b> - For a full list of official service types see <i><a href="http://www.dns-sd.org/ServiceTypes.html" target="_new">this list</a></i>.</li>
|
<li><b>msg.service</b> - For a full list of official service types see <i><a href="http://www.dns-sd.org/ServiceTypes.html" target="_new">this list</a></i>.</li>
|
||||||
<li><b>msg.port</b> - the tcp or udp port to use.</li>
|
<li><b>msg.port</b> - the tcp or udp port to use.</li>
|
||||||
<li><b>msg.name</b> - the short description name of the service. If you use %h in the name, it will be replaced by the machine hostname.</li>
|
<li><b>msg.name</b> - the short description name of the service. If you use %h in the name, it will be replaced by the machine hostname.</li>
|
||||||
<li><b>msg.txtRecord</b> - a set of comma separated name:value pairs </li>
|
<li><b>msg.txtRecord</b> - a javascript object of name:value pairs.</li>
|
||||||
</ul></p>
|
</ul></p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ module.exports = function(RED) {
|
|||||||
this.txt = n.txt;
|
this.txt = n.txt;
|
||||||
if (this.txt && (this.txt !== '')) {
|
if (this.txt && (this.txt !== '')) {
|
||||||
try { this.txt = JSON.parse('{'+this.txt+'}'); }
|
try { this.txt = JSON.parse('{'+this.txt+'}'); }
|
||||||
catch (e) { delete this.txt; };
|
catch (e) { delete this.txt; }
|
||||||
}
|
}
|
||||||
var node = this;
|
var node = this;
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ module.exports = function(RED) {
|
|||||||
if (node.name || msg.name) {
|
if (node.name || msg.name) {
|
||||||
options.name = (node.name || msg.name).replace(/\%h/g, os.hostname());
|
options.name = (node.name || msg.name).replace(/\%h/g, os.hostname());
|
||||||
}
|
}
|
||||||
if (node.txt || msg.txtRecord) { options.txtRecord = node.txt || msg.txtRecord };
|
if (node.txt || msg.txtRecord) { options.txtRecord = node.txt || msg.txtRecord }
|
||||||
node.ad = mdns.createAdvertisement(service, port, options);
|
node.ad = mdns.createAdvertisement(service, port, options);
|
||||||
node.ad.start();
|
node.ad.start();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-discovery",
|
"name" : "node-red-node-discovery",
|
||||||
"version" : "0.0.7",
|
"version" : "0.0.8",
|
||||||
"description" : "A Node-RED node that uses Bonjour / Avahi to discover nearby services.",
|
"description" : "A Node-RED node that uses Bonjour / Avahi to discover nearby services.",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"mdns" : "2.2.*"
|
"mdns" : "2.2.*"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user