migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import assert from 'node:assert';
|
||||
import BoxError from './boxerror.js';
|
||||
import * as branding from './branding.js';
|
||||
import branding from './branding.js';
|
||||
import constants from './constants.js';
|
||||
import * as dashboard from './dashboard.js';
|
||||
import dashboard from './dashboard.js';
|
||||
import debugModule from 'debug';
|
||||
import ejs from 'ejs';
|
||||
import * as mailServer from './mailserver.js';
|
||||
import mailServer from './mailserver.js';
|
||||
import nodemailer from 'nodemailer';
|
||||
import path from 'node:path';
|
||||
import safe from 'safetydance';
|
||||
import * as translations from './translations.js';
|
||||
import translations from './translations.js';
|
||||
|
||||
const debug = debugModule('box:mailer');
|
||||
|
||||
@@ -19,22 +19,6 @@ function clearMailQueue() {
|
||||
_mailQueue.length = 0;
|
||||
}
|
||||
|
||||
export {
|
||||
passwordReset,
|
||||
sendInvite,
|
||||
sendNewLoginLocation,
|
||||
backupFailed,
|
||||
certificateRenewalError,
|
||||
appDown,
|
||||
appUp,
|
||||
oomEvent,
|
||||
rebootRequired,
|
||||
boxUpdateError,
|
||||
lowDiskSpace,
|
||||
sendTestMail,
|
||||
_mailQueue,
|
||||
clearMailQueue,
|
||||
};
|
||||
|
||||
const MAIL_TEMPLATES_DIR = path.join(import.meta.dirname, 'mail_templates');
|
||||
|
||||
@@ -352,3 +336,20 @@ async function sendTestMail(domain, email) {
|
||||
|
||||
await sendMail(mailOptions);
|
||||
}
|
||||
|
||||
export default {
|
||||
passwordReset,
|
||||
sendInvite,
|
||||
sendNewLoginLocation,
|
||||
backupFailed,
|
||||
certificateRenewalError,
|
||||
appDown,
|
||||
appUp,
|
||||
oomEvent,
|
||||
rebootRequired,
|
||||
boxUpdateError,
|
||||
lowDiskSpace,
|
||||
sendTestMail,
|
||||
_mailQueue,
|
||||
clearMailQueue,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user