migrate to "export default"

also, set no-use-before-define in linter
This commit is contained in:
Girish Ramakrishnan
2026-02-14 15:43:24 +01:00
parent ddb46646fa
commit 36aa641cb9
231 changed files with 2846 additions and 2728 deletions

View File

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