From 73116f5945f4a1cfc2ea7c951fd7c61199f189c2 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Thu, 9 Jul 2020 15:48:05 +0200 Subject: [PATCH] node_modules: update --- node_modules/@actions/core/lib/command.d.ts | 9 ++++- node_modules/@actions/core/lib/command.js | 18 ++++++++- node_modules/@actions/core/lib/command.js.map | 2 +- node_modules/@actions/core/lib/core.d.ts | 28 +++++++------ node_modules/@actions/core/lib/core.js | 31 ++++++++++----- node_modules/@actions/core/lib/core.js.map | 2 +- node_modules/@actions/core/package.json | 30 +++++++------- node_modules/nodemailer/.prettierrc.js | 5 ++- node_modules/nodemailer/CHANGELOG.md | 9 +++++ .../nodemailer/lib/mail-composer/index.js | 22 +++-------- .../nodemailer/lib/mime-node/index.js | 18 ++------- node_modules/nodemailer/lib/xoauth2/index.js | 12 +++--- node_modules/nodemailer/package.json | 38 +++++++++--------- node_modules/nodemailer/postinstall.js | 39 ++++++++++++++++--- 14 files changed, 164 insertions(+), 99 deletions(-) diff --git a/node_modules/@actions/core/lib/command.d.ts b/node_modules/@actions/core/lib/command.d.ts index 51b8f116..94d5e449 100644 --- a/node_modules/@actions/core/lib/command.d.ts +++ b/node_modules/@actions/core/lib/command.d.ts @@ -1,5 +1,5 @@ interface CommandProperties { - [key: string]: string; + [key: string]: any; } /** * Commands @@ -11,6 +11,11 @@ interface CommandProperties { * ::warning::This is the message * ::set-env name=MY_VAR::some value */ -export declare function issueCommand(command: string, properties: CommandProperties, message: string): void; +export declare function issueCommand(command: string, properties: CommandProperties, message: any): void; export declare function issue(name: string, message?: string): void; +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +export declare function toCommandValue(input: any): string; export {}; diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js index eeef233e..af28d2b1 100644 --- a/node_modules/@actions/core/lib/command.js +++ b/node_modules/@actions/core/lib/command.js @@ -61,14 +61,28 @@ class Command { return cmdStr; } } +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; function escapeData(s) { - return (s || '') + return toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A'); } function escapeProperty(s) { - return (s || '') + return toCommandValue(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') diff --git a/node_modules/@actions/core/lib/command.js.map b/node_modules/@actions/core/lib/command.js.map index 00a9861e..ae755652 100644 --- a/node_modules/@actions/core/lib/command.js.map +++ b/node_modules/@actions/core/lib/command.js.map @@ -1 +1 @@ -{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,UAAkB,EAAE;IACtD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CA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ACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts index 8fcc31ba..8bb5093c 100644 --- a/node_modules/@actions/core/lib/core.d.ts +++ b/node_modules/@actions/core/lib/core.d.ts @@ -21,9 +21,9 @@ export declare enum ExitCode { /** * Sets env variable for this action and future actions in the job * @param name the name of the variable to set - * @param val the value of the variable + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify */ -export declare function exportVariable(name: string, val: string): void; +export declare function exportVariable(name: string, val: any): void; /** * Registers a secret which will get masked from logs * @param secret value of the secret @@ -46,15 +46,21 @@ export declare function getInput(name: string, options?: InputOptions): string; * Sets the value of an output. * * @param name name of the output to set - * @param value value to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify */ -export declare function setOutput(name: string, value: string): void; +export declare function setOutput(name: string, value: any): void; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +export declare function setCommandEcho(enabled: boolean): void; /** * Sets the action status to failed. * When the action exits it will be with an exit code of 1 * @param message add error issue message */ -export declare function setFailed(message: string): void; +export declare function setFailed(message: string | Error): void; /** * Gets whether Actions Step Debug is on or not */ @@ -66,14 +72,14 @@ export declare function isDebug(): boolean; export declare function debug(message: string): void; /** * Adds an error issue - * @param message error issue message + * @param message error issue message. Errors will be converted to string via toString() */ -export declare function error(message: string): void; +export declare function error(message: string | Error): void; /** * Adds an warning issue - * @param message warning issue message + * @param message warning issue message. Errors will be converted to string via toString() */ -export declare function warning(message: string): void; +export declare function warning(message: string | Error): void; /** * Writes info to log with console.log. * @param message info message @@ -104,9 +110,9 @@ export declare function group(name: string, fn: () => Promise): Promise * Saves state for current action, the state can only be retrieved by this action's post job execution. * * @param name name of the state to store - * @param value value to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify */ -export declare function saveState(name: string, value: string): void; +export declare function saveState(name: string, value: any): void; /** * Gets the value of an state set by this action's main execution. * diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js index b7ec8ab4..c838f4e2 100644 --- a/node_modules/@actions/core/lib/core.js +++ b/node_modules/@actions/core/lib/core.js @@ -39,11 +39,13 @@ var ExitCode; /** * Sets env variable for this action and future actions in the job * @param name the name of the variable to set - * @param val the value of the variable + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any function exportVariable(name, val) { - process.env[name] = val; - command_1.issueCommand('set-env', { name }, val); + const convertedVal = command_1.toCommandValue(val); + process.env[name] = convertedVal; + command_1.issueCommand('set-env', { name }, convertedVal); } exports.exportVariable = exportVariable; /** @@ -82,12 +84,22 @@ exports.getInput = getInput; * Sets the value of an output. * * @param name name of the output to set - * @param value value to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any function setOutput(name, value) { command_1.issueCommand('set-output', { name }, value); } exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; //----------------------------------------------------------------------- // Results //----------------------------------------------------------------------- @@ -121,18 +133,18 @@ function debug(message) { exports.debug = debug; /** * Adds an error issue - * @param message error issue message + * @param message error issue message. Errors will be converted to string via toString() */ function error(message) { - command_1.issue('error', message); + command_1.issue('error', message instanceof Error ? message.toString() : message); } exports.error = error; /** * Adds an warning issue - * @param message warning issue message + * @param message warning issue message. Errors will be converted to string via toString() */ function warning(message) { - command_1.issue('warning', message); + command_1.issue('warning', message instanceof Error ? message.toString() : message); } exports.warning = warning; /** @@ -190,8 +202,9 @@ exports.group = group; * Saves state for current action, the state can only be retrieved by this action's post job execution. * * @param name name of the state to store - * @param value value to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any function saveState(name, value) { command_1.issueCommand('save-state', { name }, value); } diff --git a/node_modules/@actions/core/lib/core.js.map b/node_modules/@actions/core/lib/core.js.map index fb93bd38..68e9f313 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,CAA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O,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;AAC3E,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,oBAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,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,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,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 035c1697..c33641b5 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -1,34 +1,36 @@ { - "_from": "@actions/core@1.2.3", - "_id": "@actions/core@1.2.3", + "_args": [ + [ + "@actions/core@1.2.4", + "/Users/dawidd6/github/dawidd6/action-send-mail" + ] + ], + "_from": "@actions/core@1.2.4", + "_id": "@actions/core@1.2.4", "_inBundle": false, - "_integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w==", + "_integrity": "sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg==", "_location": "/@actions/core", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "@actions/core@1.2.3", + "raw": "@actions/core@1.2.4", "name": "@actions/core", "escapedName": "@actions%2fcore", "scope": "@actions", - "rawSpec": "1.2.3", + "rawSpec": "1.2.4", "saveSpec": null, - "fetchSpec": "1.2.3" + "fetchSpec": "1.2.4" }, "_requiredBy": [ - "#USER", "/" ], - "_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", + "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.4.tgz", + "_spec": "1.2.4", + "_where": "/Users/dawidd6/github/dawidd6/action-send-mail", "bugs": { "url": "https://github.com/actions/toolkit/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Actions core lib", "devDependencies": { "@types/node": "^12.0.2" @@ -63,5 +65,5 @@ "tsc": "tsc" }, "types": "lib/core.d.ts", - "version": "1.2.3" + "version": "1.2.4" } diff --git a/node_modules/nodemailer/.prettierrc.js b/node_modules/nodemailer/.prettierrc.js index 566518a7..3f83654e 100644 --- a/node_modules/nodemailer/.prettierrc.js +++ b/node_modules/nodemailer/.prettierrc.js @@ -1,5 +1,8 @@ module.exports = { printWidth: 160, tabWidth: 4, - singleQuote: true + singleQuote: true, + endOfLine: 'lf', + trailingComma: 'none', + arrowParens: 'avoid' }; diff --git a/node_modules/nodemailer/CHANGELOG.md b/node_modules/nodemailer/CHANGELOG.md index 1d9d4a7f..263c45dc 100644 --- a/node_modules/nodemailer/CHANGELOG.md +++ b/node_modules/nodemailer/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG +## 6.4.10 2020-06-17 + +- Fixed RFC822 output for MailComposer when using invalid content-type value. Mostly relevant if message attachments have stragne content-type values set. + +## 6.4.7 2020-05-28 + +- Always set charset=utf-8 for Content-Type headers +- Catch error whn using invalid crypto.sign input + ## 6.4.6 2020-03-20 - fix: `requeueAttempts=n` should requeue `n` times (Patrick Malouin) [a27ed2f7] diff --git a/node_modules/nodemailer/lib/mail-composer/index.js b/node_modules/nodemailer/lib/mail-composer/index.js index b0cbe9fc..0bbf75c6 100644 --- a/node_modules/nodemailer/lib/mail-composer/index.js +++ b/node_modules/nodemailer/lib/mail-composer/index.js @@ -100,12 +100,7 @@ class MailComposer { if (attachment.filename) { data.filename = attachment.filename; } else if (!isMessageNode && attachment.filename !== false) { - data.filename = - (attachment.path || attachment.href || '') - .split('/') - .pop() - .split('?') - .shift() || 'attachment-' + (i + 1); + data.filename = (attachment.path || attachment.href || '').split('/').pop().split('?').shift() || 'attachment-' + (i + 1); if (data.filename.indexOf('.') < 0) { data.filename += '.' + mimeFuncs.detectExtension(data.contentType); } @@ -207,7 +202,7 @@ class MailComposer { content: this.mail.text }; } - text.contentType = 'text/plain' + (!text.encoding && mimeFuncs.isPlainText(text.content) ? '' : '; charset=utf-8'); + text.contentType = 'text/plain; charset=utf-8'; } if (this.mail.watchHtml) { @@ -221,7 +216,7 @@ class MailComposer { content: this.mail.watchHtml }; } - watchHtml.contentType = 'text/watch-html' + (!watchHtml.encoding && mimeFuncs.isPlainText(watchHtml.content) ? '' : '; charset=utf-8'); + watchHtml.contentType = 'text/watch-html; charset=utf-8'; } if (this.mail.amp) { @@ -232,7 +227,7 @@ class MailComposer { content: this.mail.amp }; } - amp.contentType = 'text/x-amp-html' + (!amp.encoding && mimeFuncs.isPlainText(amp.content) ? '' : '; charset=utf-8'); + amp.contentType = 'text/x-amp-html; charset=utf-8'; } // only include the calendar alternative if there are no attachments @@ -261,12 +256,7 @@ class MailComposer { } eventObject.filename = false; - eventObject.contentType = - 'text/calendar; charset="utf-8"; method=' + - (eventObject.method || 'PUBLISH') - .toString() - .trim() - .toUpperCase(); + eventObject.contentType = 'text/calendar; charset=utf-8; method=' + (eventObject.method || 'PUBLISH').toString().trim().toUpperCase(); if (!eventObject.headers) { eventObject.headers = {}; } @@ -280,7 +270,7 @@ class MailComposer { content: this.mail.html }; } - html.contentType = 'text/html' + (!html.encoding && mimeFuncs.isPlainText(html.content) ? '' : '; charset=utf-8'); + html.contentType = 'text/html; charset=utf-8'; } [] diff --git a/node_modules/nodemailer/lib/mime-node/index.js b/node_modules/nodemailer/lib/mime-node/index.js index 1d18c8a0..60fa987c 100644 --- a/node_modules/nodemailer/lib/mime-node/index.js +++ b/node_modules/nodemailer/lib/mime-node/index.js @@ -80,11 +80,7 @@ class MimeNode { /** * Indicates which encoding should be used for header strings: "Q" or "B" */ - this.textEncoding = (options.textEncoding || '') - .toString() - .trim() - .charAt(0) - .toUpperCase(); + this.textEncoding = (options.textEncoding || '').toString().trim().charAt(0).toUpperCase(); /** * Immediate parent for this node (or undefined if not set) @@ -441,16 +437,10 @@ class MimeNode { getTransferEncoding() { let transferEncoding = false; - let contentType = (this.getHeader('Content-Type') || '') - .toString() - .toLowerCase() - .trim(); + let contentType = (this.getHeader('Content-Type') || '').toString().toLowerCase().trim(); if (this.content) { - transferEncoding = (this.getHeader('Content-Transfer-Encoding') || '') - .toString() - .toLowerCase() - .trim(); + transferEncoding = (this.getHeader('Content-Transfer-Encoding') || '').toString().toLowerCase().trim(); if (!transferEncoding || !['base64', 'quoted-printable'].includes(transferEncoding)) { if (/^text\//i.test(contentType)) { // If there are no special symbols, no need to modify the text @@ -1023,7 +1013,7 @@ class MimeNode { _handleContentType(structured) { this.contentType = structured.value.trim().toLowerCase(); - this.multipart = this.contentType.split('/').reduce((prev, value) => (prev === 'multipart' ? value : false)); + this.multipart = /^multipart\//i.test(this.contentType) ? this.contentType.substr(this.contentType.indexOf('/') + 1) : false; if (this.multipart) { this.boundary = structured.params.boundary = structured.params.boundary || this.boundary || this._generateBoundary(); diff --git a/node_modules/nodemailer/lib/xoauth2/index.js b/node_modules/nodemailer/lib/xoauth2/index.js index 6baba582..5039be90 100644 --- a/node_modules/nodemailer/lib/xoauth2/index.js +++ b/node_modules/nodemailer/lib/xoauth2/index.js @@ -163,7 +163,12 @@ class XOAuth2 extends Stream { iat, exp: iat + this.options.serviceRequestTimeout }; - let token = this.jwtSignRS256(tokenData); + let token; + try { + token = this.jwtSignRS256(tokenData); + } catch (err) { + return callback(new Error('Can\x27t generate token. Check your auth options')); + } urlOptions = { grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', @@ -355,10 +360,7 @@ class XOAuth2 extends Stream { */ jwtSignRS256(payload) { payload = ['{"alg":"RS256","typ":"JWT"}', JSON.stringify(payload)].map(val => this.toBase64URL(val)).join('.'); - let signature = crypto - .createSign('RSA-SHA256') - .update(payload) - .sign(this.options.privateKey); + let signature = crypto.createSign('RSA-SHA256').update(payload).sign(this.options.privateKey); return payload + '.' + this.toBase64URL(signature); } } diff --git a/node_modules/nodemailer/package.json b/node_modules/nodemailer/package.json index ae72ca0c..171e4893 100644 --- a/node_modules/nodemailer/package.json +++ b/node_modules/nodemailer/package.json @@ -1,55 +1,57 @@ { - "_from": "nodemailer@6.4.6", - "_id": "nodemailer@6.4.6", + "_args": [ + [ + "nodemailer@6.4.10", + "/Users/dawidd6/github/dawidd6/action-send-mail" + ] + ], + "_from": "nodemailer@6.4.10", + "_id": "nodemailer@6.4.10", "_inBundle": false, - "_integrity": "sha512-/kJ+FYVEm2HuUlw87hjSqTss+GU35D4giOpdSfGp7DO+5h6RlJj7R94YaYHOkoxu1CSaM0d3WRBtCzwXrY6MKA==", + "_integrity": "sha512-j+pS9CURhPgk6r0ENr7dji+As2xZiHSvZeVnzKniLOw1eRAyM/7flP0u65tCnsapV8JFu+t0l/5VeHsCZEeh9g==", "_location": "/nodemailer", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "nodemailer@6.4.6", + "raw": "nodemailer@6.4.10", "name": "nodemailer", "escapedName": "nodemailer", - "rawSpec": "6.4.6", + "rawSpec": "6.4.10", "saveSpec": null, - "fetchSpec": "6.4.6" + "fetchSpec": "6.4.10" }, "_requiredBy": [ - "#USER", "/" ], - "_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", + "_resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.10.tgz", + "_spec": "6.4.10", + "_where": "/Users/dawidd6/github/dawidd6/action-send-mail", "author": { "name": "Andris Reinman" }, "bugs": { "url": "https://github.com/nodemailer/nodemailer/issues" }, - "bundleDependencies": false, "dependencies": {}, - "deprecated": false, "description": "Easy as cake e-mail sending from your Node.js applications", "devDependencies": { "bunyan": "1.8.12", "chai": "4.2.0", "eslint-config-nodemailer": "1.2.0", - "eslint-config-prettier": "6.10.0", + "eslint-config-prettier": "6.11.0", "grunt": "1.1.0", "grunt-cli": "1.3.2", - "grunt-eslint": "22.0.0", + "grunt-eslint": "23.0.0", "grunt-mocha-test": "0.13.3", "libbase64": "1.2.1", "libmime": "4.2.1", "libqp": "1.1.0", - "mocha": "7.1.1", + "mocha": "8.0.1", "nodemailer-ntlm-auth": "1.0.1", "proxy": "1.0.1", "proxy-test-server": "1.0.0", - "sinon": "9.0.1", + "sinon": "9.0.2", "smtp-server": "3.6.0" }, "engines": { @@ -70,5 +72,5 @@ "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\"", "test": "grunt" }, - "version": "6.4.6" + "version": "6.4.10" } diff --git a/node_modules/nodemailer/postinstall.js b/node_modules/nodemailer/postinstall.js index 08d1aab6..f7fefff3 100644 --- a/node_modules/nodemailer/postinstall.js +++ b/node_modules/nodemailer/postinstall.js @@ -5,15 +5,28 @@ 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} === - +const title = `=== Nodemailer ${packageData.version} ===`; +const text = ` 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 +> ImapFlow ( https://imapflow.com/ ) is an async IMAP client library for Node.js > NodemailerApp ( https://nodemailer.com/app/ ) is a cross platform GUI app to debug emails +> Project Pending ( https://projectpending.com/ ) allows you to host DNS of your project domains +> Pending DNS ( https://pendingdns.com/ ) is the DNS server used that powers Project Pending +> Ethereal Email ( https://ethereal.email/ ) is an email testing service that accepts all your test emails `; +const secs = 4; + +const formatCentered = (row, columns) => { + if (columns <= row.length) { + return row; + } + + return ' '.repeat(Math.round(columns / 2 - row.length / 2)) + row; +}; + const formatRow = (row, columns) => { if (row.length <= columns) { return [row]; @@ -27,10 +40,12 @@ const formatRow = (row, columns) => { } let slice = row.substr(0, columns); + let prefix = slice.charAt(0) === '>' ? ' ' : ''; + 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); + row = prefix + row.substr(line.length + match[1].length); lines.push(line); } else { lines.push(row); @@ -44,7 +59,7 @@ const wrapText = text => { let columns = Number(process.stdout.columns) || 80; columns = Math.min(columns, 80) - 1; - return text + return (formatCentered(title, columns) + '\n' + text) .split('\n') .flatMap(row => formatRow(row, columns)) .join('\n'); @@ -56,3 +71,17 @@ const banner = wrapText(text) .replace(/(https:[^\s)]+)/g, '\u001B[94m $1 \u001B[96m'); console.log(canUseColor ? banner : banner.replace(/\u001B\[\d+m/g, '')); +if (canUseColor) { + process.stdout.write('\u001B[96m'); +} + +setInterval(() => { + process.stdout.write('.'); +}, 500); + +setTimeout(() => { + if (canUseColor) { + process.stdout.write('\u001B[0m\n'); + } + process.exit(0); +}, secs * 1000 + 100);