*Update dist

This commit is contained in:
Derrick Hammer 2023-04-09 14:15:54 -04:00
parent 1e8924d5ac
commit f1bbbf540d
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 15 additions and 9 deletions

5
dist/index.d.ts vendored
View File

@ -2,9 +2,10 @@ import { Client } from "@lumeweb/libkernel-universal";
import { DNSResult, ResolverOptions } from "@lumeweb/libresolver";
import { ResolverModule } from "./module.js";
export declare class DnsClient extends Client {
register(): Promise<void>;
clear(): Promise<void>;
get resolvers(): Promise<Set<ResolverModule>>;
register(): Promise<void>;
registerResolver(module: string): Promise<void>;
clear(): Promise<void>;
resolve(
domain: string,
options?: ResolverOptions,

2
dist/index.d.ts.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAEL,SAAS,EACT,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAI3D,qBAAa,SAAU,SAAQ,MAAM;IACtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAGzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAGnC,IAAI,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAQ5C;IACY,OAAO,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,eAAmD,EAC5D,WAAW,GAAE,OAAe,GAC3B,OAAO,CAAC,SAAS,CAAC;CAGtB;AAED,eAAO,MAAM,YAAY,6BAAwC,CAAC;AAClE,cAAc,aAAa,CAAC"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAEL,SAAS,EACT,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAI3D,qBAAa,SAAU,SAAQ,MAAM;IACnC,IAAI,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAQ5C;IAEY,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM/C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,OAAO,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,eAAmD,EAC5D,WAAW,GAAE,OAAe,GAC3B,OAAO,CAAC,SAAS,CAAC;CAGtB;AAED,eAAO,MAAM,YAAY,6BAAwC,CAAC;AAClE,cAAc,aAAa,CAAC"}

17
dist/index.js vendored
View File

@ -3,12 +3,6 @@ import { DNS_RECORD_TYPE, } from "@lumeweb/libresolver";
import { createModule } from "./module.js";
const MODULE = "vAA-phmM1ztqu8zGBKF2nM3b8N_IQGWlB6J_doi2FhqS-A";
export class DnsClient extends Client {
async register() {
return this.callModuleReturn("register");
}
async clear() {
return this.callModuleReturn("clear");
}
get resolvers() {
return this.callModuleReturn("getResolvers").then((resolvers) => {
return new Set(resolvers.map((resolver) => {
@ -16,6 +10,17 @@ export class DnsClient extends Client {
}));
});
}
async register() {
return this.callModuleReturn("register");
}
async registerResolver(module) {
const bag = await this.loadBound(module);
const ret = await bag.callModule("register");
return ret[0];
}
async clear() {
return this.callModuleReturn("clear");
}
async resolve(domain, options = { type: DNS_RECORD_TYPE.CONTENT }, bypassCache = false) {
return this.callModuleReturn("resolve", { domain, options, bypassCache });
}