Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a2db05bfe3 | |||
| 69668731be | |||
| e586843d81 | |||
| fef1ae338a | |||
| 969b2d6686 | |||
| f4d820d37e | |||
| c08acd076e | |||
| c968de37d1 | |||
| 5b8f7514f4 | |||
| 53874a7772 | |||
| 479cf60239 | |||
| 825a264327 | |||
| 16305a4cf8 | |||
| e7176ebc79 |
296
package-lock.json
generated
296
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@apiglobal/typedsocket",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.15",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -1452,11 +1452,11 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartexpress": {
|
||||
"version": "3.0.99",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexpress/-/smartexpress-3.0.99.tgz",
|
||||
"integrity": "sha512-vPcoyryZsiB+y4Bi2MAykT44Lw5fSGfQpYQALRbbRJ/1Idj5D8KHM1qf6y826+432kOZWkmEqKJeclnHjZnzzA==",
|
||||
"version": "3.0.100",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexpress/-/smartexpress-3.0.100.tgz",
|
||||
"integrity": "sha512-AfaBX5nt5cvFg8UthURaSuaesaR5rEYy5PSTvH2fNoU36csnexeWitdkQ5NkOqel63prAMe8u4zGAqoDnG6arg==",
|
||||
"requires": {
|
||||
"@apiglobal/typedrequest": "^1.0.53",
|
||||
"@apiglobal/typedrequest": "^1.0.56",
|
||||
"@pushrocks/lik": "^4.0.20",
|
||||
"@pushrocks/smartfeed": "^1.0.11",
|
||||
"@pushrocks/smartfile": "^8.0.8",
|
||||
@@ -1464,10 +1464,10 @@
|
||||
"@pushrocks/smartmime": "^1.0.3",
|
||||
"@pushrocks/smartpromise": "^3.1.3",
|
||||
"@pushrocks/smartrequest": "^1.1.51",
|
||||
"@pushrocks/smartsitemap": "^1.0.11",
|
||||
"@pushrocks/smarttime": "^3.0.37",
|
||||
"@pushrocks/smartsitemap": "^1.0.14",
|
||||
"@pushrocks/smarttime": "^3.0.38",
|
||||
"@tsclass/tsclass": "^3.0.29",
|
||||
"@types/cors": "^2.8.8",
|
||||
"@types/cors": "^2.8.9",
|
||||
"@types/express": "^4.17.9",
|
||||
"@types/finalhandler": "^1.1.0",
|
||||
"@types/helmet": "^4.0.0",
|
||||
@@ -1475,7 +1475,22 @@
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.17.1",
|
||||
"express-force-ssl": "^0.3.2",
|
||||
"helmet": "^4.2.0"
|
||||
"helmet": "^4.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smarttime": {
|
||||
"version": "3.0.38",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.38.tgz",
|
||||
"integrity": "sha512-oVT48eZE66OTmDALAsWkk3GXUQiqzkei7mo526UbuMN2iLY8I9WgsxmLfa8Fp4llQmocncW3WTqGyhnEOAuDgA==",
|
||||
"requires": {
|
||||
"@pushrocks/lik": "^4.0.17",
|
||||
"@pushrocks/smartdelay": "^2.0.10",
|
||||
"@pushrocks/smartpromise": "^3.0.2",
|
||||
"croner": "^1.1.23",
|
||||
"dayjs": "^1.9.1",
|
||||
"is-nan": "^1.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartfeed": {
|
||||
@@ -1922,21 +1937,22 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartsitemap": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsitemap/-/smartsitemap-1.0.11.tgz",
|
||||
"integrity": "sha512-IGJ8UASrZKTwszW0coGFEPtYr+gZjbxQBMAzb2pft6VFv3CLIN1RmzgEqcHNlG8Czp125xOoR0mnKKq94XOVKg==",
|
||||
"version": "1.0.14",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsitemap/-/smartsitemap-1.0.14.tgz",
|
||||
"integrity": "sha512-Vnn1CzG7b1QAr/tOBbeJVU3Q85G+CUkqsmtiRSa9TqMcpdvJyUDc7tCHVgL8ZkqpF6ozoPUTorkHNjCyHhkWeA==",
|
||||
"requires": {
|
||||
"@pushrocks/smartcache": "^1.0.13",
|
||||
"@pushrocks/smartfeed": "^1.0.5",
|
||||
"@pushrocks/smartfeed": "^1.0.11",
|
||||
"@pushrocks/smartxml": "^1.0.6",
|
||||
"@pushrocks/smartyaml": "^2.0.5",
|
||||
"@tsclass/tsclass": "^3.0.25"
|
||||
"@pushrocks/webrequest": "^2.0.13",
|
||||
"@tsclass/tsclass": "^3.0.29"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartsocket": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsocket/-/smartsocket-1.2.0.tgz",
|
||||
"integrity": "sha512-jveC4DrfcC6FQuNi0j3MIrrSblN3afxcCZcR1dP6rNDTZYdBVQ4nVlfX0yH9ba/ZIa1mDK66ZdNQ96cP3FdRZA==",
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartsocket/-/smartsocket-1.2.8.tgz",
|
||||
"integrity": "sha512-cuNFT8/ESvLXkZt8yqra45LBaRIkwlzdLWgn/CiPlQFRgptJ0tUwnkSb6spsOJQubQ18M8lmcw0HnYkyFoOtFw==",
|
||||
"requires": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||
"@pushrocks/isohash": "^1.0.2",
|
||||
@@ -1944,21 +1960,49 @@
|
||||
"@pushrocks/lik": "^4.0.20",
|
||||
"@pushrocks/smartdelay": "^2.0.10",
|
||||
"@pushrocks/smartenv": "^4.0.16",
|
||||
"@pushrocks/smartexpress": "^3.0.99",
|
||||
"@pushrocks/smartexpress": "^3.0.100",
|
||||
"@pushrocks/smartjson": "^4.0.6",
|
||||
"@pushrocks/smartlog": "^2.0.39",
|
||||
"@pushrocks/smartpromise": "^3.1.3",
|
||||
"@pushrocks/smartrx": "^2.0.19",
|
||||
"@pushrocks/smarttime": "^3.0.37",
|
||||
"@types/socket.io": "^2.1.12",
|
||||
"@types/socket.io-client": "^1.4.34",
|
||||
"socket.io": "^3.0.4",
|
||||
"socket.io-client": "^3.0.4"
|
||||
"@pushrocks/smarttime": "^3.0.38",
|
||||
"@types/socket.io": "^2.1.13",
|
||||
"@types/socket.io-client": "^1.4.35",
|
||||
"socket.io": "^3.1.0",
|
||||
"socket.io-client": "^3.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartjson": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartjson/-/smartjson-4.0.6.tgz",
|
||||
"integrity": "sha512-lykr068RSDHs0+EXCvIDVxjKnDtRQ2M7EXOo5jVrUU6/OEdfRl9ErM1K/oPafiEi47/PtTrwLlp1KdSgqkRjmg==",
|
||||
"requires": {
|
||||
"@types/buffer-json": "^2.0.0",
|
||||
"@types/fast-json-stable-stringify": "^2.0.0",
|
||||
"buffer-json": "^2.0.0",
|
||||
"fast-json-stable-stringify": "^2.1.0",
|
||||
"lodash.clonedeep": "^4.5.0"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smarttime": {
|
||||
"version": "3.0.38",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.38.tgz",
|
||||
"integrity": "sha512-oVT48eZE66OTmDALAsWkk3GXUQiqzkei7mo526UbuMN2iLY8I9WgsxmLfa8Fp4llQmocncW3WTqGyhnEOAuDgA==",
|
||||
"requires": {
|
||||
"@pushrocks/lik": "^4.0.17",
|
||||
"@pushrocks/smartdelay": "^2.0.10",
|
||||
"@pushrocks/smartpromise": "^3.0.2",
|
||||
"croner": "^1.1.23",
|
||||
"dayjs": "^1.9.1",
|
||||
"is-nan": "^1.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartstring": {
|
||||
"version": "3.0.23",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstring/-/smartstring-3.0.23.tgz",
|
||||
"integrity": "sha512-lGkmzbNAAvfKDlFHXS6L5IdvYQLa9uUuf8wwCiW4ZadXFsH00ACPp2pgY30aSNYwBqFWc5U9X+przuxIkBM9Pw==",
|
||||
"version": "3.0.24",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstring/-/smartstring-3.0.24.tgz",
|
||||
"integrity": "sha512-3ceUOBcwuU8uzjInkoxKjgWSRMv4YRd+v9zRSEC3T21fMi8dTcIKMtgxm7nAmajRZvyVoCw60Q9+0AHedQlJmQ==",
|
||||
"requires": {
|
||||
"@pushrocks/smartenv": "^4.0.16",
|
||||
"crypto-random-string": "^3.3.0",
|
||||
@@ -2020,15 +2064,30 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/tapbundle": {
|
||||
"version": "3.2.9",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.9.tgz",
|
||||
"integrity": "sha512-vtmYL/l7BZvAzySh7cYnnTG6CFMp5zYtowJuMAmqUjhIaQaWW1Tvbrpjp7lVwRXj2JlL/i69KcJ6RVdLItK+rA==",
|
||||
"version": "3.2.10",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.10.tgz",
|
||||
"integrity": "sha512-EPFSiFMx6uxWcZgANT1yDigTknVl1FCRIaiuf2AEkpg4vR5ZIZQKDIWkrFZY0ajUWJ6vCM631TmIcJvUnyWJXw==",
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.9",
|
||||
"@pushrocks/smartenv": "^4.0.10",
|
||||
"@pushrocks/smartpromise": "^3.0.2",
|
||||
"@pushrocks/smarttime": "^3.0.19",
|
||||
"@pushrocks/smartdelay": "^2.0.10",
|
||||
"@pushrocks/smartenv": "^4.0.16",
|
||||
"@pushrocks/smartpromise": "^3.1.3",
|
||||
"@pushrocks/smarttime": "^3.0.38",
|
||||
"smartchai": "^2.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smarttime": {
|
||||
"version": "3.0.38",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.38.tgz",
|
||||
"integrity": "sha512-oVT48eZE66OTmDALAsWkk3GXUQiqzkei7mo526UbuMN2iLY8I9WgsxmLfa8Fp4llQmocncW3WTqGyhnEOAuDgA==",
|
||||
"requires": {
|
||||
"@pushrocks/lik": "^4.0.17",
|
||||
"@pushrocks/smartdelay": "^2.0.10",
|
||||
"@pushrocks/smartpromise": "^3.0.2",
|
||||
"croner": "^1.1.23",
|
||||
"dayjs": "^1.9.1",
|
||||
"is-nan": "^1.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/webrequest": {
|
||||
@@ -2220,9 +2279,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/engine.io": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fengine.io/-/engine.io-3.1.4.tgz",
|
||||
"integrity": "sha512-98rXVukLD6/ozrQ2O80NAlWDGA4INg+tqsEReWJldqyi2fulC9V7Use/n28SWgROXKm6003ycWV4gZHoF8GA6w==",
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fengine.io/-/engine.io-3.1.5.tgz",
|
||||
"integrity": "sha512-DLVpLEGTEZGBXOYoYoagHSxXkDHONc0fZouF2ayw7Q18aRu1Afwci+1CFKvPpouCUOVWP+dmCaAWpQjswe7kpg==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@@ -2402,9 +2461,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/socket.io": {
|
||||
"version": "2.1.12",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fsocket.io/-/socket.io-2.1.12.tgz",
|
||||
"integrity": "sha512-oStc5VFkpb0AsjOxQUj9ztX5Iziatyla/rjZTYbFGoVrrKwd+JU2mtxk7iSl5RGYx9WunLo6UXW1fBzQok/ZyA==",
|
||||
"version": "2.1.13",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fsocket.io/-/socket.io-2.1.13.tgz",
|
||||
"integrity": "sha512-JRgH3nCgsWel4OPANkhH8TelpXvacAJ9VeryjuqCDiaVDMpLysd6sbt0dr6Z15pqH3p2YpOT3T1C5vQ+O/7uyg==",
|
||||
"requires": {
|
||||
"@types/engine.io": "*",
|
||||
"@types/node": "*",
|
||||
@@ -2412,9 +2471,9 @@
|
||||
}
|
||||
},
|
||||
"@types/socket.io-client": {
|
||||
"version": "1.4.34",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fsocket.io-client/-/socket.io-client-1.4.34.tgz",
|
||||
"integrity": "sha512-Lzia5OTQFJZJ5R4HsEEldywiiqT9+W2rDbyHJiiTGqOcju89sCsQ8aUXDljY6Ls33wKZZGC0bfMhr/VpOyjtXg=="
|
||||
"version": "1.4.35",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fsocket.io-client/-/socket.io-client-1.4.35.tgz",
|
||||
"integrity": "sha512-MI8YmxFS+jMkIziycT5ickBWK1sZwDwy16mgH/j99Mcom6zRG/NimNGQ3vJV0uX5G6g/hEw0FG3w3b3sT5OUGw=="
|
||||
},
|
||||
"@types/socket.io-parser": {
|
||||
"version": "2.2.1",
|
||||
@@ -3661,11 +3720,6 @@
|
||||
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
|
||||
"dev": true
|
||||
},
|
||||
"component-bind": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/component-bind/-/component-bind-1.0.0.tgz",
|
||||
"integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E="
|
||||
},
|
||||
"component-emitter": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://verdaccio.lossless.one/component-emitter/-/component-emitter-1.3.0.tgz",
|
||||
@@ -4658,64 +4712,41 @@
|
||||
}
|
||||
},
|
||||
"engine.io": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/engine.io/-/engine.io-4.0.5.tgz",
|
||||
"integrity": "sha512-Ri+whTNr2PKklxQkfbGjwEo+kCBUM4Qxk4wtLqLrhH+b1up2NFL9g9pjYWiCV/oazwB0rArnvF/ZmZN2ab5Hpg==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/engine.io/-/engine.io-4.1.0.tgz",
|
||||
"integrity": "sha512-vW7EAtn0HDQ4MtT5QbmCHF17TaYLONv2/JwdYsq9USPRZVM4zG7WB3k0Nc321z8EuSOlhGokrYlYx4176QhD0A==",
|
||||
"requires": {
|
||||
"accepts": "~1.3.4",
|
||||
"base64id": "2.0.0",
|
||||
"cookie": "~0.4.1",
|
||||
"cors": "~2.8.5",
|
||||
"debug": "~4.1.0",
|
||||
"debug": "~4.3.1",
|
||||
"engine.io-parser": "~4.0.0",
|
||||
"ws": "^7.1.2"
|
||||
"ws": "~7.4.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"cookie": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://verdaccio.lossless.one/cookie/-/cookie-0.4.1.tgz",
|
||||
"integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"engine.io-client": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/engine.io-client/-/engine.io-client-4.0.5.tgz",
|
||||
"integrity": "sha512-1lkn0QdekHQPMTcxUh8LqIuxQHNtKV5GvqkQzmZ1rYKAvB6puMm13U7K1ps3OQZ4joE46asQiAKrcdL9weNEVw==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/engine.io-client/-/engine.io-client-4.1.0.tgz",
|
||||
"integrity": "sha512-OUmn4m71/lW3ixICv4h3DuBRuh3ri0w3cDuepjsrINSbbqbni4Xw1shTFiKhl0v58lEtNpwJTpSKJJ3fondu5Q==",
|
||||
"requires": {
|
||||
"base64-arraybuffer": "0.1.4",
|
||||
"component-emitter": "~1.3.0",
|
||||
"debug": "~4.1.0",
|
||||
"debug": "~4.3.1",
|
||||
"engine.io-parser": "~4.0.1",
|
||||
"has-cors": "1.1.0",
|
||||
"parseqs": "0.0.6",
|
||||
"parseuri": "0.0.6",
|
||||
"ws": "~7.2.1",
|
||||
"ws": "~7.4.2",
|
||||
"xmlhttprequest-ssl": "~1.5.4",
|
||||
"yeast": "0.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"ws": {
|
||||
"version": "7.2.5",
|
||||
"resolved": "https://verdaccio.lossless.one/ws/-/ws-7.2.5.tgz",
|
||||
"integrity": "sha512-C34cIU4+DB2vMyAbmEKossWq2ZQDr6QEyuuCzWrM9zfw1sGc0mYiJ0UnG9zzNykt49C2Fi34hvr2vssFQRS6EA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"engine.io-parser": {
|
||||
@@ -5258,9 +5289,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"fast-xml-parser": {
|
||||
"version": "3.17.5",
|
||||
"resolved": "https://verdaccio.lossless.one/fast-xml-parser/-/fast-xml-parser-3.17.5.tgz",
|
||||
"integrity": "sha512-lEvThd1Xq+CCylf1n+05bUZCDZjTufaaaqpxM3JZ+4iDqtlG+d/oKgtMmg9GEMOuzBgUoalIzFOaClht9YiGJQ=="
|
||||
"version": "3.17.6",
|
||||
"resolved": "https://verdaccio.lossless.one/fast-xml-parser/-/fast-xml-parser-3.17.6.tgz",
|
||||
"integrity": "sha512-40WHI/5d2MOzf1sD2bSaTXlPn1lueJLAX6j1xH5dSAr6tNeut8B9ktEL6sjAK9yVON4uNj9//axOdBJUuruCzw=="
|
||||
},
|
||||
"fastparse": {
|
||||
"version": "1.1.2",
|
||||
@@ -5278,9 +5309,9 @@
|
||||
}
|
||||
},
|
||||
"feed": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://verdaccio.lossless.one/feed/-/feed-4.2.1.tgz",
|
||||
"integrity": "sha512-l28KKcK1J/u3iq5dRDmmoB2p7dtBfACC2NqJh4dI2kFptxH0asfjmOfcxqh5Sv8suAlVa73gZJ4REY5RrafVvg==",
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://verdaccio.lossless.one/feed/-/feed-4.2.2.tgz",
|
||||
"integrity": "sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==",
|
||||
"requires": {
|
||||
"xml-js": "^1.6.11"
|
||||
}
|
||||
@@ -6260,9 +6291,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"helmet": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://verdaccio.lossless.one/helmet/-/helmet-4.2.0.tgz",
|
||||
"integrity": "sha512-aoiSxXMd0ks1ojYpSCFoCRzgv4rY/uB9jKStaw8PkXwsdLYa/Gq+Nc5l0soH0cwBIsLAlujPnx4HLQs+LaXCrQ=="
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://verdaccio.lossless.one/helmet/-/helmet-4.4.1.tgz",
|
||||
"integrity": "sha512-G8tp0wUMI7i8wkMk2xLcEvESg5PiCitFMYgGRc/PwULB0RVhTP5GFdxOwvJwp9XVha8CuS8mnhmE8I/8dx/pbw=="
|
||||
},
|
||||
"hex-color-regex": {
|
||||
"version": "1.1.0",
|
||||
@@ -8146,9 +8177,9 @@
|
||||
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
|
||||
},
|
||||
"pathval": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/pathval/-/pathval-1.1.0.tgz",
|
||||
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA="
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/pathval/-/pathval-1.1.1.tgz",
|
||||
"integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ=="
|
||||
},
|
||||
"pbkdf2": {
|
||||
"version": "3.1.1",
|
||||
@@ -9816,79 +9847,48 @@
|
||||
}
|
||||
},
|
||||
"socket.io": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/socket.io/-/socket.io-3.0.4.tgz",
|
||||
"integrity": "sha512-Vj1jUoO75WGc9txWd311ZJJqS9Dr8QtNJJ7gk2r7dcM/yGe9sit7qOijQl3GAwhpBOz/W8CwkD7R6yob07nLbA==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/socket.io/-/socket.io-3.1.0.tgz",
|
||||
"integrity": "sha512-Aqg2dlRh6xSJvRYK31ksG65q4kmBOqU4g+1ukhPcoT6wNGYoIwSYPlCPuRwOO9pgLUajojGFztl6+V2opmKcww==",
|
||||
"requires": {
|
||||
"@types/cookie": "^0.4.0",
|
||||
"@types/cors": "^2.8.8",
|
||||
"@types/node": "^14.14.7",
|
||||
"@types/node": "^14.14.10",
|
||||
"accepts": "~1.3.4",
|
||||
"base64id": "~2.0.0",
|
||||
"debug": "~4.1.0",
|
||||
"engine.io": "~4.0.0",
|
||||
"socket.io-adapter": "~2.0.3",
|
||||
"socket.io-parser": "~4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
}
|
||||
"debug": "~4.3.1",
|
||||
"engine.io": "~4.1.0",
|
||||
"socket.io-adapter": "~2.1.0",
|
||||
"socket.io-parser": "~4.0.3"
|
||||
}
|
||||
},
|
||||
"socket.io-adapter": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://verdaccio.lossless.one/socket.io-adapter/-/socket.io-adapter-2.0.3.tgz",
|
||||
"integrity": "sha512-2wo4EXgxOGSFueqvHAdnmi5JLZzWqMArjuP4nqC26AtLh5PoCPsaRbRdah2xhcwTAMooZfjYiNVNkkmmSMaxOQ=="
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/socket.io-adapter/-/socket.io-adapter-2.1.0.tgz",
|
||||
"integrity": "sha512-+vDov/aTsLjViYTwS9fPy5pEtTkrbEKsw2M+oVSoFGw6OD1IpvlV1VPhUzNbofCQ8oyMbdYJqDtGdmHQK6TdPg=="
|
||||
},
|
||||
"socket.io-client": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/socket.io-client/-/socket.io-client-3.0.4.tgz",
|
||||
"integrity": "sha512-qMvBuS+W9JIN2mkfAWDCxuIt+jpIKDf8C0604zEqx1JrPaPSS6cN0F3B2GYWC83TqBeVJXW66GFxWV3KD88n0Q==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/socket.io-client/-/socket.io-client-3.1.0.tgz",
|
||||
"integrity": "sha512-T4qPOL80KnoBwkdR70zMpiR6aH6zv3ZqLNriofHqsO9wvQllNTOez0mpV4GdVqo1Y55Z+h8YOlBo7c8pOxDlHw==",
|
||||
"requires": {
|
||||
"@types/component-emitter": "^1.2.10",
|
||||
"backo2": "1.0.2",
|
||||
"component-bind": "1.0.0",
|
||||
"backo2": "~1.0.2",
|
||||
"component-emitter": "~1.3.0",
|
||||
"debug": "~4.1.0",
|
||||
"engine.io-client": "~4.0.0",
|
||||
"debug": "~4.3.1",
|
||||
"engine.io-client": "~4.1.0",
|
||||
"parseuri": "0.0.6",
|
||||
"socket.io-parser": "~4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
}
|
||||
"socket.io-parser": "~4.0.4"
|
||||
}
|
||||
},
|
||||
"socket.io-parser": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/socket.io-parser/-/socket.io-parser-4.0.2.tgz",
|
||||
"integrity": "sha512-Bs3IYHDivwf+bAAuW/8xwJgIiBNtlvnjYRc4PbXgniLmcP1BrakBoq/QhO24rgtgW7VZ7uAaswRGxutUnlAK7g==",
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/socket.io-parser/-/socket.io-parser-4.0.4.tgz",
|
||||
"integrity": "sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==",
|
||||
"requires": {
|
||||
"@types/component-emitter": "^1.2.10",
|
||||
"component-emitter": "~1.3.0",
|
||||
"debug": "~4.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
}
|
||||
"debug": "~4.3.1"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
@@ -11028,9 +11028,9 @@
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"ws": {
|
||||
"version": "7.4.1",
|
||||
"resolved": "https://verdaccio.lossless.one/ws/-/ws-7.4.1.tgz",
|
||||
"integrity": "sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ=="
|
||||
"version": "7.4.2",
|
||||
"resolved": "https://verdaccio.lossless.one/ws/-/ws-7.4.2.tgz",
|
||||
"integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA=="
|
||||
},
|
||||
"xml-js": {
|
||||
"version": "1.6.11",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@apiglobal/typedsocket",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.15",
|
||||
"private": false,
|
||||
"description": "a typedrequest extension supporting websockets",
|
||||
"main": "dist_ts/index.js",
|
||||
@@ -15,7 +15,7 @@
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tsbundle": "^1.0.78",
|
||||
"@gitzone/tstest": "^1.0.44",
|
||||
"@pushrocks/tapbundle": "^3.2.9",
|
||||
"@pushrocks/tapbundle": "^3.2.10",
|
||||
"@types/node": "^14.14.22",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
@@ -24,8 +24,9 @@
|
||||
"@apiglobal/typedrequest": "^1.0.56",
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||
"@pushrocks/isohash": "^1.0.2",
|
||||
"@pushrocks/smartsocket": "^1.2.0",
|
||||
"@pushrocks/smartstring": "^3.0.23"
|
||||
"@pushrocks/smartexpress": "^3.0.100",
|
||||
"@pushrocks/smartsocket": "^1.2.8",
|
||||
"@pushrocks/smartstring": "^3.0.24"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
|
||||
@@ -33,7 +33,7 @@ tap.test('should add some handlers', async () => {
|
||||
|
||||
tap.test('should create Server and Client', async (tools) => {
|
||||
testTypedSocketServer = await typedsocket.TypedSocket.createServer(testTypedRouter);
|
||||
testTypedSocketClient = await typedsocket.TypedSocket.createClient(testTypedRouter, 'http://localhost');
|
||||
testTypedSocketClient = await typedsocket.TypedSocket.createClient(testTypedRouter, 'http://localhost:3000');
|
||||
});
|
||||
|
||||
tap.test('should process messages from both sides', async () => {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import * as plugins from './typedsocket.plugins';
|
||||
import type * as smartexpress from '@pushrocks/smartexpress';
|
||||
|
||||
const publicRoleName = 'publicRoleName';
|
||||
const publicRolePass = 'publicRolePass';
|
||||
|
||||
export type TTypedSocketSide = 'server' | 'client';
|
||||
|
||||
export class TypedSocket {
|
||||
// STATIC
|
||||
/**
|
||||
@@ -11,7 +14,7 @@ export class TypedSocket {
|
||||
*/
|
||||
public static async createServer(
|
||||
typedrouterArg: plugins.typedrequest.TypedRouter,
|
||||
smartexpressServerArg?: any
|
||||
smartexpressServerArg?: smartexpress.Server
|
||||
): Promise<TypedSocket> {
|
||||
const smartsocketServer = new plugins.smartsocket.Smartsocket({
|
||||
port: 3000,
|
||||
@@ -34,6 +37,7 @@ export class TypedSocket {
|
||||
})
|
||||
);
|
||||
const typedsocket = new TypedSocket(
|
||||
'server',
|
||||
typedrouterArg,
|
||||
async <T extends plugins.typedrequestInterfaces.ITypedRequest>(
|
||||
dataArg: T,
|
||||
@@ -58,7 +62,6 @@ export class TypedSocket {
|
||||
},
|
||||
smartsocketServer
|
||||
);
|
||||
|
||||
await smartsocketServer.start();
|
||||
|
||||
return typedsocket;
|
||||
@@ -71,15 +74,17 @@ export class TypedSocket {
|
||||
): Promise<TypedSocket> {
|
||||
const domain = new plugins.smartstring.Domain(serverUrlArg);
|
||||
|
||||
|
||||
const smartsocketClient = new plugins.smartsocket.SmartsocketClient({
|
||||
const socketOptions = {
|
||||
alias: aliasArg,
|
||||
role: publicRoleName,
|
||||
password: publicRolePass,
|
||||
port: domain.port || 3000,
|
||||
url: `${domain.nodeParsedUrl.protocol}//${domain.nodeParsedUrl.host}`,
|
||||
url: `${domain.nodeParsedUrl.protocol}//${domain.nodeParsedUrl.hostname}`,
|
||||
autoReconnect: true,
|
||||
});
|
||||
}
|
||||
console.log(`starting typedsocket with the following settings:`)
|
||||
console.log(socketOptions);
|
||||
const smartsocketClient = new plugins.smartsocket.SmartsocketClient(socketOptions);
|
||||
smartsocketClient.addSocketFunction(
|
||||
new plugins.smartsocket.SocketFunction({
|
||||
funcName: 'processMessage',
|
||||
@@ -90,6 +95,7 @@ export class TypedSocket {
|
||||
})
|
||||
);
|
||||
const typedsocket = new TypedSocket(
|
||||
'client',
|
||||
typedrouterArg,
|
||||
async <T extends plugins.typedrequestInterfaces.ITypedRequest>(dataArg: T): Promise<T> => {
|
||||
const response: T = (smartsocketClient.serverCall('processMessage', dataArg) as any) as T;
|
||||
@@ -104,6 +110,7 @@ export class TypedSocket {
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
public side: TTypedSocketSide;
|
||||
public typedrouter: plugins.typedrequest.TypedRouter;
|
||||
private postMethod: plugins.typedrequest.IPostMethod &
|
||||
((
|
||||
@@ -112,15 +119,28 @@ export class TypedSocket {
|
||||
) => Promise<plugins.typedrequestInterfaces.ITypedRequest>);
|
||||
private socketServerOrClient: plugins.smartsocket.Smartsocket | plugins.smartsocket.SmartsocketClient;
|
||||
constructor(
|
||||
sideArg: TTypedSocketSide,
|
||||
typedrouterArg: plugins.typedrequest.TypedRouter,
|
||||
postMethodArg: plugins.typedrequest.IPostMethod,
|
||||
socketServerOrClientArg: plugins.smartsocket.Smartsocket | plugins.smartsocket.SmartsocketClient
|
||||
) {
|
||||
this.side = sideArg;
|
||||
this.typedrouter = typedrouterArg;
|
||||
this.postMethod = postMethodArg;
|
||||
this.socketServerOrClient = socketServerOrClientArg;
|
||||
}
|
||||
|
||||
public addTag(keyArg: string, payloadArg: any) {
|
||||
if (this.side === 'client' && this.socketServerOrClient instanceof plugins.smartsocket.SmartsocketClient) {
|
||||
this.socketServerOrClient.socketConnection.addTag({
|
||||
id: keyArg,
|
||||
payload: payloadArg
|
||||
})
|
||||
} else {
|
||||
throw new Error('tagging is only supported on clients');
|
||||
}
|
||||
}
|
||||
|
||||
public createTypedRequest<T extends plugins.typedrequestInterfaces.ITypedRequest>(
|
||||
methodName: T['method'],
|
||||
targetConnection?: plugins.smartsocket.SocketConnection
|
||||
@@ -137,20 +157,46 @@ export class TypedSocket {
|
||||
return typedrequest;
|
||||
}
|
||||
|
||||
public async findTargetConnection(
|
||||
findFuncArg: (connectionArg: plugins.smartsocket.SocketConnection) => boolean
|
||||
public async findAllTargetConnections(
|
||||
asyncFindFuncArg: (connectionArg: plugins.smartsocket.SocketConnection) => Promise<boolean>
|
||||
) {
|
||||
if (this.socketServerOrClient instanceof plugins.smartsocket.Smartsocket) {
|
||||
const matchingSockets: plugins.smartsocket.SocketConnection[] = [];
|
||||
for (const socketConnection of this.socketServerOrClient.socketConnections.getArray()) {
|
||||
if (findFuncArg(socketConnection)) {
|
||||
return socketConnection;
|
||||
if (await asyncFindFuncArg(socketConnection)) {
|
||||
matchingSockets.push(socketConnection);
|
||||
}
|
||||
}
|
||||
return matchingSockets;
|
||||
} else {
|
||||
console.warn('this method >>findTargetConnection<< is only available from the server');
|
||||
throw new Error('this method >>findTargetConnection<< is only available from the server');
|
||||
}
|
||||
}
|
||||
|
||||
public async findTargetConnection(
|
||||
asyncFindFuncArg: (connectionArg: plugins.smartsocket.SocketConnection) => Promise<boolean>
|
||||
) {
|
||||
const allMatching = this.findAllTargetConnections(asyncFindFuncArg);
|
||||
return allMatching[0];
|
||||
}
|
||||
|
||||
public async findAllTargetConnectionsByTag(keyArg: string, payloadArg?: any) {
|
||||
return this.findAllTargetConnections(async socketConnectionArg => {
|
||||
let result: boolean;
|
||||
if (!payloadArg) {
|
||||
result = !!socketConnectionArg.getTagById('keyArg')
|
||||
} else {
|
||||
result = !!socketConnectionArg.getTagById('keyArg') === payloadArg;
|
||||
}
|
||||
return result;
|
||||
})
|
||||
}
|
||||
|
||||
public async findTargetConnectionByTag(keyArg: string, payloadArg?: any) {
|
||||
const allResults = this.findAllTargetConnectionsByTag(keyArg, payloadArg)
|
||||
return allResults[0];
|
||||
}
|
||||
|
||||
public async stop() {
|
||||
await this.socketServerOrClient.stop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user