From c9f42b4c66d6c4f52c6920f8e4c8ff1aec9b32bb Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 15 Nov 2019 23:41:39 +0100 Subject: [PATCH] fix(core): update --- .gitlab-ci.yml | 105 ++++++++++---------- package.json | 13 +-- readme.md | 13 ++- ts/index.ts | 2 - ts/smartpuppeteer.classes.smartpuppeteer.ts | 4 +- ts/smartpuppeteer.plugins.ts | 8 +- 6 files changed, 76 insertions(+), 69 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1c84099..b14b4ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,16 @@ -# gitzone standard -image: hosttoday/ht-docker-node:npmci +# gitzone ci_default +image: registry.gitlab.com/hosttoday/ht-docker-node:npmci cache: paths: - - .npmci_cache/ - key: "$CI_BUILD_STAGE" + - .npmci_cache/ + key: '$CI_BUILD_STAGE' stages: -- security -- test -- release -- metadata + - security + - test + - release + - metadata # ==================== # security stage @@ -18,10 +18,11 @@ stages: mirror: stage: security script: - - npmci git mirror + - npmci git mirror tags: - - docker - - notpriv + - lossless + - docker + - notpriv snyk: stage: security @@ -31,89 +32,89 @@ snyk: - npmci command npm install --ignore-scripts - npmci command snyk test tags: - - docker - - notpriv + - lossless + - docker + - notpriv # ==================== # test stage # ==================== -testLTS: +testStable: stage: test script: - - npmci npm prepare - - npmci node install lts - - npmci npm install - - npmci npm test + - npmci npm prepare + - npmci node install stable + - npmci npm install + - npmci npm test coverage: /\d+.?\d+?\%\s*coverage/ tags: - - docker - - notpriv - -testSTABLE: + - lossless + - docker + - priv + +testBuild: stage: test script: - - npmci npm prepare - - npmci node install stable - - npmci npm install - - npmci npm test + - npmci npm prepare + - npmci node install stable + - npmci npm install + - npmci command npm run build coverage: /\d+.?\d+?\%\s*coverage/ tags: - - docker - - notpriv + - lossless + - docker + - notpriv release: stage: release script: - - npmci node install stable - - npmci npm publish + - npmci node install stable + - npmci npm publish only: - - tags + - tags tags: - - docker - - notpriv + - lossless + - docker + - notpriv # ==================== # metadata stage # ==================== 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] + - npmci command npm install -g tslint typescript + - npmci npm prepare + - npmci npm install + - npmci command "tslint -c tslint.json ./ts/**/*.ts" tags: - - docker - - priv + - lossless + - docker + - priv trigger: stage: metadata script: - - npmci trigger + - npmci trigger only: - - tags + - tags tags: - - docker - - notpriv + - lossless + - docker + - notpriv pages: - image: hosttoday/ht-docker-node:npmci stage: metadata script: + - npmci node install lts - npmci command npm install -g @gitzone/tsdoc - npmci npm prepare - npmci npm install - npmci command tsdoc tags: + - lossless - docker - notpriv only: @@ -121,5 +122,5 @@ pages: artifacts: expire_in: 1 week paths: - - public + - public allow_failure: true diff --git a/package.json b/package.json index 2319844..0a480d4 100644 --- a/package.json +++ b/package.json @@ -26,13 +26,14 @@ "puppeteer": "^2.0.0" }, "files": [ - "ts/*", - "ts_web/*", - "dist/*", - "dist_web/*", - "assets/*", + "ts/**/*", + "ts_web/**/*", + "dist/**/*", + "dist_web/**/*", + "dist_ts_web/**/*", + "assets/**/*", "cli.js", "npmextra.json", "readme.md" ] -} +} \ No newline at end of file diff --git a/readme.md b/readme.md index 8d16fec..eaa7ce4 100644 --- a/readme.md +++ b/readme.md @@ -18,9 +18,18 @@ simplified access to puppeteer ## Usage +## Contribution + +We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :) + + +## Contribution + +We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :) + For further information read the linked docs at the top of this readme. > MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) -| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) +| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) -[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com) +[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com) diff --git a/ts/index.ts b/ts/index.ts index 8fddbe5..5f86ff5 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -5,5 +5,3 @@ export * from './smartpuppeteer.classes.smartpuppeteer'; // direct exports import { puppeteer } from './smartpuppeteer.plugins'; export { puppeteer }; - - diff --git a/ts/smartpuppeteer.classes.smartpuppeteer.ts b/ts/smartpuppeteer.classes.smartpuppeteer.ts index f71f547..4a9294d 100644 --- a/ts/smartpuppeteer.classes.smartpuppeteer.ts +++ b/ts/smartpuppeteer.classes.smartpuppeteer.ts @@ -32,7 +32,9 @@ export const getEnvAwareBrowserInstance = async ( }); } else { console.log('Detected WSL. Using chromium.'); - headlessBrowser = await plugins.puppeteer.launch({executablePath: '/usr/bin/chromium-browser'}); + headlessBrowser = await plugins.puppeteer.launch({ + executablePath: '/usr/bin/chromium-browser' + }); } return headlessBrowser; diff --git a/ts/smartpuppeteer.plugins.ts b/ts/smartpuppeteer.plugins.ts index c6ca3bd..3225936 100644 --- a/ts/smartpuppeteer.plugins.ts +++ b/ts/smartpuppeteer.plugins.ts @@ -1,13 +1,9 @@ // @pushrocks scope import * as smartenv from '@pushrocks/smartenv'; -export { - smartenv -}; +export { smartenv }; // third party scope import puppeteer from 'puppeteer'; -export { - puppeteer -} \ No newline at end of file +export { puppeteer };