add missing deps
This commit is contained in:
		
							parent
							
								
									f3af2b927d
								
							
						
					
					
						commit
						dfe78e7f24
					
				@ -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:
 | 
					Really the `--mdns` option is just an alias for setting all of these options as the default:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```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
 | 
					### Moar Examples
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								bin/dig.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								bin/dig.js
									
									
									
									
									
								
							@ -21,8 +21,7 @@ cli.parse({
 | 
				
			|||||||
, 'query': [ 'q', 'a superfluous explicit option to set the query as a command line flag' ]
 | 
					, 'query': [ 'q', 'a superfluous explicit option to set the query as a command line flag' ]
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var PromiseA = require('bluebird');
 | 
					var fs = require('fs');
 | 
				
			||||||
var fs = PromiseA.promisifyAll(require('fs'));
 | 
					 | 
				
			||||||
var dgram = require('dgram');
 | 
					var dgram = require('dgram');
 | 
				
			||||||
var commonTypes = [ 'A', 'AAAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT' ];
 | 
					var commonTypes = [ 'A', 'AAAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT' ];
 | 
				
			||||||
var commonPrinters = {
 | 
					var commonPrinters = {
 | 
				
			||||||
@ -101,10 +100,10 @@ function writeQuery(opts, query, queryAb) {
 | 
				
			|||||||
    jsonpath = path.join(opts.output, jsonname);
 | 
					    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);
 | 
					    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);
 | 
					    console.log('wrote ' + json.length + ' bytes to ' + jsonpath);
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -124,10 +123,10 @@ function writeResponse(opts, query, nb, packet) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  count += 1;
 | 
					  count += 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fs.writeFileAsync(binpath, nb).then(function () {
 | 
					  fs.writeFile(binpath, nb, null, function () {
 | 
				
			||||||
    console.log('wrote ' + nb.byteLength + ' bytes to ' + binpath);
 | 
					    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);
 | 
					    console.log('wrote ' + json.length + ' bytes to ' + jsonpath);
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -321,6 +320,9 @@ cli.main(function (args, cli) {
 | 
				
			|||||||
    if (!cli.query) {
 | 
					    if (!cli.query) {
 | 
				
			||||||
      cli.query = '_services._dns-sd._udp.local';
 | 
					      cli.query = '_services._dns-sd._udp.local';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    if (!cli.timeout) {
 | 
				
			||||||
 | 
					      cli.timeout = 3000;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!cli.type) {
 | 
					  if (!cli.type) {
 | 
				
			||||||
 | 
				
			|||||||
@ -27,6 +27,7 @@
 | 
				
			|||||||
  "author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
 | 
					  "author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
 | 
				
			||||||
  "license": "(MIT OR Apache-2.0)",
 | 
					  "license": "(MIT OR Apache-2.0)",
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
 | 
					    "cli": "^1.0.1",
 | 
				
			||||||
    "dns-suite": "git+https://git@git.daplie.com:Daplie/dns-suite#v1"
 | 
					    "dns-suite": "git+https://git@git.daplie.com:Daplie/dns-suite#v1"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user