fix(core): update

This commit is contained in:
2023-04-19 21:36:44 +02:00
parent 39442208c8
commit 739c95c1e1
6 changed files with 25 additions and 15 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartwhois',
version: '1.0.12',
version: '1.0.13',
description: 'a package for dealing with whois requests'
}

View File

@ -41,7 +41,7 @@ export class SmartWhois {
/**
* can be used to prepare an input for the whois command
*/
public async getParsedUrlResultForWhois(urlArg: string) {
public async getDomainDelegation(urlArg: string): Promise<plugins.tsclass.network.IDomainDelegation> {
if (!urlArg.includes('//')) {
urlArg = `https://${urlArg}`;
}
@ -53,12 +53,13 @@ export class SmartWhois {
domain: tldtsData.domain,
publicSuffix: tldtsData.publicSuffix,
subdomain: tldtsData.subdomain,
domainWithoutSuffix: tldtsData.domainWithoutSuffix,
}
}
public async getAdditionalWhoisDataForDomain(domainArg: string) {
if (domainArg.includes('//')) {
const parsedUrlResult = await this.getParsedUrlResultForWhois(domainArg);
const parsedUrlResult = await this.getDomainDelegation(domainArg);
domainArg = parsedUrlResult.fullDomain;
}
@ -80,7 +81,7 @@ export class SmartWhois {
public async getWhoisForDomain(domainArg: string): Promise<IWhoisInfo> {
if (domainArg.includes('//')) {
const parsedUrlResult = await this.getParsedUrlResultForWhois(domainArg);
const parsedUrlResult = await this.getDomainDelegation(domainArg);
domainArg = parsedUrlResult.fullDomain;
}
const whoisInfo = await plugins.whoiser.domain(domainArg);

View File

@ -1,3 +1,10 @@
// @tsclass scope
import * as tsclass from '@tsclass/tsclass';
export {
tsclass,
}
// pushrocks scope
import * as smarturl from '@pushrocks/smarturl';
import * as smartrequest from '@pushrocks/smartrequest';