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

@@ -4,7 +4,7 @@ import blobs from './blobs.js';
import BoxError from './boxerror.js';
import constants from './constants.js';
import debugModule from 'debug';
import * as docker from './docker.js';
import docker from './docker.js';
import hat from './hat.js';
import infra from './infra_version.js';
import mounts from './mounts.js';
@@ -13,17 +13,13 @@ import paths from './paths.js';
import safe from 'safetydance';
import services from './services.js';
import shellModule from './shell.js';
import * as volumes from './volumes.js';
import volumes from './volumes.js';
const debug = debugModule('box:sftp');
const shell = shellModule('sftp');
const DEFAULT_MEMORY_LIMIT = 256 * 1024 * 1024;
export {
start,
DEFAULT_MEMORY_LIMIT,
};
async function ensureKeys() {
for (const keyType of [ 'rsa', 'ed25519' ]) {
@@ -131,3 +127,8 @@ async function start(existingInfra) {
if (existingInfra.version !== 'none' && existingInfra.images.sftp !== image) await docker.deleteImage(existingInfra.images.sftp);
}
export default {
start,
DEFAULT_MEMORY_LIMIT,
};