migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
+26
-25
@@ -1,51 +1,34 @@
|
||||
import apps from './apps.js';
|
||||
import * as appstore from './appstore.js';
|
||||
import appstore from './appstore.js';
|
||||
import assert from 'node:assert';
|
||||
import AuditSource from './auditsource.js';
|
||||
import BoxError from './boxerror.js';
|
||||
import * as backupSites from './backupsites.js';
|
||||
import * as backuptask from './backuptask.js';
|
||||
import * as community from './community.js';
|
||||
import backupSites from './backupsites.js';
|
||||
import backuptask from './backuptask.js';
|
||||
import community from './community.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 debugModule from 'debug';
|
||||
import * as df from './df.js';
|
||||
import df from './df.js';
|
||||
import eventlog from './eventlog.js';
|
||||
import fs from 'node:fs';
|
||||
import locks from './locks.js';
|
||||
import * as notifications from './notifications.js';
|
||||
import notifications from './notifications.js';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import paths from './paths.js';
|
||||
import promiseRetry from './promise-retry.js';
|
||||
import safe from 'safetydance';
|
||||
import semver from 'semver';
|
||||
import * as settings from './settings.js';
|
||||
import settings from './settings.js';
|
||||
import shellModule from './shell.js';
|
||||
import tasks from './tasks.js';
|
||||
|
||||
const debug = debugModule('box:updater');
|
||||
const shell = shellModule('updater');
|
||||
|
||||
export {
|
||||
setAutoupdatePattern,
|
||||
getAutoupdatePattern,
|
||||
|
||||
startBoxUpdateTask,
|
||||
updateBox,
|
||||
|
||||
autoUpdate,
|
||||
|
||||
notifyBoxUpdate,
|
||||
|
||||
checkForUpdates,
|
||||
checkAppUpdate,
|
||||
checkBoxUpdate,
|
||||
|
||||
getBoxUpdate,
|
||||
};
|
||||
|
||||
const RELEASES_PUBLIC_KEY = path.join(import.meta.dirname, 'releases.gpg');
|
||||
const UPDATE_CMD = path.join(import.meta.dirname, 'scripts/update.sh');
|
||||
@@ -380,3 +363,21 @@ async function checkForUpdates(options) {
|
||||
// raise notifications here because the updatechecker runs regardless of auto-updater cron job
|
||||
await raiseNotifications();
|
||||
}
|
||||
|
||||
export default {
|
||||
setAutoupdatePattern,
|
||||
getAutoupdatePattern,
|
||||
|
||||
startBoxUpdateTask,
|
||||
updateBox,
|
||||
|
||||
autoUpdate,
|
||||
|
||||
notifyBoxUpdate,
|
||||
|
||||
checkForUpdates,
|
||||
checkAppUpdate,
|
||||
checkBoxUpdate,
|
||||
|
||||
getBoxUpdate,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user