fix(core): update

This commit is contained in:
Philipp Kunz 2019-01-15 00:17:44 +01:00
parent 1152bb1138
commit e3f37f5027
8 changed files with 929 additions and 423 deletions

View File

@ -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

1249
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,18 +27,20 @@
},
"homepage": "https://gitlab.com/pushrocks/taskbuffer#readme",
"dependencies": {
"@pushrocks/lik": "^3.0.1",
"@pushrocks/smartdelay": "^2.0.1",
"@pushrocks/smartlog": "^2.0.1",
"@pushrocks/lik": "^3.0.4",
"@pushrocks/smartdelay": "^2.0.2",
"@pushrocks/smartlog": "^2.0.9",
"@pushrocks/smartpromise": "^2.0.5",
"@types/cron": "^1.3.0",
"cron": "^1.3.0",
"rxjs": "^6.2.2"
"cron": "^1.6.0",
"rxjs": "^6.3.3"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.0.22",
"@gitzone/tstest": "^1.0.11",
"@pushrocks/tapbundle": "^3.0.1",
"@types/node": "^10.5.6"
"@gitzone/tsbuild": "^2.1.4",
"@gitzone/tstest": "^1.0.18",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^10.12.18",
"tslint": "^5.12.1",
"tslint-config-prettier": "^1.17.0"
}
}

View File

@ -8,11 +8,8 @@ import * as smartdelay from '@pushrocks/smartdelay';
let testTask: taskbuffer.Task;
let testPreTask = new taskbuffer.Task({
taskFunction: function() {
let done = smartpromise.defer();
taskFunction: async () => {
console.log('preTask executed');
done.resolve();
return done.promise;
},
preTask: testTask
});
@ -35,14 +32,14 @@ let task1 = new taskbuffer.Task({
let task2 = new taskbuffer.Task({
name: 'Task 1',
taskFunction: () => {
let done = smartpromise.defer();
taskFunction: async () => {
const done = smartpromise.defer();
console.log('Task2 started');
setTimeout(() => {
console.log('Task2 executed');
done.resolve();
}, 5000);
return done.promise;
await done.promise;
}
});

View File

@ -1,7 +1,7 @@
import { expect, tap } from '@pushrocks/tapbundle';
import taskbuffer = require('../ts/index');
import * as smartq from 'smartq';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartdelay from '@pushrocks/smartdelay';
let task1Executed = false;

View File

@ -100,7 +100,7 @@ export class Task {
if (stateArg === 'locked') {
this._state = 'locked';
} else {
plugins.smartlog.defaultLogger.error('state type ' + stateArg + ' could not be set');
plugins.smartlog.defaultLogger.log('error', 'state type ' + stateArg + ' could not be set');
}
}
}

View File

@ -29,7 +29,7 @@ export class Taskchain extends Task {
if (typeof this.taskArray[taskCounter] !== 'undefined') {
console.log(this.name + ' running: Task' + this.taskArray[taskCounter].name);
this.taskArray[taskCounter].trigger(x).then(x => {
plugins.smartlog.defaultLogger.info(this.taskArray[taskCounter].name);
plugins.smartlog.defaultLogger.log('info', this.taskArray[taskCounter].name);
taskCounter++;
iterateTasks(x);
});

View File

@ -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"
}