epuber-stylus-source 0.54.8 → 0.56.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/vendor/{History.md → Changelog.md} +50 -0
- data/vendor/Readme.md +37 -23
- data/vendor/bin/stylus +1 -2
- data/vendor/lib/convert/css.js +1 -1
- data/vendor/lib/functions/acos.js +20 -0
- data/vendor/lib/functions/asin.js +21 -0
- data/vendor/lib/functions/atan.js +21 -0
- data/vendor/lib/functions/convert-angle.js +19 -0
- data/vendor/lib/functions/index.js +3 -0
- data/vendor/lib/functions/url.js +5 -5
- data/vendor/lib/lexer.js +1 -1
- data/vendor/lib/middleware.js +1 -2
- data/vendor/lib/visitor/compiler.js +2 -2
- data/vendor/lib/visitor/deps-resolver.js +3 -0
- data/vendor/node_modules/{cliui/node_modules/ansi-regex → ansi-regex}/index.d.ts +0 -0
- data/vendor/node_modules/ansi-regex/index.js +4 -4
- data/vendor/node_modules/ansi-regex/package.json +53 -51
- data/vendor/node_modules/ansi-regex/readme.md +35 -3
- data/vendor/node_modules/assertion-error/History.md +24 -0
- data/vendor/node_modules/{mkdirp/LICENSE → assertion-error/README.md} +22 -2
- data/vendor/node_modules/assertion-error/index.d.ts +11 -0
- data/vendor/node_modules/assertion-error/index.js +116 -0
- data/vendor/node_modules/assertion-error/package.json +29 -0
- data/vendor/node_modules/camelcase/index.d.ts +5 -3
- data/vendor/node_modules/camelcase/index.js +40 -18
- data/vendor/node_modules/camelcase/package.json +1 -1
- data/vendor/node_modules/camelcase/readme.md +21 -5
- data/vendor/node_modules/chai/CODEOWNERS +1 -0
- data/vendor/node_modules/chai/CODE_OF_CONDUCT.md +58 -0
- data/vendor/node_modules/chai/CONTRIBUTING.md +218 -0
- data/vendor/node_modules/chai/History.md +1059 -0
- data/vendor/node_modules/{should-type-adaptors → chai}/LICENSE +1 -1
- data/vendor/node_modules/chai/README.md +212 -0
- data/vendor/node_modules/chai/ReleaseNotes.md +737 -0
- data/vendor/node_modules/chai/bower.json +26 -0
- data/vendor/node_modules/chai/chai.js +11464 -0
- data/vendor/node_modules/chai/index.js +1 -0
- data/vendor/node_modules/chai/index.mjs +14 -0
- data/vendor/node_modules/chai/karma.conf.js +34 -0
- data/vendor/node_modules/chai/karma.sauce.js +41 -0
- data/vendor/node_modules/chai/lib/chai/assertion.js +175 -0
- data/vendor/node_modules/chai/lib/chai/config.js +94 -0
- data/vendor/node_modules/chai/lib/chai/core/assertions.js +3853 -0
- data/vendor/node_modules/chai/lib/chai/interface/assert.js +3113 -0
- data/vendor/node_modules/chai/lib/chai/interface/expect.js +47 -0
- data/vendor/node_modules/chai/lib/chai/interface/should.js +219 -0
- data/vendor/node_modules/chai/lib/chai/utils/addChainableMethod.js +152 -0
- data/vendor/node_modules/chai/lib/chai/utils/addLengthGuard.js +60 -0
- data/vendor/node_modules/chai/lib/chai/utils/addMethod.js +68 -0
- data/vendor/node_modules/chai/lib/chai/utils/addProperty.js +72 -0
- data/vendor/node_modules/chai/lib/chai/utils/compareByInspect.js +31 -0
- data/vendor/node_modules/chai/lib/chai/utils/expectTypes.js +51 -0
- data/vendor/node_modules/chai/lib/chai/utils/flag.js +33 -0
- data/vendor/node_modules/chai/lib/chai/utils/getActual.js +20 -0
- data/vendor/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +26 -0
- data/vendor/node_modules/chai/lib/chai/utils/getMessage.js +50 -0
- data/vendor/node_modules/chai/lib/chai/utils/getOperator.js +55 -0
- data/vendor/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js +29 -0
- data/vendor/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js +27 -0
- data/vendor/node_modules/chai/lib/chai/utils/getProperties.js +36 -0
- data/vendor/node_modules/chai/lib/chai/utils/index.js +178 -0
- data/vendor/node_modules/chai/lib/chai/utils/inspect.js +33 -0
- data/vendor/node_modules/chai/lib/chai/utils/isNaN.js +26 -0
- data/vendor/node_modules/chai/lib/chai/utils/isProxyEnabled.js +24 -0
- data/vendor/node_modules/chai/lib/chai/utils/objDisplay.js +50 -0
- data/vendor/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +69 -0
- data/vendor/node_modules/chai/lib/chai/utils/overwriteMethod.js +92 -0
- data/vendor/node_modules/chai/lib/chai/utils/overwriteProperty.js +92 -0
- data/vendor/node_modules/chai/lib/chai/utils/proxify.js +147 -0
- data/vendor/node_modules/chai/lib/chai/utils/test.js +28 -0
- data/vendor/node_modules/chai/lib/chai/utils/transferFlags.js +45 -0
- data/vendor/node_modules/chai/lib/chai.js +92 -0
- data/vendor/node_modules/chai/package.json +63 -0
- data/vendor/node_modules/chai/register-assert.js +1 -0
- data/vendor/node_modules/chai/register-expect.js +1 -0
- data/vendor/node_modules/chai/register-should.js +1 -0
- data/vendor/node_modules/chai/sauce.browsers.js +106 -0
- data/vendor/node_modules/chalk/package.json +1 -1
- data/vendor/node_modules/chalk/readme.md +7 -1
- data/vendor/node_modules/{source-map-url → check-error}/LICENSE +1 -3
- data/vendor/node_modules/check-error/README.md +207 -0
- data/vendor/node_modules/check-error/check-error.js +176 -0
- data/vendor/node_modules/check-error/index.js +172 -0
- data/vendor/node_modules/check-error/package.json +85 -0
- data/vendor/node_modules/chokidar/README.md +5 -4
- data/vendor/node_modules/chokidar/index.js +7 -1
- data/vendor/node_modules/chokidar/lib/constants.js +2 -0
- data/vendor/node_modules/chokidar/lib/fsevents-handler.js +2 -1
- data/vendor/node_modules/chokidar/lib/nodefs-handler.js +9 -1
- data/vendor/node_modules/chokidar/package.json +15 -8
- data/vendor/node_modules/chokidar/types/index.d.ts +4 -3
- data/vendor/node_modules/css/lib/stringify/source-map-support.js +10 -3
- data/vendor/node_modules/css/package.json +8 -9
- data/vendor/node_modules/debug/LICENSE +10 -9
- data/vendor/node_modules/debug/README.md +116 -3
- data/vendor/node_modules/debug/package.json +35 -19
- data/vendor/node_modules/debug/src/browser.js +194 -120
- data/vendor/node_modules/debug/src/common.js +274 -0
- data/vendor/node_modules/debug/src/index.js +4 -4
- data/vendor/node_modules/debug/src/node.js +174 -97
- data/vendor/node_modules/{resolve-url → deep-eql}/LICENSE +1 -3
- data/vendor/node_modules/deep-eql/README.md +116 -0
- data/vendor/node_modules/deep-eql/deep-eql.js +833 -0
- data/vendor/node_modules/deep-eql/index.js +455 -0
- data/vendor/node_modules/deep-eql/package.json +90 -0
- data/vendor/node_modules/{urix → get-func-name}/LICENSE +1 -3
- data/vendor/node_modules/get-func-name/README.md +123 -0
- data/vendor/node_modules/get-func-name/get-func-name.js +48 -0
- data/vendor/node_modules/get-func-name/index.js +44 -0
- data/vendor/node_modules/get-func-name/package.json +85 -0
- data/vendor/node_modules/glob/README.md +3 -0
- data/vendor/node_modules/glob/common.js +2 -0
- data/vendor/node_modules/glob/glob.js +4 -5
- data/vendor/node_modules/glob/package.json +2 -1
- data/vendor/node_modules/glob/sync.js +4 -5
- data/vendor/node_modules/{cliui/node_modules/is-fullwidth-code-point → is-fullwidth-code-point}/index.d.ts +0 -0
- data/vendor/node_modules/is-fullwidth-code-point/index.js +25 -21
- data/vendor/node_modules/is-fullwidth-code-point/license +4 -16
- data/vendor/node_modules/is-fullwidth-code-point/package.json +40 -43
- data/vendor/node_modules/is-fullwidth-code-point/readme.md +6 -6
- data/vendor/node_modules/is-glob/README.md +1 -1
- data/vendor/node_modules/is-glob/index.js +126 -24
- data/vendor/node_modules/is-glob/package.json +2 -2
- data/vendor/node_modules/is-unicode-supported/index.d.ts +14 -0
- data/vendor/node_modules/is-unicode-supported/index.js +13 -0
- data/vendor/node_modules/{cliui/node_modules/string-width → is-unicode-supported}/license +1 -1
- data/vendor/node_modules/is-unicode-supported/package.json +41 -0
- data/vendor/node_modules/is-unicode-supported/readme.md +35 -0
- data/vendor/node_modules/js-yaml/CHANGELOG.md +13 -0
- data/vendor/node_modules/js-yaml/README.md +1 -1
- data/vendor/node_modules/js-yaml/dist/js-yaml.js +90 -70
- data/vendor/node_modules/js-yaml/dist/js-yaml.min.js +2 -2
- data/vendor/node_modules/js-yaml/dist/js-yaml.mjs +84 -65
- data/vendor/node_modules/js-yaml/index.js +17 -0
- data/vendor/node_modules/js-yaml/lib/schema.js +9 -9
- data/vendor/node_modules/js-yaml/lib/type.js +1 -0
- data/vendor/node_modules/js-yaml/package.json +1 -1
- data/vendor/node_modules/jscoverage/node_modules/ms/index.js +152 -0
- data/vendor/node_modules/{should-format/LICENSE → jscoverage/node_modules/ms/license.md} +1 -2
- data/vendor/node_modules/jscoverage/node_modules/ms/package.json +37 -0
- data/vendor/node_modules/jscoverage/node_modules/ms/readme.md +51 -0
- data/vendor/node_modules/log-symbols/index.d.ts +2 -2
- data/vendor/node_modules/log-symbols/index.js +3 -4
- data/vendor/node_modules/log-symbols/package.json +7 -5
- data/vendor/node_modules/log-symbols/readme.md +3 -3
- data/vendor/node_modules/loupe/CHANGELOG.md +5 -0
- data/vendor/node_modules/{cliui/node_modules/strip-ansi/license → loupe/LICENSE} +2 -2
- data/vendor/node_modules/loupe/README.md +63 -0
- data/vendor/node_modules/loupe/index.js +195 -0
- data/vendor/node_modules/loupe/lib/arguments.js +7 -0
- data/vendor/node_modules/loupe/lib/array.js +20 -0
- data/vendor/node_modules/loupe/lib/bigint.js +7 -0
- data/vendor/node_modules/loupe/lib/class.js +18 -0
- data/vendor/node_modules/loupe/lib/date.js +8 -0
- data/vendor/node_modules/loupe/lib/error.js +34 -0
- data/vendor/node_modules/loupe/lib/function.js +10 -0
- data/vendor/node_modules/loupe/lib/helpers.js +177 -0
- data/vendor/node_modules/loupe/lib/html.js +40 -0
- data/vendor/node_modules/loupe/lib/map.js +27 -0
- data/vendor/node_modules/loupe/lib/number.js +18 -0
- data/vendor/node_modules/loupe/lib/object.js +31 -0
- data/vendor/node_modules/loupe/lib/promise.js +16 -0
- data/vendor/node_modules/loupe/lib/regexp.js +8 -0
- data/vendor/node_modules/loupe/lib/set.js +16 -0
- data/vendor/node_modules/loupe/lib/string.js +29 -0
- data/vendor/node_modules/loupe/lib/symbol.js +6 -0
- data/vendor/node_modules/loupe/lib/typedarray.js +45 -0
- data/vendor/node_modules/loupe/loupe.js +852 -0
- data/vendor/node_modules/loupe/package.json +141 -0
- data/vendor/node_modules/minimatch/README.md +22 -1
- data/vendor/node_modules/minimatch/minimatch.js +93 -69
- data/vendor/node_modules/minimatch/package.json +6 -3
- data/vendor/node_modules/mocha/LICENSE +1 -1
- data/vendor/node_modules/mocha/README.md +1 -1
- data/vendor/node_modules/mocha/bin/mocha +18 -27
- data/vendor/node_modules/mocha/browser-entry.js +27 -20
- data/vendor/node_modules/mocha/lib/browser/growl.js +5 -5
- data/vendor/node_modules/mocha/lib/browser/parse-query.js +1 -1
- data/vendor/node_modules/mocha/lib/browser/progress.js +6 -6
- data/vendor/node_modules/mocha/lib/cli/cli.js +3 -2
- data/vendor/node_modules/mocha/lib/cli/config.js +7 -12
- data/vendor/node_modules/mocha/lib/cli/lookup-files.js +2 -8
- data/vendor/node_modules/mocha/lib/cli/node-flags.js +2 -5
- data/vendor/node_modules/mocha/lib/cli/one-and-dones.js +1 -2
- data/vendor/node_modules/mocha/lib/cli/run-helpers.js +15 -15
- data/vendor/node_modules/mocha/lib/cli/run-option-metadata.js +4 -0
- data/vendor/node_modules/mocha/lib/cli/run.js +13 -1
- data/vendor/node_modules/mocha/lib/cli/watch-run.js +3 -6
- data/vendor/node_modules/mocha/lib/context.js +5 -5
- data/vendor/node_modules/mocha/lib/errors.js +3 -3
- data/vendor/node_modules/mocha/lib/hook.js +9 -3
- data/vendor/node_modules/mocha/lib/interfaces/bdd.js +23 -20
- data/vendor/node_modules/mocha/lib/interfaces/common.js +7 -7
- data/vendor/node_modules/mocha/lib/interfaces/exports.js +1 -1
- data/vendor/node_modules/mocha/lib/interfaces/qunit.js +7 -7
- data/vendor/node_modules/mocha/lib/interfaces/tdd.js +9 -9
- data/vendor/node_modules/mocha/lib/mocha.js +105 -99
- data/vendor/node_modules/mocha/lib/nodejs/buffered-worker-pool.js +17 -1
- data/vendor/node_modules/mocha/lib/nodejs/esm-utils.js +124 -0
- data/vendor/node_modules/mocha/lib/reporters/base.js +49 -35
- data/vendor/node_modules/mocha/lib/reporters/doc.js +4 -4
- data/vendor/node_modules/mocha/lib/reporters/dot.js +5 -5
- data/vendor/node_modules/mocha/lib/reporters/html.js +12 -12
- data/vendor/node_modules/mocha/lib/reporters/json-stream.js +4 -4
- data/vendor/node_modules/mocha/lib/reporters/json.js +35 -10
- data/vendor/node_modules/mocha/lib/reporters/landing.js +5 -5
- data/vendor/node_modules/mocha/lib/reporters/list.js +5 -5
- data/vendor/node_modules/mocha/lib/reporters/markdown.js +5 -5
- data/vendor/node_modules/mocha/lib/reporters/min.js +1 -1
- data/vendor/node_modules/mocha/lib/reporters/nyan.js +16 -16
- data/vendor/node_modules/mocha/lib/reporters/progress.js +3 -3
- data/vendor/node_modules/mocha/lib/reporters/spec.js +6 -6
- data/vendor/node_modules/mocha/lib/reporters/tap.js +17 -17
- data/vendor/node_modules/mocha/lib/reporters/xunit.js +9 -9
- data/vendor/node_modules/mocha/lib/runnable.js +21 -21
- data/vendor/node_modules/mocha/lib/runner.js +63 -61
- data/vendor/node_modules/mocha/lib/stats-collector.js +7 -7
- data/vendor/node_modules/mocha/lib/suite.js +46 -75
- data/vendor/node_modules/mocha/lib/test.js +5 -5
- data/vendor/node_modules/mocha/lib/utils.js +19 -114
- data/vendor/node_modules/mocha/mocha-es2018.js +19794 -0
- data/vendor/node_modules/mocha/mocha.js +8059 -6920
- data/vendor/node_modules/mocha/mocha.js.map +1 -1
- data/vendor/node_modules/mocha/node_modules/debug/LICENSE +10 -9
- data/vendor/node_modules/mocha/node_modules/debug/README.md +24 -1
- data/vendor/node_modules/mocha/node_modules/debug/package.json +6 -6
- data/vendor/node_modules/mocha/node_modules/debug/src/common.js +15 -2
- data/vendor/node_modules/{semver → mocha/node_modules/minimatch}/LICENSE +1 -1
- data/vendor/node_modules/mocha/node_modules/minimatch/README.md +230 -0
- data/vendor/node_modules/mocha/node_modules/minimatch/minimatch.js +908 -0
- data/vendor/node_modules/mocha/node_modules/minimatch/package.json +31 -0
- data/vendor/node_modules/mocha/package.json +66 -65
- data/vendor/node_modules/ms/index.js +29 -19
- data/vendor/node_modules/ms/package.json +6 -6
- data/vendor/node_modules/ms/readme.md +18 -9
- data/vendor/node_modules/nanoid/README.md +9 -473
- data/vendor/node_modules/nanoid/async/index.browser.cjs +34 -0
- data/vendor/node_modules/nanoid/async/index.browser.js +7 -43
- data/vendor/node_modules/nanoid/async/index.cjs +5 -41
- data/vendor/node_modules/nanoid/async/index.d.ts +7 -7
- data/vendor/node_modules/nanoid/async/index.js +5 -41
- data/vendor/node_modules/nanoid/async/index.native.js +5 -36
- data/vendor/node_modules/nanoid/async/package.json +2 -1
- data/vendor/node_modules/nanoid/bin/nanoid.cjs +52 -2
- data/vendor/node_modules/nanoid/index.browser.cjs +37 -0
- data/vendor/node_modules/nanoid/index.browser.js +5 -73
- data/vendor/node_modules/nanoid/index.cjs +14 -49
- data/vendor/node_modules/nanoid/index.d.ts +9 -6
- data/vendor/node_modules/nanoid/index.js +14 -49
- data/vendor/node_modules/nanoid/non-secure/index.cjs +3 -12
- data/vendor/node_modules/nanoid/non-secure/index.d.ts +8 -5
- data/vendor/node_modules/nanoid/non-secure/index.js +3 -12
- data/vendor/node_modules/nanoid/package.json +14 -10
- data/vendor/node_modules/nanoid/url-alphabet/index.cjs +1 -4
- data/vendor/node_modules/nanoid/url-alphabet/index.js +1 -4
- data/vendor/node_modules/pathval/CHANGELOG.md +18 -0
- data/vendor/node_modules/pathval/LICENSE +16 -0
- data/vendor/node_modules/pathval/README.md +147 -0
- data/vendor/node_modules/pathval/index.js +301 -0
- data/vendor/node_modules/pathval/package.json +80 -0
- data/vendor/node_modules/pathval/pathval.js +1 -0
- data/vendor/node_modules/picomatch/CHANGELOG.md +16 -0
- data/vendor/node_modules/picomatch/README.md +34 -17
- data/vendor/node_modules/picomatch/lib/parse.js +19 -6
- data/vendor/node_modules/picomatch/lib/picomatch.js +34 -31
- data/vendor/node_modules/picomatch/lib/scan.js +8 -2
- data/vendor/node_modules/picomatch/package.json +1 -1
- data/vendor/node_modules/readdirp/index.js +11 -6
- data/vendor/node_modules/readdirp/package.json +1 -1
- data/vendor/node_modules/serialize-javascript/README.md +2 -4
- data/vendor/node_modules/serialize-javascript/index.js +11 -2
- data/vendor/node_modules/serialize-javascript/package.json +2 -2
- data/vendor/node_modules/source-map-resolve/LICENSE +1 -1
- data/vendor/node_modules/source-map-resolve/changelog.md +6 -0
- data/vendor/node_modules/source-map-resolve/{lib/source-map-resolve-node.js → index.js} +48 -13
- data/vendor/node_modules/source-map-resolve/package.json +7 -14
- data/vendor/node_modules/source-map-resolve/readme.md +1 -39
- data/vendor/node_modules/{cliui/node_modules/string-width → string-width}/index.d.ts +0 -0
- data/vendor/node_modules/string-width/index.js +16 -5
- data/vendor/node_modules/string-width/package.json +11 -10
- data/vendor/node_modules/string-width/readme.md +15 -7
- data/vendor/node_modules/{cliui/node_modules/strip-ansi → strip-ansi}/index.d.ts +0 -0
- data/vendor/node_modules/strip-ansi/index.js +1 -1
- data/vendor/node_modules/strip-ansi/package.json +52 -50
- data/vendor/node_modules/strip-ansi/readme.md +12 -5
- data/vendor/node_modules/{fsevents → type-detect}/LICENSE +1 -4
- data/vendor/node_modules/type-detect/README.md +228 -0
- data/vendor/node_modules/type-detect/index.js +378 -0
- data/vendor/node_modules/type-detect/package.json +1 -0
- data/vendor/node_modules/type-detect/type-detect.js +388 -0
- data/vendor/node_modules/workerpool/HISTORY.md +42 -0
- data/vendor/node_modules/workerpool/README.md +11 -1
- data/vendor/node_modules/workerpool/dist/worker.js +9 -42
- data/vendor/node_modules/workerpool/dist/worker.js.map +1 -1
- data/vendor/node_modules/workerpool/dist/workerpool.js +117 -74
- data/vendor/node_modules/workerpool/dist/workerpool.js.map +1 -1
- data/vendor/node_modules/workerpool/dist/workerpool.min.js +1 -1
- data/vendor/node_modules/workerpool/dist/workerpool.min.js.LICENSE.txt +3 -3
- data/vendor/node_modules/workerpool/dist/workerpool.min.js.map +1 -1
- data/vendor/node_modules/workerpool/package.json +11 -11
- data/vendor/node_modules/workerpool/src/Pool.js +29 -4
- data/vendor/node_modules/workerpool/src/WorkerHandler.js +17 -4
- data/vendor/node_modules/workerpool/src/generated/embeddedWorker.js +1 -1
- data/vendor/node_modules/workerpool/src/header.js +1 -1
- data/vendor/node_modules/workerpool/src/types.js +2 -1
- data/vendor/package-lock.json +401 -664
- data/vendor/package.json +7 -9
- metadata +139 -175
- data/vendor/node_modules/cliui/node_modules/ansi-regex/index.js +0 -10
- data/vendor/node_modules/cliui/node_modules/ansi-regex/license +0 -9
- data/vendor/node_modules/cliui/node_modules/ansi-regex/package.json +0 -55
- data/vendor/node_modules/cliui/node_modules/ansi-regex/readme.md +0 -78
- data/vendor/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js +0 -50
- data/vendor/node_modules/cliui/node_modules/is-fullwidth-code-point/license +0 -9
- data/vendor/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json +0 -42
- data/vendor/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md +0 -39
- data/vendor/node_modules/cliui/node_modules/string-width/index.js +0 -47
- data/vendor/node_modules/cliui/node_modules/string-width/package.json +0 -56
- data/vendor/node_modules/cliui/node_modules/string-width/readme.md +0 -50
- data/vendor/node_modules/cliui/node_modules/strip-ansi/index.js +0 -4
- data/vendor/node_modules/cliui/node_modules/strip-ansi/package.json +0 -54
- data/vendor/node_modules/cliui/node_modules/strip-ansi/readme.md +0 -46
- data/vendor/node_modules/css-parse/Readme.md +0 -15
- data/vendor/node_modules/css-parse/index.js +0 -1
- data/vendor/node_modules/css-parse/package.json +0 -23
- data/vendor/node_modules/debug/CHANGELOG.md +0 -395
- data/vendor/node_modules/debug/Makefile +0 -58
- data/vendor/node_modules/debug/karma.conf.js +0 -70
- data/vendor/node_modules/debug/node.js +0 -1
- data/vendor/node_modules/debug/src/debug.js +0 -225
- data/vendor/node_modules/fsevents/README.md +0 -83
- data/vendor/node_modules/fsevents/fsevents.d.ts +0 -46
- data/vendor/node_modules/fsevents/fsevents.js +0 -82
- data/vendor/node_modules/fsevents/fsevents.node +0 -0
- data/vendor/node_modules/fsevents/package.json +0 -62
- data/vendor/node_modules/glob/changelog.md +0 -67
- data/vendor/node_modules/mkdirp/CHANGELOG.md +0 -15
- data/vendor/node_modules/mkdirp/bin/cmd.js +0 -68
- data/vendor/node_modules/mkdirp/index.js +0 -31
- data/vendor/node_modules/mkdirp/lib/find-made.js +0 -29
- data/vendor/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
- data/vendor/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
- data/vendor/node_modules/mkdirp/lib/opts-arg.js +0 -23
- data/vendor/node_modules/mkdirp/lib/path-arg.js +0 -29
- data/vendor/node_modules/mkdirp/lib/use-native.js +0 -10
- data/vendor/node_modules/mkdirp/package.json +0 -44
- data/vendor/node_modules/mkdirp/readme.markdown +0 -266
- data/vendor/node_modules/mocha/CHANGELOG.md +0 -931
- data/vendor/node_modules/mocha/lib/esm-utils.js +0 -58
- data/vendor/node_modules/mocha/node_modules/glob/LICENSE +0 -21
- data/vendor/node_modules/mocha/node_modules/glob/README.md +0 -375
- data/vendor/node_modules/mocha/node_modules/glob/changelog.md +0 -67
- data/vendor/node_modules/mocha/node_modules/glob/common.js +0 -240
- data/vendor/node_modules/mocha/node_modules/glob/glob.js +0 -790
- data/vendor/node_modules/mocha/node_modules/glob/package.json +0 -46
- data/vendor/node_modules/mocha/node_modules/glob/sync.js +0 -486
- data/vendor/node_modules/nanoid/CHANGELOG.md +0 -241
- data/vendor/node_modules/nanoid/index.dev.js +0 -105
- data/vendor/node_modules/nanoid/index.prod.js +0 -105
- data/vendor/node_modules/resolve-url/bower.json +0 -15
- data/vendor/node_modules/resolve-url/changelog.md +0 -15
- data/vendor/node_modules/resolve-url/component.json +0 -15
- data/vendor/node_modules/resolve-url/package.json +0 -34
- data/vendor/node_modules/resolve-url/readme.md +0 -83
- data/vendor/node_modules/resolve-url/resolve-url.js +0 -47
- data/vendor/node_modules/resolve-url/test/resolve-url.js +0 -70
- data/vendor/node_modules/semver/CHANGELOG.md +0 -70
- data/vendor/node_modules/semver/README.md +0 -443
- data/vendor/node_modules/semver/bin/semver.js +0 -174
- data/vendor/node_modules/semver/package.json +0 -28
- data/vendor/node_modules/semver/range.bnf +0 -16
- data/vendor/node_modules/semver/semver.js +0 -1596
- data/vendor/node_modules/should/CONTRIBUTING.md +0 -14
- data/vendor/node_modules/should/History.md +0 -554
- data/vendor/node_modules/should/LICENSE +0 -20
- data/vendor/node_modules/should/Readme.md +0 -223
- data/vendor/node_modules/should/as-function.js +0 -2935
- data/vendor/node_modules/should/cjs/should.js +0 -2962
- data/vendor/node_modules/should/es6/should.js +0 -2958
- data/vendor/node_modules/should/package.json +0 -51
- data/vendor/node_modules/should/should.d.ts +0 -243
- data/vendor/node_modules/should/should.js +0 -4371
- data/vendor/node_modules/should-equal/LICENSE +0 -21
- data/vendor/node_modules/should-equal/README.md +0 -24
- data/vendor/node_modules/should-equal/cjs/should-equal.js +0 -333
- data/vendor/node_modules/should-equal/es6/should-equal.js +0 -329
- data/vendor/node_modules/should-equal/package.json +0 -38
- data/vendor/node_modules/should-format/README.md +0 -6
- data/vendor/node_modules/should-format/cjs/should-format.js +0 -532
- data/vendor/node_modules/should-format/es6/should-format.js +0 -528
- data/vendor/node_modules/should-format/package.json +0 -44
- data/vendor/node_modules/should-type/LICENSE +0 -22
- data/vendor/node_modules/should-type/README.md +0 -4
- data/vendor/node_modules/should-type/cjs/should-type.js +0 -263
- data/vendor/node_modules/should-type/es6/should-type.js +0 -261
- data/vendor/node_modules/should-type/package.json +0 -38
- data/vendor/node_modules/should-type-adaptors/README.md +0 -1
- data/vendor/node_modules/should-type-adaptors/cjs/should-type-adaptors.js +0 -288
- data/vendor/node_modules/should-type-adaptors/es6/should-type-adaptors.js +0 -272
- data/vendor/node_modules/should-type-adaptors/package.json +0 -43
- data/vendor/node_modules/should-util/LICENSE +0 -21
- data/vendor/node_modules/should-util/README.md +0 -2
- data/vendor/node_modules/should-util/cjs/should-util.js +0 -50
- data/vendor/node_modules/should-util/es6/should-util.js +0 -42
- data/vendor/node_modules/should-util/package.json +0 -40
- data/vendor/node_modules/source-map-resolve/lib/decode-uri-component.js +0 -8
- data/vendor/node_modules/source-map-resolve/lib/resolve-url.js +0 -9
- data/vendor/node_modules/source-map-resolve/source-map-resolve.js +0 -348
- data/vendor/node_modules/source-map-url/changelog.md +0 -57
- data/vendor/node_modules/source-map-url/package.json +0 -39
- data/vendor/node_modules/source-map-url/readme.md +0 -97
- data/vendor/node_modules/source-map-url/source-map-url.js +0 -57
- data/vendor/node_modules/urix/index.js +0 -17
- data/vendor/node_modules/urix/package.json +0 -25
- data/vendor/node_modules/urix/readme.md +0 -46
- data/vendor/node_modules/urix/test/index.js +0 -43
- data/vendor/node_modules/wide-align/LICENSE +0 -14
- data/vendor/node_modules/wide-align/README.md +0 -47
- data/vendor/node_modules/wide-align/align.js +0 -65
- data/vendor/node_modules/wide-align/package.json +0 -33
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts +0 -37
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +0 -10
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/license +0 -9
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +0 -55
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +0 -78
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js +0 -50
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license +0 -9
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json +0 -42
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md +0 -39
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/index.d.ts +0 -29
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/index.js +0 -47
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/license +0 -9
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/package.json +0 -56
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/readme.md +0 -50
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts +0 -17
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +0 -4
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/license +0 -9
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +0 -54
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +0 -46
- data/vendor/node_modules/yargs/node_modules/ansi-regex/index.d.ts +0 -37
- data/vendor/node_modules/yargs/node_modules/ansi-regex/index.js +0 -10
- data/vendor/node_modules/yargs/node_modules/ansi-regex/license +0 -9
- data/vendor/node_modules/yargs/node_modules/ansi-regex/package.json +0 -55
- data/vendor/node_modules/yargs/node_modules/ansi-regex/readme.md +0 -78
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js +0 -50
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/license +0 -9
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json +0 -42
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md +0 -39
- data/vendor/node_modules/yargs/node_modules/string-width/index.d.ts +0 -29
- data/vendor/node_modules/yargs/node_modules/string-width/index.js +0 -47
- data/vendor/node_modules/yargs/node_modules/string-width/license +0 -9
- data/vendor/node_modules/yargs/node_modules/string-width/package.json +0 -56
- data/vendor/node_modules/yargs/node_modules/string-width/readme.md +0 -50
- data/vendor/node_modules/yargs/node_modules/strip-ansi/index.d.ts +0 -17
- data/vendor/node_modules/yargs/node_modules/strip-ansi/index.js +0 -4
- data/vendor/node_modules/yargs/node_modules/strip-ansi/license +0 -9
- data/vendor/node_modules/yargs/node_modules/strip-ansi/package.json +0 -54
- data/vendor/node_modules/yargs/node_modules/strip-ansi/readme.md +0 -46
- data/vendor/test.js +0 -31
@@ -1,36 +1,106 @@
|
|
1
|
+
/* eslint-env browser */
|
2
|
+
|
1
3
|
/**
|
2
4
|
* This is the web browser implementation of `debug()`.
|
3
|
-
*
|
4
|
-
* Expose `debug()` as the module.
|
5
5
|
*/
|
6
6
|
|
7
|
-
exports = module.exports = require('./debug');
|
8
|
-
exports.log = log;
|
9
7
|
exports.formatArgs = formatArgs;
|
10
8
|
exports.save = save;
|
11
9
|
exports.load = load;
|
12
10
|
exports.useColors = useColors;
|
13
|
-
exports.storage =
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
exports.storage = localstorage();
|
12
|
+
exports.destroy = (() => {
|
13
|
+
let warned = false;
|
14
|
+
|
15
|
+
return () => {
|
16
|
+
if (!warned) {
|
17
|
+
warned = true;
|
18
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
19
|
+
}
|
20
|
+
};
|
21
|
+
})();
|
17
22
|
|
18
23
|
/**
|
19
24
|
* Colors.
|
20
25
|
*/
|
21
26
|
|
22
27
|
exports.colors = [
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
'#0000CC',
|
29
|
+
'#0000FF',
|
30
|
+
'#0033CC',
|
31
|
+
'#0033FF',
|
32
|
+
'#0066CC',
|
33
|
+
'#0066FF',
|
34
|
+
'#0099CC',
|
35
|
+
'#0099FF',
|
36
|
+
'#00CC00',
|
37
|
+
'#00CC33',
|
38
|
+
'#00CC66',
|
39
|
+
'#00CC99',
|
40
|
+
'#00CCCC',
|
41
|
+
'#00CCFF',
|
42
|
+
'#3300CC',
|
43
|
+
'#3300FF',
|
44
|
+
'#3333CC',
|
45
|
+
'#3333FF',
|
46
|
+
'#3366CC',
|
47
|
+
'#3366FF',
|
48
|
+
'#3399CC',
|
49
|
+
'#3399FF',
|
50
|
+
'#33CC00',
|
51
|
+
'#33CC33',
|
52
|
+
'#33CC66',
|
53
|
+
'#33CC99',
|
54
|
+
'#33CCCC',
|
55
|
+
'#33CCFF',
|
56
|
+
'#6600CC',
|
57
|
+
'#6600FF',
|
58
|
+
'#6633CC',
|
59
|
+
'#6633FF',
|
60
|
+
'#66CC00',
|
61
|
+
'#66CC33',
|
62
|
+
'#9900CC',
|
63
|
+
'#9900FF',
|
64
|
+
'#9933CC',
|
65
|
+
'#9933FF',
|
66
|
+
'#99CC00',
|
67
|
+
'#99CC33',
|
68
|
+
'#CC0000',
|
69
|
+
'#CC0033',
|
70
|
+
'#CC0066',
|
71
|
+
'#CC0099',
|
72
|
+
'#CC00CC',
|
73
|
+
'#CC00FF',
|
74
|
+
'#CC3300',
|
75
|
+
'#CC3333',
|
76
|
+
'#CC3366',
|
77
|
+
'#CC3399',
|
78
|
+
'#CC33CC',
|
79
|
+
'#CC33FF',
|
80
|
+
'#CC6600',
|
81
|
+
'#CC6633',
|
82
|
+
'#CC9900',
|
83
|
+
'#CC9933',
|
84
|
+
'#CCCC00',
|
85
|
+
'#CCCC33',
|
86
|
+
'#FF0000',
|
87
|
+
'#FF0033',
|
88
|
+
'#FF0066',
|
89
|
+
'#FF0099',
|
90
|
+
'#FF00CC',
|
91
|
+
'#FF00FF',
|
92
|
+
'#FF3300',
|
93
|
+
'#FF3333',
|
94
|
+
'#FF3366',
|
95
|
+
'#FF3399',
|
96
|
+
'#FF33CC',
|
97
|
+
'#FF33FF',
|
98
|
+
'#FF6600',
|
99
|
+
'#FF6633',
|
100
|
+
'#FF9900',
|
101
|
+
'#FF9933',
|
102
|
+
'#FFCC00',
|
103
|
+
'#FFCC33'
|
34
104
|
];
|
35
105
|
|
36
106
|
/**
|
@@ -41,43 +111,31 @@ exports.colors = [
|
|
41
111
|
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
42
112
|
*/
|
43
113
|
|
114
|
+
// eslint-disable-next-line complexity
|
44
115
|
function useColors() {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
// Internet Explorer and Edge do not support colors.
|
53
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
54
|
-
return false;
|
55
|
-
}
|
56
|
-
|
57
|
-
// is webkit? http://stackoverflow.com/a/16459606/376773
|
58
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
59
|
-
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
60
|
-
// is firebug? http://stackoverflow.com/a/398120/376773
|
61
|
-
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
62
|
-
// is firefox >= v31?
|
63
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
64
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
65
|
-
// double check webkit in userAgent just in case we are in a worker
|
66
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
67
|
-
}
|
116
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
117
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
118
|
+
// explicitly
|
119
|
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
120
|
+
return true;
|
121
|
+
}
|
68
122
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
exports.formatters.j = function(v) {
|
74
|
-
try {
|
75
|
-
return JSON.stringify(v);
|
76
|
-
} catch (err) {
|
77
|
-
return '[UnexpectedJSONParseError]: ' + err.message;
|
78
|
-
}
|
79
|
-
};
|
123
|
+
// Internet Explorer and Edge do not support colors.
|
124
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
125
|
+
return false;
|
126
|
+
}
|
80
127
|
|
128
|
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
129
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
130
|
+
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
131
|
+
// Is firebug? http://stackoverflow.com/a/398120/376773
|
132
|
+
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
133
|
+
// Is firefox >= v31?
|
134
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
135
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
136
|
+
// Double check webkit in userAgent just in case we are in a worker
|
137
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
138
|
+
}
|
81
139
|
|
82
140
|
/**
|
83
141
|
* Colorize log arguments if enabled.
|
@@ -86,52 +144,49 @@ exports.formatters.j = function(v) {
|
|
86
144
|
*/
|
87
145
|
|
88
146
|
function formatArgs(args) {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
147
|
+
args[0] = (this.useColors ? '%c' : '') +
|
148
|
+
this.namespace +
|
149
|
+
(this.useColors ? ' %c' : ' ') +
|
150
|
+
args[0] +
|
151
|
+
(this.useColors ? '%c ' : ' ') +
|
152
|
+
'+' + module.exports.humanize(this.diff);
|
153
|
+
|
154
|
+
if (!this.useColors) {
|
155
|
+
return;
|
156
|
+
}
|
157
|
+
|
158
|
+
const c = 'color: ' + this.color;
|
159
|
+
args.splice(1, 0, c, 'color: inherit');
|
160
|
+
|
161
|
+
// The final "%c" is somewhat tricky, because there could be other
|
162
|
+
// arguments passed either before or after the %c, so we need to
|
163
|
+
// figure out the correct index to insert the CSS into
|
164
|
+
let index = 0;
|
165
|
+
let lastC = 0;
|
166
|
+
args[0].replace(/%[a-zA-Z%]/g, match => {
|
167
|
+
if (match === '%%') {
|
168
|
+
return;
|
169
|
+
}
|
170
|
+
index++;
|
171
|
+
if (match === '%c') {
|
172
|
+
// We only are interested in the *last* %c
|
173
|
+
// (the user may have provided their own)
|
174
|
+
lastC = index;
|
175
|
+
}
|
176
|
+
});
|
177
|
+
|
178
|
+
args.splice(lastC, 0, c);
|
119
179
|
}
|
120
180
|
|
121
181
|
/**
|
122
|
-
* Invokes `console.
|
123
|
-
* No-op when `console.
|
182
|
+
* Invokes `console.debug()` when available.
|
183
|
+
* No-op when `console.debug` is not a "function".
|
184
|
+
* If `console.debug` is not available, falls back
|
185
|
+
* to `console.log`.
|
124
186
|
*
|
125
187
|
* @api public
|
126
188
|
*/
|
127
|
-
|
128
|
-
function log() {
|
129
|
-
// this hackery is required for IE8/9, where
|
130
|
-
// the `console.log` function doesn't have 'apply'
|
131
|
-
return 'object' === typeof console
|
132
|
-
&& console.log
|
133
|
-
&& Function.prototype.apply.call(console.log, console, arguments);
|
134
|
-
}
|
189
|
+
exports.log = console.debug || console.log || (() => {});
|
135
190
|
|
136
191
|
/**
|
137
192
|
* Save `namespaces`.
|
@@ -139,15 +194,17 @@ function log() {
|
|
139
194
|
* @param {String} namespaces
|
140
195
|
* @api private
|
141
196
|
*/
|
142
|
-
|
143
197
|
function save(namespaces) {
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
198
|
+
try {
|
199
|
+
if (namespaces) {
|
200
|
+
exports.storage.setItem('debug', namespaces);
|
201
|
+
} else {
|
202
|
+
exports.storage.removeItem('debug');
|
203
|
+
}
|
204
|
+
} catch (error) {
|
205
|
+
// Swallow
|
206
|
+
// XXX (@Qix-) should we be logging these?
|
207
|
+
}
|
151
208
|
}
|
152
209
|
|
153
210
|
/**
|
@@ -156,27 +213,23 @@ function save(namespaces) {
|
|
156
213
|
* @return {String} returns the previously persisted debug modes
|
157
214
|
* @api private
|
158
215
|
*/
|
159
|
-
|
160
216
|
function load() {
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
217
|
+
let r;
|
218
|
+
try {
|
219
|
+
r = exports.storage.getItem('debug');
|
220
|
+
} catch (error) {
|
221
|
+
// Swallow
|
222
|
+
// XXX (@Qix-) should we be logging these?
|
223
|
+
}
|
165
224
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
225
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
226
|
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
227
|
+
r = process.env.DEBUG;
|
228
|
+
}
|
170
229
|
|
171
|
-
|
230
|
+
return r;
|
172
231
|
}
|
173
232
|
|
174
|
-
/**
|
175
|
-
* Enable namespaces listed in `localStorage.debug` initially.
|
176
|
-
*/
|
177
|
-
|
178
|
-
exports.enable(load());
|
179
|
-
|
180
233
|
/**
|
181
234
|
* Localstorage attempts to return the localstorage.
|
182
235
|
*
|
@@ -189,7 +242,28 @@ exports.enable(load());
|
|
189
242
|
*/
|
190
243
|
|
191
244
|
function localstorage() {
|
192
|
-
|
193
|
-
|
194
|
-
|
245
|
+
try {
|
246
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
247
|
+
// The Browser also has localStorage in the global context.
|
248
|
+
return localStorage;
|
249
|
+
} catch (error) {
|
250
|
+
// Swallow
|
251
|
+
// XXX (@Qix-) should we be logging these?
|
252
|
+
}
|
195
253
|
}
|
254
|
+
|
255
|
+
module.exports = require('./common')(exports);
|
256
|
+
|
257
|
+
const {formatters} = module.exports;
|
258
|
+
|
259
|
+
/**
|
260
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
261
|
+
*/
|
262
|
+
|
263
|
+
formatters.j = function (v) {
|
264
|
+
try {
|
265
|
+
return JSON.stringify(v);
|
266
|
+
} catch (error) {
|
267
|
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
268
|
+
}
|
269
|
+
};
|
@@ -0,0 +1,274 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* This is the common logic for both the Node.js and web browser
|
4
|
+
* implementations of `debug()`.
|
5
|
+
*/
|
6
|
+
|
7
|
+
function setup(env) {
|
8
|
+
createDebug.debug = createDebug;
|
9
|
+
createDebug.default = createDebug;
|
10
|
+
createDebug.coerce = coerce;
|
11
|
+
createDebug.disable = disable;
|
12
|
+
createDebug.enable = enable;
|
13
|
+
createDebug.enabled = enabled;
|
14
|
+
createDebug.humanize = require('ms');
|
15
|
+
createDebug.destroy = destroy;
|
16
|
+
|
17
|
+
Object.keys(env).forEach(key => {
|
18
|
+
createDebug[key] = env[key];
|
19
|
+
});
|
20
|
+
|
21
|
+
/**
|
22
|
+
* The currently active debug mode names, and names to skip.
|
23
|
+
*/
|
24
|
+
|
25
|
+
createDebug.names = [];
|
26
|
+
createDebug.skips = [];
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
30
|
+
*
|
31
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
32
|
+
*/
|
33
|
+
createDebug.formatters = {};
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Selects a color for a debug namespace
|
37
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
38
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
39
|
+
* @api private
|
40
|
+
*/
|
41
|
+
function selectColor(namespace) {
|
42
|
+
let hash = 0;
|
43
|
+
|
44
|
+
for (let i = 0; i < namespace.length; i++) {
|
45
|
+
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
46
|
+
hash |= 0; // Convert to 32bit integer
|
47
|
+
}
|
48
|
+
|
49
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
50
|
+
}
|
51
|
+
createDebug.selectColor = selectColor;
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Create a debugger with the given `namespace`.
|
55
|
+
*
|
56
|
+
* @param {String} namespace
|
57
|
+
* @return {Function}
|
58
|
+
* @api public
|
59
|
+
*/
|
60
|
+
function createDebug(namespace) {
|
61
|
+
let prevTime;
|
62
|
+
let enableOverride = null;
|
63
|
+
let namespacesCache;
|
64
|
+
let enabledCache;
|
65
|
+
|
66
|
+
function debug(...args) {
|
67
|
+
// Disabled?
|
68
|
+
if (!debug.enabled) {
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
|
72
|
+
const self = debug;
|
73
|
+
|
74
|
+
// Set `diff` timestamp
|
75
|
+
const curr = Number(new Date());
|
76
|
+
const ms = curr - (prevTime || curr);
|
77
|
+
self.diff = ms;
|
78
|
+
self.prev = prevTime;
|
79
|
+
self.curr = curr;
|
80
|
+
prevTime = curr;
|
81
|
+
|
82
|
+
args[0] = createDebug.coerce(args[0]);
|
83
|
+
|
84
|
+
if (typeof args[0] !== 'string') {
|
85
|
+
// Anything else let's inspect with %O
|
86
|
+
args.unshift('%O');
|
87
|
+
}
|
88
|
+
|
89
|
+
// Apply any `formatters` transformations
|
90
|
+
let index = 0;
|
91
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
92
|
+
// If we encounter an escaped % then don't increase the array index
|
93
|
+
if (match === '%%') {
|
94
|
+
return '%';
|
95
|
+
}
|
96
|
+
index++;
|
97
|
+
const formatter = createDebug.formatters[format];
|
98
|
+
if (typeof formatter === 'function') {
|
99
|
+
const val = args[index];
|
100
|
+
match = formatter.call(self, val);
|
101
|
+
|
102
|
+
// Now we need to remove `args[index]` since it's inlined in the `format`
|
103
|
+
args.splice(index, 1);
|
104
|
+
index--;
|
105
|
+
}
|
106
|
+
return match;
|
107
|
+
});
|
108
|
+
|
109
|
+
// Apply env-specific formatting (colors, etc.)
|
110
|
+
createDebug.formatArgs.call(self, args);
|
111
|
+
|
112
|
+
const logFn = self.log || createDebug.log;
|
113
|
+
logFn.apply(self, args);
|
114
|
+
}
|
115
|
+
|
116
|
+
debug.namespace = namespace;
|
117
|
+
debug.useColors = createDebug.useColors();
|
118
|
+
debug.color = createDebug.selectColor(namespace);
|
119
|
+
debug.extend = extend;
|
120
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
121
|
+
|
122
|
+
Object.defineProperty(debug, 'enabled', {
|
123
|
+
enumerable: true,
|
124
|
+
configurable: false,
|
125
|
+
get: () => {
|
126
|
+
if (enableOverride !== null) {
|
127
|
+
return enableOverride;
|
128
|
+
}
|
129
|
+
if (namespacesCache !== createDebug.namespaces) {
|
130
|
+
namespacesCache = createDebug.namespaces;
|
131
|
+
enabledCache = createDebug.enabled(namespace);
|
132
|
+
}
|
133
|
+
|
134
|
+
return enabledCache;
|
135
|
+
},
|
136
|
+
set: v => {
|
137
|
+
enableOverride = v;
|
138
|
+
}
|
139
|
+
});
|
140
|
+
|
141
|
+
// Env-specific initialization logic for debug instances
|
142
|
+
if (typeof createDebug.init === 'function') {
|
143
|
+
createDebug.init(debug);
|
144
|
+
}
|
145
|
+
|
146
|
+
return debug;
|
147
|
+
}
|
148
|
+
|
149
|
+
function extend(namespace, delimiter) {
|
150
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
151
|
+
newDebug.log = this.log;
|
152
|
+
return newDebug;
|
153
|
+
}
|
154
|
+
|
155
|
+
/**
|
156
|
+
* Enables a debug mode by namespaces. This can include modes
|
157
|
+
* separated by a colon and wildcards.
|
158
|
+
*
|
159
|
+
* @param {String} namespaces
|
160
|
+
* @api public
|
161
|
+
*/
|
162
|
+
function enable(namespaces) {
|
163
|
+
createDebug.save(namespaces);
|
164
|
+
createDebug.namespaces = namespaces;
|
165
|
+
|
166
|
+
createDebug.names = [];
|
167
|
+
createDebug.skips = [];
|
168
|
+
|
169
|
+
let i;
|
170
|
+
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
171
|
+
const len = split.length;
|
172
|
+
|
173
|
+
for (i = 0; i < len; i++) {
|
174
|
+
if (!split[i]) {
|
175
|
+
// ignore empty strings
|
176
|
+
continue;
|
177
|
+
}
|
178
|
+
|
179
|
+
namespaces = split[i].replace(/\*/g, '.*?');
|
180
|
+
|
181
|
+
if (namespaces[0] === '-') {
|
182
|
+
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
183
|
+
} else {
|
184
|
+
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
/**
|
190
|
+
* Disable debug output.
|
191
|
+
*
|
192
|
+
* @return {String} namespaces
|
193
|
+
* @api public
|
194
|
+
*/
|
195
|
+
function disable() {
|
196
|
+
const namespaces = [
|
197
|
+
...createDebug.names.map(toNamespace),
|
198
|
+
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
199
|
+
].join(',');
|
200
|
+
createDebug.enable('');
|
201
|
+
return namespaces;
|
202
|
+
}
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
206
|
+
*
|
207
|
+
* @param {String} name
|
208
|
+
* @return {Boolean}
|
209
|
+
* @api public
|
210
|
+
*/
|
211
|
+
function enabled(name) {
|
212
|
+
if (name[name.length - 1] === '*') {
|
213
|
+
return true;
|
214
|
+
}
|
215
|
+
|
216
|
+
let i;
|
217
|
+
let len;
|
218
|
+
|
219
|
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
220
|
+
if (createDebug.skips[i].test(name)) {
|
221
|
+
return false;
|
222
|
+
}
|
223
|
+
}
|
224
|
+
|
225
|
+
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
226
|
+
if (createDebug.names[i].test(name)) {
|
227
|
+
return true;
|
228
|
+
}
|
229
|
+
}
|
230
|
+
|
231
|
+
return false;
|
232
|
+
}
|
233
|
+
|
234
|
+
/**
|
235
|
+
* Convert regexp to namespace
|
236
|
+
*
|
237
|
+
* @param {RegExp} regxep
|
238
|
+
* @return {String} namespace
|
239
|
+
* @api private
|
240
|
+
*/
|
241
|
+
function toNamespace(regexp) {
|
242
|
+
return regexp.toString()
|
243
|
+
.substring(2, regexp.toString().length - 2)
|
244
|
+
.replace(/\.\*\?$/, '*');
|
245
|
+
}
|
246
|
+
|
247
|
+
/**
|
248
|
+
* Coerce `val`.
|
249
|
+
*
|
250
|
+
* @param {Mixed} val
|
251
|
+
* @return {Mixed}
|
252
|
+
* @api private
|
253
|
+
*/
|
254
|
+
function coerce(val) {
|
255
|
+
if (val instanceof Error) {
|
256
|
+
return val.stack || val.message;
|
257
|
+
}
|
258
|
+
return val;
|
259
|
+
}
|
260
|
+
|
261
|
+
/**
|
262
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
263
|
+
* XXX It WILL be removed in the next major release.
|
264
|
+
*/
|
265
|
+
function destroy() {
|
266
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
267
|
+
}
|
268
|
+
|
269
|
+
createDebug.enable(createDebug.load());
|
270
|
+
|
271
|
+
return createDebug;
|
272
|
+
}
|
273
|
+
|
274
|
+
module.exports = setup;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* Detect Electron renderer process, which is node, but we should
|
2
|
+
* Detect Electron renderer / nwjs process, which is node, but we should
|
3
3
|
* treat as a browser.
|
4
4
|
*/
|
5
5
|
|
6
|
-
if (typeof process === 'undefined' || process.type === 'renderer') {
|
7
|
-
|
6
|
+
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
7
|
+
module.exports = require('./browser.js');
|
8
8
|
} else {
|
9
|
-
|
9
|
+
module.exports = require('./node.js');
|
10
10
|
}
|