fix(core): update

This commit is contained in:
Philipp Kunz 2019-01-30 02:37:55 +01:00
parent f47ea7def8
commit e28c1c73ea
5 changed files with 752 additions and 226 deletions

View File

@ -26,6 +26,7 @@ mirror:
snyk: snyk:
stage: security stage: security
script: script:
- npmci npm prepare
- npmci command npm install -g snyk - npmci command npm install -g snyk
- npmci command npm install --ignore-scripts - npmci command npm install --ignore-scripts
- npmci command snyk test - npmci command snyk test
@ -33,24 +34,39 @@ snyk:
- docker - docker
- notpriv - 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 # 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: testLTS:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install lts - npmci node install lts
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -62,6 +78,7 @@ testLTS:
testSTABLE: testSTABLE:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -118,6 +135,7 @@ pages:
stage: metadata stage: metadata
script: script:
- npmci command npm install -g typedoc typescript - npmci command npm install -g typedoc typescript
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/ - npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
tags: tags:
@ -130,13 +148,3 @@ pages:
paths: paths:
- public - public
allow_failure: true 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

View File

@ -1,36 +1,38 @@
# nodehash # nodehash
simplifies access to node hash functions. TypeScript Ready simplifies access to node hash functions. TypeScript Ready
## Status ## Status
[![build status](https://gitlab.com/pushrocks/nodehash/badges/master/build.svg)](https://gitlab.com/pushrocks/nodehash/commits/master) [![build status](https://gitlab.com/pushrocks/nodehash/badges/master/build.svg)](https://gitlab.com/pushrocks/nodehash/commits/master)
## Usage ## Usage
We recommend the use of TypeScript for best in class intellisense. We recommend the use of TypeScript for best in class intellisense.
```typescript ```typescript
import * as nodehash from "nodehash"; import * as nodehash from "nodehash";
// from stream // from stream
let readStream = fs.createReadStream("./somefile.txt") let readStream = fs.createReadStream("./somefile.txt")
nodehash.sha256FromStream(readStream) nodehash.sha256FromStream(readStream)
.then((resultString){ .then((resultString){
console.log(resultString); // prints hash of the file console.log(resultString); // prints hash of the file
}); });
// from file // from file
nodehash.sha256FromFile("./somefile.txt") nodehash.sha256FromFile("./somefile.txt")
.then((resultString){ .then((resultString){
console.log(resultString); // prints hash of the file console.log(resultString); // prints hash of the file
}); });
// from string // from string
nodehash.sha256FromString("some weird random string") nodehash.sha256FromString("some weird random string")
.then((resultString){ .then((resultString){
console.log(resultString); // prints hash of the file console.log(resultString); // prints hash of the file
}); });
let hashString = nodehash.sha256FromStringSync("some weird random string"); let hashString = nodehash.sha256FromStringSync("some weird random string");
``` ```
For further information read the linked docs at the top of this readme.

823
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,15 +27,15 @@
}, },
"homepage": "https://github.com/pushrocks/nodehash#readme", "homepage": "https://github.com/pushrocks/nodehash#readme",
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.1.8",
"@gitzone/tsrun": "^1.1.12", "@gitzone/tsrun": "^1.1.17",
"@gitzone/tstest": "^1.0.15", "@gitzone/tstest": "^1.0.18",
"@pushrocks/tapbundle": "^3.0.7", "@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^10.9.4" "@types/node": "^10.12.19"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smartpromise": "^2.0.5", "@pushrocks/smartpromise": "^2.0.5",
"@types/through2": "^2.0.33", "@types/through2": "^2.0.34",
"through2": "^2.0.3" "through2": "^3.0.0"
} }
} }

17
tslint.json Normal file
View File

@ -0,0 +1,17 @@
{
"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"
}