fix(core): update
This commit is contained in:
parent
b4a3a36b07
commit
37e47fc33f
3
.gitignore
vendored
3
.gitignore
vendored
@ -19,5 +19,4 @@ dist_web/
|
||||
dist_serve/
|
||||
dist_ts_web/
|
||||
|
||||
# custom
|
||||
assets/pdfdir
|
||||
# custom
|
@ -1,4 +1,4 @@
|
||||
# gitzone standard
|
||||
# gitzone ci_default
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
@ -78,19 +78,10 @@ release:
|
||||
# ====================
|
||||
codequality:
|
||||
stage: metadata
|
||||
image: docker:stable
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
script:
|
||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
||||
- docker run
|
||||
--env SOURCE_CODE="$PWD"
|
||||
--volume "$PWD":/code
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
|
||||
artifacts:
|
||||
paths: [codeclimate.json]
|
||||
- npm install -g tslint typescript
|
||||
- tslint -c tslint.json ./ts/**/*.ts
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
|
@ -38,4 +38,4 @@
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
}
|
||||
}
|
@ -25,7 +25,9 @@ tap.test('should create a pdf from website as single page PDF', async () => {
|
||||
});
|
||||
|
||||
tap.test('should create a valid PDFResult', async () => {
|
||||
const pdfResult = await testSmartPdf.getFullWebsiteAsSinglePdf('https://maintainedby.lossless.com');
|
||||
const pdfResult = await testSmartPdf.getFullWebsiteAsSinglePdf(
|
||||
'https://maintainedby.lossless.com'
|
||||
);
|
||||
expect(pdfResult.buffer).to.be.instanceOf(Buffer);
|
||||
});
|
||||
|
||||
|
@ -1 +1 @@
|
||||
export * from './interface.pdfresult';
|
||||
export * from './interface.pdfresult';
|
||||
|
@ -1,5 +1,5 @@
|
||||
export interface IPdfResult {
|
||||
name: string,
|
||||
id: string,
|
||||
name: string;
|
||||
id: string;
|
||||
buffer: Buffer;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ export class SmartPdf {
|
||||
|
||||
async start(headlessBrowserArg?) {
|
||||
// lets set the external browser in case one is provided
|
||||
this.headlessBrowser = headlessBrowserArg
|
||||
this.headlessBrowser = headlessBrowserArg;
|
||||
// setup puppeteer
|
||||
if (this.headlessBrowser) {
|
||||
this.externalBrowserBool = true;
|
||||
@ -50,7 +50,7 @@ export class SmartPdf {
|
||||
this.htmlServerInstance.close(() => {
|
||||
done.resolve();
|
||||
});
|
||||
|
||||
|
||||
if (!this.externalBrowserBool) {
|
||||
await this.headlessBrowser.close();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user