diff --git a/api/restClient/fetchClient.js b/api/restClient/fetchClient.js index 9a6aeeb..c5b2d55 100644 --- a/api/restClient/fetchClient.js +++ b/api/restClient/fetchClient.js @@ -1,10 +1,4 @@ -var fetch = require('node-fetch'); -var logger = require('../../logger/logger').Logger; - -const X_EAUTH_CLIENT_HEADER = "X-Eauth-Client"; -const X_EAUTH_TOKEN_HEADER = "X-Api-Token"; -const X_EAUTH_IDENTITY_HEADER = "X-Api-Identity"; -const MAX_RETRIES = 5; +const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args)); // this function returns the base common request // configuration required to hit the api diff --git a/logger/logger.js b/logger/logger.js index 941050e..be5889c 100644 --- a/logger/logger.js +++ b/logger/logger.js @@ -6,7 +6,7 @@ var Logger = { wlogger: null, initialize: function(logPath) { // while testing, log only to file, leaving stdout free for unit test status messages - this.wlogger = new (winston.Logger)({ + this.wlogger = winston.createLogger({ transports: [ new (winston.transports.File)({ filename: path.join(logPath, 'codealike.log') }) ] diff --git a/package.json b/package.json index aaa6ac1..c048103 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codealike/codealike-core", - "version": "0.0.32", + "version": "0.0.33-SNAPSHOT", "description": "Codealike core", "main": "codealike.js", "scripts": {