Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "okoze", | ||
"description": "Okoze is stub server that returns a response using a snapshot of the real server's response.", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"repository": "https://github.com/mya-ake/okoze.git", | ||
@@ -29,2 +29,3 @@ "bugs": { | ||
"consola": "^2.5.7", | ||
"cors": "^2.8.5", | ||
"express": "^4.16.4", | ||
@@ -36,2 +37,3 @@ "lodash.mergewith": "^4.6.1", | ||
"devDependencies": { | ||
"@types/cors": "^2.8.4", | ||
"@types/express": "^4.16.1", | ||
@@ -38,0 +40,0 @@ "@types/faker": "^4.1.5", |
@@ -9,2 +9,3 @@ "use strict"; | ||
const consola_1 = __importDefault(require("consola")); | ||
const cors_1 = __importDefault(require("cors")); | ||
const processor_1 = require("./processor"); | ||
@@ -17,2 +18,3 @@ const loggerMiddleWare_1 = require("./../middlewares/loggerMiddleWare"); | ||
app.use(bodyParser.json()); | ||
app.use(cors_1.default()); | ||
if (process.env.OKOZE_DEBUG === 'true') { | ||
@@ -19,0 +21,0 @@ app.use(loggerMiddleWare_1.buildLoggerMiddleware({ baseURL })); |
@@ -7,8 +7,9 @@ "use strict"; | ||
const consola_1 = __importDefault(require("consola")); | ||
const path_1 = require("path"); | ||
exports.buildLoggerMiddleware = ({ baseURL }) => { | ||
return (req, res, next) => { | ||
const { method, url } = req; | ||
consola_1.default.info(`${method} ${baseURL}${url}`); | ||
consola_1.default.debug(`${method} ${path_1.join(baseURL, url)}`); | ||
next(); | ||
}; | ||
}; |
{ | ||
"name": "okoze", | ||
"description": "Okoze is stub server that returns a response using a snapshot of the real server's response.", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"repository": "https://github.com/mya-ake/okoze.git", | ||
@@ -29,2 +29,3 @@ "bugs": { | ||
"consola": "^2.5.7", | ||
"cors": "^2.8.5", | ||
"express": "^4.16.4", | ||
@@ -36,2 +37,3 @@ "lodash.mergewith": "^4.6.1", | ||
"devDependencies": { | ||
"@types/cors": "^2.8.4", | ||
"@types/express": "^4.16.1", | ||
@@ -38,0 +40,0 @@ "@types/faker": "^4.1.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17605
358
8
19
+ Addedcors@^2.8.5
+ Addedcors@2.8.5(transitive)
+ Addedobject-assign@4.1.1(transitive)