From 7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 28 May 2017 00:38:50 +0200 Subject: add linting (and some initial fixes) --- node_modules/time-require/CHANGELOG.md | 18 +++ node_modules/time-require/LICENSE | 20 +++ node_modules/time-require/README.md | 79 +++++++++++ node_modules/time-require/doc/api.md | 3 + node_modules/time-require/doc/dev.md | 32 +++++ .../time-require/doc/time_require_default.png | Bin 0 -> 16516 bytes .../doc/time_require_verbose_sorted.png | Bin 0 -> 17980 bytes .../time-require/node_modules/.bin/pretty-ms | 1 + .../node_modules/ansi-styles/ansi-styles.js | 38 +++++ .../node_modules/ansi-styles/package.json | 52 +++++++ .../node_modules/ansi-styles/readme.md | 65 +++++++++ .../time-require/node_modules/chalk/index.js | 63 ++++++++ .../chalk/node_modules/.bin/strip-ansi | 1 + .../time-require/node_modules/chalk/package.json | 50 +++++++ .../time-require/node_modules/chalk/readme.md | 158 +++++++++++++++++++++ .../time-require/node_modules/parse-ms/index.js | 14 ++ .../node_modules/parse-ms/package.json | 36 +++++ .../time-require/node_modules/parse-ms/readme.md | 31 ++++ .../time-require/node_modules/pretty-ms/cli.js | 51 +++++++ .../time-require/node_modules/pretty-ms/index.js | 38 +++++ .../node_modules/pretty-ms/package.json | 48 +++++++ .../time-require/node_modules/pretty-ms/readme.md | 80 +++++++++++ .../time-require/node_modules/strip-ansi/cli.js | 27 ++++ .../time-require/node_modules/strip-ansi/index.js | 4 + .../node_modules/strip-ansi/package.json | 53 +++++++ .../time-require/node_modules/strip-ansi/readme.md | 46 ++++++ node_modules/time-require/package.json | 60 ++++++++ node_modules/time-require/src/requireHook.js | 93 ++++++++++++ node_modules/time-require/src/timeRequire.js | 140 ++++++++++++++++++ 29 files changed, 1301 insertions(+) create mode 100644 node_modules/time-require/CHANGELOG.md create mode 100644 node_modules/time-require/LICENSE create mode 100644 node_modules/time-require/README.md create mode 100644 node_modules/time-require/doc/api.md create mode 100644 node_modules/time-require/doc/dev.md create mode 100644 node_modules/time-require/doc/time_require_default.png create mode 100644 node_modules/time-require/doc/time_require_verbose_sorted.png create mode 120000 node_modules/time-require/node_modules/.bin/pretty-ms create mode 100644 node_modules/time-require/node_modules/ansi-styles/ansi-styles.js create mode 100644 node_modules/time-require/node_modules/ansi-styles/package.json create mode 100644 node_modules/time-require/node_modules/ansi-styles/readme.md create mode 100644 node_modules/time-require/node_modules/chalk/index.js create mode 120000 node_modules/time-require/node_modules/chalk/node_modules/.bin/strip-ansi create mode 100644 node_modules/time-require/node_modules/chalk/package.json create mode 100644 node_modules/time-require/node_modules/chalk/readme.md create mode 100644 node_modules/time-require/node_modules/parse-ms/index.js create mode 100644 node_modules/time-require/node_modules/parse-ms/package.json create mode 100644 node_modules/time-require/node_modules/parse-ms/readme.md create mode 100755 node_modules/time-require/node_modules/pretty-ms/cli.js create mode 100644 node_modules/time-require/node_modules/pretty-ms/index.js create mode 100644 node_modules/time-require/node_modules/pretty-ms/package.json create mode 100644 node_modules/time-require/node_modules/pretty-ms/readme.md create mode 100755 node_modules/time-require/node_modules/strip-ansi/cli.js create mode 100644 node_modules/time-require/node_modules/strip-ansi/index.js create mode 100644 node_modules/time-require/node_modules/strip-ansi/package.json create mode 100644 node_modules/time-require/node_modules/strip-ansi/readme.md create mode 100644 node_modules/time-require/package.json create mode 100644 node_modules/time-require/src/requireHook.js create mode 100644 node_modules/time-require/src/timeRequire.js (limited to 'node_modules/time-require') diff --git a/node_modules/time-require/CHANGELOG.md b/node_modules/time-require/CHANGELOG.md new file mode 100644 index 000000000..ef58ed90d --- /dev/null +++ b/node_modules/time-require/CHANGELOG.md @@ -0,0 +1,18 @@ +`time-require` changelog +====================== + +- v0.1.2 (2014.04.20) + * README.md: add NPM downloads and GitHub release, add `gulpt` usage, remove BitBucket hosting/refs + * package.json: update dependencies + * .npmignore: remove all development-related files from NPM (clone the repo instead) +- v0.1.1 (2014.04.10) + * gulpfile.js: add `notifyError` for stream error notification, add `seqTask` for sequential task control, fix `project.js` config replacing `lib/` with `src/` + * README.md: detail project hosting [@BitBucket](https://bitbucket.org/jaguard/time-require) & mirror [@GitHub](https://github.com/jaguard/time-require). + * LICENSE.md renamed to LICENSE to keep it as a simple text file + * package.json: set the [GitHub](https://github.com/jaguard/time-require) mirror as repository, add `run-sequence` for task order control, add `gulp-notify` for notification support +- v0.1.0 (2014.04.10) + + Added `.travis.yml` file for travis-ci.org build support + + Published `time-require` module to [npm](https://www.npmjs.org/package/time-require) + * Include screenshoots as absolute links +- v0.0.1 (2014.03.10) + + Initial release \ No newline at end of file diff --git a/node_modules/time-require/LICENSE b/node_modules/time-require/LICENSE new file mode 100644 index 000000000..95160d592 --- /dev/null +++ b/node_modules/time-require/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2014 Jaguard +MIT License - http://opensource.org/licenses/mit-license.php + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/time-require/README.md b/node_modules/time-require/README.md new file mode 100644 index 000000000..7bc759af6 --- /dev/null +++ b/node_modules/time-require/README.md @@ -0,0 +1,79 @@ +# `time-require` @ [![Jaguard OSS 100%](http://img.shields.io/badge/Jaguard_OSS-100%-red.svg)](http://oss.jaguard.com) [![Built with gulp.js](http://img.shields.io/badge/built%20with-gulp.js-red.svg)](http://gulpjs.com) + +> Displays the execution time for Node.js modules loading by hooking and tracing all `require()` calls. +This module was inspired by [@sindresorhus](https://twitter.com/sindresorhus)'s [time-grunt](https://github.com/sindresorhus/time-grunt). + +## Project status +- NPM version: [![NPM version](https://badge.fury.io/js/time-require.svg)](https://www.npmjs.org/package/time-require) +- NPM downloads: [![NPM downloads](http://img.shields.io/npm/dm/time-require.svg)](https://www.npmjs.org/package/time-require) +- GitHub release: [![GitHub Release](http://img.shields.io/github/release/jaguard/time-require.svg)](https://www.npmjs.org/package/time-require) +- Travis-CI build: [![Build Status](http://img.shields.io/travis/jaguard/time-require.svg)](http://travis-ci.org/jaguard/time-require) +- Drone.io build: [![Build Status](https://drone.io/github.com/jaguard/time-require/status.png)](https://github.com/jaguard/time-require) +- Dependencies: [![Dependencies status](https://david-dm.org/jaguard/time-require/status.svg?theme=shields.io)](https://david-dm.org/jaguard/time-require#info=dependencies) +- Dev Dependencies: [![Dev Dependencies status](https://david-dm.org/jaguard/time-require/dev-status.svg?theme=shields.io)](https://david-dm.org/jaguard/time-require#info=devDependencies) + +Default usage (non-verbose) showing required modules in loaded order, above 1% treshold +![default](doc/time_require_default.png) + +Verbose (all) & sorted usage showing all required modules in sorted order +![verbose-sorted](doc/time_require_verbose_sorted.png) + +## Install + +Install with [npm](https://npmjs.org/package/time-require) + +``` +npm install --save time-require +``` + +## Usage + +1. Embeded usage, generally as first `require()` call in your main module. +```js +require("time-require"); +``` +2. External usage with `--require` preload supported by [Liftoff](https://github.com/tkellen/node-liftoff) driven CLI modules like [gulp.js](http://gulpjs.com/) or [Grunt-Next](https://github.com/gruntjs/grunt-next) +``` +gulp --require time-require --sorted +``` +3. If you're using [gulp.js](http://gulpjs.com/), use instead [gulpt](https://github.com/jaguard/gulpt), a `gulp` CLI wrapper that automatically preload `time-require`. +``` +npm install -g gulpt +gulpt build --sorted +``` + +## Display layout + +Modules loading that take less than `1%` of the total time are hidden to reduce clutter. +To show **all** the modules use the `--verbose` (or `--V`) flag on the running CLI. +To **sort** the modules according to the loading time (longest on top) use the `--sorted` (or `--s`) flag on the running CLI. + +## Documentation + +Detailed API documentation can be found in ['doc'](doc/api.md) folder. + +## Development + +Detailed development documentation can be found in ['doc'](doc/dev.md) folder. + +## License + +[MIT](https://github.com/jaguard/time-require/raw/master/LICENSE) © [Jaguard OSS](http://oss.jaguard.com) + +## Changelog + +- v0.1.2 (2014.04.20) + * README.md: add NPM downloads and GitHub release, add `gulpt` usage, remove BitBucket hosting/refs + * package.json: update dependencies + * .npmignore: remove all development-related files from NPM (clone the repo instead) +- v0.1.1 (2014.04.10) + * gulpfile.js: add `notifyError` for stream error notification, add `seqTask` for sequential task control, fix `project.js` config replacing `lib/` with `src/` + * README.md: detail project hosting [@BitBucket](https://bitbucket.org/jaguard/time-require) & mirror [@GitHub](https://github.com/jaguard/time-require). + * LICENSE.md renamed to LICENSE to keep it as a simple text file + * package.json: set the [GitHub](https://github.com/jaguard/time-require) mirror as repository, add `run-sequence` for task order control, add `gulp-notify` for notification support +- v0.1.0 (2014.04.10) + + Added `.travis.yml` file for travis-ci.org build support + + Published `time-require` module to [npm](https://www.npmjs.org/package/time-require) + * Include screenshoots as absolute links +- v0.0.1 (2014.03.10) + + Initial release \ No newline at end of file diff --git a/node_modules/time-require/doc/api.md b/node_modules/time-require/doc/api.md new file mode 100644 index 000000000..b143de468 --- /dev/null +++ b/node_modules/time-require/doc/api.md @@ -0,0 +1,3 @@ +## API documentation for time-require + +TODO: Detail usage diff --git a/node_modules/time-require/doc/dev.md b/node_modules/time-require/doc/dev.md new file mode 100644 index 000000000..96f629804 --- /dev/null +++ b/node_modules/time-require/doc/dev.md @@ -0,0 +1,32 @@ +## Developer documentation for `time-require` + +`time-require` use [gulp.js](http://gulpjs.com) for build + +#### clean +``` +gulp clean +``` +#### build +``` +gulp +``` +or explicitelly +``` +gulp build +``` +#### run tests +``` +gulp test +``` +#### lint all sources +``` +gulp lint +``` +#### generate documentation +``` +gulp doc +``` +#### watch +``` +gulp watch +``` \ No newline at end of file diff --git a/node_modules/time-require/doc/time_require_default.png b/node_modules/time-require/doc/time_require_default.png new file mode 100644 index 000000000..081969c64 Binary files /dev/null and b/node_modules/time-require/doc/time_require_default.png differ diff --git a/node_modules/time-require/doc/time_require_verbose_sorted.png b/node_modules/time-require/doc/time_require_verbose_sorted.png new file mode 100644 index 000000000..ec7300a09 Binary files /dev/null and b/node_modules/time-require/doc/time_require_verbose_sorted.png differ diff --git a/node_modules/time-require/node_modules/.bin/pretty-ms b/node_modules/time-require/node_modules/.bin/pretty-ms new file mode 120000 index 000000000..e00b450ee --- /dev/null +++ b/node_modules/time-require/node_modules/.bin/pretty-ms @@ -0,0 +1 @@ +../pretty-ms/cli.js \ No newline at end of file diff --git a/node_modules/time-require/node_modules/ansi-styles/ansi-styles.js b/node_modules/time-require/node_modules/ansi-styles/ansi-styles.js new file mode 100644 index 000000000..3da548c40 --- /dev/null +++ b/node_modules/time-require/node_modules/ansi-styles/ansi-styles.js @@ -0,0 +1,38 @@ +'use strict'; +var styles = module.exports; + +var codes = { + reset: [0, 0], + + bold: [1, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + strikethrough: [9, 29], + + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] +}; + +Object.keys(codes).forEach(function (key) { + var val = codes[key]; + var style = styles[key] = {}; + style.open = '\x1b[' + val[0] + 'm'; + style.close = '\x1b[' + val[1] + 'm'; +}); diff --git a/node_modules/time-require/node_modules/ansi-styles/package.json b/node_modules/time-require/node_modules/ansi-styles/package.json new file mode 100644 index 000000000..f0af5291d --- /dev/null +++ b/node_modules/time-require/node_modules/ansi-styles/package.json @@ -0,0 +1,52 @@ +{ + "name": "ansi-styles", + "version": "1.0.0", + "description": "ANSI escape codes for colorizing strings in the terminal", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "homepage": "https://github.com/sindresorhus/ansi-styles", + "bugs": "https://github.com/sindresorhus/ansi-styles/issues", + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "ansi-styles.js" + ], + "main": "ansi-styles", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + } +} diff --git a/node_modules/time-require/node_modules/ansi-styles/readme.md b/node_modules/time-require/node_modules/ansi-styles/readme.md new file mode 100644 index 000000000..4ac8cbd0a --- /dev/null +++ b/node_modules/time-require/node_modules/ansi-styles/readme.md @@ -0,0 +1,65 @@ +# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. + +You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. + +![screenshot](screenshot.png) + + +## Install + +Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` + + +## Example + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### General + +- reset +- bold +- italic +- underline +- inverse +- strikethrough + +### Text colors + +- black +- red +- green +- yellow +- blue +- magenta +- cyan +- white +- gray + +### Background colors + +- bgBlack +- bgRed +- bgGreen +- bgYellow +- bgBlue +- bgMagenta +- bgCyan +- bgWhite + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/time-require/node_modules/chalk/index.js b/node_modules/time-require/node_modules/chalk/index.js new file mode 100644 index 000000000..a21f70223 --- /dev/null +++ b/node_modules/time-require/node_modules/chalk/index.js @@ -0,0 +1,63 @@ +'use strict'; +var ansi = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasColor = require('has-color'); +var defineProps = Object.defineProperties; +var chalk = module.exports; + +var styles = (function () { + var ret = {}; + + ansi.grey = ansi.gray; + + Object.keys(ansi).forEach(function (key) { + ret[key] = { + get: function () { + this._styles.push(key); + return this; + } + }; + }); + + return ret; +})(); + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + var obj = defineProps(function self() { + var str = [].slice.call(arguments).join(' '); + + if (!chalk.enabled) { + return str; + } + + return self._styles.reduce(function (str, name) { + var code = ansi[name]; + return str ? code.open + str + code.close : ''; + }, str); + }, styles); + + obj._styles = []; + + return obj[name]; + } + } + }); + + return ret; +} + +defineProps(chalk, init()); + +chalk.styles = ansi; +chalk.stripColor = stripAnsi; +chalk.supportsColor = hasColor; + +// detect mode if not set manually +if (chalk.enabled === undefined) { + chalk.enabled = chalk.supportsColor; +} diff --git a/node_modules/time-require/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/time-require/node_modules/chalk/node_modules/.bin/strip-ansi new file mode 120000 index 000000000..f7646606c --- /dev/null +++ b/node_modules/time-require/node_modules/chalk/node_modules/.bin/strip-ansi @@ -0,0 +1 @@ +../../../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/time-require/node_modules/chalk/package.json b/node_modules/time-require/node_modules/chalk/package.json new file mode 100644 index 000000000..448f75aac --- /dev/null +++ b/node_modules/time-require/node_modules/chalk/package.json @@ -0,0 +1,50 @@ +{ + "name": "chalk", + "version": "0.4.0", + "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", + "license": "MIT", + "repository": "sindresorhus/chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "ansi", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "has-color": "~0.1.0", + "ansi-styles": "~1.0.0", + "strip-ansi": "~0.1.0" + }, + "devDependencies": { + "mocha": "~1.x" + } +} diff --git a/node_modules/time-require/node_modules/chalk/readme.md b/node_modules/time-require/node_modules/chalk/readme.md new file mode 100644 index 000000000..46813acfc --- /dev/null +++ b/node_modules/time-require/node_modules/chalk/readme.md @@ -0,0 +1,158 @@ +# chalk + +> Terminal string styling done right + +[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) + +[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. + +**Chalk is a clean and focused alternative.** + +![screenshot](screenshot.png) + + +## Why + +- **Doesn't extend String.prototype** +- Expressive API +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk) + + +## Install + +Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` + + +## Example + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +var chalk = require('chalk'); + +// style a string +console.log( chalk.blue('Hello world!') ); + +// combine styled and normal strings +console.log( chalk.blue('Hello'), 'World' + chalk.red('!') ); + +// compose multiple styles using the chainable API +console.log( chalk.blue.bgRed.bold('Hello world!') ); + +// nest styles +console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') ); + +// pass in multiple arguments +console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') ); +``` + +You can easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + + +## API + +### chalk.`