1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-05 04:50:12 +02:00

update node modules

This commit is contained in:
s2
2021-05-07 15:56:33 +02:00
parent d81e8e9fb8
commit 3ec373077c
550 changed files with 84712 additions and 15991 deletions

View File

@@ -1,4 +1,4 @@
/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -961,9 +961,9 @@ function _recomposeAuthority(components, options) {
return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
}));
}
if (typeof components.port === "number") {
if (typeof components.port === "number" || typeof components.port === "string") {
uriTokens.push(":");
uriTokens.push(components.port.toString(10));
uriTokens.push(String(components.port));
}
return uriTokens.length ? uriTokens.join("") : undefined;
}
@@ -1166,8 +1166,9 @@ var handler = {
return components;
},
serialize: function serialize(components, options) {
var secure = String(components.scheme).toLowerCase() === "https";
//normalize the default port
if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") {
if (components.port === (secure ? 443 : 80) || components.port === "") {
components.port = undefined;
}
//normalize the empty path
@@ -1188,6 +1189,57 @@ var handler$1 = {
serialize: handler.serialize
};
function isSecure(wsComponents) {
return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
}
//RFC 6455
var handler$2 = {
scheme: "ws",
domainHost: true,
parse: function parse(components, options) {
var wsComponents = components;
//indicate if the secure flag is set
wsComponents.secure = isSecure(wsComponents);
//construct resouce name
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');
wsComponents.path = undefined;
wsComponents.query = undefined;
return wsComponents;
},
serialize: function serialize(wsComponents, options) {
//normalize the default port
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
wsComponents.port = undefined;
}
//ensure scheme matches secure flag
if (typeof wsComponents.secure === 'boolean') {
wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws';
wsComponents.secure = undefined;
}
//reconstruct path from resource name
if (wsComponents.resourceName) {
var _wsComponents$resourc = wsComponents.resourceName.split('?'),
_wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2),
path = _wsComponents$resourc2[0],
query = _wsComponents$resourc2[1];
wsComponents.path = path && path !== '/' ? path : undefined;
wsComponents.query = query;
wsComponents.resourceName = undefined;
}
//forbid fragment component
wsComponents.fragment = undefined;
return wsComponents;
}
};
var handler$3 = {
scheme: "wss",
domainHost: handler$2.domainHost,
parse: handler$2.parse,
serialize: handler$2.serialize
};
var O = {};
var isIRI = true;
//RFC 3986
@@ -1218,7 +1270,7 @@ function decodeUnreserved(str) {
var decStr = pctDecChars(str);
return !decStr.match(UNRESERVED) ? str : decStr;
}
var handler$2 = {
var handler$4 = {
scheme: "mailto",
parse: function parse$$1(components, options) {
var mailtoComponents = components;
@@ -1306,7 +1358,7 @@ var handler$2 = {
var URN_PARSE = /^([^\:]+)\:(.*)/;
//RFC 2141
var handler$3 = {
var handler$5 = {
scheme: "urn",
parse: function parse$$1(components, options) {
var matches = components.path && components.path.match(URN_PARSE);
@@ -1345,7 +1397,7 @@ var handler$3 = {
var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
//RFC 4122
var handler$4 = {
var handler$6 = {
scheme: "urn:uuid",
parse: function parse(urnComponents, options) {
var uuidComponents = urnComponents;
@@ -1369,6 +1421,8 @@ SCHEMES[handler$1.scheme] = handler$1;
SCHEMES[handler$2.scheme] = handler$2;
SCHEMES[handler$3.scheme] = handler$3;
SCHEMES[handler$4.scheme] = handler$4;
SCHEMES[handler$5.scheme] = handler$5;
SCHEMES[handler$6.scheme] = handler$6;
exports.SCHEMES = SCHEMES;
exports.pctEncChar = pctEncChar;