migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user