dns.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. var dns = require("dns");
  2. var promisify = require("./_promisify.js");
  3. var bind = function(c, f) { return f && f.bind(c); };
  4. Object.defineProperties(module.exports, {
  5. ADDRCONFIG: { enumerable: true, value: dns.ADDRCONFIG },
  6. ADDRGETNETWORKPARAMS: { enumerable: true, value: dns.ADDRGETNETWORKPARAMS },
  7. BADFAMILY: { enumerable: true, value: dns.BADFAMILY },
  8. BADFLAGS: { enumerable: true, value: dns.BADFLAGS },
  9. BADHINTS: { enumerable: true, value: dns.BADHINTS },
  10. BADNAME: { enumerable: true, value: dns.BADNAME },
  11. BADQUERY: { enumerable: true, value: dns.BADQUERY },
  12. BADRESP: { enumerable: true, value: dns.BADRESP },
  13. BADSTR: { enumerable: true, value: dns.BADSTR },
  14. CANCELLED: { enumerable: true, value: dns.CANCELLED },
  15. CONNREFUSED: { enumerable: true, value: dns.CONNREFUSED },
  16. DESTRUCTION: { enumerable: true, value: dns.DESTRUCTION },
  17. EOF: { enumerable: true, value: dns.EOF },
  18. FILE: { enumerable: true, value: dns.FILE },
  19. FORMERR: { enumerable: true, value: dns.FORMERR },
  20. LOADIPHLPAPI: { enumerable: true, value: dns.LOADIPHLPAPI },
  21. NODATA: { enumerable: true, value: dns.NODATA },
  22. NOMEM: { enumerable: true, value: dns.NOMEM },
  23. NONAME: { enumerable: true, value: dns.NONAME },
  24. NOTFOUND: { enumerable: true, value: dns.NOTFOUND },
  25. NOTIMP: { enumerable: true, value: dns.NOTIMP },
  26. NOTINITIALIZED: { enumerable: true, value: dns.NOTINITIALIZED },
  27. REFUSED: { enumerable: true, value: dns.REFUSED },
  28. Resolver: { enumerable: true, value: dns.Resolver },
  29. SERVFAIL: { enumerable: true, value: dns.SERVFAIL },
  30. TIMEOUT: { enumerable: true, value: dns.TIMEOUT },
  31. V4MAPPED: { enumerable: true, value: dns.V4MAPPED },
  32. getServers: { enumerable: true, value: bind(dns, dns.getServers) },
  33. lookup: { enumerable: true, value: promisify(dns, dns.lookup, 1) },
  34. lookupService: { enumerable: true, value: promisify(dns, dns.lookupService, 2, {"pattern":["hostname","service"]}) },
  35. resolve: { enumerable: true, value: promisify(dns, dns.resolve, 1) },
  36. resolve4: { enumerable: true, value: promisify(dns, dns.resolve4, 1) },
  37. resolve6: { enumerable: true, value: promisify(dns, dns.resolve6, 1) },
  38. resolveAny: { enumerable: true, value: promisify(dns, dns.resolveAny, 1) },
  39. resolveCname: { enumerable: true, value: promisify(dns, dns.resolveCname, 1) },
  40. resolveMx: { enumerable: true, value: promisify(dns, dns.resolveMx, 1) },
  41. resolveNaptr: { enumerable: true, value: promisify(dns, dns.resolveNaptr, 1) },
  42. resolveNs: { enumerable: true, value: promisify(dns, dns.resolveNs, 1) },
  43. resolvePtr: { enumerable: true, value: promisify(dns, dns.resolvePtr, 1) },
  44. resolveSoa: { enumerable: true, value: promisify(dns, dns.resolveSoa, 1) },
  45. resolveSrv: { enumerable: true, value: promisify(dns, dns.resolveSrv, 1) },
  46. resolveTxt: { enumerable: true, value: promisify(dns, dns.resolveTxt, 1) },
  47. reverse: { enumerable: true, value: promisify(dns, dns.reverse, 1) },
  48. setServers: { enumerable: true, value: bind(dns, dns.setServers) },
  49. });