whistle 2.9.14 → 2.9.15-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/config.js CHANGED
@@ -587,7 +587,10 @@ function getPluginList(list) {
587
587
  exports.extend = function (newConf) {
588
588
  config.pluginHostMap = {};
589
589
  config.uiport = config.port;
590
-
590
+ if (process.env.WHISTLE_MODE) {
591
+ newConf = newConf || {};
592
+ newConf.mode = process.env.WHISTLE_MODE + '|' + (newConf.mode || '');
593
+ }
591
594
  if (newConf) {
592
595
  config.uiMiddleware = newConf.uiMiddlewares || newConf.uiMiddleware;
593
596
  if (newConf.cmdName && CMD_RE.test(newConf.cmdName)) {
@@ -829,20 +832,14 @@ exports.extend = function (newConf) {
829
832
  process.env.PFORK_EXEC_PATH = process.execPath;
830
833
  } else if (m === 'safe' || m === 'rejectUnauthorized') {
831
834
  config.rejectUnauthorized = true;
832
- } else if (
833
- ['capture', 'intercept', 'enable-capture', 'enableCapture'].indexOf(
834
- m
835
- ) !== -1
836
- ) {
835
+ } else if (['capture', 'intercept', 'enable-capture', 'enableCapture'].indexOf(m) !== -1) {
837
836
  config.isEnableCapture = true;
838
837
  } else if (['disable-capture', 'disableCapture'].indexOf(m) !== -1) {
839
838
  config.isEnableCapture = false;
840
839
  } else if (['http2', 'enable-http2', 'enableHttp2', 'enable-h2', 'enableH2'].indexOf(m) !== -1) {
841
840
  config.isEnableHttp2 = true;
842
841
  } else if (
843
- ['disable-http2', 'disableHttp2', 'disable-h2', 'disableH2'].indexOf(
844
- m
845
- ) !== -1
842
+ ['disable-http2', 'disableHttp2', 'disable-h2', 'disableH2'].indexOf(m) !== -1
846
843
  ) {
847
844
  config.isEnableHttp2 = false;
848
845
  } else if (m === 'hideLeftBar' || m === 'hideLeftMenu') {
@@ -8,7 +8,7 @@ function isUtf8(buf, i) {
8
8
  byte == 0x09 ||
9
9
  byte == 0x0a ||
10
10
  byte == 0x0d ||
11
- (0x20 <= byte && byte <= 0x7e)
11
+ (0x20 <= byte && byte <= 0x7f)
12
12
  ) {
13
13
  continue;
14
14
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "whistle",
3
3
  "description": "HTTP, HTTP2, HTTPS, Websocket debugging proxy",
4
- "version": "2.9.14",
4
+ "version": "2.9.15-beta",
5
5
  "dataDirname": ".whistle",
6
6
  "localUIHost": "local.whistlejs.com",
7
7
  "port": 8899,