fix(core): update
This commit is contained in:
		
							
								
								
									
										3358
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										3358
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -14,17 +14,17 @@ | |||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@gitzone/tsbuild": "^2.1.25", |     "@gitzone/tsbuild": "^2.1.25", | ||||||
|     "@gitzone/tstest": "^1.0.52", |     "@gitzone/tstest": "^1.0.54", | ||||||
|     "@pushrocks/smartserve": "^1.1.41", |     "@pushrocks/smartserve": "^1.1.41", | ||||||
|     "@pushrocks/tapbundle": "^3.2.9", |     "@pushrocks/tapbundle": "^3.2.14", | ||||||
|     "@types/node": "^14.14.20", |     "@types/node": "^14.14.20", | ||||||
|     "tslint": "^6.1.3", |     "tslint": "^6.1.3", | ||||||
|     "tslint-config-prettier": "^1.15.0" |     "tslint-config-prettier": "^1.15.0" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@pushrocks/smartdelay": "^2.0.10", |     "@pushrocks/smartdelay": "^2.0.10", | ||||||
|     "@pushrocks/smartfile": "^8.0.8", |     "@pushrocks/smartfile": "^8.0.10", | ||||||
|     "@pushrocks/smartpromise": "^3.1.3", |     "@pushrocks/smartpromise": "^3.1.5", | ||||||
|     "@pushrocks/smartpuppeteer": "^1.0.21", |     "@pushrocks/smartpuppeteer": "^1.0.21", | ||||||
|     "@pushrocks/smarttime": "^3.0.38" |     "@pushrocks/smarttime": "^3.0.38" | ||||||
|   }, |   }, | ||||||
|   | |||||||
| @@ -43,6 +43,17 @@ export class SmartSSR { | |||||||
|     const resultDeferred = plugins.smartpromise.defer<string>(); |     const resultDeferred = plugins.smartpromise.defer<string>(); | ||||||
|     const context = await this.browser.getNewIncognitoContext(); |     const context = await this.browser.getNewIncognitoContext(); | ||||||
|     const page = await context.newPage(); |     const page = await context.newPage(); | ||||||
|  |  | ||||||
|  |     // lets protext against left open tabs | ||||||
|  |     plugins.smartdelay.delayFor(30000).then(() => { | ||||||
|  |       if (!page.isClosed) { | ||||||
|  |         page.close(); | ||||||
|  |         context.close(); | ||||||
|  |         throw new Error(`failed to render ${urlArg}`); | ||||||
|  |       } | ||||||
|  |        | ||||||
|  |     }); | ||||||
|  |  | ||||||
|     page.on('console', (msg) => { |     page.on('console', (msg) => { | ||||||
|       console.log(`${urlArg}: ${msg.text()}`); |       console.log(`${urlArg}: ${msg.text()}`); | ||||||
|     }); |     }); | ||||||
| @@ -71,6 +82,7 @@ export class SmartSSR { | |||||||
|     renderTimeMeasurement.stop(); |     renderTimeMeasurement.stop(); | ||||||
|  |  | ||||||
|     // lets clean up async |     // lets clean up async | ||||||
|  |     await page.close(); | ||||||
|     await context.close(); |     await context.close(); | ||||||
|  |  | ||||||
|     overallTimeMeasurement.stop(); |     overallTimeMeasurement.stop(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user