Galerie und tage
This commit is contained in:
35
node_modules/caw/index.js
generated
vendored
35
node_modules/caw/index.js
generated
vendored
@@ -1,36 +1,37 @@
|
||||
'use strict';
|
||||
const url = require('url');
|
||||
const getProxy = require('get-proxy');
|
||||
const isurl = require('isurl');
|
||||
const tunnelAgent = require('tunnel-agent');
|
||||
const urlToOptions = require('url-to-options');
|
||||
var url = require('url');
|
||||
var getProxy = require('get-proxy');
|
||||
var objectAssign = require('object-assign');
|
||||
var tunnelAgent = require('tunnel-agent');
|
||||
var isObj = require('is-obj');
|
||||
|
||||
module.exports = (proxy, opts) => {
|
||||
proxy = proxy || getProxy();
|
||||
opts = Object.assign({}, opts);
|
||||
module.exports = function (proxy, opts) {
|
||||
opts = objectAssign({}, opts);
|
||||
|
||||
if (typeof proxy === 'object') {
|
||||
if (isObj(proxy)) {
|
||||
opts = proxy;
|
||||
proxy = getProxy();
|
||||
} else if (proxy === undefined) {
|
||||
proxy = getProxy();
|
||||
}
|
||||
|
||||
if (!proxy) {
|
||||
return null;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
proxy = isurl.lenient(proxy) ? urlToOptions(proxy) : url.parse(proxy);
|
||||
proxy = url.parse(proxy);
|
||||
|
||||
const uriProtocol = opts.protocol === 'https' ? 'https' : 'http';
|
||||
const proxyProtocol = proxy.protocol === 'https:' ? 'Https' : 'Http';
|
||||
const port = proxy.port || (proxyProtocol === 'Https' ? 443 : 80);
|
||||
const method = `${uriProtocol}Over${proxyProtocol}`;
|
||||
var uriProtocol = opts.protocol === 'https' ? 'https' : 'http';
|
||||
var proxyProtocol = proxy.protocol === 'https:' ? 'Https' : 'Http';
|
||||
var port = proxy.port || (proxyProtocol === 'Https' ? 443 : 80);
|
||||
var method = [uriProtocol, proxyProtocol].join('Over');
|
||||
|
||||
delete opts.protocol;
|
||||
|
||||
return tunnelAgent[method](Object.assign({
|
||||
return tunnelAgent[method](objectAssign({
|
||||
proxy: {
|
||||
port,
|
||||
host: proxy.hostname,
|
||||
port: port,
|
||||
proxyAuth: proxy.auth
|
||||
}
|
||||
}, opts));
|
||||
|
||||
20
node_modules/caw/license
generated
vendored
20
node_modules/caw/license
generated
vendored
@@ -1,9 +1,21 @@
|
||||
MIT License
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
39
node_modules/caw/node_modules/object-assign/index.js
generated
vendored
Normal file
39
node_modules/caw/node_modules/object-assign/index.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
|
||||
function ToObject(val) {
|
||||
if (val == null) {
|
||||
throw new TypeError('Object.assign cannot be called with null or undefined');
|
||||
}
|
||||
|
||||
return Object(val);
|
||||
}
|
||||
|
||||
function ownEnumerableKeys(obj) {
|
||||
var keys = Object.getOwnPropertyNames(obj);
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
keys = keys.concat(Object.getOwnPropertySymbols(obj));
|
||||
}
|
||||
|
||||
return keys.filter(function (key) {
|
||||
return propIsEnumerable.call(obj, key);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = Object.assign || function (target, source) {
|
||||
var from;
|
||||
var keys;
|
||||
var to = ToObject(target);
|
||||
|
||||
for (var s = 1; s < arguments.length; s++) {
|
||||
from = arguments[s];
|
||||
keys = ownEnumerableKeys(Object(from));
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
to[keys[i]] = from[keys[i]];
|
||||
}
|
||||
}
|
||||
|
||||
return to;
|
||||
};
|
||||
21
node_modules/caw/node_modules/object-assign/license
generated
vendored
Normal file
21
node_modules/caw/node_modules/object-assign/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
38
node_modules/caw/node_modules/object-assign/package.json
generated
vendored
Normal file
38
node_modules/caw/node_modules/object-assign/package.json
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "object-assign",
|
||||
"version": "3.0.0",
|
||||
"description": "ES6 Object.assign() ponyfill",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/object-assign",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"object",
|
||||
"assign",
|
||||
"extend",
|
||||
"properties",
|
||||
"es6",
|
||||
"ecmascript",
|
||||
"harmony",
|
||||
"ponyfill",
|
||||
"prollyfill",
|
||||
"polyfill",
|
||||
"shim",
|
||||
"browser"
|
||||
],
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
}
|
||||
}
|
||||
51
node_modules/caw/node_modules/object-assign/readme.md
generated
vendored
Normal file
51
node_modules/caw/node_modules/object-assign/readme.md
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# object-assign [](https://travis-ci.org/sindresorhus/object-assign)
|
||||
|
||||
> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
|
||||
|
||||
> Ponyfill: A polyfill that doesn't overwrite the native method
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save object-assign
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var objectAssign = require('object-assign');
|
||||
|
||||
objectAssign({foo: 0}, {bar: 1});
|
||||
//=> {foo: 0, bar: 1}
|
||||
|
||||
// multiple sources
|
||||
objectAssign({foo: 0}, {bar: 1}, {baz: 2});
|
||||
//=> {foo: 0, bar: 1, baz: 2}
|
||||
|
||||
// overwrites equal keys
|
||||
objectAssign({foo: 0}, {foo: 1}, {foo: 2});
|
||||
//=> {foo: 2}
|
||||
|
||||
// ignores null and undefined sources
|
||||
objectAssign({foo: 0}, null, {bar: 1}, undefined);
|
||||
//=> {foo: 0, bar: 1}
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### objectAssign(target, source, [source, ...])
|
||||
|
||||
Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
|
||||
|
||||
|
||||
## Resources
|
||||
|
||||
- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
81
node_modules/caw/package.json
generated
vendored
81
node_modules/caw/package.json
generated
vendored
@@ -1,82 +1,39 @@
|
||||
{
|
||||
"_from": "caw@^2.0.0",
|
||||
"_id": "caw@2.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==",
|
||||
"_location": "/caw",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "caw@^2.0.0",
|
||||
"name": "caw",
|
||||
"escapedName": "caw",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/bin-wrapper/download",
|
||||
"/download"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz",
|
||||
"_shasum": "6c3ca071fc194720883c2dc5da9b074bfc7e9e95",
|
||||
"_spec": "caw@^2.0.0",
|
||||
"_where": "/var/www/html/jason/WeihnachtenMelly/node_modules/download",
|
||||
"name": "caw",
|
||||
"version": "1.2.0",
|
||||
"description": "Construct HTTP/HTTPS agents for tunneling proxies",
|
||||
"license": "MIT",
|
||||
"repository": "kevva/caw",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"name": "Kevin Mårtensson",
|
||||
"url": "github.com/kevva"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kevva/caw/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"get-proxy": "^2.0.0",
|
||||
"isurl": "^1.0.0-alpha5",
|
||||
"tunnel-agent": "^0.6.0",
|
||||
"url-to-options": "^1.0.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Construct HTTP/HTTPS agents for tunneling proxies",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"create-cert": "^1.0.4",
|
||||
"get-port": "^3.1.0",
|
||||
"got": "^7.0.0",
|
||||
"pify": "^3.0.0",
|
||||
"proxyquire": "^1.7.9",
|
||||
"sinon": "^2.3.1",
|
||||
"universal-url": "1.0.0-alpha",
|
||||
"xo": "*"
|
||||
"scripts": {
|
||||
"test": "xo && tap test/test.js -t2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/kevva/caw#readme",
|
||||
"keywords": [
|
||||
"http",
|
||||
"https",
|
||||
"proxy",
|
||||
"tunnel"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "caw",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kevva/caw.git"
|
||||
"dependencies": {
|
||||
"get-proxy": "^1.0.1",
|
||||
"is-obj": "^1.0.0",
|
||||
"object-assign": "^3.0.0",
|
||||
"tunnel-agent": "^0.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "2.0.1",
|
||||
"xo": {
|
||||
"rules": {
|
||||
"ava/no-skip-test": 0
|
||||
}
|
||||
"devDependencies": {
|
||||
"proxyquire": "^1.6.0",
|
||||
"sinon": "^1.15.4",
|
||||
"tap": "^1.3.1",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
||||
|
||||
20
node_modules/caw/readme.md
generated
vendored
20
node_modules/caw/readme.md
generated
vendored
@@ -6,41 +6,41 @@
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install caw
|
||||
$ npm install --save caw
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const caw = require('caw');
|
||||
const got = require('got');
|
||||
var caw = require('caw');
|
||||
var got = require('got');
|
||||
|
||||
got('todomvc.com', {
|
||||
agent: caw()
|
||||
}, () => {});
|
||||
}, function () {});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### caw([proxy], [options])
|
||||
### caw(proxy, options)
|
||||
|
||||
#### proxy
|
||||
|
||||
Type: `string`
|
||||
|
||||
Proxy URL. If not set, it'll try getting it using [`get-proxy`](https://github.com/kevva/get-proxy).
|
||||
Proxy URL.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
Type: `object`
|
||||
|
||||
Besides the options below, you can pass in options allowed in [tunnel-agent](https://github.com/request/tunnel-agent).
|
||||
Besides the options below, you can pass in options allowed in [tunnel-agent](https://github.com/koichik/node-tunnel).
|
||||
|
||||
##### protocol
|
||||
|
||||
Type: `string`<br>
|
||||
Type: `string`
|
||||
Default: `http`
|
||||
|
||||
Endpoint protocol.
|
||||
@@ -48,4 +48,4 @@ Endpoint protocol.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Kevin Mårtensson](https://github.com/kevva)
|
||||
MIT © [Kevin Mårtensson](http://github.com/kevva)
|
||||
|
||||
Reference in New Issue
Block a user