*Update dist

This commit is contained in:
Derrick Hammer 2022-08-18 16:52:45 -04:00
parent b3942d8df8
commit f3fb63d2b8
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 21 additions and 6 deletions

9
dist/index.d.ts vendored
View File

@ -1,3 +1,10 @@
export declare function resolve(domain: string, params: any, force?: boolean): Promise<any>; import { ResolverOptions } from "@lumeweb/resolver-common";
export declare function resolve(
domain: string,
options: ResolverOptions,
bypassCache?: boolean
): Promise<any>;
export declare function register(): Promise<void>;
export declare function clear(): Promise<void>;
export declare function ready(): Promise<any>; export declare function ready(): Promise<any>;
//# sourceMappingURL=index.d.ts.map //# sourceMappingURL=index.d.ts.map

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

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,UAAQ,gBAavE;AACD,wBAAsB,KAAK,iBAS1B"} {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAqB3D,wBAAsB,OAAO,CAC3B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,EACxB,WAAW,UAAQ,gBAcpB;AAED,wBAAsB,QAAQ,kBAG7B;AAED,wBAAsB,KAAK,kBAG1B;AAED,wBAAsB,KAAK,iBAS1B"}

14
dist/index.js vendored
View File

@ -15,18 +15,26 @@ async function loadLibs() {
connectModule = pkg.connectModule; connectModule = pkg.connectModule;
} }
} }
export async function resolve(domain, params, force = false) { export async function resolve(domain, options, bypassCache = false) {
await loadLibs(); await loadLibs();
const [resp, err] = await callModule(DNS_MODULE, "resolve", { const [resp, err] = await callModule(DNS_MODULE, "resolve", {
domain, domain,
params, options,
force, bypassCache,
}); });
if (err) { if (err) {
throw new Error(err); throw new Error(err);
} }
return resp; return resp;
} }
export async function register() {
await loadLibs();
await callModule(DNS_MODULE, "register");
}
export async function clear() {
await loadLibs();
await callModule(DNS_MODULE, "clear");
}
export async function ready() { export async function ready() {
await loadLibs(); await loadLibs();
const [resp, err] = await callModule(DNS_MODULE, "ready"); const [resp, err] = await callModule(DNS_MODULE, "ready");