Compare commits
2 Commits
d2735c5470
...
10e01f44fa
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 10e01f44fa | |
Derrick Hammer | 27dba64c45 |
|
@ -1,5 +1,5 @@
|
||||||
import { Client } from "@lumeweb/libkernel-universal";
|
import { Client } from "@lumeweb/libkernel-universal";
|
||||||
import { ResolverOptions } from "@lumeweb/libresolver";
|
import { DNSResult, ResolverOptions } from "@lumeweb/libresolver";
|
||||||
export declare class DnsClient extends Client {
|
export declare class DnsClient extends Client {
|
||||||
register(): Promise<void>;
|
register(): Promise<void>;
|
||||||
clear(): Promise<void>;
|
clear(): Promise<void>;
|
||||||
|
@ -9,7 +9,7 @@ export declare class DnsClient extends Client {
|
||||||
domain: string,
|
domain: string,
|
||||||
options?: ResolverOptions,
|
options?: ResolverOptions,
|
||||||
bypassCache?: boolean
|
bypassCache?: boolean
|
||||||
): Promise<void>;
|
): Promise<DNSResult>;
|
||||||
}
|
}
|
||||||
export declare const createClient: (...args: any) => DnsClient;
|
export declare const createClient: (...args: any) => DnsClient;
|
||||||
//# sourceMappingURL=index.d.ts.map
|
//# sourceMappingURL=index.d.ts.map
|
||||||
|
|
|
@ -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,EAAmB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIxE,qBAAa,SAAU,SAAQ,MAAM;IACtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAGzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAGtB,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAGjC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAGtB,OAAO,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,eAAmD,EAC5D,WAAW,GAAE,OAAe,GAC3B,OAAO,CAAC,IAAI,CAAC;CAGjB;AAED,eAAO,MAAM,YAAY,6BAAwC,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;AAI9B,qBAAa,SAAU,SAAQ,MAAM;IACtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAGzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAGtB,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAGjC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAGtB,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"}
|
|
@ -1,5 +1,5 @@
|
||||||
import { Client, factory } from "@lumeweb/libkernel-universal";
|
import { Client, factory } from "@lumeweb/libkernel-universal";
|
||||||
import { DNS_RECORD_TYPE } from "@lumeweb/libresolver";
|
import { DNS_RECORD_TYPE, } from "@lumeweb/libresolver";
|
||||||
const MODULE = "PACYNuYbp_5hgCjMK16EGcytB9QCxDLe4_uitahwePdeaA";
|
const MODULE = "PACYNuYbp_5hgCjMK16EGcytB9QCxDLe4_uitahwePdeaA";
|
||||||
export class DnsClient extends Client {
|
export class DnsClient extends Client {
|
||||||
async register() {
|
async register() {
|
||||||
|
@ -15,7 +15,7 @@ export class DnsClient extends Client {
|
||||||
return this.callModuleReturn("ready");
|
return this.callModuleReturn("ready");
|
||||||
}
|
}
|
||||||
async resolve(domain, options = { type: DNS_RECORD_TYPE.CONTENT }, bypassCache = false) {
|
async resolve(domain, options = { type: DNS_RECORD_TYPE.CONTENT }, bypassCache = false) {
|
||||||
return this.callModuleReturn("ready");
|
return this.callModuleReturn("resolve", { domain, options, bypassCache });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export const createClient = factory(DnsClient, MODULE);
|
export const createClient = factory(DnsClient, MODULE);
|
||||||
|
|
10
src/index.ts
10
src/index.ts
|
@ -1,5 +1,9 @@
|
||||||
import { Client, factory } from "@lumeweb/libkernel-universal";
|
import { Client, factory } from "@lumeweb/libkernel-universal";
|
||||||
import { DNS_RECORD_TYPE, ResolverOptions } from "@lumeweb/libresolver";
|
import {
|
||||||
|
DNS_RECORD_TYPE,
|
||||||
|
DNSResult,
|
||||||
|
ResolverOptions,
|
||||||
|
} from "@lumeweb/libresolver";
|
||||||
|
|
||||||
const MODULE = "PACYNuYbp_5hgCjMK16EGcytB9QCxDLe4_uitahwePdeaA";
|
const MODULE = "PACYNuYbp_5hgCjMK16EGcytB9QCxDLe4_uitahwePdeaA";
|
||||||
|
|
||||||
|
@ -20,8 +24,8 @@ export class DnsClient extends Client {
|
||||||
domain: string,
|
domain: string,
|
||||||
options: ResolverOptions = { type: DNS_RECORD_TYPE.CONTENT },
|
options: ResolverOptions = { type: DNS_RECORD_TYPE.CONTENT },
|
||||||
bypassCache: boolean = false
|
bypassCache: boolean = false
|
||||||
): Promise<void> {
|
): Promise<DNSResult> {
|
||||||
return this.callModuleReturn("ready");
|
return this.callModuleReturn("resolve", { domain, options, bypassCache });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue