From 7319142fd866d8314364d769f401a492892f7d63 Mon Sep 17 00:00:00 2001 From: Ai Hoshino Date: Thu, 21 Sep 2023 09:43:08 +0800 Subject: feat(node:dns): implement `dns.lookupService` (#5613) * feat(node:dns): implement dns.lookupService Close: #4347 * fix flags * add `getSockaddr` * fix sockaddr size * flaky test --- src/bun.js/bindings/BunObject.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/bun.js/bindings/BunObject.cpp') diff --git a/src/bun.js/bindings/BunObject.cpp b/src/bun.js/bindings/BunObject.cpp index 91fc810da..9d8ce6674 100644 --- a/src/bun.js/bindings/BunObject.cpp +++ b/src/bun.js/bindings/BunObject.cpp @@ -215,6 +215,7 @@ extern "C" EncodedJSValue Bun__DNSResolver__resolvePtr(JSGlobalObject*, JSC::Cal extern "C" EncodedJSValue Bun__DNSResolver__resolveCname(JSGlobalObject*, JSC::CallFrame*); extern "C" EncodedJSValue Bun__DNSResolver__getServers(JSGlobalObject*, JSC::CallFrame*); extern "C" EncodedJSValue Bun__DNSResolver__reverse(JSGlobalObject*, JSC::CallFrame*); +extern "C" EncodedJSValue Bun__DNSResolver__lookupService(JSGlobalObject*, JSC::CallFrame*); static JSValue constructDNSObject(VM& vm, JSObject* bunObject) { @@ -246,6 +247,8 @@ static JSValue constructDNSObject(VM& vm, JSObject* bunObject) JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); dnsObject->putDirectNativeFunction(vm, globalObject, JSC::Identifier::fromString(vm, "reverse"_s), 2, Bun__DNSResolver__reverse, ImplementationVisibility::Public, NoIntrinsic, JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); + dnsObject->putDirectNativeFunction(vm, globalObject, JSC::Identifier::fromString(vm, "lookupService"_s), 2, Bun__DNSResolver__lookupService, ImplementationVisibility::Public, NoIntrinsic, + JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DontDelete | 0); return dnsObject; } -- cgit v1.2.3