11 Commits

Author SHA1 Message Date
8e479bcc5d node_modules: update 2020-08-30 12:08:22 +02:00
e8b7af2f44 workflows: fix 2020-07-20 07:31:58 +02:00
55c338812f workflows: test text/markdown 2020-07-20 07:29:26 +02:00
73116f5945 node_modules: update 2020-07-09 15:48:05 +02:00
80f113f0ef Merge pull request #9 from dawidd6/dependabot-npm_and_yarn-nodemailer-6.4.10
build(deps): bump nodemailer from 6.4.8 to 6.4.10
2020-06-18 07:19:08 +02:00
803b308fa9 build(deps): bump nodemailer from 6.4.8 to 6.4.10
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.4.8 to 6.4.10.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v6.4.8...v6.4.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-18 05:03:53 +00:00
586960b884 Merge pull request #8 from dawidd6/dependabot-npm_and_yarn-nodemailer-6.4.8
build(deps): bump nodemailer from 6.4.6 to 6.4.8
2020-05-29 07:41:08 +02:00
cb3cb8c8be build(deps): bump nodemailer from 6.4.6 to 6.4.8
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.4.6 to 6.4.8.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v6.4.6...v6.4.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-29 05:07:13 +00:00
172f2c9319 Merge pull request #7 from dawidd6/dependabot-npm_and_yarn-actions-core-1.2.4
build(deps): bump @actions/core from 1.2.3 to 1.2.4
2020-05-01 08:52:45 +02:00
611d60b8b4 build(deps): bump @actions/core from 1.2.3 to 1.2.4
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 05:04:19 +00:00
2f8c1bc14a workflows: trigger only on pushes to master 2020-04-07 10:42:30 +02:00
21 changed files with 297 additions and 127 deletions

View File

@ -1,6 +1,9 @@
name: Test action
on: push
on:
push:
branches:
- master
jobs:
main:
@ -8,11 +11,8 @@ jobs:
strategy:
max-parallel: 1
matrix:
content_type:
- text/plain
- text/html
include:
- content_type: text/plain
- content_type: text/markdown
body: file://README.md
attachments: action.yml
- content_type: text/html
@ -27,7 +27,7 @@ jobs:
attachments: package.json,package-lock.json
steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Send mail
uses: ./
with:

9
node_modules/@actions/core/LICENSE.md generated vendored Normal file
View File

@ -0,0 +1,9 @@
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -89,6 +89,7 @@ try {
}
// Do stuff
core.info('Output to the actions build log')
}
catch (err) {
core.error(`Error ${err}, action may still succeed though`);
@ -143,4 +144,4 @@ const core = require('@actions/core');
var pid = core.getState("pidToKill");
process.kill(pid);
```
```

View File

@ -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 {};

View File

@ -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')

View File

@ -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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C;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,CAAM;IAC5B,OAAO,cAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"}

View File

@ -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<T>(name: string, fn: () => Promise<T>): Promise<T>
* 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.
*

View File

@ -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);
}

View File

@ -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,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5",
"_inBundle": false,
"_integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w==",
"_integrity": "sha512-mwpoNjHSWWh0IiALdDEQi3tru124JKn0yVNziIBzTME8QRv7thwoghVuT1jBRjFvdtoHsqD58IRHy1nf86paRg==",
"_location": "/@actions/core",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/core@1.2.3",
"raw": "@actions/core@1.2.5",
"name": "@actions/core",
"escapedName": "@actions%2fcore",
"scope": "@actions",
"rawSpec": "1.2.3",
"rawSpec": "1.2.5",
"saveSpec": null,
"fetchSpec": "1.2.3"
"fetchSpec": "1.2.5"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz",
"_shasum": "e844b4fa0820e206075445079130868f95bfca95",
"_spec": "@actions/core@1.2.3",
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.5.tgz",
"_shasum": "fa57bf8c07a38191e243beb9ea9d8368c1cb02c8",
"_spec": "@actions/core@1.2.5",
"_where": "/home/dawidd6/github/dawidd6/action-send-mail",
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
@ -38,9 +38,10 @@
"test": "__tests__"
},
"files": [
"lib"
"lib",
"!.DS_Store"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core",
"homepage": "https://github.com/actions/toolkit/tree/main/packages/core",
"keywords": [
"github",
"actions",
@ -58,10 +59,10 @@
"directory": "packages/core"
},
"scripts": {
"audit-moderate": "npm install && npm audit --audit-level=moderate",
"audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
"test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc"
},
"types": "lib/core.d.ts",
"version": "1.2.3"
"version": "1.2.5"
}

