@twin.org/api-server-fastify 0.0.1-next.23 → 0.0.1-next.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +3 -3
- package/dist/esm/index.mjs +3 -3
- package/docs/changelog.md +1 -1
- package/package.json +3 -3
package/dist/cjs/index.cjs
CHANGED
|
@@ -414,12 +414,13 @@ class FastifyWebServer {
|
|
|
414
414
|
* @param data The incoming data.
|
|
415
415
|
* @internal
|
|
416
416
|
*/
|
|
417
|
-
async handleRequestSocket(socketRouteProcessors, socketRoute, socket, fullPath, emitTopic,
|
|
417
|
+
async handleRequestSocket(socketRouteProcessors, socketRoute, socket, fullPath, emitTopic, request) {
|
|
418
418
|
const httpServerRequest = {
|
|
419
419
|
method: web.HttpMethod.GET,
|
|
420
420
|
url: fullPath,
|
|
421
421
|
query: socket.handshake.query,
|
|
422
|
-
headers: socket.handshake.headers
|
|
422
|
+
headers: socket.handshake.headers,
|
|
423
|
+
body: request.body
|
|
423
424
|
};
|
|
424
425
|
const httpResponse = {};
|
|
425
426
|
const httpRequestIdentity = {};
|
|
@@ -428,7 +429,6 @@ class FastifyWebServer {
|
|
|
428
429
|
};
|
|
429
430
|
delete httpServerRequest.query?.EIO;
|
|
430
431
|
delete httpServerRequest.query?.transport;
|
|
431
|
-
httpServerRequest.body = data;
|
|
432
432
|
await this.runProcessorsSocket(socketRouteProcessors, socketRoute, httpServerRequest, httpResponse, httpRequestIdentity, processorState, emitTopic, async (topic, response) => {
|
|
433
433
|
await socket.emit(topic, response);
|
|
434
434
|
});
|
package/dist/esm/index.mjs
CHANGED
|
@@ -412,12 +412,13 @@ class FastifyWebServer {
|
|
|
412
412
|
* @param data The incoming data.
|
|
413
413
|
* @internal
|
|
414
414
|
*/
|
|
415
|
-
async handleRequestSocket(socketRouteProcessors, socketRoute, socket, fullPath, emitTopic,
|
|
415
|
+
async handleRequestSocket(socketRouteProcessors, socketRoute, socket, fullPath, emitTopic, request) {
|
|
416
416
|
const httpServerRequest = {
|
|
417
417
|
method: HttpMethod.GET,
|
|
418
418
|
url: fullPath,
|
|
419
419
|
query: socket.handshake.query,
|
|
420
|
-
headers: socket.handshake.headers
|
|
420
|
+
headers: socket.handshake.headers,
|
|
421
|
+
body: request.body
|
|
421
422
|
};
|
|
422
423
|
const httpResponse = {};
|
|
423
424
|
const httpRequestIdentity = {};
|
|
@@ -426,7 +427,6 @@ class FastifyWebServer {
|
|
|
426
427
|
};
|
|
427
428
|
delete httpServerRequest.query?.EIO;
|
|
428
429
|
delete httpServerRequest.query?.transport;
|
|
429
|
-
httpServerRequest.body = data;
|
|
430
430
|
await this.runProcessorsSocket(socketRouteProcessors, socketRoute, httpServerRequest, httpResponse, httpRequestIdentity, processorState, emitTopic, async (topic, response) => {
|
|
431
431
|
await socket.emit(topic, response);
|
|
432
432
|
});
|
package/docs/changelog.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/api-server-fastify",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.24",
|
|
4
4
|
"description": "Use Fastify as the core web server for APIs",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@fastify/compress": "8.0.1",
|
|
18
18
|
"@fastify/cors": "10.0.1",
|
|
19
|
-
"@twin.org/api-core": "0.0.1-next.
|
|
20
|
-
"@twin.org/api-models": "0.0.1-next.
|
|
19
|
+
"@twin.org/api-core": "0.0.1-next.24",
|
|
20
|
+
"@twin.org/api-models": "0.0.1-next.24",
|
|
21
21
|
"@twin.org/core": "next",
|
|
22
22
|
"@twin.org/logging-models": "next",
|
|
23
23
|
"@twin.org/nameof": "next",
|