mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 05:37:53 +00:00
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:
parent
6c1f36dd75
commit
3a130f4f9c
@ -3,9 +3,9 @@ import { Transaction } from 'knex';
|
||||
import * as _ from 'lodash';
|
||||
import { URL } from 'url';
|
||||
|
||||
import Config = require('../config');
|
||||
import supervisorVersion = require('../lib/supervisor-version');
|
||||
|
||||
import Config from '.';
|
||||
import * as constants from '../lib/constants';
|
||||
import * as osRelease from '../lib/os-release';
|
||||
import { ConfigValue } from '../lib/types';
|
||||
|
@ -17,7 +17,7 @@ interface ConfigOpts {
|
||||
configPath: string;
|
||||
}
|
||||
|
||||
class Config extends EventEmitter {
|
||||
export class Config extends EventEmitter {
|
||||
private db: DB;
|
||||
private configJsonBackend: ConfigJsonConfigBackend;
|
||||
private providerFunctions: ConfigProviderFunctions;
|
||||
@ -299,4 +299,4 @@ class Config extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
export = Config;
|
||||
export default Config;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import Config = require('./config');
|
||||
import Config from './config';
|
||||
import Database, { Transaction } from './db';
|
||||
import Logger from './logger';
|
||||
|
||||
|
@ -5,7 +5,7 @@ import * as mkdirCb from 'mkdirp';
|
||||
import { fs } from 'mz';
|
||||
import * as path from 'path';
|
||||
|
||||
import Config = require('./config');
|
||||
import Config from './config';
|
||||
import * as constants from './lib/constants';
|
||||
import { ENOENT } from './lib/errors';
|
||||
import { writeFileAtomic } from './lib/fs-utils';
|
||||
|
@ -2,7 +2,7 @@ import * as Bluebird from 'bluebird';
|
||||
import * as Docker from 'dockerode';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import Config = require('./config');
|
||||
import Config from './config';
|
||||
import Database from './db';
|
||||
import { checkTruthy } from './lib/validation';
|
||||
import { Logger } from './logger';
|
||||
|
@ -2,7 +2,7 @@ EventEmitter = require 'events'
|
||||
|
||||
{ EventTracker } = require './event-tracker'
|
||||
{ DB } = require './db'
|
||||
Config = require './config'
|
||||
{ Config } = require './config'
|
||||
APIBinder = require './api-binder'
|
||||
DeviceState = require './device-state'
|
||||
SupervisorAPI = require './supervisor-api'
|
||||
|
@ -6,7 +6,7 @@ fs = Promise.promisifyAll(require('fs'))
|
||||
m.chai.use(require('chai-events'))
|
||||
|
||||
{ DB } = require('../src/db')
|
||||
Config = require('../src/config')
|
||||
{ Config } = require('../src/config')
|
||||
constants = require('../src/lib/constants')
|
||||
|
||||
describe 'Config', ->
|
||||
|
@ -8,7 +8,7 @@ m.chai.use(require('chai-events'))
|
||||
prepare = require './lib/prepare'
|
||||
DeviceState = require '../src/device-state'
|
||||
{ DB } = require('../src/db')
|
||||
Config = require('../src/config')
|
||||
{ Config } = require('../src/config')
|
||||
{ RPiConfigBackend } = require('../src/config/backend')
|
||||
|
||||
{ Service } = require '../src/compose/service'
|
||||
|
@ -8,7 +8,7 @@ m = require 'mochainon'
|
||||
{ stub, spy } = m.sinon
|
||||
|
||||
{ DB } = require('../src/db')
|
||||
Config = require('../src/config')
|
||||
{ Config } = require('../src/config')
|
||||
DeviceState = require('../src/device-state')
|
||||
APIBinder = require('../src/api-binder')
|
||||
|
||||
|
@ -9,7 +9,7 @@ m.chai.use(require('chai-events'))
|
||||
prepare = require './lib/prepare'
|
||||
DeviceState = require '../src/device-state'
|
||||
{ DB } = require('../src/db')
|
||||
Config = require('../src/config')
|
||||
{ Config } = require('../src/config')
|
||||
{ Service } = require '../src/compose/service'
|
||||
|
||||
appDBFormatNormalised = {
|
||||
|
Loading…
Reference in New Issue
Block a user