fix(core): update

This commit is contained in:
Philipp Kunz 2019-04-28 12:42:08 +02:00
parent 2f528d1812
commit 8157f2a56b
7 changed files with 231 additions and 102 deletions

269
package-lock.json generated
View File

@ -196,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": {
@ -363,13 +340,13 @@
} }
}, },
"@pushrocks/smartsocket": { "@pushrocks/smartsocket": {
"version": "1.1.32", "version": "1.1.35",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsocket/-/smartsocket-1.1.32.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsocket/-/smartsocket-1.1.35.tgz",
"integrity": "sha512-wqc62xt7ollhGnE34076h5Y8ZwNHlK8p14WomXEDOiR6QFiPcF5L3hf2OzJTWPvMycNoa/iWGqkU0Ceo8coj+A==", "integrity": "sha512-+w76ksJvQA4FBVIIyVBTef4y38PeXZNnXy/EBy4OQ0pepsgMs9gYcWLFpU4g4WY5yVcQ8vNTNU/rM/osHG4OJA==",
"requires": { "requires": {
"@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/smarthash": "^2.0.4", "@pushrocks/smarthash": "^2.0.4",
"@pushrocks/smartlog": "^2.0.19", "@pushrocks/smartlog": "^2.0.19",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.2",
@ -478,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": "*"
@ -493,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": "*"
} }
@ -517,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": "*"
} }
@ -772,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": {
@ -810,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",
@ -1280,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",
@ -1576,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": {
@ -1597,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"
} }
@ -1635,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",
@ -2116,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",
@ -2181,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": {
@ -2210,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",
@ -2220,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"
} }
}, },
@ -2293,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": {
@ -2360,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",
@ -2385,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",
@ -2658,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",
@ -2748,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": {

View File

@ -27,14 +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.15", "@pushrocks/smartrequest": "^1.1.15",
"@pushrocks/smartrx": "^2.0.3", "@pushrocks/smartrx": "^2.0.3",
"@pushrocks/smartsocket": "^1.1.32", "@pushrocks/smartsocket": "^1.1.35",
"@pushrocks/smarttime": "^3.0.7", "@pushrocks/smarttime": "^3.0.7",
"@pushrocks/smartunique": "^3.0.1" "@pushrocks/smartunique": "^3.0.1"
} }
} }

View File

@ -6,8 +6,13 @@ import { Observable } from 'rxjs';
let testUniverse: smartuniverse.Universe; let testUniverse: smartuniverse.Universe;
let testClientUniverse: 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 = { const testChannelData = {
channelName: 'awesomeTestChannel', channelName: 'awesomeTestChannel',
channelPass: 'awesomeChannelPAss' channelPass: 'awesomeChannelPAss'
@ -26,7 +31,7 @@ tap.test('add a message to the SmartUniverse', async () => {
// testing message handling // testing message handling
tap.test('create smartuniverse client', async () => { tap.test('create smartuniverse client', async () => {
testClientUniverse = new smartuniverse.ClientUniverse({ testClientUniverse = new smartuniverse.ClientUniverse({
serverAddress: 'http://localhost:8765' serverAddress: testServerData.serverAddress
}); });
expect(testClientUniverse).to.be.instanceof(smartuniverse.ClientUniverse); expect(testClientUniverse).to.be.instanceof(smartuniverse.ClientUniverse);
}); });
@ -55,6 +60,14 @@ tap.test('universe should contain the sent message', async () => {
expect(testUniverse.universeCache.messageMap.getArray()[0].messageText).to.equal('hello'); 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 () => {

View File

@ -6,4 +6,8 @@ export type IServerCallActions = 'subscribe' | 'sendmessage' | 'unsubscribe';
export interface IServerCallSubscribeActionPayload { export interface IServerCallSubscribeActionPayload {
name: string; name: string;
passphrase: string; passphrase: string;
} }
export interface IServerUnsubscribeActionPayload {
name: string;
}

View File

@ -8,6 +8,9 @@ import * as url from 'url';
import * as interfaces from './interfaces'; import * as interfaces from './interfaces';
import { ClientUniverseChannel, UniverseMessage } from './'; import { ClientUniverseChannel, UniverseMessage } from './';
import {
ClientUniverseCache
} from './smartuniverse.classes.clientuniversecache';
export interface IClientOptions { export interface IClientOptions {
serverAddress: string; serverAddress: string;
@ -22,7 +25,8 @@ export class ClientUniverse {
public smartsocketClient: 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;
@ -50,12 +54,27 @@ export class ClientUniverse {
*/ */
public async getChannel(channelName: string): Promise<ClientUniverseChannel> { public async getChannel(channelName: string): Promise<ClientUniverseChannel> {
await this.checkConnection(); await this.checkConnection();
const clientUniverseChannel = this.channelCache.find(channel => { const clientUniverseChannel = this.channelStore.find(channel => {
return channel.name === channelName; return channel.name === channelName;
}); });
return clientUniverseChannel; return clientUniverseChannel;
} }
/**
* remove a a achannel
* @param messageArg
*/
public removeChannel(channelNameArg, notifyServer = true) {
const clientUniverseChannel = this.channelStore.findOneAndRemove(channelItemArg => {
return channelItemArg.name === channelNameArg;
});
}
/**
* sends a message towards the server
* @param messageArg
*/
public async sendMessage(messageArg: interfaces.IMessageCreator) { public async sendMessage(messageArg: interfaces.IMessageCreator) {
await this.checkConnection(); await this.checkConnection();
const requestBody: interfaces.IUniverseMessage = { const requestBody: interfaces.IUniverseMessage = {
@ -103,7 +122,9 @@ export class ClientUniverse {
const unsubscribe = new plugins.smartsocket.SocketFunction({ const unsubscribe = new plugins.smartsocket.SocketFunction({
funcName: 'unsubscribe', funcName: 'unsubscribe',
allowedRoles: [], allowedRoles: [],
funcDef: async () => {}, funcDef: async (data: interfaces.IServerUnsubscribeActionPayload) => {
},
}); });
/** /**

View File

@ -0,0 +1,8 @@
import * as plugins from './smartuniverse.plugins';
/**
* a cache for clients
*/
export class ClientUniverseCache {
}

View File

@ -23,7 +23,7 @@ export class ClientUniverseChannel implements interfaces.IUniverseChannel {
channelNameArg, channelNameArg,
passphraseArg passphraseArg
); );
clientUniverseArg.channelCache.add(clientChannel); clientUniverseArg.channelStore.add(clientChannel);
await clientChannel.subscribe(); await clientChannel.subscribe();
return clientChannel; return clientChannel;
} }