From fafdc9738dcb13dd01f42ffbfaad5014b6691199 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Tue, 24 Mar 2020 13:34:13 +0100 Subject: [PATCH] update dependencies --- node_modules/@actions/core/README.md | 6 ++ node_modules/@actions/core/lib/core.d.ts | 4 ++ node_modules/@actions/core/lib/core.js | 7 +++ node_modules/@actions/core/lib/core.js.map | 2 +- node_modules/@actions/core/package.json | 22 +++---- node_modules/nodemailer/CHANGELOG.md | 8 +++ .../nodemailer/lib/smtp-pool/index.js | 4 +- .../nodemailer/lib/smtp-pool/pool-resource.js | 2 +- .../nodemailer/lib/smtp-transport/index.js | 4 +- node_modules/nodemailer/package.json | 33 ++++++----- node_modules/nodemailer/postinstall.js | 58 +++++++++++++++++++ package-lock.json | 12 ++-- package.json | 4 +- 13 files changed, 125 insertions(+), 41 deletions(-) create mode 100644 node_modules/nodemailer/postinstall.js diff --git a/node_modules/@actions/core/README.md b/node_modules/@actions/core/README.md index 457f73cc..5ad27eed 100644 --- a/node_modules/@actions/core/README.md +++ b/node_modules/@actions/core/README.md @@ -82,6 +82,12 @@ try { core.warning('myInput was not set'); } + if (core.isDebug()) { + // curl -v https://github.com + } else { + // curl https://github.com + } + // Do stuff } catch (err) { diff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts index 6483c3ca..8fcc31ba 100644 --- a/node_modules/@actions/core/lib/core.d.ts +++ b/node_modules/@actions/core/lib/core.d.ts @@ -55,6 +55,10 @@ export declare function setOutput(name: string, value: string): void; * @param message add error issue message */ export declare function setFailed(message: string): void; +/** + * Gets whether Actions Step Debug is on or not + */ +export declare function isDebug(): boolean; /** * Writes debug message to user log * @param message debug message diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js index b99e1dee..b7ec8ab4 100644 --- a/node_modules/@actions/core/lib/core.js +++ b/node_modules/@actions/core/lib/core.js @@ -104,6 +104,13 @@ exports.setFailed = setFailed; //----------------------------------------------------------------------- // Logging Commands //----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; /** * Writes debug message to user log * @param message debug message diff --git a/node_modules/@actions/core/lib/core.js.map b/node_modules/@actions/core/lib/core.js.map index 33c62688..fb93bd38 100644 --- a/node_modules/@actions/core/lib/core.js.map +++ b/node_modules/@actions/core/lib/core.js.map @@ -1 +1 @@ -{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAE7C,uCAAwB;AACxB,2CAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AAHD,0BAGC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,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"} \ No newline at end of file diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json index 1a06ac1b..035c1697 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -1,28 +1,28 @@ { - "_from": "@actions/core", - "_id": "@actions/core@1.2.2", + "_from": "@actions/core@1.2.3", + "_id": "@actions/core@1.2.3", "_inBundle": false, - "_integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg==", + "_integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w==", "_location": "/@actions/core", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "@actions/core", + "raw": "@actions/core@1.2.3", "name": "@actions/core", "escapedName": "@actions%2fcore", "scope": "@actions", - "rawSpec": "", + "rawSpec": "1.2.3", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "1.2.3" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.2.tgz", - "_shasum": "3c4848d50378f9e3bcb67bcf97813382ec7369ee", - "_spec": "@actions/core", + "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz", + "_shasum": "e844b4fa0820e206075445079130868f95bfca95", + "_spec": "@actions/core@1.2.3", "_where": "/home/dawidd6/github/dawidd6/action-send-mail", "bugs": { "url": "https://github.com/actions/toolkit/issues" @@ -63,5 +63,5 @@ "tsc": "tsc" }, "types": "lib/core.d.ts", - "version": "1.2.2" + "version": "1.2.3" } diff --git a/node_modules/nodemailer/CHANGELOG.md b/node_modules/nodemailer/CHANGELOG.md index 7412208c..1d9d4a7f 100644 --- a/node_modules/nodemailer/CHANGELOG.md +++ b/node_modules/nodemailer/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## 6.4.6 2020-03-20 + +- fix: `requeueAttempts=n` should requeue `n` times (Patrick Malouin) [a27ed2f7] + +## 6.4.4 2020-03-01 + +- Add `options.forceAuth` for SMTP (Patrick Malouin) [a27ed2f7] + ## 6.4.3 2020-02-22 - Added an option to specify max number of requeues when connection closes unexpectedly (Igor Sechyn) [8a927f5a] diff --git a/node_modules/nodemailer/lib/smtp-pool/index.js b/node_modules/nodemailer/lib/smtp-pool/index.js index 9657c994..47a6d480 100644 --- a/node_modules/nodemailer/lib/smtp-pool/index.js +++ b/node_modules/nodemailer/lib/smtp-pool/index.js @@ -420,7 +420,7 @@ class SMTPPool extends EventEmitter { return true; } - return queueEntry.requeueAttempts && queueEntry.requeueAttempts < this.options.maxRequeues; + return queueEntry.requeueAttempts < this.options.maxRequeues; } _failDeliveryOnConnectionClose(connection) { @@ -613,7 +613,7 @@ class SMTPPool extends EventEmitter { return; } - if (auth && connection.allowsAuth) { + if (auth && (connection.allowsAuth || options.forceAuth)) { connection.login(auth, err => { if (returned) { return; diff --git a/node_modules/nodemailer/lib/smtp-pool/pool-resource.js b/node_modules/nodemailer/lib/smtp-pool/pool-resource.js index 011d143e..d67cc5cb 100644 --- a/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +++ b/node_modules/nodemailer/lib/smtp-pool/pool-resource.js @@ -137,7 +137,7 @@ class PoolResource extends EventEmitter { return; } - if (this.auth && this.connection.allowsAuth) { + if (this.auth && (this.connection.allowsAuth || options.forceAuth)) { this.connection.login(this.auth, err => { if (returned) { return; diff --git a/node_modules/nodemailer/lib/smtp-transport/index.js b/node_modules/nodemailer/lib/smtp-transport/index.js index 62cf6eaf..99ae4eb3 100644 --- a/node_modules/nodemailer/lib/smtp-transport/index.js +++ b/node_modules/nodemailer/lib/smtp-transport/index.js @@ -267,7 +267,7 @@ class SMTPTransport extends EventEmitter { let auth = this.getAuth(mail.data.auth); - if (auth && connection.allowsAuth) { + if (auth && (connection.allowsAuth || options.forceAuth)) { connection.login(auth, err => { if (auth && auth !== this.auth && auth.oauth2) { auth.oauth2.removeAllListeners(); @@ -370,7 +370,7 @@ class SMTPTransport extends EventEmitter { let authData = this.getAuth({}); - if (authData && connection.allowsAuth) { + if (authData && (connection.allowsAuth || options.forceAuth)) { connection.login(authData, err => { if (returned) { return; diff --git a/node_modules/nodemailer/package.json b/node_modules/nodemailer/package.json index 78138ecc..ae72ca0c 100644 --- a/node_modules/nodemailer/package.json +++ b/node_modules/nodemailer/package.json @@ -1,27 +1,27 @@ { - "_from": "nodemailer", - "_id": "nodemailer@6.4.3", + "_from": "nodemailer@6.4.6", + "_id": "nodemailer@6.4.6", "_inBundle": false, - "_integrity": "sha512-zmx4MTzYWQo2abFexvFYVURaiBGLekoA/yjP2Ctigd82hYtC4n38pcphQBi805t7AB2sY6DwmxnP/tb77f3KHA==", + "_integrity": "sha512-/kJ+FYVEm2HuUlw87hjSqTss+GU35D4giOpdSfGp7DO+5h6RlJj7R94YaYHOkoxu1CSaM0d3WRBtCzwXrY6MKA==", "_location": "/nodemailer", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "nodemailer", + "raw": "nodemailer@6.4.6", "name": "nodemailer", "escapedName": "nodemailer", - "rawSpec": "", + "rawSpec": "6.4.6", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "6.4.6" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.3.tgz", - "_shasum": "10d29195fb020e3297495bcba39d3519b23483f3", - "_spec": "nodemailer", + "_resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.6.tgz", + "_shasum": "d37f504f6560b36616f646a606894fe18819107f", + "_spec": "nodemailer@6.4.6", "_where": "/home/dawidd6/github/dawidd6/action-send-mail", "author": { "name": "Andris Reinman" @@ -37,20 +37,20 @@ "bunyan": "1.8.12", "chai": "4.2.0", "eslint-config-nodemailer": "1.2.0", - "eslint-config-prettier": "6.7.0", - "grunt": "1.0.4", + "eslint-config-prettier": "6.10.0", + "grunt": "1.1.0", "grunt-cli": "1.3.2", "grunt-eslint": "22.0.0", "grunt-mocha-test": "0.13.3", "libbase64": "1.2.1", "libmime": "4.2.1", "libqp": "1.1.0", - "mocha": "6.2.2", + "mocha": "7.1.1", "nodemailer-ntlm-auth": "1.0.1", "proxy": "1.0.1", "proxy-test-server": "1.0.0", - "sinon": "7.5.0", - "smtp-server": "3.5.0" + "sinon": "9.0.1", + "smtp-server": "3.6.0" }, "engines": { "node": ">=6.0.0" @@ -67,7 +67,8 @@ "url": "git+https://github.com/nodemailer/nodemailer.git" }, "scripts": { + "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\"", "test": "grunt" }, - "version": "6.4.3" + "version": "6.4.6" } diff --git a/node_modules/nodemailer/postinstall.js b/node_modules/nodemailer/postinstall.js new file mode 100644 index 00000000..08d1aab6 --- /dev/null +++ b/node_modules/nodemailer/postinstall.js @@ -0,0 +1,58 @@ +/* eslint no-control-regex:0 */ +'use strict'; + +const packageData = require('./package.json'); +const isEnabled = value => !!value && value !== '0' && value !== 'false'; +const canUseColor = isEnabled(process.env.npm_config_color); + +const text = `=== Nodemailer ${packageData.version} === + +Thank you for using Nodemailer for your email sending needs! While Nodemailer itself is mostly meant to be a SMTP client there are other related projects in the Nodemailer project as well. + +For example: +> IMAP API ( https://imapapi.com ) is a server application to easily access IMAP accounts via REST API +> NodemailerApp ( https://nodemailer.com/app/ ) is a cross platform GUI app to debug emails +`; + +const formatRow = (row, columns) => { + if (row.length <= columns) { + return [row]; + } + // wrap! + let lines = []; + while (row.length) { + if (row.length <= columns) { + lines.push(row); + break; + } + let slice = row.substr(0, columns); + + let match = slice.match(/(\s+)[^\s]*$/); + if (match && match.index) { + let line = row.substr(0, match.index); + row = row.substr(line.length + match[1].length); + lines.push(line); + } else { + lines.push(row); + break; + } + } + return lines; +}; + +const wrapText = text => { + let columns = Number(process.stdout.columns) || 80; + columns = Math.min(columns, 80) - 1; + + return text + .split('\n') + .flatMap(row => formatRow(row, columns)) + .join('\n'); +}; + +const banner = wrapText(text) + .replace(/^/gm, '\u001B[96m') + .replace(/$/gm, '\u001B[0m') + .replace(/(https:[^\s)]+)/g, '\u001B[94m $1 \u001B[96m'); + +console.log(canUseColor ? banner : banner.replace(/\u001B\[\d+m/g, '')); diff --git a/package-lock.json b/package-lock.json index 7c67140f..62e2546c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,14 +5,14 @@ "requires": true, "dependencies": { "@actions/core": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.2.tgz", - "integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg==" + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz", + "integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w==" }, "nodemailer": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.3.tgz", - "integrity": "sha512-zmx4MTzYWQo2abFexvFYVURaiBGLekoA/yjP2Ctigd82hYtC4n38pcphQBi805t7AB2sY6DwmxnP/tb77f3KHA==" + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.6.tgz", + "integrity": "sha512-/kJ+FYVEm2HuUlw87hjSqTss+GU35D4giOpdSfGp7DO+5h6RlJj7R94YaYHOkoxu1CSaM0d3WRBtCzwXrY6MKA==" } } } diff --git a/package.json b/package.json index e3a0e07b..aecd8d49 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "homepage": "https://github.com/dawidd6/action-send-mail#readme", "dependencies": { - "@actions/core": "^1.2.2", - "nodemailer": "^6.4.3" + "@actions/core": "^1.2.3", + "nodemailer": "^6.4.6" } }