kubernetes-handbook/commander/package.json

127 lines
17 KiB
JSON
Raw Normal View History

{
"_args": [
[
{
"name": "commander",
"raw": "commander@^2.9.0",
"rawSpec": "^2.9.0",
"scope": null,
"spec": ">=2.9.0 <3.0.0",
"type": "range"
},
"/gitbook/node_modules/har-validator"
]
],
"_from": "commander@>=2.9.0 <3.0.0",
"_hasShrinkwrap": false,
"_id": "commander@2.20.3",
"_inCache": true,
"_installable": true,
"_location": "/commander",
"_nodeVersion": "12.11.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/commander_2.20.3_1570772424007_0.3931389310307576"
},
"_npmUser": {
"email": "abe@enzou.tokyo",
"name": "abetomo"
},
"_npmVersion": "6.11.3",
"_phantomChildren": {},
"_requested": {
"name": "commander",
"raw": "commander@^2.9.0",
"rawSpec": "^2.9.0",
"scope": null,
"spec": ">=2.9.0 <3.0.0",
"type": "range"
},
"_requiredBy": [
"/har-validator"
],
"_resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"_shasum": "fd485e84c03eb4881c20722ba48035e8531aeb33",
"_shrinkwrap": null,
"_spec": "commander@^2.9.0",
"_where": "/gitbook/node_modules/har-validator",
"author": {
"email": "tj@vision-media.ca",
"name": "TJ Holowaychuk"
},
"bugs": {
"url": "https://github.com/tj/commander.js/issues"
},
"dependencies": {},
"description": "the complete solution for node.js command-line programs",
"devDependencies": {
"@types/node": "^12.7.8",
"eslint": "^6.4.0",
"should": "^13.2.3",
"sinon": "^7.5.0",
"standard": "^14.3.1",
"ts-node": "^8.4.1",
"typescript": "^3.6.3"
},
"directories": {},
"dist": {
"fileCount": 6,
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoBXICRA9TVsSAnZWagAAxZoQAJuUZ2avRahPhSmn15Vt\nRrnyt/EzaZaR9jGpwPpdSVKEyEypyKO21zsrFKg+3TjJGLQVb6gd6eXvY3Rs\nTG1JeNQKYyqcrvH+q94ZIDTMT4tzUv50MVBuSdVCAQB2liHKzcay2aMbd0bW\nFbb56rVEfixabLoYJGhpsHAamzAD51CpxwjpeKuVIYe2LDTxcDOAsMvrjxwK\nB1vsuQe4EqcuMWE0a7jtGJTHqxxqQxcvZLloxgO+kr6TGMZQ1oMtwhRUayNO\nPbN9R97nhOoV9J9AZu28O98yJXiz6p7TQ11JeN/mWF8F4LT1N5Nv227OHP/a\nVh6EtM6YPMLQU6lQTWUVa9BF6mqCMREBY9QRmh8wfRhrrCfD9oOez1qmGsx6\nnz6zqiqabuy8KlULmhyXA2ixHcKgEimlQOVDGJLy4EJIv84o+GCdVJNiP9qd\nrB7qTVbiNm9TiY22OehPADtx9QhcavZuju6xftjXllvjKN3lJFx+jbyenfR5\nBonTnPuqx4+dmUyFnmfHSM7pHO7NtzpLuEx7N/SGDtUfI6KPRBSEt7DpoaFu\nF7lABbtehgMpcR/gCOMez7BXcNkigDWHQeRqaJ+iedXrd3YLvJMQoaFgUmDU\nMyS3zLW3srq8EsazcsdlmQpVb8lRJjKnki6Bj93v0caKaT+4aAjpMtn2xyCK\nPqC9\r\n=91C8\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "fd485e84c03eb4881c20722ba48035e8531aeb33",
"tarball": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"unpackedSize": 62442
},
"gitHead": "6b8499b24f4f6498ad630c50c8a00c9579a8536b",
"homepage": "https://github.com/tj/commander.js#readme",
"keywords": [
"commander",
"command",
"option",
"parser"
],
"license": "MIT",
"main": "index",
"maintainers": [
{
"email": "abe@enzou.tokyo",
"name": "abetomo"
},
{
"email": "npm_j@ruru.gen.nz",
"name": "shadowspawn"
},
{
"email": "rkoutnik@gmail.com",
"name": "somekittens"
},
{
"email": "tj@vision-media.ca",
"name": "tjholowaychuk"
},
{
"email": "romain.vanesyan@gmail.com",
"name": "vanesyan"
},
{
"email": "zhiyelee@gmail.com",
"name": "zhiyelee"
}
],
"name": "commander",
"optionalDependencies": {},
"readme": "# Commander.js\n\n\n[![Build Status](https://api.travis-ci.org/tj/commander.js.svg?branch=master)](http://travis-ci.org/tj/commander.js)\n[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander)\n[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true)\n[![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander)\n[![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander). \n [API documentation](http://tj.github.com/commander.js/)\n\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\nOptions with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.1.0')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq-sauce', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineapple');\nif (program.bbqSauce) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\nShort flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\nNote that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .option('--no-sauce', 'Remove sauce')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza');\nif (program.sauce) console.log(' with sauce');\nelse console.log(' without sauce');\n```\n\nTo get string arguments from options you will need to use angle brackets <> for required inputs or square brackets [] for optional inputs. \n\ne.g. ```.option('-m --myarg [myVar]', 'my super cool description')```\n\nThen to access the input if it was passed in.\n\ne.g. ```var myInput = program.myarg```\n\n**NOTE**: If you pass a argument without using brackets the example above will return true and not the value passed in.\n\n\n## Version option\n\nCalling the `version` implicitly adds the `-V` and `--version` options to the command.\nWhen either of these options is present, the command prints the version number and exits.\n\n $ ./examples/pizza -V\n 0.0.1\n\nIf you want your program to respond to the `-v` option instead of the `-V` option, simply pass custom flags to the `version` method using the same syntax as the `option` method.\n\n```js\nprogram\n .version('0.0.1', '-v, --version')\n```\n\nThe version flags can be named anything, but the long option is required.\n\n## Command-specific options\n\nYou can attach options to a command.\n\n```js\n#!/usr/bin/env node\n\nvar program = require('commander');\n\nprogram\n .command('rm <dir>')\n .option('-r, --recursive', 'Remove recursively')\n .action(function (dir, cmd) {\n console.log('remove ' + dir + (cmd.recursive ? ' recursively' : ''))\n })\n\nprogram.parse(process.argv)\n```\n\nA command's options are validated when the command is used. Any unknown options will be reported as an error. However, if
"readmeFilename": "Readme.md",
"repository": {
"type": "git",
"url": "git+https://github.com/tj/commander.js.git"
},
"scripts": {
"lint": "eslint index.js",
"test": "node test/run.js && npm run test-typings",
"test-typings": "tsc -p tsconfig.json"
},
"typings": "typings/index.d.ts",
"version": "2.20.3"
}