diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/liftoff | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) | |
download | wallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz |
update packages
Diffstat (limited to 'node_modules/liftoff')
-rw-r--r-- | node_modules/liftoff/.jscsrc | 60 | ||||
-rw-r--r-- | node_modules/liftoff/.jshintrc | 11 | ||||
-rw-r--r-- | node_modules/liftoff/.npmignore | 2 | ||||
-rw-r--r-- | node_modules/liftoff/.travis.yml | 16 | ||||
-rw-r--r-- | node_modules/liftoff/CHANGELOG | 2 | ||||
-rw-r--r-- | node_modules/liftoff/README.md | 30 | ||||
-rw-r--r-- | node_modules/liftoff/UPGRADING.md | 28 | ||||
-rw-r--r-- | node_modules/liftoff/appveyor.yml | 29 | ||||
-rw-r--r-- | node_modules/liftoff/index.js | 37 | ||||
-rw-r--r-- | node_modules/liftoff/lib/register_loader.js | 3 | ||||
-rw-r--r-- | node_modules/liftoff/package.json | 58 |
11 files changed, 74 insertions, 202 deletions
diff --git a/node_modules/liftoff/.jscsrc b/node_modules/liftoff/.jscsrc deleted file mode 100644 index af3c78ee7..000000000 --- a/node_modules/liftoff/.jscsrc +++ /dev/null @@ -1,60 +0,0 @@ -{ - "esnext": true, - "disallowMixedSpacesAndTabs": true, - "disallowSpaceAfterObjectKeys": true, - "disallowSpaceBeforeBinaryOperators": [ - "," - ], - "disallowSpacesInsideArrayBrackets": true, - "disallowSpacesInsideParentheses": true, - "disallowTrailingWhitespace": true, - "requireCommaBeforeLineBreak": true, - "requireLineFeedAtFileEnd": true, - "requireSpaceAfterBinaryOperators": [ - "=", - ",", - "+", - "-", - "/", - "*", - "==", - "===", - "!=", - "!==", - ":", - "&&", - "||" - ], - "requireSpaceAfterKeywords": [ - "if", - "else", - "for", - "while", - "do", - "switch", - "return", - "try", - "catch" - ], - "requireSpaceBeforeBinaryOperators": [ - "=", - "+", - "-", - "/", - "*", - "==", - "===", - "!=", - "!==", - "&&", - "||" - ], - "requireSpaceBeforeBlockStatements": true, - "requireSpacesInFunctionExpression": { - "beforeOpeningCurlyBrace": true - }, - "validateQuoteMarks": { - "escape": true, - "mark": "'" - } -} diff --git a/node_modules/liftoff/.jshintrc b/node_modules/liftoff/.jshintrc deleted file mode 100644 index 687108403..000000000 --- a/node_modules/liftoff/.jshintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "undef": true, - "unused": true, - "node": true, - "esnext": true, - "expr": true, - "globals": { - "describe": true, - "it": true - } -} diff --git a/node_modules/liftoff/.npmignore b/node_modules/liftoff/.npmignore deleted file mode 100644 index 9c9c73b8c..000000000 --- a/node_modules/liftoff/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test -artwork diff --git a/node_modules/liftoff/.travis.yml b/node_modules/liftoff/.travis.yml deleted file mode 100644 index 61ec9ece7..000000000 --- a/node_modules/liftoff/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: node_js -os: - - linux - - osx -node_js: - - "6" - - "5" - - "4" - - "0.12" - - "0.10" -before_install: - - npm update -g npm -matrix: - fast_finish: true - allow_failures: - - node_js: "0.10" diff --git a/node_modules/liftoff/CHANGELOG b/node_modules/liftoff/CHANGELOG index ee5b84d58..e612f4e72 100644 --- a/node_modules/liftoff/CHANGELOG +++ b/node_modules/liftoff/CHANGELOG @@ -74,7 +74,7 @@ v0.12.0: v0.11.3: date: 2014-06-09 changes: - - Make cwd match configBase if cwd isn't explictly provided + - Make cwd match configBase if cwd isn't explicitly provided v0.11.2: date: 2014-06-04 changes: diff --git a/node_modules/liftoff/README.md b/node_modules/liftoff/README.md index 9a5a0ae01..892f03dbb 100644 --- a/node_modules/liftoff/README.md +++ b/node_modules/liftoff/README.md @@ -4,7 +4,8 @@ </a> </p> -# liftoff [![Build Status](https://secure.travis-ci.org/js-cli/js-liftoff.svg)](http://travis-ci.org/js-cli/js-liftoff) [![Build status](https://ci.appveyor.com/api/projects/status/5a6w8xuq8ed1ilc4/branch/master?svg=true)](https://ci.appveyor.com/project/js-cli/js-liftoff/branch/master) +# liftoff [![Build Status](http://img.shields.io/travis/js-cli/js-liftoff.svg?label=travis-ci)](http://travis-ci.org/js-cli/js-liftoff) [![Build status](https://img.shields.io/appveyor/ci/phated/js-liftoff.svg?label=appveyor)](https://ci.appveyor.com/project/phated/js-liftoff) + > Launch your command line tool with ease. @@ -106,7 +107,7 @@ const MyApp = new Liftoff({ }); ``` -In this example, Liftoff will automatically attempt to load the correct module for any javascript variant supported by [node-interpret](https://github.com/tkellen/node-interpret) (as long as it does not require a register method). +In this example, Liftoff will automatically attempt to load the correct module for any javascript variant supported by [interpret](https://github.com/js-cli/js-interpret) (as long as it does not require a register method). ```js const MyApp = new Liftoff({ @@ -116,7 +117,7 @@ const MyApp = new Liftoff({ ``` #### opts.v8flags -Any flag specified here will be applied to node, not your program. Useful for supporting invocations like `myapp --harmony command`, where `--harmony` should be passed to node, not your program. This functionality is implemented using [flagged-respawn](http://github.com/tkellen/node-flagged-respawn). To support all v8flags, see [node-v8flags](https://github.com/tkellen/node-v8flags). +Any flag specified here will be applied to node, not your program. Useful for supporting invocations like `myapp --harmony command`, where `--harmony` should be passed to node, not your program. This functionality is implemented using [flagged-respawn](http://github.com/js-cli/js-flagged-respawn). To support all v8flags, see [v8flags](https://github.com/js-cli/js-v8flags). Type: `Array|Function` Default: `null` @@ -356,6 +357,27 @@ MyApp.launch({ myapp --require coffee-script/register ``` +#### opts.forcedFlags + +Allows you to force node or V8 flags during the launch. This is useful if you need to make sure certain flags will always be enabled or if you need to enable flags that don't show up in `opts.v8flags` (as these flags aren't validated against `opts.v8flags`). + +If this is specified as a function, it will receive the built `env` as its only argument and must return a string or array of flags to force. + +Type: `String|Array|Function` +Default: `null` + +**Example Configuration:** +```js +MyApp.launch({ + forcedFlags: ['--trace-deprecation'] +}, invoke); +``` + +**Matching CLI Invocation:** +```js +myapp --trace-deprecation +``` + #### callback(env) A function to start your application. When invoked, `this` will be your instance of Liftoff. The `env` param will contain the following keys: @@ -417,7 +439,7 @@ Event will be triggered for this command: ## Examples -Check out how [gulp](https://github.com/gulpjs/gulp/blob/master/bin/gulp.js) uses Liftoff. +Check out how [gulp](https://github.com/gulpjs/gulp-cli/blob/master/index.js) uses Liftoff. For a bare-bones example, try [the hacker project](https://github.com/js-cli/js-hacker/blob/master/bin/hacker.js). diff --git a/node_modules/liftoff/UPGRADING.md b/node_modules/liftoff/UPGRADING.md deleted file mode 100644 index 7f95e3ee8..000000000 --- a/node_modules/liftoff/UPGRADING.md +++ /dev/null @@ -1,28 +0,0 @@ -# 1.0.0 -> 2.0.0 -The option `nodeFlags` was renamed to `v8flags` for accuracy. It can now be a callback taking method that yields an array of flags, **or** an array literal. - -# 0.11 -> 0.12 -For the environment passed into the `launch` callback, `configNameRegex` has been renamed to `configNameSearch`. It now returns an array of valid config names instead of a regular expression. - -# 0.10 -> 0.11 -The method signature for `launch` was changed in this version of Liftoff. - -You must now provide your own options parser and pass your desired params directly into `launch` as the first argument. The second argument is now the invocation callback that starts your application. - -To replicate the default functionality of 0.10, use the following: -```js -const Liftoff = require('liftoff'); -const MyApp = new Liftoff({name:'myapp'}); -const argv = require('minimist')(process.argv.slice(2)); -const invoke = function (env) { - console.log('my environment is:', env); - console.log('my cli options are:', argv); - console.log('my liftoff config is:', this); -}; -MyApp.launch({ - cwd: argv.cwd, - configPath: argv.myappfile, - require: argv.require, - completion: argv.completion -}, invoke); -``` diff --git a/node_modules/liftoff/appveyor.yml b/node_modules/liftoff/appveyor.yml deleted file mode 100644 index bcb6b74a8..000000000 --- a/node_modules/liftoff/appveyor.yml +++ /dev/null @@ -1,29 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml -# http://www.appveyor.com/docs/lang/nodejs-iojs - -environment: - matrix: - # node.js - - nodejs_version: "0.10" - - nodejs_version: "0.12" - - nodejs_version: "4" - - nodejs_version: "5" - - nodejs_version: "6" - -install: - - IF %nodejs_version% EQU 0.10 npm -g install npm@2 - - IF %nodejs_version% EQU 0.10 set PATH=%APPDATA%\npm;%PATH% - - ps: Install-Product node $env:nodejs_version - - npm install - -test_script: - - node --version - - npm --version - # power shell - - ps: "npm test" - # standard command line - - cmd: npm test - -build: off - -version: "{build}" diff --git a/node_modules/liftoff/index.js b/node_modules/liftoff/index.js index 0c0a8d5e9..7415dcfe3 100644 --- a/node_modules/liftoff/index.js +++ b/node_modules/liftoff/index.js @@ -6,8 +6,8 @@ const EE = require('events').EventEmitter; const extend = require('extend'); const resolve = require('resolve'); const flaggedRespawn = require('flagged-respawn'); -const isPlainObject = require('lodash.isplainobject'); -const mapValues = require('lodash.mapvalues'); +const isPlainObject = require('is-plain-object'); +const mapValues = require('object.map'); const fined = require('fined'); const findCwd = require('./lib/find_cwd'); @@ -17,6 +17,7 @@ const parseOptions = require('./lib/parse_options'); const silentRequire = require('./lib/silent_require'); const buildConfigName = require('./lib/build_config_name'); const registerLoader = require('./lib/register_loader'); +const getNodeFlags = require('./lib/get_node_flags'); function Liftoff (opts) { @@ -91,7 +92,7 @@ Liftoff.prototype.buildEnvironment = function (opts) { // locate local module and package next to config or explicitly provided cwd var modulePath, modulePackage; try { - var delim = (process.platform === 'win32' ? ';' : ':'), + var delim = path.delimiter, paths = (process.env.NODE_PATH ? process.env.NODE_PATH.split(delim) : []); modulePath = resolve.sync(this.moduleName, {basedir: configBase || cwd, paths: paths}); modulePackage = silentRequire(fileSearch('package.json', [modulePath])); @@ -185,21 +186,21 @@ Liftoff.prototype.launch = function (opts, fn) { this.handleFlags(function (err, flags) { if (err) { throw err; - } else { - if (flags) { - flaggedRespawn(flags, process.argv, function (ready, child) { - if (child !== process) { - this.emit('respawn', process.argv.filter(function (arg) { - var flag = arg.split('=')[0]; - return flags.indexOf(flag) !== -1; - }.bind(this)), child); - } - if (ready) { - fn.call(this, this.buildEnvironment(opts)); - } - }.bind(this)); - } else { - fn.call(this, this.buildEnvironment(opts)); + } + flags = flags || []; + + var env = this.buildEnvironment(opts); + + var forcedFlags = getNodeFlags.arrayOrFunction(opts.forcedFlags, env); + flaggedRespawn(flags, process.argv, forcedFlags, execute.bind(this)); + + function execute(ready, child, argv) { + if (child !== process) { + var execArgv = getNodeFlags.fromReorderedArgv(argv); + this.emit('respawn', execArgv, child); + } + if (ready) { + fn.call(this, env, argv); } } }.bind(this)); diff --git a/node_modules/liftoff/lib/register_loader.js b/node_modules/liftoff/lib/register_loader.js index 2b5f4cb75..e29b08ad5 100644 --- a/node_modules/liftoff/lib/register_loader.js +++ b/node_modules/liftoff/lib/register_loader.js @@ -1,10 +1,9 @@ const rechoir = require('rechoir'); -const isString = require('lodash.isstring'); module.exports = function(eventEmitter, extensions, configPath, cwd) { extensions = extensions || {}; - if (!isString(configPath)) { + if (typeof configPath !== 'string') { return; } diff --git a/node_modules/liftoff/package.json b/node_modules/liftoff/package.json index aa828ded3..5fd54dd16 100644 --- a/node_modules/liftoff/package.json +++ b/node_modules/liftoff/package.json @@ -1,48 +1,44 @@ { "name": "liftoff", + "version": "2.5.0", "description": "Launch your command line tool with ease.", - "version": "2.3.0", - "homepage": "https://github.com/js-cli/js-liftoff", - "author": { - "name": "Tyler Kellen", - "url": "http://goingslowly.com/" - }, - "repository": { - "type": "git", - "url": "git://github.com/js-cli/js-liftoff.git" - }, - "bugs": { - "url": "https://github.com/js-cli/js-liftoff/issues" - }, + "author": "Tyler Kellen (http://goingslowly.com/)", + "contributors": [], + "repository": "js-cli/js-liftoff", "license": "MIT", - "main": "index.js", "engines": { "node": ">= 0.8" }, + "main": "index.js", + "files": [ + "index.js", + "lib", + "LICENSE" + ], "scripts": { - "test": "jshint lib index.js && jscs lib index.js && mocha -t 5000 -b -R spec test/index" + "test": "jshint lib index.js && jscs lib index.js && mocha -t 5000 -b -R spec test/index", + "cover": "nyc --reporter=lcov --reporter=text-summary npm test" + }, + "dependencies": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" }, "devDependencies": { "chai": "^3.5.0", - "coffee-script": "^1.10.0", - "istanbul": "^0.4.3", - "jscs": "^2.11.0", + "coffeescript": "^1.10.0", + "jscs": "^3.0.7", "jshint": "^2.9.2", - "mocha": "^2.4.5", + "mocha": "^3.5.3", + "nyc": "^11.2.1", "sinon": "~1.17.4" }, "keywords": [ "command line" - ], - "dependencies": { - "extend": "^3.0.0", - "findup-sync": "^0.4.2", - "fined": "^1.0.1", - "flagged-respawn": "^0.3.2", - "lodash.isplainobject": "^4.0.4", - "lodash.isstring": "^4.0.1", - "lodash.mapvalues": "^4.4.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - } + ] } |