{"_id":"process-finder","_rev":"27-dbec8b6e7ccf15d8c1457857ad018236","name":"process-finder","description":"Find processes using a simple API","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"nicolasbevacqua@gmail.com","url":"http://www.ponyfoo.com"},"version":"0.0.1","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{},"main":"./finder.js","engines":{"node":"0.10.6","npm":"1.2.x"},"_id":"process-finder@0.0.1","dist":{"shasum":"b8a7938cd8f7552735daa4f9e745fa3d6da4e895","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.0.1.tgz","integrity":"sha512-Qr5i5aH0EgpWnLjQf10LO2dMlgTDhhxqCkWjKC7WalO4GXH1BF1V7zQrXGqUypyZYkTuoqQPJaaah82NORxADA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFdtuhupXeSKXNfRpBW+Ntk13r9c3BBH8Urt4Mlm8RiAIhANyBnM+lOXR2Niden+46IlmrsjGUJu5AefF4U2ATCv/t"}]},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.0.2":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"nicolasbevacqua@gmail.com","url":"http://www.ponyfoo.com"},"version":"0.0.2","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{},"main":"./finder.js","engines":{"node":"0.10.6","npm":"1.2.x"},"_id":"process-finder@0.0.2","dist":{"shasum":"b20acf49b2378d7a52fc96a4f0410965dca8a390","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.0.2.tgz","integrity":"sha512-o9QyBq2GhT/x9Kaftxfz1qZ9bmruxSZ7j+wijxbZDEJvz6ennO/I29BqjY84o9S9YXvf4ueNyWnWVekF45jVEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxJhaNisIFifVh8GfBG1vcIY16w5heygP/I5Ot4FcKFwIgLlYXRGrBq+WpocGQM18qyIJBYj77h27wsH/DzpegoVo="}]},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.0.3":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"nicolasbevacqua@gmail.com","url":"http://www.ponyfoo.com"},"version":"0.0.3","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{},"main":"./finder.js","engines":{"node":"0.10.6","npm":"1.2.x"},"_id":"process-finder@0.0.3","dist":{"shasum":"332122088acd9d610d296afc25519c9f8f56367c","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.0.3.tgz","integrity":"sha512-gQqgToQwbbknePtTx4zPcl3VIHKMjSkE4zAwul+UlKcf5/C1ciQQBzjd136VXPmk1ryuafPaQhHG3INEAb9dsA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB2ISjl88PLrpr5g4O1DVKzB0JtCVfy7Y0R25ghb+Y/tAiEA9mFXwOGoAUt0TGvVF1KErBAJzKNqgCC2q2hnYY8KKvw="}]},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.0.4":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"nicolasbevacqua@gmail.com","url":"http://www.ponyfoo.com"},"version":"0.0.4","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{},"main":"./finder.js","engines":{"node":"0.10.6","npm":"1.2.x"},"_id":"process-finder@0.0.4","dist":{"shasum":"9cc7e6a27508189a5e17dff9007cd55f3022fad9","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.0.4.tgz","integrity":"sha512-rMgLwRXRmu3jiJYf+rH6ctefv7cZzkTQxQIp3xH+8qI3v7CiidOd8XyROSP7n+p4dEyowaUtHNw+sbnVESP8pA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCquP2bqJbrfjFZto6lORc8+gW8a/Ome2C/h6BIhGNdeAIgS2a1AX2YJbgZWpRrJlBWZ0FrkLUboIT0+z9fnIIV+p4="}]},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.0.5":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"nicolasbevacqua@gmail.com","url":"http://www.ponyfoo.com"},"version":"0.0.5","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{},"main":"./finder.js","engines":{"node":"0.10.6","npm":"1.2.x"},"_id":"process-finder@0.0.5","dist":{"shasum":"a7f028f0298496fd6a889dae574a9f4691642411","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.0.5.tgz","integrity":"sha512-Tn7M1lwNdbUnDRlSZwgDU/JSf7aAKjI1BY8TK93CEDL45MvJXLuNGEMtisorMauxHnjl2rzZvIrpEK+NfCnBAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICbAPUCn1+r8qwIRwNvpp7/kkW/qrmCo+2qkch3GlFy+AiEA+yHCngRJyPlMnWtrc3EtP5lsC/WLNbXhqXD9+h2f93s="}]},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.0.6":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"nicolasbevacqua@gmail.com","url":"http://www.ponyfoo.com"},"version":"0.0.6","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{},"main":"./finder.js","engines":{"node":"0.10.6","npm":"1.2.x"},"_id":"process-finder@0.0.6","dist":{"shasum":"fbea9de89b647b88dcc1368be1198e226830a0b0","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.0.6.tgz","integrity":"sha512-wMl0njHE4CtEqWqm54u3SSOsxae/oIsclAiSvaFWeZnZfiwQnBukwIUnCeItzJcBXbjBvUoJCDOFioPA+uddRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG7WDqUpWMi/Nxp1wbng7Z7fJkqZacuU91TAv/JjaWL3AiEAiMNlz5ndVWA2UAh5OBEbm137Yd2tJ2tTgrcDqQnHh5U="}]},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.0.7":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"nicolasbevacqua@gmail.com","url":"http://www.ponyfoo.com"},"version":"0.0.7","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{},"main":"./finder.js","engines":{"node":"0.10.6","npm":"1.2.x"},"_id":"process-finder@0.0.7","dist":{"shasum":"4c6b572915c3dcfb208356141f4e2ebb11ce0274","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.0.7.tgz","integrity":"sha512-RWZZNwiXQrs6zL/o4TYXT+5GYfFul8gAnrF97oM0DUxDyl797uN+/MBx/uir/ltmI9aUMY3Xt4J0cb0rBM/smw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZuVu/Il9s3OXRQgAVyDsGuZGbjuiVwO8y3rKFyTrsZAiEA+pKHsJ4aKrQmndZtjLvl83sinanbnahg3TRGbq2xoPM="}]},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.1.0":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"hello@bevacqua.io","url":"http://ponyfoo.com"},"version":"0.1.0","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{},"main":"./finder.js","bin":{"procfinder":"bin/procfinder"},"_id":"process-finder@0.1.0","dist":{"shasum":"fa7c5837e909fd3eae93dfd0e83c11e4397979ad","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.1.0.tgz","integrity":"sha512-BRnnh7J02GUkFykiPSFb0wPmHZM5pgE7cKDy3iBxhqqoQx6pWKVlRiGuhKndDyxN2HVOr9SngJ9qgAEwkTZ11g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKM6ntcxHtUi+tO9BJUmqEelqf+4JqJKwdVhVfe2mxBAiAcQLkDbV1s1/nhdUctn+vvuLDUCJ835T/0w9CqDXdV/g=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.1.1":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"hello@bevacqua.io","url":"http://ponyfoo.com"},"version":"0.1.1","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{"minimist":"^0.1.0"},"main":"./finder.js","bin":{"procfinder":"bin/procfinder"},"_id":"process-finder@0.1.1","dist":{"shasum":"e8bbc114a5fbc90ddb902b3f96df7d851616a81c","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.1.1.tgz","integrity":"sha512-Qp+9YQO4U2t6I5t2EUkOXU8P8DaHzEXZu+jlSyKoGbHl4OyURxP8HVp/z0I0WknkwOmSyEwu0U0QaNjLjYJmpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8rLCsodbmJ1XOIBdgNf0Sz6jQgSKrRz8iufkJr8p9LAiB2cYmCZmAGGSR5vuSIMUoms7lMkRtFeHJXr5zc8OKoUw=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.1.2":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"hello@bevacqua.io","url":"http://ponyfoo.com"},"version":"0.1.2","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{"minimist":"^0.1.0"},"main":"./finder.js","bin":{"procfinder":"bin/procfinder"},"_id":"process-finder@0.1.2","dist":{"shasum":"7db114a485218895e1d29626e8d9d30c355ea690","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.1.2.tgz","integrity":"sha512-Se5keeFJP/vH4ImSxaVzaHjyq8zOrYaYafiW/BDa8RCWQBcy+n4EM8JPT5hzoqQfnbQIi6rljsuwNLdN7Awk6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmUMrZiGo85NL2vsLJod/pFbH3oaOLDcTup282oYW7RAIgC4RFaqufM3bH2sNXs4BXMCQon52wMhHEogJ2XVvGEBM="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"0.1.3":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"hello@bevacqua.io","url":"http://ponyfoo.com"},"version":"0.1.3","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{"minimist":"^0.1.0"},"main":"./finder.js","bin":{"procfinder":"bin/procfinder"},"_id":"process-finder@0.1.3","dist":{"shasum":"41d4801b02cacf614dc07e2ef4b500e18d572e2a","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-0.1.3.tgz","integrity":"sha512-3IBwjy75y8JUo6h0joB+S60AWJ30FQdqW/mw3DC3Pp5Y9kErNOQDaF5uXCdlvyRGSBNFNkqicMRudRrC8hIsXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvJzpOkSamooONOxeUJknqeeOdP30lV4ws3QoRiQdp2gIgbvpumLz6F/6GRbl/jBc/6s/MRPkDMbsR258ATLmVdUU="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}]},"1.0.0":{"name":"process-finder","description":"Find processes using a simple API","homepage":"https://github.com/bevacqua/process-finder","author":{"name":"Nicolas Bevacqua","email":"hello@bevacqua.io","url":"http://ponyfoo.com"},"version":"1.0.0","repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"dependencies":{"minimist":"^0.1.0"},"main":"./finder.js","bin":{"procfinder":"bin/procfinder"},"gitHead":"c7770376006e289c361ca8100c0595c5656b5d03","_id":"process-finder@1.0.0","scripts":{},"_shasum":"72700b0cc0ee7fd0cdec3b317f4583f615c8704f","_from":".","_npmVersion":"1.4.26","_npmUser":{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"},"maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}],"dist":{"shasum":"72700b0cc0ee7fd0cdec3b317f4583f615c8704f","tarball":"https://registry.npmjs.org/process-finder/-/process-finder-1.0.0.tgz","integrity":"sha512-oOZEiDMlx+2o71JtB+VHwSmpAVxAbFE/yKpMr3p7s/6bC9amFfI0J1HlrqzloOt22eRCB9WJioRJEdyscQGvUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNxr/IvihTaJNtiyPUsyAu+OCDt/Y4naHU9ISWWy/lsAIgEPmC+X/8sO3gA1thCmTfZsNfsXibNgvyerI5M88zEFE="}]}}},"readme":"# process-finder\n\nFind processes and watch ports for listener processes using a simple API\n\n## Installation\n\nUsing `npm`\n\n```bash\n$ npm install process-finder --save\n```\n\n## #find(port, fn(err, pids, data, internal))\n\nFinds processes listening on the provided `port`, invokes `fn` with an array of `pids` listening on that port.\n\n`data` is the output of the command that checks the status of the port. `internal` will contain any internal errors that might have been suppressed.\n\n### #find Usage\n\n```js\nvar finder = require('process-finder');\nvar port = 3000;\n\nfinder.find(port, function(err, pids){\n    // do something about the pids listening on the port, i.e:\n    pids.forEach(process.kill);\n});\n```\n\nPort can be an object of `options`, or just a port.\n\n```js\n{\n    port: 3000, // the port we listen on\n    elevate: false, // whether to use `sudo`, to get elevated priviledges\n}\n```\n\n## #watch(port)\n\nReturns an `EventEmitter` that allows us to track a port's listening processes.\n\nPort can be an object of `options`, or just a port.\n\n```js\n{\n    port: 3000, // the port we listen on\n    frequency: 200, // the frequency with which the port is scanned for changes\n    elevate: false, // whether to use `sudo`, to get elevated priviledges\n    info: false // if enabled, a verbose `info` event will be emitted\n}\n```\n\n### #watch Usage\n\n```js\nvar finder = require('process-finder');\nvar port = 3000; // port to watch\nvar watcher = finder.watch(port);\n\nwatcher.on('listen', function(pid){\n    console.log(pid + ' listening on port ' + port);\n});\n\nwatcher.on('unlisten', function(pid){\n    console.log(pid + ' no longer listening on port ' + port);\n});\n\nwatcher.on('error', console.error);\nwatcher.on('update', function(pids){\n    console.log('updated! listeners:', pids);\n});\n```\n\n### #watch API\n\n#### #watch.stop()\n\nStops a `watch`. It will no longer emit events.\n\n#### #watch.start()\n\nStarts a watch which was previously stopped using `.stop()`\n\n#### #watch.restart()\n\nForce-restart the watch.\n\n### #watch events\n\nWatch extends the `EventEmitter` prototype, and provides a few events you can listen for.\n\n#### #watch.on('start', fn())\n\nTriggers when the watch is started, either when manually started, or when a new watch is created.\n\n#### #watch.on('stop', fn())\n\nTriggers when a watch is stopped.\n\n#### #watch.on('listen', fn(pid))\n\nTriggers when a `pid` is detected to be listening on the port we're watching. The `pid` is passed as an argument.\n\n#### #watch.on('unlisten', fn(pid))\n\nTriggers when a `pid` is detected to be no longer listening on the port we're watching. The `pid` is passed as an argument.\n\n#### #watch.on('update', fn(pids))\n\nTriggers every time the port is scanned for changes.\n\n#### #watch.on('info', fn(data, internal))\n\n`data` is the output of the command that checks the status of the port. `internal` will contain any internal errors that might have been suppressed.\n\n#### #watch.on('error', fn(err))\n\nTriggers whenever an error is thrown.\n\n# CLI\n\nThe CLI allows you to wait on a port\n\n```shell\nprocfinder --wait --port 3000\n```\n\nOnce a process starts listening on that port, the CLI will output its `pid` and exit.\n","maintainers":[{"name":"bevacqua","email":"nicolasbevacqua@gmail.com"}],"time":{"modified":"2022-06-24T16:59:05.176Z","created":"2013-06-26T19:47:14.164Z","0.0.1":"2013-06-26T19:47:18.808Z","0.0.2":"2013-07-15T12:08:11.216Z","0.0.3":"2013-07-15T14:00:18.530Z","0.0.4":"2013-07-15T14:46:54.243Z","0.0.5":"2013-07-15T15:29:18.165Z","0.0.6":"2013-07-15T16:33:55.121Z","0.0.7":"2013-07-15T16:44:54.001Z","0.1.0":"2014-05-12T23:54:05.096Z","0.1.1":"2014-05-12T23:55:40.367Z","0.1.2":"2014-05-12T23:57:02.969Z","0.1.3":"2014-05-13T00:00:07.078Z","1.0.0":"2014-09-16T08:50:05.789Z"},"author":{"name":"Nicolas Bevacqua","email":"hello@bevacqua.io","url":"http://ponyfoo.com"},"repository":{"type":"git","url":"git://github.com/bevacqua/process-finder.git"},"homepage":"https://github.com/bevacqua/process-finder","bugs":{"url":"https://github.com/bevacqua/process-finder/issues"},"readmeFilename":"README.md"}