diff --git a/.jshintrc b/.jshintrc index 4084293c..b16056c8 100644 --- a/.jshintrc +++ b/.jshintrc @@ -11,5 +11,5 @@ "shadow": true, "sub": true, "proto": true, - "esversion": 6 + "esversion": 8 } diff --git a/.travis.yml b/.travis.yml index 9e9ae945..e7d7f89c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,10 @@ matrix: - node_js: 12 - node_js: 10 - node_js: 8 - - python: 2.7 - language: python - before_script: pip install flake8 - script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics + # - python: 2.7 + # language: python + # before_script: pip install flake8 + # script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics - python: 3.7 language: python dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069) @@ -23,7 +23,10 @@ before_install: before_script: # Remove the './node_modules/.bin:' entry, see https://github.com/travis-ci/travis-ci/issues/8813 - export PATH=`echo ${PATH} | sed -re 's,(^|:)(./)?node_modules/.bin($|:),\1,'` - - npm install -g istanbul grunt-cli coveralls + - npm install -g nyc grunt-cli coveralls - npm install node-red script: - - istanbul cover grunt --report lcovonly && istanbul report text && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage + # - istanbul cover grunt --report lcovonly && istanbul report text && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage + # - nyc --check-coverage --reporter=text --reporter=lcovonly --reporter=html grunt + # - nyc grunt && rm -rf coverage .nyc_output + - nyc grunt && nyc report --reporter=text-lcov | coveralls diff --git a/coverall b/coverall index c4a004f8..2d3f6e21 100755 --- a/coverall +++ b/coverall @@ -1,3 +1,3 @@ # check coverage of tests... and browse report -istanbul cover ./node_modules/.bin/grunt --report lcovonly && istanbul report html +nyc --check-coverage --reporter=html grunt /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome coverage/index.html diff --git a/hardware/PiGpio/36-rpi-gpio.html b/hardware/PiGpio/36-rpi-gpio.html index 47f8e4c7..a4a66deb 100644 --- a/hardware/PiGpio/36-rpi-gpio.html +++ b/hardware/PiGpio/36-rpi-gpio.html @@ -70,8 +70,7 @@ @@ -111,6 +112,7 @@
msg.count
if set this will override the configured number of characters as long as it is less than the number configured.msg.waitfor
single character, escape code, or hex code. If set, the node will wait until it matches that character in the stream and then start the output.msg.baudrate
Additionally msg.header
contains the complete header object including
to, cc and other potentially useful properties.
It can optionally mark the message as Read (default), Delete it, or leave unmarked (None).
-Uses the node-imap module - see that page for +
Uses the node-imap module - see that page for
information on the msg.criteria
format if needed.
Note: uses IMAP with SSL to port 993.
Any attachments supplied in the incoming email can be found in the msg.attachments
property. This will be an array of objects where
@@ -51,3 +51,13 @@
+
\ No newline at end of file
diff --git a/social/email/locales/en-US/61-email.json b/social/email/locales/en-US/61-email.json
index 9bc3a8fc..cca6fa1d 100644
--- a/social/email/locales/en-US/61-email.json
+++ b/social/email/locales/en-US/61-email.json
@@ -34,7 +34,8 @@
"default-message": "__description__\n\nFile from Node-RED is attached: __filename__",
"tip": {
"cred": "Note: Copied credentials from global emailkeys.js file.",
- "recent": "Tip: Only retrieves the single most recent email."
+ "recent": "Tip: Only retrieves the single most recent email.",
+ "mta": "Note: To use ports below 1024 you may need elevated (root) privileges. See help sidebar."
},
"status": {
"messagesent": "Message sent: __response__",
@@ -47,6 +48,7 @@
"inboxzero": "you have achieved Inbox Zero",
"sending": "sending",
"sendfail": "send failed",
+ "parseerror": "Failed to parse message",
"connecterror": "connect error"
},
"errors": {
@@ -56,6 +58,7 @@
"nosmtptransport": "No SMTP transport. See info panel.",
"nopayload": "No payload to send",
"fetchfail": "Failed to fetch folder: __folder__",
+ "parsefail": "Failed to parse message",
"messageerror": "Fetch message error: __error__",
"refreshtoolarge": "Refresh interval too large. Limiting to 2147483 seconds"
}
diff --git a/social/email/locales/ja/61-email.html b/social/email/locales/ja/61-email.html
index 560dcb8b..d8dbfac9 100644
--- a/social/email/locales/ja/61-email.html
+++ b/social/email/locales/ja/61-email.html
@@ -38,3 +38,13 @@
POP3プロトコルでのデフォルトポート番号は、素のTCPでは110番、SSLでは995番です。IMAPプロトコルでは、素のTCPでは143番、SSLでは993番です。
+ + \ No newline at end of file diff --git a/social/email/locales/ja/61-email.json b/social/email/locales/ja/61-email.json index 08d04197..0938a236 100644 --- a/social/email/locales/ja/61-email.json +++ b/social/email/locales/ja/61-email.json @@ -21,7 +21,8 @@ "default-message": "__description__\n\nNode-REDからファイルが添付されました: __filename__", "tip": { "cred": "注釈: emailkeys.jsファイルから認証情報をコピーしました。", - "recent": "注釈: 最新のメールを1件のみ取得します。" + "recent": "注釈: 最新のメールを1件のみ取得します。", + "mta": "注釈: 1024未満のポートを使用するには、昇格された(root)特権が必要です。ヘルプサイドバーを参照してください。" }, "status": { "messagesent": "メッセージを送信しました: __response__", @@ -34,6 +35,7 @@ "inboxzero": "受信トレイにメールがありません", "sending": "送信中", "sendfail": "送信が失敗しました", + "parseerror": "メッセージのパースに失敗", "connecterror": "接続エラー" }, "errors": { @@ -43,6 +45,7 @@ "nosmtptransport": "SMTP転送が設定されていません。「情報」タブを参照してください", "nopayload": "送信するペイロードがありません", "fetchfail": "フォルダの受信に失敗しました: __folder__", + "parsefail": "メッセージのパースに失敗", "messageerror": "メッセージ受信エラー: __error__" } } diff --git a/social/email/package.json b/social/email/package.json index 56375b20..d9f4f93c 100644 --- a/social/email/package.json +++ b/social/email/package.json @@ -1,12 +1,13 @@ { "name": "node-red-node-email", - "version": "1.7.8", - "description": "Node-RED nodes to send and receive simple emails", + "version": "1.8.1", + "description": "Node-RED nodes to send and receive simple emails.", "dependencies": { "imap": "^0.8.19", - "mailparser": "^2.7.7", - "nodemailer": "^6.4.6", - "poplib": "^0.1.7" + "poplib": "^0.1.7", + "mailparser": "^3.0.0", + "nodemailer": "~6.4.10", + "smtp-server": "^3.7.0" }, "repository": { "type": "git", @@ -18,7 +19,8 @@ "email", "gmail", "imap", - "pop" + "pop", + "mta" ], "node-red": { "nodes": { diff --git a/social/pushbullet/57-pushbullet.js b/social/pushbullet/57-pushbullet.js index 5c49f222..199547aa 100644 --- a/social/pushbullet/57-pushbullet.js +++ b/social/pushbullet/57-pushbullet.js @@ -3,9 +3,7 @@ module.exports = function(RED) { "use strict"; var PushBullet = require('pushbullet'); var fs = require('fs'); - var util = require('util'); var when = require('when'); - var nodefn = require('when/node'); var EventEmitter = require('events').EventEmitter; function onError(err, node) { @@ -127,17 +125,19 @@ module.exports = function(RED) { stream.on('close', function() { self.emitter.emit('stream_disconnected'); if (!closing) { + if (tout) { clearTimeout(tout); } tout = setTimeout(function() { stream.connect(); - },15000); + }, 15000); } }); stream.on('error', function(err) { self.emitter.emit('stream_error', err); if (!closing) { + if (tout) { clearTimeout(tout); } tout = setTimeout(function() { stream.connect(); - },15000); + }, 15000); } }); stream.connect(); @@ -229,10 +229,14 @@ module.exports = function(RED) { msg.payload = incoming.body; } else if (incoming.type === 'dismissal') { - msg.topic = "dismissal"; msg.topic = "Push dismissed"; msg.payload = incoming.iden; } + else if (incoming.type === 'sms_changed') { + msg.topic = "SMS: "+ incoming.notifications[0].title; + msg.payload = incoming.notifications[0].body; + msg.message = incoming; + } else { this.error("unknown push type: " + incoming.type + " content: " + JSON.stringify(incoming)); return; @@ -257,8 +261,7 @@ module.exports = function(RED) { try { pushkeys = RED.settings.pushbullet || require(process.env.NODE_RED_HOME+"/../pushkey.js"); } - catch(err) { - } + catch(err) { } var cred = RED.nodes.getCredentials(n.id); // get old apikey @@ -327,7 +330,7 @@ module.exports = function(RED) { try { this.deviceid = this.credentials.deviceid; } - catch(err) {} + catch(err) { } } if (configNode) { diff --git a/social/pushbullet/package.json b/social/pushbullet/package.json index c63731d4..2463fdcd 100644 --- a/social/pushbullet/package.json +++ b/social/pushbullet/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-pushbullet", - "version" : "0.0.14", + "version" : "0.0.17", "description" : "A Node-RED node to send alerts via Pushbullet", "dependencies" : { "pushbullet": "^2.4.0", diff --git a/social/pushover/57-pushover.js b/social/pushover/57-pushover.js index 65a27ca1..947528c1 100644 --- a/social/pushover/57-pushover.js +++ b/social/pushover/57-pushover.js @@ -103,8 +103,8 @@ module.exports = function(RED) { if (err) { node.error(err,msg); } else { try { - response = JSON.parse(response); - if (response.status !== 1) { node.error("[57-pushover.js] Error: "+response); } + var responseObject = JSON.parse(response); + if (responseObject.status !== 1) { node.error("[57-pushover.js] Error: "+response); } } catch(e) { node.error("[57-pushover.js] Error: "+response); diff --git a/social/xmpp/92-xmpp.js b/social/xmpp/92-xmpp.js index b625eb2e..9035dbae 100644 --- a/social/xmpp/92-xmpp.js +++ b/social/xmpp/92-xmpp.js @@ -155,7 +155,7 @@ module.exports = function(RED) { } } else if(stanza.attrs.type === 'result'){ - // AM To-Do check for 'bind' result with our current jid + // To-Do check for 'bind' result with our current jid var query = stanza.getChild('query'); if (RED.settings.verbose || LOGITALL) {that.log("result!");} if (RED.settings.verbose || LOGITALL) {that.log(query);} @@ -164,7 +164,6 @@ module.exports = function(RED) { } }); - // We shouldn't have any errors here that the input/output nodes can't handle // if you need to see everything though; uncomment this block // this.client.on('error', err => { @@ -497,6 +496,10 @@ module.exports = function(RED) { node.error("Server doesn't exist "+xmpp.options.service,err); node.status({fill:"red",shape:"ring",text:"bad address"}); } + if (err.errno === "ENOTFOUND") { + node.error("Server doesn't exist "+xmpp.options.service,err); + node.status({fill:"red",shape:"ring",text:"bad address"}); + } else if (err === "XMPP authentication failure") { node.error(err,err); node.status({fill:"red",shape:"ring",text:"XMPP authentication failure"}); diff --git a/social/xmpp/package.json b/social/xmpp/package.json index 2225f826..2670f699 100644 --- a/social/xmpp/package.json +++ b/social/xmpp/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-xmpp", - "version": "0.2.4", + "version": "0.3.0", "description": "A Node-RED node to talk to an XMPP server", "dependencies": { "@xmpp/client": "^0.11.1" diff --git a/storage/mongodb/66-mongodb.html b/storage/mongodb/66-mongodb.html index f3180d65..12f904e5 100644 --- a/storage/mongodb/66-mongodb.html +++ b/storage/mongodb/66-mongodb.html @@ -1,11 +1,29 @@ - + - - - -