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

update dependencies

This commit is contained in:
s2
2018-10-10 15:11:12 +02:00
parent da4083f574
commit 5c55c54b71
90877 changed files with 339776 additions and 33677 deletions

View File

@@ -1,5 +1,8 @@
## Change Log
### v2.87.0 (2018/05/21)
- [#2943](https://github.com/request/request/pull/2943) Replace hawk dependency with a local implemenation (#2943) (@hueniverse)
### v2.86.0 (2018/05/15)
- [#2885](https://github.com/request/request/pull/2885) Remove redundant code (for Node.js 0.9.4 and below) and dependency (@ChALkeR)
- [#2942](https://github.com/request/request/pull/2942) Make Test GREEN Again! (@simov)

2
app/node_modules/request/README.md generated vendored
View File

@@ -772,7 +772,7 @@ The first argument can be either a `url` or an `options` object. The only requir
- `auth` - a hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
- `oauth` - options for OAuth HMAC-SHA1 signing. See documentation above.
- `hawk` - options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`, and optionally `session` (note that this only works for services that require session as part of the canonical string). Also requires the property `bucket`, unless youre specifying your `bucket` as part of the path, or the request doesnt use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first.
- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`, and optionally `session` (note that this only works for services that require session as part of the canonical string). Also requires the property `bucket`, unless youre specifying your `bucket` as part of the path, or the request doesnt use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. If you are using SigV4, you can also include a `service` property that specifies the service name. **Note:** you need to `npm install aws4` first.
- `httpSignature` - options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.
---

View File

@@ -1,7 +1,7 @@
'use strict'
var caseless = require('caseless')
var uuid = require('uuid')
var uuid = require('uuid/v4')
var helpers = require('./helpers')
var md5 = helpers.md5

89
app/node_modules/request/lib/hawk.js generated vendored Normal file
View File

@@ -0,0 +1,89 @@
'use strict'
var crypto = require('crypto')
function randomString (size) {
var bits = (size + 1) * 6
var buffer = crypto.randomBytes(Math.ceil(bits / 8))
var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '')
return string.slice(0, size)
}
function calculatePayloadHash (payload, algorithm, contentType) {
var hash = crypto.createHash(algorithm)
hash.update('hawk.1.payload\n')
hash.update((contentType ? contentType.split(';')[0].trim().toLowerCase() : '') + '\n')
hash.update(payload || '')
hash.update('\n')
return hash.digest('base64')
}
exports.calculateMac = function (credentials, opts) {
var normalized = 'hawk.1.header\n' +
opts.ts + '\n' +
opts.nonce + '\n' +
(opts.method || '').toUpperCase() + '\n' +
opts.resource + '\n' +
opts.host.toLowerCase() + '\n' +
opts.port + '\n' +
(opts.hash || '') + '\n'
if (opts.ext) {
normalized = normalized + opts.ext.replace('\\', '\\\\').replace('\n', '\\n')
}
normalized = normalized + '\n'
if (opts.app) {
normalized = normalized + opts.app + '\n' + (opts.dlg || '') + '\n'
}
var hmac = crypto.createHmac(credentials.algorithm, credentials.key).update(normalized)
var digest = hmac.digest('base64')
return digest
}
exports.header = function (uri, method, opts) {
var timestamp = opts.timestamp || Math.floor((Date.now() + (opts.localtimeOffsetMsec || 0)) / 1000)
var credentials = opts.credentials
if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
return ''
}
if (['sha1', 'sha256'].indexOf(credentials.algorithm) === -1) {
return ''
}
var artifacts = {
ts: timestamp,
nonce: opts.nonce || randomString(6),
method: method,
resource: uri.pathname + (uri.search || ''),
host: uri.hostname,
port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
hash: opts.hash,
ext: opts.ext,
app: opts.app,
dlg: opts.dlg
}
if (!artifacts.hash && (opts.payload || opts.payload === '')) {
artifacts.hash = calculatePayloadHash(opts.payload, credentials.algorithm, opts.contentType)
}
var mac = exports.calculateMac(credentials, artifacts)
var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''
var header = 'Hawk id="' + credentials.id +
'", ts="' + artifacts.ts +
'", nonce="' + artifacts.nonce +
(artifacts.hash ? '", hash="' + artifacts.hash : '') +
(hasExt ? '", ext="' + artifacts.ext.replace(/\\/g, '\\\\').replace(/"/g, '\\"') : '') +
'", mac="' + mac + '"'
if (artifacts.app) {
header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"'
}
return header
}

View File

@@ -1,6 +1,6 @@
'use strict'
var uuid = require('uuid')
var uuid = require('uuid/v4')
var CombinedStream = require('combined-stream')
var isstream = require('isstream')
var Buffer = require('safe-buffer').Buffer

View File

@@ -3,7 +3,7 @@
var url = require('url')
var qs = require('qs')
var caseless = require('caseless')
var uuid = require('uuid')
var uuid = require('uuid/v4')
var oauth = require('oauth-sign')
var crypto = require('crypto')
var Buffer = require('safe-buffer').Buffer

View File

@@ -1,34 +1,28 @@
{
"_args": [
[
"request@2.86.0",
"E:\\projects\\p\\gitlit\\app"
]
],
"_development": true,
"_from": "request@2.86.0",
"_id": "request@2.86.0",
"_from": "request@^2.45.0",
"_id": "request@2.88.0",
"_inBundle": false,
"_integrity": "sha512-BQZih67o9r+Ys94tcIW4S7Uu8pthjrQVxhsZ/weOwHbDfACxvIyvnAbzFQxjy1jMtvFSzv5zf4my6cZsJBbVzw==",
"_integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
"_location": "/request",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "request@2.86.0",
"raw": "request@^2.45.0",
"name": "request",
"escapedName": "request",
"rawSpec": "2.86.0",
"rawSpec": "^2.45.0",
"saveSpec": null,
"fetchSpec": "2.86.0"
"fetchSpec": "^2.45.0"
},
"_requiredBy": [
"/mksnapshot",
"/nugget"
],
"_resolved": "https://registry.npmjs.org/request/-/request-2.86.0.tgz",
"_spec": "2.86.0",
"_where": "E:\\projects\\p\\gitlit\\app",
"_resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
"_shasum": "9c2fca4f7d35b592efe57c7f0a55e81052124fef",
"_spec": "request@^2.45.0",
"_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\nugget",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
@@ -36,40 +30,41 @@
"bugs": {
"url": "http://github.com/request/request/issues"
},
"bundleDependencies": false,
"dependencies": {
"aws-sign2": "~0.7.0",
"aws4": "^1.6.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.5",
"extend": "~3.0.1",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.1",
"har-validator": "~5.0.3",
"hawk": "~6.0.2",
"form-data": "~2.3.2",
"har-validator": "~5.1.0",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.17",
"oauth-sign": "~0.8.2",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.1",
"safe-buffer": "^5.1.1",
"tough-cookie": "~2.3.3",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.4.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.1.0"
"uuid": "^3.3.2"
},
"deprecated": false,
"description": "Simplified HTTP request client.",
"devDependencies": {
"bluebird": "^3.2.1",
"browserify": "^13.0.1",
"browserify-istanbul": "^2.0.0",
"buffer-equal": "^1.0.0",
"codecov": "^2.0.2",
"coveralls": "^2.11.4",
"codecov": "^3.0.4",
"coveralls": "^3.0.2",
"function-bind": "^1.0.2",
"istanbul": "^0.4.0",
"karma": "^1.1.1",
"karma": "^3.0.0",
"karma-browserify": "^5.0.1",
"karma-cli": "^1.0.0",
"karma-coverage": "^1.0.0",
@@ -117,5 +112,5 @@
"test-ci": "taper tests/test-*.js",
"test-cov": "istanbul cover tape tests/test-*.js"
},
"version": "2.86.0"
"version": "2.88.0"
}

21
app/node_modules/request/request.js generated vendored
View File

@@ -6,7 +6,6 @@ var url = require('url')
var util = require('util')
var stream = require('stream')
var zlib = require('zlib')
var hawk = require('hawk')
var aws2 = require('aws-sign2')
var aws4 = require('aws4')
var httpSignature = require('http-signature')
@@ -24,6 +23,7 @@ var Querystring = require('./lib/querystring').Querystring
var Har = require('./lib/har').Har
var Auth = require('./lib/auth').Auth
var OAuth = require('./lib/oauth').OAuth
var hawk = require('./lib/hawk')
var Multipart = require('./lib/multipart').Multipart
var Redirect = require('./lib/redirect').Redirect
var Tunnel = require('./lib/tunnel').Tunnel
@@ -287,10 +287,14 @@ Request.prototype.init = function (options) {
self.setHost = false
if (!self.hasHeader('host')) {
var hostHeaderName = self.originalHostHeaderName || 'host'
// When used with an IPv6 address, `host` will provide
// the correct bracketed format, unlike using `hostname` and
// optionally adding the `port` when necessary.
self.setHeader(hostHeaderName, self.uri.host)
// Drop :port suffix from Host header if known protocol.
if (self.uri.port) {
if ((self.uri.port === '80' && self.uri.protocol === 'http:') ||
(self.uri.port === '443' && self.uri.protocol === 'https:')) {
self.setHeader(hostHeaderName, self.uri.hostname)
}
}
self.setHost = true
}
@@ -1358,11 +1362,12 @@ Request.prototype.aws = function (opts, now) {
host: self.uri.host,
path: self.uri.path,
method: self.method,
headers: {
'content-type': self.getHeader('content-type') || ''
},
headers: self.headers,
body: self.body
}
if (opts.service) {
options.service = opts.service
}
var signRes = aws4.sign(options, {
accessKeyId: opts.key,
secretAccessKey: opts.secret,
@@ -1420,7 +1425,7 @@ Request.prototype.httpSignature = function (opts) {
}
Request.prototype.hawk = function (opts) {
var self = this
self.setHeader('Authorization', hawk.client.header(self.uri, self.method, opts).field)
self.setHeader('Authorization', hawk.header(self.uri, self.method, opts))
}
Request.prototype.oauth = function (_oauth) {
var self = this