{"_id":"sudo","_rev":"2771175","name":"sudo","description":"Wrap sudo with optional password cache","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"calmh","email":"jakob@nym.se"}],"time":{"modified":"2022-05-23T09:39:26.000Z","created":"2012-08-15T09:19:09.071Z","1.0.3":"2012-10-29T11:01:05.159Z","1.0.2":"2012-08-15T16:12:26.335Z","1.0.1":"2012-08-15T09:26:04.413Z","1.0.0":"2012-08-15T09:19:09.071Z"},"users":{},"author":{"name":"Jakob Borg","email":"jakob@nym.se","url":"http://nym.se/"},"repository":{"type":"git","url":"git://github.com/calmh/node-sudo.git"},"versions":{"1.0.3":{"author":{"name":"Jakob Borg","email":"jakob@nym.se","url":"http://nym.se/"},"name":"sudo","description":"Wrap sudo with optional password cache","version":"1.0.3","homepage":"https://github.com/calmh/node-sudo","repository":{"type":"git","url":"git://github.com/calmh/node-sudo.git"},"main":"lib/sudo.js","dependencies":{"inpath":"~1.0.2","read":"~1.0.3","pidof":"~1.0.2"},"devDependencies":{},"optionalDependencies":{},"engines":{"node":">=0.8"},"_id":"sudo@1.0.3","dist":{"shasum":"ccf28669120f8b74f82b846dff7f1c95120eff20","size":2544,"noattachment":false,"key":"/sudo/-/sudo-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/sudo/download/sudo-1.0.3.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"calmh","email":"jakob@nym.se"},"maintainers":[{"name":"calmh","email":"jakob@nym.se"}],"directories":{},"publish_time":1351508465159,"_hasShrinkwrap":false,"_cnpm_publish_time":1351508465159,"_cnpmcore_publish_time":"2021-12-16T18:18:41.168Z"},"1.0.2":{"author":{"name":"Jakob Borg","email":"jakob@nym.se","url":"http://nym.se/"},"name":"sudo","description":"Wrap sudo with optional password cache","version":"1.0.2","homepage":"https://github.com/calmh/node-sudo","repository":{"type":"git","url":"git://github.com/calmh/node-sudo.git"},"main":"lib/sudo.js","dependencies":{"inpath":"~1.0.2","read":"~1.0.3","pidof":"~1.0.2"},"devDependencies":{},"optionalDependencies":{},"engines":{"node":">=0.8"},"_id":"sudo@1.0.2","dist":{"shasum":"09b2d870bf47e8efc4c110e1ec9c4eb8ba169296","size":2582,"noattachment":false,"key":"/sudo/-/sudo-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sudo/download/sudo-1.0.2.tgz"},"maintainers":[{"name":"calmh","email":"jakob@nym.se"}],"directories":{},"publish_time":1345047146335,"_hasShrinkwrap":false,"_cnpm_publish_time":1345047146335,"_cnpmcore_publish_time":"2021-12-16T18:18:41.372Z"},"1.0.1":{"author":{"name":"Jakob Borg","email":"jakob@nym.se","url":"http://nym.se/"},"name":"sudo","description":"Wrap sudo with optional password cache","version":"1.0.1","homepage":"https://github.com/calmh/node-sudo","repository":{"type":"git","url":"git://github.com/calmh/node-sudo.git"},"main":"lib/sudo.js","dependencies":{"inpath":"~1.0.2","read":"~1.0.3"},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_id":"sudo@1.0.1","dist":{"shasum":"2edb102ee0c752317777366035049d3f9dd0b1a4","size":2289,"noattachment":false,"key":"/sudo/-/sudo-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sudo/download/sudo-1.0.1.tgz"},"maintainers":[{"name":"calmh","email":"jakob@nym.se"}],"directories":{},"publish_time":1345022764413,"_hasShrinkwrap":false,"_cnpm_publish_time":1345022764413,"_cnpmcore_publish_time":"2021-12-16T18:18:41.610Z"},"1.0.0":{"author":{"name":"Jakob Borg","email":"jakob@nym.se","url":"http://nym.se/"},"name":"sudo","description":"Wrap sudo with optional password cache","version":"1.0.0","homepage":"https://github.com/calmh/node-sudo","repository":{"type":"git","url":"git://github.com/calmh/node-sudo.git"},"main":"lib/sudo.js","dependencies":{"inpath":"~1.0.2","read":"~1.0.3"},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_id":"sudo@1.0.0","dist":{"shasum":"3a596f25ed2c763d56b57cfa8d10339b8a3a5806","size":2238,"noattachment":false,"key":"/sudo/-/sudo-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sudo/download/sudo-1.0.0.tgz"},"maintainers":[{"name":"calmh","email":"jakob@nym.se"}],"directories":{},"publish_time":1345022349071,"_hasShrinkwrap":false,"_cnpm_publish_time":1345022349071,"_cnpmcore_publish_time":"2021-12-16T18:18:41.864Z"}},"readme":"node-sudo\n=========\n\nA `child_process.spawn` but with `sudo` in between. The `sudo` password dialog\nis abstracted away so that the calling Node script can interact with the\nprogram that is run under `sudo` without worrying about it.\n\nSynopsis\n--------\n\n```javascript\nsudo(args, options)\n```\n\n - `args`: An array of arguments to `sudo`. Can be both options (such as `-v`\n   or `-E`) and the program to run. Example: `['ls']`.\n\n - `options`: An optional object containing options. Recognized options are:\n\n    - `cachePassword`: Boolean; whether to remember the password between\n      invocations or not.\n\n    - `prompt`: String; what to display to the user when the password is\n      needed.\n\n    - `spawnOptions`: Object; passed on directly to `spawn`. `stdio` or\n      `customFds` will be overwritten.\n\nExample\n-------\n\n```javascript\nvar sudo = require('sudo');\nvar options = {\n    cachePassword: true,\n    prompt: 'Password, yo? ',\n    spawnOptions: { /* other options for spawn */ }\n};\nvar child = sudo([ 'ls', '-l', '/tmp' ], options);\nchild.stdout.on('data', function (data) {\n    console.log(data.toString());\n});\n```\n\nLicense\n-------\n\nMIT\n","_attachments":{},"homepage":"https://github.com/calmh/node-sudo"}