@clairejs/server 3.17.3 → 3.17.4
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/README.md
CHANGED
|
@@ -35,9 +35,9 @@ export class AbstractHttpRequestHandler {
|
|
|
35
35
|
: this.resolveMountPoint(controllerMetadata, [this.mountPoint || "/", endpoint.mount]);
|
|
36
36
|
return {
|
|
37
37
|
...endpoint,
|
|
38
|
-
readOnly: endpoint.method === HttpMethod.GET,
|
|
39
|
-
mount,
|
|
40
38
|
id: `${endpoint.method}:${mount}`,
|
|
39
|
+
mount,
|
|
40
|
+
readOnly: endpoint.method === HttpMethod.GET,
|
|
41
41
|
};
|
|
42
42
|
}));
|
|
43
43
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataType, Errors, getServiceProvider, MessageType, SocketMethod, } from "@clairejs/core";
|
|
1
|
+
import { DataType, Errors, getObjectMetadata, getServiceProvider, MessageType, SocketMethod, } from "@clairejs/core";
|
|
2
2
|
import { HttpRequest } from "../http/common/HttpRequest";
|
|
3
3
|
import { AbstractSocketConnectionHandler } from "./AbstractSocketConnectionHandler";
|
|
4
4
|
import { AbstractSocketController } from "./AbstractSocketController";
|
|
@@ -282,13 +282,16 @@ export class AbstractServerSocketManager {
|
|
|
282
282
|
const socketController = injector.resolveMultiple(AbstractSocketController);
|
|
283
283
|
await injector.initInstances();
|
|
284
284
|
this.mountedEndpointInfo = socketController.map((controller) => {
|
|
285
|
+
const controllerMetadata = getObjectMetadata(controller.constructor);
|
|
286
|
+
const onMessageMetadata = controllerMetadata?.fields.find((f) => f.name === controller.onMessage.name);
|
|
285
287
|
return {
|
|
288
|
+
...onMessageMetadata,
|
|
286
289
|
id: `${SocketMethod.MESSAGE}:${controller.getChannelName()}`,
|
|
287
290
|
readOnly: false,
|
|
288
291
|
controller: socketController,
|
|
292
|
+
handlerFunctionName: controller.onMessage.name,
|
|
289
293
|
method: SocketMethod.MESSAGE,
|
|
290
294
|
mount: controller.getChannelName(),
|
|
291
|
-
handlerFunctionName: controller.onMessage.name,
|
|
292
295
|
description: "Send / Receive message to / from channel",
|
|
293
296
|
name: controller.getChannelName(),
|
|
294
297
|
dataType: DataType.OBJECT,
|