Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
ad106909e2 | |||
b346da01f1 | |||
51fedb270b | |||
fd26b48ff6 | |||
1bfe10691a | |||
bf81c34dbc |
11
package.json
11
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@api.global/typedrequest",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.8",
|
||||
"private": false,
|
||||
"description": "make typed requests towards apis",
|
||||
"main": "dist_ts/index.js",
|
||||
@ -14,19 +14,20 @@
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@api.global/typedserver": "^3.0.20",
|
||||
"@api.global/typedserver": "^3.0.24",
|
||||
"@git.zone/tsbuild": "^2.1.72",
|
||||
"@git.zone/tsbundle": "^2.0.15",
|
||||
"@git.zone/tsrun": "^1.2.44",
|
||||
"@git.zone/tstest": "^1.0.86",
|
||||
"@push.rocks/smartenv": "^5.0.12",
|
||||
"@push.rocks/tapbundle": "^5.0.15",
|
||||
"@types/node": "^20.11.19"
|
||||
"@types/node": "^20.11.20"
|
||||
},
|
||||
"dependencies": {
|
||||
"@api.global/typedrequest-interfaces": "^3.0.1",
|
||||
"@api.global/typedrequest-interfaces": "^3.0.17",
|
||||
"@push.rocks/isounique": "^1.0.5",
|
||||
"@push.rocks/lik": "^6.0.12",
|
||||
"@push.rocks/lik": "^6.0.13",
|
||||
"@push.rocks/smartbuffer": "^1.0.6",
|
||||
"@push.rocks/smartdelay": "^3.0.5",
|
||||
"@push.rocks/smartpromise": "^4.0.3",
|
||||
"@push.rocks/webrequest": "^3.0.34"
|
||||
|
199
pnpm-lock.yaml
generated
199
pnpm-lock.yaml
generated
@ -6,14 +6,17 @@ settings:
|
||||
|
||||
dependencies:
|
||||
'@api.global/typedrequest-interfaces':
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
specifier: ^3.0.17
|
||||
version: 3.0.17
|
||||
'@push.rocks/isounique':
|
||||
specifier: ^1.0.5
|
||||
version: 1.0.5
|
||||
'@push.rocks/lik':
|
||||
specifier: ^6.0.12
|
||||
version: 6.0.12
|
||||
specifier: ^6.0.13
|
||||
version: 6.0.13
|
||||
'@push.rocks/smartbuffer':
|
||||
specifier: ^1.0.6
|
||||
version: 1.0.6
|
||||
'@push.rocks/smartdelay':
|
||||
specifier: ^3.0.5
|
||||
version: 3.0.5
|
||||
@ -26,8 +29,8 @@ dependencies:
|
||||
|
||||
devDependencies:
|
||||
'@api.global/typedserver':
|
||||
specifier: ^3.0.20
|
||||
version: 3.0.20
|
||||
specifier: ^3.0.24
|
||||
version: 3.0.24
|
||||
'@git.zone/tsbuild':
|
||||
specifier: ^2.1.72
|
||||
version: 2.1.72
|
||||
@ -36,10 +39,10 @@ devDependencies:
|
||||
version: 2.0.15
|
||||
'@git.zone/tsrun':
|
||||
specifier: ^1.2.44
|
||||
version: 1.2.46(@types/node@20.11.19)
|
||||
version: 1.2.46(@types/node@20.11.20)
|
||||
'@git.zone/tstest':
|
||||
specifier: ^1.0.86
|
||||
version: 1.0.86(@types/node@20.11.19)(sinon@17.0.1)
|
||||
version: 1.0.86(@types/node@20.11.20)(sinon@17.0.1)
|
||||
'@push.rocks/smartenv':
|
||||
specifier: ^5.0.12
|
||||
version: 5.0.12
|
||||
@ -47,37 +50,38 @@ devDependencies:
|
||||
specifier: ^5.0.15
|
||||
version: 5.0.15(sinon@17.0.1)
|
||||
'@types/node':
|
||||
specifier: ^20.11.19
|
||||
version: 20.11.19
|
||||
specifier: ^20.11.20
|
||||
version: 20.11.20
|
||||
|
||||
packages:
|
||||
|
||||
/@api.global/typedrequest-interfaces@3.0.1:
|
||||
resolution: {integrity: sha512-eR2Cr01BYRwIq/X2ajOenWhm8l+/YE4A5kK/9V6I8ZnhtEBMFHG6YjF6Fg8npLJWbvhZXhOms+axZ6JKI71o8g==}
|
||||
/@api.global/typedrequest-interfaces@3.0.17:
|
||||
resolution: {integrity: sha512-bbSNnhwgi9GOdxEMC0Sr776/7apJFjp9C3WnNUftptGvFhRQfOre6ifTwDKdFnAzZWH2A4g+hg16dbeqIL/vtA==}
|
||||
|
||||
/@api.global/typedrequest@3.0.4:
|
||||
resolution: {integrity: sha512-8UThH9c3MxdSLiON8UN1CPXooU6Mp0eleFhVS3QB2OUsYqgEGn/EzuMt+cMIv/+ESSS6zcTpHvAhZ8ZMLfpL8A==}
|
||||
dependencies:
|
||||
'@api.global/typedrequest-interfaces': 3.0.1
|
||||
'@api.global/typedrequest-interfaces': 3.0.17
|
||||
'@push.rocks/isounique': 1.0.5
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
'@push.rocks/webrequest': 3.0.34
|
||||
dev: true
|
||||
|
||||
/@api.global/typedserver@3.0.20:
|
||||
resolution: {integrity: sha512-bJA79KxGD24xqOMNZCovMK13Qf1x0hhzwQ+vlfbqvnKkMAieNbfiTfYcrMsfmTSMMDP0rEi9JEBW8tFSt4bn5g==}
|
||||
/@api.global/typedserver@3.0.24:
|
||||
resolution: {integrity: sha512-aRzdJyws7cQ+uHZqgV5n9CudDscSHiefGBiUgrD9oKV+WUCnhgJSqYp6hoSp/lt2FqutdDOiw1MWsfApQRtTgw==}
|
||||
dependencies:
|
||||
'@api.global/typedrequest': 3.0.4
|
||||
'@api.global/typedrequest-interfaces': 3.0.1
|
||||
'@api.global/typedrequest-interfaces': 3.0.17
|
||||
'@api.global/typedsocket': 3.0.0
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartchok': 1.0.32
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartenv': 5.0.12
|
||||
'@push.rocks/smartfeed': 1.0.11
|
||||
'@push.rocks/smartfile': 11.0.4
|
||||
'@push.rocks/smartjson': 5.0.10
|
||||
'@push.rocks/smartlog': 3.0.3
|
||||
'@push.rocks/smartlog-destination-devtools': 1.0.10
|
||||
'@push.rocks/smartmanifest': 2.0.2
|
||||
@ -108,7 +112,7 @@ packages:
|
||||
resolution: {integrity: sha512-ui+6MLd99iTN/lC+iC/FKPRjzVyiZ4PrmlU6ptbCtbBj3cSOXHx+RRGF54+be2xHodf4FOgwFv/GZdW8LtO3vg==}
|
||||
dependencies:
|
||||
'@api.global/typedrequest': 3.0.4
|
||||
'@api.global/typedrequest-interfaces': 3.0.1
|
||||
'@api.global/typedrequest-interfaces': 3.0.17
|
||||
'@push.rocks/isohash': 2.0.1
|
||||
'@push.rocks/smartjson': 5.0.10
|
||||
'@push.rocks/smartrx': 3.0.7
|
||||
@ -399,13 +403,13 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@git.zone/tsrun@1.2.46(@types/node@20.11.19):
|
||||
/@git.zone/tsrun@1.2.46(@types/node@20.11.20):
|
||||
resolution: {integrity: sha512-8miFVBle9Mnjx+uPGI/P+EuWcIOXWjBAkdjN5IYbdp5Ytt4xQODCLh4JSnC9h56UeU1nUxCAxZeJs2e9TXrivA==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@push.rocks/smartfile': 10.0.33
|
||||
'@push.rocks/smartshell': 3.0.3
|
||||
ts-node: 10.9.1(@types/node@20.11.19)(typescript@5.1.6)
|
||||
ts-node: 10.9.1(@types/node@20.11.20)(typescript@5.1.6)
|
||||
typescript: 5.1.6
|
||||
transitivePeerDependencies:
|
||||
- '@swc/core'
|
||||
@ -414,13 +418,13 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@git.zone/tstest@1.0.86(@types/node@20.11.19)(sinon@17.0.1):
|
||||
/@git.zone/tstest@1.0.86(@types/node@20.11.20)(sinon@17.0.1):
|
||||
resolution: {integrity: sha512-ec95MNeA21L+ob+lvLVCmwPTTC1BY+v/JHLYZ9DOZ9+9buLgx+cJ7VkwGBJCnlWJtqEtJosUrFKTih36iNuT3g==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@api.global/typedserver': 3.0.20
|
||||
'@api.global/typedserver': 3.0.24
|
||||
'@git.zone/tsbundle': 2.0.15
|
||||
'@git.zone/tsrun': 1.2.46(@types/node@20.11.19)
|
||||
'@git.zone/tsrun': 1.2.46(@types/node@20.11.20)
|
||||
'@push.rocks/consolecolor': 2.0.1
|
||||
'@push.rocks/smartbrowser': 2.0.6
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
@ -599,8 +603,8 @@ packages:
|
||||
/@push.rocks/isounique@1.0.5:
|
||||
resolution: {integrity: sha512-Z0BVqZZOCif1THTbIKWMgg0wxCzt9CyBtBBqQJiZ+jJ0KlQFrQHNHrPt81/LXe/L4x0cxWsn0bpL6W5DNSvNLw==}
|
||||
|
||||
/@push.rocks/lik@6.0.12:
|
||||
resolution: {integrity: sha512-/vzlOZ26gCmXZz67LeM2hJ+aNM49Jxvf3FKxLMXHhJwffd3LcV96MYbMfKzKR/za/bh5Itf3a6UjLL5mmN6Pew==}
|
||||
/@push.rocks/lik@6.0.13:
|
||||
resolution: {integrity: sha512-pfwcnWKQ56uuCjdw/NbY83e2MSFh9bu5Sxf38ZukzDH8+Athx83naVqt2pEENfUJrFWx7PcSC831GVwlWDt3oA==}
|
||||
dependencies:
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartmatch': 2.0.0
|
||||
@ -625,6 +629,10 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smartbuffer@1.0.6:
|
||||
resolution: {integrity: sha512-TpZuKVrj0D/C6+RApjajp2FGBfXuz7b9BQSYAR+N1XmAxO8jYAmS6YlChcofThY2aB9sTA98Tt110hM/d+cc8g==}
|
||||
dev: false
|
||||
|
||||
/@push.rocks/smartcache@1.0.16:
|
||||
resolution: {integrity: sha512-UAXf74eDuH4/RebJhydIbHlYVR3ACYJjniEY/9ZePblu7bIPgwFZqLBE9g1lcKVogbH9yY62dk3rSpgBzenyfQ==}
|
||||
dependencies:
|
||||
@ -638,7 +646,7 @@ packages:
|
||||
/@push.rocks/smartchok@1.0.32:
|
||||
resolution: {integrity: sha512-bBJ4UX3jjItZo0mdDxQcDdRqbuIyCeDo4XXvkX2yLqkHJHFxQbL2lTDrX4l7cTaQ7361AYSsvOsBkZyPvCN6mg==}
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
'@push.rocks/smartrx': 3.0.7
|
||||
'@tempfix/watcher': 2.3.0
|
||||
@ -647,7 +655,7 @@ packages:
|
||||
/@push.rocks/smartcli@4.0.8:
|
||||
resolution: {integrity: sha512-B4F3nqq7ko8tev1wxGdFnh/zSDDP8Q9LpEOb3wTf0jayyhYetFQ7n6zi4J9fhXYBKPkJSyQEBoOfRmgJyeLHkA==}
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartlog': 3.0.3
|
||||
'@push.rocks/smartparam': 1.1.10
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
@ -688,7 +696,7 @@ packages:
|
||||
/@push.rocks/smartfile@10.0.33:
|
||||
resolution: {integrity: sha512-mCvTWP32MCFtFcZVuGzvazyxQSrPhlaLkWTydz8IZ32/V41vvxieXDiPwoF64lcIYO37EZEXElYdBBjqCJ8MuA==}
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartfile-interfaces': 1.0.7
|
||||
'@push.rocks/smarthash': 3.0.4
|
||||
@ -711,7 +719,7 @@ packages:
|
||||
/@push.rocks/smartfile@10.0.41:
|
||||
resolution: {integrity: sha512-xOOy0duI34M2qrJZggpk51EHGXmg9+mBL1Q55tNiQKXzfx89P3coY1EAZG8tvmep3qB712QEKe7T+u04t42Kjg==}
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartfile-interfaces': 1.0.7
|
||||
'@push.rocks/smarthash': 3.0.4
|
||||
@ -732,7 +740,7 @@ packages:
|
||||
/@push.rocks/smartfile@11.0.4:
|
||||
resolution: {integrity: sha512-NXAyqYE5zNUJ9Mu/t2oWUKu21CRUI4Dvlm56rKBSczCq5xeC7EwmamTzL3Nyn6Tmu1jBpYktYL4zIx17JJOB7w==}
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartfile-interfaces': 1.0.7
|
||||
'@push.rocks/smarthash': 3.0.4
|
||||
@ -938,11 +946,11 @@ packages:
|
||||
/@push.rocks/smartsocket@2.0.24:
|
||||
resolution: {integrity: sha512-Glqv1Zi5TXgD+04P8OvTpiytyfrQxTPv67qAwZizAVVQ2zWJJgKqnIuoHT1zKP8QiKRNer+D58LCxX0ZE2XfzQ==}
|
||||
dependencies:
|
||||
'@api.global/typedrequest-interfaces': 3.0.1
|
||||
'@api.global/typedserver': 3.0.20
|
||||
'@api.global/typedrequest-interfaces': 3.0.17
|
||||
'@api.global/typedserver': 3.0.24
|
||||
'@push.rocks/isohash': 2.0.1
|
||||
'@push.rocks/isounique': 1.0.5
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartenv': 5.0.12
|
||||
'@push.rocks/smartjson': 5.0.10
|
||||
@ -995,7 +1003,7 @@ packages:
|
||||
/@push.rocks/smartstream@3.0.30:
|
||||
resolution: {integrity: sha512-+izraXkILJJIy99PzP2LYahaW+g/35bTi/UxD7FeuOYbTaigode6Q3swvs0nrK6yu+A9x6RfoWV4JAJjd3Y87g==}
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
'@push.rocks/smartrx': 3.0.7
|
||||
dev: true
|
||||
@ -1008,7 +1016,7 @@ packages:
|
||||
'@types/randomatic': 3.1.5
|
||||
buffer: 6.0.3
|
||||
crypto-random-string: 5.0.0
|
||||
js-base64: 3.7.6
|
||||
js-base64: 3.7.7
|
||||
normalize-newline: 4.1.0
|
||||
randomatic: 3.1.1
|
||||
strip-indent: 4.0.0
|
||||
@ -1032,7 +1040,7 @@ packages:
|
||||
/@push.rocks/smarttime@4.0.6:
|
||||
resolution: {integrity: sha512-1whOow0YJw/TbN758TedRRxApoZbsvyxCVpoGjXh7DE/fEEgs7RCr4vVF5jYpyXNQuNMLpKJcTsSfyQ6RvH4Aw==}
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
croner: 7.0.3
|
||||
@ -1055,7 +1063,7 @@ packages:
|
||||
/@push.rocks/smartxml@1.0.8:
|
||||
resolution: {integrity: sha512-idrPsBj9t6oxkLZJZgWtyZK6PnQ5BVDbBErk0UfGanXgSWJc+ZEKNYjVqr850+Na3+y0CT6AQdug7pnaokygwg==}
|
||||
dependencies:
|
||||
fast-xml-parser: 4.3.4
|
||||
fast-xml-parser: 4.3.5
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smartyaml@2.0.5:
|
||||
@ -1094,7 +1102,7 @@ packages:
|
||||
resolution: {integrity: sha512-w5Q3g1TT5SDIXukAAoYVuWud+Y5ysS8qiBqPU00/re895VVZhUOSNJMNU6jyneZigmbWtwSLsxDkZHlsHWpfuA==}
|
||||
dependencies:
|
||||
'@apiglobal/typedrequest-interfaces': 2.0.1
|
||||
'@push.rocks/lik': 6.0.12
|
||||
'@push.rocks/lik': 6.0.13
|
||||
'@push.rocks/smartenv': 5.0.12
|
||||
'@push.rocks/smartjson': 5.0.10
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
@ -1429,7 +1437,7 @@ packages:
|
||||
/@types/accepts@1.3.6:
|
||||
resolution: {integrity: sha512-6+qlUg57yfE9OO63wnsJXLeq9cG3gSHBBIxNMOjNrbDRlDnm/NaR7RctfYcVCPq+j7d+MwOxqVEludH5+FKrlg==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/babel__code-frame@7.0.5:
|
||||
@ -1440,14 +1448,14 @@ packages:
|
||||
resolution: {integrity: sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==}
|
||||
dependencies:
|
||||
'@types/connect': 3.4.37
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/body-parser@1.19.5:
|
||||
resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==}
|
||||
dependencies:
|
||||
'@types/connect': 3.4.38
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/buffer-json@2.0.2:
|
||||
@ -1470,27 +1478,27 @@ packages:
|
||||
/@types/clean-css@4.2.11:
|
||||
resolution: {integrity: sha512-Y8n81lQVTAfP2TOdtJJEsCoYl1AnOkqDqMvXb9/7pfgZZ7r8YrEyurrAvAoAjHOGXKRybay+5CsExqIH6liccw==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
source-map: 0.6.1
|
||||
dev: true
|
||||
|
||||
/@types/co-body@6.1.2:
|
||||
resolution: {integrity: sha512-eUqBFu8mNW56oZAP0aEmGm+4qFeYjkxVThQ1F/8jFOBiSNM+gib3pYFzjnQsQRUZ501Eg8qOc7Nn76GcZo6Uvg==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
'@types/qs': 6.9.9
|
||||
dev: true
|
||||
|
||||
/@types/connect@3.4.37:
|
||||
resolution: {integrity: sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/connect@3.4.38:
|
||||
resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/content-disposition@0.5.7:
|
||||
@ -1511,13 +1519,13 @@ packages:
|
||||
'@types/connect': 3.4.37
|
||||
'@types/express': 4.17.20
|
||||
'@types/keygrip': 1.0.4
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/cors@2.8.17:
|
||||
resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/debounce@1.2.3:
|
||||
@ -1531,7 +1539,7 @@ packages:
|
||||
/@types/express-serve-static-core@4.17.39:
|
||||
resolution: {integrity: sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
'@types/qs': 6.9.9
|
||||
'@types/range-parser': 1.2.6
|
||||
'@types/send': 0.17.3
|
||||
@ -1540,7 +1548,7 @@ packages:
|
||||
/@types/express-serve-static-core@4.17.43:
|
||||
resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
'@types/qs': 6.9.11
|
||||
'@types/range-parser': 1.2.7
|
||||
'@types/send': 0.17.4
|
||||
@ -1567,34 +1575,34 @@ packages:
|
||||
/@types/from2@2.3.2:
|
||||
resolution: {integrity: sha512-s1pdctxW2+CA4FOxxTBRxC3RKQL9Br1a2s2LngP4jh1BI84JBL3mDXj87EwcckN9z/IXp8o3ySmvZveGEAAwqw==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/from2@2.3.5:
|
||||
resolution: {integrity: sha512-giavnjf3kNlJnE+HpZA1CQ3UKHxgehzsTuIMGda8pGMbOiLYGVNADEskey44OZcADHm/HOoBany8IV+0x28XFw==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/fs-extra@11.0.3:
|
||||
resolution: {integrity: sha512-sF59BlXtUdzEAL1u0MSvuzWd7PdZvZEtnaVkzX5mjpdWTJ8brG0jUqve3jPCzSzvAKKMHTG8F8o/WMQLtleZdQ==}
|
||||
dependencies:
|
||||
'@types/jsonfile': 6.1.3
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/fs-extra@11.0.4:
|
||||
resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==}
|
||||
dependencies:
|
||||
'@types/jsonfile': 6.1.4
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/glob@8.1.0:
|
||||
resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
|
||||
dependencies:
|
||||
'@types/minimatch': 5.1.2
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/html-minifier@4.0.5:
|
||||
@ -1652,13 +1660,13 @@ packages:
|
||||
/@types/jsonfile@6.1.3:
|
||||
resolution: {integrity: sha512-/yqTk2SZ1wIezK0hiRZD7RuSf4B3whFxFamB1kGStv+8zlWScTMcHanzfc0XKWs5vA1TkHeckBlOyM8jxU8nHA==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/jsonfile@6.1.4:
|
||||
resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/keygrip@1.0.4:
|
||||
@ -1681,7 +1689,7 @@ packages:
|
||||
'@types/http-errors': 2.0.3
|
||||
'@types/keygrip': 1.0.4
|
||||
'@types/koa-compose': 3.2.7
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/mime-types@2.1.1:
|
||||
@ -1715,8 +1723,8 @@ packages:
|
||||
resolution: {integrity: sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==}
|
||||
dev: true
|
||||
|
||||
/@types/node@20.11.19:
|
||||
resolution: {integrity: sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==}
|
||||
/@types/node@20.11.20:
|
||||
resolution: {integrity: sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==}
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
dev: true
|
||||
@ -1760,14 +1768,14 @@ packages:
|
||||
resolution: {integrity: sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==}
|
||||
dependencies:
|
||||
'@types/mime': 1.3.4
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/send@0.17.4:
|
||||
resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==}
|
||||
dependencies:
|
||||
'@types/mime': 1.3.5
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/serve-static@1.15.4:
|
||||
@ -1775,7 +1783,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/http-errors': 2.0.3
|
||||
'@types/mime': 3.0.3
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/serve-static@1.15.5:
|
||||
@ -1783,7 +1791,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/http-errors': 2.0.4
|
||||
'@types/mime': 3.0.4
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/sinon-chai@3.2.11:
|
||||
@ -1809,19 +1817,19 @@ packages:
|
||||
/@types/through2@2.0.38:
|
||||
resolution: {integrity: sha512-YFu+nHmjxMurkH1BSzA0Z1WrKDAY8jUKPZctNQn7mc+/KKtp2XxnclHFXxdB1m7Iqnzb5aywgP8TMK283LezGQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/through2@2.0.40:
|
||||
resolution: {integrity: sha512-QeEwyeGxvtKjP0I/SR8pHtKMgmqotWTI8V/rNMTjbF3arWZJV/kYtbZXtwQKxUuV/oPSGkUilSspFKkTgCPTpA==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/through2@2.0.41:
|
||||
resolution: {integrity: sha512-ryQ0tidWkb1O1JuYvWKyMLYEtOWDqF5mHerJzKz/gQpoAaJq2l/dsMPBF0B5BNVT34rbARYJ5/tsZwLfUi2kwQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/trusted-types@2.0.7:
|
||||
@ -1849,20 +1857,20 @@ packages:
|
||||
/@types/ws@7.4.7:
|
||||
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/ws@8.5.10:
|
||||
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
|
||||
/@types/yauzl@2.10.3:
|
||||
resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
@ -2324,7 +2332,6 @@ packages:
|
||||
function-bind: 1.1.2
|
||||
get-intrinsic: 1.2.4
|
||||
set-function-length: 1.2.1
|
||||
dev: true
|
||||
|
||||
/callsites@3.1.0:
|
||||
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
|
||||
@ -2679,7 +2686,6 @@ packages:
|
||||
get-intrinsic: 1.2.1
|
||||
gopd: 1.0.1
|
||||
has-property-descriptors: 1.0.0
|
||||
dev: true
|
||||
|
||||
/define-data-property@1.1.4:
|
||||
resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==}
|
||||
@ -2688,20 +2694,12 @@ packages:
|
||||
es-define-property: 1.0.0
|
||||
es-errors: 1.3.0
|
||||
gopd: 1.0.1
|
||||
dev: true
|
||||
|
||||
/define-lazy-prop@2.0.0:
|
||||
resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==}
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/define-properties@1.1.4:
|
||||
resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
has-property-descriptors: 1.0.0
|
||||
object-keys: 1.1.1
|
||||
|
||||
/define-properties@1.2.1:
|
||||
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -2709,7 +2707,6 @@ packages:
|
||||
define-data-property: 1.1.1
|
||||
has-property-descriptors: 1.0.0
|
||||
object-keys: 1.1.1
|
||||
dev: true
|
||||
|
||||
/delayed-stream@1.0.0:
|
||||
resolution: {integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk=}
|
||||
@ -2841,7 +2838,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/cookie': 0.4.1
|
||||
'@types/cors': 2.8.17
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
accepts: 1.3.8
|
||||
base64id: 2.0.0
|
||||
cookie: 0.4.2
|
||||
@ -2917,12 +2914,10 @@ packages:
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
get-intrinsic: 1.2.4
|
||||
dev: true
|
||||
|
||||
/es-errors@1.3.0:
|
||||
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: true
|
||||
|
||||
/es-module-lexer@1.3.1:
|
||||
resolution: {integrity: sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==}
|
||||
@ -3094,8 +3089,8 @@ packages:
|
||||
/fast-json-stable-stringify@2.1.0:
|
||||
resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
|
||||
|
||||
/fast-xml-parser@4.3.4:
|
||||
resolution: {integrity: sha512-utnwm92SyozgA3hhH2I8qldf2lBqm6qHOICawRNRFu1qMe3+oqr+GcXjGqTmXTMGE5T4eC03kr/rlh5C1IRdZA==}
|
||||
/fast-xml-parser@4.3.5:
|
||||
resolution: {integrity: sha512-sWvP1Pl8H03B8oFJpFR3HE31HUfwtX7Rlf9BNsvdpujD4n7WMhfmu8h9wOV2u+c1k0ZilTADhPqypzx2J690ZQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
strnum: 1.0.5
|
||||
@ -3263,7 +3258,6 @@ packages:
|
||||
|
||||
/function-bind@1.1.2:
|
||||
resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
|
||||
dev: true
|
||||
|
||||
/function.prototype.name@1.1.6:
|
||||
resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==}
|
||||
@ -3302,7 +3296,6 @@ packages:
|
||||
has: 1.0.4
|
||||
has-proto: 1.0.1
|
||||
has-symbols: 1.0.3
|
||||
dev: true
|
||||
|
||||
/get-intrinsic@1.2.4:
|
||||
resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==}
|
||||
@ -3313,7 +3306,6 @@ packages:
|
||||
has-proto: 1.0.3
|
||||
has-symbols: 1.0.3
|
||||
hasown: 2.0.1
|
||||
dev: true
|
||||
|
||||
/get-stream@5.2.0:
|
||||
resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==}
|
||||
@ -3399,7 +3391,6 @@ packages:
|
||||
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
|
||||
dependencies:
|
||||
get-intrinsic: 1.2.1
|
||||
dev: true
|
||||
|
||||
/got@12.6.1:
|
||||
resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==}
|
||||
@ -3454,17 +3445,14 @@ packages:
|
||||
resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==}
|
||||
dependencies:
|
||||
es-define-property: 1.0.0
|
||||
dev: true
|
||||
|
||||
/has-proto@1.0.1:
|
||||
resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: true
|
||||
|
||||
/has-proto@1.0.3:
|
||||
resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: true
|
||||
|
||||
/has-symbols@1.0.3:
|
||||
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
|
||||
@ -3486,14 +3474,12 @@ packages:
|
||||
/has@1.0.4:
|
||||
resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==}
|
||||
engines: {node: '>= 0.4.0'}
|
||||
dev: true
|
||||
|
||||
/hasown@2.0.1:
|
||||
resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
function-bind: 1.1.2
|
||||
dev: true
|
||||
|
||||
/he@1.2.0:
|
||||
resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==}
|
||||
@ -3744,8 +3730,8 @@ packages:
|
||||
resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
call-bind: 1.0.2
|
||||
define-properties: 1.1.4
|
||||
call-bind: 1.0.7
|
||||
define-properties: 1.2.1
|
||||
|
||||
/is-negative-zero@2.0.2:
|
||||
resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==}
|
||||
@ -3895,6 +3881,10 @@ packages:
|
||||
resolution: {integrity: sha512-NPrWuHFxFUknr1KqJRDgUQPexQF0uIJWjeT+2KjEePhitQxQEx5EJBG1lVn5/hc8aLycTpXrDOgPQ6Zq+EDiTA==}
|
||||
dev: true
|
||||
|
||||
/js-base64@3.7.7:
|
||||
resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}
|
||||
dev: true
|
||||
|
||||
/js-tokens@4.0.0:
|
||||
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
|
||||
dev: true
|
||||
@ -3931,7 +3921,7 @@ packages:
|
||||
dependencies:
|
||||
universalify: 2.0.0
|
||||
optionalDependencies:
|
||||
graceful-fs: 4.2.10
|
||||
graceful-fs: 4.2.11
|
||||
dev: true
|
||||
|
||||
/just-extend@6.2.0:
|
||||
@ -5088,7 +5078,6 @@ packages:
|
||||
get-intrinsic: 1.2.4
|
||||
gopd: 1.0.1
|
||||
has-property-descriptors: 1.0.2
|
||||
dev: true
|
||||
|
||||
/set-function-name@2.0.1:
|
||||
resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==}
|
||||
@ -5180,12 +5169,14 @@ packages:
|
||||
is-fullwidth-code-point: 3.0.0
|
||||
dev: true
|
||||
|
||||
/socket.io-adapter@2.5.2:
|
||||
resolution: {integrity: sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==}
|
||||
/socket.io-adapter@2.5.4:
|
||||
resolution: {integrity: sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg==}
|
||||
dependencies:
|
||||
debug: 4.3.4
|
||||
ws: 8.11.0
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- supports-color
|
||||
- utf-8-validate
|
||||
dev: true
|
||||
|
||||
@ -5222,7 +5213,7 @@ packages:
|
||||
cors: 2.8.5
|
||||
debug: 4.3.4
|
||||
engine.io: 6.5.2
|
||||
socket.io-adapter: 2.5.2
|
||||
socket.io-adapter: 2.5.4
|
||||
socket.io-parser: 4.2.4
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
@ -5500,7 +5491,7 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/ts-node@10.9.1(@types/node@20.11.19)(typescript@5.1.6):
|
||||
/ts-node@10.9.1(@types/node@20.11.20)(typescript@5.1.6):
|
||||
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@ -5519,7 +5510,7 @@ packages:
|
||||
'@tsconfig/node12': 1.0.11
|
||||
'@tsconfig/node14': 1.0.3
|
||||
'@tsconfig/node16': 1.0.4
|
||||
'@types/node': 20.11.19
|
||||
'@types/node': 20.11.20
|
||||
acorn: 8.10.0
|
||||
acorn-walk: 8.2.0
|
||||
arg: 4.1.3
|
||||
|
45
test/test.ts
45
test/test.ts
@ -2,8 +2,10 @@ import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import * as typedserver from '@api.global/typedserver';
|
||||
|
||||
import * as typedrequest from '../ts/index.js';
|
||||
import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
|
||||
|
||||
let testServer: typedserver.servertools.Server;
|
||||
let testTypedRouter: typedrequest.TypedRouter;
|
||||
let testTypedHandler: typedrequest.TypedHandler<ITestReqRes>;
|
||||
|
||||
// lets define an interface
|
||||
@ -17,6 +19,16 @@ interface ITestReqRes {
|
||||
};
|
||||
}
|
||||
|
||||
interface ITestStream {
|
||||
method: 'handleStream';
|
||||
request: {
|
||||
requestStream: typedrequestInterfaces.IVirtualStream;
|
||||
};
|
||||
response: {
|
||||
responseStream: typedrequestInterfaces.IVirtualStream;
|
||||
};
|
||||
}
|
||||
|
||||
tap.test('should create a typedHandler', async () => {
|
||||
// lets use the interface in a TypedHandler
|
||||
testTypedHandler = new typedrequest.TypedHandler<ITestReqRes>('hi', async (reqArg) => {
|
||||
@ -35,7 +47,7 @@ tap.test('should spawn a server to test with', async () => {
|
||||
});
|
||||
|
||||
tap.test('should define a testHandler', async () => {
|
||||
const testTypedRouter = new typedrequest.TypedRouter(); // typed routers can broker typedrequests between handlers
|
||||
testTypedRouter = new typedrequest.TypedRouter(); // typed routers can broker typedrequests between handlers
|
||||
testTypedRouter.addTypedHandler(testTypedHandler);
|
||||
testServer.addRoute(
|
||||
'/testroute',
|
||||
@ -60,7 +72,36 @@ tap.test('should fire a request', async () => {
|
||||
expect(response.surname).toEqual('wow');
|
||||
});
|
||||
|
||||
tap.test('should end the server', async () => {
|
||||
tap.test('should allow VirtualStreams', async () => {
|
||||
const newRequestingVS = new typedrequest.VirtualStream();
|
||||
const newRespondingVS = new typedrequest.VirtualStream();
|
||||
let generatedRequestingVS: typedrequestInterfaces.IVirtualStream;
|
||||
let generatedRespondingVS: typedrequestInterfaces.IVirtualStream;
|
||||
testTypedRouter.addTypedHandler(new typedrequest.TypedHandler<ITestStream>('handleStream', async (reqArg) => {
|
||||
console.log('hey there');
|
||||
console.log(reqArg.requestStream);
|
||||
generatedRequestingVS = reqArg.requestStream;
|
||||
return {
|
||||
responseStream: newRespondingVS,
|
||||
};
|
||||
}));
|
||||
const typedRequest = new typedrequest.TypedRequest<ITestStream>(
|
||||
'http://localhost:3000/testroute',
|
||||
'handleStream'
|
||||
);
|
||||
const response = await typedRequest.fire({
|
||||
requestStream: newRequestingVS,
|
||||
});
|
||||
console.log(response.responseStream);
|
||||
|
||||
newRequestingVS.sendData(Buffer.from('hello'));
|
||||
const data = await generatedRequestingVS.fetchData();
|
||||
const decodedData = data.toString();
|
||||
expect(data.toString()).toEqual('hello');
|
||||
})
|
||||
|
||||
tap.test('should end the server', async (toolsArg) => {
|
||||
await toolsArg.delayFor(5000);
|
||||
await testServer.stop();
|
||||
});
|
||||
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@api.global/typedrequest',
|
||||
version: '3.0.5',
|
||||
version: '3.0.8',
|
||||
description: 'make typed requests towards apis'
|
||||
}
|
||||
|
@ -3,3 +3,4 @@ export * from './typedrequest.classes.typedhandler.js';
|
||||
export * from './typedrequest.classes.typedrouter.js';
|
||||
export * from './typedrequest.classes.typedresponseerror.js';
|
||||
export * from './typedrequest.classes.typedtarget.js';
|
||||
export * from './typedrequest.classes.virtualstream.js';
|
@ -6,8 +6,9 @@ export { typedRequestInterfaces };
|
||||
// pushrocks scope
|
||||
import * as isounique from '@push.rocks/isounique';
|
||||
import * as lik from '@push.rocks/lik';
|
||||
import * as smartbuffer from '@push.rocks/smartbuffer';
|
||||
import * as smartdelay from '@push.rocks/smartdelay';
|
||||
import * as smartpromise from '@push.rocks/smartpromise';
|
||||
import * as webrequest from '@push.rocks/webrequest';
|
||||
|
||||
export { isounique, lik, smartdelay, smartpromise, webrequest };
|
||||
export { isounique, lik, smartbuffer, smartdelay, smartpromise, webrequest };
|
||||
|
@ -1,44 +0,0 @@
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
export class VirtualStream {
|
||||
public streamId: string = plugins.isounique.uni();
|
||||
|
||||
constructor() {}
|
||||
|
||||
public static encodePayloadForNetwork(objectPayload: any): any {
|
||||
if (objectPayload instanceof VirtualStream) {
|
||||
return {
|
||||
_isVirtualStream: true,
|
||||
streamId: objectPayload.streamId,
|
||||
};
|
||||
} else if (Array.isArray(objectPayload)) {
|
||||
return objectPayload.map(VirtualStream.encodePayloadForNetwork);
|
||||
} else if (objectPayload !== null && typeof objectPayload === 'object') {
|
||||
return Object.keys(objectPayload).reduce((acc, key) => {
|
||||
acc[key] = VirtualStream.encodePayloadForNetwork(objectPayload[key]);
|
||||
return acc;
|
||||
}, {});
|
||||
} else {
|
||||
return objectPayload;
|
||||
}
|
||||
}
|
||||
|
||||
public static decodePayloadFromNetwork(objectPayload: any): any {
|
||||
if (objectPayload !== null && typeof objectPayload === 'object') {
|
||||
if (objectPayload._isVirtualStream) {
|
||||
const virtualStream = new VirtualStream();
|
||||
virtualStream.streamId = objectPayload.streamId;
|
||||
return virtualStream;
|
||||
} else if (Array.isArray(objectPayload)) {
|
||||
return objectPayload.map(VirtualStream.decodePayloadFromNetwork);
|
||||
} else {
|
||||
return Object.keys(objectPayload).reduce((acc, key) => {
|
||||
acc[key] = VirtualStream.decodePayloadFromNetwork(objectPayload[key]);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
} else {
|
||||
return objectPayload;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import { VirtualStream } from './typedrequest.classes.virtualstream.js';
|
||||
import { TypedResponseError } from './typedrequest.classes.typedresponseerror.js';
|
||||
import { TypedRouter } from './typedrequest.classes.typedrouter.js';
|
||||
import { TypedTarget } from './typedrequest.classes.typedtarget.js';
|
||||
@ -19,7 +20,6 @@ export class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest
|
||||
public method: string;
|
||||
|
||||
/**
|
||||
* note the overloading is thought to deal with promises
|
||||
* @param postEndPointArg
|
||||
* @param methodArg
|
||||
*/
|
||||
@ -36,8 +36,7 @@ export class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest
|
||||
* fires the request
|
||||
*/
|
||||
public async fire(fireArg: T['request'], useCacheArg: boolean = false): Promise<T['response']> {
|
||||
|
||||
let payload: plugins.typedRequestInterfaces.ITypedRequest = {
|
||||
let payloadSending: plugins.typedRequestInterfaces.ITypedRequest = {
|
||||
method: this.method,
|
||||
request: fireArg,
|
||||
response: null,
|
||||
@ -47,30 +46,58 @@ export class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest
|
||||
},
|
||||
};
|
||||
|
||||
let responseBody: plugins.typedRequestInterfaces.ITypedRequest;
|
||||
// lets preprocess the payload
|
||||
payloadSending = VirtualStream.encodePayloadForNetwork(payloadSending, {
|
||||
sendMethod: (payloadArg: plugins.typedRequestInterfaces.IStreamRequest) => {
|
||||
return this.postTrObject(payloadArg) as Promise<plugins.typedRequestInterfaces.IStreamRequest>;
|
||||
}
|
||||
});
|
||||
|
||||
let payloadReceiving: plugins.typedRequestInterfaces.ITypedRequest;
|
||||
payloadReceiving = await this.postTrObject(payloadSending, useCacheArg);
|
||||
|
||||
// lets preprocess the response
|
||||
payloadReceiving = VirtualStream.decodePayloadFromNetwork(payloadReceiving, {
|
||||
sendMethod: (payloadArg: plugins.typedRequestInterfaces.IStreamRequest) => {
|
||||
return this.postTrObject(payloadArg) as Promise<plugins.typedRequestInterfaces.IStreamRequest>;
|
||||
}
|
||||
});
|
||||
return payloadReceiving.response;
|
||||
}
|
||||
|
||||
private async postTrObject(payloadSendingArg: plugins.typedRequestInterfaces.ITypedRequest, useCacheArg: boolean = false) {
|
||||
let payloadReceiving: plugins.typedRequestInterfaces.ITypedRequest;
|
||||
if (this.urlEndPoint) {
|
||||
const response = await webrequestInstance.postJson(this.urlEndPoint, payload, useCacheArg);
|
||||
responseBody = response;
|
||||
const response = await webrequestInstance.postJson(
|
||||
this.urlEndPoint,
|
||||
payloadSendingArg,
|
||||
useCacheArg
|
||||
);
|
||||
payloadReceiving = response;
|
||||
} else {
|
||||
responseBody = await this.typedTarget.post(payload);
|
||||
payloadReceiving = await this.typedTarget.post(payloadSendingArg);
|
||||
}
|
||||
if (responseBody.error) {
|
||||
if (payloadReceiving.error) {
|
||||
console.error(
|
||||
`Got an error ${responseBody.error.text} with data ${JSON.stringify(
|
||||
responseBody.error.data, null, 2
|
||||
`Got an error ${payloadReceiving.error.text} with data ${JSON.stringify(
|
||||
payloadReceiving.error.data,
|
||||
null,
|
||||
2
|
||||
)}`
|
||||
);
|
||||
if (!responseBody.retry) {
|
||||
throw new TypedResponseError(responseBody.error.text, responseBody.error.data);
|
||||
if (!payloadReceiving.retry) {
|
||||
throw new TypedResponseError(payloadReceiving.error.text, payloadReceiving.error.data);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (responseBody.retry) {
|
||||
console.log(`server requested retry for the following reason: ${responseBody.retry.reason}`);
|
||||
await plugins.smartdelay.delayFor(responseBody.retry.waitForMs);
|
||||
if (payloadReceiving.retry) {
|
||||
console.log(
|
||||
`server requested retry for the following reason: ${payloadReceiving.retry.reason}`
|
||||
);
|
||||
await plugins.smartdelay.delayFor(payloadReceiving.retry.waitForMs);
|
||||
// tslint:disable-next-line: no-return-await
|
||||
return await this.fire(fireArg);
|
||||
payloadReceiving = await this.postTrObject(payloadSendingArg, useCacheArg);
|
||||
}
|
||||
return responseBody.response;
|
||||
return payloadReceiving;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import { VirtualStream } from './typedrequest.classes.virtualstream.js';
|
||||
|
||||
import { TypedHandler } from './typedrequest.classes.typedhandler.js';
|
||||
import { TypedRequest } from './typedrequest.classes.typedrequest.js';
|
||||
@ -13,6 +14,7 @@ export class TypedRouter {
|
||||
public handlerMap = new plugins.lik.ObjectMap<
|
||||
TypedHandler<any & plugins.typedRequestInterfaces.ITypedRequest>
|
||||
>();
|
||||
public registeredVirtualStreams = new plugins.lik.ObjectMap<VirtualStream<any>>();
|
||||
|
||||
public fireEventInterestMap = new plugins.lik.InterestMap<
|
||||
string,
|
||||
@ -89,6 +91,23 @@ export class TypedRouter {
|
||||
public async routeAndAddResponse<
|
||||
T extends plugins.typedRequestInterfaces.ITypedRequest = plugins.typedRequestInterfaces.ITypedRequest
|
||||
>(typedRequestArg: T, localRequestArg = false): Promise<T> {
|
||||
// decoding first
|
||||
typedRequestArg = VirtualStream.decodePayloadFromNetwork(typedRequestArg, {
|
||||
typedrouter: this,
|
||||
});
|
||||
|
||||
// localdata second
|
||||
typedRequestArg.localData = typedRequestArg.localData || {};
|
||||
typedRequestArg.localData.firstTypedrouter = this;
|
||||
|
||||
// lets do stream processing
|
||||
if (typedRequestArg.method === '##VirtualStream##') {
|
||||
const result: any = await this.handleStreamTypedRequest(typedRequestArg as plugins.typedRequestInterfaces.IStreamRequest);
|
||||
result.localData = null;
|
||||
return result as T;
|
||||
}
|
||||
|
||||
// lets do normal routing
|
||||
if (typedRequestArg?.correlation?.phase === 'request' || localRequestArg) {
|
||||
const typedHandler = this.getTypedHandlerForMethod(typedRequestArg.method);
|
||||
|
||||
@ -99,10 +118,20 @@ export class TypedRouter {
|
||||
data: {},
|
||||
};
|
||||
typedRequestArg.correlation.phase = 'response';
|
||||
|
||||
// encode again before handing back
|
||||
typedRequestArg = VirtualStream.encodePayloadForNetwork(typedRequestArg, {
|
||||
typedrouter: this,
|
||||
});
|
||||
return typedRequestArg;
|
||||
}
|
||||
|
||||
typedRequestArg = await typedHandler.addResponse(typedRequestArg);
|
||||
typedRequestArg.localData = null;
|
||||
// encode again before handing back
|
||||
typedRequestArg = VirtualStream.encodePayloadForNetwork(typedRequestArg, {
|
||||
typedrouter: this,
|
||||
});
|
||||
return typedRequestArg;
|
||||
} else if (typedRequestArg?.correlation?.phase === 'response') {
|
||||
this.fireEventInterestMap
|
||||
@ -115,4 +144,23 @@ export class TypedRouter {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* handle streaming
|
||||
* @param streamTrArg
|
||||
*/
|
||||
public async handleStreamTypedRequest(streamTrArg: plugins.typedRequestInterfaces.IStreamRequest) {
|
||||
const relevantVirtualStream = await this.registeredVirtualStreams.find(async virtualStreamArg => {
|
||||
return virtualStreamArg.streamId === streamTrArg.request.streamId;
|
||||
});
|
||||
if (!relevantVirtualStream) {
|
||||
console.log(`no relevant virtual stream found for stream with id ${streamTrArg.request.streamId}`);
|
||||
console.log(this.registeredVirtualStreams.getArray());
|
||||
return streamTrArg;
|
||||
} else {
|
||||
console.log(`success: found relevant virtual stream with id ${streamTrArg.request.streamId}`);
|
||||
}
|
||||
const result = await relevantVirtualStream.handleStreamTr(streamTrArg);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
359
ts/typedrequest.classes.virtualstream.ts
Normal file
359
ts/typedrequest.classes.virtualstream.ts
Normal file
@ -0,0 +1,359 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import type { TypedRouter } from './typedrequest.classes.typedrouter.js';
|
||||
|
||||
export interface ICommFunctions {
|
||||
sendMethod?: (
|
||||
sendPayload: plugins.typedRequestInterfaces.IStreamRequest
|
||||
) => Promise<plugins.typedRequestInterfaces.IStreamRequest>;
|
||||
typedrouter?: TypedRouter;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. A VirtualStream connects over the network
|
||||
* 2. It is always paired to one other VirtualStream
|
||||
* on the other side with the same streamId.
|
||||
* 3. It has a Readable and Writable side.
|
||||
* 4. The Writable side is Readable on the other side and vice versa.
|
||||
*/
|
||||
export class VirtualStream<T = ArrayBufferLike> implements plugins.typedRequestInterfaces.IVirtualStream<T> {
|
||||
// STATIC
|
||||
public static encodePayloadForNetwork(
|
||||
objectPayload: any,
|
||||
commFunctions: ICommFunctions,
|
||||
originalPayload?: any,
|
||||
path = []
|
||||
): any {
|
||||
if (plugins.smartbuffer.isBufferLike(objectPayload)) {
|
||||
return objectPayload;
|
||||
}
|
||||
if (objectPayload instanceof VirtualStream) {
|
||||
if (!objectPayload.side && commFunctions.sendMethod) {
|
||||
objectPayload.side = 'requesting';
|
||||
objectPayload.sendMethod = commFunctions.sendMethod;
|
||||
}
|
||||
if (!objectPayload.side && commFunctions.typedrouter) {
|
||||
objectPayload.side = 'responding';
|
||||
objectPayload.typedrouter = commFunctions.typedrouter;
|
||||
commFunctions.typedrouter.registeredVirtualStreams.add(objectPayload);
|
||||
}
|
||||
if (!originalPayload.response || path.includes('response')) {
|
||||
objectPayload.startKeepAliveLoop();
|
||||
return {
|
||||
_isVirtualStream: true,
|
||||
streamId: objectPayload.streamId,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
_OBMITTED_VIRTUAL_STREAM: true,
|
||||
reason: 'path is under .request: obmitted for deduplication reasons in response cycle.',
|
||||
};
|
||||
}
|
||||
} else if (Array.isArray(objectPayload)) {
|
||||
const returnArray = [];
|
||||
for (const item of objectPayload) {
|
||||
returnArray.push(
|
||||
VirtualStream.encodePayloadForNetwork(
|
||||
item,
|
||||
commFunctions,
|
||||
originalPayload || objectPayload,
|
||||
path
|
||||
)
|
||||
);
|
||||
}
|
||||
return returnArray;
|
||||
} else if (objectPayload !== null && typeof objectPayload === 'object') {
|
||||
return Object.keys(objectPayload).reduce((acc, key) => {
|
||||
path.push(key);
|
||||
acc[key] = VirtualStream.encodePayloadForNetwork(
|
||||
objectPayload[key],
|
||||
commFunctions,
|
||||
originalPayload || objectPayload,
|
||||
path
|
||||
);
|
||||
return acc;
|
||||
}, {});
|
||||
} else {
|
||||
return objectPayload;
|
||||
}
|
||||
}
|
||||
|
||||
public static decodePayloadFromNetwork(objectPayload: any, commFunctions: ICommFunctions): any {
|
||||
if (plugins.smartbuffer.isBufferLike(objectPayload)) {
|
||||
return objectPayload;
|
||||
}
|
||||
if (objectPayload !== null && typeof objectPayload === 'object') {
|
||||
if (objectPayload._isVirtualStream) {
|
||||
const virtualStream = new VirtualStream();
|
||||
virtualStream.streamId = objectPayload.streamId;
|
||||
if (!virtualStream.side && commFunctions.sendMethod) {
|
||||
virtualStream.side = 'requesting';
|
||||
virtualStream.sendMethod = commFunctions.sendMethod;
|
||||
}
|
||||
if (!virtualStream.side && commFunctions.typedrouter) {
|
||||
virtualStream.side = 'responding';
|
||||
virtualStream.typedrouter = commFunctions.typedrouter;
|
||||
commFunctions.typedrouter.registeredVirtualStreams.add(virtualStream);
|
||||
}
|
||||
virtualStream.startKeepAliveLoop();
|
||||
return virtualStream;
|
||||
} else if (Array.isArray(objectPayload)) {
|
||||
const returnArray = [];
|
||||
for (const item of objectPayload) {
|
||||
returnArray.push(VirtualStream.decodePayloadFromNetwork(item, commFunctions));
|
||||
}
|
||||
return returnArray;
|
||||
} else {
|
||||
return Object.keys(objectPayload).reduce((acc, key) => {
|
||||
acc[key] = VirtualStream.decodePayloadFromNetwork(objectPayload[key], commFunctions);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
} else {
|
||||
return objectPayload;
|
||||
}
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
|
||||
public side: 'requesting' | 'responding';
|
||||
public streamId: string = plugins.isounique.uni();
|
||||
|
||||
// integration with typedrequest mechanics
|
||||
public sendMethod: ICommFunctions['sendMethod'];
|
||||
public typedrouter: TypedRouter;
|
||||
|
||||
// wether to keep the stream alive
|
||||
private keepAlive = true;
|
||||
private lastKeepAliveEvent: number;
|
||||
|
||||
// backpressured arrays
|
||||
private sendBackpressuredArray =
|
||||
new plugins.lik.BackpressuredArray<T>(
|
||||
16
|
||||
);
|
||||
private receiveBackpressuredArray =
|
||||
new plugins.lik.BackpressuredArray<T>(
|
||||
16
|
||||
);
|
||||
|
||||
constructor() {}
|
||||
|
||||
/**
|
||||
* takes care of sending
|
||||
*/
|
||||
private async workOnQueue() {
|
||||
if(this.side === 'requesting') {
|
||||
// helper functions
|
||||
const getFeedback = async () => {
|
||||
const streamTr = await this.sendMethod({
|
||||
method: '##VirtualStream##',
|
||||
request: {
|
||||
streamId: this.streamId,
|
||||
cycleId: plugins.isounique.uni(),
|
||||
cycle: 'request',
|
||||
mainPurpose: 'feedback',
|
||||
next: this.sendBackpressuredArray.data.length > 0,
|
||||
backpressure: this.receiveBackpressuredArray.checkSpaceAvailable(),
|
||||
},
|
||||
response: null,
|
||||
}).catch(() => {
|
||||
console.log('stream ended immaturely');
|
||||
this.keepAlive = false;
|
||||
});
|
||||
if (streamTr && streamTr.response) {
|
||||
otherSideIsBackpressured = streamTr.response.backpressure
|
||||
otherSideHasNext = streamTr.response.next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// do work loop
|
||||
let thisSideIsBackpressured = !this.receiveBackpressuredArray.checkSpaceAvailable();
|
||||
let otherSideHasNext = false;
|
||||
let otherSideIsBackpressured = false;
|
||||
while (this.sendBackpressuredArray.data.length > 0 || otherSideHasNext) {
|
||||
let dataArg: typeof this.sendBackpressuredArray.data[0];
|
||||
if (this.sendBackpressuredArray.data.length > 0) {
|
||||
dataArg = this.sendBackpressuredArray.shift();
|
||||
}
|
||||
let streamTr: plugins.typedRequestInterfaces.IStreamRequest;
|
||||
streamTr = await this.sendMethod({
|
||||
method: '##VirtualStream##',
|
||||
request: {
|
||||
streamId: this.streamId,
|
||||
cycleId: plugins.isounique.uni(),
|
||||
cycle: 'request',
|
||||
mainPurpose: dataArg ? 'chunk' : 'read',
|
||||
backpressure: thisSideIsBackpressured,
|
||||
next: this.sendBackpressuredArray.data.length > 0,
|
||||
...dataArg ? { chunkData: dataArg } : {},
|
||||
},
|
||||
response: null,
|
||||
}).catch(() => {
|
||||
console.log('stream ended immaturely');
|
||||
this.keepAlive = false;
|
||||
return null;
|
||||
});
|
||||
|
||||
if (streamTr && streamTr.response && streamTr.response.chunkData) {
|
||||
this.receiveBackpressuredArray.push(streamTr.response.chunkData);
|
||||
}
|
||||
thisSideIsBackpressured = this.receiveBackpressuredArray.checkSpaceAvailable();
|
||||
|
||||
// lets care about looping
|
||||
otherSideHasNext = streamTr && streamTr.response && streamTr.response.next;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method handles the stream only on the responding side
|
||||
* @param streamTrArg
|
||||
* @returns
|
||||
*/
|
||||
public async handleStreamTr(streamTrArg: plugins.typedRequestInterfaces.IStreamRequest) {
|
||||
if (streamTrArg.request.keepAlive === true && this.keepAlive === true) {
|
||||
this.lastKeepAliveEvent = Date.now();
|
||||
} else if (streamTrArg.request.keepAlive === false) {
|
||||
this.keepAlive = false;
|
||||
}
|
||||
|
||||
// keepAlive handling
|
||||
if (streamTrArg.request.mainPurpose === 'keepAlive') {
|
||||
// if the main purpose is keepAlive, we answer with a keepAlive
|
||||
streamTrArg.response = {
|
||||
streamId: this.streamId,
|
||||
cycleId: streamTrArg.request.cycleId,
|
||||
cycle: 'response',
|
||||
mainPurpose: 'keepAlive',
|
||||
keepAlive: this.keepAlive,
|
||||
next: this.sendBackpressuredArray.data.length > 0,
|
||||
backpressure: this.receiveBackpressuredArray.checkSpaceAvailable(),
|
||||
};
|
||||
}
|
||||
|
||||
// feedback handling
|
||||
if (streamTrArg.request.mainPurpose === 'feedback') {
|
||||
streamTrArg.response = {
|
||||
streamId: this.streamId,
|
||||
cycleId: streamTrArg.request.cycleId,
|
||||
cycle: 'response',
|
||||
mainPurpose: 'feedback',
|
||||
next: this.sendBackpressuredArray.data.length > 0,
|
||||
backpressure: this.receiveBackpressuredArray.checkSpaceAvailable(),
|
||||
};
|
||||
streamTrArg.request = null;
|
||||
}
|
||||
|
||||
// chunk handling
|
||||
if (streamTrArg.request.mainPurpose === 'chunk') {
|
||||
this.receiveBackpressuredArray.push(streamTrArg.request.chunkData);
|
||||
if (this.sendBackpressuredArray.data.length > 0 && streamTrArg.response.backpressure === false) {
|
||||
const dataArg = this.sendBackpressuredArray.shift();
|
||||
streamTrArg.response = {
|
||||
streamId: this.streamId,
|
||||
cycleId: streamTrArg.request.cycleId,
|
||||
cycle: 'response',
|
||||
mainPurpose: 'chunk',
|
||||
next: this.sendBackpressuredArray.data.length > 1,
|
||||
backpressure: this.receiveBackpressuredArray.checkSpaceAvailable(),
|
||||
chunkData: this.sendBackpressuredArray.shift(),
|
||||
};
|
||||
} else {
|
||||
streamTrArg.response = {
|
||||
streamId: this.streamId,
|
||||
cycleId: streamTrArg.request.cycleId,
|
||||
cycle: 'response',
|
||||
mainPurpose: 'feedback',
|
||||
next: this.sendBackpressuredArray.data.length > 0,
|
||||
};
|
||||
}
|
||||
streamTrArg.request = null;
|
||||
}
|
||||
|
||||
return streamTrArg;
|
||||
}
|
||||
|
||||
// lifecycle methods
|
||||
/**
|
||||
* closes the virtual stream
|
||||
*/
|
||||
public async cleanup() {
|
||||
if (this.typedrouter) {
|
||||
this.typedrouter.registeredVirtualStreams.remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* a keepAlive loop that works across technologies
|
||||
*/
|
||||
private async startKeepAliveLoop() {
|
||||
// initially wait for a second
|
||||
await plugins.smartdelay.delayFor(0);
|
||||
let counter = 0;
|
||||
keepAliveLoop: while (this.keepAlive) {
|
||||
const triggerResult = await this.triggerKeepAlive();
|
||||
await plugins.smartdelay.delayFor(1000);
|
||||
}
|
||||
await plugins.smartdelay.delayFor(1000);
|
||||
await this.cleanup();
|
||||
console.log(`cleaned up for stream ${this.streamId}`);
|
||||
}
|
||||
|
||||
private async triggerKeepAlive() {
|
||||
if (this.side === 'requesting') {
|
||||
console.log(`keepalive sent.`);
|
||||
const streamTr = await this.sendMethod({
|
||||
method: '##VirtualStream##',
|
||||
request: {
|
||||
streamId: this.streamId,
|
||||
cycleId: plugins.isounique.uni(),
|
||||
cycle: 'request',
|
||||
mainPurpose: 'keepAlive',
|
||||
keepAlive: true,
|
||||
},
|
||||
response: null,
|
||||
}).catch(() => {
|
||||
this.keepAlive = false;
|
||||
});
|
||||
|
||||
// lets handle keepAlive
|
||||
if (streamTr && streamTr.response && streamTr.response.keepAlive === false) {
|
||||
this.keepAlive = false;
|
||||
} else {
|
||||
this.lastKeepAliveEvent = Date.now();
|
||||
}
|
||||
if (streamTr && streamTr.response && streamTr.response.next) {
|
||||
this.workOnQueue();
|
||||
}
|
||||
}
|
||||
if (Date.now() - this.lastKeepAliveEvent > 10000) {
|
||||
console.log(`closing stream for ${this.streamId}`);
|
||||
this.keepAlive = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Data sending and receiving
|
||||
public async sendData(dataArg: T): Promise<void> {
|
||||
this.sendBackpressuredArray.push(dataArg);
|
||||
this.workOnQueue();
|
||||
await this.sendBackpressuredArray.waitForSpace();
|
||||
}
|
||||
|
||||
public async fetchData(): Promise<T> {
|
||||
if (this.receiveBackpressuredArray.hasSpace) {
|
||||
// do something maybe?
|
||||
}
|
||||
await this.receiveBackpressuredArray.waitForItems();
|
||||
const dataPackage = this.receiveBackpressuredArray.shift();
|
||||
return dataPackage;
|
||||
}
|
||||
|
||||
public pipeWebStream(webStream: any) {
|
||||
// lets do the piping
|
||||
webStream.on('data', (data: any) => {});
|
||||
webStream.on('end', () => {});
|
||||
webStream.on('error', (error: any) => {});
|
||||
}
|
||||
}
|
@ -3,8 +3,12 @@
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext",
|
||||
"esModuleInterop": true
|
||||
}
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user