Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
29c0c8dc23 | |||
8157f2a56b | |||
2f528d1812 | |||
139c71a451 | |||
4678e44d16 | |||
af9f590349 | |||
d43ad80784 | |||
b1017121ea | |||
a8a91b4db2 | |||
67c4b06c4d | |||
7693b52066 | |||
30a02ae48b | |||
241182ed2e | |||
3d82038ec3 | |||
300d62ed12 | |||
a5e849aa17 | |||
83807d7c5c | |||
39d3a0f2f8 | |||
904a48d414 | |||
e2acb28756 | |||
92e4379bd2 | |||
e0ce732ee1 | |||
98be0f036c | |||
54fca17142 | |||
1a7634e8db | |||
8830b825ac | |||
123324bf43 |
461
package-lock.json
generated
461
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartuniverse",
|
"name": "@pushrocks/smartuniverse",
|
||||||
"version": "1.0.32",
|
"version": "1.0.46",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -14,6 +14,26 @@
|
|||||||
"nan": "^2.9.2"
|
"nan": "^2.9.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@babel/code-frame": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@babel/highlight": "^7.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@babel/highlight": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^2.0.0",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"js-tokens": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@gitzone/tsbuild": {
|
"@gitzone/tsbuild": {
|
||||||
"version": "2.1.8",
|
"version": "2.1.8",
|
||||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.8.tgz",
|
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.8.tgz",
|
||||||
@ -176,48 +196,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartexpress": {
|
"@pushrocks/smartexpress": {
|
||||||
"version": "3.0.18",
|
"version": "3.0.19",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexpress/-/smartexpress-3.0.18.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexpress/-/smartexpress-3.0.19.tgz",
|
||||||
"integrity": "sha512-iunVt5aZ+h7gH67Sys+XKFojVXMseOfMNMw9+6Ofvbdkj/S0VEpm4BIafeNsNsbNcWlT0JYBQO9ylWp9Hh6nmQ==",
|
"integrity": "sha512-3dN43yy2wRcj36w0sX0h6z1Xg9cxXiw84Ohn9QulFVWZeiCwHmBC15uSAVBMBCd1e87aDfEL9wzrRii+0PcwAA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^3.0.4",
|
"@pushrocks/lik": "^3.0.5",
|
||||||
"@pushrocks/smartfile": "^6.0.11",
|
"@pushrocks/smartfile": "^7.0.2",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/smartrequest": "^1.1.14",
|
"@pushrocks/smartrequest": "^1.1.15",
|
||||||
"@types/express": "^4.16.0",
|
"@types/express": "^4.16.1",
|
||||||
"@types/finalhandler": "0.0.33",
|
"@types/finalhandler": "^1.1.0",
|
||||||
"@types/helmet": "0.0.42",
|
"@types/helmet": "0.0.43",
|
||||||
"@types/serve-static": "^1.13.2",
|
"@types/serve-static": "^1.13.2",
|
||||||
"body-parser": "^1.18.3",
|
"body-parser": "^1.18.3",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.16.4",
|
"express": "^4.16.4",
|
||||||
"express-force-ssl": "^0.3.2",
|
"express-force-ssl": "^0.3.2",
|
||||||
"helmet": "^3.15.0",
|
"helmet": "^3.16.0",
|
||||||
"rendertron-middleware": "^0.1.5",
|
"rendertron-middleware": "^0.1.5",
|
||||||
"sitemap": "^2.1.0"
|
"sitemap": "^2.1.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@pushrocks/smartfile": {
|
|
||||||
"version": "6.0.12",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-6.0.12.tgz",
|
|
||||||
"integrity": "sha512-89abBQgZ/90YWTjVD2ZMkgO4Em4XM0xLf1wPBG4s1yVCdwBSrVX/Eg1EvHyNEk7lbule0NoBmCAvHcIb95FRXQ==",
|
|
||||||
"requires": {
|
|
||||||
"@pushrocks/smartpath": "^4.0.1",
|
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
|
||||||
"@pushrocks/smartrequest": "^1.1.14",
|
|
||||||
"@types/fs-extra": "^5.0.4",
|
|
||||||
"@types/vinyl": "^2.0.2",
|
|
||||||
"fs-extra": "^7.0.1",
|
|
||||||
"glob": "^7.1.3",
|
|
||||||
"js-yaml": "^3.12.1",
|
|
||||||
"vinyl-file": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@pushrocks/smartpromise": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartfile": {
|
"@pushrocks/smartfile": {
|
||||||
@ -296,20 +293,13 @@
|
|||||||
"integrity": "sha512-jmrJMUEmBCWChWK8CIcx4Vw3wv/8OgVNmkaxJrbs+WMaoRUfJtpWWJfrAwwHWt9ZXJbarJ+CwfwfYiiZXymndQ=="
|
"integrity": "sha512-jmrJMUEmBCWChWK8CIcx4Vw3wv/8OgVNmkaxJrbs+WMaoRUfJtpWWJfrAwwHWt9ZXJbarJ+CwfwfYiiZXymndQ=="
|
||||||
},
|
},
|
||||||
"@pushrocks/smartrequest": {
|
"@pushrocks/smartrequest": {
|
||||||
"version": "1.1.14",
|
"version": "1.1.15",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrequest/-/smartrequest-1.1.14.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartrequest/-/smartrequest-1.1.15.tgz",
|
||||||
"integrity": "sha512-+sDQB4Mxvpn8BIMPUQ7TPSCKUVMln3tHC4rp4pmfEHmBQK+g1XwtNr59aMA9kEoBDMt7li1hu+1cs+SNsWt6Gw==",
|
"integrity": "sha512-MBOOTTdqWy+HvWS4Lt8jzITxF2hYyQ3/OjB28CpTAkPuKsDyLi9HEngvFufKu5EbKwBGwCVdeF7vQSpLRSoDtA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@types/form-data": "^2.2.1",
|
"@types/form-data": "^2.2.1",
|
||||||
"form-data": "^2.3.2"
|
"form-data": "^2.3.3"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@pushrocks/smartpromise": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartrx": {
|
"@pushrocks/smartrx": {
|
||||||
@ -350,28 +340,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartsocket": {
|
"@pushrocks/smartsocket": {
|
||||||
"version": "1.1.27",
|
"version": "1.1.35",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsocket/-/smartsocket-1.1.27.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsocket/-/smartsocket-1.1.35.tgz",
|
||||||
"integrity": "sha512-rxHWOoGTbDyRi+LQRTFe1kgnlik8uPDjRpz60U49yQU7mexGbeK6HPevgaiQH6wsmorrN64KMWCnwCrPAFQDXA==",
|
"integrity": "sha512-+w76ksJvQA4FBVIIyVBTef4y38PeXZNnXy/EBy4OQ0pepsgMs9gYcWLFpU4g4WY5yVcQ8vNTNU/rM/osHG4OJA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^3.0.4",
|
"@pushrocks/lik": "^3.0.5",
|
||||||
"@pushrocks/smartdelay": "^2.0.2",
|
"@pushrocks/smartdelay": "^2.0.3",
|
||||||
|
"@pushrocks/smartexpress": "^3.0.19",
|
||||||
"@pushrocks/smarthash": "^2.0.4",
|
"@pushrocks/smarthash": "^2.0.4",
|
||||||
"@pushrocks/smartlog": "^2.0.16",
|
"@pushrocks/smartlog": "^2.0.19",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@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.14",
|
||||||
"socket.io": "^2.2.0",
|
"socket.io": "^2.2.0",
|
||||||
"socket.io-client": "^2.2.0"
|
"socket.io-client": "^2.2.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@pushrocks/smartpromise": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smarttime": {
|
"@pushrocks/smarttime": {
|
||||||
@ -386,6 +370,17 @@
|
|||||||
"luxon": "^1.12.1"
|
"luxon": "^1.12.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@pushrocks/smartunique": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartunique/-/smartunique-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-xBu9ZB4C0BA0S/pbFFZn2ItPfnodPKpzrYIq1yN5XDs6OaookwcDF/iBwfS9+EYMSPENC9wAsOxg2RGMm4Qicw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/shortid": "^0.0.29",
|
||||||
|
"@types/uuid": "^3.0.0",
|
||||||
|
"shortid": "^2.2.8",
|
||||||
|
"uuid": "^3.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@pushrocks/tapbundle": {
|
"@pushrocks/tapbundle": {
|
||||||
"version": "3.0.9",
|
"version": "3.0.9",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.0.9.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.0.9.tgz",
|
||||||
@ -460,9 +455,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/express-serve-static-core": {
|
"@types/express-serve-static-core": {
|
||||||
"version": "4.16.2",
|
"version": "4.16.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fexpress-serve-static-core/-/express-serve-static-core-4.16.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fexpress-serve-static-core/-/express-serve-static-core-4.16.3.tgz",
|
||||||
"integrity": "sha512-qgc8tjnDrc789rAQed8NoiFLV5VGcItA4yWNFphqGU0RcuuQngD00g3LHhWIK3HQ2XeDgVCmlNPDlqi3fWBHnQ==",
|
"integrity": "sha512-HFgBmRDTvdnrRFXqBr2NM2NUCu6fIpzJsUTlRVENF8lxvstof7cl9Fxfwq5S0kJbO/FsPVcjlxpOM3ZxIkn7Rw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/range-parser": "*"
|
"@types/range-parser": "*"
|
||||||
@ -475,9 +470,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/finalhandler": {
|
"@types/finalhandler": {
|
||||||
"version": "0.0.33",
|
"version": "1.1.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2ffinalhandler/-/finalhandler-0.0.33.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2ffinalhandler/-/finalhandler-1.1.0.tgz",
|
||||||
"integrity": "sha512-nV2BixeE7zsjupfRymHLzmBaiXVKVtLELNJhD+MA3EWxSc9Gm68NhpY+quigOlkOpUoDTu8hZWs58yRFgUM5gw==",
|
"integrity": "sha512-iMD07b+UPNuqA6cm3yjbTJUfFfZNZpDc6MGQGK60jy5sdqX1W4wUC5RAi3FhaW72+RmVnzYxba8byPP9FWL8/w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
@ -499,9 +494,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/helmet": {
|
"@types/helmet": {
|
||||||
"version": "0.0.42",
|
"version": "0.0.43",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fhelmet/-/helmet-0.0.42.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fhelmet/-/helmet-0.0.43.tgz",
|
||||||
"integrity": "sha512-xQjlolRfr7LVa55sGnjtJGcV6/Hf7cfD1IuZo1Do+o3UobOoJJSLIbwkhd9tW18F1Kp4uB77T8TsJ2XKUDwp7g==",
|
"integrity": "sha512-45cU1ZW3L6ZxPQzAB597nl7OfUr14ceUWaQRoiByGFAjZlCQRvaEFC4Vv84lLWsFCYVWLU+raz+bIHrVBNTdRw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/express": "*"
|
"@types/express": "*"
|
||||||
}
|
}
|
||||||
@ -522,9 +517,9 @@
|
|||||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "11.13.4",
|
"version": "11.13.7",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-11.13.4.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-11.13.7.tgz",
|
||||||
"integrity": "sha512-+rabAZZ3Yn7tF/XPGHupKIL5EcAbrLxnTr/hgQICxbeuAfWtT0UZSfULE+ndusckBItcv4o6ZeOJplQikVcLvQ=="
|
"integrity": "sha512-suFHr6hcA9mp8vFrZTgrmqW2ZU3mbWsryQtQlY/QvwTISCw7nw/j+bCQPPohqmskhmqa5wLNuMHTTsc+xf1MQg=="
|
||||||
},
|
},
|
||||||
"@types/range-parser": {
|
"@types/range-parser": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
@ -566,6 +561,14 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/uuid": {
|
||||||
|
"version": "3.4.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.4.tgz",
|
||||||
|
"integrity": "sha512-tPIgT0GUmdJQNSHxp0X2jnpQfBSTfGxUMc/2CXBU2mnyTFVYVa2ojpoQ74w0U2yn2vw3jnC640+77lkFFpdVDw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/vinyl": {
|
"@types/vinyl": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fvinyl/-/vinyl-2.0.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fvinyl/-/vinyl-2.0.3.tgz",
|
||||||
@ -624,10 +627,13 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ansi-styles": {
|
"ansi-styles": {
|
||||||
"version": "2.2.1",
|
"version": "3.2.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^1.9.0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
@ -692,47 +698,6 @@
|
|||||||
"resolved": "https://verdaccio.lossless.one/aws4/-/aws4-1.8.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/aws4/-/aws4-1.8.0.tgz",
|
||||||
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
|
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
|
||||||
},
|
},
|
||||||
"babel-code-frame": {
|
|
||||||
"version": "6.26.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
|
||||||
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"chalk": "^1.1.3",
|
|
||||||
"esutils": "^2.0.2",
|
|
||||||
"js-tokens": "^3.0.2"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-regex": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
|
||||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"chalk": {
|
|
||||||
"version": "1.1.3",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/chalk/-/chalk-1.1.3.tgz",
|
|
||||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ansi-styles": "^2.2.1",
|
|
||||||
"escape-string-regexp": "^1.0.2",
|
|
||||||
"has-ansi": "^2.0.0",
|
|
||||||
"strip-ansi": "^3.0.0",
|
|
||||||
"supports-color": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"strip-ansi": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
|
||||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ansi-regex": "^2.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"backo2": {
|
"backo2": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/backo2/-/backo2-1.0.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/backo2/-/backo2-1.0.2.tgz",
|
||||||
@ -784,20 +749,20 @@
|
|||||||
"integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
|
"integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
|
||||||
},
|
},
|
||||||
"body-parser": {
|
"body-parser": {
|
||||||
"version": "1.18.3",
|
"version": "1.19.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/body-parser/-/body-parser-1.18.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/body-parser/-/body-parser-1.19.0.tgz",
|
||||||
"integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
|
"integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bytes": "3.0.0",
|
"bytes": "3.1.0",
|
||||||
"content-type": "~1.0.4",
|
"content-type": "~1.0.4",
|
||||||
"debug": "2.6.9",
|
"debug": "2.6.9",
|
||||||
"depd": "~1.1.2",
|
"depd": "~1.1.2",
|
||||||
"http-errors": "~1.6.3",
|
"http-errors": "1.7.2",
|
||||||
"iconv-lite": "0.4.23",
|
"iconv-lite": "0.4.24",
|
||||||
"on-finished": "~2.3.0",
|
"on-finished": "~2.3.0",
|
||||||
"qs": "6.5.2",
|
"qs": "6.7.0",
|
||||||
"raw-body": "2.3.3",
|
"raw-body": "2.4.0",
|
||||||
"type-is": "~1.6.16"
|
"type-is": "~1.6.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
@ -822,9 +787,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"bytes": {
|
"bytes": {
|
||||||
"version": "3.0.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/bytes/-/bytes-3.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/bytes/-/bytes-3.1.0.tgz",
|
||||||
"integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
|
"integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
|
||||||
},
|
},
|
||||||
"callsite": {
|
"callsite": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
@ -885,26 +850,6 @@
|
|||||||
"ansi-styles": "^3.2.1",
|
"ansi-styles": "^3.2.1",
|
||||||
"escape-string-regexp": "^1.0.5",
|
"escape-string-regexp": "^1.0.5",
|
||||||
"supports-color": "^5.3.0"
|
"supports-color": "^5.3.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-styles": {
|
|
||||||
"version": "3.2.1",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
|
||||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"color-convert": "^1.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"supports-color": {
|
|
||||||
"version": "5.5.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/supports-color/-/supports-color-5.5.0.tgz",
|
|
||||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"has-flag": "^3.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"check-error": {
|
"check-error": {
|
||||||
@ -1312,6 +1257,68 @@
|
|||||||
"vary": "~1.1.2"
|
"vary": "~1.1.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"body-parser": {
|
||||||
|
"version": "1.18.3",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/body-parser/-/body-parser-1.18.3.tgz",
|
||||||
|
"integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
|
||||||
|
"requires": {
|
||||||
|
"bytes": "3.0.0",
|
||||||
|
"content-type": "~1.0.4",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "~1.1.2",
|
||||||
|
"http-errors": "~1.6.3",
|
||||||
|
"iconv-lite": "0.4.23",
|
||||||
|
"on-finished": "~2.3.0",
|
||||||
|
"qs": "6.5.2",
|
||||||
|
"raw-body": "2.3.3",
|
||||||
|
"type-is": "~1.6.16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bytes": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/bytes/-/bytes-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
|
||||||
|
},
|
||||||
|
"http-errors": {
|
||||||
|
"version": "1.6.3",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/http-errors/-/http-errors-1.6.3.tgz",
|
||||||
|
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
|
||||||
|
"requires": {
|
||||||
|
"depd": "~1.1.2",
|
||||||
|
"inherits": "2.0.3",
|
||||||
|
"setprototypeof": "1.1.0",
|
||||||
|
"statuses": ">= 1.4.0 < 2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"iconv-lite": {
|
||||||
|
"version": "0.4.23",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/iconv-lite/-/iconv-lite-0.4.23.tgz",
|
||||||
|
"integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
|
||||||
|
"requires": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"qs": {
|
||||||
|
"version": "6.5.2",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/qs/-/qs-6.5.2.tgz",
|
||||||
|
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
|
||||||
|
},
|
||||||
|
"raw-body": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/raw-body/-/raw-body-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==",
|
||||||
|
"requires": {
|
||||||
|
"bytes": "3.0.0",
|
||||||
|
"http-errors": "1.6.3",
|
||||||
|
"iconv-lite": "0.4.23",
|
||||||
|
"unpipe": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"setprototypeof": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/setprototypeof/-/setprototypeof-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
|
||||||
|
},
|
||||||
"statuses": {
|
"statuses": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/statuses/-/statuses-1.4.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/statuses/-/statuses-1.4.0.tgz",
|
||||||
@ -1511,23 +1518,6 @@
|
|||||||
"har-schema": "^2.0.0"
|
"har-schema": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"has-ansi": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/has-ansi/-/has-ansi-2.0.0.tgz",
|
|
||||||
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ansi-regex": "^2.0.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-regex": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
|
||||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"has-binary2": {
|
"has-binary2": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/has-binary2/-/has-binary2-1.0.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/has-binary2/-/has-binary2-1.0.3.tgz",
|
||||||
@ -1625,14 +1615,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"http-errors": {
|
"http-errors": {
|
||||||
"version": "1.6.3",
|
"version": "1.7.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/http-errors/-/http-errors-1.6.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/http-errors/-/http-errors-1.7.2.tgz",
|
||||||
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
|
"integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"depd": "~1.1.2",
|
"depd": "~1.1.2",
|
||||||
"inherits": "2.0.3",
|
"inherits": "2.0.3",
|
||||||
"setprototypeof": "1.1.0",
|
"setprototypeof": "1.1.1",
|
||||||
"statuses": ">= 1.4.0 < 2"
|
"statuses": ">= 1.5.0 < 2",
|
||||||
|
"toidentifier": "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"http-signature": {
|
"http-signature": {
|
||||||
@ -1646,9 +1637,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"iconv-lite": {
|
"iconv-lite": {
|
||||||
"version": "0.4.23",
|
"version": "0.4.24",
|
||||||
"resolved": "https://verdaccio.lossless.one/iconv-lite/-/iconv-lite-0.4.23.tgz",
|
"resolved": "https://verdaccio.lossless.one/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||||
"integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
|
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"safer-buffer": ">= 2.1.2 < 3"
|
"safer-buffer": ">= 2.1.2 < 3"
|
||||||
}
|
}
|
||||||
@ -1684,9 +1675,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ipaddr.js": {
|
"ipaddr.js": {
|
||||||
"version": "1.8.0",
|
"version": "1.9.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/ipaddr.js/-/ipaddr.js-1.8.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
|
||||||
"integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4="
|
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
|
||||||
},
|
},
|
||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
@ -1733,9 +1724,9 @@
|
|||||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||||
},
|
},
|
||||||
"js-tokens": {
|
"js-tokens": {
|
||||||
"version": "3.0.2",
|
"version": "4.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/js-tokens/-/js-tokens-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"js-yaml": {
|
"js-yaml": {
|
||||||
@ -2165,9 +2156,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parseurl": {
|
"parseurl": {
|
||||||
"version": "1.3.2",
|
"version": "1.3.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/parseurl/-/parseurl-1.3.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/parseurl/-/parseurl-1.3.3.tgz",
|
||||||
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
|
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
|
||||||
},
|
},
|
||||||
"path-exists": {
|
"path-exists": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
@ -2230,12 +2221,12 @@
|
|||||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
|
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
|
||||||
},
|
},
|
||||||
"proxy-addr": {
|
"proxy-addr": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.5",
|
||||||
"resolved": "https://verdaccio.lossless.one/proxy-addr/-/proxy-addr-2.0.4.tgz",
|
"resolved": "https://verdaccio.lossless.one/proxy-addr/-/proxy-addr-2.0.5.tgz",
|
||||||
"integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==",
|
"integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"forwarded": "~0.1.2",
|
"forwarded": "~0.1.2",
|
||||||
"ipaddr.js": "1.8.0"
|
"ipaddr.js": "1.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"psl": {
|
"psl": {
|
||||||
@ -2259,9 +2250,9 @@
|
|||||||
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
|
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
|
||||||
},
|
},
|
||||||
"qs": {
|
"qs": {
|
||||||
"version": "6.5.2",
|
"version": "6.7.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/qs/-/qs-6.5.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/qs/-/qs-6.7.0.tgz",
|
||||||
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
|
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
|
||||||
},
|
},
|
||||||
"range-parser": {
|
"range-parser": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@ -2269,13 +2260,13 @@
|
|||||||
"integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
|
"integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
|
||||||
},
|
},
|
||||||
"raw-body": {
|
"raw-body": {
|
||||||
"version": "2.3.3",
|
"version": "2.4.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/raw-body/-/raw-body-2.3.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/raw-body/-/raw-body-2.4.0.tgz",
|
||||||
"integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==",
|
"integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bytes": "3.0.0",
|
"bytes": "3.1.0",
|
||||||
"http-errors": "1.6.3",
|
"http-errors": "1.7.2",
|
||||||
"iconv-lite": "0.4.23",
|
"iconv-lite": "0.4.24",
|
||||||
"unpipe": "1.0.0"
|
"unpipe": "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2342,6 +2333,13 @@
|
|||||||
"tough-cookie": "~2.4.3",
|
"tough-cookie": "~2.4.3",
|
||||||
"tunnel-agent": "^0.6.0",
|
"tunnel-agent": "^0.6.0",
|
||||||
"uuid": "^3.3.2"
|
"uuid": "^3.3.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"qs": {
|
||||||
|
"version": "6.5.2",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/qs/-/qs-6.5.2.tgz",
|
||||||
|
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require-directory": {
|
"require-directory": {
|
||||||
@ -2409,6 +2407,22 @@
|
|||||||
"statuses": "~1.4.0"
|
"statuses": "~1.4.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"http-errors": {
|
||||||
|
"version": "1.6.3",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/http-errors/-/http-errors-1.6.3.tgz",
|
||||||
|
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
|
||||||
|
"requires": {
|
||||||
|
"depd": "~1.1.2",
|
||||||
|
"inherits": "2.0.3",
|
||||||
|
"setprototypeof": "1.1.0",
|
||||||
|
"statuses": ">= 1.4.0 < 2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"setprototypeof": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/setprototypeof/-/setprototypeof-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
|
||||||
|
},
|
||||||
"statuses": {
|
"statuses": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/statuses/-/statuses-1.4.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/statuses/-/statuses-1.4.0.tgz",
|
||||||
@ -2434,9 +2448,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"setprototypeof": {
|
"setprototypeof": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/setprototypeof/-/setprototypeof-1.1.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/setprototypeof/-/setprototypeof-1.1.1.tgz",
|
||||||
"integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
|
"integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
|
||||||
},
|
},
|
||||||
"shebang-command": {
|
"shebang-command": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@ -2681,10 +2695,13 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"supports-color": {
|
"supports-color": {
|
||||||
"version": "2.0.0",
|
"version": "5.5.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/supports-color/-/supports-color-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^3.0.0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"symbol-tree": {
|
"symbol-tree": {
|
||||||
"version": "3.2.2",
|
"version": "3.2.2",
|
||||||
@ -2704,6 +2721,11 @@
|
|||||||
"resolved": "https://verdaccio.lossless.one/to-array/-/to-array-0.1.4.tgz",
|
"resolved": "https://verdaccio.lossless.one/to-array/-/to-array-0.1.4.tgz",
|
||||||
"integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA="
|
"integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA="
|
||||||
},
|
},
|
||||||
|
"toidentifier": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/toidentifier/-/toidentifier-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
|
||||||
|
},
|
||||||
"tough-cookie": {
|
"tough-cookie": {
|
||||||
"version": "2.4.3",
|
"version": "2.4.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/tough-cookie/-/tough-cookie-2.4.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/tough-cookie/-/tough-cookie-2.4.3.tgz",
|
||||||
@ -2739,12 +2761,12 @@
|
|||||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||||
},
|
},
|
||||||
"tslint": {
|
"tslint": {
|
||||||
"version": "5.15.0",
|
"version": "5.16.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz",
|
||||||
"integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==",
|
"integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"babel-code-frame": "^6.22.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",
|
||||||
@ -2794,12 +2816,27 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"type-is": {
|
"type-is": {
|
||||||
"version": "1.6.16",
|
"version": "1.6.18",
|
||||||
"resolved": "https://verdaccio.lossless.one/type-is/-/type-is-1.6.16.tgz",
|
"resolved": "https://verdaccio.lossless.one/type-is/-/type-is-1.6.18.tgz",
|
||||||
"integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
|
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"media-typer": "0.3.0",
|
"media-typer": "0.3.0",
|
||||||
"mime-types": "~2.1.18"
|
"mime-types": "~2.1.24"
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
|
16
package.json
16
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartuniverse",
|
"name": "@pushrocks/smartuniverse",
|
||||||
"version": "1.0.32",
|
"version": "1.0.46",
|
||||||
"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",
|
||||||
@ -9,6 +9,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/)",
|
"test": "(tstest test/)",
|
||||||
|
"testManual": "(tsrun test/test.ts)",
|
||||||
"build": "(tsbuild)",
|
"build": "(tsbuild)",
|
||||||
"format": "(gitzone format)"
|
"format": "(gitzone format)"
|
||||||
},
|
},
|
||||||
@ -16,8 +17,8 @@
|
|||||||
"@gitzone/tsbuild": "^2.1.8",
|
"@gitzone/tsbuild": "^2.1.8",
|
||||||
"@gitzone/tstest": "^1.0.20",
|
"@gitzone/tstest": "^1.0.20",
|
||||||
"@pushrocks/tapbundle": "^3.0.9",
|
"@pushrocks/tapbundle": "^3.0.9",
|
||||||
"@types/node": "^11.13.4",
|
"@types/node": "^11.13.7",
|
||||||
"tslint": "^5.15.0",
|
"tslint": "^5.16.0",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@ -26,13 +27,14 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^3.0.5",
|
"@pushrocks/lik": "^3.0.5",
|
||||||
"@pushrocks/smartdelay": "^2.0.3",
|
"@pushrocks/smartdelay": "^2.0.3",
|
||||||
"@pushrocks/smartexpress": "^3.0.18",
|
"@pushrocks/smartexpress": "^3.0.19",
|
||||||
"@pushrocks/smartfile": "^7.0.2",
|
"@pushrocks/smartfile": "^7.0.2",
|
||||||
"@pushrocks/smarthash": "^2.0.4",
|
"@pushrocks/smarthash": "^2.0.4",
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/smartrequest": "^1.1.14",
|
"@pushrocks/smartrequest": "^1.1.15",
|
||||||
"@pushrocks/smartrx": "^2.0.3",
|
"@pushrocks/smartrx": "^2.0.3",
|
||||||
"@pushrocks/smartsocket": "^1.1.27",
|
"@pushrocks/smartsocket": "^1.1.35",
|
||||||
"@pushrocks/smarttime": "^3.0.7"
|
"@pushrocks/smarttime": "^3.0.7",
|
||||||
|
"@pushrocks/smartunique": "^3.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
27
readme.md
27
readme.md
@ -20,9 +20,32 @@ messaging service for micro services
|
|||||||
|
|
||||||
Use TypeScript for best in class instellisense.
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
### What does smartuniverse all about?
|
### What is smartuniverse all about?
|
||||||
|
|
||||||
Think WhatsApp, but for your microservices architecture. It allows your services to securely talk to each other in private, shielded channels without having to expose anything to the outside world. This allows the use of reactive programming across your entire stack.
|
Think WhatsApp, but for your microservices architecture. It allows your services to securely talk to each other in **private, shielded channels** without having to expose anything to the outside world. This allows the use of **reactive programming across your entire stack**.
|
||||||
|
|
||||||
|
### Server side
|
||||||
|
|
||||||
|
every universe has a server that manages messages.
|
||||||
|
Think Kafka, but without Kafka.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import * as smartuniverse from '@pushrocks/smartuniverse';
|
||||||
|
|
||||||
|
const myUniverse = new smartuniverse.Universe({
|
||||||
|
messageExpiryInMilliseconds: 60000 // the standard time in milliseconds until a message expires
|
||||||
|
});
|
||||||
|
|
||||||
|
// create as many channels as you like
|
||||||
|
myUniverse.addChannel('awesomeChannel', 'awesomeChannelPass');
|
||||||
|
myUniverse.addChannel('awesomeChannel2', 'jhkjhfsdf87eerkjslkfja9');
|
||||||
|
|
||||||
|
myUniverse.start(8765); // start the server and provide the port on which to listen on
|
||||||
|
```
|
||||||
|
|
||||||
|
### Client side
|
||||||
|
|
||||||
|
All your microservices represents clients in the universe that may talk to each other using the universe server.
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
47
test/test.ts
47
test/test.ts
@ -5,9 +5,19 @@ import * as smartuniverse from '../ts/index';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
let testUniverse: smartuniverse.Universe;
|
let testUniverse: smartuniverse.Universe;
|
||||||
let testUniverseClient: smartuniverse.ClientUniverse;
|
let testClientUniverse: smartuniverse.ClientUniverse;
|
||||||
|
let testClientUniverse2: smartuniverse.ClientUniverse;
|
||||||
let testClientChannel: smartuniverse.ClientUniverseChannel;
|
let testClientChannel: smartuniverse.ClientUniverseChannel;
|
||||||
|
|
||||||
|
const testServerData = {
|
||||||
|
serverAddress: 'http://localhost:8765'
|
||||||
|
};
|
||||||
|
|
||||||
|
const testChannelData = {
|
||||||
|
channelName: 'awesomeTestChannel',
|
||||||
|
channelPass: 'awesomeChannelPAss'
|
||||||
|
};
|
||||||
|
|
||||||
tap.test('first test', async () => {
|
tap.test('first test', async () => {
|
||||||
testUniverse = new smartuniverse.Universe({
|
testUniverse = new smartuniverse.Universe({
|
||||||
messageExpiryInMilliseconds: 1000
|
messageExpiryInMilliseconds: 1000
|
||||||
@ -15,36 +25,53 @@ tap.test('first test', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.test('add a message to the SmartUniverse', async () => {
|
tap.test('add a message to the SmartUniverse', async () => {
|
||||||
await testUniverse.initServer(8765);
|
await testUniverse.start(8765);
|
||||||
});
|
});
|
||||||
|
|
||||||
// testing message handling
|
// testing message handling
|
||||||
tap.test('create smartuniverse client', async () => {
|
tap.test('create smartuniverse client', async () => {
|
||||||
testUniverseClient = new smartuniverse.ClientUniverse({
|
testClientUniverse = new smartuniverse.ClientUniverse({
|
||||||
serverAddress: 'http://localhost:8765'
|
serverAddress: testServerData.serverAddress
|
||||||
});
|
});
|
||||||
expect(testUniverseClient).to.be.instanceof(smartuniverse.ClientUniverse);
|
expect(testClientUniverse).to.be.instanceof(smartuniverse.ClientUniverse);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should add a channel to the universe', async () => {
|
tap.test('should add a channel to the universe', async () => {
|
||||||
await testUniverse.addChannel('testChannel', 'testPassword');
|
await testUniverse.addChannel(testChannelData.channelName, testChannelData.channelPass);
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('should add the same channel to the client universe in the same way', async () => {
|
||||||
|
await testClientUniverse.addChannel(testChannelData.channelName, testChannelData.channelPass);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should get a observable correctly', async () => {
|
tap.test('should get a observable correctly', async () => {
|
||||||
testClientChannel = await testUniverseClient.getChannel('testChannel');
|
testClientChannel = await 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 testUniverseClient.sendMessage('greeting', {
|
await testClientUniverse.sendMessage({
|
||||||
anyBool: true
|
messageText: 'hello',
|
||||||
|
targetChannelName: testChannelData.channelName
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
tap.test('universe should contain the sent message', async () => {
|
||||||
|
expect(testUniverse.universeCache.messageMap.getArray()[0].messageText).to.equal('hello');
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('a second client should be able to subscibe', async () => {
|
||||||
|
testClientUniverse2 = new smartuniverse.ClientUniverse({
|
||||||
|
serverAddress: testServerData.serverAddress
|
||||||
|
});
|
||||||
|
|
||||||
|
testClientUniverse2.addChannel(testChannelData.channelName, testChannelData.channelPass);
|
||||||
|
});
|
||||||
|
|
||||||
tap.test('should receive a message correctly', async () => {});
|
tap.test('should receive a message correctly', async () => {});
|
||||||
|
|
||||||
tap.test('should disconnect the client correctly', async () => {
|
tap.test('should disconnect the client correctly', async () => {
|
||||||
testUniverseClient.close();
|
testClientUniverse.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should end the server correctly', async tools => {
|
tap.test('should end the server correctly', async tools => {
|
||||||
|
@ -12,4 +12,4 @@ export interface IServerPutMessageRequestBody {
|
|||||||
passphrase: string;
|
passphrase: string;
|
||||||
message: string;
|
message: string;
|
||||||
payload: any;
|
payload: any;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export * from './http.interfaces';
|
export * from './http.interfaces';
|
||||||
export * from './universechannel.interfaces';
|
export * from './universechannel.interfaces';
|
||||||
export * from './universemessage.interfaces';
|
export * from './universemessage.interfaces';
|
||||||
|
export * from './universeactions.interfaces';
|
||||||
|
13
ts/interfaces/universeactions.interfaces.ts
Normal file
13
ts/interfaces/universeactions.interfaces.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
export type IServerCallActions = 'subscribe' | 'sendmessage' | 'unsubscribe';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the interface for a subscription
|
||||||
|
*/
|
||||||
|
export interface IServerCallSubscribeActionPayload {
|
||||||
|
name: string;
|
||||||
|
passphrase: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IServerUnsubscribeActionPayload {
|
||||||
|
name: string;
|
||||||
|
}
|
@ -1 +1,15 @@
|
|||||||
export interface IUniverseMessage {}
|
export interface IMessageCreator {
|
||||||
|
messageText: string;
|
||||||
|
payload?: string | number | any;
|
||||||
|
payloadStringType?: 'Buffer' | 'string' | 'object';
|
||||||
|
targetChannelName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IUniverseMessage extends IMessageCreator {
|
||||||
|
id: string;
|
||||||
|
/**
|
||||||
|
* time of creation
|
||||||
|
*/
|
||||||
|
timestamp: number;
|
||||||
|
passphrase: string;
|
||||||
|
}
|
||||||
|
@ -7,10 +7,10 @@ import * as url from 'url';
|
|||||||
|
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces';
|
||||||
|
|
||||||
|
import { ClientUniverseChannel, UniverseMessage } from './';
|
||||||
import {
|
import {
|
||||||
ClientUniverseChannel,
|
ClientUniverseCache
|
||||||
UniverseMessage
|
} from './smartuniverse.classes.clientuniversecache';
|
||||||
} from './';
|
|
||||||
|
|
||||||
export interface IClientOptions {
|
export interface IClientOptions {
|
||||||
serverAddress: string;
|
serverAddress: string;
|
||||||
@ -22,53 +22,121 @@ export interface IClientOptions {
|
|||||||
*/
|
*/
|
||||||
export class ClientUniverse {
|
export class ClientUniverse {
|
||||||
public options;
|
public options;
|
||||||
public socketClient: plugins.smartsocket.SmartsocketClient;
|
public smartsocketClient: plugins.smartsocket.SmartsocketClient;
|
||||||
public observableIntake: plugins.smartrx.ObservableIntake<UniverseMessage>;
|
public observableIntake: plugins.smartrx.ObservableIntake<UniverseMessage>;
|
||||||
|
|
||||||
public channelCache = new Objectmap<ClientUniverseChannel>();
|
public channelStore = new Objectmap<ClientUniverseChannel>();
|
||||||
|
public clientUniverseCache = new ClientUniverseCache();
|
||||||
|
|
||||||
constructor(optionsArg: IClientOptions) {
|
constructor(optionsArg: IClientOptions) {
|
||||||
this.options = optionsArg;
|
this.options = optionsArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async sendMessage(messageArg, payloadArg) {
|
/**
|
||||||
const requestBody: interfaces.IUniverseMessage = {
|
* adds a channel to the channelcache
|
||||||
message: messageArg,
|
* TODO: verify channel before adding it to the channel cache
|
||||||
payload: payloadArg
|
*/
|
||||||
};
|
public async addChannel(channelNameArg: string, passphraseArg: string) {
|
||||||
const requestBodyString = JSON.stringify(requestBody);
|
const existingChannel = await this.getChannel(channelNameArg);
|
||||||
// TODO: User websocket connection if available
|
|
||||||
const response = await plugins.smartrequest.postJson(`${this.options.serverAddress}/sendmessage` , {
|
if (existingChannel) {
|
||||||
requestBody: requestBodyString
|
throw new Error('channel exists');
|
||||||
});
|
}
|
||||||
|
|
||||||
|
// lets create the channel
|
||||||
|
ClientUniverseChannel.createClientUniverseChannel(this, channelNameArg, passphraseArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getChannel(channelName: string, passphrase): Promise<ClientUniverseChannel> {
|
/**
|
||||||
|
* gets a channel from the channelcache
|
||||||
|
* @param channelName
|
||||||
|
* @param passphraseArg
|
||||||
|
*/
|
||||||
|
public async getChannel(channelName: string): Promise<ClientUniverseChannel> {
|
||||||
await this.checkConnection();
|
await this.checkConnection();
|
||||||
const clientUniverseChannel = await ClientUniverseChannel.createClientUniverseChannel(
|
const clientUniverseChannel = this.channelStore.find(channel => {
|
||||||
this,
|
return channel.name === channelName;
|
||||||
channelName
|
});
|
||||||
);
|
|
||||||
this.channelCache.add(clientUniverseChannel);
|
|
||||||
return clientUniverseChannel;
|
return clientUniverseChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public close() {
|
/**
|
||||||
this.socketClient.disconnect();
|
* remove a a achannel
|
||||||
|
* @param messageArg
|
||||||
|
*/
|
||||||
|
public removeChannel(channelNameArg, notifyServer = true) {
|
||||||
|
const clientUniverseChannel = this.channelStore.findOneAndRemove(channelItemArg => {
|
||||||
|
return channelItemArg.name === channelNameArg;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private async checkConnection() {
|
|
||||||
if (!this.socketClient && !this.observableIntake) {
|
/**
|
||||||
|
* sends a message towards the server
|
||||||
|
* @param messageArg
|
||||||
|
*/
|
||||||
|
public async sendMessage(messageArg: interfaces.IMessageCreator) {
|
||||||
|
await this.checkConnection();
|
||||||
|
const requestBody: interfaces.IUniverseMessage = {
|
||||||
|
id: plugins.smartunique.shortId(),
|
||||||
|
timestamp: Date.now(),
|
||||||
|
passphrase: (await this.getChannel(messageArg.targetChannelName)).passphrase,
|
||||||
|
...messageArg
|
||||||
|
};
|
||||||
|
// TODO: User websocket connection if available
|
||||||
|
const response = await plugins.smartrequest.postJson(
|
||||||
|
`${this.options.serverAddress}/sendmessage`,
|
||||||
|
{
|
||||||
|
requestBody
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public close() {
|
||||||
|
this.smartsocketClient.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks the connection towards a universe server
|
||||||
|
* since password validation is done through other means, a connection should always be possible
|
||||||
|
*/
|
||||||
|
private async checkConnection(): Promise<void> {
|
||||||
|
if (!this.smartsocketClient && !this.observableIntake) {
|
||||||
const parsedURL = url.parse(this.options.serverAddress);
|
const parsedURL = url.parse(this.options.serverAddress);
|
||||||
this.socketClient = new SmartsocketClient({
|
const socketConfig: plugins.smartsocket.ISmartsocketClientOptions = {
|
||||||
alias: process.env.SOCKET_ALIAS || 'someclient',
|
alias: process.env.SOCKET_ALIAS || 'someclient',
|
||||||
password: 'UniverseClient',
|
password: 'UniverseClient',
|
||||||
port: parseInt(parsedURL.port, 10),
|
port: parseInt(parsedURL.port, 10),
|
||||||
role: 'UniverseClient',
|
role: 'UniverseClient',
|
||||||
url: parsedURL.hostname
|
url: parsedURL.protocol + '//' + parsedURL.hostname
|
||||||
});
|
};
|
||||||
|
console.log(socketConfig);
|
||||||
|
this.smartsocketClient = new SmartsocketClient(socketConfig);
|
||||||
this.observableIntake = new plugins.smartrx.ObservableIntake();
|
this.observableIntake = new plugins.smartrx.ObservableIntake();
|
||||||
this.socketClient.connect();
|
|
||||||
|
// lets define some basic actions
|
||||||
|
|
||||||
|
/**
|
||||||
|
* should handle a forced unsubscription by the server
|
||||||
|
*/
|
||||||
|
const unsubscribe = new plugins.smartsocket.SocketFunction({
|
||||||
|
funcName: 'unsubscribe',
|
||||||
|
allowedRoles: [],
|
||||||
|
funcDef: async (data: interfaces.IServerUnsubscribeActionPayload) => {
|
||||||
|
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* should handle a message reception
|
||||||
|
*/
|
||||||
|
const receiveMessage = async () => {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
await this.smartsocketClient.connect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
8
ts/smartuniverse.classes.clientuniversecache.ts
Normal file
8
ts/smartuniverse.classes.clientuniversecache.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import * as plugins from './smartuniverse.plugins';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* a cache for clients
|
||||||
|
*/
|
||||||
|
export class ClientUniverseCache {
|
||||||
|
|
||||||
|
}
|
@ -7,12 +7,24 @@ export class ClientUniverseChannel implements interfaces.IUniverseChannel {
|
|||||||
// ======
|
// ======
|
||||||
// STATIC
|
// STATIC
|
||||||
// ======
|
// ======
|
||||||
|
/**
|
||||||
|
* creates a channel and adds it to the cache of clientUniverseArg
|
||||||
|
* @param clientUniverseArg
|
||||||
|
* @param channelNameArg
|
||||||
|
* @param passphraseArg
|
||||||
|
*/
|
||||||
public static async createClientUniverseChannel(
|
public static async createClientUniverseChannel(
|
||||||
clientUniverseArg: ClientUniverse,
|
clientUniverseArg: ClientUniverse,
|
||||||
channelName: string
|
channelNameArg: string,
|
||||||
|
passphraseArg: string
|
||||||
): Promise<ClientUniverseChannel> {
|
): Promise<ClientUniverseChannel> {
|
||||||
const clientChannel = new ClientUniverseChannel(clientUniverseArg);
|
const clientChannel = new ClientUniverseChannel(
|
||||||
await clientChannel.transmitSubscription();
|
clientUniverseArg,
|
||||||
|
channelNameArg,
|
||||||
|
passphraseArg
|
||||||
|
);
|
||||||
|
clientUniverseArg.channelStore.add(clientChannel);
|
||||||
|
await clientChannel.subscribe();
|
||||||
return clientChannel;
|
return clientChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,16 +32,29 @@ export class ClientUniverseChannel implements interfaces.IUniverseChannel {
|
|||||||
// INSTANCE
|
// INSTANCE
|
||||||
// ========
|
// ========
|
||||||
|
|
||||||
|
// properties
|
||||||
|
public name: string;
|
||||||
|
public passphrase: string;
|
||||||
|
|
||||||
|
// refs
|
||||||
public clientUniverse: ClientUniverse;
|
public clientUniverse: ClientUniverse;
|
||||||
|
|
||||||
constructor(clientUniverseArg: ClientUniverse) {
|
constructor(clientUniverseArg: ClientUniverse, nameArg: string, passphraseArg: string) {
|
||||||
this.clientUniverse = clientUniverseArg;
|
this.clientUniverse = clientUniverseArg;
|
||||||
|
this.name = nameArg;
|
||||||
|
this.passphrase = passphraseArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 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 transmitSubscription() {
|
public async subscribe() {
|
||||||
this.clientUniverse.socketClient;
|
const serverCallActionName: interfaces.IServerCallActions = 'subscribe';
|
||||||
|
const serverCallActionPayload: interfaces.IServerCallSubscribeActionPayload = {
|
||||||
|
name: this.name,
|
||||||
|
passphrase: this.passphrase
|
||||||
|
};
|
||||||
|
this.clientUniverse.smartsocketClient.serverCall(serverCallActionName, serverCallActionPayload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,34 @@
|
|||||||
import * as plugins from './smartuniverse.plugins';
|
import * as plugins from './smartuniverse.plugins';
|
||||||
|
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces';
|
||||||
|
import { IUniverseMessage } from './interfaces';
|
||||||
|
|
||||||
export class ClientUniverseMessage implements interfaces.IUniverseMessage {
|
export class ClientUniverseMessage implements interfaces.IUniverseMessage {
|
||||||
// ======
|
// ======
|
||||||
// STATIC
|
// STATIC
|
||||||
// ======
|
// ======
|
||||||
public static createMessageFromPayload(messageArg: string, payloadArg: any) {
|
public static createMessageFromPayload(messageDescriptor: interfaces.IUniverseMessage) {}
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// ========
|
// ========
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
// ========
|
// ========
|
||||||
constructor(messageArg, payloadArg) {}
|
|
||||||
|
|
||||||
getAsJsonForPayload () {
|
// properties
|
||||||
|
public id: string;
|
||||||
|
|
||||||
|
public timestamp: number;
|
||||||
|
public smartTimestamp: plugins.smarttime.TimeStamp;
|
||||||
|
public messageText: string;
|
||||||
|
public passphrase: string;
|
||||||
|
public payload: any;
|
||||||
|
public payloadStringType;
|
||||||
|
public targetChannelName: string;
|
||||||
|
|
||||||
|
constructor(messageArg: IUniverseMessage, payloadArg) {
|
||||||
|
for (const key of Object.keys(messageArg)) {
|
||||||
|
this[key] = messageArg[key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getAsJsonForPayload() {};
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,6 @@ export interface ISmartUniverseConstructorOptions {
|
|||||||
messageExpiryInMilliseconds: number;
|
messageExpiryInMilliseconds: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* main class that setsup a Universe
|
* main class that setsup a Universe
|
||||||
*/
|
*/
|
||||||
@ -67,7 +65,7 @@ export class Universe {
|
|||||||
/**
|
/**
|
||||||
* initiates a server
|
* initiates a server
|
||||||
*/
|
*/
|
||||||
public async initServer(portArg: number | string) {
|
public async start(portArg: number) {
|
||||||
// lets create the base smartexpress server
|
// lets create the base smartexpress server
|
||||||
this.smartexpressServer = new plugins.smartexpress.Server({
|
this.smartexpressServer = new plugins.smartexpress.Server({
|
||||||
cors: true,
|
cors: true,
|
||||||
@ -79,19 +77,24 @@ export class Universe {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// lets create the http request route
|
// lets create the http request route
|
||||||
this.smartexpressServer.addRoute('/sendmessage', new Handler('POST', async (req, res) => {
|
this.smartexpressServer.addRoute(
|
||||||
this.universeCache.addMessage(req.body);
|
'/sendmessage',
|
||||||
}));
|
new Handler('POST', async (req, res) => {
|
||||||
|
const universeMessageInstance: UniverseMessage = new UniverseMessage(req.body);
|
||||||
|
this.universeCache.addMessage(universeMessageInstance);
|
||||||
|
|
||||||
|
res.status(200);
|
||||||
|
res.end();
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
// add websocket upgrade
|
// add websocket upgrade
|
||||||
this.smartsocket = new plugins.smartsocket.Smartsocket({
|
this.smartsocket = new plugins.smartsocket.Smartsocket({});
|
||||||
port: 12345 // fix this within smartsocket
|
|
||||||
});
|
|
||||||
|
|
||||||
// add a role for the clients
|
// add a role for the clients
|
||||||
const ClientRole = new plugins.smartsocket.SocketRole({
|
const ClientRole = new plugins.smartsocket.SocketRole({
|
||||||
name: 'clientuniverse',
|
name: 'UniverseClient',
|
||||||
passwordHash: 'clientuniverse' // authentication happens on another level
|
passwordHash: plugins.smarthash.sha256FromStringSync('UniverseClient') // authentication happens on another level
|
||||||
});
|
});
|
||||||
|
|
||||||
// add the role to smartsocket
|
// add the role to smartsocket
|
||||||
@ -100,17 +103,17 @@ export class Universe {
|
|||||||
const SubscriptionSocketFunction = new plugins.smartsocket.SocketFunction({
|
const SubscriptionSocketFunction = new plugins.smartsocket.SocketFunction({
|
||||||
allowedRoles: [ClientRole],
|
allowedRoles: [ClientRole],
|
||||||
funcName: 'channelSubscription',
|
funcName: 'channelSubscription',
|
||||||
funcDef: () => {} // TODO: implement an action upon connection of clients
|
funcDef: () => {
|
||||||
|
} // TODO: implement an action upon connection of clients
|
||||||
});
|
});
|
||||||
|
|
||||||
// add smartsocket to the running smartexpress app
|
// add smartsocket to the running smartexpress app
|
||||||
this.smartsocket.setExternalServer('express', this.smartexpressServer as any);
|
this.smartsocket.setExternalServer('smartexpress', this.smartexpressServer as any);
|
||||||
|
// start everything
|
||||||
// start the socket
|
|
||||||
this.smartsocket.start();
|
|
||||||
|
|
||||||
// start the smartexpress instance
|
|
||||||
await this.smartexpressServer.start();
|
await this.smartexpressServer.start();
|
||||||
|
await this.smartsocket.start();
|
||||||
|
console.log('started universe');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,10 +52,10 @@ export class UniverseCache {
|
|||||||
/**
|
/**
|
||||||
* Read a message from the UniverseCache
|
* Read a message from the UniverseCache
|
||||||
*/
|
*/
|
||||||
public readMessagesYoungerThan(unixTimeArg?: number): Observable<UniverseMessage> {
|
public readMessagesYoungerThan(unixTimeArg?: number, channelName?: string): Observable<UniverseMessage> {
|
||||||
const messageObservable = from(this.messageMap.getArray()).pipe(
|
const messageObservable = from(this.messageMap.getArray()).pipe(
|
||||||
filter(messageArg => {
|
filter(messageArg => {
|
||||||
return messageArg.timestamp.isYoungerThanMilliSeconds(this.destructionTime);
|
return messageArg.smartTimestamp.isYoungerThanMilliSeconds(this.destructionTime);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return messageObservable;
|
return messageObservable;
|
||||||
|
@ -83,10 +83,12 @@ export class UniverseChannel {
|
|||||||
*/
|
*/
|
||||||
public authenticate(universeMessageArg: UniverseMessage): boolean {
|
public authenticate(universeMessageArg: UniverseMessage): boolean {
|
||||||
return (
|
return (
|
||||||
this.name === universeMessageArg.requestedChannelName &&
|
this.name === universeMessageArg.targetChannelName &&
|
||||||
this.passphrase === universeMessageArg.requestedChannelPassphrase
|
this.passphrase === universeMessageArg.passphrase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public pushToClients(messageArg: UniverseMessage) {}
|
public pushToClients(messageArg: UniverseMessage) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import * as plugins from './smartuniverse.plugins';
|
import * as plugins from './smartuniverse.plugins';
|
||||||
|
import * as interfaces from './interfaces';
|
||||||
|
|
||||||
import { Objectmap } from '@pushrocks/lik';
|
import { Objectmap } from '@pushrocks/lik';
|
||||||
|
|
||||||
@ -6,31 +7,29 @@ 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';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 {
|
export class UniverseMessage implements interfaces.IUniverseMessage {
|
||||||
/**
|
public id: string;
|
||||||
* public and unique id
|
|
||||||
* numeric ascending
|
public timestamp: number;
|
||||||
* adheres to time in milliseconds
|
public smartTimestamp: TimeStamp;
|
||||||
* avoids duplications though
|
|
||||||
*/
|
public messageText: string;
|
||||||
public id: number;
|
public passphrase: string;
|
||||||
|
public payload: any;
|
||||||
|
public payloadStringType;
|
||||||
|
public targetChannelName: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the UniverseCache the message is attached to
|
* the UniverseCache the message is attached to
|
||||||
*/
|
*/
|
||||||
public universeCache: UniverseCache;
|
public universeCache: UniverseCache;
|
||||||
|
|
||||||
/**
|
|
||||||
* requestedChannelName
|
|
||||||
*/
|
|
||||||
public requestedChannelName: string;
|
|
||||||
public requestedChannelPassphrase: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enables unprotected grouping of messages for efficiency purposes.
|
* enables unprotected grouping of messages for efficiency purposes.
|
||||||
*/
|
*/
|
||||||
@ -42,19 +41,8 @@ export class UniverseMessage {
|
|||||||
public authenticated: boolean = null;
|
public authenticated: boolean = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* time of creation
|
* a destruction timer for this message
|
||||||
*/
|
*/
|
||||||
public timestamp: TimeStamp;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the actual message
|
|
||||||
*/
|
|
||||||
public message: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* any attached payloads. Can be of binary format.
|
|
||||||
*/
|
|
||||||
public attachedPayload: any;
|
|
||||||
public destructionTimer: Timer; // a timer to take care of message destruction
|
public destructionTimer: Timer; // a timer to take care of message destruction
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,17 +50,12 @@ export class UniverseMessage {
|
|||||||
* @param messageArg
|
* @param messageArg
|
||||||
* @param attachedPayloadArg
|
* @param attachedPayloadArg
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(messageDescriptor: IUniverseMessage) {
|
||||||
messageArg: string,
|
this.smartTimestamp = new TimeStamp(this.timestamp);
|
||||||
requestedChannelNameArg: string,
|
this.messageText = messageDescriptor.messageText;
|
||||||
passphraseArg: string,
|
this.targetChannelName = messageDescriptor.targetChannelName;
|
||||||
attachedPayloadArg: any
|
this.passphrase = messageDescriptor.passphrase;
|
||||||
) {
|
this.payload = messageDescriptor.payload;
|
||||||
this.timestamp = new TimeStamp();
|
|
||||||
this.message = messageArg;
|
|
||||||
this.requestedChannelName = requestedChannelNameArg;
|
|
||||||
this.requestedChannelPassphrase = passphraseArg;
|
|
||||||
this.attachedPayload = attachedPayloadArg;
|
|
||||||
// prevent memory issues
|
// prevent memory issues
|
||||||
this.fallBackDestruction();
|
this.fallBackDestruction();
|
||||||
}
|
}
|
||||||
@ -98,7 +81,7 @@ export class UniverseMessage {
|
|||||||
/**
|
/**
|
||||||
* handles bad messages for further analysis
|
* handles bad messages for further analysis
|
||||||
*/
|
*/
|
||||||
handleAsBadMessage() {
|
public handleAsBadMessage() {
|
||||||
console.log('received a bad message');
|
console.log('received a bad message');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
20
ts/smartuniverse.classes.universesubscription.ts
Normal file
20
ts/smartuniverse.classes.universesubscription.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import * as plugins from './smartuniverse.plugins';
|
||||||
|
import { UniverseChannel } from './smartuniverse.classes.universechannel';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* represents a subscription into a specific topic
|
||||||
|
*/
|
||||||
|
export class UniverseConnection {
|
||||||
|
/**
|
||||||
|
* the socketClient to ping
|
||||||
|
*/
|
||||||
|
socketclient: plugins.smartsocket.SmartsocketClient;
|
||||||
|
subscribedChannels: UniverseChannel[] = [];
|
||||||
|
authenticatedChannels: UniverseChannel[] = [];
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -14,6 +14,7 @@ import * as smartrequest from '@pushrocks/smartrequest';
|
|||||||
import * as smartrx from '@pushrocks/smartrx';
|
import * as smartrx from '@pushrocks/smartrx';
|
||||||
import * as smartsocket from '@pushrocks/smartsocket';
|
import * as smartsocket from '@pushrocks/smartsocket';
|
||||||
import * as smarttime from '@pushrocks/smarttime';
|
import * as smarttime from '@pushrocks/smarttime';
|
||||||
|
import * as smartunique from '@pushrocks/smartunique';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
lik,
|
lik,
|
||||||
@ -25,5 +26,6 @@ export {
|
|||||||
smartrx,
|
smartrx,
|
||||||
smartrequest,
|
smartrequest,
|
||||||
smartsocket,
|
smartsocket,
|
||||||
smarttime
|
smarttime,
|
||||||
|
smartunique
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user