fsevents 1.2.9 → 1.2.11
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/binding.gyp +1 -9
- package/fsevents.js +1 -3
- package/node_modules/abbrev/package.json +10 -13
- package/node_modules/ansi-regex/package.json +10 -13
- package/node_modules/aproba/package.json +10 -13
- package/node_modules/are-we-there-yet/package.json +10 -13
- package/node_modules/balanced-match/package.json +10 -13
- package/node_modules/brace-expansion/package.json +10 -13
- package/node_modules/chownr/chownr.js +47 -10
- package/node_modules/chownr/package.json +15 -18
- package/node_modules/code-point-at/package.json +10 -13
- package/node_modules/concat-map/package.json +5 -8
- package/node_modules/console-control-strings/package.json +10 -13
- package/node_modules/core-util-is/package.json +10 -13
- package/node_modules/debug/README.md +0 -18
- package/node_modules/debug/dist/debug.js +2 -28
- package/node_modules/debug/node.js +1 -0
- package/node_modules/debug/package.json +15 -30
- package/node_modules/debug/src/browser.js +103 -187
- package/node_modules/debug/src/common.js +240 -257
- package/node_modules/debug/src/index.js +5 -3
- package/node_modules/debug/src/node.js +82 -165
- package/node_modules/deep-extend/package.json +10 -13
- package/node_modules/delegates/package.json +10 -13
- package/node_modules/detect-libc/package.json +10 -13
- package/node_modules/fs-minipass/index.js +2 -1
- package/node_modules/fs-minipass/package.json +21 -21
- package/node_modules/fs.realpath/package.json +10 -13
- package/node_modules/gauge/package.json +10 -13
- package/node_modules/glob/LICENSE +6 -0
- package/node_modules/glob/README.md +8 -1
- package/node_modules/glob/package.json +17 -17
- package/node_modules/has-unicode/package.json +10 -13
- package/node_modules/iconv-lite/package.json +10 -13
- package/node_modules/ignore-walk/README.md +1 -1
- package/node_modules/ignore-walk/index.js +9 -5
- package/node_modules/ignore-walk/package.json +19 -19
- package/node_modules/inflight/package.json +10 -13
- package/node_modules/inherits/inherits.js +2 -0
- package/node_modules/inherits/inherits_browser.js +18 -14
- package/node_modules/inherits/package.json +16 -19
- package/node_modules/ini/package.json +10 -13
- package/node_modules/is-fullwidth-code-point/package.json +10 -13
- package/node_modules/isarray/package.json +10 -13
- package/node_modules/minimatch/package.json +10 -13
- package/node_modules/minimist/package.json +5 -8
- package/node_modules/minipass/README.md +486 -4
- package/node_modules/minipass/index.js +190 -28
- package/node_modules/minipass/package.json +20 -20
- package/node_modules/minizlib/README.md +36 -27
- package/node_modules/minizlib/constants.js +73 -4
- package/node_modules/minizlib/index.js +137 -152
- package/node_modules/minizlib/package.json +15 -18
- package/node_modules/mkdirp/package.json +10 -13
- package/node_modules/ms/index.js +2 -2
- package/node_modules/ms/package.json +14 -17
- package/node_modules/ms/readme.md +1 -1
- package/node_modules/needle/lib/needle.js +2 -0
- package/node_modules/needle/package.json +15 -18
- package/node_modules/needle/test/headers_spec.js +1 -1
- package/node_modules/node-pre-gyp/CHANGELOG.md +11 -0
- package/node_modules/node-pre-gyp/lib/install.js +44 -14
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +240 -0
- package/node_modules/node-pre-gyp/lib/util/napi.js +3 -2
- package/node_modules/node-pre-gyp/package.json +14 -17
- package/node_modules/nopt/package.json +10 -13
- package/node_modules/npm-bundled/index.js +13 -5
- package/node_modules/npm-bundled/package.json +17 -17
- package/node_modules/npm-normalize-package-bin/.github/settings.yml +2 -0
- package/node_modules/npm-normalize-package-bin/.npmignore +24 -0
- package/node_modules/npm-normalize-package-bin/LICENSE +15 -0
- package/node_modules/npm-normalize-package-bin/README.md +14 -0
- package/node_modules/npm-normalize-package-bin/index.js +60 -0
- package/node_modules/npm-normalize-package-bin/package-lock.json +3529 -0
- package/node_modules/npm-normalize-package-bin/package.json +57 -0
- package/node_modules/npm-normalize-package-bin/test/array.js +37 -0
- package/node_modules/npm-normalize-package-bin/test/nobin.js +35 -0
- package/node_modules/npm-normalize-package-bin/test/object.js +141 -0
- package/node_modules/npm-normalize-package-bin/test/string.js +37 -0
- package/node_modules/npm-packlist/index.js +55 -16
- package/node_modules/npm-packlist/package.json +24 -20
- package/node_modules/npmlog/package.json +10 -13
- package/node_modules/number-is-nan/package.json +10 -13
- package/node_modules/object-assign/package.json +10 -13
- package/node_modules/once/package.json +10 -13
- package/node_modules/os-homedir/package.json +10 -13
- package/node_modules/os-tmpdir/package.json +10 -13
- package/node_modules/osenv/package.json +10 -13
- package/node_modules/path-is-absolute/package.json +10 -13
- package/node_modules/process-nextick-args/index.js +2 -1
- package/node_modules/process-nextick-args/package.json +14 -17
- package/node_modules/rc/node_modules/minimist/package.json +10 -13
- package/node_modules/rc/package.json +10 -13
- package/node_modules/readable-stream/package.json +10 -13
- package/node_modules/rimraf/package.json +14 -17
- package/node_modules/rimraf/rimraf.js +9 -1
- package/node_modules/safe-buffer/package.json +10 -13
- package/node_modules/safer-buffer/package.json +10 -13
- package/node_modules/sax/package.json +10 -13
- package/node_modules/semver/README.md +12 -11
- package/node_modules/semver/package.json +14 -17
- package/node_modules/set-blocking/package.json +10 -13
- package/node_modules/signal-exit/package.json +10 -13
- package/node_modules/string-width/package.json +10 -13
- package/node_modules/string_decoder/package.json +10 -13
- package/node_modules/strip-ansi/package.json +10 -13
- package/node_modules/strip-json-comments/package.json +10 -13
- package/node_modules/tar/lib/large-numbers.js +32 -27
- package/node_modules/tar/lib/mkdir.js +2 -2
- package/node_modules/tar/lib/parse.js +6 -1
- package/node_modules/tar/lib/read-entry.js +4 -0
- package/node_modules/tar/lib/write-entry.js +2 -2
- package/node_modules/tar/package.json +25 -24
- package/node_modules/util-deprecate/package.json +10 -13
- package/node_modules/wide-align/package.json +10 -13
- package/node_modules/wrappy/package.json +10 -13
- package/node_modules/yallist/package.json +14 -17
- package/node_modules/yallist/yallist.js +50 -0
- package/package.json +4 -14
- package/install.js +0 -7
- package/node_modules/needle/.npmignore +0 -6
- package/node_modules/needle/package-lock.json +0 -395
- package/node_modules/needle/test/keys/ssl.cert +0 -21
- package/node_modules/needle/test/keys/ssl.key +0 -27
@@ -1,32 +1,27 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
[
|
4
|
-
"core-util-is@1.0.2",
|
5
|
-
"/Users/pipobscure/fsevents"
|
6
|
-
]
|
7
|
-
],
|
8
|
-
"_from": "core-util-is@1.0.2",
|
2
|
+
"_from": "core-util-is@~1.0.0",
|
9
3
|
"_id": "core-util-is@1.0.2",
|
10
4
|
"_inBundle": false,
|
11
5
|
"_integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
12
6
|
"_location": "/core-util-is",
|
13
7
|
"_phantomChildren": {},
|
14
8
|
"_requested": {
|
15
|
-
"type": "
|
9
|
+
"type": "range",
|
16
10
|
"registry": true,
|
17
|
-
"raw": "core-util-is
|
11
|
+
"raw": "core-util-is@~1.0.0",
|
18
12
|
"name": "core-util-is",
|
19
13
|
"escapedName": "core-util-is",
|
20
|
-
"rawSpec": "1.0.
|
14
|
+
"rawSpec": "~1.0.0",
|
21
15
|
"saveSpec": null,
|
22
|
-
"fetchSpec": "1.0.
|
16
|
+
"fetchSpec": "~1.0.0"
|
23
17
|
},
|
24
18
|
"_requiredBy": [
|
25
19
|
"/readable-stream"
|
26
20
|
],
|
27
21
|
"_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
28
|
-
"
|
29
|
-
"
|
22
|
+
"_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
|
23
|
+
"_spec": "core-util-is@~1.0.0",
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/readable-stream",
|
30
25
|
"author": {
|
31
26
|
"name": "Isaac Z. Schlueter",
|
32
27
|
"email": "i@izs.me",
|
@@ -35,6 +30,8 @@
|
|
35
30
|
"bugs": {
|
36
31
|
"url": "https://github.com/isaacs/core-util-is/issues"
|
37
32
|
},
|
33
|
+
"bundleDependencies": false,
|
34
|
+
"deprecated": false,
|
38
35
|
"description": "The `util.is*` functions introduced in Node v0.12.",
|
39
36
|
"devDependencies": {
|
40
37
|
"tap": "^2.3.0"
|
@@ -317,24 +317,6 @@ $ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(
|
|
317
317
|
=> false
|
318
318
|
```
|
319
319
|
|
320
|
-
`disable()`
|
321
|
-
|
322
|
-
Will disable all namespaces. The functions returns the namespaces currently
|
323
|
-
enabled (and skipped). This can be useful if you want to disable debugging
|
324
|
-
temporarily without knowing what was enabled to begin with.
|
325
|
-
|
326
|
-
For example:
|
327
|
-
|
328
|
-
```js
|
329
|
-
let debug = require('debug');
|
330
|
-
debug.enable('foo:*,-foo:bar');
|
331
|
-
let namespaces = debug.disable();
|
332
|
-
debug.enable(namespaces);
|
333
|
-
```
|
334
|
-
|
335
|
-
Note: There is no guarantee that the string will be identical to the initial
|
336
|
-
enable string, but semantically they will be identical.
|
337
|
-
|
338
320
|
## Checking whether a debug target is enabled
|
339
321
|
|
340
322
|
After you've created a debug instance, you can determine whether or not it is
|
@@ -1,13 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
4
|
-
|
5
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
6
|
-
|
7
|
-
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
8
|
-
|
9
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
10
|
-
|
11
3
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
12
4
|
|
13
5
|
(function (f) {
|
@@ -602,9 +594,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
602
594
|
}
|
603
595
|
|
604
596
|
function extend(namespace, delimiter) {
|
605
|
-
|
606
|
-
newDebug.log = this.log;
|
607
|
-
return newDebug;
|
597
|
+
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
608
598
|
}
|
609
599
|
/**
|
610
600
|
* Enables a debug mode by namespaces. This can include modes
|
@@ -646,17 +636,12 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
646
636
|
/**
|
647
637
|
* Disable debug output.
|
648
638
|
*
|
649
|
-
* @return {String} namespaces
|
650
639
|
* @api public
|
651
640
|
*/
|
652
641
|
|
653
642
|
|
654
643
|
function disable() {
|
655
|
-
var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {
|
656
|
-
return '-' + namespace;
|
657
|
-
}))).join(',');
|
658
644
|
createDebug.enable('');
|
659
|
-
return namespaces;
|
660
645
|
}
|
661
646
|
/**
|
662
647
|
* Returns true if the given mode name is enabled, false otherwise.
|
@@ -690,18 +675,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
690
675
|
return false;
|
691
676
|
}
|
692
677
|
/**
|
693
|
-
* Convert regexp to namespace
|
694
|
-
*
|
695
|
-
* @param {RegExp} regxep
|
696
|
-
* @return {String} namespace
|
697
|
-
* @api private
|
698
|
-
*/
|
699
|
-
|
700
|
-
|
701
|
-
function toNamespace(regexp) {
|
702
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
|
703
|
-
}
|
704
|
-
/**
|
705
678
|
* Coerce `val`.
|
706
679
|
*
|
707
680
|
* @param {Mixed} val
|
@@ -910,3 +883,4 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
910
883
|
}]
|
911
884
|
}, {}, [4])(4);
|
912
885
|
});
|
886
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = require('./src/node');
|
@@ -1,32 +1,27 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
4
|
-
"debug@4.1.1",
|
5
|
-
"/Users/pipobscure/fsevents"
|
6
|
-
]
|
7
|
-
],
|
8
|
-
"_from": "debug@4.1.1",
|
9
|
-
"_id": "debug@4.1.1",
|
2
|
+
"_from": "debug@^3.2.6",
|
3
|
+
"_id": "debug@3.2.6",
|
10
4
|
"_inBundle": false,
|
11
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
12
6
|
"_location": "/debug",
|
13
7
|
"_phantomChildren": {},
|
14
8
|
"_requested": {
|
15
|
-
"type": "
|
9
|
+
"type": "range",
|
16
10
|
"registry": true,
|
17
|
-
"raw": "debug
|
11
|
+
"raw": "debug@^3.2.6",
|
18
12
|
"name": "debug",
|
19
13
|
"escapedName": "debug",
|
20
|
-
"rawSpec": "
|
14
|
+
"rawSpec": "^3.2.6",
|
21
15
|
"saveSpec": null,
|
22
|
-
"fetchSpec": "
|
16
|
+
"fetchSpec": "^3.2.6"
|
23
17
|
},
|
24
18
|
"_requiredBy": [
|
25
19
|
"/needle"
|
26
20
|
],
|
27
|
-
"_resolved": "https://registry.npmjs.org/debug/-/debug-
|
28
|
-
"
|
29
|
-
"
|
21
|
+
"_resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
22
|
+
"_shasum": "e83d17de16d8a7efb7717edbe5fb10135eee629b",
|
23
|
+
"_spec": "debug@^3.2.6",
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/needle",
|
30
25
|
"author": {
|
31
26
|
"name": "TJ Holowaychuk",
|
32
27
|
"email": "tj@vision-media.ca"
|
@@ -35,6 +30,7 @@
|
|
35
30
|
"bugs": {
|
36
31
|
"url": "https://github.com/visionmedia/debug/issues"
|
37
32
|
},
|
33
|
+
"bundleDependencies": false,
|
38
34
|
"contributors": [
|
39
35
|
{
|
40
36
|
"name": "Nathan Rajlich",
|
@@ -49,6 +45,7 @@
|
|
49
45
|
"dependencies": {
|
50
46
|
"ms": "^2.1.1"
|
51
47
|
},
|
48
|
+
"deprecated": false,
|
52
49
|
"description": "small debugging utility",
|
53
50
|
"devDependencies": {
|
54
51
|
"@babel/cli": "^7.0.0",
|
@@ -70,6 +67,7 @@
|
|
70
67
|
},
|
71
68
|
"files": [
|
72
69
|
"src",
|
70
|
+
"node.js",
|
73
71
|
"dist/debug.js",
|
74
72
|
"LICENSE",
|
75
73
|
"README.md"
|
@@ -87,19 +85,6 @@
|
|
87
85
|
"type": "git",
|
88
86
|
"url": "git://github.com/visionmedia/debug.git"
|
89
87
|
},
|
90
|
-
"scripts": {
|
91
|
-
"build": "npm run build:debug && npm run build:test",
|
92
|
-
"build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js",
|
93
|
-
"build:test": "babel -d dist test.js",
|
94
|
-
"clean": "rimraf dist coverage",
|
95
|
-
"lint": "xo",
|
96
|
-
"prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .",
|
97
|
-
"pretest:browser": "npm run build",
|
98
|
-
"test": "npm run test:node && npm run test:browser",
|
99
|
-
"test:browser": "karma start --single-run",
|
100
|
-
"test:coverage": "cat ./coverage/lcov.info | coveralls",
|
101
|
-
"test:node": "istanbul cover _mocha -- test.js"
|
102
|
-
},
|
103
88
|
"unpkg": "./dist/debug.js",
|
104
|
-
"version": "
|
89
|
+
"version": "3.2.6"
|
105
90
|
}
|
@@ -1,99 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
1
5
|
/* eslint-env browser */
|
2
6
|
|
3
7
|
/**
|
4
8
|
* This is the web browser implementation of `debug()`.
|
5
9
|
*/
|
6
|
-
|
7
10
|
exports.log = log;
|
8
11
|
exports.formatArgs = formatArgs;
|
9
12
|
exports.save = save;
|
10
13
|
exports.load = load;
|
11
14
|
exports.useColors = useColors;
|
12
15
|
exports.storage = localstorage();
|
13
|
-
|
14
16
|
/**
|
15
17
|
* Colors.
|
16
18
|
*/
|
17
19
|
|
18
|
-
exports.colors = [
|
19
|
-
'#0000CC',
|
20
|
-
'#0000FF',
|
21
|
-
'#0033CC',
|
22
|
-
'#0033FF',
|
23
|
-
'#0066CC',
|
24
|
-
'#0066FF',
|
25
|
-
'#0099CC',
|
26
|
-
'#0099FF',
|
27
|
-
'#00CC00',
|
28
|
-
'#00CC33',
|
29
|
-
'#00CC66',
|
30
|
-
'#00CC99',
|
31
|
-
'#00CCCC',
|
32
|
-
'#00CCFF',
|
33
|
-
'#3300CC',
|
34
|
-
'#3300FF',
|
35
|
-
'#3333CC',
|
36
|
-
'#3333FF',
|
37
|
-
'#3366CC',
|
38
|
-
'#3366FF',
|
39
|
-
'#3399CC',
|
40
|
-
'#3399FF',
|
41
|
-
'#33CC00',
|
42
|
-
'#33CC33',
|
43
|
-
'#33CC66',
|
44
|
-
'#33CC99',
|
45
|
-
'#33CCCC',
|
46
|
-
'#33CCFF',
|
47
|
-
'#6600CC',
|
48
|
-
'#6600FF',
|
49
|
-
'#6633CC',
|
50
|
-
'#6633FF',
|
51
|
-
'#66CC00',
|
52
|
-
'#66CC33',
|
53
|
-
'#9900CC',
|
54
|
-
'#9900FF',
|
55
|
-
'#9933CC',
|
56
|
-
'#9933FF',
|
57
|
-
'#99CC00',
|
58
|
-
'#99CC33',
|
59
|
-
'#CC0000',
|
60
|
-
'#CC0033',
|
61
|
-
'#CC0066',
|
62
|
-
'#CC0099',
|
63
|
-
'#CC00CC',
|
64
|
-
'#CC00FF',
|
65
|
-
'#CC3300',
|
66
|
-
'#CC3333',
|
67
|
-
'#CC3366',
|
68
|
-
'#CC3399',
|
69
|
-
'#CC33CC',
|
70
|
-
'#CC33FF',
|
71
|
-
'#CC6600',
|
72
|
-
'#CC6633',
|
73
|
-
'#CC9900',
|
74
|
-
'#CC9933',
|
75
|
-
'#CCCC00',
|
76
|
-
'#CCCC33',
|
77
|
-
'#FF0000',
|
78
|
-
'#FF0033',
|
79
|
-
'#FF0066',
|
80
|
-
'#FF0099',
|
81
|
-
'#FF00CC',
|
82
|
-
'#FF00FF',
|
83
|
-
'#FF3300',
|
84
|
-
'#FF3333',
|
85
|
-
'#FF3366',
|
86
|
-
'#FF3399',
|
87
|
-
'#FF33CC',
|
88
|
-
'#FF33FF',
|
89
|
-
'#FF6600',
|
90
|
-
'#FF6633',
|
91
|
-
'#FF9900',
|
92
|
-
'#FF9933',
|
93
|
-
'#FFCC00',
|
94
|
-
'#FFCC33'
|
95
|
-
];
|
96
|
-
|
20
|
+
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
97
21
|
/**
|
98
22
|
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
99
23
|
* and the Firebug extension (any Firefox version) are known
|
@@ -101,130 +25,123 @@ exports.colors = [
|
|
101
25
|
*
|
102
26
|
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
103
27
|
*/
|
104
|
-
|
105
28
|
// eslint-disable-next-line complexity
|
29
|
+
|
106
30
|
function useColors() {
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
// Internet Explorer and Edge do not support colors.
|
115
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
116
|
-
return false;
|
117
|
-
}
|
118
|
-
|
119
|
-
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
120
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
121
|
-
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
122
|
-
// Is firebug? http://stackoverflow.com/a/398120/376773
|
123
|
-
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
124
|
-
// Is firefox >= v31?
|
125
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
126
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
127
|
-
// Double check webkit in userAgent just in case we are in a worker
|
128
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
129
|
-
}
|
31
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
32
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
33
|
+
// explicitly
|
34
|
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
35
|
+
return true;
|
36
|
+
} // Internet Explorer and Edge do not support colors.
|
130
37
|
|
38
|
+
|
39
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
40
|
+
return false;
|
41
|
+
} // Is webkit? http://stackoverflow.com/a/16459606/376773
|
42
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
43
|
+
|
44
|
+
|
45
|
+
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
46
|
+
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
47
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
48
|
+
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
49
|
+
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
50
|
+
}
|
131
51
|
/**
|
132
52
|
* Colorize log arguments if enabled.
|
133
53
|
*
|
134
54
|
* @api public
|
135
55
|
*/
|
136
56
|
|
57
|
+
|
137
58
|
function formatArgs(args) {
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
lastC = index;
|
166
|
-
}
|
167
|
-
});
|
168
|
-
|
169
|
-
args.splice(lastC, 0, c);
|
59
|
+
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
|
60
|
+
|
61
|
+
if (!this.useColors) {
|
62
|
+
return;
|
63
|
+
}
|
64
|
+
|
65
|
+
var c = 'color: ' + this.color;
|
66
|
+
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
|
67
|
+
// arguments passed either before or after the %c, so we need to
|
68
|
+
// figure out the correct index to insert the CSS into
|
69
|
+
|
70
|
+
var index = 0;
|
71
|
+
var lastC = 0;
|
72
|
+
args[0].replace(/%[a-zA-Z%]/g, function (match) {
|
73
|
+
if (match === '%%') {
|
74
|
+
return;
|
75
|
+
}
|
76
|
+
|
77
|
+
index++;
|
78
|
+
|
79
|
+
if (match === '%c') {
|
80
|
+
// We only are interested in the *last* %c
|
81
|
+
// (the user may have provided their own)
|
82
|
+
lastC = index;
|
83
|
+
}
|
84
|
+
});
|
85
|
+
args.splice(lastC, 0, c);
|
170
86
|
}
|
171
|
-
|
172
87
|
/**
|
173
88
|
* Invokes `console.log()` when available.
|
174
89
|
* No-op when `console.log` is not a "function".
|
175
90
|
*
|
176
91
|
* @api public
|
177
92
|
*/
|
178
|
-
function log(...args) {
|
179
|
-
// This hackery is required for IE8/9, where
|
180
|
-
// the `console.log` function doesn't have 'apply'
|
181
|
-
return typeof console === 'object' &&
|
182
|
-
console.log &&
|
183
|
-
console.log(...args);
|
184
|
-
}
|
185
93
|
|
94
|
+
|
95
|
+
function log() {
|
96
|
+
var _console;
|
97
|
+
|
98
|
+
// This hackery is required for IE8/9, where
|
99
|
+
// the `console.log` function doesn't have 'apply'
|
100
|
+
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
|
101
|
+
}
|
186
102
|
/**
|
187
103
|
* Save `namespaces`.
|
188
104
|
*
|
189
105
|
* @param {String} namespaces
|
190
106
|
* @api private
|
191
107
|
*/
|
108
|
+
|
109
|
+
|
192
110
|
function save(namespaces) {
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
}
|
111
|
+
try {
|
112
|
+
if (namespaces) {
|
113
|
+
exports.storage.setItem('debug', namespaces);
|
114
|
+
} else {
|
115
|
+
exports.storage.removeItem('debug');
|
116
|
+
}
|
117
|
+
} catch (error) {// Swallow
|
118
|
+
// XXX (@Qix-) should we be logging these?
|
119
|
+
}
|
203
120
|
}
|
204
|
-
|
205
121
|
/**
|
206
122
|
* Load `namespaces`.
|
207
123
|
*
|
208
124
|
* @return {String} returns the previously persisted debug modes
|
209
125
|
* @api private
|
210
126
|
*/
|
127
|
+
|
128
|
+
|
211
129
|
function load() {
|
212
|
-
|
213
|
-
try {
|
214
|
-
r = exports.storage.getItem('debug');
|
215
|
-
} catch (error) {
|
216
|
-
// Swallow
|
217
|
-
// XXX (@Qix-) should we be logging these?
|
218
|
-
}
|
219
|
-
|
220
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
221
|
-
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
222
|
-
r = process.env.DEBUG;
|
223
|
-
}
|
224
|
-
|
225
|
-
return r;
|
226
|
-
}
|
130
|
+
var r;
|
227
131
|
|
132
|
+
try {
|
133
|
+
r = exports.storage.getItem('debug');
|
134
|
+
} catch (error) {} // Swallow
|
135
|
+
// XXX (@Qix-) should we be logging these?
|
136
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
137
|
+
|
138
|
+
|
139
|
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
140
|
+
r = process.env.DEBUG;
|
141
|
+
}
|
142
|
+
|
143
|
+
return r;
|
144
|
+
}
|
228
145
|
/**
|
229
146
|
* Localstorage attempts to return the localstorage.
|
230
147
|
*
|
@@ -236,29 +153,28 @@ function load() {
|
|
236
153
|
* @api private
|
237
154
|
*/
|
238
155
|
|
156
|
+
|
239
157
|
function localstorage() {
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
}
|
158
|
+
try {
|
159
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
160
|
+
// The Browser also has localStorage in the global context.
|
161
|
+
return localStorage;
|
162
|
+
} catch (error) {// Swallow
|
163
|
+
// XXX (@Qix-) should we be logging these?
|
164
|
+
}
|
248
165
|
}
|
249
166
|
|
250
167
|
module.exports = require('./common')(exports);
|
251
|
-
|
252
|
-
const {formatters} = module.exports;
|
253
|
-
|
168
|
+
var formatters = module.exports.formatters;
|
254
169
|
/**
|
255
170
|
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
256
171
|
*/
|
257
172
|
|
258
173
|
formatters.j = function (v) {
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
174
|
+
try {
|
175
|
+
return JSON.stringify(v);
|
176
|
+
} catch (error) {
|
177
|
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
178
|
+
}
|
264
179
|
};
|
180
|
+
|