From 89a17b5ac8c98e58da4f12c6b015bfc384ec89c0 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 20 Aug 2022 02:57:45 -0400 Subject: [PATCH] *Update dist --- dist/index.d.ts | 4 ++-- dist/index.js | 4 +++- dist/resolverRegistry.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index fa842b2..a1fbefc 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,3 +1,3 @@ -import type { ResolverModule } from "@lumeweb/resolver-common"; -export declare function setup(rm: ResolverModule): void; +import type { ResolverModuleConstructor } from "@lumeweb/resolver-common"; +export declare function setup(rm: ResolverModuleConstructor): void; export * from "./resolverRegistry.js"; diff --git a/dist/index.js b/dist/index.js index de49c4b..6bf302d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,12 +1,14 @@ import { addHandler, handleMessage } from "libkmodule"; import { register } from "@lumeweb/kernel-dns-client"; +import { RpcNetwork } from "@lumeweb/kernel-rpc-client"; +import { ResolverRegistry } from "./resolverRegistry.js"; let resolver; export function setup(rm) { addHandler("resolve", handleResolve); addHandler("register", handleRegister); addHandler("getSupportedTlds", handleGetSupportedTlds); onmessage = handleMessage; - resolver = rm; + resolver = new rm(new ResolverRegistry(new RpcNetwork())); } async function handleRegister(aq) { await register(); diff --git a/dist/resolverRegistry.js b/dist/resolverRegistry.js index 84091ba..9e23aa4 100644 --- a/dist/resolverRegistry.js +++ b/dist/resolverRegistry.js @@ -19,7 +19,7 @@ export class ResolverRegistry { return new Set(resolvers.map((resolver) => new ResolverModule(this, resolver))); }); } - async resolve(domain, options = { type: DNS_RECORD_TYPE.DEFAULT }, bypassCache = false) { + async resolve(domain, options = { type: DNS_RECORD_TYPE.CONTENT }, bypassCache = false) { let result; try { result = await resolve(domain, options, bypassCache);