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