fix(core): update
This commit is contained in:
		
							
								
								
									
										38
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										38
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -140,11 +140,21 @@ | ||||
|       "version": "2.0.6", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.6.tgz", | ||||
|       "integrity": "sha512-4wUnzWNhRPODpaaL5GuRaje/C5dg+TMhBxmr57PKc2fqYpy6azWJwonf/s5xpcbJLCPJRbj1x8M5MqgCFq2uvg==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "@pushrocks/smartpromise": "^3.0.6" | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smartenv": { | ||||
|       "version": "4.0.8", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartenv/-/smartenv-4.0.8.tgz", | ||||
|       "integrity": "sha512-gKEL1/ogJwss2b/xjbOen5s+9geT5XUvNXuD1qUpc1t5P9w0BaXXuLw7vz1pVRxb/NWtmPLRIdVbAxL1OmmwCg==", | ||||
|       "requires": { | ||||
|         "@pushrocks/smartparam": "^1.0.4", | ||||
|         "@pushrocks/smartpromise": "^3.0.6", | ||||
|         "@types/node": "^12.12.7", | ||||
|         "is-wsl": "^2.1.1" | ||||
|       } | ||||
|     }, | ||||
|     "@pushrocks/smartevent": { | ||||
|       "version": "2.0.3", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartevent/-/smartevent-2.0.3.tgz", | ||||
| @@ -256,7 +266,6 @@ | ||||
|       "version": "1.0.4", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartparam/-/smartparam-1.0.4.tgz", | ||||
|       "integrity": "sha512-UAqhnTQGBaJRptTK3qTd47Yt2ZTrAWByteow4auSNZD+k0xrpY9mTPPgKh0IwsURe0cZhj7zYNpGiekhKkL4rA==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "@pushrocks/smartpromise": "^2.0.5", | ||||
|         "is-promise": "^2.1.0", | ||||
| @@ -266,8 +275,7 @@ | ||||
|         "@pushrocks/smartpromise": { | ||||
|           "version": "2.0.5", | ||||
|           "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz", | ||||
|           "integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g==", | ||||
|           "dev": true | ||||
|           "integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g==" | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
| @@ -282,10 +290,12 @@ | ||||
|       "integrity": "sha512-vlQlBGNVIjfClgnsfgQBU6GIKcskYSFzEcKLt18ngPzPEcjKklXcxaqzLXpnoxR+KBh30QPE8255ncYHXuPPOg==" | ||||
|     }, | ||||
|     "@pushrocks/smartpuppeteer": { | ||||
|       "version": "1.0.6", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpuppeteer/-/smartpuppeteer-1.0.6.tgz", | ||||
|       "integrity": "sha512-cn/puPrF63HKbFh/zlTrpqLg73rEDgk+q4Ru2bIStDQkwSsZobEdAV5x+Ll2guOYHGLBNMSxIsvqe1joMhdCLA==", | ||||
|       "version": "1.0.11", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpuppeteer/-/smartpuppeteer-1.0.11.tgz", | ||||
|       "integrity": "sha512-a38EUpOigY5PYFFgl/N6tkPdv4GYvU5zRAb+adwZts1uNe15UIKpC7upkA2QykuYU0ueMgc0a+JMB1qeJsA7HQ==", | ||||
|       "requires": { | ||||
|         "@pushrocks/smartdelay": "^2.0.6", | ||||
|         "@pushrocks/smartenv": "^4.0.8", | ||||
|         "@types/puppeteer": "^1.20.2", | ||||
|         "puppeteer": "^2.0.0" | ||||
|       } | ||||
| @@ -508,9 +518,9 @@ | ||||
|       "dev": true | ||||
|     }, | ||||
|     "@types/node": { | ||||
|       "version": "12.12.7", | ||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.12.7.tgz", | ||||
|       "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==" | ||||
|       "version": "12.12.8", | ||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.12.8.tgz", | ||||
|       "integrity": "sha512-XLla8N+iyfjvsa0KKV+BP/iGSoTmwxsu5Ci5sM33z9TjohF72DEz95iNvD6pPmemvbQgxAv/909G73gUn8QR7w==" | ||||
|     }, | ||||
|     "@types/portscanner": { | ||||
|       "version": "2.1.0", | ||||
| @@ -1501,8 +1511,7 @@ | ||||
|     "is-promise": { | ||||
|       "version": "2.1.0", | ||||
|       "resolved": "https://verdaccio.lossless.one/is-promise/-/is-promise-2.1.0.tgz", | ||||
|       "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", | ||||
|       "dev": true | ||||
|       "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" | ||||
|     }, | ||||
|     "is-regex": { | ||||
|       "version": "1.0.4", | ||||
| @@ -1525,6 +1534,11 @@ | ||||
|         "has-symbols": "^1.0.0" | ||||
|       } | ||||
|     }, | ||||
|     "is-wsl": { | ||||
|       "version": "2.1.1", | ||||
|       "resolved": "https://verdaccio.lossless.one/is-wsl/-/is-wsl-2.1.1.tgz", | ||||
|       "integrity": "sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog==" | ||||
|     }, | ||||
|     "isarray": { | ||||
|       "version": "1.0.0", | ||||
|       "resolved": "https://verdaccio.lossless.one/isarray/-/isarray-1.0.0.tgz", | ||||
|   | ||||
| @@ -17,7 +17,7 @@ | ||||
|     "@gitzone/tsrun": "^1.2.8", | ||||
|     "@gitzone/tstest": "^1.0.28", | ||||
|     "@pushrocks/tapbundle": "^3.0.13", | ||||
|     "@types/node": "^12.12.7", | ||||
|     "@types/node": "^12.12.8", | ||||
|     "tslint": "^6.0.0-beta0", | ||||
|     "tslint-config-prettier": "^1.18.0" | ||||
|   }, | ||||
| @@ -25,7 +25,7 @@ | ||||
|     "@pushrocks/smartfile": "^7.0.6", | ||||
|     "@pushrocks/smartnetwork": "^1.1.14", | ||||
|     "@pushrocks/smartpromise": "^3.0.6", | ||||
|     "@pushrocks/smartpuppeteer": "^1.0.6", | ||||
|     "@pushrocks/smartpuppeteer": "^1.0.11", | ||||
|     "@pushrocks/smartunique": "^3.0.1", | ||||
|     "@types/express": "^4.17.2", | ||||
|     "express": "^4.17.1" | ||||
|   | ||||
| @@ -17,11 +17,11 @@ tap.test('should create a pdf from html string', async () => { | ||||
| }); | ||||
|  | ||||
| tap.test('should create a pdf from website as A4', async () => { | ||||
|   await testSmartPdf.getPdfForWebsite('https://maintainedby.lossless.com'); | ||||
|   await testSmartPdf.getPdfForWebsite('https://www.wikipedia.org'); | ||||
| }); | ||||
|  | ||||
| tap.test('should create a pdf from website as single page PDF', async () => { | ||||
|   await testSmartPdf.getFullWebsiteAsSinglePdf('https://maintainedby.lossless.com'); | ||||
|   await testSmartPdf.getFullWebsiteAsSinglePdf('https://www.wikipedia.org'); | ||||
| }); | ||||
|  | ||||
| tap.test('should create a valid PDFResult', async () => { | ||||
|   | ||||
| @@ -98,7 +98,7 @@ export class SmartPdf { | ||||
|  | ||||
|   async getPdfForWebsite(websiteUrl: string): Promise<interfaces.IPdfResult> { | ||||
|     const page = await this.headlessBrowser.newPage(); | ||||
|     page.emulateMedia('screen'); | ||||
|     await page.emulateMedia('screen'); | ||||
|     const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' }); | ||||
|     const pdfId = plugins.smartunique.shortId(); | ||||
|     const { documentHeight, documentWidth } = await page.evaluate(() => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user