mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 20:30:04 +02:00
use terser and clean-css directly
create a sourcemap as well by default
This commit is contained in:
24
node_modules/request/request.js
generated
vendored
24
node_modules/request/request.js
generated
vendored
@@ -828,8 +828,7 @@ Request.prototype.start = function () {
|
||||
if (isConnecting) {
|
||||
var onReqSockConnect = function () {
|
||||
socket.removeListener('connect', onReqSockConnect)
|
||||
clearTimeout(self.timeoutTimer)
|
||||
self.timeoutTimer = null
|
||||
self.clearTimeout()
|
||||
setReqTimeout()
|
||||
}
|
||||
|
||||
@@ -874,10 +873,7 @@ Request.prototype.onRequestError = function (error) {
|
||||
self.req.end()
|
||||
return
|
||||
}
|
||||
if (self.timeout && self.timeoutTimer) {
|
||||
clearTimeout(self.timeoutTimer)
|
||||
self.timeoutTimer = null
|
||||
}
|
||||
self.clearTimeout()
|
||||
self.emit('error', error)
|
||||
}
|
||||
|
||||
@@ -964,10 +960,7 @@ Request.prototype.onRequestResponse = function (response) {
|
||||
if (self.setHost) {
|
||||
self.removeHeader('host')
|
||||
}
|
||||
if (self.timeout && self.timeoutTimer) {
|
||||
clearTimeout(self.timeoutTimer)
|
||||
self.timeoutTimer = null
|
||||
}
|
||||
self.clearTimeout()
|
||||
|
||||
var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar
|
||||
var addCookie = function (cookie) {
|
||||
@@ -1172,6 +1165,7 @@ Request.prototype.abort = function () {
|
||||
self.response.destroy()
|
||||
}
|
||||
|
||||
self.clearTimeout()
|
||||
self.emit('abort')
|
||||
}
|
||||
|
||||
@@ -1448,7 +1442,7 @@ Request.prototype.jar = function (jar) {
|
||||
cookies = false
|
||||
self._disableCookies = true
|
||||
} else {
|
||||
var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar
|
||||
var targetCookieJar = jar.getCookieString ? jar : globalCookieJar
|
||||
var urihref = self.uri.href
|
||||
// fetch cookie in the Specified host
|
||||
if (targetCookieJar) {
|
||||
@@ -1532,6 +1526,7 @@ Request.prototype.resume = function () {
|
||||
}
|
||||
Request.prototype.destroy = function () {
|
||||
var self = this
|
||||
this.clearTimeout()
|
||||
if (!self._ended) {
|
||||
self.end()
|
||||
} else if (self.response) {
|
||||
@@ -1539,6 +1534,13 @@ Request.prototype.destroy = function () {
|
||||
}
|
||||
}
|
||||
|
||||
Request.prototype.clearTimeout = function () {
|
||||
if (this.timeoutTimer) {
|
||||
clearTimeout(this.timeoutTimer)
|
||||
this.timeoutTimer = null
|
||||
}
|
||||
}
|
||||
|
||||
Request.defaultProxyHeaderWhiteList =
|
||||
Tunnel.defaultProxyHeaderWhiteList.slice()
|
||||
|
||||
|
Reference in New Issue
Block a user