refactor: Change config modules export type to new-style

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2018-12-24 10:45:03 +00:00
parent 6c1f36dd75
commit 3a130f4f9c
No known key found for this signature in database
GPG Key ID: 49690ED87032539F
10 changed files with 11 additions and 11 deletions

View File

@ -3,9 +3,9 @@ import { Transaction } from 'knex';
import * as _ from 'lodash'; import * as _ from 'lodash';
import { URL } from 'url'; import { URL } from 'url';
import Config = require('../config');
import supervisorVersion = require('../lib/supervisor-version'); import supervisorVersion = require('../lib/supervisor-version');
import Config from '.';
import * as constants from '../lib/constants'; import * as constants from '../lib/constants';
import * as osRelease from '../lib/os-release'; import * as osRelease from '../lib/os-release';
import { ConfigValue } from '../lib/types'; import { ConfigValue } from '../lib/types';

View File

@ -17,7 +17,7 @@ interface ConfigOpts {
configPath: string; configPath: string;
} }
class Config extends EventEmitter { export class Config extends EventEmitter {
private db: DB; private db: DB;
private configJsonBackend: ConfigJsonConfigBackend; private configJsonBackend: ConfigJsonConfigBackend;
private providerFunctions: ConfigProviderFunctions; private providerFunctions: ConfigProviderFunctions;
@ -299,4 +299,4 @@ class Config extends EventEmitter {
} }
} }
export = Config; export default Config;

View File

@ -1,6 +1,6 @@
import * as _ from 'lodash'; import * as _ from 'lodash';
import Config = require('./config'); import Config from './config';
import Database, { Transaction } from './db'; import Database, { Transaction } from './db';
import Logger from './logger'; import Logger from './logger';

View File

@ -5,7 +5,7 @@ import * as mkdirCb from 'mkdirp';
import { fs } from 'mz'; import { fs } from 'mz';
import * as path from 'path'; import * as path from 'path';
import Config = require('./config'); import Config from './config';
import * as constants from './lib/constants'; import * as constants from './lib/constants';
import { ENOENT } from './lib/errors'; import { ENOENT } from './lib/errors';
import { writeFileAtomic } from './lib/fs-utils'; import { writeFileAtomic } from './lib/fs-utils';

View File

@ -2,7 +2,7 @@ import * as Bluebird from 'bluebird';
import * as Docker from 'dockerode'; import * as Docker from 'dockerode';
import * as _ from 'lodash'; import * as _ from 'lodash';
import Config = require('./config'); import Config from './config';
import Database from './db'; import Database from './db';
import { checkTruthy } from './lib/validation'; import { checkTruthy } from './lib/validation';
import { Logger } from './logger'; import { Logger } from './logger';

View File

@ -2,7 +2,7 @@ EventEmitter = require 'events'
{ EventTracker } = require './event-tracker' { EventTracker } = require './event-tracker'
{ DB } = require './db' { DB } = require './db'
Config = require './config' { Config } = require './config'
APIBinder = require './api-binder' APIBinder = require './api-binder'
DeviceState = require './device-state' DeviceState = require './device-state'
SupervisorAPI = require './supervisor-api' SupervisorAPI = require './supervisor-api'

View File

@ -6,7 +6,7 @@ fs = Promise.promisifyAll(require('fs'))
m.chai.use(require('chai-events')) m.chai.use(require('chai-events'))
{ DB } = require('../src/db') { DB } = require('../src/db')
Config = require('../src/config') { Config } = require('../src/config')
constants = require('../src/lib/constants') constants = require('../src/lib/constants')
describe 'Config', -> describe 'Config', ->

View File

@ -8,7 +8,7 @@ m.chai.use(require('chai-events'))
prepare = require './lib/prepare' prepare = require './lib/prepare'
DeviceState = require '../src/device-state' DeviceState = require '../src/device-state'
{ DB } = require('../src/db') { DB } = require('../src/db')
Config = require('../src/config') { Config } = require('../src/config')
{ RPiConfigBackend } = require('../src/config/backend') { RPiConfigBackend } = require('../src/config/backend')
{ Service } = require '../src/compose/service' { Service } = require '../src/compose/service'

View File

@ -8,7 +8,7 @@ m = require 'mochainon'
{ stub, spy } = m.sinon { stub, spy } = m.sinon
{ DB } = require('../src/db') { DB } = require('../src/db')
Config = require('../src/config') { Config } = require('../src/config')
DeviceState = require('../src/device-state') DeviceState = require('../src/device-state')
APIBinder = require('../src/api-binder') APIBinder = require('../src/api-binder')

View File

@ -9,7 +9,7 @@ m.chai.use(require('chai-events'))
prepare = require './lib/prepare' prepare = require './lib/prepare'
DeviceState = require '../src/device-state' DeviceState = require '../src/device-state'
{ DB } = require('../src/db') { DB } = require('../src/db')
Config = require('../src/config') { Config } = require('../src/config')
{ Service } = require '../src/compose/service' { Service } = require '../src/compose/service'
appDBFormatNormalised = { appDBFormatNormalised = {