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

@@ -2,12 +2,12 @@ import apps from './apps.js';
import assert from 'node:assert';
import BoxError from './boxerror.js';
import constants from './constants.js';
import * as dashboard from './dashboard.js';
import dashboard from './dashboard.js';
import debugModule from 'debug';
import Docker from 'dockerode';
import * as dockerRegistries from './dockerregistries.js';
import dockerRegistries from './dockerregistries.js';
import fs from 'node:fs';
import * as mailServer from './mailserver.js';
import mailServer from './mailserver.js';
import os from 'node:os';
import paths from './paths.js';
import promiseRetry from './promise-retry.js';
@@ -15,41 +15,11 @@ import services from './services.js';
import shellModule from './shell.js';
import safe from 'safetydance';
import timers from 'timers/promises';
import * as volumes from './volumes.js';
import volumes from './volumes.js';
const debug = debugModule('box:docker');
const shell = shellModule('docker');
export {
ping,
info,
df,
buildImage,
downloadImage,
createContainer,
startContainer,
restartContainer,
stopContainer,
stopContainers,
deleteContainer,
deleteImage,
deleteContainers,
createSubcontainer,
inspect,
getContainerIp,
getEvents,
getStats,
update,
parseImageRef,
createExec,
startExec,
getExec,
resizeExec
};
const gConnection = new Docker({ socketPath: paths.DOCKER_SOCKET_PATH });
@@ -748,3 +718,34 @@ async function update(name, memory) {
throw new BoxError(BoxError.DOCKER_ERROR, 'Unable to update container');
}
export default {
ping,
info,
df,
buildImage,
downloadImage,
createContainer,
startContainer,
restartContainer,
stopContainer,
stopContainers,
deleteContainer,
deleteImage,
deleteContainers,
createSubcontainer,
inspect,
getContainerIp,
getEvents,
getStats,
update,
parseImageRef,
createExec,
startExec,
getExec,
resizeExec
};