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
+21 -21
View File
@@ -2,44 +2,31 @@ import assert from 'node:assert';
import BoxError from './boxerror.js';
import constants from './constants.js';
import debugModule from 'debug';
import * as dns from './dns.js';
import * as docker from './docker.js';
import * as domains from './domains.js';
import dns from './dns.js';
import docker from './docker.js';
import domains from './domains.js';
import eventlog from './eventlog.js';
import fs from 'node:fs';
import hat from './hat.js';
import infra from './infra_version.js';
import Location from './location.js';
import locks from './locks.js';
import * as mail from './mail.js';
import mail from './mail.js';
import paths from './paths.js';
import * as platform from './platform.js';
import * as reverseProxy from './reverseproxy.js';
import platform from './platform.js';
import reverseProxy from './reverseproxy.js';
import safe from 'safetydance';
import services from './services.js';
import * as settings from './settings.js';
import settings from './settings.js';
import shellModule from './shell.js';
import tasks from './tasks.js';
import * as users from './users.js';
import users from './users.js';
const debug = debugModule('box:mailserver');
const shell = shellModule('mailserver');
const DEFAULT_MEMORY_LIMIT = 512 * 1024 * 1024;
export {
restart,
start,
onDomainAdded,
onDomainRemoved,
checkCertificate,
getMailAuth,
getLocation,
startChangeLocation,
changeLocation,
setLocation,
DEFAULT_MEMORY_LIMIT,
};
async function createMailConfig(mailFqdn) {
assert.strictEqual(typeof mailFqdn, 'string');
@@ -325,3 +312,16 @@ async function getMailAuth() {
};
}
export default {
restart,
start,
onDomainAdded,
onDomainRemoved,
checkCertificate,
getMailAuth,
getLocation,
startChangeLocation,
changeLocation,
setLocation,
DEFAULT_MEMORY_LIMIT,
};