fix(core): update

This commit is contained in:
Philipp Kunz 2020-02-07 13:04:11 +00:00
parent 0eabdcde28
commit 1c3619040c
9 changed files with 586 additions and 346 deletions

View File

@ -1,18 +1,16 @@
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
variables:
GIT_STRATEGY: clone
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
@ -20,21 +18,23 @@ stages:
mirror:
stage: security
script:
- npmci git mirror
- npmci git mirror
tags:
- docker
- notpriv
- lossless
- docker
- notpriv
snyk:
image: registry.gitlab.com/hosttoday/ht-docker-node:snyk
stage: security
script:
- npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
tags:
- docker
- notpriv
- lossless
- docker
- notpriv
# ====================
# test stage
@ -43,37 +43,40 @@ snyk:
testStable:
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 npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- priv
- lossless
- docker
- priv
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install lts
- npmci npm install
- npmci command npm run build
- 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 lts
- npmci npm publish
- npmci node install stable
- npmci npm publish
only:
- tags
- tags
tags:
- docker
- notpriv
- lossless
- docker
- notpriv
# ====================
# metadata stage
@ -83,33 +86,35 @@ codequality:
allow_failure: true
script:
- 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-dbase:npmci
services:
- docker:18-dind
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:
@ -117,5 +122,5 @@ pages:
artifacts:
expire_in: 1 week
paths:
- public
- public
allow_failure: true

26
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
"json.schemas": [
{
"fileMatch": ["/npmextra.json"],
"schema": {
"type": "object",
"properties": {
"npmci": {
"type": "object",
"description": "settings for npmci"
},
"gitzone": {
"type": "object",
"description": "settings for gitzone",
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm"]
}
}
}
}
}
}
]
}

View File

@ -1,5 +1,6 @@
{
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",

740
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,30 +15,30 @@
"devDependencies": {
"@gitzone/tsbuild": "^2.1.17",
"@gitzone/tstest": "^1.0.28",
"@pushrocks/tapbundle": "^3.0.13",
"@types/node": "^12.12.5",
"tslint": "^5.20.0",
"@pushrocks/tapbundle": "^3.2.0",
"@types/node": "^13.7.0",
"tslint": "^6.0.0",
"tslint-config-prettier": "^1.15.0"
},
"dependencies": {
"@pushrocks/lik": "^3.0.11",
"@pushrocks/smartnetwork": "^1.1.14",
"@pushrocks/lik": "^3.0.16",
"@pushrocks/smartnetwork": "^1.1.18",
"@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartrequest": "^1.1.42",
"@pushrocks/smartrequest": "^1.1.47",
"@pushrocks/smartspawn": "^2.0.9",
"@pushrocks/smartstring": "^3.0.14",
"@pushrocks/smartstring": "^3.0.18",
"@pushrocks/smartsystem": "^2.0.9",
"@tsclass/tsclass": "^2.0.13",
"@types/ws": "^6.0.3",
"ws": "^7.2.0"
"@tsclass/tsclass": "^3.0.3",
"@types/ws": "^7.2.1",
"ws": "^7.2.1"
},
"files": [
"ts/*",
"ts_web/*",
"dist/*",
"dist_web/*",
"dist_ts_web/*",
"assets/*",
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_web/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"

View File

@ -8,7 +8,7 @@ a proxy for handling high workloads of proxying
* [docs (typedoc)](https://pushrocks.gitlab.io/smartproxy/)
## Status for master
[![build status](https://gitlab.com/pushrocks/smartproxy/badges/master/build.svg)](https://gitlab.com/pushrocks/smartproxy/commits/master)
[![pipeline status](https://gitlab.com/pushrocks/smartproxy/badges/master/pipeline.svg)](https://gitlab.com/pushrocks/smartproxy/commits/master)
[![coverage report](https://gitlab.com/pushrocks/smartproxy/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartproxy/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartproxy.svg)](https://www.npmjs.com/package/@pushrocks/smartproxy)
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartproxy/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartproxy)
@ -18,6 +18,11 @@ a proxy for handling high workloads of proxying
## 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). :)
For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)

View File

@ -12,11 +12,12 @@ tap.test('should start the testproxy', async () => {
});
tap.test('should supply reverse proxy config', async () => {
testProxy.updateReversConfigs([{
destinationIp: 'localhost',
destinationPort: '3000',
hostName: 'push.rocks',
privateKey: `-----BEGIN PRIVATE KEY-----
testProxy.updateReversConfigs([
{
destinationIp: 'localhost',
destinationPort: '3000',
hostName: 'push.rocks',
privateKey: `-----BEGIN PRIVATE KEY-----
MIIJRQIBADANBgkqhkiG9w0BAQEFAASCCS8wggkrAgEAAoICAQDi2F/0kQr96mhe
3yEWvy2mRHOZoSSBtIqg6Bre4ZcMu901/cHNIjFnynNGFl9Se61yZbW2F3PfCt7+
kQlHug1Cx+LFssvz+hLlB5cqJQZfRKx92DhbROygtxG9r7UBmx/fwx+JQ+HOHX9R
@ -69,7 +70,7 @@ h+7fBVO49PLL0NWy+8GT8y7a04calFfLvZEA2UMaunBis3dE1KMFfJL/0JO+sKnF
2TkK01XDDJURK5Lhuvc7WrK2rSJ/fK+0GA==
-----END PRIVATE KEY-----
`,
publicKey: `-----BEGIN CERTIFICATE-----
publicKey: `-----BEGIN CERTIFICATE-----
MIIEljCCAn4CCQDY+ZbC9FASVjANBgkqhkiG9w0BAQsFADANMQswCQYDVQQGEwJE
RTAeFw0xOTA5MjAxNjAxNDRaFw0yMDA5MTkxNjAxNDRaMA0xCzAJBgNVBAYTAkRF
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4thf9JEK/epoXt8hFr8t
@ -97,7 +98,8 @@ r8d9QwrK+WaqVi2ofbMfMByVF72jgeJNa4nxwT9bVbu/Q1T2Lt+YPb4pQ7yCoUgS
JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
-----END CERTIFICATE-----
`
}]);
}
]);
});
tap.test('should wait for 60 seconds', async tools => {

View File

@ -228,7 +228,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
});
this.httpsServer.listen(this.port);
console.log(`OK: now listening for new connections on port ${this.port}`);
console.log(`ProxyWorker -> OK: now listening for new connections on port ${this.port}`);
}
public async updateProxyConfigs(proxyConfigsArg: plugins.tsclass.IReverseProxyConfig[]) {

View File

@ -6,15 +6,16 @@ let netServer: plugins.net.Server;
const portProxyCalls = {
start: async (portArg = 8000) => {
netServer = net
.createServer(from => {
const to = net.createConnection({
host: 'localhost',
port: 8001
});
from.pipe(to);
to.pipe(from);
})
.listen(portArg);
.createServer(from => {
const to = net.createConnection({
host: 'localhost',
port: 8001
});
from.pipe(to);
to.pipe(from);
})
.listen(portArg);
console.log(`PortProxy -> OK: Now listening on port ${portArg}`);
},
stop: async () => {
const done = plugins.smartpromise.defer();