fix(core): update
This commit is contained in:
parent
57b37cb327
commit
ac2a1559b0
@ -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
|
||||
@ -117,8 +134,10 @@ pages:
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci command npm install -g npmpage
|
||||
- npmci command npmpage
|
||||
- npmci command npm install -g typedoc typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
@ -128,3 +147,4 @@ pages:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
||||
allow_failure: true
|
||||
|
@ -1,4 +1,15 @@
|
||||
{
|
||||
"gitzone": {
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"gitrepo": "smartuniverse",
|
||||
"shortDescription": "messaging service for micro services",
|
||||
"npmPackagename": "@pushrocks/smartuniverse",
|
||||
"license": "MIT",
|
||||
"projectDomain": "push.rocks"
|
||||
}
|
||||
},
|
||||
"npmci": {
|
||||
"npmGlobalTools": [
|
||||
"@gitzone/npmts",
|
||||
|
1279
package-lock.json
generated
1279
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@pushrocks/smartuniverse",
|
||||
"version": "1.0.24",
|
||||
"private": true,
|
||||
"private": false,
|
||||
"description": "messaging service for your micro services",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
@ -13,8 +13,12 @@
|
||||
"format": "(gitzone format)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.8",
|
||||
"@gitzone/tstest": "^1.0.18",
|
||||
"@pushrocks/tapbundle": "^3.0.7",
|
||||
"@types/node": "^10.12.19"
|
||||
"@types/node": "^10.12.20",
|
||||
"tslint": "^5.12.1",
|
||||
"tslint-config-prettier": "^1.17.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rxjs": "*"
|
||||
@ -26,9 +30,9 @@
|
||||
"@pushrocks/smartfile": "^6.0.12",
|
||||
"@pushrocks/smarthash": "^2.0.4",
|
||||
"@pushrocks/smartpromise": "^2.0.5",
|
||||
"@pushrocks/smartrequest": "^1.0.8",
|
||||
"@pushrocks/smartrequest": "^1.1.14",
|
||||
"@pushrocks/smartrx": "^2.0.3",
|
||||
"@pushrocks/smartsocket": "^1.1.24",
|
||||
"@pushrocks/smartsocket": "^1.1.27",
|
||||
"@pushrocks/smarttime": "^3.0.5"
|
||||
}
|
||||
}
|
35
readme.md
35
readme.md
@ -1,33 +1,28 @@
|
||||
# smartuniverse
|
||||
# @pushrocks/smartuniverse
|
||||
messaging service for micro services
|
||||
|
||||
messaging service for your micro services
|
||||
|
||||
## Availabililty
|
||||
|
||||
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/@pushrocks/smartuniverse)
|
||||
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartuniverse)
|
||||
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartuniverse)
|
||||
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartuniverse/)
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartuniverse)
|
||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartuniverse)
|
||||
* [github.com (source mirror)](https://github.com/pushrocks/smartuniverse)
|
||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartuniverse/)
|
||||
|
||||
## Status for master
|
||||
|
||||
[![build status](https://GitLab.com/pushrocks/smartuniverse/badges/master/build.svg)](https://GitLab.com/pushrocks/smartuniverse/commits/master)
|
||||
[![coverage report](https://GitLab.com/pushrocks/smartuniverse/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartuniverse/commits/master)
|
||||
[![build status](https://gitlab.com/pushrocks/smartuniverse/badges/master/build.svg)](https://gitlab.com/pushrocks/smartuniverse/commits/master)
|
||||
[![coverage report](https://gitlab.com/pushrocks/smartuniverse/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartuniverse/commits/master)
|
||||
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartuniverse.svg)](https://www.npmjs.com/package/@pushrocks/smartuniverse)
|
||||
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/smartuniverse/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/smartuniverse/master/dependencies/npm)
|
||||
[![bitHound Code](https://www.bithound.io/github/pushrocks/smartuniverse/badges/code.svg)](https://www.bithound.io/github/pushrocks/smartuniverse)
|
||||
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartuniverse/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartuniverse)
|
||||
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class instellisense.
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
|
||||
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
|
||||
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)
|
||||
|
@ -1,5 +1,5 @@
|
||||
// tslint:disable-next-line:no-implicit-dependencies
|
||||
import { expect, tap } from 'tapbundle';
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartuniverse from '../ts/index';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
@ -1,8 +1,8 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Objectmap } from 'lik';
|
||||
import { Objectmap } from '@pushrocks/lik';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Smartsocket, SmartsocketClient } from 'smartsocket';
|
||||
import { Smartsocket, SmartsocketClient } from '@pushrocks/smartsocket';
|
||||
import * as url from 'url';
|
||||
|
||||
import {
|
||||
@ -37,7 +37,7 @@ export class ClientUniverse {
|
||||
payload: payloadArg
|
||||
};
|
||||
// TODO: User websocket connection if available
|
||||
await plugins.smartrequest.post(this.options.serverAddress, {
|
||||
await plugins.smartrequest.postJson(this.options.serverAddress, {
|
||||
requestBody
|
||||
});
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Handler, Route, Server } from 'smartexpress';
|
||||
import { Handler, Route, Server } from '@pushrocks/smartexpress';
|
||||
import { UniverseCache, UniverseChannel, UniverseMessage } from './';
|
||||
|
||||
import * as paths from './smartuniverse.paths';
|
||||
@ -69,7 +69,9 @@ export class Universe {
|
||||
public async initServer(portArg: number | string) {
|
||||
this.smartexpressServer = new plugins.smartexpress.Server({
|
||||
cors: true,
|
||||
defaultAnswer: `smartuniverse server ${this.universeVersion}`,
|
||||
defaultAnswer: async () => {
|
||||
return `smartuniverse server ${this.universeVersion}`;
|
||||
},
|
||||
forceSsl: false,
|
||||
port: portArg
|
||||
});
|
||||
|
@ -3,10 +3,11 @@ import * as plugins from './smartuniverse.plugins';
|
||||
import { UniverseChannel } from './smartuniverse.classes.universechannel';
|
||||
import { UniverseMessage } from './smartuniverse.classes.universemessage';
|
||||
|
||||
import { Objectmap } from 'lik';
|
||||
import { Objectmap } from '@pushrocks/lik';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { rxjs } from 'smartrx';
|
||||
import { Observable, from } from 'rxjs';
|
||||
import { filter } from 'rxjs/operators';
|
||||
import { rxjs } from '@pushrocks/smartrx';
|
||||
|
||||
/**
|
||||
* universe store handles the creation, storage and retrieval of messages.
|
||||
@ -52,10 +53,10 @@ export class UniverseCache {
|
||||
* Read a message from the UniverseStore
|
||||
*/
|
||||
public readMessagesYoungerThan(unixTimeArg?: number): Observable<UniverseMessage> {
|
||||
const messageObservable = rxjs.Observable.from(this.messageMap.getArray()).filter(
|
||||
messageArg => {
|
||||
const messageObservable = from(this.messageMap.getArray()).pipe(
|
||||
filter(messageArg => {
|
||||
return messageArg.timestamp.isYoungerThanMilliSeconds(this.destructionTime);
|
||||
}
|
||||
})
|
||||
);
|
||||
return messageObservable;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Objectmap } from 'lik';
|
||||
import { Objectmap } from '@pushrocks/lik';
|
||||
import { UniverseCache } from './smartuniverse.classes.universecache';
|
||||
import { UniverseMessage } from './smartuniverse.classes.universemessage';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Objectmap } from 'lik';
|
||||
import { Objectmap } from '@pushrocks/lik';
|
||||
|
||||
import { Timer, TimeStamp } from 'smarttime';
|
||||
import { Timer, TimeStamp } from '@pushrocks/smarttime';
|
||||
import { Universe } from './smartuniverse.classes.universe';
|
||||
import { UniverseChannel } from './smartuniverse.classes.universechannel';
|
||||
import { UniverseCache } from './smartuniverse.classes.universecache';
|
||||
|
@ -1,23 +1,27 @@
|
||||
import * as lik from 'lik';
|
||||
import * as nodehash from 'nodehash';
|
||||
// node native
|
||||
import * as path from 'path';
|
||||
import * as smartdelay from 'smartdelay';
|
||||
import * as smartexpress from 'smartexpress';
|
||||
import * as smartfile from 'smartfile';
|
||||
import * as smartq from 'smartq';
|
||||
import * as smartrequest from 'smartrequest';
|
||||
import * as smartrx from 'smartrx';
|
||||
import * as smartsocket from 'smartsocket';
|
||||
import * as smarttime from 'smarttime';
|
||||
|
||||
export { path };
|
||||
|
||||
// pushrocks scope
|
||||
import * as lik from '@pushrocks/lik';
|
||||
import * as smarthash from '@pushrocks/smarthash';
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as smartexpress from '@pushrocks/smartexpress';
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartrequest from '@pushrocks/smartrequest';
|
||||
import * as smartrx from '@pushrocks/smartrx';
|
||||
import * as smartsocket from '@pushrocks/smartsocket';
|
||||
import * as smarttime from '@pushrocks/smarttime';
|
||||
|
||||
export {
|
||||
lik,
|
||||
nodehash,
|
||||
path,
|
||||
smarthash,
|
||||
smartdelay,
|
||||
smartexpress,
|
||||
smartfile,
|
||||
smartq,
|
||||
smartpromise,
|
||||
smartrx,
|
||||
smartrequest,
|
||||
smartsocket,
|
||||
|
13
tslint.json
13
tslint.json
@ -1,6 +1,17 @@
|
||||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"]
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user