Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
b8387458db | |||
04aed2556b | |||
4cde3a7fe0 | |||
466d6d47ba | |||
fa99b7f068 | |||
3e865b6c92 |
@ -25,11 +25,11 @@ mirror:
|
|||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
snyk:
|
snyk:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:snyk
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci command npm install -g snyk
|
- npmci command npm ci --ignore-scripts
|
||||||
- npmci command npm install --ignore-scripts
|
|
||||||
- npmci command snyk test
|
- npmci command snyk test
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
- lossless
|
||||||
|
10045
package-lock.json
generated
10045
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartpdf",
|
"name": "@pushrocks/smartpdf",
|
||||||
"version": "2.0.0",
|
"version": "2.0.3",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "create pdfs on the fly",
|
"description": "create pdfs on the fly",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@ -13,21 +13,21 @@
|
|||||||
"build": "(tsbuild)"
|
"build": "(tsbuild)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.17",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
"@gitzone/tsrun": "^1.2.8",
|
"@gitzone/tsrun": "^1.2.12",
|
||||||
"@gitzone/tstest": "^1.0.28",
|
"@gitzone/tstest": "^1.0.52",
|
||||||
"@pushrocks/tapbundle": "^3.0.13",
|
"@pushrocks/tapbundle": "^3.2.14",
|
||||||
"@types/node": "^12.12.8",
|
"@types/node": "^14.14.31",
|
||||||
"tslint": "^6.0.0-beta0",
|
"tslint": "^6.1.3",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartfile": "^7.0.6",
|
"@pushrocks/smartfile": "^8.0.8",
|
||||||
"@pushrocks/smartnetwork": "^1.1.14",
|
"@pushrocks/smartnetwork": "^1.1.22",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.1.3",
|
||||||
"@pushrocks/smartpuppeteer": "^1.0.11",
|
"@pushrocks/smartpuppeteer": "^1.0.21",
|
||||||
"@pushrocks/smartunique": "^3.0.1",
|
"@pushrocks/smartunique": "^3.0.3",
|
||||||
"@types/express": "^4.17.2",
|
"@types/express": "^4.17.11",
|
||||||
"express": "^4.17.1"
|
"express": "^4.17.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -98,7 +98,7 @@ export class SmartPdf {
|
|||||||
|
|
||||||
async getPdfResultForWebsite(websiteUrl: string): Promise<interfaces.IPdfResult> {
|
async getPdfResultForWebsite(websiteUrl: string): Promise<interfaces.IPdfResult> {
|
||||||
const page = await this.headlessBrowser.newPage();
|
const page = await this.headlessBrowser.newPage();
|
||||||
await page.emulateMedia('screen');
|
await page.emulateMediaType('screen');
|
||||||
const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' });
|
const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' });
|
||||||
const pdfId = plugins.smartunique.shortId();
|
const pdfId = plugins.smartunique.shortId();
|
||||||
const { documentHeight, documentWidth } = await page.evaluate(() => {
|
const { documentHeight, documentWidth } = await page.evaluate(() => {
|
||||||
@ -125,7 +125,7 @@ export class SmartPdf {
|
|||||||
|
|
||||||
async getFullWebsiteAsSinglePdf(websiteUrl: string) {
|
async getFullWebsiteAsSinglePdf(websiteUrl: string) {
|
||||||
const page = await this.headlessBrowser.newPage();
|
const page = await this.headlessBrowser.newPage();
|
||||||
page.emulateMedia('screen');
|
page.emulateMediaType('screen');
|
||||||
const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' });
|
const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' });
|
||||||
const pdfId = plugins.smartunique.shortId();
|
const pdfId = plugins.smartunique.shortId();
|
||||||
const { documentHeight, documentWidth } = await page.evaluate(() => {
|
const { documentHeight, documentWidth } = await page.evaluate(() => {
|
||||||
|
Reference in New Issue
Block a user