@push.rocks/smartnetwork 4.9.0 → 4.10.1
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_rust/rustnetwork_linux_amd64 +0 -0
- package/dist_rust/rustnetwork_linux_arm64 +0 -0
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/smartnetwork.classes.domainintelligence.d.ts +23 -62
- package/dist_ts/smartnetwork.classes.domainintelligence.js +113 -357
- package/dist_ts/smartnetwork.classes.ipintelligence.d.ts +11 -36
- package/dist_ts/smartnetwork.classes.ipintelligence.js +83 -316
- package/dist_ts/smartnetwork.classes.rustbridge.d.ts +12 -8
- package/dist_ts/smartnetwork.classes.rustbridge.js +70 -15
- package/dist_ts/smartnetwork.classes.smartnetwork.d.ts +10 -3
- package/dist_ts/smartnetwork.classes.smartnetwork.js +132 -50
- package/dist_ts/smartnetwork.plugins.d.ts +2 -1
- package/dist_ts/smartnetwork.plugins.js +3 -2
- package/package.json +8 -7
- package/readme.hints.md +3 -3
- package/readme.md +23 -9
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/smartnetwork.classes.domainintelligence.ts +121 -381
- package/ts/smartnetwork.classes.ipintelligence.ts +88 -345
- package/ts/smartnetwork.classes.rustbridge.ts +72 -14
- package/ts/smartnetwork.classes.smartnetwork.ts +140 -52
- package/ts/smartnetwork.plugins.ts +2 -1
|
Binary file
|
|
Binary file
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartnetwork',
|
|
6
|
-
version: '4.
|
|
6
|
+
version: '4.10.1',
|
|
7
7
|
description: 'A toolkit for network diagnostics including speed tests, port availability checks, and more.'
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSwwQkFBMEI7SUFDaEMsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLDhGQUE4RjtDQUM1RyxDQUFBIn0=
|
|
@@ -46,22 +46,24 @@ export interface IDomainIntelligenceOptions {
|
|
|
46
46
|
timeout?: number;
|
|
47
47
|
/**
|
|
48
48
|
* Optional injected smartdns client. When provided, DomainIntelligence
|
|
49
|
-
* will not create or
|
|
49
|
+
* will not create or terminate its own client (the owner — typically
|
|
50
50
|
* SmartNetwork — manages lifecycle). When omitted, a short-lived client
|
|
51
|
-
* is created per DNS-layer query and
|
|
51
|
+
* is created per DNS-layer query and terminated in finally.
|
|
52
52
|
*/
|
|
53
53
|
dnsClient?: TSmartdnsClient;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
* DomainIntelligence performs RDAP lookups for domain names
|
|
57
|
-
*
|
|
56
|
+
* DomainIntelligence performs RDAP lookups for domain names via
|
|
57
|
+
* @push.rocks/smartwhois, which resolves the correct registry RDAP endpoint
|
|
58
|
+
* per TLD through the IANA DNS bootstrap.
|
|
58
59
|
*/
|
|
59
60
|
export declare class DomainIntelligence {
|
|
60
61
|
private readonly logger;
|
|
61
62
|
private readonly timeout;
|
|
62
|
-
private
|
|
63
|
-
private bootstrapPromise;
|
|
63
|
+
private readonly rdapClient;
|
|
64
64
|
private readonly sharedDnsClient;
|
|
65
|
+
private ownedDnsClient;
|
|
66
|
+
private dnsLifecycleQueue;
|
|
65
67
|
constructor(options?: IDomainIntelligenceOptions);
|
|
66
68
|
/**
|
|
67
69
|
* Get comprehensive domain intelligence. Runs RDAP and DNS lookups in
|
|
@@ -74,52 +76,25 @@ export declare class DomainIntelligence {
|
|
|
74
76
|
* when RDAP is unavailable (closes the ccTLD gap)
|
|
75
77
|
*/
|
|
76
78
|
getIntelligence(domain: string): Promise<IDomainIntelligenceResult>;
|
|
79
|
+
/** Retry and confirm cleanup of a standalone DNS client, if one is retained. */
|
|
80
|
+
stop(): Promise<void>;
|
|
77
81
|
/**
|
|
78
|
-
* Run the full RDAP lookup flow for a pre-normalized domain
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
+
* Run the full RDAP lookup flow for a pre-normalized domain via the
|
|
83
|
+
* smartwhois RdapClient. Returns the parsed RDAP fields (as a full
|
|
84
|
+
* IDomainIntelligenceResult) or null if any step fails, the TLD has no
|
|
85
|
+
* RDAP support, or the registry reports the domain as not registered.
|
|
82
86
|
*/
|
|
83
87
|
private queryRdapLayer;
|
|
88
|
+
/**
|
|
89
|
+
* Map a smartwhois RDAP domain record onto the IDomainIntelligenceResult
|
|
90
|
+
* shape (RDAP fields only; DNS enrichment fields stay null here).
|
|
91
|
+
*/
|
|
92
|
+
private mapRdapRecord;
|
|
84
93
|
/**
|
|
85
94
|
* Normalize a domain to lowercased ASCII punycode form. Returns null for
|
|
86
95
|
* obviously invalid input.
|
|
87
96
|
*/
|
|
88
97
|
private normalizeDomain;
|
|
89
|
-
/**
|
|
90
|
-
* Extract the TLD as the last dot-separated label.
|
|
91
|
-
*/
|
|
92
|
-
private extractTld;
|
|
93
|
-
/**
|
|
94
|
-
* Load and cache the IANA DNS bootstrap file.
|
|
95
|
-
*/
|
|
96
|
-
private ensureBootstrap;
|
|
97
|
-
/**
|
|
98
|
-
* Find the RDAP base URL for a given TLD via direct lookup.
|
|
99
|
-
*/
|
|
100
|
-
private matchTld;
|
|
101
|
-
/**
|
|
102
|
-
* Perform the RDAP HTTP query for a domain.
|
|
103
|
-
*/
|
|
104
|
-
private queryRdap;
|
|
105
|
-
private parseRdapResponse;
|
|
106
|
-
/**
|
|
107
|
-
* Pull registration / expiration / last changed timestamps from an
|
|
108
|
-
* RDAP `events` array.
|
|
109
|
-
*/
|
|
110
|
-
private extractEvents;
|
|
111
|
-
/**
|
|
112
|
-
* Extract registrar identity (name, IANA ID) and a nested abuse contact.
|
|
113
|
-
*/
|
|
114
|
-
private extractRegistrar;
|
|
115
|
-
/**
|
|
116
|
-
* Extract registrant org/country from entities array.
|
|
117
|
-
*/
|
|
118
|
-
private extractRegistrant;
|
|
119
|
-
/**
|
|
120
|
-
* Map an RDAP nameservers[] array to a list of lowercased ldhName strings.
|
|
121
|
-
*/
|
|
122
|
-
private extractNameservers;
|
|
123
98
|
/**
|
|
124
99
|
* Run DNS record lookups for the given domain using smartdns. Queries
|
|
125
100
|
* NS/A/AAAA/MX/TXT/SOA in parallel via Promise.allSettled — failures in
|
|
@@ -127,10 +102,12 @@ export declare class DomainIntelligence {
|
|
|
127
102
|
* field either populated or null.
|
|
128
103
|
*
|
|
129
104
|
* If a shared dnsClient was injected via constructor options, it is
|
|
130
|
-
* reused and NOT
|
|
131
|
-
* a short-lived client is created and
|
|
105
|
+
* reused and NOT terminated (ownership stays with the injector). Otherwise
|
|
106
|
+
* a short-lived client is created and terminated in finally.
|
|
132
107
|
*/
|
|
133
108
|
private queryDnsLayer;
|
|
109
|
+
private enqueueDnsLifecycle;
|
|
110
|
+
private terminateOwnedDnsClient;
|
|
134
111
|
/**
|
|
135
112
|
* Extract normalized nameserver hostnames from a getNameServers() result.
|
|
136
113
|
*/
|
|
@@ -150,21 +127,5 @@ export declare class DomainIntelligence {
|
|
|
150
127
|
* value as the exchange with priority=null so the result is still useful.
|
|
151
128
|
*/
|
|
152
129
|
private parseMxRecords;
|
|
153
|
-
/**
|
|
154
|
-
* Extract the 'fn' (formatted name) from an entity's vcardArray
|
|
155
|
-
*/
|
|
156
|
-
private extractVcardFn;
|
|
157
|
-
/**
|
|
158
|
-
* Extract email from an entity's vcardArray
|
|
159
|
-
*/
|
|
160
|
-
private extractVcardEmail;
|
|
161
|
-
/**
|
|
162
|
-
* Extract telephone number from an entity's vcardArray
|
|
163
|
-
*/
|
|
164
|
-
private extractVcardTel;
|
|
165
|
-
/**
|
|
166
|
-
* Extract country from an entity's vcardArray address field
|
|
167
|
-
*/
|
|
168
|
-
private extractVcardCountry;
|
|
169
130
|
}
|
|
170
131
|
export {};
|