From add6b9a760a357b26eba793e0d7dcc7d585568da Mon Sep 17 00:00:00 2001 From: Manish Rawat Date: Wed, 12 Aug 2020 14:59:34 -0400 Subject: [PATCH] fixes bug in rc release --- src/BaseResolver.ts | 8 ++++---- src/app.ts | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/BaseResolver.ts b/src/BaseResolver.ts index 4e3ed00..c82b8c6 100644 --- a/src/BaseResolver.ts +++ b/src/BaseResolver.ts @@ -1,6 +1,6 @@ -import { HTTPError } from 'got'; -const got = require('got'); -const FormData = require('form-data'); +import got, { HTTPError } from 'got'; +// const got = require('got'); +import FormData = require('form-data'); export abstract class BaseUrlResolver { protected domains: RegExp[]; @@ -60,7 +60,7 @@ export abstract class BaseUrlResolver { } private setupEnvironment(): void { - let gotoptions: any; + let gotoptions: any = {}; this.useCookies && (gotoptions.cookieJar = new this.CookieJar.CookieJar()); gotoptions.headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0' diff --git a/src/app.ts b/src/app.ts index b7a429f..87831af 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,13 +1,13 @@ import { UrlResolver } from "./UrlResolver"; //uncomment for testing -(async () => { - var instance = new UrlResolver(); - var urlToResolve = ""; - var results = await instance.resolveRecursive(urlToResolve, { - timeout: 30, - }); - console.log(results); -})(); +// (async () => { +// var instance = new UrlResolver(); +// var urlToResolve = ""; +// var results = await instance.resolveRecursive(urlToResolve, { +// timeout: 30, +// }); +// console.log(results); +// })(); export = new UrlResolver();