Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flex-combo

Package Overview
Dependencies
Maintainers
4
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flex-combo - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

48

api.js

@@ -10,8 +10,5 @@ var urlLib = require("url");

var DAC = require("dac");
var fetch = require("fetch-agent");
var isUtf8 = DAC.isUtf8;
var iconv = DAC.iconv;
var ALProtocol = {
"http:": require("http"),
"https:": require("https")
};

@@ -26,3 +23,3 @@ var ENGINES = [];

this.res = null;
this.engines = ENGINES.map(function(i) {
this.engines = ENGINES.map(function (i) {
return i;

@@ -101,3 +98,3 @@ });

this.query = merge.recursive(true, this.query, req.query || {});
this.query = merge.recursive(true, this.query, (req.body || req.query || {}));

@@ -288,30 +285,17 @@ this.HOST = (req.protocol || "http") + "://" + (req.hostname || req.host || req.headers.host);

if (requestOption) {
ALProtocol[requestOption.protocol]
.request(requestOption, function (nsres) {
var buffer = [];
nsres
.on("error", function () {
self.result[_url] = new Buffer("/* " + _url + " Fetch ERROR! */");
Helper.Log.error(_url);
next();
})
.on("data", function (chunk) {
buffer.push(chunk);
})
.on("end", function () {
var buff = Buffer.concat(buffer);
self.cacheFile(_url, buff);
self.result[_url] = buff;
if (self.param.traceRule && self.param.traceRule.test("Remote " + _url)) {
Helper.Log.remote(_url, requestOption);
}
next();
});
})
.on("error", function () {
self.result[_url] = new Buffer("/* " + _url + " Request ERROR! */");
fetch.request(requestOption, function (e, buff) {
if (e) {
self.result[_url] = new Buffer("/* " + _url + " " + e.code + "! */");
Helper.Log.error(_url);
next();
})
.end();
}
else {
self.cacheFile(_url, buff);
self.result[_url] = buff;
if (self.param.traceRule && self.param.traceRule.test("Remote " + _url)) {
Helper.Log.remote(_url, requestOption);
}
next();
}
});
}

@@ -318,0 +302,0 @@ else {

{
"name": "flex-combo",
"version": "0.11.0",
"version": "0.11.1",
"description": "A combo tool designed for web front-end developer, which support various kinds of combo format by modify configuration(eg. yahoo combo).",

@@ -14,2 +14,3 @@ "main": "index.js",

"dac": "~0.5.1",
"fetch-agent": "~0.2.1",
"mace": "~2.0.0",

@@ -16,0 +17,0 @@ "merge": "~1.2.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc