*Update dist

This commit is contained in:
Derrick Hammer 2022-08-20 02:57:45 -04:00
parent 90330d8dcd
commit 89a17b5ac8
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 6 additions and 4 deletions

4
dist/index.d.ts vendored
View File

@ -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";

4
dist/index.js vendored
View File

@ -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();

View File

@ -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);