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

use terser and clean-css directly

create a sourcemap as well by default
This commit is contained in:
s2
2020-02-13 15:39:37 +01:00
parent db9b32db65
commit a4b62da0ba
535 changed files with 33708 additions and 63052 deletions

6
node_modules/aws4/.travis.yml generated vendored
View File

@@ -2,4 +2,8 @@ language: node_js
node_js:
- "0.10"
- "0.12"
- "4.2"
- "4"
- "6"
- "8"
- "10"
- "12"

4
node_modules/aws4/README.md generated vendored
View File

@@ -3,10 +3,10 @@ aws4
[![Build Status](https://secure.travis-ci.org/mhart/aws4.png?branch=master)](http://travis-ci.org/mhart/aws4)
A small utility to sign vanilla node.js http(s) request options using Amazon's
A small utility to sign vanilla Node.js http(s) request options using Amazon's
[AWS Signature Version 4](http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html).
Can also be used [in the browser](./browser).
If you want to sign and send AWS requests in a modern browser, or an environment like [Cloudflare Workers](https://developers.cloudflare.com/workers/), then check out [aws4fetch](https://github.com/mhart/aws4fetch) otherwise you can also bundle this library for use [in the browser](./browser).
This signature is supported by nearly all Amazon services, including
[S3](http://docs.aws.amazon.com/AmazonS3/latest/API/),

47
node_modules/aws4/aws4.js generated vendored
View File

@@ -22,6 +22,10 @@ function encodeRfc3986(urlEncodedString) {
})
}
function encodeRfc3986Full(str) {
return encodeRfc3986(encodeURIComponent(str))
}
// request: { path | body, [host], [method], [headers], [service], [region] }
// credentials: { accessKeyId, secretAccessKey, [sessionToken] }
function RequestSigner(request, credentials) {
@@ -220,12 +224,22 @@ RequestSigner.prototype.canonicalString = function() {
}
if (query) {
queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) {
var reducedQuery = Object.keys(query).reduce(function(obj, key) {
if (!key) return obj
obj[key] = !Array.isArray(query[key]) ? query[key] :
(firstValOnly ? query[key][0] : query[key].slice().sort())
obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] :
(firstValOnly ? query[key][0] : query[key])
return obj
}, {})))
}, {})
var encodedQueryPieces = []
Object.keys(reducedQuery).sort().forEach(function(key) {
if (!Array.isArray(reducedQuery[key])) {
encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key]))
} else {
reducedQuery[key].map(encodeRfc3986Full).sort()
.forEach(function(val) { encodedQueryPieces.push(key + '=' + val) })
}
})
queryStr = encodedQueryPieces.join('&')
}
if (pathStr !== '/') {
if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/')
@@ -233,8 +247,8 @@ RequestSigner.prototype.canonicalString = function() {
if (normalizePath && piece === '..') {
path.pop()
} else if (!normalizePath || piece !== '.') {
if (decodePath) piece = decodeURIComponent(piece)
path.push(encodeRfc3986(encodeURIComponent(piece)))
if (decodePath) piece = decodeURIComponent(piece).replace(/\+/g, ' ')
path.push(encodeRfc3986Full(piece))
}
return path
}, []).join('/')
@@ -289,8 +303,16 @@ RequestSigner.prototype.defaultCredentials = function() {
}
RequestSigner.prototype.parsePath = function() {
var path = this.request.path || '/',
queryIx = path.indexOf('?'),
var path = this.request.path || '/'
// S3 doesn't always encode characters > 127 correctly and
// all services don't encode characters > 255 correctly
// So if there are non-reserved chars (and it's not already all % encoded), just encode them all
if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) {
path = encodeURI(decodeURI(path))
}
var queryIx = path.indexOf('?'),
query = null
if (queryIx >= 0) {
@@ -298,15 +320,6 @@ RequestSigner.prototype.parsePath = function() {
path = path.slice(0, queryIx)
}
// S3 doesn't always encode characters > 127 correctly and
// all services don't encode characters > 255 correctly
// So if there are non-reserved chars (and it's not already all % encoded), just encode them all
if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) {
path = path.split('/').map(function(piece) {
return encodeURIComponent(decodeURIComponent(piece))
}).join('/')
}
this.parsedPath = {
path: path,
query: query,

13
node_modules/aws4/package.json generated vendored
View File

@@ -1,8 +1,8 @@
{
"_from": "aws4@^1.8.0",
"_id": "aws4@1.8.0",
"_id": "aws4@1.9.1",
"_inBundle": false,
"_integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
"_integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==",
"_location": "/aws4",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/request"
],
"_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
"_shasum": "f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f",
"_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",
"_shasum": "7e33d8f7d449b3f673cd72deb9abdc552dbe528e",
"_spec": "aws4@^1.8.0",
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\request",
"author": {
@@ -98,7 +98,8 @@
"url": "git+https://github.com/mhart/aws4.git"
},
"scripts": {
"test": "mocha ./test/fast.js ./test/slow.js -b -t 100s -R list"
"integration": "node ./test/slow.js",
"test": "mocha ./test/fast.js -b -t 100s -R list"
},
"version": "1.8.0"
"version": "1.9.1"
}