fix(core): update

This commit is contained in:
2023-04-03 16:48:14 +02:00
commit bb01926e9b
13 changed files with 4898 additions and 0 deletions

8
ts/00_commitinfo_data.ts Normal file
View File

@@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartwhois',
version: '1.0.2',
description: 'a package for dealing with whois requests'
}

25
ts/index.ts Normal file
View File

@@ -0,0 +1,25 @@
import * as plugins from './smartwhois.plugins.js';
export class SmartWhois {
public async getWhoisForDomain(domainArg: string) {
const whoisInfo = await plugins.whoiser.domain(domainArg);
const whoisServers = Object.keys(whoisInfo);
const selectedWhoisInfo: any = whoisInfo[whoisServers[0]];
const registrar = selectedWhoisInfo.Registrar;
const registrarUrl = selectedWhoisInfo['Registrar URL'];
const createdDate = selectedWhoisInfo['Created Date'];
const updatedDate = selectedWhoisInfo['Updated Date'];
const expiryDate = selectedWhoisInfo['Expiry Date'];
return {
originalWhoisInfo: whoisInfo,
whoisServers,
registrar,
registrarUrl,
createdDate,
updatedDate,
expiryDate,
};
}
public async getWhoisForIp(ipArg: string) {}
}

6
ts/smartwhois.plugins.ts Normal file
View File

@@ -0,0 +1,6 @@
// third party
import * as whoiser from 'whoiser';
export {
whoiser
}