refactor: adjust code after updated dependencies

Closes #39
This commit is contained in:
Jovan Krunić
2019-06-05 13:58:26 +02:00
committed by Rainer Killinger
parent 42c7350c36
commit 8b457c9911
24 changed files with 574 additions and 343 deletions

View File

@@ -15,16 +15,25 @@
*/
import {SCConfigFile} from '@openstapps/core';
import {Validator} from '@openstapps/core-tools/lib/validate';
import {Logger} from '@openstapps/logger';
import * as config from 'config';
import {BackendTransport} from './notification/BackendTransport';
import {BackendTransport} from './notification/backend-transport';
/**
* Instance of the transport for sending mails
*/
export const mailer = BackendTransport.getTransportInstance();
export const logger = new Logger(mailer);
/**
* Config file content
*/
export const configFile: SCConfigFile = config.util.toObject();
/**
* A validator instance to check if something is a valid JSON object (e.g. a request or a thing)
*/
export const validator = new Validator();
/**
* Provides information if the backend is executed in the "test" (non-production) environment
*/
export const isTestEnvironment = process.env.NODE_ENV !== 'production';