fix(core): update

This commit is contained in:
2023-04-19 14:52:37 +02:00
parent 18f09a5109
commit 43ebd17ae6
6 changed files with 41 additions and 9 deletions

View File

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

View File

@ -53,6 +53,27 @@ export class SmartWhois {
}
}
public async getAdditionalWhoisDataForDomain(domainArg: string) {
if (domainArg.includes('//')) {
const parsedUrlResult = await this.getParsedUrlResultForWhois(domainArg);
domainArg = parsedUrlResult.fullDomain;
}
// lets test http response
const httpResult = await plugins.smartrequest.safeGet(`http://${domainArg}/`);
// lets test https response
const httpsResult = await plugins.smartrequest.safeGet(`https://${domainArg}/`);
return {
httpStatus: httpResult.statusCode,
httpsStatus: httpsResult.statusCode,
httpContentType: httpResult.headers['content-type'],
httpsContentType: httpsResult.headers['content-type'],
}
}
public async getWhoisForDomain(domainArg: string): Promise<IWhoisInfo> {
if (domainArg.includes('//')) {

View File

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