fix(core): update
This commit is contained in:
parent
9e3a69854f
commit
6d6eb9944a
1146
package-lock.json
generated
1146
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@ -13,20 +13,20 @@
|
|||||||
"build": "(tsbuild)"
|
"build": "(tsbuild)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.0.22",
|
"@gitzone/tsbuild": "^2.1.8",
|
||||||
"@gitzone/tsrun": "^1.1.12",
|
"@gitzone/tsrun": "^1.2.5",
|
||||||
"@gitzone/tstest": "^1.0.15",
|
"@gitzone/tstest": "^1.0.20",
|
||||||
"@pushrocks/tapbundle": "^3.0.7",
|
"@pushrocks/tapbundle": "^3.0.9",
|
||||||
"@types/node": "^10.11.4"
|
"@types/node": "^11.13.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartfile": "^6.0.8",
|
"@pushrocks/smartfile": "^7.0.2",
|
||||||
"@pushrocks/smartnetwork": "^1.1.0",
|
"@pushrocks/smartnetwork": "^1.1.0",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/smartunique": "^3.0.1",
|
"@pushrocks/smartunique": "^3.0.1",
|
||||||
"@types/express": "^4.16.0",
|
"@types/express": "^4.16.1",
|
||||||
"@types/puppeteer": "^1.9.0",
|
"@types/puppeteer": "^1.12.3",
|
||||||
"express": "^4.16.3",
|
"express": "^4.16.4",
|
||||||
"puppeteer": "^1.9.0"
|
"puppeteer": "^1.14.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ tap.test('should create a pdf from html string', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should create a pdf from website', async () => {
|
tap.test('should create a pdf from website', async () => {
|
||||||
await testSmartPdf.getPdfForWebsite('https://wikipedia.org');
|
await testSmartPdf.getPdfForWebsite('https://maintainedby.lossless.com');
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should be able to close properly', async () => {
|
tap.test('should be able to close properly', async () => {
|
||||||
|
@ -78,7 +78,10 @@ export class SmartPdf {
|
|||||||
const pdfId = plugins.smartunique.shortId();
|
const pdfId = plugins.smartunique.shortId();
|
||||||
await page.pdf({
|
await page.pdf({
|
||||||
path: plugins.path.join(paths.pdfDir, `${pdfId}.pdf`),
|
path: plugins.path.join(paths.pdfDir, `${pdfId}.pdf`),
|
||||||
format: 'A4'
|
format: 'A4',
|
||||||
|
printBackground: true,
|
||||||
|
displayHeaderFooter: false,
|
||||||
|
preferCSSPageSize: true
|
||||||
});
|
});
|
||||||
await page.close();
|
await page.close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user