migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
@@ -1,44 +1,21 @@
|
||||
import assert from 'node:assert';
|
||||
import BoxError from './boxerror.js';
|
||||
import constants from './constants.js';
|
||||
import * as cron from './cron.js';
|
||||
import cron from './cron.js';
|
||||
import fs from 'node:fs';
|
||||
import * as ipaddr from './ipaddr.js';
|
||||
import ipaddr from './ipaddr.js';
|
||||
import path from 'node:path';
|
||||
import paths from './paths.js';
|
||||
import safe from 'safetydance';
|
||||
import * as settings from './settings.js';
|
||||
import settings from './settings.js';
|
||||
import shellModule from './shell.js';
|
||||
import * as noopProvider from './network/noop.js';
|
||||
import * as fixedProvider from './network/fixed.js';
|
||||
import * as networkInterfaceProvider from './network/network-interface.js';
|
||||
import * as genericProvider from './network/generic.js';
|
||||
import noopProvider from './network/noop.js';
|
||||
import fixedProvider from './network/fixed.js';
|
||||
import networkInterfaceProvider from './network/network-interface.js';
|
||||
import genericProvider from './network/generic.js';
|
||||
|
||||
const shell = shellModule('network');
|
||||
|
||||
export {
|
||||
testIPv4Config,
|
||||
testIPv6Config,
|
||||
|
||||
getBlocklist,
|
||||
setBlocklist,
|
||||
|
||||
getDynamicDns,
|
||||
setDynamicDns,
|
||||
|
||||
getIPv4Config,
|
||||
setIPv4Config,
|
||||
|
||||
getIPv6Config,
|
||||
setIPv6Config,
|
||||
|
||||
getIPv4,
|
||||
hasIPv6,
|
||||
getIPv6,
|
||||
detectIP,
|
||||
|
||||
getDefaultInterface
|
||||
};
|
||||
|
||||
const SET_BLOCKLIST_CMD = path.join(import.meta.dirname, 'scripts/setblocklist.sh');
|
||||
|
||||
@@ -207,3 +184,27 @@ async function getDefaultInterface() {
|
||||
|
||||
throw new BoxError(BoxError.EXTERNAL_ERROR, 'Could not detect default interface');
|
||||
}
|
||||
|
||||
export default {
|
||||
testIPv4Config,
|
||||
testIPv6Config,
|
||||
|
||||
getBlocklist,
|
||||
setBlocklist,
|
||||
|
||||
getDynamicDns,
|
||||
setDynamicDns,
|
||||
|
||||
getIPv4Config,
|
||||
setIPv4Config,
|
||||
|
||||
getIPv6Config,
|
||||
setIPv6Config,
|
||||
|
||||
getIPv4,
|
||||
hasIPv6,
|
||||
getIPv6,
|
||||
detectIP,
|
||||
|
||||
getDefaultInterface
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user