update to state of the art

This commit is contained in:
s2
2020-10-10 15:18:01 +02:00
parent cf251a170f
commit 4cdcfd167c
1526 changed files with 48132 additions and 7268 deletions

3
node_modules/aws4/.github/FUNDING.yml generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
github: mhart

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

@@ -20,11 +20,11 @@ Example
-------
```javascript
var http = require('https')
var https = require('https')
var aws4 = require('aws4')
// to illustrate usage, we'll create a utility function to request and pipe to stdout
function request(opts) { http.request(opts, function(res) { res.pipe(process.stdout) }).end(opts.body || '') }
function request(opts) { https.request(opts, function(res) { res.pipe(process.stdout) }).end(opts.body || '') }
// aws4 will sign an options object as you'd pass to http.request, with an AWS service and region
var opts = { host: 'my-bucket.s3.us-west-1.amazonaws.com', path: '/my-object', service: 's3', region: 'us-west-1' }
@@ -94,6 +94,15 @@ request(aws4.sign({
...
*/
// The raw RequestSigner can be used to generate CodeCommit Git passwords
var signer = new aws4.RequestSigner({
service: 'codecommit',
host: 'git-codecommit.us-east-1.amazonaws.com',
method: 'GIT',
path: '/v1/repos/MyAwesomeRepo',
})
var password = signer.getDateTime() + 'Z' + signer.signature()
// see example.js for examples with other services
```
@@ -102,11 +111,10 @@ API
### aws4.sign(requestOptions, [credentials])
This calculates and populates the `Authorization` header of
`requestOptions`, and any other necessary AWS headers and/or request
options. Returns `requestOptions` as a convenience for chaining.
Calculates and populates any necessary AWS headers and/or request
options on `requestOptions`. Returns `requestOptions` as a convenience for chaining.
`requestOptions` is an object holding the same options that the node.js
`requestOptions` is an object holding the same options that the Node.js
[http.request](https://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback)
function takes.
@@ -119,6 +127,7 @@ populated if they don't already exist:
- `body` (will use `''` if not given)
- `service` (will try to be calculated from `hostname` or `host` if not given)
- `region` (will try to be calculated from `hostname` or `host` or use `'us-east-1'` if not given)
- `signQuery` (to sign the query instead of adding an `Authorization` header, defaults to false)
- `headers['Host']` (will use `hostname` or `host` or be calculated if not given)
- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'`
if not given and there is a `body`)
@@ -170,5 +179,5 @@ Thanks to [@jed](https://github.com/jed) for his
committed and subsequently extracted this code.
Also thanks to the
[official node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving
[official Node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving
me a start on implementing the v4 signature.

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

@@ -259,7 +259,7 @@ RequestSigner.prototype.canonicalString = function() {
if (normalizePath && piece === '..') {
path.pop()
} else if (!normalizePath || piece !== '.') {
if (decodePath) piece = decodeURIComponent(piece).replace(/\+/g, ' ')
if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, ' '))
path.push(encodeRfc3986Full(piece))
}
return path

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

@@ -1,33 +1,27 @@
{
"_args": [
[
"aws4@1.10.0",
"D:\\Projects\\vanillajs-seed"
]
],
"_development": true,
"_from": "aws4@1.10.0",
"_id": "aws4@1.10.0",
"_from": "aws4@^1.8.0",
"_id": "aws4@1.10.1",
"_inBundle": false,
"_integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==",
"_integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==",
"_location": "/aws4",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "aws4@1.10.0",
"raw": "aws4@^1.8.0",
"name": "aws4",
"escapedName": "aws4",
"rawSpec": "1.10.0",
"rawSpec": "^1.8.0",
"saveSpec": null,
"fetchSpec": "1.10.0"
"fetchSpec": "^1.8.0"
},
"_requiredBy": [
"/request"
],
"_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz",
"_spec": "1.10.0",
"_where": "D:\\Projects\\vanillajs-seed",
"_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz",
"_shasum": "e1e82e4f3e999e2cfd61b161280d16a111f86428",
"_spec": "aws4@^1.8.0",
"_where": "D:\\Projects\\vanillajs-seed\\node_modules\\request",
"author": {
"name": "Michael Hart",
"email": "michael.hart.au@gmail.com",
@@ -36,10 +30,12 @@
"bugs": {
"url": "https://github.com/mhart/aws4/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Signs and prepares requests using AWS Signature Version 4",
"devDependencies": {
"mocha": "^7.1.2",
"should": "^13.2.3"
"mocha": "^2.5.3",
"should": "^8.4.0"
},
"homepage": "https://github.com/mhart/aws4#readme",
"license": "MIT",
@@ -53,5 +49,5 @@
"integration": "node ./test/slow.js",
"test": "mocha ./test/fast.js -R list"
},
"version": "1.10.0"
"version": "1.10.1"
}