@qualweb/crawler
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -12,3 +12,3 @@ 'use strict'; | ||
async start(options) { | ||
return new Promise((resolve, reject) => { | ||
return new Promise(resolve => { | ||
if (options) { | ||
@@ -19,3 +19,3 @@ this.crawler.maxConcurrency = 100; | ||
} | ||
this.crawler.on('fetchcomplete', item => { | ||
this.crawler.on('fetchcomplete', (item) => { | ||
if (item && item['stateData'] && item['stateData']['contentType'] && | ||
@@ -22,0 +22,0 @@ item['stateData']['contentType'].includes('text/html') && |
{ | ||
"name": "@qualweb/crawler", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Webpage crawler for qualweb", | ||
@@ -36,2 +36,3 @@ "main": "dist/index.js", | ||
"@types/node": "^12.7.7", | ||
"@types/simplecrawler": "^1.1.1", | ||
"chai": "^4.2.0", | ||
@@ -38,0 +39,0 @@ "mocha": "^6.2.0", |
@@ -8,3 +8,3 @@ 'use strict'; | ||
private urls: Array<string>; | ||
private crawler: any; | ||
private crawler: Crawler; | ||
@@ -17,3 +17,3 @@ constructor(domain: string) { | ||
public async start(options?: any): Promise<void> { | ||
return new Promise((resolve: any, reject: any) => { | ||
return new Promise(resolve => { | ||
if (options) { | ||
@@ -25,3 +25,3 @@ this.crawler.maxConcurrency = 100; | ||
this.crawler.on('fetchcomplete', item => { | ||
this.crawler.on('fetchcomplete', (item: any) => { | ||
if (item && item['stateData'] && item['stateData']['contentType'] && | ||
@@ -28,0 +28,0 @@ item['stateData']['contentType'].includes('text/html') && |
{ | ||
"compilerOptions": { | ||
/* Basic Options */ | ||
"resolveJsonModule": true, | ||
"target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | ||
@@ -14,3 +13,3 @@ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | ||
//"sourceMap": true, /* Generates corresponding '.map' file. */ | ||
//"outFile": "./qualweb-wappalyzer.js", /* Concatenate and emit output to single file. */ | ||
//"outFile": "", /* Concatenate and emit output to single file. */ | ||
"outDir": "./dist", /* Redirect output structure to the directory. */ | ||
@@ -27,3 +26,3 @@ "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ | ||
"strict": true, /* Enable all strict type-checking options. */ | ||
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ | ||
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ | ||
"strictNullChecks": true, /* Enable strict null checks. */ | ||
@@ -38,3 +37,3 @@ "strictFunctionTypes": true, /* Enable strict checking of function types. */ | ||
"noUnusedLocals": true, /* Report errors on unused locals. */ | ||
"noUnusedParameters": false, /* Report errors on unused parameters. */ | ||
"noUnusedParameters": true, /* Report errors on unused parameters. */ | ||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ | ||
@@ -49,3 +48,3 @@ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ | ||
"typeRoots": ["./node_modules/@qualweb/types"], /* List of folders to include type definitions from. */ | ||
"types": ["./node_modules/@qualweb/types", "node"], /* Type declaration files to be included in compilation. */ | ||
"types": ["./node_modules/@qualweb/types", "node", "simplecrawler"], /* Type declaration files to be included in compilation. */ | ||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ | ||
@@ -52,0 +51,0 @@ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ |
Sorry, the diff of this file is not supported yet
10863
6
156