diff --git a/lib/dns/promises.js b/lib/dns/promises.js index ad8a2561ef51e4..0dfeff7bc9650f 100644 --- a/lib/dns/promises.js +++ b/lib/dns/promises.js @@ -1,5 +1,34 @@ 'use strict'; const dnsPromises = require('internal/dns/promises'); -dnsPromises.setServers = require('dns').setServers; +const dns = require('dns'); + +dnsPromises.setServers = dns.setServers; + +// ERROR CODES +dnsPromises.NODATA = dns.NODATA; +dnsPromises.FORMERR = dns.FORMERR; +dnsPromises.SERVFAIL = dns.SERVFAIL; +dnsPromises.NOTFOUND = dns.NOTFOUND; +dnsPromises.NOTIMP = dns.NOTIMP; +dnsPromises.REFUSED = dns.REFUSED; +dnsPromises.BADQUERY = dns.BADQUERY; +dnsPromises.BADNAME = dns.BADNAME; +dnsPromises.BADFAMILY = dns.BADFAMILY; +dnsPromises.BADRESP = dns.BADRESP; +dnsPromises.CONNREFUSED = dns.CONNREFUSED; +dnsPromises.TIMEOUT = dns.TIMEOUT; +dnsPromises.EOF = dns.EOF; +dnsPromises.FILE = dns.FILE; +dnsPromises.NOMEM = dns.NOMEM; +dnsPromises.DESTRUCTION = dns.DESTRUCTION; +dnsPromises.BADSTR = dns.BADSTR; +dnsPromises.BADFLAGS = dns.BADFLAGS; +dnsPromises.NONAME = dns.NONAME; +dnsPromises.BADHINTS = dns.BADHINTS; +dnsPromises.NOTINITIALIZED = dns.NOTINITIALIZED; +dnsPromises.LOADIPHLPAPI = dns.LOADIPHLPAPI; +dnsPromises.ADDRGETNETWORKPARAMS = dns.ADDRGETNETWORKPARAMS; +dnsPromises.CANCELLED = dns.CANCELLED; + module.exports = dnsPromises;