mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-22 06:57:49 +00:00
Change constants imports to remove 'require'
Signed-off-by: Christina Ying Wang <christina@balena.io>
This commit is contained in:
parent
07b8d44545
commit
9522c15ecd
@ -14,7 +14,7 @@ import {
|
||||
} from './composition-steps';
|
||||
import * as targetStateCache from '../device-state/target-state-cache';
|
||||
import * as dockerUtils from '../lib/docker-utils';
|
||||
import constants = require('../lib/constants');
|
||||
import * as constants from '../lib/constants';
|
||||
|
||||
import { getStepsFromStrategy } from './update-strategies';
|
||||
|
||||
|
@ -9,7 +9,7 @@ import LocalModeManager from '../local-mode';
|
||||
|
||||
import * as dbFormat from '../device-state/db-format';
|
||||
import { validateTargetContracts } from '../lib/contracts';
|
||||
import constants = require('../lib/constants');
|
||||
import * as constants from '../lib/constants';
|
||||
import { docker } from '../lib/docker-utils';
|
||||
import log from '../lib/supervisor-console';
|
||||
import {
|
||||
|
@ -12,7 +12,7 @@ import { docker } from '../lib/docker-utils';
|
||||
import * as logger from '../logger';
|
||||
|
||||
import { PermissiveNumber } from '../config/types';
|
||||
import constants = require('../lib/constants');
|
||||
import * as constants from '../lib/constants';
|
||||
import {
|
||||
InternalInconsistencyError,
|
||||
isNotFoundError,
|
||||
|
@ -2,7 +2,7 @@ import * as _ from 'lodash';
|
||||
import * as Path from 'path';
|
||||
import { VolumeInspectInfo } from 'dockerode';
|
||||
|
||||
import constants = require('../lib/constants');
|
||||
import * as constants from '../lib/constants';
|
||||
import { isNotFoundError, InternalInconsistencyError } from '../lib/errors';
|
||||
import { safeRename } from '../lib/fs-utils';
|
||||
import { docker } from '../lib/docker-utils';
|
||||
|
@ -2,7 +2,7 @@ import * as Docker from 'dockerode';
|
||||
import isEqual = require('lodash/isEqual');
|
||||
import omitBy = require('lodash/omitBy');
|
||||
|
||||
import constants = require('../lib/constants');
|
||||
import * as constants from '../lib/constants';
|
||||
import { docker } from '../lib/docker-utils';
|
||||
import { InternalInconsistencyError } from '../lib/errors';
|
||||
import * as LogTypes from '../lib/log-types';
|
||||
|
@ -15,7 +15,7 @@ import * as globalEventBus from './event-bus';
|
||||
import * as network from './network';
|
||||
import * as deviceConfig from './device-config';
|
||||
|
||||
import constants = require('./lib/constants');
|
||||
import * as constants from './lib/constants';
|
||||
import * as dbus from './lib/dbus';
|
||||
import {
|
||||
InternalInconsistencyError,
|
||||
|
@ -10,7 +10,7 @@ import { InternalInconsistencyError } from '../lib/errors';
|
||||
import { getGotInstance } from '../lib/request';
|
||||
import * as config from '../config';
|
||||
import { writeLock } from '../lib/update-lock';
|
||||
import constants = require('../lib/constants');
|
||||
import * as constants from '../lib/constants';
|
||||
import log from '../lib/supervisor-console';
|
||||
|
||||
export class ApiResponseError extends Error {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import blinking = require('blinking');
|
||||
|
||||
import constants = require('./constants');
|
||||
import { ledFile } from './constants';
|
||||
|
||||
export = blinking(constants.ledFile);
|
||||
export = blinking(ledFile);
|
||||
|
@ -6,7 +6,7 @@ import { expect } from 'chai';
|
||||
import { testfs, TestFs } from 'mocha-pod';
|
||||
import * as hostUtils from '~/lib/host-utils';
|
||||
|
||||
import constants = require('~/lib/constants');
|
||||
import * as constants from '~/lib/constants';
|
||||
import { fnSchema } from '~/src/config/functions';
|
||||
|
||||
// Utility method to use along with `require`
|
||||
|
@ -1,16 +1,15 @@
|
||||
import _ = require('lodash');
|
||||
import * as _ from 'lodash';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import * as config from '~/src/config';
|
||||
import * as firewall from '~/lib/firewall';
|
||||
import * as logger from '~/src/logger';
|
||||
import * as iptablesMock from '~/test-lib/mocked-iptables';
|
||||
import * as dbFormat from '~/src/device-state/db-format';
|
||||
|
||||
import constants = require('~/lib/constants');
|
||||
import * as iptables from '~/lib/iptables';
|
||||
import * as firewall from '~/lib/firewall';
|
||||
import * as constants from '~/lib/constants';
|
||||
import { RuleAction, Rule } from '~/lib/iptables';
|
||||
import { log } from '~/lib/supervisor-console';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user