tlsd 2.4.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -3
- package/domains/README.txt +0 -0
- package/inchtml.js +40 -0
- package/package.json +2 -1
- package/proxy/config.json +5 -0
- package/proxy/package-lock.json +118 -0
- package/proxy/package.json +15 -0
- package/proxy/proxy.js +20 -0
- package/proxy/siriusmercantile.com/index.js +14 -0
- package/proxy/siriusmercantile.com/package-lock.json +137 -0
- package/proxy/siriusmercantile.com/package.json +7 -0
- package/proxy/zzz/was-nm/debug/CHANGELOG.md +395 -0
- package/proxy/zzz/was-nm/debug/LICENSE +19 -0
- package/proxy/zzz/was-nm/debug/README.md +437 -0
- package/proxy/zzz/was-nm/debug/dist/debug.js +886 -0
- package/proxy/zzz/was-nm/debug/node.js +1 -0
- package/proxy/zzz/was-nm/debug/package.json +90 -0
- package/proxy/zzz/was-nm/debug/src/browser.js +180 -0
- package/proxy/zzz/was-nm/debug/src/common.js +249 -0
- package/proxy/zzz/was-nm/debug/src/index.js +12 -0
- package/proxy/zzz/was-nm/debug/src/node.js +174 -0
- package/proxy/zzz/was-nm/eventemitter3/LICENSE +21 -0
- package/proxy/zzz/was-nm/eventemitter3/README.md +92 -0
- package/proxy/zzz/was-nm/eventemitter3/index.d.ts +67 -0
- package/proxy/zzz/was-nm/eventemitter3/index.js +336 -0
- package/proxy/zzz/was-nm/eventemitter3/package.json +84 -0
- package/proxy/zzz/was-nm/eventemitter3/umd/eventemitter3.js +340 -0
- package/proxy/zzz/was-nm/eventemitter3/umd/eventemitter3.min.js +1 -0
- package/proxy/zzz/was-nm/eventemitter3/umd/eventemitter3.min.js.map +1 -0
- package/proxy/zzz/was-nm/follow-redirects/LICENSE +18 -0
- package/proxy/zzz/was-nm/follow-redirects/README.md +145 -0
- package/proxy/zzz/was-nm/follow-redirects/http.js +1 -0
- package/proxy/zzz/was-nm/follow-redirects/https.js +1 -0
- package/proxy/zzz/was-nm/follow-redirects/index.js +452 -0
- package/proxy/zzz/was-nm/follow-redirects/package.json +87 -0
- package/proxy/zzz/was-nm/http-proxy/.auto-changelog +6 -0
- package/proxy/zzz/was-nm/http-proxy/.gitattributes +1 -0
- package/proxy/zzz/was-nm/http-proxy/CHANGELOG.md +1864 -0
- package/proxy/zzz/was-nm/http-proxy/CODE_OF_CONDUCT.md +74 -0
- package/proxy/zzz/was-nm/http-proxy/LICENSE +23 -0
- package/proxy/zzz/was-nm/http-proxy/README.md +568 -0
- package/proxy/zzz/was-nm/http-proxy/codecov.yml +10 -0
- package/proxy/zzz/was-nm/http-proxy/index.js +13 -0
- package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/common.js +248 -0
- package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/index.js +185 -0
- package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/passes/web-incoming.js +192 -0
- package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/passes/web-outgoing.js +147 -0
- package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/passes/ws-incoming.js +162 -0
- package/proxy/zzz/was-nm/http-proxy/lib/http-proxy.js +66 -0
- package/proxy/zzz/was-nm/http-proxy/package.json +77 -0
- package/proxy/zzz/was-nm/http-proxy/renovate.json +19 -0
- package/proxy/zzz/was-nm/ms/index.js +162 -0
- package/proxy/zzz/was-nm/ms/license.md +21 -0
- package/proxy/zzz/was-nm/ms/package.json +69 -0
- package/proxy/zzz/was-nm/ms/readme.md +60 -0
- package/proxy/zzz/was-nm/requires-port/.travis.yml +19 -0
- package/proxy/zzz/was-nm/requires-port/LICENSE +22 -0
- package/proxy/zzz/was-nm/requires-port/README.md +47 -0
- package/proxy/zzz/was-nm/requires-port/index.js +38 -0
- package/proxy/zzz/was-nm/requires-port/package.json +74 -0
- package/proxy/zzz/was-nm/requires-port/test.js +98 -0
- package/proxy/zzz/was-nm/sleepless/README.md +4 -0
- package/proxy/zzz/was-nm/sleepless/autosite/README.txt +0 -0
- package/proxy/zzz/was-nm/sleepless/autosite/site/foobar.txt +1 -0
- package/proxy/zzz/was-nm/sleepless/autosite/site/pull.php +4 -0
- package/proxy/zzz/was-nm/sleepless/index.js +2 -0
- package/proxy/zzz/was-nm/sleepless/package.json +44 -0
- package/proxy/zzz/was-nm/sleepless/sleepless.js +613 -0
- package/proxy/zzz/was-nm/sleepless/test.html +9 -0
- package/proxy/zzz/was-nm/sleepless/test.js +146 -0
- package/server_static/rpc/rpc.js +2 -5
- package/test.html +4 -0
- package/tlsd +11 -2
- package/tlsd.js +16 -14
- package/foo/rpc/index.js +0 -13
- package/foo/static/index.html +0 -15
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_from": "ms@^2.1.1",
|
|
3
|
+
"_id": "ms@2.1.2",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
|
6
|
+
"_location": "/ms",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "range",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "ms@^2.1.1",
|
|
12
|
+
"name": "ms",
|
|
13
|
+
"escapedName": "ms",
|
|
14
|
+
"rawSpec": "^2.1.1",
|
|
15
|
+
"saveSpec": null,
|
|
16
|
+
"fetchSpec": "^2.1.1"
|
|
17
|
+
},
|
|
18
|
+
"_requiredBy": [
|
|
19
|
+
"/debug"
|
|
20
|
+
],
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
|
22
|
+
"_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009",
|
|
23
|
+
"_spec": "ms@^2.1.1",
|
|
24
|
+
"_where": "/root/proxy/node_modules/debug",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/zeit/ms/issues"
|
|
27
|
+
},
|
|
28
|
+
"bundleDependencies": false,
|
|
29
|
+
"deprecated": false,
|
|
30
|
+
"description": "Tiny millisecond conversion utility",
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"eslint": "4.12.1",
|
|
33
|
+
"expect.js": "0.3.1",
|
|
34
|
+
"husky": "0.14.3",
|
|
35
|
+
"lint-staged": "5.0.0",
|
|
36
|
+
"mocha": "4.0.1"
|
|
37
|
+
},
|
|
38
|
+
"eslintConfig": {
|
|
39
|
+
"extends": "eslint:recommended",
|
|
40
|
+
"env": {
|
|
41
|
+
"node": true,
|
|
42
|
+
"es6": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"index.js"
|
|
47
|
+
],
|
|
48
|
+
"homepage": "https://github.com/zeit/ms#readme",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"lint-staged": {
|
|
51
|
+
"*.js": [
|
|
52
|
+
"npm run lint",
|
|
53
|
+
"prettier --single-quote --write",
|
|
54
|
+
"git add"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"main": "./index",
|
|
58
|
+
"name": "ms",
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "git+https://github.com/zeit/ms.git"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"lint": "eslint lib/* bin/*",
|
|
65
|
+
"precommit": "lint-staged",
|
|
66
|
+
"test": "mocha tests.js"
|
|
67
|
+
},
|
|
68
|
+
"version": "2.1.2"
|
|
69
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# ms
|
|
2
|
+
|
|
3
|
+
[](https://travis-ci.org/zeit/ms)
|
|
4
|
+
[](https://spectrum.chat/zeit)
|
|
5
|
+
|
|
6
|
+
Use this package to easily convert various time formats to milliseconds.
|
|
7
|
+
|
|
8
|
+
## Examples
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
ms('2 days') // 172800000
|
|
12
|
+
ms('1d') // 86400000
|
|
13
|
+
ms('10h') // 36000000
|
|
14
|
+
ms('2.5 hrs') // 9000000
|
|
15
|
+
ms('2h') // 7200000
|
|
16
|
+
ms('1m') // 60000
|
|
17
|
+
ms('5s') // 5000
|
|
18
|
+
ms('1y') // 31557600000
|
|
19
|
+
ms('100') // 100
|
|
20
|
+
ms('-3 days') // -259200000
|
|
21
|
+
ms('-1h') // -3600000
|
|
22
|
+
ms('-200') // -200
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Convert from Milliseconds
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
ms(60000) // "1m"
|
|
29
|
+
ms(2 * 60000) // "2m"
|
|
30
|
+
ms(-3 * 60000) // "-3m"
|
|
31
|
+
ms(ms('10 hours')) // "10h"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Time Format Written-Out
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
ms(60000, { long: true }) // "1 minute"
|
|
38
|
+
ms(2 * 60000, { long: true }) // "2 minutes"
|
|
39
|
+
ms(-3 * 60000, { long: true }) // "-3 minutes"
|
|
40
|
+
ms(ms('10 hours'), { long: true }) // "10 hours"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
- Works both in [Node.js](https://nodejs.org) and in the browser
|
|
46
|
+
- If a number is supplied to `ms`, a string with a unit is returned
|
|
47
|
+
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
|
|
48
|
+
- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
|
|
49
|
+
|
|
50
|
+
## Related Packages
|
|
51
|
+
|
|
52
|
+
- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
|
|
53
|
+
|
|
54
|
+
## Caught a Bug?
|
|
55
|
+
|
|
56
|
+
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
|
|
57
|
+
2. Link the package to the global module directory: `npm link`
|
|
58
|
+
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
|
|
59
|
+
|
|
60
|
+
As always, you can run the tests using: `npm test`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
sudo: false
|
|
2
|
+
language: node_js
|
|
3
|
+
node_js:
|
|
4
|
+
- "4"
|
|
5
|
+
- "iojs"
|
|
6
|
+
- "0.12"
|
|
7
|
+
- "0.10"
|
|
8
|
+
script:
|
|
9
|
+
- "npm run test-travis"
|
|
10
|
+
after_script:
|
|
11
|
+
- "npm install coveralls@2 && cat coverage/lcov.info | coveralls"
|
|
12
|
+
matrix:
|
|
13
|
+
fast_finish: true
|
|
14
|
+
notifications:
|
|
15
|
+
irc:
|
|
16
|
+
channels:
|
|
17
|
+
- "irc.freenode.org#unshift"
|
|
18
|
+
on_success: change
|
|
19
|
+
on_failure: change
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# requires-port
|
|
2
|
+
|
|
3
|
+
[](http://unshift.io)[](http://browsenpm.org/package/requires-port)[](https://travis-ci.org/unshiftio/requires-port)[](https://david-dm.org/unshiftio/requires-port)[](https://coveralls.io/r/unshiftio/requires-port?branch=master)[](http://webchat.freenode.net/?channels=unshift)
|
|
4
|
+
|
|
5
|
+
The module name says it all, check if a protocol requires a given port.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
This module is intended to be used with browserify or Node.js and is distributed
|
|
10
|
+
in the public npm registry. To install it simply run the following command from
|
|
11
|
+
your CLI:
|
|
12
|
+
|
|
13
|
+
```j
|
|
14
|
+
npm install --save requires-port
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
The module exports it self as function and requires 2 arguments:
|
|
20
|
+
|
|
21
|
+
1. The port number, can be a string or number.
|
|
22
|
+
2. Protocol, can be `http`, `http:` or even `https://yomoma.com`. We just split
|
|
23
|
+
it at `:` and use the first result. We currently accept the following
|
|
24
|
+
protocols:
|
|
25
|
+
- `http`
|
|
26
|
+
- `https`
|
|
27
|
+
- `ws`
|
|
28
|
+
- `wss`
|
|
29
|
+
- `ftp`
|
|
30
|
+
- `gopher`
|
|
31
|
+
- `file`
|
|
32
|
+
|
|
33
|
+
It returns a boolean that indicates if protocol requires this port to be added
|
|
34
|
+
to your URL.
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
'use strict';
|
|
38
|
+
|
|
39
|
+
var required = require('requires-port');
|
|
40
|
+
|
|
41
|
+
console.log(required('8080', 'http')) // true
|
|
42
|
+
console.log(required('80', 'http')) // false
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
# License
|
|
46
|
+
|
|
47
|
+
MIT
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Check if we're required to add a port number.
|
|
5
|
+
*
|
|
6
|
+
* @see https://url.spec.whatwg.org/#default-port
|
|
7
|
+
* @param {Number|String} port Port number we need to check
|
|
8
|
+
* @param {String} protocol Protocol we need to check against.
|
|
9
|
+
* @returns {Boolean} Is it a default port for the given protocol
|
|
10
|
+
* @api private
|
|
11
|
+
*/
|
|
12
|
+
module.exports = function required(port, protocol) {
|
|
13
|
+
protocol = protocol.split(':')[0];
|
|
14
|
+
port = +port;
|
|
15
|
+
|
|
16
|
+
if (!port) return false;
|
|
17
|
+
|
|
18
|
+
switch (protocol) {
|
|
19
|
+
case 'http':
|
|
20
|
+
case 'ws':
|
|
21
|
+
return port !== 80;
|
|
22
|
+
|
|
23
|
+
case 'https':
|
|
24
|
+
case 'wss':
|
|
25
|
+
return port !== 443;
|
|
26
|
+
|
|
27
|
+
case 'ftp':
|
|
28
|
+
return port !== 21;
|
|
29
|
+
|
|
30
|
+
case 'gopher':
|
|
31
|
+
return port !== 70;
|
|
32
|
+
|
|
33
|
+
case 'file':
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return port !== 0;
|
|
38
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_from": "requires-port@^1.0.0",
|
|
3
|
+
"_id": "requires-port@1.0.0",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
|
|
6
|
+
"_location": "/requires-port",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "range",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "requires-port@^1.0.0",
|
|
12
|
+
"name": "requires-port",
|
|
13
|
+
"escapedName": "requires-port",
|
|
14
|
+
"rawSpec": "^1.0.0",
|
|
15
|
+
"saveSpec": null,
|
|
16
|
+
"fetchSpec": "^1.0.0"
|
|
17
|
+
},
|
|
18
|
+
"_requiredBy": [
|
|
19
|
+
"/http-proxy"
|
|
20
|
+
],
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
|
22
|
+
"_shasum": "925d2601d39ac485e091cf0da5c6e694dc3dcaff",
|
|
23
|
+
"_spec": "requires-port@^1.0.0",
|
|
24
|
+
"_where": "/root/proxy/node_modules/http-proxy",
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "Arnout Kazemier"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/unshiftio/requires-port/issues"
|
|
30
|
+
},
|
|
31
|
+
"bundleDependencies": false,
|
|
32
|
+
"deprecated": false,
|
|
33
|
+
"description": "Check if a protocol requires a certain port number to be added to an URL.",
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"assume": "1.3.x",
|
|
36
|
+
"istanbul": "0.4.x",
|
|
37
|
+
"mocha": "2.3.x",
|
|
38
|
+
"pre-commit": "1.1.x"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/unshiftio/requires-port",
|
|
41
|
+
"keywords": [
|
|
42
|
+
"port",
|
|
43
|
+
"require",
|
|
44
|
+
"http",
|
|
45
|
+
"https",
|
|
46
|
+
"ws",
|
|
47
|
+
"wss",
|
|
48
|
+
"gopher",
|
|
49
|
+
"file",
|
|
50
|
+
"ftp",
|
|
51
|
+
"requires",
|
|
52
|
+
"requried",
|
|
53
|
+
"portnumber",
|
|
54
|
+
"url",
|
|
55
|
+
"parsing",
|
|
56
|
+
"validation",
|
|
57
|
+
"cows"
|
|
58
|
+
],
|
|
59
|
+
"license": "MIT",
|
|
60
|
+
"main": "index.js",
|
|
61
|
+
"name": "requires-port",
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "git+https://github.com/unshiftio/requires-port.git"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"100%": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100",
|
|
68
|
+
"coverage": "istanbul cover _mocha -- test.js",
|
|
69
|
+
"test": "mocha test.js",
|
|
70
|
+
"test-travis": "istanbul cover _mocha --report lcovonly -- test.js",
|
|
71
|
+
"watch": "mocha --watch test.js"
|
|
72
|
+
},
|
|
73
|
+
"version": "1.0.0"
|
|
74
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
describe('requires-port', function () {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var assume = require('assume')
|
|
5
|
+
, required = require('./');
|
|
6
|
+
|
|
7
|
+
it('is exported as a function', function () {
|
|
8
|
+
assume(required).is.a('function');
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('does not require empty ports', function () {
|
|
12
|
+
assume(required('', 'http')).false();
|
|
13
|
+
assume(required('', 'wss')).false();
|
|
14
|
+
assume(required('', 'ws')).false();
|
|
15
|
+
assume(required('', 'cowsack')).false();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('assumes true for unknown protocols',function () {
|
|
19
|
+
assume(required('808', 'foo')).true();
|
|
20
|
+
assume(required('80', 'bar')).true();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('never requires port numbers for file', function () {
|
|
24
|
+
assume(required(8080, 'file')).false();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('does not require port 80 for http', function () {
|
|
28
|
+
assume(required('80', 'http')).false();
|
|
29
|
+
assume(required(80, 'http')).false();
|
|
30
|
+
assume(required(80, 'http://')).false();
|
|
31
|
+
assume(required(80, 'http://www.google.com')).false();
|
|
32
|
+
|
|
33
|
+
assume(required('8080', 'http')).true();
|
|
34
|
+
assume(required(8080, 'http')).true();
|
|
35
|
+
assume(required(8080, 'http://')).true();
|
|
36
|
+
assume(required(8080, 'http://www.google.com')).true();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('does not require port 80 for ws', function () {
|
|
40
|
+
assume(required('80', 'ws')).false();
|
|
41
|
+
assume(required(80, 'ws')).false();
|
|
42
|
+
assume(required(80, 'ws://')).false();
|
|
43
|
+
assume(required(80, 'ws://www.google.com')).false();
|
|
44
|
+
|
|
45
|
+
assume(required('8080', 'ws')).true();
|
|
46
|
+
assume(required(8080, 'ws')).true();
|
|
47
|
+
assume(required(8080, 'ws://')).true();
|
|
48
|
+
assume(required(8080, 'ws://www.google.com')).true();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('does not require port 443 for https', function () {
|
|
52
|
+
assume(required('443', 'https')).false();
|
|
53
|
+
assume(required(443, 'https')).false();
|
|
54
|
+
assume(required(443, 'https://')).false();
|
|
55
|
+
assume(required(443, 'https://www.google.com')).false();
|
|
56
|
+
|
|
57
|
+
assume(required('8080', 'https')).true();
|
|
58
|
+
assume(required(8080, 'https')).true();
|
|
59
|
+
assume(required(8080, 'https://')).true();
|
|
60
|
+
assume(required(8080, 'https://www.google.com')).true();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('does not require port 443 for wss', function () {
|
|
64
|
+
assume(required('443', 'wss')).false();
|
|
65
|
+
assume(required(443, 'wss')).false();
|
|
66
|
+
assume(required(443, 'wss://')).false();
|
|
67
|
+
assume(required(443, 'wss://www.google.com')).false();
|
|
68
|
+
|
|
69
|
+
assume(required('8080', 'wss')).true();
|
|
70
|
+
assume(required(8080, 'wss')).true();
|
|
71
|
+
assume(required(8080, 'wss://')).true();
|
|
72
|
+
assume(required(8080, 'wss://www.google.com')).true();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('does not require port 21 for ftp', function () {
|
|
76
|
+
assume(required('21', 'ftp')).false();
|
|
77
|
+
assume(required(21, 'ftp')).false();
|
|
78
|
+
assume(required(21, 'ftp://')).false();
|
|
79
|
+
assume(required(21, 'ftp://www.google.com')).false();
|
|
80
|
+
|
|
81
|
+
assume(required('8080', 'ftp')).true();
|
|
82
|
+
assume(required(8080, 'ftp')).true();
|
|
83
|
+
assume(required(8080, 'ftp://')).true();
|
|
84
|
+
assume(required(8080, 'ftp://www.google.com')).true();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('does not require port 70 for gopher', function () {
|
|
88
|
+
assume(required('70', 'gopher')).false();
|
|
89
|
+
assume(required(70, 'gopher')).false();
|
|
90
|
+
assume(required(70, 'gopher://')).false();
|
|
91
|
+
assume(required(70, 'gopher://www.google.com')).false();
|
|
92
|
+
|
|
93
|
+
assume(required('8080', 'gopher')).true();
|
|
94
|
+
assume(required(8080, 'gopher')).true();
|
|
95
|
+
assume(required(8080, 'gopher://')).true();
|
|
96
|
+
assume(required(8080, 'gopher://www.google.com')).true();
|
|
97
|
+
});
|
|
98
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Tue Jan 7 22:21:42 PST 2014
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_from": "sleepless",
|
|
3
|
+
"_id": "sleepless@2.7.2",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha512-tnOcMjXNGim4IJP/VMeyBWFy9oMHCLWe8Jt5Hlx7XfysXHPz1v66rZ3eKBqBvwZbRMXhXxhCY45GkE361C79Xg==",
|
|
6
|
+
"_location": "/sleepless",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "tag",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "sleepless",
|
|
12
|
+
"name": "sleepless",
|
|
13
|
+
"escapedName": "sleepless",
|
|
14
|
+
"rawSpec": "",
|
|
15
|
+
"saveSpec": null,
|
|
16
|
+
"fetchSpec": "latest"
|
|
17
|
+
},
|
|
18
|
+
"_requiredBy": [
|
|
19
|
+
"#USER",
|
|
20
|
+
"/"
|
|
21
|
+
],
|
|
22
|
+
"_resolved": "https://registry.npmjs.org/sleepless/-/sleepless-2.7.2.tgz",
|
|
23
|
+
"_shasum": "d3fd35b314fe3fbd58b076ad95b6b460737d0f93",
|
|
24
|
+
"_spec": "sleepless",
|
|
25
|
+
"_where": "/root/proxy",
|
|
26
|
+
"author": {
|
|
27
|
+
"name": "Joe Hitchens",
|
|
28
|
+
"email": "joe@sleepless.com",
|
|
29
|
+
"url": "sleepless.com"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/sleeplessinc/sleepless/issues"
|
|
33
|
+
},
|
|
34
|
+
"bundleDependencies": false,
|
|
35
|
+
"deprecated": false,
|
|
36
|
+
"description": "Sleepless commonly used Javascript enhancement code",
|
|
37
|
+
"homepage": "https://github.com/sleeplessinc/sleepless#readme",
|
|
38
|
+
"name": "sleepless",
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git://github.com/sleeplessinc/sleepless.git"
|
|
42
|
+
},
|
|
43
|
+
"version": "2.7.2"
|
|
44
|
+
}
|