add missing deps

This commit is contained in:
AJ ONeal 2017-02-23 18:22:16 -07:00
parent f3af2b927d
commit dfe78e7f24
3 changed files with 10 additions and 7 deletions

View File

@ -53,7 +53,7 @@ dig.js --mdns _services._dns-sd._udp.local
Really the `--mdns` option is just an alias for setting all of these options as the default:
```bash
dig.js -p 5353 @224.0.0.251 PTR _services._dns-sd._udp.local
dig.js -p 5353 @224.0.0.251 PTR _services._dns-sd._udp.local +time=3
```
### Moar Examples

View File

@ -21,8 +21,7 @@ cli.parse({
, 'query': [ 'q', 'a superfluous explicit option to set the query as a command line flag' ]
});
var PromiseA = require('bluebird');
var fs = PromiseA.promisifyAll(require('fs'));
var fs = require('fs');
var dgram = require('dgram');
var commonTypes = [ 'A', 'AAAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT' ];
var commonPrinters = {
@ -101,10 +100,10 @@ function writeQuery(opts, query, queryAb) {
jsonpath = path.join(opts.output, jsonname);
}
fs.writeFileAsync(binpath, Buffer.from(queryAb)).then(function () {
fs.writeFile(binpath, Buffer.from(queryAb), null, function () {
console.log('wrote ' + queryAb.byteLength + ' bytes to ' + binpath);
});
fs.writeFileAsync(jsonpath, json).then(function () {
fs.writeFile(jsonpath, json, null, function () {
console.log('wrote ' + json.length + ' bytes to ' + jsonpath);
});
}
@ -124,10 +123,10 @@ function writeResponse(opts, query, nb, packet) {
count += 1;
fs.writeFileAsync(binpath, nb).then(function () {
fs.writeFile(binpath, nb, null, function () {
console.log('wrote ' + nb.byteLength + ' bytes to ' + binpath);
});
fs.writeFileAsync(jsonpath, json).then(function () {
fs.writeFile(jsonpath, json, null, function () {
console.log('wrote ' + json.length + ' bytes to ' + jsonpath);
});
}
@ -321,6 +320,9 @@ cli.main(function (args, cli) {
if (!cli.query) {
cli.query = '_services._dns-sd._udp.local';
}
if (!cli.timeout) {
cli.timeout = 3000;
}
}
if (!cli.type) {

View File

@ -27,6 +27,7 @@
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
"license": "(MIT OR Apache-2.0)",
"dependencies": {
"cli": "^1.0.1",
"dns-suite": "git+https://git@git.daplie.com:Daplie/dns-suite#v1"
}
}