fix(core): update
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartwhois',
|
||||
version: '1.0.4',
|
||||
version: '1.0.5',
|
||||
description: 'a package for dealing with whois requests'
|
||||
}
|
||||
|
29
ts/index.ts
29
ts/index.ts
@ -1,5 +1,28 @@
|
||||
import * as plugins from './smartwhois.plugins.js';
|
||||
|
||||
export interface IWhoisInfo {
|
||||
domain: string;
|
||||
domainWithoutSuffix: string;
|
||||
hostname: string;
|
||||
isIcann: boolean;
|
||||
isIp: boolean;
|
||||
isPrivate: boolean;
|
||||
publicSuffix: string;
|
||||
subdomain: string;
|
||||
isRegistered: boolean;
|
||||
dnsSec: 'signedDelegation' | 'unsigned';
|
||||
originalWhoisInfo: {
|
||||
[key: string]: any;
|
||||
};
|
||||
whoisServers: string[];
|
||||
registrar: string;
|
||||
registrarUrl: string;
|
||||
createdDate: string;
|
||||
updatedDate: string;
|
||||
expiryDate: string;
|
||||
}
|
||||
|
||||
|
||||
export class SmartWhois {
|
||||
public async getWhoisForDomain(domainArg: string) {
|
||||
const whoisInfo = await plugins.whoiser.domain(domainArg);
|
||||
@ -10,7 +33,13 @@ export class SmartWhois {
|
||||
const createdDate = selectedWhoisInfo['Created Date'];
|
||||
const updatedDate = selectedWhoisInfo['Updated Date'];
|
||||
const expiryDate = selectedWhoisInfo['Expiry Date'];
|
||||
|
||||
const tldtsData = plugins.tldts.parse(domainArg);
|
||||
|
||||
return {
|
||||
...tldtsData,
|
||||
isRegistered: true,
|
||||
dnsSec: selectedWhoisInfo['DNSSEC'],
|
||||
originalWhoisInfo: whoisInfo,
|
||||
whoisServers,
|
||||
registrar,
|
||||
|
@ -1,6 +1,8 @@
|
||||
// third party
|
||||
import * as whoiser from 'whoiser';
|
||||
import tldts from 'tldts';
|
||||
|
||||
export {
|
||||
whoiser
|
||||
whoiser,
|
||||
tldts,
|
||||
}
|
||||
|
Reference in New Issue
Block a user