From b90092c04363e23765e28093634ff088977640ff Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 4 Jan 2019 23:30:37 +0100 Subject: [PATCH] fix(core): update --- .gitlab-ci.yml | 50 +++++++++++++++++++++++++++++--------------------- package.json | 4 ++-- tslint.json | 16 +++++++++++++++- 3 files changed, 46 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1d614e..0dfb491 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,7 @@ mirror: snyk: stage: security script: + - npmci npm prepare - npmci command npm install -g snyk - npmci command npm install --ignore-scripts - npmci command snyk test @@ -33,24 +34,39 @@ snyk: - docker - notpriv +sast: + stage: security + image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci + variables: + DOCKER_DRIVER: overlay2 + allow_failure: true + services: + - docker:stable-dind + script: + - npmci npm prepare + - npmci npm install + - npmci command npm run build + - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') + - docker run + --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" + --volume "$PWD:/code" + --volume /var/run/docker.sock:/var/run/docker.sock + "registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code + artifacts: + reports: + sast: gl-sast-report.json + tags: + - docker + - priv + # ==================== # test stage # ==================== -testLEGACY: - stage: test - script: - - npmci node install legacy - - npmci npm install - - npmci npm test - coverage: /\d+.?\d+?\%\s*coverage/ - tags: - - docker - - notpriv - allow_failure: true testLTS: stage: test script: + - npmci npm prepare - npmci node install lts - npmci npm install - npmci npm test @@ -62,6 +78,7 @@ testLTS: testSTABLE: stage: test script: + - npmci npm prepare - npmci node install stable - npmci npm install - npmci npm test @@ -118,6 +135,7 @@ pages: stage: metadata script: - npmci command npm install -g typedoc typescript + - npmci npm prepare - npmci npm install - npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/ tags: @@ -130,13 +148,3 @@ pages: paths: - public allow_failure: true - -windowsCompatibility: - image: stefanscherer/node-windows:10-build-tools - stage: metadata - script: - - npm install & npm test - coverage: /\d+.?\d+?\%\s*coverage/ - tags: - - windows - allow_failure: true diff --git a/package.json b/package.json index 6f757e0..30e621e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "typings": "dist/index.d.ts", "scripts": { "test": "(tstest test/)", - "build": "echo \"Not needed for now\"" + "build": "(tsbuild)" }, "repository": { "type": "git", @@ -39,4 +39,4 @@ "qenv": "^1.1.7", "tapbundle": "^2.0.2" } -} +} \ No newline at end of file diff --git a/tslint.json b/tslint.json index 45052ad..d4ea2e9 100644 --- a/tslint.json +++ b/tslint.json @@ -1,3 +1,17 @@ { - "extends": "tslint-config-standard" + "extends": ["tslint:latest", "tslint-config-prettier"], + "rules": { + "semicolon": [true, "always"], + "no-console": false, + "ordered-imports": false, + "object-literal-sort-keys": false, + "member-ordering": { + "options":{ + "order": [ + "static-method" + ] + } + } + }, + "defaultSeverity": "warning" }