opal 1.6.0 → 1.7.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +17 -0
- data/CHANGELOG.md +15 -1
- data/Gemfile +2 -0
- data/HACKING.md +47 -26
- data/UNRELEASED.md +27 -0
- data/benchmark/benchmarks +415 -103
- data/benchmark/bm_call_overhead.yml +28 -0
- data/benchmark/run.rb +61 -40
- data/docs/cdp_common.json +3364 -0
- data/docs/cdp_common.md +18 -0
- data/docs/{headless_chrome.md → headless_browsers.md} +31 -12
- data/lib/opal/ast/builder.rb +1 -1
- data/lib/opal/builder.rb +8 -2
- data/lib/opal/builder_processors.rb +5 -3
- data/lib/opal/builder_scheduler.rb +1 -1
- data/lib/opal/cache.rb +1 -7
- data/lib/opal/cli_options.rb +72 -58
- data/lib/opal/cli_runners/chrome.rb +47 -9
- data/lib/opal/cli_runners/chrome_cdp_interface.rb +238 -112
- data/lib/opal/cli_runners/compiler.rb +146 -13
- data/lib/opal/cli_runners/deno.rb +32 -0
- data/lib/opal/cli_runners/firefox.rb +350 -0
- data/lib/opal/cli_runners/firefox_cdp_interface.rb +212 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.cmd +17 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.ps1 +28 -0
- data/lib/opal/cli_runners/node_modules/.package-lock.json +41 -0
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/LICENSE +1 -1
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/README.md +322 -182
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/bin/client.js +99 -114
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/chrome-remote-interface.js +1 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/index.js +16 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/api.js +41 -33
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/chrome.js +224 -214
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/devtools.js +71 -191
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/external-request.js +26 -6
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/protocol.json +20788 -9049
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/websocket-wrapper.js +10 -3
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/package.json +59 -123
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/webpack.config.js +25 -32
- data/lib/opal/cli_runners/node_modules/commander/History.md +298 -0
- data/lib/opal/cli_runners/node_modules/commander/LICENSE +22 -0
- data/lib/opal/cli_runners/node_modules/commander/Readme.md +217 -61
- data/lib/opal/cli_runners/node_modules/commander/index.js +431 -145
- data/lib/opal/cli_runners/node_modules/commander/package.json +16 -79
- data/lib/opal/cli_runners/node_modules/ws/README.md +334 -98
- data/lib/opal/cli_runners/node_modules/ws/browser.js +8 -0
- data/lib/opal/cli_runners/node_modules/ws/index.js +5 -10
- data/lib/opal/cli_runners/node_modules/ws/lib/buffer-util.js +129 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/constants.js +10 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/event-target.js +184 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/extension.js +223 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/limiter.js +55 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/permessage-deflate.js +518 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/receiver.js +607 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/sender.js +409 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/stream.js +180 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/validation.js +104 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket-server.js +447 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket.js +1195 -0
- data/lib/opal/cli_runners/node_modules/ws/package.json +40 -106
- data/lib/opal/cli_runners/package-lock.json +62 -0
- data/lib/opal/cli_runners/package.json +1 -1
- data/lib/opal/cli_runners.rb +26 -4
- data/lib/opal/nodes/args/prepare_post_args.rb +2 -2
- data/lib/opal/nodes/def.rb +8 -8
- data/lib/opal/nodes/iter.rb +12 -12
- data/lib/opal/nodes/logic.rb +1 -1
- data/lib/opal/nodes/masgn.rb +2 -2
- data/lib/opal/parser/with_ruby_lexer.rb +1 -1
- data/lib/opal/paths.rb +14 -0
- data/lib/opal/rewriter.rb +2 -0
- data/lib/opal/rewriters/forward_args.rb +52 -4
- data/lib/opal/rewriters/targeted_patches.rb +94 -0
- data/lib/opal/version.rb +1 -1
- data/opal/corelib/basic_object.rb +1 -1
- data/opal/corelib/boolean.rb +2 -2
- data/opal/corelib/class.rb +11 -0
- data/opal/corelib/constants.rb +3 -3
- data/opal/corelib/enumerable.rb +4 -0
- data/opal/corelib/enumerator.rb +1 -1
- data/opal/corelib/hash.rb +2 -2
- data/opal/corelib/helpers.rb +1 -1
- data/opal/corelib/kernel.rb +3 -3
- data/opal/corelib/method.rb +1 -1
- data/opal/corelib/module.rb +29 -8
- data/opal/corelib/proc.rb +7 -5
- data/opal/corelib/runtime.js +141 -78
- data/opal/corelib/set.rb +252 -0
- data/opal/corelib/string.rb +2 -1
- data/opal/corelib/time.rb +2 -2
- data/opal/opal.rb +1 -0
- data/opal.gemspec +1 -0
- data/spec/filters/bugs/array.rb +22 -13
- data/spec/filters/bugs/base64.rb +5 -5
- data/spec/filters/bugs/basicobject.rb +16 -8
- data/spec/filters/bugs/bigdecimal.rb +161 -160
- data/spec/filters/bugs/binding.rb +10 -10
- data/spec/filters/bugs/class.rb +8 -8
- data/spec/filters/bugs/complex.rb +2 -1
- data/spec/filters/bugs/date.rb +79 -81
- data/spec/filters/bugs/datetime.rb +29 -29
- data/spec/filters/bugs/delegate.rb +1 -3
- data/spec/filters/bugs/encoding.rb +69 -69
- data/spec/filters/bugs/enumerable.rb +22 -20
- data/spec/filters/bugs/enumerator.rb +88 -85
- data/spec/filters/bugs/exception.rb +46 -40
- data/spec/filters/bugs/file.rb +32 -32
- data/spec/filters/bugs/float.rb +26 -21
- data/spec/filters/bugs/freeze.rb +88 -0
- data/spec/filters/bugs/hash.rb +39 -38
- data/spec/filters/bugs/integer.rb +57 -44
- data/spec/filters/bugs/io.rb +1 -1
- data/spec/filters/bugs/kernel.rb +349 -269
- data/spec/filters/bugs/language.rb +220 -188
- data/spec/filters/bugs/main.rb +5 -3
- data/spec/filters/bugs/marshal.rb +38 -38
- data/spec/filters/bugs/math.rb +2 -1
- data/spec/filters/bugs/method.rb +73 -62
- data/spec/filters/bugs/module.rb +163 -143
- data/spec/filters/bugs/numeric.rb +6 -6
- data/spec/filters/bugs/objectspace.rb +16 -16
- data/spec/filters/bugs/openstruct.rb +1 -1
- data/spec/filters/bugs/pack_unpack.rb +51 -51
- data/spec/filters/bugs/pathname.rb +7 -7
- data/spec/filters/bugs/proc.rb +63 -63
- data/spec/filters/bugs/random.rb +7 -6
- data/spec/filters/bugs/range.rb +12 -9
- data/spec/filters/bugs/rational.rb +8 -7
- data/spec/filters/bugs/regexp.rb +49 -48
- data/spec/filters/bugs/ruby-32.rb +56 -0
- data/spec/filters/bugs/set.rb +30 -30
- data/spec/filters/bugs/singleton.rb +4 -4
- data/spec/filters/bugs/string.rb +187 -99
- data/spec/filters/bugs/stringio.rb +7 -0
- data/spec/filters/bugs/stringscanner.rb +68 -68
- data/spec/filters/bugs/struct.rb +11 -9
- data/spec/filters/bugs/symbol.rb +1 -1
- data/spec/filters/bugs/time.rb +78 -63
- data/spec/filters/bugs/trace_point.rb +4 -4
- data/spec/filters/bugs/unboundmethod.rb +32 -17
- data/spec/filters/bugs/warnings.rb +8 -12
- data/spec/filters/unsupported/array.rb +24 -107
- data/spec/filters/unsupported/basicobject.rb +12 -12
- data/spec/filters/unsupported/bignum.rb +27 -52
- data/spec/filters/unsupported/class.rb +1 -2
- data/spec/filters/unsupported/delegator.rb +3 -3
- data/spec/filters/unsupported/enumerable.rb +2 -9
- data/spec/filters/unsupported/enumerator.rb +2 -11
- data/spec/filters/unsupported/file.rb +1 -1
- data/spec/filters/unsupported/float.rb +28 -47
- data/spec/filters/unsupported/hash.rb +8 -14
- data/spec/filters/unsupported/integer.rb +75 -91
- data/spec/filters/unsupported/kernel.rb +17 -35
- data/spec/filters/unsupported/language.rb +11 -19
- data/spec/filters/unsupported/marshal.rb +22 -41
- data/spec/filters/unsupported/matchdata.rb +28 -52
- data/spec/filters/unsupported/math.rb +1 -1
- data/spec/filters/unsupported/privacy.rb +229 -285
- data/spec/filters/unsupported/range.rb +1 -5
- data/spec/filters/unsupported/regexp.rb +40 -66
- data/spec/filters/unsupported/set.rb +2 -2
- data/spec/filters/unsupported/singleton.rb +4 -4
- data/spec/filters/unsupported/string.rb +305 -508
- data/spec/filters/unsupported/struct.rb +3 -4
- data/spec/filters/unsupported/symbol.rb +15 -18
- data/spec/filters/unsupported/thread.rb +1 -7
- data/spec/filters/unsupported/time.rb +159 -202
- data/spec/filters/unsupported/usage_of_files.rb +170 -259
- data/spec/lib/builder_spec.rb +14 -4
- data/spec/lib/rewriters/forward_args_spec.rb +32 -12
- data/spec/mspec-opal/runner.rb +2 -0
- data/spec/ruby_specs +4 -0
- data/stdlib/deno/base.rb +28 -0
- data/stdlib/deno/file.rb +340 -0
- data/stdlib/{headless_chrome.rb → headless_browser/base.rb} +1 -1
- data/stdlib/headless_browser/file.rb +15 -0
- data/stdlib/headless_browser.rb +4 -0
- data/stdlib/native.rb +1 -1
- data/stdlib/nodejs/file.rb +5 -0
- data/stdlib/opal/platform.rb +8 -6
- data/stdlib/opal-platform.rb +14 -8
- data/stdlib/set.rb +1 -258
- data/tasks/benchmarking.rake +62 -19
- data/tasks/building.rake +6 -2
- data/tasks/performance.rake +1 -1
- data/tasks/testing.rake +5 -3
- data/test/nodejs/test_file.rb +29 -10
- data/test/opal/http_server.rb +28 -11
- data/test/opal/unsupported_and_bugs.rb +2 -1
- metadata +92 -53
- data/lib/opal/cli_runners/node_modules/ultron/LICENSE +0 -22
- data/lib/opal/cli_runners/node_modules/ultron/index.js +0 -138
- data/lib/opal/cli_runners/node_modules/ultron/package.json +0 -112
- data/lib/opal/cli_runners/node_modules/ws/SECURITY.md +0 -33
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.fallback.js +0 -56
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.js +0 -15
- data/lib/opal/cli_runners/node_modules/ws/lib/ErrorCodes.js +0 -28
- data/lib/opal/cli_runners/node_modules/ws/lib/EventTarget.js +0 -158
- data/lib/opal/cli_runners/node_modules/ws/lib/Extensions.js +0 -69
- data/lib/opal/cli_runners/node_modules/ws/lib/PerMessageDeflate.js +0 -339
- data/lib/opal/cli_runners/node_modules/ws/lib/Receiver.js +0 -520
- data/lib/opal/cli_runners/node_modules/ws/lib/Sender.js +0 -438
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.fallback.js +0 -9
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.js +0 -17
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocket.js +0 -705
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocketServer.js +0 -336
- data/spec/filters/bugs/boolean.rb +0 -3
- data/spec/filters/bugs/matrix.rb +0 -3
- data/spec/filters/unsupported/fixnum.rb +0 -15
- data/spec/filters/unsupported/freeze.rb +0 -102
- data/spec/filters/unsupported/pathname.rb +0 -4
- data/spec/filters/unsupported/proc.rb +0 -4
- data/spec/filters/unsupported/random.rb +0 -5
- data/spec/filters/unsupported/taint.rb +0 -162
@@ -1,3 +1,5 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
1
3
|
const EventEmitter = require('events');
|
2
4
|
|
3
5
|
// wrapper around the Node.js ws module
|
@@ -5,7 +7,7 @@ const EventEmitter = require('events');
|
|
5
7
|
class WebSocketWrapper extends EventEmitter {
|
6
8
|
constructor(url) {
|
7
9
|
super();
|
8
|
-
this._ws = new WebSocket(url);
|
10
|
+
this._ws = new WebSocket(url); // eslint-disable-line no-undef
|
9
11
|
this._ws.onopen = () => {
|
10
12
|
this.emit('open');
|
11
13
|
};
|
@@ -24,8 +26,13 @@ class WebSocketWrapper extends EventEmitter {
|
|
24
26
|
this._ws.close();
|
25
27
|
}
|
26
28
|
|
27
|
-
send(data) {
|
28
|
-
|
29
|
+
send(data, callback) {
|
30
|
+
try {
|
31
|
+
this._ws.send(data);
|
32
|
+
callback();
|
33
|
+
} catch (err) {
|
34
|
+
callback(err);
|
35
|
+
}
|
29
36
|
}
|
30
37
|
}
|
31
38
|
|
@@ -1,128 +1,64 @@
|
|
1
1
|
{
|
2
|
-
"_args": [
|
3
|
-
[
|
4
|
-
{
|
5
|
-
"raw": "chrome-remote-interface@latest",
|
6
|
-
"scope": null,
|
7
|
-
"escapedName": "chrome-remote-interface",
|
8
|
-
"name": "chrome-remote-interface",
|
9
|
-
"rawSpec": "latest",
|
10
|
-
"spec": "latest",
|
11
|
-
"type": "tag"
|
12
|
-
},
|
13
|
-
"/Users/ilya/Work/opal/lib/opal/cli_runners"
|
14
|
-
]
|
15
|
-
],
|
16
|
-
"_from": "chrome-remote-interface@latest",
|
17
|
-
"_id": "chrome-remote-interface@0.23.3",
|
18
|
-
"_inCache": true,
|
19
|
-
"_location": "/chrome-remote-interface",
|
20
|
-
"_nodeVersion": "8.0.0",
|
21
|
-
"_npmOperationalInternal": {
|
22
|
-
"host": "s3://npm-registry-packages",
|
23
|
-
"tmp": "tmp/chrome-remote-interface-0.23.3.tgz_1498479219316_0.9849931886419654"
|
24
|
-
},
|
25
|
-
"_npmUser": {
|
26
|
-
"name": "cyrus-and",
|
27
|
-
"email": "cyrus.and@gmail.com"
|
28
|
-
},
|
29
|
-
"_npmVersion": "5.0.3",
|
30
|
-
"_phantomChildren": {},
|
31
|
-
"_requested": {
|
32
|
-
"raw": "chrome-remote-interface@latest",
|
33
|
-
"scope": null,
|
34
|
-
"escapedName": "chrome-remote-interface",
|
35
2
|
"name": "chrome-remote-interface",
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
"
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
"browser": "chrome-remote-interface.js",
|
56
|
-
"bugs": {
|
57
|
-
"url": "http://github.com/cyrus-and/chrome-remote-interface/issues"
|
58
|
-
},
|
59
|
-
"contributors": [
|
60
|
-
{
|
61
|
-
"name": "Andrey Sidorov",
|
62
|
-
"email": "sidoares@yandex.ru"
|
3
|
+
"author": "Andrea Cardaci <cyrus.and@gmail.com>",
|
4
|
+
"license": "MIT",
|
5
|
+
"contributors": [
|
6
|
+
"Andrey Sidorov <sidoares@yandex.ru>",
|
7
|
+
"Greg Cochard <greg@gregcochard.com>"
|
8
|
+
],
|
9
|
+
"description": "Chrome Debugging Protocol interface",
|
10
|
+
"keywords": [
|
11
|
+
"chrome",
|
12
|
+
"debug",
|
13
|
+
"protocol",
|
14
|
+
"remote",
|
15
|
+
"interface"
|
16
|
+
],
|
17
|
+
"homepage": "https://github.com/cyrus-and/chrome-remote-interface",
|
18
|
+
"version": "0.31.3",
|
19
|
+
"repository": {
|
20
|
+
"type": "git",
|
21
|
+
"url": "git://github.com/cyrus-and/chrome-remote-interface.git"
|
63
22
|
},
|
64
|
-
{
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
"
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
"
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
"
|
86
|
-
"
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
"protocol",
|
105
|
-
"remote",
|
106
|
-
"interface"
|
107
|
-
],
|
108
|
-
"license": "MIT",
|
109
|
-
"maintainers": [
|
110
|
-
{
|
111
|
-
"name": "cyrus-and",
|
112
|
-
"email": "cyrus.and@gmail.com"
|
23
|
+
"bugs": {
|
24
|
+
"url": "http://github.com/cyrus-and/chrome-remote-interface/issues"
|
25
|
+
},
|
26
|
+
"engine-strict": {
|
27
|
+
"node": ">=8"
|
28
|
+
},
|
29
|
+
"dependencies": {
|
30
|
+
"commander": "2.11.x",
|
31
|
+
"ws": "^7.2.0"
|
32
|
+
},
|
33
|
+
"files": [
|
34
|
+
"lib",
|
35
|
+
"bin",
|
36
|
+
"index.js",
|
37
|
+
"chrome-remote-interface.js",
|
38
|
+
"webpack.config.js"
|
39
|
+
],
|
40
|
+
"bin": {
|
41
|
+
"chrome-remote-interface": "bin/client.js"
|
42
|
+
},
|
43
|
+
"main": "index.js",
|
44
|
+
"browser": "chrome-remote-interface.js",
|
45
|
+
"devDependencies": {
|
46
|
+
"babel-core": "^6.26.3",
|
47
|
+
"babel-loader": "8.x.x",
|
48
|
+
"babel-polyfill": "^6.26.0",
|
49
|
+
"babel-preset-env": "^1.7.0",
|
50
|
+
"eslint": "^8.8.0",
|
51
|
+
"json-loader": "^0.5.4",
|
52
|
+
"mocha": "^9.2.0",
|
53
|
+
"process": "^0.11.10",
|
54
|
+
"url": "^0.11.0",
|
55
|
+
"util": "^0.12.4",
|
56
|
+
"webpack": "^5.39.0",
|
57
|
+
"webpack-cli": "^4.7.2"
|
58
|
+
},
|
59
|
+
"scripts": {
|
60
|
+
"test": "./scripts/run-tests.sh",
|
61
|
+
"webpack": "webpack",
|
62
|
+
"prepare": "webpack"
|
113
63
|
}
|
114
|
-
],
|
115
|
-
"name": "chrome-remote-interface",
|
116
|
-
"optionalDependencies": {},
|
117
|
-
"readme": "ERROR: No README data found!",
|
118
|
-
"repository": {
|
119
|
-
"type": "git",
|
120
|
-
"url": "git://github.com/cyrus-and/chrome-remote-interface.git"
|
121
|
-
},
|
122
|
-
"scripts": {
|
123
|
-
"prepublish": "webpack",
|
124
|
-
"test": "./scripts/run-tests.sh",
|
125
|
-
"webpack": "webpack"
|
126
|
-
},
|
127
|
-
"version": "0.23.3"
|
128
64
|
}
|
@@ -1,13 +1,22 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
+
const TerserPlugin = require('terser-webpack-plugin');
|
3
4
|
const webpack = require('webpack');
|
4
5
|
|
5
6
|
function criWrapper(_, options, callback) {
|
6
|
-
window.criRequest(options, callback);
|
7
|
+
window.criRequest(options, callback); // eslint-disable-line no-undef
|
7
8
|
}
|
8
9
|
|
9
|
-
|
10
|
+
module.exports = {
|
11
|
+
mode: 'production',
|
10
12
|
resolve: {
|
13
|
+
fallback: {
|
14
|
+
'util': require.resolve('util/'),
|
15
|
+
'url': require.resolve('url/'),
|
16
|
+
'http': false,
|
17
|
+
'https': false,
|
18
|
+
'dns': false
|
19
|
+
},
|
11
20
|
alias: {
|
12
21
|
'ws': './websocket-wrapper.js'
|
13
22
|
}
|
@@ -17,39 +26,23 @@ const webpackConfig = {
|
|
17
26
|
'./external-request.js': `var (${criWrapper})`
|
18
27
|
}
|
19
28
|
],
|
20
|
-
module: {
|
21
|
-
loaders: [
|
22
|
-
{
|
23
|
-
test: /\.js$/,
|
24
|
-
exclude: /node_modules/,
|
25
|
-
loader: 'babel-loader'
|
26
|
-
},
|
27
|
-
{
|
28
|
-
test: /\.json$/,
|
29
|
-
loader: 'json'
|
30
|
-
}
|
31
|
-
]
|
32
|
-
},
|
33
29
|
plugins: [
|
30
|
+
new webpack.ProvidePlugin({
|
31
|
+
process: 'process/browser',
|
32
|
+
}),
|
34
33
|
],
|
35
|
-
|
34
|
+
optimization: {
|
35
|
+
minimizer: [
|
36
|
+
new TerserPlugin({
|
37
|
+
extractComments: false,
|
38
|
+
})
|
39
|
+
],
|
40
|
+
},
|
41
|
+
entry: ['babel-polyfill', './index.js'],
|
36
42
|
output: {
|
43
|
+
path: __dirname,
|
44
|
+
filename: 'chrome-remote-interface.js',
|
37
45
|
libraryTarget: process.env.TARGET || 'commonjs2',
|
38
|
-
library: 'CDP'
|
39
|
-
filename: 'chrome-remote-interface.js'
|
46
|
+
library: 'CDP'
|
40
47
|
}
|
41
48
|
};
|
42
|
-
|
43
|
-
if (process.env.DEBUG !== 'true') {
|
44
|
-
webpackConfig.plugins.push(new webpack.optimize.UglifyJsPlugin({
|
45
|
-
mangle: true,
|
46
|
-
compress: {
|
47
|
-
warnings: false
|
48
|
-
},
|
49
|
-
output: {
|
50
|
-
comments: false
|
51
|
-
}
|
52
|
-
}));
|
53
|
-
}
|
54
|
-
|
55
|
-
module.exports = webpackConfig;
|
@@ -0,0 +1,298 @@
|
|
1
|
+
|
2
|
+
2.11.0 / 2017-07-03
|
3
|
+
==================
|
4
|
+
|
5
|
+
* Fix help section order and padding (#652)
|
6
|
+
* feature: support for signals to subcommands (#632)
|
7
|
+
* Fixed #37, --help should not display first (#447)
|
8
|
+
* Fix translation errors. (#570)
|
9
|
+
* Add package-lock.json
|
10
|
+
* Remove engines
|
11
|
+
* Upgrade package version
|
12
|
+
* Prefix events to prevent conflicts between commands and options (#494)
|
13
|
+
* Removing dependency on graceful-readlink
|
14
|
+
* Support setting name in #name function and make it chainable
|
15
|
+
* Add .vscode directory to .gitignore (Visual Studio Code metadata)
|
16
|
+
* Updated link to ruby commander in readme files
|
17
|
+
|
18
|
+
2.10.0 / 2017-06-19
|
19
|
+
==================
|
20
|
+
|
21
|
+
* Update .travis.yml. drop support for older node.js versions.
|
22
|
+
* Fix require arguments in README.md
|
23
|
+
* On SemVer you do not start from 0.0.1
|
24
|
+
* Add missing semi colon in readme
|
25
|
+
* Add save param to npm install
|
26
|
+
* node v6 travis test
|
27
|
+
* Update Readme_zh-CN.md
|
28
|
+
* Allow literal '--' to be passed-through as an argument
|
29
|
+
* Test subcommand alias help
|
30
|
+
* link build badge to master branch
|
31
|
+
* Support the alias of Git style sub-command
|
32
|
+
* added keyword commander for better search result on npm
|
33
|
+
* Fix Sub-Subcommands
|
34
|
+
* test node.js stable
|
35
|
+
* Fixes TypeError when a command has an option called `--description`
|
36
|
+
* Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets.
|
37
|
+
* Add chinese Readme file
|
38
|
+
|
39
|
+
2.9.0 / 2015-10-13
|
40
|
+
==================
|
41
|
+
|
42
|
+
* Add option `isDefault` to set default subcommand #415 @Qix-
|
43
|
+
* Add callback to allow filtering or post-processing of help text #434 @djulien
|
44
|
+
* Fix `undefined` text in help information close #414 #416 @zhiyelee
|
45
|
+
|
46
|
+
2.8.1 / 2015-04-22
|
47
|
+
==================
|
48
|
+
|
49
|
+
* Back out `support multiline description` Close #396 #397
|
50
|
+
|
51
|
+
2.8.0 / 2015-04-07
|
52
|
+
==================
|
53
|
+
|
54
|
+
* Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee
|
55
|
+
* Fix bug in Git-style sub-commands #372 @zhiyelee
|
56
|
+
* Allow commands to be hidden from help #383 @tonylukasavage
|
57
|
+
* When git-style sub-commands are in use, yet none are called, display help #382 @claylo
|
58
|
+
* Add ability to specify arguments syntax for top-level command #258 @rrthomas
|
59
|
+
* Support multiline descriptions #208 @zxqfox
|
60
|
+
|
61
|
+
2.7.1 / 2015-03-11
|
62
|
+
==================
|
63
|
+
|
64
|
+
* Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367.
|
65
|
+
|
66
|
+
2.7.0 / 2015-03-09
|
67
|
+
==================
|
68
|
+
|
69
|
+
* Fix git-style bug when installed globally. Close #335 #349 @zhiyelee
|
70
|
+
* Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage
|
71
|
+
* Add support for camelCase on `opts()`. Close #353 @nkzawa
|
72
|
+
* Add node.js 0.12 and io.js to travis.yml
|
73
|
+
* Allow RegEx options. #337 @palanik
|
74
|
+
* Fixes exit code when sub-command failing. Close #260 #332 @pirelenito
|
75
|
+
* git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee
|
76
|
+
|
77
|
+
2.6.0 / 2014-12-30
|
78
|
+
==================
|
79
|
+
|
80
|
+
* added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee
|
81
|
+
* Add application description to the help msg. Close #112 @dalssoft
|
82
|
+
|
83
|
+
2.5.1 / 2014-12-15
|
84
|
+
==================
|
85
|
+
|
86
|
+
* fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee
|
87
|
+
|
88
|
+
2.5.0 / 2014-10-24
|
89
|
+
==================
|
90
|
+
|
91
|
+
* add support for variadic arguments. Closes #277 @whitlockjc
|
92
|
+
|
93
|
+
2.4.0 / 2014-10-17
|
94
|
+
==================
|
95
|
+
|
96
|
+
* fixed a bug on executing the coercion function of subcommands option. Closes #270
|
97
|
+
* added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage
|
98
|
+
* added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage
|
99
|
+
* fixed a bug on subcommand name. Closes #248 @jonathandelgado
|
100
|
+
* fixed function normalize doesn’t honor option terminator. Closes #216 @abbr
|
101
|
+
|
102
|
+
2.3.0 / 2014-07-16
|
103
|
+
==================
|
104
|
+
|
105
|
+
* add command alias'. Closes PR #210
|
106
|
+
* fix: Typos. Closes #99
|
107
|
+
* fix: Unused fs module. Closes #217
|
108
|
+
|
109
|
+
2.2.0 / 2014-03-29
|
110
|
+
==================
|
111
|
+
|
112
|
+
* add passing of previous option value
|
113
|
+
* fix: support subcommands on windows. Closes #142
|
114
|
+
* Now the defaultValue passed as the second argument of the coercion function.
|
115
|
+
|
116
|
+
2.1.0 / 2013-11-21
|
117
|
+
==================
|
118
|
+
|
119
|
+
* add: allow cflag style option params, unit test, fixes #174
|
120
|
+
|
121
|
+
2.0.0 / 2013-07-18
|
122
|
+
==================
|
123
|
+
|
124
|
+
* remove input methods (.prompt, .confirm, etc)
|
125
|
+
|
126
|
+
1.3.2 / 2013-07-18
|
127
|
+
==================
|
128
|
+
|
129
|
+
* add support for sub-commands to co-exist with the original command
|
130
|
+
|
131
|
+
1.3.1 / 2013-07-18
|
132
|
+
==================
|
133
|
+
|
134
|
+
* add quick .runningCommand hack so you can opt-out of other logic when running a sub command
|
135
|
+
|
136
|
+
1.3.0 / 2013-07-09
|
137
|
+
==================
|
138
|
+
|
139
|
+
* add EACCES error handling
|
140
|
+
* fix sub-command --help
|
141
|
+
|
142
|
+
1.2.0 / 2013-06-13
|
143
|
+
==================
|
144
|
+
|
145
|
+
* allow "-" hyphen as an option argument
|
146
|
+
* support for RegExp coercion
|
147
|
+
|
148
|
+
1.1.1 / 2012-11-20
|
149
|
+
==================
|
150
|
+
|
151
|
+
* add more sub-command padding
|
152
|
+
* fix .usage() when args are present. Closes #106
|
153
|
+
|
154
|
+
1.1.0 / 2012-11-16
|
155
|
+
==================
|
156
|
+
|
157
|
+
* add git-style executable subcommand support. Closes #94
|
158
|
+
|
159
|
+
1.0.5 / 2012-10-09
|
160
|
+
==================
|
161
|
+
|
162
|
+
* fix `--name` clobbering. Closes #92
|
163
|
+
* fix examples/help. Closes #89
|
164
|
+
|
165
|
+
1.0.4 / 2012-09-03
|
166
|
+
==================
|
167
|
+
|
168
|
+
* add `outputHelp()` method.
|
169
|
+
|
170
|
+
1.0.3 / 2012-08-30
|
171
|
+
==================
|
172
|
+
|
173
|
+
* remove invalid .version() defaulting
|
174
|
+
|
175
|
+
1.0.2 / 2012-08-24
|
176
|
+
==================
|
177
|
+
|
178
|
+
* add `--foo=bar` support [arv]
|
179
|
+
* fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus]
|
180
|
+
|
181
|
+
1.0.1 / 2012-08-03
|
182
|
+
==================
|
183
|
+
|
184
|
+
* fix issue #56
|
185
|
+
* fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode())
|
186
|
+
|
187
|
+
1.0.0 / 2012-07-05
|
188
|
+
==================
|
189
|
+
|
190
|
+
* add support for optional option descriptions
|
191
|
+
* add defaulting of `.version()` to package.json's version
|
192
|
+
|
193
|
+
0.6.1 / 2012-06-01
|
194
|
+
==================
|
195
|
+
|
196
|
+
* Added: append (yes or no) on confirmation
|
197
|
+
* Added: allow node.js v0.7.x
|
198
|
+
|
199
|
+
0.6.0 / 2012-04-10
|
200
|
+
==================
|
201
|
+
|
202
|
+
* Added `.prompt(obj, callback)` support. Closes #49
|
203
|
+
* Added default support to .choose(). Closes #41
|
204
|
+
* Fixed the choice example
|
205
|
+
|
206
|
+
0.5.1 / 2011-12-20
|
207
|
+
==================
|
208
|
+
|
209
|
+
* Fixed `password()` for recent nodes. Closes #36
|
210
|
+
|
211
|
+
0.5.0 / 2011-12-04
|
212
|
+
==================
|
213
|
+
|
214
|
+
* Added sub-command option support [itay]
|
215
|
+
|
216
|
+
0.4.3 / 2011-12-04
|
217
|
+
==================
|
218
|
+
|
219
|
+
* Fixed custom help ordering. Closes #32
|
220
|
+
|
221
|
+
0.4.2 / 2011-11-24
|
222
|
+
==================
|
223
|
+
|
224
|
+
* Added travis support
|
225
|
+
* Fixed: line-buffered input automatically trimmed. Closes #31
|
226
|
+
|
227
|
+
0.4.1 / 2011-11-18
|
228
|
+
==================
|
229
|
+
|
230
|
+
* Removed listening for "close" on --help
|
231
|
+
|
232
|
+
0.4.0 / 2011-11-15
|
233
|
+
==================
|
234
|
+
|
235
|
+
* Added support for `--`. Closes #24
|
236
|
+
|
237
|
+
0.3.3 / 2011-11-14
|
238
|
+
==================
|
239
|
+
|
240
|
+
* Fixed: wait for close event when writing help info [Jerry Hamlet]
|
241
|
+
|
242
|
+
0.3.2 / 2011-11-01
|
243
|
+
==================
|
244
|
+
|
245
|
+
* Fixed long flag definitions with values [felixge]
|
246
|
+
|
247
|
+
0.3.1 / 2011-10-31
|
248
|
+
==================
|
249
|
+
|
250
|
+
* Changed `--version` short flag to `-V` from `-v`
|
251
|
+
* Changed `.version()` so it's configurable [felixge]
|
252
|
+
|
253
|
+
0.3.0 / 2011-10-31
|
254
|
+
==================
|
255
|
+
|
256
|
+
* Added support for long flags only. Closes #18
|
257
|
+
|
258
|
+
0.2.1 / 2011-10-24
|
259
|
+
==================
|
260
|
+
|
261
|
+
* "node": ">= 0.4.x < 0.7.0". Closes #20
|
262
|
+
|
263
|
+
0.2.0 / 2011-09-26
|
264
|
+
==================
|
265
|
+
|
266
|
+
* Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs]
|
267
|
+
|
268
|
+
0.1.0 / 2011-08-24
|
269
|
+
==================
|
270
|
+
|
271
|
+
* Added support for custom `--help` output
|
272
|
+
|
273
|
+
0.0.5 / 2011-08-18
|
274
|
+
==================
|
275
|
+
|
276
|
+
* Changed: when the user enters nothing prompt for password again
|
277
|
+
* Fixed issue with passwords beginning with numbers [NuckChorris]
|
278
|
+
|
279
|
+
0.0.4 / 2011-08-15
|
280
|
+
==================
|
281
|
+
|
282
|
+
* Fixed `Commander#args`
|
283
|
+
|
284
|
+
0.0.3 / 2011-08-15
|
285
|
+
==================
|
286
|
+
|
287
|
+
* Added default option value support
|
288
|
+
|
289
|
+
0.0.2 / 2011-08-15
|
290
|
+
==================
|
291
|
+
|
292
|
+
* Added mask support to `Command#password(str[, mask], fn)`
|
293
|
+
* Added `Command#password(str, fn)`
|
294
|
+
|
295
|
+
0.0.1 / 2010-01-03
|
296
|
+
==================
|
297
|
+
|
298
|
+
* Initial release
|
@@ -0,0 +1,22 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|