Compare commits
50 Commits
Author | SHA1 | Date | |
---|---|---|---|
c2052f16a8 | |||
ff7cdc908c | |||
f3d41b8719 | |||
f9f0fc45e2 | |||
da6b7724b8 | |||
be7ca29e4b | |||
f401d78c4b | |||
6ceec0201f | |||
16ce4e09a9 | |||
2868ab686d | |||
5dab36382f | |||
02a32eb8c7 | |||
b258979b5a | |||
166e29bbf6 | |||
870f37d403 | |||
64c4b91678 | |||
f3e13292d8 | |||
7e1c405cb1 | |||
d1b4672eff | |||
0dd9fee52b | |||
37e1ee7970 | |||
bd0bb3acf5 | |||
f60497474e | |||
1d84cefa84 | |||
6792acd533 | |||
9397d89cf5 | |||
37cf4a91f4 | |||
52db86c929 | |||
e8f09c1b7a | |||
79edea873f | |||
97666a623d | |||
ef61ea9ad7 | |||
9c1504ef02 | |||
e8f2e04d1c | |||
e12aa7e961 | |||
857b7cd010 | |||
e100dea160 | |||
e8e87fcdba | |||
0d18b11721 | |||
eaaefddbe3 | |||
8c6946ddb6 | |||
3a7ebcdd80 | |||
ec2afbfd55 | |||
89feeca735 | |||
c4261765ec | |||
33fe6bcd41 | |||
1baf1c318c | |||
051aba3299 | |||
7998d79b13 | |||
6838a8729a |
@ -38,17 +38,17 @@ snyk:
|
|||||||
# test stage
|
# test stage
|
||||||
# ====================
|
# ====================
|
||||||
|
|
||||||
testLTS:
|
testStable:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci node install lts
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- priv
|
||||||
|
|
||||||
testBuild:
|
testBuild:
|
||||||
stage: test
|
stage: test
|
||||||
@ -100,7 +100,7 @@ trigger:
|
|||||||
pages:
|
pages:
|
||||||
image: hosttoday/ht-docker-dbase:npmci
|
image: hosttoday/ht-docker-dbase:npmci
|
||||||
services:
|
services:
|
||||||
- docker:18-dind
|
- docker:stable-dind
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g @gitzone/tsdoc
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
|
421
package-lock.json
generated
421
package-lock.json
generated
@ -1,18 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartuniverse",
|
"name": "@pushrocks/smartuniverse",
|
||||||
"version": "1.0.55",
|
"version": "1.0.80",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@airbnb/node-memwatch": {
|
"@apiglobal/typedrequest-interfaces": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.7",
|
||||||
"resolved": "https://verdaccio.lossless.one/@airbnb%2fnode-memwatch/-/node-memwatch-1.0.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.7.tgz",
|
||||||
"integrity": "sha512-2R+MEEMSTUdKwQ6NFWkyA/UNoSjL1tMldZqJbZpgXSwNMBzlNlkUWEXKu9RqTTMkDqJRfGJ2VDs8gPlPK2APDQ==",
|
"integrity": "sha512-yPl0UcLFMwSQL7bK52wVjkgvadC+x2YS3+7T15V1A1dXNxa96yd4WX1fqcKqwnBrvYexq/8FaxWGi98tZ0oNwg=="
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"bindings": "^1.3.0",
|
|
||||||
"nan": "^2.9.2"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"@babel/code-frame": {
|
"@babel/code-frame": {
|
||||||
"version": "7.5.5",
|
"version": "7.5.5",
|
||||||
@ -35,9 +30,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@gitzone/tsbuild": {
|
"@gitzone/tsbuild": {
|
||||||
"version": "2.1.11",
|
"version": "2.1.17",
|
||||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.11.tgz",
|
"resolved": "https://registry.npmjs.org/@gitzone/tsbuild/-/tsbuild-2.1.17.tgz",
|
||||||
"integrity": "sha512-Sa90/S7rkfFaTa2yeASHVAWIl3hNh9DBqVcQbOCaNhqKUGdD+NzPw1MESuMOXqKG7oM5i4Cu6qfcJB0fmAjS8g==",
|
"integrity": "sha512-Mg2cu7cW3cC6L2tzatB8t6OMVgTGatobb8UkN+y3n7KAWRld4gXcVWmaehch/wSFrbmk6Oe8rPjdWPjhTSIF1Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartcli": "^3.0.7",
|
"@pushrocks/smartcli": "^3.0.7",
|
||||||
@ -45,7 +40,15 @@
|
|||||||
"@pushrocks/smartlog": "^2.0.19",
|
"@pushrocks/smartlog": "^2.0.19",
|
||||||
"@pushrocks/smartpath": "^4.0.1",
|
"@pushrocks/smartpath": "^4.0.1",
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"typescript": "^3.4.5"
|
"typescript": "^3.5.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"typescript": {
|
||||||
|
"version": "3.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.2.tgz",
|
||||||
|
"integrity": "sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@gitzone/tsrun": {
|
"@gitzone/tsrun": {
|
||||||
@ -104,24 +107,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/lik": {
|
"@pushrocks/lik": {
|
||||||
"version": "3.0.5",
|
"version": "3.0.11",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-3.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/lik/-/lik-3.0.11.tgz",
|
||||||
"integrity": "sha512-pc5Nq0WUysS34qPpyiZXiX254kL3vyRVbt3D36Q5QU+eHhxAThHofSzgOdyVHUZU2WFoaMlKowIVsyUFzIkfdw==",
|
"integrity": "sha512-SDKRPj9+xBTqozlDPcA7O6BcccM1Tw/sXPVP+OnhNxCubDZ/L2kGNpPpqm43NJUoNxSSo5wdBw4N7MAFYCGdVg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartdelay": "^2.0.2",
|
"@pushrocks/smartdelay": "^2.0.3",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/smartrx": "^2.0.3",
|
"@pushrocks/smartrx": "^2.0.3",
|
||||||
"@pushrocks/smarttime": "^3.0.5",
|
"@pushrocks/smarttime": "^3.0.12",
|
||||||
"@types/minimatch": "^3.0.3",
|
"@types/minimatch": "^3.0.3",
|
||||||
"minimatch": "^3.0.4",
|
"minimatch": "^3.0.4",
|
||||||
"symbol-tree": "^3.2.2"
|
"symbol-tree": "^3.2.4"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@pushrocks/smartpromise": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartcli": {
|
"@pushrocks/smartcli": {
|
||||||
@ -182,12 +178,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartexpress": {
|
"@pushrocks/smartexpress": {
|
||||||
"version": "3.0.35",
|
"version": "3.0.40",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexpress/-/smartexpress-3.0.35.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartexpress/-/smartexpress-3.0.40.tgz",
|
||||||
"integrity": "sha512-8DYFURxE+CXuh59O7SMRTLKaiWda/I1srcLE5Hka6YCLCahCKsT1HDVHcEVnY4E7kd9OaHEzuPa7ZddaISi5xQ==",
|
"integrity": "sha512-biAquO44yvrZ/elC3psUbYYoeZn647HjZXyQ14WL5IcXMgnKBo5+qvkqNgDmcHSKJ9KuVnycuRWa8vg6z77GSg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^3.0.5",
|
"@pushrocks/lik": "^3.0.10",
|
||||||
"@pushrocks/smartfile": "^7.0.2",
|
"@pushrocks/smartfile": "^7.0.4",
|
||||||
"@pushrocks/smartmanifest": "^1.0.6",
|
"@pushrocks/smartmanifest": "^1.0.6",
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/smartrequest": "^1.1.16",
|
"@pushrocks/smartrequest": "^1.1.16",
|
||||||
@ -199,9 +195,9 @@
|
|||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"express-force-ssl": "^0.3.2",
|
"express-force-ssl": "^0.3.2",
|
||||||
"helmet": "^3.18.0",
|
"helmet": "^3.20.0",
|
||||||
"rendertron-middleware": "^0.1.5",
|
"rendertron-middleware": "^0.1.5",
|
||||||
"sitemap": "^2.2.0"
|
"sitemap": "^3.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartfile": {
|
"@pushrocks/smartfile": {
|
||||||
@ -299,9 +295,9 @@
|
|||||||
"integrity": "sha512-jmrJMUEmBCWChWK8CIcx4Vw3wv/8OgVNmkaxJrbs+WMaoRUfJtpWWJfrAwwHWt9ZXJbarJ+CwfwfYiiZXymndQ=="
|
"integrity": "sha512-jmrJMUEmBCWChWK8CIcx4Vw3wv/8OgVNmkaxJrbs+WMaoRUfJtpWWJfrAwwHWt9ZXJbarJ+CwfwfYiiZXymndQ=="
|
||||||
},
|
},
|
||||||
"@pushrocks/smartrequest": {
|
"@pushrocks/smartrequest": {
|
||||||
"version": "1.1.16",
|
"version": "1.1.27",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrequest/-/smartrequest-1.1.16.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrequest/-/smartrequest-1.1.27.tgz",
|
||||||
"integrity": "sha512-3LbtqoqnjfzWSQ10NryhJmgwPpvMlVoYyTzE676+yC4hM2rnGSzxozLZxMr6enV4VeZcloQ0CqHBivKoT/kdvA==",
|
"integrity": "sha512-GJO6duKBro2oILtXduVQwxA50AzjHZbKP0P32OoiM+B1ftoQFf4D8zSs/SCljNKXUqS8SZ9IMQVlKLfRC4nu+A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@types/form-data": "^2.2.1",
|
"@types/form-data": "^2.2.1",
|
||||||
@ -309,20 +305,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartrx": {
|
"@pushrocks/smartrx": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.5",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.5.tgz",
|
||||||
"integrity": "sha512-OWxagu+CBdPaq76AIg91hJyrNhDTlEpesj01ooWCeVIaLY3G7yvFkqHsEKNOwPUG1LzCWmjq1l1dHQx9p2vJ9A==",
|
"integrity": "sha512-BOlIJmnCO8pxqu9f18D9UV5rIsyrmKeK/mWNMiAe/NH2OTeRPNLpgmhZBkXSKNVD8tSsD8aazs4BcACgYOg1FQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^3.0.2",
|
"@pushrocks/lik": "^3.0.11",
|
||||||
"@pushrocks/smartevent": "^2.0.3",
|
"@pushrocks/smartevent": "^2.0.3",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"rxjs": "^6.3.3"
|
"rxjs": "^6.5.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartpromise": {
|
"rxjs": {
|
||||||
"version": "2.0.5",
|
"version": "6.5.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.5.3.tgz",
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.9.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -340,22 +339,38 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartsocket": {
|
"@pushrocks/smartsocket": {
|
||||||
"version": "1.1.38",
|
"version": "1.1.49",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsocket/-/smartsocket-1.1.38.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsocket/-/smartsocket-1.1.49.tgz",
|
||||||
"integrity": "sha512-mGWEuA53GqTFOCebwo4Ayu2l7xjui7I0tdUNgZShGhIr4yv+q3sP/66q6cT388xVawIN+swviJPlPoogaoZXdA==",
|
"integrity": "sha512-jDcqVU9/cXTkLBY2N3epPUBKtRRkFINzK//CRxmBcuZx/k0s5oeNM1tOI7aiP5p5arrybU/YksSQil1QKz24Gg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^3.0.5",
|
"@apiglobal/typedrequest-interfaces": "^1.0.7",
|
||||||
|
"@pushrocks/lik": "^3.0.11",
|
||||||
"@pushrocks/smartdelay": "^2.0.3",
|
"@pushrocks/smartdelay": "^2.0.3",
|
||||||
"@pushrocks/smartexpress": "^3.0.21",
|
"@pushrocks/smartexpress": "^3.0.40",
|
||||||
"@pushrocks/smarthash": "^2.0.4",
|
"@pushrocks/smarthash": "^2.0.6",
|
||||||
"@pushrocks/smartlog": "^2.0.19",
|
"@pushrocks/smartlog": "^2.0.19",
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@types/shortid": "0.0.29",
|
"@types/shortid": "0.0.29",
|
||||||
"@types/socket.io": "^2.1.2",
|
"@types/socket.io": "^2.1.2",
|
||||||
"@types/socket.io-client": "^1.4.32",
|
"@types/socket.io-client": "^1.4.32",
|
||||||
"shortid": "^2.2.14",
|
"shortid": "^2.2.15",
|
||||||
"socket.io": "^2.2.0",
|
"socket.io": "^2.2.0",
|
||||||
"socket.io-client": "^2.2.0"
|
"socket.io-client": "^2.2.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"nanoid": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/nanoid/-/nanoid-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-g5WwS+p6Cm+zQhO2YOpRbQThZVnNb7DDq74h8YDCLfAGynrEOrbx2E16dc8ciENiP1va5sqaAruqn2sN+xpkWg=="
|
||||||
|
},
|
||||||
|
"shortid": {
|
||||||
|
"version": "2.2.15",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/shortid/-/shortid-2.2.15.tgz",
|
||||||
|
"integrity": "sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==",
|
||||||
|
"requires": {
|
||||||
|
"nanoid": "^2.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smarttime": {
|
"@pushrocks/smarttime": {
|
||||||
@ -382,46 +397,45 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/tapbundle": {
|
"@pushrocks/tapbundle": {
|
||||||
"version": "3.0.11",
|
"version": "3.0.13",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/tapbundle/-/tapbundle-3.0.13.tgz",
|
||||||
"integrity": "sha512-s7epZfJZX+LsBVmIYvoaY4WtgPvRLnHZMVTpQAPJGMBqxJAQxhQ2wvGJjmqMAGhhznAHI6t4g+m0KTp3vFIRVg==",
|
"integrity": "sha512-23O4UMBafCuD+RnUlXNvtT9DGbL1HMD+xZE1Zcr7Ll7WvgxUgRQQfk9kq6qbLLbjaRe1J2Ijsgh1HuZbBaucLQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/early": "^3.0.3",
|
"@pushrocks/early": "^3.0.3",
|
||||||
"@pushrocks/smartdelay": "^2.0.3",
|
"@pushrocks/smartdelay": "^2.0.3",
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"leakage": "^0.4.0",
|
|
||||||
"smartchai": "^2.0.1"
|
"smartchai": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/body-parser": {
|
"@types/body-parser": {
|
||||||
"version": "1.17.0",
|
"version": "1.17.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fbody-parser/-/body-parser-1.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.1.tgz",
|
||||||
"integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
|
"integrity": "sha512-RoX2EZjMiFMjZh9lmYrwgoP9RTpAjSHiJxdp4oidAQVO02T7HER3xj9UKue5534ULWeqVEkujhWcyvUce+d68w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/connect": "*",
|
"@types/connect": "*",
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/chai": {
|
"@types/chai": {
|
||||||
"version": "4.1.7",
|
"version": "4.2.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.0.tgz",
|
||||||
"integrity": "sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA==",
|
"integrity": "sha512-zw8UvoBEImn392tLjxoavuonblX/4Yb9ha4KBU10FirCfwgzhKO0dvyJSF9ByxV1xK1r2AgnAi/tvQaLgxQqxA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/chai-as-promised": {
|
"@types/chai-as-promised": {
|
||||||
"version": "7.1.0",
|
"version": "7.1.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai-as-promised/-/chai-as-promised-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.2.tgz",
|
||||||
"integrity": "sha512-MFiW54UOSt+f2bRw8J7LgQeIvE/9b4oGvwU7XW30S9QGAiHGnU/fmiOprsyMkdmH2rl8xSPc0/yrQw8juXU6bQ==",
|
"integrity": "sha512-PO2gcfR3Oxa+u0QvECLe1xKXOqYTzCmWf0FhLhjREoW3fPAVamjihL7v1MOVLJLsnAMdLcjkfrs01yvDMwVK4Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/chai": "*"
|
"@types/chai": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/chai-string": {
|
"@types/chai-string": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai-string/-/chai-string-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/chai-string/-/chai-string-1.4.2.tgz",
|
||||||
"integrity": "sha512-aRNMs6TKgjgPlCHwDfq/YNy5VtRR2hJ4AUWByddrT0TRVVD8eX4MiHW6/iHvmQHRlVuuPZcwnTUE7b4yFt7bEA==",
|
"integrity": "sha512-ld/1hV5qcPRGuwlPdvRfvM3Ka/iofOk2pH4VkasK4b1JJP1LjNmWWn0LsISf6RRzyhVOvs93rb9tM09e+UuF8Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/chai": "*"
|
"@types/chai": "*"
|
||||||
@ -445,9 +459,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/express": {
|
"@types/express": {
|
||||||
"version": "4.17.0",
|
"version": "4.17.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fexpress/-/express-4.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.1.tgz",
|
||||||
"integrity": "sha512-CjaMu57cjgjuZbh9DpkloeGxV45CnMGlVd+XpG7Gm9QgVrd7KFq+X4HY0vM+2v0bczS48Wg7bvnMY5TN+Xmcfw==",
|
"integrity": "sha512-VfH/XCP0QbQk5B5puLqTLEeFgR8lfCJHZJKkInZ9mkYd+u8byX0kztXEQxEk4wZXJs8HI+7km2ALXjn4YKcX9w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/body-parser": "*",
|
"@types/body-parser": "*",
|
||||||
"@types/express-serve-static-core": "*",
|
"@types/express-serve-static-core": "*",
|
||||||
@ -455,9 +469,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/express-serve-static-core": {
|
"@types/express-serve-static-core": {
|
||||||
"version": "4.16.7",
|
"version": "4.16.9",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fexpress-serve-static-core/-/express-serve-static-core-4.16.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.9.tgz",
|
||||||
"integrity": "sha512-847KvL8Q1y3TtFLRTXcVakErLJQgdpFSaq+k043xefz9raEf0C7HalpSY7OW5PyjCnY8P7bPW5t/Co9qqp+USg==",
|
"integrity": "sha512-GqpaVWR0DM8FnRUJYKlWgyARoBUAVfRIeVDZQKOttLFp5SmhhF9YFIYeTPwMd/AXfxlP7xVO2dj1fGu0Q+krKQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/range-parser": "*"
|
"@types/range-parser": "*"
|
||||||
@ -525,9 +539,9 @@
|
|||||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "12.6.8",
|
"version": "12.7.4",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.6.8.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.7.4.tgz",
|
||||||
"integrity": "sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg=="
|
"integrity": "sha512-W0+n1Y+gK/8G2P/piTkBBN38Qc5Q1ZSO6B5H3QmPCUewaiXOo2GCAWZ4ElZCcNhjJuBSUSLGFUJnmlCn5+nxOQ=="
|
||||||
},
|
},
|
||||||
"@types/range-parser": {
|
"@types/range-parser": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
@ -535,9 +549,9 @@
|
|||||||
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA=="
|
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA=="
|
||||||
},
|
},
|
||||||
"@types/serve-static": {
|
"@types/serve-static": {
|
||||||
"version": "1.13.2",
|
"version": "1.13.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fserve-static/-/serve-static-1.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.3.tgz",
|
||||||
"integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
|
"integrity": "sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/express-serve-static-core": "*",
|
"@types/express-serve-static-core": "*",
|
||||||
"@types/mime": "*"
|
"@types/mime": "*"
|
||||||
@ -604,21 +618,6 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"mime-types": "~2.1.24",
|
"mime-types": "~2.1.24",
|
||||||
"negotiator": "0.6.2"
|
"negotiator": "0.6.2"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"mime-db": {
|
|
||||||
"version": "1.40.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/mime-db/-/mime-db-1.40.0.tgz",
|
|
||||||
"integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA=="
|
|
||||||
},
|
|
||||||
"mime-types": {
|
|
||||||
"version": "2.1.24",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/mime-types/-/mime-types-2.1.24.tgz",
|
|
||||||
"integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
|
|
||||||
"requires": {
|
|
||||||
"mime-db": "1.40.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"after": {
|
"after": {
|
||||||
@ -702,9 +701,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"async-limiter": {
|
"async-limiter": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/async-limiter/-/async-limiter-1.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/async-limiter/-/async-limiter-1.0.1.tgz",
|
||||||
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
|
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
|
||||||
},
|
},
|
||||||
"asynckit": {
|
"asynckit": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
@ -757,15 +756,6 @@
|
|||||||
"callsite": "1.0.0"
|
"callsite": "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bindings": {
|
|
||||||
"version": "1.5.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/bindings/-/bindings-1.5.0.tgz",
|
|
||||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"file-uri-to-path": "1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"blob": {
|
"blob": {
|
||||||
"version": "0.0.5",
|
"version": "0.0.5",
|
||||||
"resolved": "https://verdaccio.lossless.one/blob/-/blob-0.0.5.tgz",
|
"resolved": "https://verdaccio.lossless.one/blob/-/blob-0.0.5.tgz",
|
||||||
@ -788,6 +778,11 @@
|
|||||||
"type-is": "~1.6.17"
|
"type-is": "~1.6.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bowser": {
|
||||||
|
"version": "2.5.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/bowser/-/bowser-2.5.3.tgz",
|
||||||
|
"integrity": "sha512-aWCA+CKfKNL/WGzNgjmK+Whp57JMzboZMwJ5gy2jDj2bEIjbMCb3ImGX+V++5wsJftyFiDIbOjRXl60ycniVqg=="
|
||||||
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"resolved": "https://verdaccio.lossless.one/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
"resolved": "https://verdaccio.lossless.one/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
@ -1230,12 +1225,6 @@
|
|||||||
"has-binary2": "~1.0.2"
|
"has-binary2": "~1.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"es6-error": {
|
|
||||||
"version": "4.1.1",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/es6-error/-/es6-error-4.1.1.tgz",
|
|
||||||
"integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"escape-html": {
|
"escape-html": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/escape-html/-/escape-html-1.0.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/escape-html/-/escape-html-1.0.3.tgz",
|
||||||
@ -1253,9 +1242,9 @@
|
|||||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||||
},
|
},
|
||||||
"esutils": {
|
"esutils": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/esutils/-/esutils-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"etag": {
|
"etag": {
|
||||||
@ -1362,12 +1351,6 @@
|
|||||||
"escape-string-regexp": "^1.0.5"
|
"escape-string-regexp": "^1.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"file-uri-to-path": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"finalhandler": {
|
"finalhandler": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/finalhandler/-/finalhandler-1.1.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/finalhandler/-/finalhandler-1.1.2.tgz",
|
||||||
@ -1405,9 +1388,9 @@
|
|||||||
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
|
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
|
||||||
},
|
},
|
||||||
"form-data": {
|
"form-data": {
|
||||||
"version": "2.5.0",
|
"version": "2.5.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/form-data/-/form-data-2.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz",
|
||||||
"integrity": "sha512-WXieX3G/8side6VIqx44ablyULoGruSde5PNTxoUyo5CeyAMX6nVWUd0rgist/EuX655cjhUhTo1Fo3tRYqbcA==",
|
"integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"asynckit": "^0.4.0",
|
"asynckit": "^0.4.0",
|
||||||
"combined-stream": "^1.0.6",
|
"combined-stream": "^1.0.6",
|
||||||
@ -1532,9 +1515,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"helmet": {
|
"helmet": {
|
||||||
"version": "3.20.0",
|
"version": "3.20.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/helmet/-/helmet-3.20.0.tgz",
|
"resolved": "https://registry.npmjs.org/helmet/-/helmet-3.20.1.tgz",
|
||||||
"integrity": "sha512-Ob+TqmQFZ5f7WgP8kBbAzNPsbf6p1lOj5r+327/ymw/IILWih3wcx9u/u/S8Mwv5wbBkO7Li6x5s23t3COhUKw==",
|
"integrity": "sha512-em+X5Wz/f0yqoRsBnpnVy3wJHSiIeskX3FQn30szBh1tILaOeSRRLkShuUVFlk/o4qTYjWxdHg4FrRe45iBWHg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"depd": "2.0.0",
|
"depd": "2.0.0",
|
||||||
"dns-prefetch-control": "0.2.0",
|
"dns-prefetch-control": "0.2.0",
|
||||||
@ -1543,7 +1526,7 @@
|
|||||||
"feature-policy": "0.3.0",
|
"feature-policy": "0.3.0",
|
||||||
"frameguard": "3.1.0",
|
"frameguard": "3.1.0",
|
||||||
"helmet-crossdomain": "0.4.0",
|
"helmet-crossdomain": "0.4.0",
|
||||||
"helmet-csp": "2.8.0",
|
"helmet-csp": "2.9.0",
|
||||||
"hide-powered-by": "1.1.0",
|
"hide-powered-by": "1.1.0",
|
||||||
"hpkp": "2.0.0",
|
"hpkp": "2.0.0",
|
||||||
"hsts": "2.2.0",
|
"hsts": "2.2.0",
|
||||||
@ -1566,14 +1549,14 @@
|
|||||||
"integrity": "sha512-AB4DTykRw3HCOxovD1nPR16hllrVImeFp5VBV9/twj66lJ2nU75DP8FPL0/Jp4jj79JhTfG+pFI2MD02kWJ+fA=="
|
"integrity": "sha512-AB4DTykRw3HCOxovD1nPR16hllrVImeFp5VBV9/twj66lJ2nU75DP8FPL0/Jp4jj79JhTfG+pFI2MD02kWJ+fA=="
|
||||||
},
|
},
|
||||||
"helmet-csp": {
|
"helmet-csp": {
|
||||||
"version": "2.8.0",
|
"version": "2.9.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/helmet-csp/-/helmet-csp-2.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.9.0.tgz",
|
||||||
"integrity": "sha512-MlCPeM0Sm3pS9RACRihx70VeTHmkQwa7sum9EK1tfw1VZyvFU0dBWym9nHh3CRkTRNlyNm/WFCMvuh9zXkOjNw==",
|
"integrity": "sha512-DGGOQtOLM7ZQpjbf/uvUonq1yG/rFgsBuK10ZJt2AtxUJxqfkPvfmP9aLUmgH9IactiRiYoiFY72YYSPl1TLTQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"bowser": "2.5.3",
|
||||||
"camelize": "1.0.0",
|
"camelize": "1.0.0",
|
||||||
"content-security-policy-builder": "2.1.0",
|
"content-security-policy-builder": "2.1.0",
|
||||||
"dasherize": "2.0.0",
|
"dasherize": "2.0.0"
|
||||||
"platform": "1.3.5"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hide-powered-by": {
|
"hide-powered-by": {
|
||||||
@ -1773,25 +1756,6 @@
|
|||||||
"invert-kv": "^2.0.0"
|
"invert-kv": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"leakage": {
|
|
||||||
"version": "0.4.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/leakage/-/leakage-0.4.0.tgz",
|
|
||||||
"integrity": "sha512-x7gYK5n5dPkHDZWJ2Kh8Ag1hZNzUh+HtXn8Bv1aDdN6o6ONPCJ8sOfFq+kxcULJFp3lXaCjXb3iXOLmQRbBLwA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@airbnb/node-memwatch": "^1.0.2",
|
|
||||||
"es6-error": "^4.0.2",
|
|
||||||
"left-pad": "^1.1.3",
|
|
||||||
"minimist": "^1.2.0",
|
|
||||||
"pretty-bytes": "^4.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"left-pad": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/left-pad/-/left-pad-1.3.0.tgz",
|
|
||||||
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"locate-path": {
|
"locate-path": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/locate-path/-/locate-path-3.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/locate-path/-/locate-path-3.0.0.tgz",
|
||||||
@ -1802,11 +1766,6 @@
|
|||||||
"path-exists": "^3.0.0"
|
"path-exists": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lodash": {
|
|
||||||
"version": "4.17.15",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/lodash/-/lodash-4.17.15.tgz",
|
|
||||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
|
|
||||||
},
|
|
||||||
"lodash._baseassign": {
|
"lodash._baseassign": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
|
||||||
@ -1856,6 +1815,11 @@
|
|||||||
"lodash.keys": "^3.0.0"
|
"lodash.keys": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lodash.chunk": {
|
||||||
|
"version": "4.2.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/lodash.chunk/-/lodash.chunk-4.2.0.tgz",
|
||||||
|
"integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw="
|
||||||
|
},
|
||||||
"lodash.clonedeep": {
|
"lodash.clonedeep": {
|
||||||
"version": "4.5.0",
|
"version": "4.5.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
||||||
@ -1881,11 +1845,21 @@
|
|||||||
"lodash.isarray": "^3.0.0"
|
"lodash.isarray": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lodash.padstart": {
|
||||||
|
"version": "4.6.1",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/lodash.padstart/-/lodash.padstart-4.6.1.tgz",
|
||||||
|
"integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs="
|
||||||
|
},
|
||||||
"lodash.restparam": {
|
"lodash.restparam": {
|
||||||
"version": "3.6.1",
|
"version": "3.6.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
|
||||||
"integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU="
|
"integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU="
|
||||||
},
|
},
|
||||||
|
"lodash.sortby": {
|
||||||
|
"version": "4.7.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
|
||||||
|
"integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
|
||||||
|
},
|
||||||
"log-symbols": {
|
"log-symbols": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/log-symbols/-/log-symbols-2.2.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/log-symbols/-/log-symbols-2.2.0.tgz",
|
||||||
@ -1974,9 +1948,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "0.0.8",
|
||||||
"resolved": "https://verdaccio.lossless.one/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
@ -1986,14 +1960,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"minimist": {
|
|
||||||
"version": "0.0.8",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/minimist/-/minimist-0.0.8.tgz",
|
|
||||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"moment": {
|
"moment": {
|
||||||
@ -2014,12 +1980,6 @@
|
|||||||
"resolved": "https://verdaccio.lossless.one/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/ms/-/ms-2.0.0.tgz",
|
||||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||||
},
|
},
|
||||||
"nan": {
|
|
||||||
"version": "2.14.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/nan/-/nan-2.14.0.tgz",
|
|
||||||
"integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/nanoid/-/nanoid-2.0.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/nanoid/-/nanoid-2.0.1.tgz",
|
||||||
@ -2165,9 +2125,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"p-limit": {
|
"p-limit": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/p-limit/-/p-limit-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
|
||||||
"integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
|
"integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"p-try": "^2.0.0"
|
"p-try": "^2.0.0"
|
||||||
@ -2253,17 +2213,6 @@
|
|||||||
"resolved": "https://verdaccio.lossless.one/pify/-/pify-2.3.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/pify/-/pify-2.3.0.tgz",
|
||||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
|
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
|
||||||
},
|
},
|
||||||
"platform": {
|
|
||||||
"version": "1.3.5",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/platform/-/platform-1.3.5.tgz",
|
|
||||||
"integrity": "sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q=="
|
|
||||||
},
|
|
||||||
"pretty-bytes": {
|
|
||||||
"version": "4.0.2",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
|
|
||||||
"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"process-nextick-args": {
|
"process-nextick-args": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||||
@ -2279,9 +2228,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"psl": {
|
"psl": {
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/psl/-/psl-1.2.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/psl/-/psl-1.3.0.tgz",
|
||||||
"integrity": "sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA=="
|
"integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag=="
|
||||||
},
|
},
|
||||||
"pump": {
|
"pump": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
@ -2414,9 +2363,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"resolve": {
|
"resolve": {
|
||||||
"version": "1.11.1",
|
"version": "1.12.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
|
||||||
"integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==",
|
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"path-parse": "^1.0.6"
|
"path-parse": "^1.0.6"
|
||||||
@ -2436,6 +2385,7 @@
|
|||||||
"version": "6.4.0",
|
"version": "6.4.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.4.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.4.0.tgz",
|
||||||
"integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==",
|
"integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^1.9.0"
|
"tslib": "^1.9.0"
|
||||||
}
|
}
|
||||||
@ -2451,9 +2401,9 @@
|
|||||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.7.0",
|
"version": "5.7.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/semver/-/semver-5.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||||
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"send": {
|
"send": {
|
||||||
@ -2535,13 +2485,14 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"sitemap": {
|
"sitemap": {
|
||||||
"version": "2.2.0",
|
"version": "3.2.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/sitemap/-/sitemap-2.2.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/sitemap/-/sitemap-3.2.2.tgz",
|
||||||
"integrity": "sha512-9Zoi3UBhSIt5jWENDRUbzsqLMJ+Fha3P2aQ2PRghmh0FOivtHsC4FAJdkAEKHvATajd74BWp/57Yh7kz/UA53Q==",
|
"integrity": "sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"lodash": "^4.17.10",
|
"lodash.chunk": "^4.2.0",
|
||||||
"url-join": "^4.0.0",
|
"lodash.padstart": "^4.6.1",
|
||||||
"xmlbuilder": "^10.0.0"
|
"whatwg-url": "^7.0.0",
|
||||||
|
"xmlbuilder": "^13.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"smartchai": {
|
"smartchai": {
|
||||||
@ -2757,9 +2708,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"symbol-tree": {
|
"symbol-tree": {
|
||||||
"version": "3.2.2",
|
"version": "3.2.4",
|
||||||
"resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||||
"integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY="
|
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
|
||||||
},
|
},
|
||||||
"through2": {
|
"through2": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
@ -2795,6 +2746,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"tr46": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/tr46/-/tr46-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=",
|
||||||
|
"requires": {
|
||||||
|
"punycode": "^2.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"version": "8.2.0",
|
"version": "8.2.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-8.2.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-8.2.0.tgz",
|
||||||
@ -2814,16 +2773,16 @@
|
|||||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||||
},
|
},
|
||||||
"tslint": {
|
"tslint": {
|
||||||
"version": "5.18.0",
|
"version": "5.20.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.18.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.20.0.tgz",
|
||||||
"integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==",
|
"integrity": "sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.0.0",
|
"@babel/code-frame": "^7.0.0",
|
||||||
"builtin-modules": "^1.1.1",
|
"builtin-modules": "^1.1.1",
|
||||||
"chalk": "^2.3.0",
|
"chalk": "^2.3.0",
|
||||||
"commander": "^2.12.1",
|
"commander": "^2.12.1",
|
||||||
"diff": "^3.2.0",
|
"diff": "^4.0.1",
|
||||||
"glob": "^7.1.1",
|
"glob": "^7.1.1",
|
||||||
"js-yaml": "^3.13.1",
|
"js-yaml": "^3.13.1",
|
||||||
"minimatch": "^3.0.4",
|
"minimatch": "^3.0.4",
|
||||||
@ -2832,14 +2791,6 @@
|
|||||||
"semver": "^5.3.0",
|
"semver": "^5.3.0",
|
||||||
"tslib": "^1.8.0",
|
"tslib": "^1.8.0",
|
||||||
"tsutils": "^2.29.0"
|
"tsutils": "^2.29.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"diff": {
|
|
||||||
"version": "3.5.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/diff/-/diff-3.5.0.tgz",
|
|
||||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslint-config-prettier": {
|
"tslint-config-prettier": {
|
||||||
@ -2909,11 +2860,6 @@
|
|||||||
"punycode": "^2.1.0"
|
"punycode": "^2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url-join": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/url-join/-/url-join-4.0.1.tgz",
|
|
||||||
"integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA=="
|
|
||||||
},
|
|
||||||
"util-deprecate": {
|
"util-deprecate": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||||
@ -2978,6 +2924,21 @@
|
|||||||
"defaults": "^1.0.3"
|
"defaults": "^1.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"webidl-conversions": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg=="
|
||||||
|
},
|
||||||
|
"whatwg-url": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/whatwg-url/-/whatwg-url-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==",
|
||||||
|
"requires": {
|
||||||
|
"lodash.sortby": "^4.7.0",
|
||||||
|
"tr46": "^1.0.1",
|
||||||
|
"webidl-conversions": "^4.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"which": {
|
"which": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/which/-/which-1.3.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/which/-/which-1.3.1.tgz",
|
||||||
@ -3059,9 +3020,9 @@
|
|||||||
"integrity": "sha512-xN0kV+8XfOQM2OPPBdEbGtbvJNNP1pvZR7sE6d44cjJFQG4OiGDdienPg5iOUGswBTiGbBvtYDURd30BMJwwqg=="
|
"integrity": "sha512-xN0kV+8XfOQM2OPPBdEbGtbvJNNP1pvZR7sE6d44cjJFQG4OiGDdienPg5iOUGswBTiGbBvtYDURd30BMJwwqg=="
|
||||||
},
|
},
|
||||||
"xmlbuilder": {
|
"xmlbuilder": {
|
||||||
"version": "10.1.1",
|
"version": "13.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/xmlbuilder/-/xmlbuilder-10.1.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/xmlbuilder/-/xmlbuilder-13.0.2.tgz",
|
||||||
"integrity": "sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg=="
|
"integrity": "sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ=="
|
||||||
},
|
},
|
||||||
"xmlhttprequest-ssl": {
|
"xmlhttprequest-ssl": {
|
||||||
"version": "1.5.5",
|
"version": "1.5.5",
|
||||||
|
22
package.json
22
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartuniverse",
|
"name": "@pushrocks/smartuniverse",
|
||||||
"version": "1.0.55",
|
"version": "1.0.80",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "messaging service for your micro services",
|
"description": "messaging service for your micro services",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@ -14,26 +14,28 @@
|
|||||||
"format": "(gitzone format)"
|
"format": "(gitzone format)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.11",
|
"@gitzone/tsbuild": "^2.1.17",
|
||||||
"@gitzone/tstest": "^1.0.24",
|
"@gitzone/tstest": "^1.0.24",
|
||||||
"@pushrocks/tapbundle": "^3.0.11",
|
"@pushrocks/tapbundle": "^3.0.13",
|
||||||
"@types/node": "^12.6.8",
|
"@types/node": "^12.7.4",
|
||||||
"tslint": "^5.18.0",
|
"tslint": "^5.20.0",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"rxjs": "*"
|
"rxjs": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^3.0.5",
|
"@apiglobal/typedrequest-interfaces": "^1.0.7",
|
||||||
|
"@pushrocks/lik": "^3.0.11",
|
||||||
"@pushrocks/smartdelay": "^2.0.3",
|
"@pushrocks/smartdelay": "^2.0.3",
|
||||||
"@pushrocks/smartexpress": "^3.0.35",
|
"@pushrocks/smartexpress": "^3.0.40",
|
||||||
"@pushrocks/smartfile": "^7.0.4",
|
"@pushrocks/smartfile": "^7.0.4",
|
||||||
"@pushrocks/smarthash": "^2.0.6",
|
"@pushrocks/smarthash": "^2.0.6",
|
||||||
|
"@pushrocks/smartlog": "^2.0.19",
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/smartrequest": "^1.1.16",
|
"@pushrocks/smartrequest": "^1.1.27",
|
||||||
"@pushrocks/smartrx": "^2.0.3",
|
"@pushrocks/smartrx": "^2.0.5",
|
||||||
"@pushrocks/smartsocket": "^1.1.38",
|
"@pushrocks/smartsocket": "^1.1.49",
|
||||||
"@pushrocks/smarttime": "^3.0.12",
|
"@pushrocks/smarttime": "^3.0.12",
|
||||||
"@pushrocks/smartunique": "^3.0.1"
|
"@pushrocks/smartunique": "^3.0.1"
|
||||||
},
|
},
|
||||||
|
@ -50,6 +50,6 @@ All your microservices represents clients in the universe that may talk to each
|
|||||||
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.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||||
|
|
||||||
[](https://maintainedby.lossless.com)
|
[](https://maintainedby.lossless.com)
|
||||||
|
34
test/test.ts
34
test/test.ts
@ -15,7 +15,7 @@ const testServerData = {
|
|||||||
|
|
||||||
const testChannelData = {
|
const testChannelData = {
|
||||||
channelName: 'awesomeTestChannel',
|
channelName: 'awesomeTestChannel',
|
||||||
channelPass: 'awesomeChannelPAss'
|
channelPass: 'awesomeChannelPass'
|
||||||
};
|
};
|
||||||
|
|
||||||
tap.test('first test', async () => {
|
tap.test('first test', async () => {
|
||||||
@ -37,22 +37,25 @@ tap.test('create smartuniverse client', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should add a channel to the universe', async () => {
|
tap.test('should add a channel to the universe', async () => {
|
||||||
await testUniverse.addChannel(testChannelData.channelName, testChannelData.channelPass);
|
testUniverse.addChannel(testChannelData.channelName, testChannelData.channelPass);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should add the same channel to the client universe in the same way', async () => {
|
tap.test('should add the same channel to the client universe in the same way', async () => {
|
||||||
await testClientUniverse.addChannel(testChannelData.channelName, testChannelData.channelPass);
|
testClientUniverse.addChannel(testChannelData.channelName, testChannelData.channelPass);
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('should start the ClientUniverse', async () => {
|
||||||
|
await testClientUniverse.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should get a observable correctly', async () => {
|
tap.test('should get a observable correctly', async () => {
|
||||||
testClientChannel = await testClientUniverse.getChannel(testChannelData.channelName);
|
testClientChannel = testClientUniverse.getChannel(testChannelData.channelName);
|
||||||
expect(testClientChannel).to.be.instanceof(smartuniverse.ClientUniverseChannel);
|
expect(testClientChannel).to.be.instanceof(smartuniverse.ClientUniverseChannel);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should send a message correctly', async () => {
|
tap.test('should send a message correctly', async () => {
|
||||||
await testClientUniverse.sendMessage({
|
await testClientUniverse.getChannel(testChannelData.channelName).sendMessage({
|
||||||
messageText: 'hello',
|
messageText: 'hello'
|
||||||
targetChannelName: testChannelData.channelName
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -66,12 +69,25 @@ tap.test('a second client should be able to subscibe', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
testClientUniverse2.addChannel(testChannelData.channelName, testChannelData.channelPass);
|
testClientUniverse2.addChannel(testChannelData.channelName, testChannelData.channelPass);
|
||||||
|
await testClientUniverse2.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should receive a message correctly', async () => {});
|
tap.test('should receive a message correctly', async (tools) => {
|
||||||
|
const done = tools.defer();
|
||||||
|
const testChannel = testClientUniverse.getChannel(testChannelData.channelName);
|
||||||
|
const testChannel2 = testClientUniverse2.getChannel(testChannelData.channelName);
|
||||||
|
const subscription = testChannel2.subscribe(messageArg => {
|
||||||
|
console.log('Yay##########');
|
||||||
|
done.resolve();
|
||||||
|
});
|
||||||
|
await testChannel.sendMessage({
|
||||||
|
messageText: 'hellothere'
|
||||||
|
});
|
||||||
|
await done.promise;
|
||||||
|
});
|
||||||
|
|
||||||
tap.test('should disconnect the client correctly', async () => {
|
tap.test('should disconnect the client correctly', async () => {
|
||||||
testClientUniverse.close();
|
await testClientUniverse.stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should end the server correctly', async tools => {
|
tap.test('should end the server correctly', async tools => {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Client classes
|
// Client classes
|
||||||
export * from './smartuniverse.classes.clientuniverse';
|
export * from './smartuniverse.classes.clientuniverse';
|
||||||
export * from './smartuniverse.classes.clientuniversechannel';
|
export * from './smartuniverse.classes.clientuniversechannel';
|
||||||
|
export * from './smartuniverse.classes.clientuniversemessage';
|
||||||
|
|
||||||
// Server classes
|
// Server classes
|
||||||
export * from './smartuniverse.classes.universe';
|
export * from './smartuniverse.classes.universe';
|
||||||
@ -8,4 +9,8 @@ export * from './smartuniverse.classes.universecache';
|
|||||||
export * from './smartuniverse.classes.universechannel';
|
export * from './smartuniverse.classes.universechannel';
|
||||||
export * from './smartuniverse.classes.universemessage';
|
export * from './smartuniverse.classes.universemessage';
|
||||||
|
|
||||||
|
// Reaction Response
|
||||||
|
export * from './smartuniverse.classes.reactionrequest';
|
||||||
|
export * from './smartuniverse.classes.reactionresponse';
|
||||||
|
|
||||||
export * from './interfaces';
|
export * from './interfaces';
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
export * from './http.interfaces';
|
export * from './http.interfaces';
|
||||||
|
export * from './socketfunctionrequests';
|
||||||
export * from './universechannel.interfaces';
|
export * from './universechannel.interfaces';
|
||||||
export * from './universemessage.interfaces';
|
export * from './universemessage.interfaces';
|
||||||
export * from './universeactions.interfaces';
|
export * from './universeactions.interfaces';
|
||||||
|
20
ts/interfaces/socketfunctionrequests.ts
Normal file
20
ts/interfaces/socketfunctionrequests.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import * as interfaces from './index';
|
||||||
|
|
||||||
|
export interface ISocketRequest_SubscribeChannel {
|
||||||
|
method: 'subscribeChannel';
|
||||||
|
request: {
|
||||||
|
name: string;
|
||||||
|
passphrase: string;
|
||||||
|
};
|
||||||
|
response: {
|
||||||
|
subscriptionStatus: 'subscribed' | 'unsubscribed';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISocketRequest_ProcessMessage {
|
||||||
|
method: 'processMessage';
|
||||||
|
request: interfaces.IUniverseMessage;
|
||||||
|
response: {
|
||||||
|
messageStatus: 'ok' | 'channel not found';
|
||||||
|
};
|
||||||
|
}
|
@ -1,17 +1,3 @@
|
|||||||
export type IServerCallActions =
|
|
||||||
| 'channelSubscription'
|
|
||||||
| 'processMessage'
|
|
||||||
| 'channelUnsubscribe'
|
|
||||||
| 'terminateConnection';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the interface for a subscription
|
|
||||||
*/
|
|
||||||
export interface IServerCallSubscribeActionPayload {
|
|
||||||
name: string;
|
|
||||||
passphrase: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IServerUnsubscribeActionPayload {
|
export interface IServerUnsubscribeActionPayload {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
export interface IAuthenticationRequest {
|
|
||||||
channelName: string;
|
|
||||||
password: string;
|
|
||||||
}
|
|
@ -2,9 +2,11 @@ export interface IMessageCreator {
|
|||||||
messageText: string;
|
messageText: string;
|
||||||
payload?: string | number | any;
|
payload?: string | number | any;
|
||||||
payloadStringType?: 'Buffer' | 'string' | 'object';
|
payloadStringType?: 'Buffer' | 'string' | 'object';
|
||||||
targetChannelName: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A universe
|
||||||
|
*/
|
||||||
export interface IUniverseMessage extends IMessageCreator {
|
export interface IUniverseMessage extends IMessageCreator {
|
||||||
id: string;
|
id: string;
|
||||||
/**
|
/**
|
||||||
@ -12,4 +14,5 @@ export interface IUniverseMessage extends IMessageCreator {
|
|||||||
*/
|
*/
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
passphrase: string;
|
passphrase: string;
|
||||||
|
targetChannelName: string;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import * as url from 'url';
|
|||||||
|
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces';
|
||||||
|
|
||||||
import { ClientUniverseChannel, UniverseMessage } from './';
|
import { ClientUniverseChannel, ClientUniverseMessage } from './';
|
||||||
import { ClientUniverseCache } from './smartuniverse.classes.clientuniversecache';
|
import { ClientUniverseCache } from './smartuniverse.classes.clientuniversecache';
|
||||||
|
|
||||||
export interface IClientOptions {
|
export interface IClientOptions {
|
||||||
@ -21,9 +21,7 @@ export interface IClientOptions {
|
|||||||
export class ClientUniverse {
|
export class ClientUniverse {
|
||||||
public options;
|
public options;
|
||||||
public smartsocketClient: plugins.smartsocket.SmartsocketClient;
|
public smartsocketClient: plugins.smartsocket.SmartsocketClient;
|
||||||
public observableIntake: plugins.smartrx.ObservableIntake<UniverseMessage>;
|
public observableIntake: plugins.smartrx.ObservableIntake<ClientUniverseMessage>;
|
||||||
|
|
||||||
public channelStore = new Objectmap<ClientUniverseChannel>();
|
|
||||||
public clientUniverseCache = new ClientUniverseCache();
|
public clientUniverseCache = new ClientUniverseCache();
|
||||||
|
|
||||||
constructor(optionsArg: IClientOptions) {
|
constructor(optionsArg: IClientOptions) {
|
||||||
@ -34,15 +32,20 @@ export class ClientUniverse {
|
|||||||
* adds a channel to the channelcache
|
* adds a channel to the channelcache
|
||||||
* TODO: verify channel before adding it to the channel cache
|
* TODO: verify channel before adding it to the channel cache
|
||||||
*/
|
*/
|
||||||
public async addChannel(channelNameArg: string, passphraseArg: string) {
|
public addChannel(channelNameArg: string, passphraseArg: string) {
|
||||||
const existingChannel = await this.getChannel(channelNameArg);
|
const existingChannel = this.getChannel(channelNameArg);
|
||||||
|
|
||||||
if (existingChannel) {
|
if (existingChannel) {
|
||||||
throw new Error('channel exists');
|
throw new Error('channel exists');
|
||||||
}
|
}
|
||||||
|
|
||||||
// lets create the channel
|
// lets create the channel
|
||||||
ClientUniverseChannel.createClientUniverseChannel(this, channelNameArg, passphraseArg);
|
const clientUniverseChannel = ClientUniverseChannel.createClientUniverseChannel(
|
||||||
|
this,
|
||||||
|
channelNameArg,
|
||||||
|
passphraseArg
|
||||||
|
);
|
||||||
|
return clientUniverseChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,9 +53,8 @@ export class ClientUniverse {
|
|||||||
* @param channelName
|
* @param channelName
|
||||||
* @param passphraseArg
|
* @param passphraseArg
|
||||||
*/
|
*/
|
||||||
public async getChannel(channelName: string): Promise<ClientUniverseChannel> {
|
public getChannel(channelName: string): ClientUniverseChannel {
|
||||||
await this.checkConnection();
|
const clientUniverseChannel = this.clientUniverseCache.channelMap.find(channel => {
|
||||||
const clientUniverseChannel = this.channelStore.find(channel => {
|
|
||||||
return channel.name === channelName;
|
return channel.name === channelName;
|
||||||
});
|
});
|
||||||
return clientUniverseChannel;
|
return clientUniverseChannel;
|
||||||
@ -63,45 +65,35 @@ export class ClientUniverse {
|
|||||||
* @param messageArg
|
* @param messageArg
|
||||||
*/
|
*/
|
||||||
public removeChannel(channelNameArg, notifyServer = true) {
|
public removeChannel(channelNameArg, notifyServer = true) {
|
||||||
const clientUniverseChannel = this.channelStore.findOneAndRemove(channelItemArg => {
|
const clientUniverseChannel = this.clientUniverseCache.channelMap.findOneAndRemove(
|
||||||
return channelItemArg.name === channelNameArg;
|
channelItemArg => {
|
||||||
});
|
return channelItemArg.name === channelNameArg;
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public async start() {
|
||||||
* sends a message towards the server
|
|
||||||
* @param messageArg
|
|
||||||
*/
|
|
||||||
public async sendMessage(messageArg: interfaces.IMessageCreator) {
|
|
||||||
await this.checkConnection();
|
await this.checkConnection();
|
||||||
const universeMessageToSend: interfaces.IUniverseMessage = {
|
|
||||||
id: plugins.smartunique.shortId(),
|
|
||||||
timestamp: Date.now(),
|
|
||||||
passphrase: (await this.getChannel(messageArg.targetChannelName)).passphrase,
|
|
||||||
...messageArg
|
|
||||||
};
|
|
||||||
await this.smartsocketClient.serverCall('processMessage', universeMessageToSend);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public close() {
|
public async stop() {
|
||||||
this.smartsocketClient.disconnect();
|
await this.smartsocketClient.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* checks the connection towards a universe server
|
* checks the connection towards a universe server
|
||||||
* since password validation is done through other means, a connection should always be possible
|
* since password validation is done through other means, a connection should always be possible
|
||||||
*/
|
*/
|
||||||
private async checkConnection(): Promise<void> {
|
public async checkConnection(): Promise<void> {
|
||||||
if (!this.smartsocketClient && !this.observableIntake) {
|
if (!this.smartsocketClient && !this.observableIntake) {
|
||||||
const parsedURL = url.parse(this.options.serverAddress);
|
const parsedURL = url.parse(this.options.serverAddress);
|
||||||
const socketConfig: plugins.smartsocket.ISmartsocketClientOptions = {
|
const socketConfig: plugins.smartsocket.ISmartsocketClientOptions = {
|
||||||
alias: process.env.SOCKET_ALIAS || 'someclient',
|
alias: 'universeclient',
|
||||||
password: 'UniverseClient',
|
password: 'UniverseClient',
|
||||||
port: parseInt(parsedURL.port, 10),
|
port: parseInt(parsedURL.port, 10),
|
||||||
role: 'UniverseClient',
|
role: 'UniverseClient',
|
||||||
url: parsedURL.protocol + '//' + parsedURL.hostname
|
url: parsedURL.protocol + '//' + parsedURL.hostname
|
||||||
};
|
};
|
||||||
console.log(socketConfig);
|
|
||||||
this.smartsocketClient = new SmartsocketClient(socketConfig);
|
this.smartsocketClient = new SmartsocketClient(socketConfig);
|
||||||
this.observableIntake = new plugins.smartrx.ObservableIntake();
|
this.observableIntake = new plugins.smartrx.ObservableIntake();
|
||||||
|
|
||||||
@ -110,7 +102,7 @@ export class ClientUniverse {
|
|||||||
/**
|
/**
|
||||||
* should handle a forced unsubscription by the server
|
* should handle a forced unsubscription by the server
|
||||||
*/
|
*/
|
||||||
const unsubscribe = new plugins.smartsocket.SocketFunction({
|
const socketFunctionUnsubscribe = new plugins.smartsocket.SocketFunction({
|
||||||
funcName: 'unsubscribe',
|
funcName: 'unsubscribe',
|
||||||
allowedRoles: [],
|
allowedRoles: [],
|
||||||
funcDef: async (data: interfaces.IServerUnsubscribeActionPayload) => {
|
funcDef: async (data: interfaces.IServerUnsubscribeActionPayload) => {
|
||||||
@ -119,17 +111,44 @@ export class ClientUniverse {
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* should handle a message reception
|
* handles message reception
|
||||||
*/
|
*/
|
||||||
const processMessageSocketFunction = new plugins.smartsocket.SocketFunction({
|
const socketFunctionProcessMessage = new plugins.smartsocket.SocketFunction<
|
||||||
|
interfaces.ISocketRequest_ProcessMessage
|
||||||
|
>({
|
||||||
funcName: 'processMessage',
|
funcName: 'processMessage',
|
||||||
allowedRoles: [],
|
allowedRoles: [],
|
||||||
funcDef: async (data: interfaces.IServerUnsubscribeActionPayload) => {
|
funcDef: async messageDescriptorArg => {
|
||||||
throw new Error('TODO');
|
plugins.smartlog.defaultLogger.log('info', 'Got message from server');
|
||||||
|
const clientUniverseMessage = ClientUniverseMessage.createMessageFromMessageDescriptor(
|
||||||
|
messageDescriptorArg
|
||||||
|
);
|
||||||
|
this.observableIntake.push(clientUniverseMessage);
|
||||||
|
|
||||||
|
// lets find the corresponding channel
|
||||||
|
const targetChannel = this.getChannel(clientUniverseMessage.targetChannelName);
|
||||||
|
if (targetChannel) {
|
||||||
|
await targetChannel.emitMessageLocally(clientUniverseMessage);
|
||||||
|
return {
|
||||||
|
messageStatus: 'ok'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
messageStatus: 'channel not found'
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// add functions
|
||||||
|
this.smartsocketClient.addSocketFunction(socketFunctionUnsubscribe);
|
||||||
|
this.smartsocketClient.addSocketFunction(socketFunctionProcessMessage);
|
||||||
|
|
||||||
await this.smartsocketClient.connect();
|
await this.smartsocketClient.connect();
|
||||||
|
plugins.smartlog.defaultLogger.log('info', 'universe client connected successfully');
|
||||||
|
await this.clientUniverseCache.channelMap.forEach(async clientUniverseChannelArg => {
|
||||||
|
await clientUniverseChannelArg.populateSubscriptionToServer();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
import * as plugins from './smartuniverse.plugins';
|
import * as plugins from './smartuniverse.plugins';
|
||||||
|
import { ClientUniverseChannel } from './smartuniverse.classes.clientuniversechannel';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* a cache for clients
|
* a cache for clients
|
||||||
* keeps track of which messages have already been received
|
* keeps track of which messages have already been received
|
||||||
* good for deduplication in mesh environments
|
* good for deduplication in mesh environments
|
||||||
*/
|
*/
|
||||||
export class ClientUniverseCache {}
|
export class ClientUniverseCache {
|
||||||
|
public channelMap = new plugins.lik.Objectmap<ClientUniverseChannel>();
|
||||||
|
}
|
||||||
|
@ -2,6 +2,9 @@ import * as plugins from './smartuniverse.plugins';
|
|||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces';
|
||||||
|
|
||||||
import { ClientUniverse } from './';
|
import { ClientUniverse } from './';
|
||||||
|
import { ClientUniverseMessage } from './smartuniverse.classes.clientuniversemessage';
|
||||||
|
import { ReactionRequest } from './smartuniverse.classes.reactionrequest';
|
||||||
|
import { ReactionResponse } from './smartuniverse.classes.reactionresponse';
|
||||||
|
|
||||||
export class ClientUniverseChannel implements interfaces.IUniverseChannel {
|
export class ClientUniverseChannel implements interfaces.IUniverseChannel {
|
||||||
// ======
|
// ======
|
||||||
@ -13,18 +16,17 @@ export class ClientUniverseChannel implements interfaces.IUniverseChannel {
|
|||||||
* @param channelNameArg
|
* @param channelNameArg
|
||||||
* @param passphraseArg
|
* @param passphraseArg
|
||||||
*/
|
*/
|
||||||
public static async createClientUniverseChannel(
|
public static createClientUniverseChannel(
|
||||||
clientUniverseArg: ClientUniverse,
|
clientUniverseArg: ClientUniverse,
|
||||||
channelNameArg: string,
|
channelNameArg: string,
|
||||||
passphraseArg: string
|
passphraseArg: string
|
||||||
): Promise<ClientUniverseChannel> {
|
): ClientUniverseChannel {
|
||||||
const clientChannel = new ClientUniverseChannel(
|
const clientChannel = new ClientUniverseChannel(
|
||||||
clientUniverseArg,
|
clientUniverseArg,
|
||||||
channelNameArg,
|
channelNameArg,
|
||||||
passphraseArg
|
passphraseArg
|
||||||
);
|
);
|
||||||
clientUniverseArg.channelStore.add(clientChannel);
|
clientUniverseArg.clientUniverseCache.channelMap.add(clientChannel);
|
||||||
await clientChannel.subscribe();
|
|
||||||
return clientChannel;
|
return clientChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,12 +37,14 @@ export class ClientUniverseChannel implements interfaces.IUniverseChannel {
|
|||||||
// properties
|
// properties
|
||||||
public name: string;
|
public name: string;
|
||||||
public passphrase: string;
|
public passphrase: string;
|
||||||
|
public status: 'subscribed' | 'unsubscribed' = 'unsubscribed';
|
||||||
|
private subject = new plugins.smartrx.rxjs.Subject<ClientUniverseMessage>();
|
||||||
|
|
||||||
// refs
|
// refs
|
||||||
public clientUniverse: ClientUniverse;
|
public clientUniverseRef: ClientUniverse;
|
||||||
|
|
||||||
constructor(clientUniverseArg: ClientUniverse, nameArg: string, passphraseArg: string) {
|
constructor(clientUniverseArg: ClientUniverse, nameArg: string, passphraseArg: string) {
|
||||||
this.clientUniverse = clientUniverseArg;
|
this.clientUniverseRef = clientUniverseArg;
|
||||||
this.name = nameArg;
|
this.name = nameArg;
|
||||||
this.passphrase = passphraseArg;
|
this.passphrase = passphraseArg;
|
||||||
}
|
}
|
||||||
@ -49,12 +53,51 @@ export class ClientUniverseChannel implements interfaces.IUniverseChannel {
|
|||||||
* subscribes to a channel
|
* subscribes to a channel
|
||||||
* tells the universe about this instances interest into a channel
|
* tells the universe about this instances interest into a channel
|
||||||
*/
|
*/
|
||||||
public async subscribe() {
|
public subscribe(observingFunctionArg: (messageArg: ClientUniverseMessage) => void) {
|
||||||
const serverCallActionName: interfaces.IServerCallActions = 'channelSubscription';
|
|
||||||
const serverCallActionPayload: interfaces.IServerCallSubscribeActionPayload = {
|
return this.subject.subscribe(
|
||||||
name: this.name,
|
messageArg => {
|
||||||
passphrase: this.passphrase
|
observingFunctionArg(messageArg);
|
||||||
|
},
|
||||||
|
error => console.log(error)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async populateSubscriptionToServer() {
|
||||||
|
// lets make sure the channel is connected
|
||||||
|
if (this.status === 'unsubscribed') {
|
||||||
|
const response = await this.clientUniverseRef.smartsocketClient.serverCall<
|
||||||
|
interfaces.ISocketRequest_SubscribeChannel
|
||||||
|
>('subscribeChannel', {
|
||||||
|
name: this.name,
|
||||||
|
passphrase: this.passphrase
|
||||||
|
});
|
||||||
|
this.status = response.subscriptionStatus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async emitMessageLocally(messageArg: ClientUniverseMessage) {
|
||||||
|
this.subject.next(messageArg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sends a message towards the server
|
||||||
|
* @param messageArg
|
||||||
|
*/
|
||||||
|
public async sendMessage(messageArg: interfaces.IMessageCreator) {
|
||||||
|
await this.clientUniverseRef.checkConnection();
|
||||||
|
const universeMessageToSend: interfaces.IUniverseMessage = {
|
||||||
|
id: plugins.smartunique.shortId(),
|
||||||
|
timestamp: Date.now(),
|
||||||
|
passphrase: this.passphrase,
|
||||||
|
targetChannelName: this.name,
|
||||||
|
messageText: messageArg.messageText,
|
||||||
|
payload: messageArg.payload,
|
||||||
|
payloadStringType: messageArg.payloadStringType
|
||||||
};
|
};
|
||||||
this.clientUniverse.smartsocketClient.serverCall(serverCallActionName, serverCallActionPayload);
|
await this.clientUniverseRef.smartsocketClient.serverCall(
|
||||||
|
'processMessage',
|
||||||
|
universeMessageToSend
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,10 @@ export class ClientUniverseMessage implements interfaces.IUniverseMessage {
|
|||||||
// ======
|
// ======
|
||||||
// STATIC
|
// STATIC
|
||||||
// ======
|
// ======
|
||||||
public static createMessageFromPayload(messageDescriptor: interfaces.IUniverseMessage) {}
|
public static createMessageFromMessageDescriptor(messageDescriptor: interfaces.IUniverseMessage) {
|
||||||
|
const clientuniverseMessage = new ClientUniverseMessage(messageDescriptor);
|
||||||
|
return clientuniverseMessage;
|
||||||
|
}
|
||||||
|
|
||||||
// ========
|
// ========
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
@ -23,11 +26,14 @@ export class ClientUniverseMessage implements interfaces.IUniverseMessage {
|
|||||||
public payloadStringType;
|
public payloadStringType;
|
||||||
public targetChannelName: string;
|
public targetChannelName: string;
|
||||||
|
|
||||||
constructor(messageArg: interfaces.IUniverseMessage, payloadArg) {
|
constructor(messageArg: interfaces.IUniverseMessage) {
|
||||||
for (const key of Object.keys(messageArg)) {
|
for (const key of Object.keys(messageArg)) {
|
||||||
this[key] = messageArg[key];
|
this[key] = messageArg[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets json for payload
|
||||||
|
*/
|
||||||
getAsJsonForPayload() {}
|
getAsJsonForPayload() {}
|
||||||
}
|
}
|
||||||
|
24
ts/smartuniverse.classes.reactionrequest.ts
Normal file
24
ts/smartuniverse.classes.reactionrequest.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import * as plugins from './smartuniverse.plugins';
|
||||||
|
|
||||||
|
export interface IReactionRequestConstructorOptions<T extends plugins.typedrequestInterfaces.ITypedRequest> {
|
||||||
|
method: T['method'];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ICombinatorPayload<T extends plugins.typedrequestInterfaces.ITypedRequest> {
|
||||||
|
/**
|
||||||
|
* needed for tying responses to requests
|
||||||
|
*/
|
||||||
|
id: string;
|
||||||
|
typedRequestPayload: T;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ReactionRequest<T extends plugins.typedrequestInterfaces.ITypedRequest> {
|
||||||
|
public method: T['method'];
|
||||||
|
|
||||||
|
constructor(optionsArg: IReactionRequestConstructorOptions<T>) {
|
||||||
|
this.method = optionsArg.method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public fireRequest(channelArg) {}
|
||||||
|
}
|
31
ts/smartuniverse.classes.reactionresponse.ts
Normal file
31
ts/smartuniverse.classes.reactionresponse.ts
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import * as plugins from './smartuniverse.plugins';
|
||||||
|
|
||||||
|
import { ICombinatorPayload } from './smartuniverse.classes.reactionrequest';
|
||||||
|
import { UniverseChannel } from './smartuniverse.classes.universechannel';
|
||||||
|
import { ClientUniverseChannel } from './smartuniverse.classes.clientuniversechannel';
|
||||||
|
import { UniverseMessage } from './smartuniverse.classes.universemessage';
|
||||||
|
import { ClientUniverseMessage } from './smartuniverse.classes.clientuniversemessage';
|
||||||
|
|
||||||
|
export interface IReactionResponseConstructorOptions<T extends plugins.typedrequestInterfaces.ITypedRequest> {
|
||||||
|
method: T['method'];
|
||||||
|
channels: Array<UniverseChannel | ClientUniverseChannel>;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export class ReactionResponse<T extends plugins.typedrequestInterfaces.ITypedRequest> {
|
||||||
|
public method: T['method'];
|
||||||
|
public channels = new plugins.lik.Objectmap<UniverseChannel | ClientUniverseChannel>();
|
||||||
|
|
||||||
|
constructor(optionsArg: IReactionResponseConstructorOptions<T>) {
|
||||||
|
this.channels.addArray(optionsArg.channels);
|
||||||
|
for (const channel of this.channels.getArray()) {
|
||||||
|
channel.subscribe(messageArg => {
|
||||||
|
this.processMessageForReaction(messageArg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private processMessageForReaction(messageArg: UniverseMessage | ClientUniverseMessage) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -10,6 +10,7 @@ import { UniverseConnection } from './smartuniverse.classes.universeconnection';
|
|||||||
|
|
||||||
export interface ISmartUniverseConstructorOptions {
|
export interface ISmartUniverseConstructorOptions {
|
||||||
messageExpiryInMilliseconds: number;
|
messageExpiryInMilliseconds: number;
|
||||||
|
externalServer?: plugins.smartexpress.Server;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,7 +35,7 @@ export class Universe {
|
|||||||
|
|
||||||
constructor(optionsArg: ISmartUniverseConstructorOptions) {
|
constructor(optionsArg: ISmartUniverseConstructorOptions) {
|
||||||
this.options = optionsArg;
|
this.options = optionsArg;
|
||||||
this.universeCache = new UniverseCache(this.options.messageExpiryInMilliseconds);
|
this.universeCache = new UniverseCache(this, this.options.messageExpiryInMilliseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,8 +60,18 @@ export class Universe {
|
|||||||
/**
|
/**
|
||||||
* adds a channel to the Universe
|
* adds a channel to the Universe
|
||||||
*/
|
*/
|
||||||
public async addChannel(nameArg: string, passphraseArg: string) {
|
public addChannel(nameArg: string, passphraseArg: string) {
|
||||||
const newChannel = UniverseChannel.createChannel(this.universeCache, nameArg, passphraseArg);
|
const newChannel = UniverseChannel.createChannel(this, nameArg, passphraseArg);
|
||||||
|
return newChannel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns a channel
|
||||||
|
*/
|
||||||
|
public getChannelByName(channelNameArg: string) {
|
||||||
|
return this.universeCache.channelMap.find(channelArg => {
|
||||||
|
return channelArg.name === channelNameArg;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,14 +79,19 @@ export class Universe {
|
|||||||
*/
|
*/
|
||||||
public async start(portArg: number) {
|
public async start(portArg: number) {
|
||||||
// lets create the base smartexpress server
|
// lets create the base smartexpress server
|
||||||
this.smartexpressServer = new plugins.smartexpress.Server({
|
if (!this.options.externalServer) {
|
||||||
cors: true,
|
this.smartexpressServer = new plugins.smartexpress.Server({
|
||||||
defaultAnswer: async () => {
|
cors: true,
|
||||||
return `smartuniverse server ${this.getUniverseVersion()}`;
|
defaultAnswer: async () => {
|
||||||
},
|
return `smartuniverse server ${this.getUniverseVersion()}`;
|
||||||
forceSsl: false,
|
},
|
||||||
port: portArg
|
forceSsl: false,
|
||||||
});
|
port: portArg
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log('Universe is using externally supplied server');
|
||||||
|
this.smartexpressServer = this.options.externalServer;
|
||||||
|
}
|
||||||
|
|
||||||
// add websocket upgrade
|
// add websocket upgrade
|
||||||
this.smartsocket = new plugins.smartsocket.Smartsocket({});
|
this.smartsocket = new plugins.smartsocket.Smartsocket({});
|
||||||
@ -89,71 +105,73 @@ export class Universe {
|
|||||||
// add the role to smartsocket
|
// add the role to smartsocket
|
||||||
this.smartsocket.addSocketRoles([ClientRole]);
|
this.smartsocket.addSocketRoles([ClientRole]);
|
||||||
|
|
||||||
const SubscriptionSocketFunction = new plugins.smartsocket.SocketFunction({
|
const socketFunctionSubscription = new plugins.smartsocket.SocketFunction<
|
||||||
|
interfaces.ISocketRequest_SubscribeChannel
|
||||||
|
>({
|
||||||
allowedRoles: [ClientRole], // there is only one client role, Authentication happens on another level
|
allowedRoles: [ClientRole], // there is only one client role, Authentication happens on another level
|
||||||
funcName: 'channelSubscription',
|
funcName: 'subscribeChannel',
|
||||||
funcDef: async (
|
funcDef: async (dataArg, socketConnectionArg) => {
|
||||||
dataArg: interfaces.IServerCallSubscribeActionPayload,
|
const universeConnection = new UniverseConnection({
|
||||||
socketConnectionArg
|
socketConnection: socketConnectionArg,
|
||||||
) => {
|
authenticationRequests: [dataArg]
|
||||||
// run in "this context" of this class
|
});
|
||||||
await (async () => {
|
await UniverseConnection.addConnectionToCache(this, universeConnection);
|
||||||
// TODO: properly add the connection
|
return {
|
||||||
const universeConnection = new UniverseConnection({
|
subscriptionStatus: 'subscribed'
|
||||||
socketConnection: socketConnectionArg,
|
};
|
||||||
authenticationRequests: []
|
|
||||||
});
|
|
||||||
await UniverseConnection.addConnectionToCache(this.universeCache, universeConnection);
|
|
||||||
return {
|
|
||||||
'subscription status': 'success'
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ProcessMessageSocketFunction = new plugins.smartsocket.SocketFunction({
|
const socketFunctionProcessMessage = new plugins.smartsocket.SocketFunction({
|
||||||
allowedRoles: [ClientRole], // there is only one client role, Authentication happens on another level
|
allowedRoles: [ClientRole], // there is only one client role, Authentication happens on another level
|
||||||
funcName: 'processMessage',
|
funcName: 'processMessage',
|
||||||
funcDef: async (dataArg: interfaces.IUniverseMessage, socketConnectionArg) => {
|
funcDef: async (dataArg: interfaces.IUniverseMessage, socketConnectionArg) => {
|
||||||
// run in "this" context of this class
|
const universeConnection = UniverseConnection.findUniverseConnectionBySocketConnection(
|
||||||
await (async () => {
|
this.universeCache,
|
||||||
const universeConnection = UniverseConnection.findUniverseConnectionBySocketConnection(
|
socketConnectionArg
|
||||||
this.universeCache,
|
);
|
||||||
socketConnectionArg
|
if (universeConnection) {
|
||||||
|
plugins.smartlog.defaultLogger.log(
|
||||||
|
'ok',
|
||||||
|
'found UniverseConnection for socket for incoming message'
|
||||||
);
|
);
|
||||||
if (universeConnection) {
|
} else {
|
||||||
console.log('found UniverseConnection for socket');
|
plugins.smartlog.defaultLogger.log(
|
||||||
} else {
|
'warn',
|
||||||
console.log('universe client not yet present');
|
'found no Authorized channel for incoming message'
|
||||||
console.log('creating one now as send only');
|
|
||||||
const universeConnectionInstance = new UniverseConnection({
|
|
||||||
socketConnection: socketConnectionArg,
|
|
||||||
authenticationRequests: []
|
|
||||||
});
|
|
||||||
await UniverseConnection.addConnectionToCache(
|
|
||||||
this.universeCache,
|
|
||||||
universeConnectionInstance
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const unauthenticatedMessage = UniverseMessage.createMessageFromPayload(dataArg);
|
|
||||||
const foundChannel = await UniverseChannel.authorizeAMessageForAChannel(
|
|
||||||
this.universeCache,
|
|
||||||
unauthenticatedMessage
|
|
||||||
);
|
);
|
||||||
if (foundChannel) {
|
return {
|
||||||
const authenticatedMessage = unauthenticatedMessage;
|
error: 'You need to authenticate for a channel'
|
||||||
await this.universeCache.addMessage(authenticatedMessage);
|
};
|
||||||
}
|
}
|
||||||
})();
|
const unauthenticatedMessage = UniverseMessage.createMessageFromPayload(
|
||||||
|
socketConnectionArg,
|
||||||
|
dataArg
|
||||||
|
);
|
||||||
|
const foundChannel = await UniverseChannel.authorizeAMessageForAChannel(
|
||||||
|
this.universeCache,
|
||||||
|
unauthenticatedMessage
|
||||||
|
);
|
||||||
|
if (foundChannel && unauthenticatedMessage.authenticated) {
|
||||||
|
const authenticatedMessage = unauthenticatedMessage;
|
||||||
|
await this.universeCache.addMessage(authenticatedMessage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// add socket functions
|
||||||
|
this.smartsocket.addSocketFunction(socketFunctionSubscription);
|
||||||
|
this.smartsocket.addSocketFunction(socketFunctionProcessMessage);
|
||||||
|
|
||||||
|
// start the server
|
||||||
|
if (!this.options.externalServer) {
|
||||||
|
await this.smartexpressServer.start();
|
||||||
|
}
|
||||||
|
|
||||||
// add smartsocket to the running smartexpress app
|
// add smartsocket to the running smartexpress app
|
||||||
this.smartsocket.setExternalServer('smartexpress', this.smartexpressServer as any);
|
await this.smartsocket.setExternalServer('smartexpress', this.smartexpressServer);
|
||||||
// start everything
|
|
||||||
await this.smartexpressServer.start();
|
|
||||||
await this.smartsocket.start();
|
await this.smartsocket.start();
|
||||||
console.log('started universe');
|
plugins.smartlog.defaultLogger.log('success', 'started universe');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -161,6 +179,8 @@ export class Universe {
|
|||||||
*/
|
*/
|
||||||
public async stopServer() {
|
public async stopServer() {
|
||||||
await this.smartsocket.stop();
|
await this.smartsocket.stop();
|
||||||
await this.smartexpressServer.stop();
|
if (!this.options.externalServer) {
|
||||||
|
await this.smartexpressServer.stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import { Observable, from } from 'rxjs';
|
|||||||
import { filter } from 'rxjs/operators';
|
import { filter } from 'rxjs/operators';
|
||||||
import { rxjs } from '@pushrocks/smartrx';
|
import { rxjs } from '@pushrocks/smartrx';
|
||||||
import { UniverseConnection } from './smartuniverse.classes.universeconnection';
|
import { UniverseConnection } from './smartuniverse.classes.universeconnection';
|
||||||
|
import { Universe } from './smartuniverse.classes.universe';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* universe store handles the creation, storage and retrieval of messages.
|
* universe store handles the creation, storage and retrieval of messages.
|
||||||
@ -30,15 +31,22 @@ export class UniverseCache {
|
|||||||
*/
|
*/
|
||||||
public channelMap = new Objectmap<UniverseChannel>();
|
public channelMap = new Objectmap<UniverseChannel>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* stores all connections
|
||||||
|
*/
|
||||||
public connectionMap = new plugins.lik.Objectmap<UniverseConnection>();
|
public connectionMap = new plugins.lik.Objectmap<UniverseConnection>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* allows messages to be processed in a blacklist mode for further analysis
|
* allows messages to be processed in a blacklist mode for further analysis
|
||||||
*/
|
*/
|
||||||
public blackListChannel = new UniverseChannel(this, 'blacklist', 'nada');
|
public blackListChannel: UniverseChannel;
|
||||||
|
|
||||||
constructor(standardMessageExpiryArg: number) {
|
public universeRef: Universe;
|
||||||
|
|
||||||
|
constructor(universeArg: Universe, standardMessageExpiryArg: number) {
|
||||||
|
this.universeRef = universeArg;
|
||||||
this.standardMessageExpiry = standardMessageExpiryArg;
|
this.standardMessageExpiry = standardMessageExpiryArg;
|
||||||
|
this.blackListChannel = new UniverseChannel(this.universeRef, 'blacklist', 'nada');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,6 +58,9 @@ export class UniverseCache {
|
|||||||
messageArg.setUniverseCache(this);
|
messageArg.setUniverseCache(this);
|
||||||
UniverseChannel.authorizeAMessageForAChannel(this, messageArg);
|
UniverseChannel.authorizeAMessageForAChannel(this, messageArg);
|
||||||
this.messageMap.add(messageArg);
|
this.messageMap.add(messageArg);
|
||||||
|
messageArg.universeChannelList.forEach(universeChannel => {
|
||||||
|
universeChannel.push(messageArg);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
import * as plugins from './smartuniverse.plugins';
|
import * as plugins from './smartuniverse.plugins';
|
||||||
|
import * as interfaces from './interfaces';
|
||||||
|
|
||||||
import { UniverseCache } from './smartuniverse.classes.universecache';
|
import { UniverseCache } from './smartuniverse.classes.universecache';
|
||||||
import { UniverseMessage } from './smartuniverse.classes.universemessage';
|
import { UniverseMessage } from './smartuniverse.classes.universemessage';
|
||||||
|
import { UniverseConnection } from './smartuniverse.classes.universeconnection';
|
||||||
|
import { Universe } from './smartuniverse.classes.universe';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enables messages to stay within a certain scope.
|
* enables messages to stay within a certain scope.
|
||||||
@ -17,12 +20,12 @@ export class UniverseChannel {
|
|||||||
* @param passphraseArg the secret thats used for a certain topic.
|
* @param passphraseArg the secret thats used for a certain topic.
|
||||||
*/
|
*/
|
||||||
public static createChannel(
|
public static createChannel(
|
||||||
universeCacheArg: UniverseCache,
|
universeArg: Universe,
|
||||||
channelNameArg: string,
|
channelNameArg: string,
|
||||||
passphraseArg: string
|
passphraseArg: string
|
||||||
) {
|
) {
|
||||||
const newChannel = new UniverseChannel(universeCacheArg, channelNameArg, passphraseArg);
|
const newChannel = new UniverseChannel(universeArg, channelNameArg, passphraseArg);
|
||||||
universeCacheArg.channelMap.add(newChannel);
|
universeArg.universeCache.channelMap.add(newChannel);
|
||||||
return newChannel;
|
return newChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,16 +61,22 @@ export class UniverseChannel {
|
|||||||
if (foundChannel) {
|
if (foundChannel) {
|
||||||
universeMessageArg.authenticated = true;
|
universeMessageArg.authenticated = true;
|
||||||
universeMessageArg.universeChannelList.add(foundChannel);
|
universeMessageArg.universeChannelList.add(foundChannel);
|
||||||
console.log('message authorized');
|
plugins.smartlog.defaultLogger.log('ok', 'message authorized');
|
||||||
return foundChannel;
|
return foundChannel;
|
||||||
} else {
|
} else {
|
||||||
universeMessageArg.authenticated = false;
|
universeMessageArg.authenticated = false;
|
||||||
universeMessageArg.universeChannelList.add(universeCacheArg.blackListChannel);
|
universeMessageArg.universeChannelList.add(universeCacheArg.blackListChannel);
|
||||||
console.log('message not valid');
|
plugins.smartlog.defaultLogger.log('warn', 'message not valid');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static getUniverseChannelByName(universeRef: Universe, universeChannelName: string) {
|
||||||
|
return universeRef.universeCache.channelMap.find(channelArg => {
|
||||||
|
return channelArg.name === universeChannelName;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// ========
|
// ========
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
// ========
|
// ========
|
||||||
@ -75,14 +84,16 @@ export class UniverseChannel {
|
|||||||
* the name of the channel
|
* the name of the channel
|
||||||
*/
|
*/
|
||||||
public name: string;
|
public name: string;
|
||||||
public universeCacheInstance: UniverseCache;
|
public universeRef: Universe;
|
||||||
|
private subject = new plugins.smartrx.rxjs.Subject<UniverseMessage>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the passphrase for the channel
|
* the passphrase for the channel
|
||||||
*/
|
*/
|
||||||
public passphrase: string;
|
public passphrase: string;
|
||||||
|
|
||||||
constructor(universeCacheArg: UniverseCache, channelNameArg: string, passphraseArg: string) {
|
constructor(universeArg: Universe, channelNameArg: string, passphraseArg: string) {
|
||||||
|
this.universeRef = universeArg;
|
||||||
this.name = channelNameArg;
|
this.name = channelNameArg;
|
||||||
this.passphrase = passphraseArg;
|
this.passphrase = passphraseArg;
|
||||||
}
|
}
|
||||||
@ -99,5 +110,61 @@ export class UniverseChannel {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public pushToClients(messageArg: UniverseMessage) {}
|
/**
|
||||||
|
* pushes a message to clients
|
||||||
|
* @param messageArg
|
||||||
|
*/
|
||||||
|
public async push(messageArg: UniverseMessage) {
|
||||||
|
this.subject.next(messageArg);
|
||||||
|
const universeConnectionsWithChannelAccess: UniverseConnection[] = [];
|
||||||
|
await this.universeRef.universeCache.connectionMap.forEach(async socketConnection => {
|
||||||
|
if (socketConnection.authenticatedChannels.includes(this)) {
|
||||||
|
universeConnectionsWithChannelAccess.push(socketConnection);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
for (const universeConnection of universeConnectionsWithChannelAccess) {
|
||||||
|
const smartsocket = universeConnection.socketConnection
|
||||||
|
.smartsocketRef as plugins.smartsocket.Smartsocket;
|
||||||
|
const universeMessageToSend: interfaces.IUniverseMessage = {
|
||||||
|
id: messageArg.id,
|
||||||
|
timestamp: messageArg.timestamp,
|
||||||
|
passphrase: messageArg.passphrase,
|
||||||
|
targetChannelName: this.name,
|
||||||
|
messageText: messageArg.messageText,
|
||||||
|
payload: messageArg.payload,
|
||||||
|
payloadStringType: messageArg.payloadStringType
|
||||||
|
};
|
||||||
|
smartsocket.clientCall(
|
||||||
|
'processMessage',
|
||||||
|
universeMessageToSend,
|
||||||
|
universeConnection.socketConnection
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// functions to interact with a channel locally
|
||||||
|
public subscribe(observingFunctionArg: (messageArg: UniverseMessage) => void) {
|
||||||
|
return this.subject.subscribe(
|
||||||
|
messageArg => {
|
||||||
|
observingFunctionArg(messageArg);
|
||||||
|
},
|
||||||
|
error => console.log(error)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sends a message to the channel
|
||||||
|
*/
|
||||||
|
public async sendMessage(messageDescriptor: interfaces.IMessageCreator) {
|
||||||
|
const messageToSend = new UniverseMessage({
|
||||||
|
id: plugins.smartunique.shortId(),
|
||||||
|
messageText: messageDescriptor.messageText,
|
||||||
|
payload: messageDescriptor.payload,
|
||||||
|
payloadStringType: messageDescriptor.payloadStringType,
|
||||||
|
targetChannelName: this.name,
|
||||||
|
passphrase: this.passphrase,
|
||||||
|
timestamp: Date.now()
|
||||||
|
});
|
||||||
|
this.push(messageToSend);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import * as plugins from './smartuniverse.plugins';
|
|||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces';
|
||||||
import { UniverseChannel } from './smartuniverse.classes.universechannel';
|
import { UniverseChannel } from './smartuniverse.classes.universechannel';
|
||||||
import { UniverseCache } from './smartuniverse.classes.universecache';
|
import { UniverseCache } from './smartuniverse.classes.universecache';
|
||||||
|
import { Universe } from './smartuniverse.classes.universe';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* represents a connection to the universe
|
* represents a connection to the universe
|
||||||
@ -12,17 +13,20 @@ export class UniverseConnection {
|
|||||||
* @param universeConnectionArg
|
* @param universeConnectionArg
|
||||||
*/
|
*/
|
||||||
public static async addConnectionToCache(
|
public static async addConnectionToCache(
|
||||||
universeCache: UniverseCache,
|
universeRef: Universe,
|
||||||
universeConnectionArg: UniverseConnection
|
universeConnectionArg: UniverseConnection
|
||||||
) {
|
) {
|
||||||
let universeConnection = universeConnectionArg;
|
let universeConnection = universeConnectionArg;
|
||||||
universeConnection = await UniverseConnection.deduplicateUniverseConnection(
|
universeConnection = await UniverseConnection.deduplicateUniverseConnection(
|
||||||
universeCache,
|
universeRef.universeCache,
|
||||||
universeConnection
|
universeConnection
|
||||||
);
|
);
|
||||||
universeConnection = await UniverseConnection.authenticateAuthenticationRequests(
|
universeConnection = await UniverseConnection.authenticateAuthenticationRequests(
|
||||||
|
universeRef,
|
||||||
universeConnection
|
universeConnection
|
||||||
);
|
);
|
||||||
|
universeRef.universeCache.connectionMap.add(universeConnection);
|
||||||
|
console.log('hi')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,10 +54,19 @@ export class UniverseConnection {
|
|||||||
/**
|
/**
|
||||||
* authenticate AuthenticationRequests
|
* authenticate AuthenticationRequests
|
||||||
*/
|
*/
|
||||||
public static authenticateAuthenticationRequests(
|
public static async authenticateAuthenticationRequests(
|
||||||
universeConnectionArg
|
universeRef: Universe,
|
||||||
|
universeConnectionArg: UniverseConnection
|
||||||
): Promise<UniverseConnection> {
|
): Promise<UniverseConnection> {
|
||||||
// TODO: authenticate connections
|
for (const authenticationRequest of universeConnectionArg.authenticationRequests) {
|
||||||
|
const universeChannelToAuthenticateAgainst = UniverseChannel.getUniverseChannelByName(
|
||||||
|
universeRef,
|
||||||
|
authenticationRequest.name
|
||||||
|
);
|
||||||
|
if (universeChannelToAuthenticateAgainst.passphrase === authenticationRequest.passphrase) {
|
||||||
|
universeConnectionArg.authenticatedChannels.push(universeChannelToAuthenticateAgainst);
|
||||||
|
}
|
||||||
|
}
|
||||||
return universeConnectionArg;
|
return universeConnectionArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +77,6 @@ export class UniverseConnection {
|
|||||||
connectionArg1: UniverseConnection,
|
connectionArg1: UniverseConnection,
|
||||||
connectionArg2: UniverseConnection
|
connectionArg2: UniverseConnection
|
||||||
) {
|
) {
|
||||||
// TODO: merge connections
|
|
||||||
return connectionArg1;
|
return connectionArg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +99,7 @@ export class UniverseConnection {
|
|||||||
* the socketClient to ping
|
* the socketClient to ping
|
||||||
*/
|
*/
|
||||||
public socketConnection: plugins.smartsocket.SocketConnection;
|
public socketConnection: plugins.smartsocket.SocketConnection;
|
||||||
public authenticationRequests = [];
|
public authenticationRequests: Array<interfaces.ISocketRequest_SubscribeChannel['request']> = [];
|
||||||
public subscribedChannels: UniverseChannel[] = [];
|
public subscribedChannels: UniverseChannel[] = [];
|
||||||
public authenticatedChannels: UniverseChannel[] = [];
|
public authenticatedChannels: UniverseChannel[] = [];
|
||||||
public failedToJoinChannels: UniverseChannel[] = [];
|
public failedToJoinChannels: UniverseChannel[] = [];
|
||||||
@ -102,9 +114,9 @@ export class UniverseConnection {
|
|||||||
|
|
||||||
constructor(optionsArg: {
|
constructor(optionsArg: {
|
||||||
socketConnection: plugins.smartsocket.SocketConnection;
|
socketConnection: plugins.smartsocket.SocketConnection;
|
||||||
authenticationRequests: interfaces.IServerCallSubscribeActionPayload[];
|
authenticationRequests: Array<interfaces.ISocketRequest_SubscribeChannel['request']>;
|
||||||
}) {
|
}) {
|
||||||
// TODO: check if this is correct
|
this.authenticationRequests = optionsArg.authenticationRequests;
|
||||||
this.socketConnection = optionsArg.socketConnection;
|
this.socketConnection = optionsArg.socketConnection;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,27 +7,31 @@ import { Timer, TimeStamp } from '@pushrocks/smarttime';
|
|||||||
import { Universe } from './smartuniverse.classes.universe';
|
import { Universe } from './smartuniverse.classes.universe';
|
||||||
import { UniverseChannel } from './smartuniverse.classes.universechannel';
|
import { UniverseChannel } from './smartuniverse.classes.universechannel';
|
||||||
import { UniverseCache } from './smartuniverse.classes.universecache';
|
import { UniverseCache } from './smartuniverse.classes.universecache';
|
||||||
import { IUniverseMessage } from './interfaces';
|
import { SocketConnection } from '@pushrocks/smartsocket';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* represents a message within a universe
|
* represents a message within a universe
|
||||||
* acts as a container to save message states like authentication status
|
* acts as a container to save message states like authentication status
|
||||||
*/
|
*/
|
||||||
export class UniverseMessage implements interfaces.IUniverseMessage {
|
export class UniverseMessage implements interfaces.IUniverseMessage {
|
||||||
public static createMessageFromPayload(dataArg: interfaces.IUniverseMessage) {
|
public static createMessageFromPayload(
|
||||||
return new UniverseMessage(dataArg);
|
socketConnectionArg: SocketConnection,
|
||||||
|
dataArg: interfaces.IUniverseMessage
|
||||||
|
) {
|
||||||
|
const universeMessageInstance = new UniverseMessage(dataArg);
|
||||||
|
universeMessageInstance.socketConnection = socketConnectionArg;
|
||||||
|
return universeMessageInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
public timestamp: number;
|
public timestamp: number;
|
||||||
public smartTimestamp: TimeStamp;
|
public smartTimestamp: TimeStamp;
|
||||||
|
|
||||||
public messageText: string;
|
public messageText: string;
|
||||||
public passphrase: string;
|
public passphrase: string;
|
||||||
public payload: any;
|
public payload: any;
|
||||||
public payloadStringType;
|
public payloadStringType;
|
||||||
public targetChannelName: string;
|
public targetChannelName: string;
|
||||||
|
public socketConnection: SocketConnection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the UniverseCache the message is attached to
|
* the UniverseCache the message is attached to
|
||||||
@ -42,7 +46,7 @@ export class UniverseMessage implements interfaces.IUniverseMessage {
|
|||||||
/**
|
/**
|
||||||
* wether the message is authenticated
|
* wether the message is authenticated
|
||||||
*/
|
*/
|
||||||
public authenticated: boolean = null;
|
public authenticated: boolean = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* a destruction timer for this message
|
* a destruction timer for this message
|
||||||
@ -54,7 +58,7 @@ export class UniverseMessage implements interfaces.IUniverseMessage {
|
|||||||
* @param messageArg
|
* @param messageArg
|
||||||
* @param attachedPayloadArg
|
* @param attachedPayloadArg
|
||||||
*/
|
*/
|
||||||
constructor(messageDescriptor: IUniverseMessage) {
|
constructor(messageDescriptor: interfaces.IUniverseMessage) {
|
||||||
this.smartTimestamp = new TimeStamp(this.timestamp);
|
this.smartTimestamp = new TimeStamp(this.timestamp);
|
||||||
this.messageText = messageDescriptor.messageText;
|
this.messageText = messageDescriptor.messageText;
|
||||||
this.targetChannelName = messageDescriptor.targetChannelName;
|
this.targetChannelName = messageDescriptor.targetChannelName;
|
||||||
@ -68,6 +72,8 @@ export class UniverseMessage implements interfaces.IUniverseMessage {
|
|||||||
this.universeCache = universeCacheArg;
|
this.universeCache = universeCacheArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public setTargetChannel() {}
|
||||||
|
|
||||||
public setDestructionTimer(selfdestructAfterArg: number) {
|
public setDestructionTimer(selfdestructAfterArg: number) {
|
||||||
if (selfdestructAfterArg) {
|
if (selfdestructAfterArg) {
|
||||||
this.destructionTimer = new Timer(selfdestructAfterArg);
|
this.destructionTimer = new Timer(selfdestructAfterArg);
|
||||||
@ -86,7 +92,7 @@ export class UniverseMessage implements interfaces.IUniverseMessage {
|
|||||||
* handles bad messages for further analysis
|
* handles bad messages for further analysis
|
||||||
*/
|
*/
|
||||||
public handleAsBadMessage() {
|
public handleAsBadMessage() {
|
||||||
console.log('received a bad message');
|
plugins.smartlog.defaultLogger.log('warn', 'received a bad message');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,12 +3,20 @@ import * as path from 'path';
|
|||||||
|
|
||||||
export { path };
|
export { path };
|
||||||
|
|
||||||
|
// apiglobal scope
|
||||||
|
import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
|
||||||
|
|
||||||
|
export {
|
||||||
|
typedrequestInterfaces
|
||||||
|
};
|
||||||
|
|
||||||
// pushrocks scope
|
// pushrocks scope
|
||||||
import * as lik from '@pushrocks/lik';
|
import * as lik from '@pushrocks/lik';
|
||||||
import * as smarthash from '@pushrocks/smarthash';
|
import * as smarthash from '@pushrocks/smarthash';
|
||||||
import * as smartdelay from '@pushrocks/smartdelay';
|
import * as smartdelay from '@pushrocks/smartdelay';
|
||||||
import * as smartexpress from '@pushrocks/smartexpress';
|
import * as smartexpress from '@pushrocks/smartexpress';
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@pushrocks/smartfile';
|
||||||
|
import * as smartlog from '@pushrocks/smartlog';
|
||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as smartpromise from '@pushrocks/smartpromise';
|
||||||
import * as smartrequest from '@pushrocks/smartrequest';
|
import * as smartrequest from '@pushrocks/smartrequest';
|
||||||
import * as smartrx from '@pushrocks/smartrx';
|
import * as smartrx from '@pushrocks/smartrx';
|
||||||
@ -22,6 +30,7 @@ export {
|
|||||||
smartdelay,
|
smartdelay,
|
||||||
smartexpress,
|
smartexpress,
|
||||||
smartfile,
|
smartfile,
|
||||||
|
smartlog,
|
||||||
smartpromise,
|
smartpromise,
|
||||||
smartrx,
|
smartrx,
|
||||||
smartrequest,
|
smartrequest,
|
||||||
|
Reference in New Issue
Block a user