From 290b09623fbc547b81d100e126ad1fddd866862c Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Wed, 12 Aug 2020 15:09:41 +0000 Subject: [PATCH] fix(core): update --- package.json | 5 ++--- test/test.ts | 14 ++++++++------ ts/index.ts | 8 ++++---- ts/smartsmtp.plugins.ts | 8 ++------ 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 86f9ec5..f2a23c7 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,7 @@ "license": "MIT", "scripts": { "test": "(tstest test/)", - "build": "(tsbuild)", - "format": "(gitzone format)" + "build": "(tsbuild --web)" }, "devDependencies": { "@gitzone/tsbuild": "^2.0.22", @@ -41,4 +40,4 @@ "npmextra.json", "readme.md" ] -} +} \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index 7fa9827..3d23ea6 100644 --- a/test/test.ts +++ b/test/test.ts @@ -17,13 +17,15 @@ tap.test('should create a valid instance of Smartsmtp', async () => { expect(testSmartsmtp).to.be.instanceOf(smartsmtp.Smartsmtp); }); - tap.test('should send a message', async () => { - const result = await testSmartsmtp.sendSmartMail(new smartmail.Smartmail({ - body: '', - from: 'smartsmtp@mail.lossless.one', - subject: 'this is a test message', - }), 'sandbox@mail.git.zone'); + const result = await testSmartsmtp.sendSmartMail( + new smartmail.Smartmail({ + body: '', + from: 'smartsmtp@mail.lossless.one', + subject: 'this is a test message', + }), + 'sandbox@mail.git.zone' + ); console.log(result); }); diff --git a/ts/index.ts b/ts/index.ts index ca6e655..f609d58 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -18,8 +18,8 @@ export class Smartsmtp { secure: true, // upgrade later with STARTTLS auth: { user: optionsArg.smtpUser, - pass: optionsArg.smtpPassword - } + pass: optionsArg.smtpPassword, + }, }); } @@ -36,9 +36,9 @@ export class Smartsmtp { to: toArg, subject: smartmailArg.getSubject(dataArg), text: smartmailArg.getBody(dataArg), - html: smartmailArg.getBody(dataArg) + html: smartmailArg.getBody(dataArg), }; const response = await this.nodemailerTransport.sendMail(message); return response; } -} \ No newline at end of file +} diff --git a/ts/smartsmtp.plugins.ts b/ts/smartsmtp.plugins.ts index 4b3fb8c..03047b8 100644 --- a/ts/smartsmtp.plugins.ts +++ b/ts/smartsmtp.plugins.ts @@ -1,13 +1,9 @@ // @pushrocks scope import * as smartmail from '@pushrocks/smartmail'; -export { - smartmail -}; +export { smartmail }; // third party scope import * as nodemailer from 'nodemailer'; -export { - nodemailer -}; +export { nodemailer };