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();