warp-proxy
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -6,3 +6,3 @@ #!/usr/bin/env node | ||
const {startMessage} = require('./utils'); | ||
const {startMessage, updateSilent} = require('./utils'); | ||
const web = require('./proxy-web'); | ||
@@ -78,4 +78,5 @@ const files = require('./proxy-files'); | ||
const configPath = path.resolve(process.cwd(), argv.config); | ||
const {mode, port, target, directory, ...config} = require(configPath); | ||
const {mode, port, target, directory, silent, ...config} = require(configPath); | ||
updateSilent(silent); | ||
if (mode === 'web') { | ||
@@ -82,0 +83,0 @@ startMessage(port, target); |
const chalk = require('chalk'); | ||
const log = console.log; | ||
let silent = false; | ||
const updateSilent = s => silent = s; | ||
const log = t => !silent && console.log(t); | ||
const paintStatus = status => { | ||
@@ -39,3 +42,4 @@ switch (true) { | ||
withTimer, | ||
immediately | ||
immediately, | ||
updateSilent | ||
}; |
{ | ||
"name": "warp-proxy", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "Proxy requests or return mocks from local files instead", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -58,2 +58,3 @@ <h1 align="center"> | ||
port: 1234, | ||
silent: false, | ||
@@ -60,0 +61,0 @@ // Proxying external servers |
105992
209
122