diff --git a/src/Frost.ts b/src/Frost.ts index 19413ccb2..f41e407de 100644 --- a/src/Frost.ts +++ b/src/Frost.ts @@ -1,6 +1,6 @@ import { getVerifiableClaimSigner } from '@po.et/poet-js' import { MongoClient } from 'mongodb' -import * as Pino from 'pino' +import Pino from 'pino' import { RestServer } from './api/RestServer' import { Router } from './api/Router' diff --git a/src/api/RestServer.ts b/src/api/RestServer.ts index 5ab2be082..01e650952 100644 --- a/src/api/RestServer.ts +++ b/src/api/RestServer.ts @@ -1,8 +1,8 @@ -import * as Koa from 'koa' -import * as bodyParser from 'koa-bodyparser' -import * as helmet from 'koa-helmet' -import * as KoaRouter from 'koa-router' -import * as cors from 'koa2-cors' +import Koa from 'koa' +import bodyParser from 'koa-bodyparser' +import helmet from 'koa-helmet' +import KoaRouter from 'koa-router' +import cors from 'koa2-cors' import { securityHeaders } from '../securityHeaders' import { createModuleLogger, LoggingConfiguration } from '../utils/Logging/Logging' diff --git a/src/api/Router.ts b/src/api/Router.ts index cfb5ad227..e1daea591 100644 --- a/src/api/Router.ts +++ b/src/api/Router.ts @@ -1,4 +1,4 @@ -import * as KoaRouter from 'koa-router' +import KoaRouter from 'koa-router' import { AccountController } from '../controllers/AccountController' import { ArchiveController } from '../controllers/ArchiveController' diff --git a/src/controllers/AccountController.ts b/src/controllers/AccountController.ts index 6bda94a0b..01d8e9bfd 100644 --- a/src/controllers/AccountController.ts +++ b/src/controllers/AccountController.ts @@ -1,6 +1,6 @@ import { createIssuerFromPrivateKey, generateED25519Base58Keys } from '@po.et/poet-js' import { sign, verify } from 'jsonwebtoken' -import * as Pino from 'pino' +import Pino from 'pino' import { Token, TokenOptions } from '../api/Tokens' import { getApiKeyByNetwork, getTokenByNetwork } from '../api/tokens/CreateToken' diff --git a/src/controllers/ArchiveController.ts b/src/controllers/ArchiveController.ts index 2d6313890..d2f3b0f8f 100644 --- a/src/controllers/ArchiveController.ts +++ b/src/controllers/ArchiveController.ts @@ -1,4 +1,4 @@ -import * as Pino from 'pino' +import Pino from 'pino' import { PoetNode } from '../daos/PoetNodeDao' import { FileTooBig, PoeAddressNotVerified, PoeBalanceInsufficient } from '../errors/errors' diff --git a/src/controllers/WorkController.ts b/src/controllers/WorkController.ts index 8656854f5..e5e127bbe 100644 --- a/src/controllers/WorkController.ts +++ b/src/controllers/WorkController.ts @@ -3,7 +3,7 @@ import { SignedVerifiableClaim, VerifiableClaimSigner, } from '@po.et/poet-js' -import * as Pino from 'pino' +import Pino from 'pino' import { pipeP } from 'ramda' import { PoetNode, WorkSearchFilters } from '../daos/PoetNodeDao' diff --git a/src/daos/PoetNodeDao.ts b/src/daos/PoetNodeDao.ts index cf2870974..97853b7aa 100644 --- a/src/daos/PoetNodeDao.ts +++ b/src/daos/PoetNodeDao.ts @@ -1,5 +1,5 @@ import { SignedVerifiableClaim } from '@po.et/poet-js' -import * as FormData from 'form-data' +import FormData from 'form-data' import fetch from 'node-fetch' import { WorkNotFound } from '../errors/errors' diff --git a/src/helpers/Erc20.ts b/src/helpers/Erc20.ts index 3af9958dc..52e9bb4d0 100644 --- a/src/helpers/Erc20.ts +++ b/src/helpers/Erc20.ts @@ -1,6 +1,6 @@ import Web3 = require('web3') -import * as Erc20Abi from './Erc20Abi.json' +import Erc20Abi from './Erc20Abi.json' interface Arguments { readonly ethereumUrl: string diff --git a/src/helpers/uuid.ts b/src/helpers/uuid.ts index e001598f0..6019ff8f9 100644 --- a/src/helpers/uuid.ts +++ b/src/helpers/uuid.ts @@ -1,4 +1,4 @@ -import * as uuidv4 from 'uuid/v4' +import uuidv4 from 'uuid/v4' export const uuid4 = () => { const id = Buffer.alloc(16) diff --git a/src/initVault.ts b/src/initVault.ts index 2220fe9be..f124ff1da 100644 --- a/src/initVault.ts +++ b/src/initVault.ts @@ -1,7 +1,7 @@ import { readFile as readFileCallback, writeFileSync, mkdirSync } from 'fs' import { homedir } from 'os' import * as path from 'path' -import * as Pino from 'pino' +import Pino from 'pino' import { promisify } from 'util' import { Configuration } from './configuration' diff --git a/src/middlewares/logger.ts b/src/middlewares/logger.ts index 44d8fa930..57d3e4b8e 100644 --- a/src/middlewares/logger.ts +++ b/src/middlewares/logger.ts @@ -1,4 +1,4 @@ -import * as Pino from 'pino' +import Pino from 'pino' export const logger = (logger: (dirname: string) => Pino.Logger) => async ( context: any, diff --git a/src/middlewares/monitor.ts b/src/middlewares/monitor.ts index d6bf953cc..ab9fd35a7 100644 --- a/src/middlewares/monitor.ts +++ b/src/middlewares/monitor.ts @@ -1,4 +1,4 @@ -import * as Koa from 'koa' +import Koa from 'koa' const { map, lensPath, ifElse, compose, view, set, identity } = require('ramda') export const omitSecretsInUrl = (secrets: ReadonlyArray = [], url: string = '') => { diff --git a/src/utils/Logging/Logging.test.ts b/src/utils/Logging/Logging.test.ts index 689a465bc..10a13ff44 100644 --- a/src/utils/Logging/Logging.test.ts +++ b/src/utils/Logging/Logging.test.ts @@ -1,5 +1,5 @@ import { EventEmitter } from 'events' -import * as Pino from 'pino' +import Pino from 'pino' import { describe } from 'riteway' import { spy } from 'sinon' import { diff --git a/src/utils/Logging/Logging.ts b/src/utils/Logging/Logging.ts index 78fcc93f8..13faa5f3a 100644 --- a/src/utils/Logging/Logging.ts +++ b/src/utils/Logging/Logging.ts @@ -1,5 +1,5 @@ import { basename } from 'path' -import * as Pino from 'pino' +import Pino from 'pino' export interface LoggingConfiguration { readonly loggingLevel: string diff --git a/src/utils/Vault/Vault.ts b/src/utils/Vault/Vault.ts index 43bf57b63..08efb914c 100644 --- a/src/utils/Vault/Vault.ts +++ b/src/utils/Vault/Vault.ts @@ -1,4 +1,4 @@ -import * as VaultLib from 'node-vault' +import VaultLib from 'node-vault' import { Options } from './Options' export namespace Vault { diff --git a/tsconfig.json b/tsconfig.json index deec7114b..6ecee589c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,7 @@ "sourceMap": true, "outDir": "./dist", "baseUrl": "./src", + "esModuleInterop": true, "paths": { "test/*" : ["../test/*"], "expect": ["../test/utils/expect"]