View File

@ -1,5 +1,8 @@
module.exports = {
printWidth: 160,
tabWidth: 4,
singleQuote: true
singleQuote: true,
endOfLine: 'lf',
trailingComma: 'none',
arrowParens: 'avoid'
};

13
node_modules/nodemailer/CHANGELOG.md generated vendored
View File

@ -1,5 +1,18 @@
# CHANGELOG
## 6.4.11 2020-07-29
- Fixed escape sequence handling in address parsing
## 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]

76
node_modules/nodemailer/CODE_OF_CONDUCT.md generated vendored Normal file
View File

@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at info@nodemailer.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

View File

@ -73,7 +73,7 @@ function _handleAddress(tokens) {
}
}
let _regexHandler = function(address) {
let _regexHandler = function (address) {
if (!data.address.length) {
data.address = [address.trim()];
return ' ';
@ -195,9 +195,9 @@ class Tokenizer {
* @param {String} chr Character from the address field
*/
checkChar(chr) {
if ((chr in this.operators || chr === '\\') && this.escaped) {
this.escaped = false;
} else if (this.operatorExpecting && chr === this.operatorExpecting) {
if (this.escaped) {
// ignore next condition blocks
} else if (chr === this.operatorExpecting) {
this.node = {
type: 'operator',
value: chr
@ -217,9 +217,7 @@ class Tokenizer {
this.operatorExpecting = this.operators[chr];
this.escaped = false;
return;
}
if (!this.escaped && chr === '\\') {
} else if (['"', "'"].includes(this.operatorExpecting) && chr === '\\') {
this.escaped = true;
return;
}
@ -232,11 +230,17 @@ class Tokenizer {
this.list.push(this.node);
}
if (this.escaped && chr !== '\\') {
this.node.value += '\\';
if (chr === '\n') {
// Convert newlines to spaces. Carriage return is ignored as \r and \n usually
// go together anyway and there already is a WS for \n. Lone \r means something is fishy.
chr = ' ';
}
if (chr.charCodeAt(0) >= 0x21 || [' ', '\t'].includes(chr)) {
// skip command bytes
this.node.value += chr;
}
this.node.value += chr;
this.escaped = false;
}
}

View File

@ -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';
}
[]

View File

@ -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();

View File

@ -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);
}
}

38
node_modules/nodemailer/package.json generated vendored
View File

@ -1,27 +1,27 @@
{
"_from": "nodemailer@6.4.6",
"_id": "nodemailer@6.4.6",
"_from": "nodemailer@6.4.11",
"_id": "nodemailer@6.4.11",
"_inBundle": false,
"_integrity": "sha512-/kJ+FYVEm2HuUlw87hjSqTss+GU35D4giOpdSfGp7DO+5h6RlJj7R94YaYHOkoxu1CSaM0d3WRBtCzwXrY6MKA==",
"_integrity": "sha512-BVZBDi+aJV4O38rxsUh164Dk1NCqgh6Cm0rQSb9SK/DHGll/DrCMnycVDD7msJgZCnmVa8ASo8EZzR7jsgTukQ==",
"_location": "/nodemailer",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "nodemailer@6.4.6",
"raw": "nodemailer@6.4.11",
"name": "nodemailer",
"escapedName": "nodemailer",
"rawSpec": "6.4.6",
"rawSpec": "6.4.11",
"saveSpec": null,
"fetchSpec": "6.4.6"
"fetchSpec": "6.4.11"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.6.tgz",
"_shasum": "d37f504f6560b36616f646a606894fe18819107f",
"_spec": "nodemailer@6.4.6",
"_resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.11.tgz",
"_shasum": "1f00b4ffd106403f17c03f3d43d5945b2677046c",
"_spec": "nodemailer@6.4.11",
"_where": "/home/dawidd6/github/dawidd6/action-send-mail",
"author": {
"name": "Andris Reinman"
@ -34,23 +34,23 @@
"deprecated": false,
"description": "Easy as cake e-mail sending from your Node.js applications",
"devDependencies": {
"bunyan": "1.8.12",
"bunyan": "1.8.14",
"chai": "4.2.0",
"eslint-config-nodemailer": "1.2.0",
"eslint-config-prettier": "6.10.0",
"grunt": "1.1.0",
"eslint-config-prettier": "6.11.0",
"grunt": "1.2.1",
"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",
"libmime": "5.0.0",
"libqp": "1.1.0",
"mocha": "7.1.1",
"mocha": "8.0.1",
"nodemailer-ntlm-auth": "1.0.1",
"proxy": "1.0.1",
"proxy": "1.0.2",
"proxy-test-server": "1.0.0",
"sinon": "9.0.1",
"smtp-server": "3.6.0"
"sinon": "9.0.2",
"smtp-server": "3.7.0"
},
"engines": {
"node": ">=6.0.0"
@ -70,5 +70,5 @@
"postinstall": "node -e \"try{require('./postinstall')}catch(e){}\"",
"test": "grunt"
},
"version": "6.4.6"
"version": "6.4.11"
}

View File

@ -5,15 +5,38 @@ 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 footer = `Don't like this message?
There's a Github Sponsors goal to remove it
https://github.com/sponsors/andris9
`;
const secs = 4;
const formatCentered = (row, columns) => {
return row
.split(/\r?\n/)
.map(row => {
if (columns <= row.length) {
return row;
}
return ' '.repeat(Math.round(columns / 2 - row.length / 2)) + row;
})
.join('\n');
};
const formatRow = (row, columns) => {
if (row.length <= columns) {
return [row];
@ -27,10 +50,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,10 +69,14 @@ 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');
return (
(formatCentered(title, columns) + '\n' + text)
.split('\n')
.flatMap(row => formatRow(row, columns))
.join('\n') +
'\n' +
formatCentered(footer, columns)
);
};
const banner = wrapText(text)
@ -56,3 +85,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);

12
package-lock.json generated
View File

@ -5,14 +5,14 @@
"requires": true,
"dependencies": {
"@actions/core": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz",
"integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w=="
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.5.tgz",
"integrity": "sha512-mwpoNjHSWWh0IiALdDEQi3tru124JKn0yVNziIBzTME8QRv7thwoghVuT1jBRjFvdtoHsqD58IRHy1nf86paRg=="
},
"nodemailer": {
"version": "6.4.6",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.6.tgz",
"integrity": "sha512-/kJ+FYVEm2HuUlw87hjSqTss+GU35D4giOpdSfGp7DO+5h6RlJj7R94YaYHOkoxu1CSaM0d3WRBtCzwXrY6MKA=="
"version": "6.4.11",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.11.tgz",
"integrity": "sha512-BVZBDi+aJV4O38rxsUh164Dk1NCqgh6Cm0rQSb9SK/DHGll/DrCMnycVDD7msJgZCnmVa8ASo8EZzR7jsgTukQ=="
}
}
}

View File

@ -17,7 +17,7 @@
},
"homepage": "https://github.com/dawidd6/action-send-mail#readme",
"dependencies": {
"@actions/core": "^1.2.3",
"nodemailer": "^6.4.6"
"@actions/core": "^1.2.5",
"nodemailer": "^6.4.11"
}
}