fix(core): update
This commit is contained in:
parent
30e4b4665c
commit
baf26dc492
37
package-lock.json
generated
37
package-lock.json
generated
@ -248,6 +248,15 @@
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.0.2.tgz",
|
||||
"integrity": "sha512-jmrJMUEmBCWChWK8CIcx4Vw3wv/8OgVNmkaxJrbs+WMaoRUfJtpWWJfrAwwHWt9ZXJbarJ+CwfwfYiiZXymndQ=="
|
||||
},
|
||||
"@pushrocks/smartpuppeteer": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpuppeteer/-/smartpuppeteer-1.0.5.tgz",
|
||||
"integrity": "sha512-7iD2mxQHXG5/6PwZY2wU6GQjNXy9dR5cLP/nvfjxXaelX/x3N1yagjPAuMYxuIqiTtVfrHC4Ehq+gnTZ4mSPow==",
|
||||
"requires": {
|
||||
"@types/puppeteer": "^1.12.4",
|
||||
"puppeteer": "^1.17.0"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartrequest": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/@pushrocks/smartrequest/-/smartrequest-1.1.14.tgz",
|
||||
@ -460,9 +469,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "12.0.3",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.0.3.tgz",
|
||||
"integrity": "sha512-zkOxCS/fA+3SsdA+9Yun0iANxzhQRiNwTvJSr6N95JhuJ/x27z9G2URx1Jpt3zYFfCGUXZGL5UDxt5eyLE7wgw=="
|
||||
"version": "12.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.0.4.tgz",
|
||||
"integrity": "sha512-j8YL2C0fXq7IONwl/Ud5Kt0PeXw22zGERt+HSSnwbKOJVsAGkEz3sFCYwaF9IOuoG1HOtE0vKCj6sXF7Q0+Vaw=="
|
||||
},
|
||||
"@types/portscanner": {
|
||||
"version": "2.1.0",
|
||||
@ -611,7 +620,7 @@
|
||||
},
|
||||
"async-limiter": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/async-limiter/-/async-limiter-1.0.0.tgz",
|
||||
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
|
||||
},
|
||||
"asynckit": {
|
||||
@ -815,7 +824,7 @@
|
||||
},
|
||||
"concat-stream": {
|
||||
"version": "1.6.2",
|
||||
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/concat-stream/-/concat-stream-1.6.2.tgz",
|
||||
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@ -1067,7 +1076,7 @@
|
||||
},
|
||||
"extract-zip": {
|
||||
"version": "1.6.7",
|
||||
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/extract-zip/-/extract-zip-1.6.7.tgz",
|
||||
"integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
|
||||
"requires": {
|
||||
"concat-stream": "1.6.2",
|
||||
@ -1078,7 +1087,7 @@
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
@ -1088,7 +1097,7 @@
|
||||
},
|
||||
"fd-slicer": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/fd-slicer/-/fd-slicer-1.0.1.tgz",
|
||||
"integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
|
||||
"requires": {
|
||||
"pend": "~1.2.0"
|
||||
@ -1515,7 +1524,7 @@
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
@ -1523,7 +1532,7 @@
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
||||
}
|
||||
}
|
||||
@ -1742,7 +1751,7 @@
|
||||
},
|
||||
"pend": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/pend/-/pend-1.2.0.tgz",
|
||||
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
|
||||
},
|
||||
"pify": {
|
||||
@ -1786,7 +1795,7 @@
|
||||
},
|
||||
"proxy-from-env": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
|
||||
"integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4="
|
||||
},
|
||||
"pump": {
|
||||
@ -2227,7 +2236,7 @@
|
||||
},
|
||||
"typedarray": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
||||
},
|
||||
"typescript": {
|
||||
@ -2427,7 +2436,7 @@
|
||||
},
|
||||
"yauzl": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
|
||||
"resolved": "https://verdaccio.lossless.one/yauzl/-/yauzl-2.4.1.tgz",
|
||||
"integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
|
||||
"requires": {
|
||||
"fd-slicer": "~1.0.1"
|
||||
|
@ -17,17 +17,16 @@
|
||||
"@gitzone/tsrun": "^1.2.6",
|
||||
"@gitzone/tstest": "^1.0.24",
|
||||
"@pushrocks/tapbundle": "^3.0.9",
|
||||
"@types/node": "^12.0.3"
|
||||
"@types/node": "^12.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartfile": "^7.0.2",
|
||||
"@pushrocks/smartnetwork": "^1.1.6",
|
||||
"@pushrocks/smartpromise": "^3.0.2",
|
||||
"@pushrocks/smartpuppeteer": "^1.0.5",
|
||||
"@pushrocks/smartunique": "^3.0.1",
|
||||
"@types/express": "^4.16.1",
|
||||
"@types/puppeteer": "^1.12.4",
|
||||
"express": "^4.17.1",
|
||||
"puppeteer": "^1.17.0"
|
||||
"express": "^4.17.1"
|
||||
},
|
||||
"files": [
|
||||
"ts/*",
|
||||
|
@ -10,7 +10,7 @@ import * as interfaces from './interfaces';
|
||||
export class SmartPdf {
|
||||
htmlServerInstance: Server;
|
||||
serverPort: number;
|
||||
headlessBrowser: plugins.puppeteer.Browser;
|
||||
headlessBrowser: plugins.smartpuppeteer.puppeteer.Browser;
|
||||
externalBrowserBool: boolean = false;
|
||||
private _readyDeferred: plugins.smartpromise.Deferred<void>;
|
||||
private _candidates: { [key: string]: PdfCandidate } = {};
|
||||
@ -26,13 +26,7 @@ export class SmartPdf {
|
||||
if (this.headlessBrowser) {
|
||||
this.externalBrowserBool = true;
|
||||
} else {
|
||||
let chromeArgs: string[] = [];
|
||||
if(process.env.CI) {
|
||||
chromeArgs = chromeArgs.concat(['--no-sandbox', '--disable-setuid-sandbox'])
|
||||
}
|
||||
this.headlessBrowser = await plugins.puppeteer.launch({
|
||||
args: chromeArgs
|
||||
});
|
||||
this.headlessBrowser = await plugins.smartpuppeteer.getEnvAwareBrowserInstance();
|
||||
}
|
||||
|
||||
// setup server
|
||||
|
@ -7,13 +7,13 @@ export { http, path };
|
||||
// @pushrocks
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartpuppeteer from '@pushrocks/smartpuppeteer';
|
||||
import * as smartnetwork from '@pushrocks/smartnetwork';
|
||||
import * as smartunique from '@pushrocks/smartunique';
|
||||
|
||||
export { smartfile, smartpromise, smartunique, smartnetwork };
|
||||
export { smartfile, smartpromise, smartpuppeteer, smartunique, smartnetwork };
|
||||
|
||||
// thirdparty
|
||||
import express from 'express';
|
||||
import puppeteer from 'puppeteer';
|
||||
|
||||
export { express, puppeteer };
|
||||
export { express };
|
||||
|
Loading…
Reference in New Issue
Block a user