*Update dist
This commit is contained in:
parent
90330d8dcd
commit
89a17b5ac8
|
@ -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";
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue