flex-combo
Advanced tools
Comparing version 0.8.3 to 0.8.4
18
api.js
@@ -69,2 +69,4 @@ var urlLib = require("url"); | ||
} | ||
this.param.traceRule = new RegExp(this.param.traceRule, 'i'); | ||
}; | ||
@@ -241,3 +243,3 @@ FlexCombo.prototype = { | ||
self.result[_url] = self.convert(result, _url); | ||
if ((_url + (realPath || absPath)).match(Helper.RegExp(self.param.traceRule))) { | ||
if (("Engine " + _url + (realPath || absPath)).match(self.param.traceRule)) { | ||
Helper.Log.engine(_url, realPath || absPath); | ||
@@ -264,3 +266,3 @@ } | ||
this.result[_url] = buff; | ||
if ((_url + absPath).match(Helper.RegExp(this.param.traceRule))) { | ||
if (("Local " + _url + absPath).match(this.param.traceRule)) { | ||
Helper.Log.local(_url, absPath); | ||
@@ -277,3 +279,3 @@ } | ||
this.result[_url] = fsLib.readFileSync(absPath); | ||
if ((_url + absPath).match(Helper.RegExp(this.param.traceRule))) { | ||
if (("Cache " + _url + absPath).match(this.param.traceRule)) { | ||
Helper.Log.cache(_url, absPath); | ||
@@ -295,3 +297,3 @@ } | ||
.on("error", function () { | ||
self.result[_url] = new Buffer("/* " + _url + " Proxy ERROR! */"); | ||
self.result[_url] = new Buffer("/* " + _url + " Fetch ERROR! */"); | ||
Helper.Log.error(_url); | ||
@@ -307,3 +309,3 @@ next(); | ||
self.result[_url] = buff; | ||
if (_url.match(Helper.RegExp(self.param.traceRule))) { | ||
if (("Remote " + _url).match(self.param.traceRule)) { | ||
Helper.Log.remote(_url, requestOption); | ||
@@ -315,3 +317,3 @@ } | ||
.on("error", function () { | ||
self.result[_url] = new Buffer("/* " + _url + " Req ERROR! */"); | ||
self.result[_url] = new Buffer("/* " + _url + " Request ERROR! */"); | ||
Helper.Log.error(_url); | ||
@@ -346,3 +348,3 @@ next(); | ||
if ((this.HOST + files.join(' ')).match(Helper.RegExp(this.param.traceRule))) { | ||
if (("Request " + this.HOST + files.join(' ')).match(this.param.traceRule)) { | ||
Helper.Log.request(this.HOST, files); | ||
@@ -383,3 +385,3 @@ } | ||
var resurl = self.HOST + req.url; | ||
if (resurl.match(Helper.RegExp(self.param.traceRule))) { | ||
if (("Response " + resurl).match(self.param.traceRule)) { | ||
Helper.Log.response(resurl); | ||
@@ -386,0 +388,0 @@ } |
@@ -28,3 +28,3 @@ var fsLib = require("fs"); | ||
_url = _url.replace(regx, filter[fk]); | ||
if ((ori_url + _url).match(exports.RegExp(traceRule))) { | ||
if (("Filter " + ori_url + _url).match(traceRule)) { | ||
utilLib.logue("%s %s " + ori_url + " => %s", "[Filter]", regx, _url); | ||
@@ -72,9 +72,2 @@ } | ||
exports.RegExp = function (str) { | ||
str = str.toString(); | ||
return new RegExp(str.replace(/[\*\.\?\+\$\^\[\]\(\)\{\}\|\\\/]/g, function (all) { | ||
return "\\" + all; | ||
})); | ||
}; | ||
exports.merge = utilLib.merge; | ||
@@ -81,0 +74,0 @@ exports.MD5 = utilLib.MD5; |
{ | ||
"name": "flex-combo", | ||
"version": "0.8.3", | ||
"version": "0.8.4", | ||
"description": "A combo tool designed for web front-end developer, which support various kinds of combo format by modify configuration(eg. yahoo combo).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
48363
701