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
+46 -45
View File
@@ -1,63 +1,25 @@
import assert from 'node:assert';
import * as backupFormats from './backupformats.js';
import backupFormats from './backupformats.js';
import BoxError from './boxerror.js';
import constants from './constants.js';
import * as cron from './cron.js';
import cron from './cron.js';
import { CronTime } from 'cron';
import crypto from 'node:crypto';
import * as database from './database.js';
import database from './database.js';
import debugModule from 'debug';
import eventlog from './eventlog.js';
import * as hush from './hush.js';
import hush from './hush.js';
import locks from './locks.js';
import path from 'node:path';
import paths from './paths.js';
import safe from 'safetydance';
import tasks from './tasks.js';
import * as storageFilesystem from './storage/filesystem.js';
import * as storageS3 from './storage/s3.js';
import * as storageGcs from './storage/gcs.js';
import storageFilesystem from './storage/filesystem.js';
import storageS3 from './storage/s3.js';
import storageGcs from './storage/gcs.js';
const debug = debugModule('box:backups');
export {
get,
list,
listByContentForUpdates,
add,
addDefault,
del,
setConfig,
setLimits,
setSchedule,
setRetention,
setEncryption,
setEnabledForUpdates,
setName,
setContents,
removePrivateFields,
startBackupTask,
startCleanupTask,
getSnapshotInfo,
setSnapshotInfo,
hasContent,
remount,
getStatus,
ensureMounted,
storageApi,
createPseudo,
reinitAll
};
// format: rsync or tgz
// provider: used to determine the api provider
@@ -588,3 +550,42 @@ async function reinitAll() {
safe(remount(site), { debug }); // background
}
}
export default {
get,
list,
listByContentForUpdates,
add,
addDefault,
del,
setConfig,
setLimits,
setSchedule,
setRetention,
setEncryption,
setEnabledForUpdates,
setName,
setContents,
removePrivateFields,
startBackupTask,
startCleanupTask,
getSnapshotInfo,
setSnapshotInfo,
hasContent,
remount,
getStatus,
ensureMounted,
storageApi,
createPseudo,
reinitAll
};