zynor 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +30 -1
- package/dist/index.js +2 -2
- package/dist/native.cjs +2 -2
- package/dist/native.d.ts +55 -1
- package/dist/native.js +3 -3
- package/package.json +1 -1
- package/rust/zynor-native.darwin-arm64.node +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -724,6 +724,15 @@ declare class NativeProvider {
|
|
|
724
724
|
resolveCaa(hostname: string, options?: AbortOptions): Promise<CaaRecord[]>;
|
|
725
725
|
resolveCname(hostname: string, options?: AbortOptions): Promise<string[]>;
|
|
726
726
|
resolveMx(hostname: string, options?: AbortOptions): Promise<MxRecord[]>;
|
|
727
|
+
/**
|
|
728
|
+
* @internal Resolve MX for many hostnames at once. With the Rust binding
|
|
729
|
+
* this is a SINGLE FFI call for the whole array (concurrency handled inside
|
|
730
|
+
* Rust) — the lever that collapses per-email boundary crossings. Without
|
|
731
|
+
* the binding it falls back to parallel libuv calls (same shape, no FFI
|
|
732
|
+
* win). Per-host failures yield `[]` in that slot; never rejects wholesale.
|
|
733
|
+
* Not queued — the caller governs concurrency at the page level.
|
|
734
|
+
*/
|
|
735
|
+
resolveMxBatch(hostnames: string[], options?: AbortOptions): Promise<MxRecord[][]>;
|
|
727
736
|
resolveNaptr(hostname: string, options?: AbortOptions): Promise<NaptrRecord[]>;
|
|
728
737
|
resolveNs(hostname: string, options?: AbortOptions): Promise<string[]>;
|
|
729
738
|
resolvePtr(hostname: string, options?: AbortOptions): Promise<string[]>;
|
|
@@ -2158,6 +2167,10 @@ declare const records: readonly [
|
|
|
2158
2167
|
readonly name: "Turbify";
|
|
2159
2168
|
readonly mx: "mx-biz.mail.am0.yahoodns.net";
|
|
2160
2169
|
},
|
|
2170
|
+
{
|
|
2171
|
+
readonly name: "Turbify";
|
|
2172
|
+
readonly mx: "mx-van.mail.am0.yahoodns.net";
|
|
2173
|
+
},
|
|
2161
2174
|
{
|
|
2162
2175
|
readonly name: "Turbify";
|
|
2163
2176
|
readonly mx: "mx-biz.mail.am.yahoodns.net";
|
|
@@ -2650,7 +2663,7 @@ export declare class EmailValidator {
|
|
|
2650
2663
|
private yahooList;
|
|
2651
2664
|
private domain;
|
|
2652
2665
|
private static instance;
|
|
2653
|
-
|
|
2666
|
+
protected dns: Zynor;
|
|
2654
2667
|
private validateCache;
|
|
2655
2668
|
private ipCache;
|
|
2656
2669
|
private inflight;
|
|
@@ -3302,6 +3315,9 @@ export interface RustAnyRecord {
|
|
|
3302
3315
|
}
|
|
3303
3316
|
export interface RustBinding {
|
|
3304
3317
|
resolveMx(hostname: string, options?: RustResolveOptions | null): Promise<RustMxRecord[]>;
|
|
3318
|
+
/** Resolve MX for many hostnames in one FFI call. `out[i]` ↔ `hostnames[i]`;
|
|
3319
|
+
* a per-host failure yields `[]` for that slot (never rejects wholesale). */
|
|
3320
|
+
resolveMxBatch(hostnames: string[], options?: RustResolveOptions | null): Promise<RustMxRecord[][]>;
|
|
3305
3321
|
resolveA(hostname: string, options?: RustResolveOptions | null): Promise<string[]>;
|
|
3306
3322
|
resolveAaaa(hostname: string, options?: RustResolveOptions | null): Promise<string[]>;
|
|
3307
3323
|
resolveCname(hostname: string, options?: RustResolveOptions | null): Promise<string[]>;
|
|
@@ -3670,6 +3686,19 @@ export declare class Zynor {
|
|
|
3670
3686
|
* consumers must continue to use the queued resolve* methods.
|
|
3671
3687
|
*/
|
|
3672
3688
|
_resolveDirect<T>(hostname: string, type: RecordType, options?: AbortOptions): Promise<T>;
|
|
3689
|
+
/**
|
|
3690
|
+
* @internal Validator-only (native `each`). Resolve MX for many hostnames in
|
|
3691
|
+
* a SINGLE batched call and seed the DNS LRU cache under the same `MX:<host>`
|
|
3692
|
+
* keys that {@link _resolveDirect} reads. After warming, each per-email MX
|
|
3693
|
+
* lookup is a cache hit — zero FFI per email. This is what collapses millions
|
|
3694
|
+
* of per-email native crossings into one batched call per page.
|
|
3695
|
+
*
|
|
3696
|
+
* No-op when the cache is disabled (the default `zynor` validator runs with
|
|
3697
|
+
* `cache: { enabled: false }`, so this is only effective for the native
|
|
3698
|
+
* entry, which enables it). Never throws — a batch failure just leaves the
|
|
3699
|
+
* cache cold and validation falls back to per-email resolution.
|
|
3700
|
+
*/
|
|
3701
|
+
_warmMxCache(hostnames: string[], options?: AbortOptions): Promise<void>;
|
|
3673
3702
|
/**
|
|
3674
3703
|
* Returns the sum of concurrency limits across all enabled DNS providers.
|
|
3675
3704
|
* Used by `validateBulk` to determine default parallelism.
|