fix(core): update
This commit is contained in:
parent
53a4375545
commit
df87c6c75e
6
package-lock.json
generated
6
package-lock.json
generated
@ -2359,9 +2359,9 @@
|
|||||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "14.0.23",
|
"version": "14.0.26",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.0.23.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.0.26.tgz",
|
||||||
"integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw=="
|
"integrity": "sha512-W+fpe5s91FBGE0pEa0lnqGLL4USgpLgs4nokw16SrBBco/gQxuua7KnArSEOd5iaMqbbSHV10vUDkJYJJqpXKA=="
|
||||||
},
|
},
|
||||||
"@types/parcel-bundler": {
|
"@types/parcel-bundler": {
|
||||||
"version": "1.12.1",
|
"version": "1.12.1",
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
"@gitzone/tstest": "^1.0.43",
|
"@gitzone/tstest": "^1.0.43",
|
||||||
"@pushrocks/smartexpress": "^3.0.73",
|
"@pushrocks/smartexpress": "^3.0.73",
|
||||||
"@pushrocks/tapbundle": "^3.2.9",
|
"@pushrocks/tapbundle": "^3.2.9",
|
||||||
"@types/node": "^14.0.23",
|
"@types/node": "^14.0.26",
|
||||||
"tslint": "^6.1.2",
|
"tslint": "^6.1.2",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
|
@ -33,12 +33,11 @@ tap.test('should spawn a server to test with', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should define a testHandler', async () => {
|
tap.test('should define a testHandler', async () => {
|
||||||
|
const testTypedRouter = new typedrequest.TypedRouter();
|
||||||
|
testTypedRouter.addTypedHandler(testTypedHandler);
|
||||||
testServer.addRoute(
|
testServer.addRoute(
|
||||||
'/testroute',
|
'/testroute',
|
||||||
new smartexpress.Handler('POST', async (req, res) => {
|
new smartexpress.HandlerTypedRouter(testTypedRouter as any)
|
||||||
console.log(req.body);
|
|
||||||
res.json(await testTypedHandler.addResponse(req.body));
|
|
||||||
})
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -106,7 +106,9 @@ export class TypedRouter {
|
|||||||
|
|
||||||
typedRequestArg = await typedHandler.addResponse(typedRequestArg);
|
typedRequestArg = await typedHandler.addResponse(typedRequestArg);
|
||||||
} else if (typedRequestArg.correlation.phase === 'response') {
|
} else if (typedRequestArg.correlation.phase === 'response') {
|
||||||
this.fireEventInterestMap.findInterest(typedRequestArg.correlation.id)?.fullfillInterest(typedRequestArg);
|
this.fireEventInterestMap
|
||||||
|
.findInterest(typedRequestArg.correlation.id)
|
||||||
|
?.fullfillInterest(typedRequestArg);
|
||||||
}
|
}
|
||||||
return typedRequestArg;
|
return typedRequestArg;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user