Compare commits

...

8 Commits

Author SHA1 Message Date
90311ad65e 3.0.9 2024-02-29 19:50:26 +01:00
407e1383f8 fix(core): update 2024-02-29 19:50:25 +01:00
ad106909e2 3.0.8 2024-02-25 01:54:01 +01:00
b346da01f1 fix(core): update 2024-02-25 01:54:01 +01:00
51fedb270b 3.0.7 2024-02-24 12:20:13 +01:00
fd26b48ff6 fix(core): update 2024-02-24 12:20:13 +01:00
1bfe10691a 3.0.6 2024-02-21 18:29:36 +01:00
bf81c34dbc fix(core): update 2024-02-21 18:29:35 +01:00
11 changed files with 707 additions and 194 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@api.global/typedrequest",
"version": "3.0.5",
"version": "3.0.9",
"private": false,
"description": "make typed requests towards apis",
"main": "dist_ts/index.js",
@ -14,22 +14,24 @@
"buildDocs": "tsdoc"
},
"devDependencies": {
"@api.global/typedserver": "^3.0.20",
"@api.global/typedserver": "^3.0.25",
"@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.24"
},
"dependencies": {
"@api.global/typedrequest-interfaces": "^3.0.1",
"@api.global/typedrequest-interfaces": "^3.0.18",
"@push.rocks/isounique": "^1.0.5",
"@push.rocks/lik": "^6.0.12",
"@push.rocks/lik": "^6.0.14",
"@push.rocks/smartbuffer": "^1.0.6",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartpromise": "^4.0.3",
"@push.rocks/webrequest": "^3.0.34"
"@push.rocks/webrequest": "^3.0.34",
"@push.rocks/webstream": "^1.0.8"
},
"files": [
"ts/**/*",

295
pnpm-lock.yaml generated
View File

@ -6,14 +6,17 @@ settings:
dependencies:
'@api.global/typedrequest-interfaces':
specifier: ^3.0.1
version: 3.0.1
specifier: ^3.0.18
version: 3.0.18
'@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.14
version: 6.0.14
'@push.rocks/smartbuffer':
specifier: ^1.0.6
version: 1.0.6
'@push.rocks/smartdelay':
specifier: ^3.0.5
version: 3.0.5
@ -23,11 +26,14 @@ dependencies:
'@push.rocks/webrequest':
specifier: ^3.0.34
version: 3.0.34
'@push.rocks/webstream':
specifier: ^1.0.8
version: 1.0.8
devDependencies:
'@api.global/typedserver':
specifier: ^3.0.20
version: 3.0.20
specifier: ^3.0.25
version: 3.0.25
'@git.zone/tsbuild':
specifier: ^2.1.72
version: 2.1.72
@ -36,10 +42,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.24)
'@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.24)(sinon@17.0.1)
'@push.rocks/smartenv':
specifier: ^5.0.12
version: 5.0.12
@ -47,37 +53,39 @@ 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.24
version: 20.11.24
packages:
/@api.global/typedrequest-interfaces@3.0.1:
resolution: {integrity: sha512-eR2Cr01BYRwIq/X2ajOenWhm8l+/YE4A5kK/9V6I8ZnhtEBMFHG6YjF6Fg8npLJWbvhZXhOms+axZ6JKI71o8g==}
/@api.global/typedrequest-interfaces@3.0.18:
resolution: {integrity: sha512-O/AdHnk9NDcBfb/Qcpi3Bq/7I6uAJHXfIT5peeKODvLUYysmuxG/c3t9NWQvfSOXQUKnVKb0WrCGjraOL7Pyww==}
/@api.global/typedrequest@3.0.4:
resolution: {integrity: sha512-8UThH9c3MxdSLiON8UN1CPXooU6Mp0eleFhVS3QB2OUsYqgEGn/EzuMt+cMIv/+ESSS6zcTpHvAhZ8ZMLfpL8A==}
/@api.global/typedrequest@3.0.8:
resolution: {integrity: sha512-PF53rR33fHVLOvN1IQXkPlaqc7L8Q2LwHN1tb0raPh6qxS4x3jE6WXC1bJwPqGxDACSZyw9kf052MG0YABXKRA==}
dependencies:
'@api.global/typedrequest-interfaces': 3.0.1
'@api.global/typedrequest-interfaces': 3.0.18
'@push.rocks/isounique': 1.0.5
'@push.rocks/lik': 6.0.12
'@push.rocks/lik': 6.0.14
'@push.rocks/smartbuffer': 1.0.6
'@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.25:
resolution: {integrity: sha512-3cci307/AtM2GqPzIJ1SqU1oi9Kj1WhpUNFPjPwvG0nbXK4HSp1nFBk5P6z+bqBj19grhzQRiMl9YbvtWwJVQQ==}
dependencies:
'@api.global/typedrequest': 3.0.4
'@api.global/typedrequest-interfaces': 3.0.1
'@api.global/typedrequest': 3.0.8
'@api.global/typedrequest-interfaces': 3.0.18
'@api.global/typedsocket': 3.0.0
'@push.rocks/lik': 6.0.12
'@push.rocks/smartchok': 1.0.32
'@push.rocks/lik': 6.0.14
'@push.rocks/smartchok': 1.0.33
'@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.11
'@push.rocks/smartlog': 3.0.3
'@push.rocks/smartlog-destination-devtools': 1.0.10
'@push.rocks/smartmanifest': 2.0.2
@ -88,14 +96,14 @@ packages:
'@push.rocks/smartrequest': 2.0.21
'@push.rocks/smartrx': 3.0.7
'@push.rocks/smartsitemap': 2.0.3
'@push.rocks/smartstream': 3.0.30
'@push.rocks/smartstream': 3.0.33
'@push.rocks/smarttime': 4.0.6
'@push.rocks/webstore': 2.0.13
'@tsclass/tsclass': 4.0.52
'@types/express': 4.17.21
body-parser: 1.20.2
cors: 2.8.5
express: 4.18.2
express: 4.18.3
express-force-ssl: 0.3.2
lit: 3.1.2
transitivePeerDependencies:
@ -107,10 +115,10 @@ packages:
/@api.global/typedsocket@3.0.0:
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': 3.0.8
'@api.global/typedrequest-interfaces': 3.0.18
'@push.rocks/isohash': 2.0.1
'@push.rocks/smartjson': 5.0.10
'@push.rocks/smartjson': 5.0.11
'@push.rocks/smartrx': 3.0.7
'@push.rocks/smartsocket': 2.0.24
'@push.rocks/smartstring': 4.0.13
@ -399,13 +407,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.24):
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.24)(typescript@5.1.6)
typescript: 5.1.6
transitivePeerDependencies:
- '@swc/core'
@ -414,13 +422,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.24)(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.25
'@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.24)
'@push.rocks/consolecolor': 2.0.1
'@push.rocks/smartbrowser': 2.0.6
'@push.rocks/smartdelay': 3.0.5
@ -599,8 +607,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.14:
resolution: {integrity: sha512-d15PoV3T2MvO/XNYwigGp3I6z4eTd6lvdELlfc/addCuYwfvV5dZr30SsKYlyvXLaHBis8PxwcdIMFlSmHB2Qw==}
dependencies:
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartmatch': 2.0.0
@ -625,6 +633,9 @@ packages:
- utf-8-validate
dev: true
/@push.rocks/smartbuffer@1.0.6:
resolution: {integrity: sha512-TpZuKVrj0D/C6+RApjajp2FGBfXuz7b9BQSYAR+N1XmAxO8jYAmS6YlChcofThY2aB9sTA98Tt110hM/d+cc8g==}
/@push.rocks/smartcache@1.0.16:
resolution: {integrity: sha512-UAXf74eDuH4/RebJhydIbHlYVR3ACYJjniEY/9ZePblu7bIPgwFZqLBE9g1lcKVogbH9yY62dk3rSpgBzenyfQ==}
dependencies:
@ -635,10 +646,10 @@ packages:
'@pushrocks/smarttime': 4.0.1
dev: true
/@push.rocks/smartchok@1.0.32:
resolution: {integrity: sha512-bBJ4UX3jjItZo0mdDxQcDdRqbuIyCeDo4XXvkX2yLqkHJHFxQbL2lTDrX4l7cTaQ7361AYSsvOsBkZyPvCN6mg==}
/@push.rocks/smartchok@1.0.33:
resolution: {integrity: sha512-6mDqTkNOR5Z0H14Ujmq3ACUZHzeUBNE8EdoLDrmkPzRVE9HP3WcCnDu009Fy0LVKHYHAUirZ0LzCi8zHN84RtA==}
dependencies:
'@push.rocks/lik': 6.0.12
'@push.rocks/lik': 6.0.14
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7
'@tempfix/watcher': 2.3.0
@ -647,7 +658,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.14
'@push.rocks/smartlog': 3.0.3
'@push.rocks/smartparam': 1.1.10
'@push.rocks/smartpromise': 4.0.3
@ -688,7 +699,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.14
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile-interfaces': 1.0.7
'@push.rocks/smarthash': 3.0.4
@ -711,7 +722,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.14
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile-interfaces': 1.0.7
'@push.rocks/smarthash': 3.0.4
@ -732,7 +743,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.14
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile-interfaces': 1.0.7
'@push.rocks/smarthash': 3.0.4
@ -768,6 +779,16 @@ packages:
fast-json-stable-stringify: 2.1.0
lodash.clonedeep: 4.5.0
/@push.rocks/smartjson@5.0.11:
resolution: {integrity: sha512-JaqWm05nQgT1qvzxzRFUAFill6BF0jbln/Ms6byv4flDQXReICQmdKH4+hmtgKFk/iAdMQNrUQsSGBm9KVQ92A==}
dependencies:
'@push.rocks/smartstring': 4.0.13
'@types/buffer-json': 2.0.3
buffer-json: 2.0.0
fast-json-stable-stringify: 2.1.0
lodash.clonedeep: 4.5.0
dev: true
/@push.rocks/smartlog-destination-devtools@1.0.10:
resolution: {integrity: sha512-E6xRx5vhR7gh9peXjUyBwNj0H0MeaBjh+PY++PbOhUF4NDMaEuswRLRs+UN9bfbLXZQl2i4hYD1MNCesHGTVgA==}
dependencies:
@ -938,14 +959,14 @@ 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.18
'@api.global/typedserver': 3.0.25
'@push.rocks/isohash': 2.0.1
'@push.rocks/isounique': 1.0.5
'@push.rocks/lik': 6.0.12
'@push.rocks/lik': 6.0.14
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartenv': 5.0.12
'@push.rocks/smartjson': 5.0.10
'@push.rocks/smartjson': 5.0.11
'@push.rocks/smartlog': 3.0.3
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7
@ -995,7 +1016,15 @@ 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.14
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7
dev: true
/@push.rocks/smartstream@3.0.33:
resolution: {integrity: sha512-mtFjKmjKr5IMDP1NGYfedy8dL3Sjq677y/M2RTQ056FQXMkLWC/pYQnOogYFARX6R1PXh91datmgcW0NF/Jlfw==}
dependencies:
'@push.rocks/lik': 6.0.14
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7
dev: true
@ -1008,7 +1037,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 +1061,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.14
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartpromise': 4.0.3
croner: 7.0.3
@ -1055,7 +1084,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 +1123,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.14
'@push.rocks/smartenv': 5.0.12
'@push.rocks/smartjson': 5.0.10
'@push.rocks/smartpromise': 4.0.3
@ -1102,6 +1131,12 @@ packages:
fake-indexeddb: 4.0.2
idb: 7.1.1
/@push.rocks/webstream@1.0.8:
resolution: {integrity: sha512-Z1dSQ4JNVpBw3naoVWT/mXpxDYIt+bsjb6J9GKMHsTrPRytfxo2/caoJT//uAoaA0h9pIqb1WrxpYWyW1ehWPA==}
dependencies:
'@push.rocks/smartenv': 5.0.12
dev: false
/@pushrocks/consolecolor@2.0.1:
resolution: {integrity: sha512-iOFCHVeFZ2OywbdwSxVI4/wokkcLrXVdHLgvMmkNhJ220eeLgjNZWx3EJo3vNW3zq5ybCSCUIq0878djBxrWpw==}
deprecated: This package has been deprecated in favour of the new package at @push.rocks/consolecolor
@ -1429,7 +1464,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.24
dev: true
/@types/babel__code-frame@7.0.5:
@ -1440,14 +1475,14 @@ packages:
resolution: {integrity: sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==}
dependencies:
'@types/connect': 3.4.37
'@types/node': 20.11.19
'@types/node': 20.11.24
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.24
dev: true
/@types/buffer-json@2.0.2:
@ -1470,27 +1505,27 @@ packages:
/@types/clean-css@4.2.11:
resolution: {integrity: sha512-Y8n81lQVTAfP2TOdtJJEsCoYl1AnOkqDqMvXb9/7pfgZZ7r8YrEyurrAvAoAjHOGXKRybay+5CsExqIH6liccw==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
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.24
'@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.24
dev: true
/@types/connect@3.4.38:
resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
dev: true
/@types/content-disposition@0.5.7:
@ -1511,13 +1546,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.24
dev: true
/@types/cors@2.8.17:
resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
dev: true
/@types/debounce@1.2.3:
@ -1531,7 +1566,7 @@ packages:
/@types/express-serve-static-core@4.17.39:
resolution: {integrity: sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
'@types/qs': 6.9.9
'@types/range-parser': 1.2.6
'@types/send': 0.17.3
@ -1540,8 +1575,8 @@ packages:
/@types/express-serve-static-core@4.17.43:
resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==}
dependencies:
'@types/node': 20.11.19
'@types/qs': 6.9.11
'@types/node': 20.11.24
'@types/qs': 6.9.12
'@types/range-parser': 1.2.7
'@types/send': 0.17.4
dev: true
@ -1560,41 +1595,41 @@ packages:
dependencies:
'@types/body-parser': 1.19.5
'@types/express-serve-static-core': 4.17.43
'@types/qs': 6.9.11
'@types/qs': 6.9.12
'@types/serve-static': 1.15.5
dev: true
/@types/from2@2.3.2:
resolution: {integrity: sha512-s1pdctxW2+CA4FOxxTBRxC3RKQL9Br1a2s2LngP4jh1BI84JBL3mDXj87EwcckN9z/IXp8o3ySmvZveGEAAwqw==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
dev: true
/@types/from2@2.3.5:
resolution: {integrity: sha512-giavnjf3kNlJnE+HpZA1CQ3UKHxgehzsTuIMGda8pGMbOiLYGVNADEskey44OZcADHm/HOoBany8IV+0x28XFw==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
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.24
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.24
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.24
dev: true
/@types/html-minifier@4.0.5:
@ -1652,13 +1687,13 @@ packages:
/@types/jsonfile@6.1.3:
resolution: {integrity: sha512-/yqTk2SZ1wIezK0hiRZD7RuSf4B3whFxFamB1kGStv+8zlWScTMcHanzfc0XKWs5vA1TkHeckBlOyM8jxU8nHA==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
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.24
dev: true
/@types/keygrip@1.0.4:
@ -1681,7 +1716,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.24
dev: true
/@types/mime-types@2.1.1:
@ -1715,8 +1750,8 @@ packages:
resolution: {integrity: sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==}
dev: true
/@types/node@20.11.19:
resolution: {integrity: sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==}
/@types/node@20.11.24:
resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==}
dependencies:
undici-types: 5.26.5
dev: true
@ -1729,8 +1764,8 @@ packages:
resolution: {integrity: sha512-ifvo6w2f5eJYlXm+HiVx67iJe8WZp87sfa683nlqED5Vnt9Z93onkokNoWqOG21EaE8fMxyKPobE+mkPEyxsdw==}
dev: true
/@types/qs@6.9.11:
resolution: {integrity: sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==}
/@types/qs@6.9.12:
resolution: {integrity: sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==}
dev: true
/@types/qs@6.9.9:
@ -1760,14 +1795,14 @@ packages:
resolution: {integrity: sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==}
dependencies:
'@types/mime': 1.3.4
'@types/node': 20.11.19
'@types/node': 20.11.24
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.24
dev: true
/@types/serve-static@1.15.4:
@ -1775,7 +1810,7 @@ packages:
dependencies:
'@types/http-errors': 2.0.3
'@types/mime': 3.0.3
'@types/node': 20.11.19
'@types/node': 20.11.24
dev: true
/@types/serve-static@1.15.5:
@ -1783,7 +1818,7 @@ packages:
dependencies:
'@types/http-errors': 2.0.4
'@types/mime': 3.0.4
'@types/node': 20.11.19
'@types/node': 20.11.24
dev: true
/@types/sinon-chai@3.2.11:
@ -1809,19 +1844,19 @@ packages:
/@types/through2@2.0.38:
resolution: {integrity: sha512-YFu+nHmjxMurkH1BSzA0Z1WrKDAY8jUKPZctNQn7mc+/KKtp2XxnclHFXxdB1m7Iqnzb5aywgP8TMK283LezGQ==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
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.24
dev: true
/@types/through2@2.0.41:
resolution: {integrity: sha512-ryQ0tidWkb1O1JuYvWKyMLYEtOWDqF5mHerJzKz/gQpoAaJq2l/dsMPBF0B5BNVT34rbARYJ5/tsZwLfUi2kwQ==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
dev: true
/@types/trusted-types@2.0.7:
@ -1849,20 +1884,20 @@ packages:
/@types/ws@7.4.7:
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
dev: true
/@types/ws@8.5.10:
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
dependencies:
'@types/node': 20.11.19
'@types/node': 20.11.24
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.24
dev: true
optional: true
@ -2324,7 +2359,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 +2713,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 +2721,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 +2734,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 +2865,7 @@ packages:
dependencies:
'@types/cookie': 0.4.1
'@types/cors': 2.8.17
'@types/node': 20.11.19
'@types/node': 20.11.24
accepts: 1.3.8
base64id: 2.0.0
cookie: 0.4.2
@ -2917,12 +2941,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==}
@ -3057,6 +3079,45 @@ packages:
- supports-color
dev: true
/express@4.18.3:
resolution: {integrity: sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==}
engines: {node: '>= 0.10.0'}
dependencies:
accepts: 1.3.8
array-flatten: 1.1.1
body-parser: 1.20.2
content-disposition: 0.5.4
content-type: 1.0.5
cookie: 0.5.0
cookie-signature: 1.0.6
debug: 2.6.9
depd: 2.0.0
encodeurl: 1.0.2
escape-html: 1.0.3
etag: 1.8.1
finalhandler: 1.2.0
fresh: 0.5.2
http-errors: 2.0.0
merge-descriptors: 1.0.1
methods: 1.1.2
on-finished: 2.4.1
parseurl: 1.3.3
path-to-regexp: 0.1.7
proxy-addr: 2.0.7
qs: 6.11.0
range-parser: 1.2.1
safe-buffer: 5.2.1
send: 0.18.0
serve-static: 1.15.0
setprototypeof: 1.2.0
statuses: 2.0.1
type-is: 1.6.18
utils-merge: 1.0.1
vary: 1.1.2
transitivePeerDependencies:
- supports-color
dev: true
/extract-zip@2.0.1:
resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==}
engines: {node: '>= 10.17.0'}
@ -3094,8 +3155,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 +3324,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 +3362,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 +3372,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 +3457,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 +3511,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 +3540,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 +3796,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 +3947,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 +3987,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 +5144,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 +5235,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 +5279,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 +5557,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.24)(typescript@5.1.6):
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true
peerDependencies:
@ -5519,7 +5576,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.24
acorn: 8.10.0
acorn-walk: 8.2.0
arg: 4.1.3

View File

@ -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();
});

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@api.global/typedrequest',
version: '3.0.5',
version: '3.0.9',
description: 'make typed requests towards apis'
}

View File

@ -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';

View File

@ -6,8 +6,10 @@ 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';
import * as webstream from '@push.rocks/webstream';
export { isounique, lik, smartdelay, smartpromise, webrequest };
export { isounique, lik, smartbuffer, smartdelay, smartpromise, webrequest, webstream };

View File

@ -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;
}
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -0,0 +1,375 @@
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') {
let thisSideIsBackpressured = !this.receiveBackpressuredArray.checkSpaceAvailable();
let otherSideHasNext = false;
let otherSideIsBackpressured = false;
// 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;
}
}
await getFeedback();
// do work loop
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(),
};
}
// 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;
}
/**
* reads from a Readable and sends it to the other side
* @param readableStreamArg
*/
public async readFromWebstream(readableStreamArg: ReadableStream<T>) {
const reader = readableStreamArg.getReader();
let streamIsDone = false;
while(!streamIsDone) {
const { value, done } = await reader.read();
if(value) {
await this.sendData(value);
}
streamIsDone = done;
}
}
public async writeToWebstream(writableStreamArg: WritableStream<T>) {
const writer = writableStreamArg.getWriter();
while(this.keepAlive) {
await writer.write(await this.fetchData());
}
}
}

View File

@ -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"
]
}