@avtechno/sfr 2.0.5 → 2.0.6

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.
@@ -1,3 +1,3 @@
1
1
  export declare function REST<V, H, C>(struct: RESTHandlerDescriptor<V, H, C>): H & C;
2
2
  export declare function WS<V, H, C>(struct: WSHandlerDescriptor<V, H, C>): H & C;
3
- export declare function MQ<V, H, C>(struct: MQHandlerDescriptor<V, H, C>): H & C;
3
+ export declare function MQ<V, H>(struct: MQHandlerDescriptor<V, H>): H;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avtechno/sfr",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "An opinionated way of writing services using ExpressJS.",
5
5
  "type": "module",
6
6
  "files": [
package/src/templates.mts CHANGED
@@ -41,10 +41,10 @@ export function WS<V, H, C>(struct : WSHandlerDescriptor<V, H, C>): H & C {
41
41
  return { validators, controllers, handlers, cfg } as H & C;
42
42
  }
43
43
 
44
- export function MQ<V, H, C>(struct : MQHandlerDescriptor<V, H, C>): H & C{
44
+ export function MQ<V, H>(struct : MQHandlerDescriptor<V, H>): H{
45
45
  const validators : RequestValidators = struct.validators || {};
46
46
  const controllers : RequestControllers = struct.controllers || {};
47
- const handlers : MQRequestHandlers<C> = struct.handlers || {};
47
+ const handlers : MQRequestHandlers = struct.handlers || {};
48
48
  const cfg : SFRConfig = struct.cfg || {};
49
49
 
50
50
  //Bind controller injections to each controllers
@@ -377,7 +377,7 @@ declare type WSDeclarationArtifact = DeclarationArtifact & {
377
377
  declare type MQNamespaceDeclaration = {
378
378
  [namespace: string]: DeclarationArtifact & {
379
379
  content: {
380
- handlers: MQRequestHandlers<any>
380
+ handlers: MQRequestHandlers
381
381
  }
382
382
  }
383
383
  }
@@ -461,19 +461,19 @@ declare type PatternMQSet = {
461
461
  "Topic": BroadcastMQ;
462
462
  }
463
463
 
464
- declare type MQHandlerDescriptor<V, H, C> = {
464
+ declare type MQHandlerDescriptor<V, H> = {
465
465
  cfg?: SFRConfig;
466
466
  validators: RequestValidators & V;
467
- handlers: MQRequestHandlers<C> & H & ThisType<HandlerFacilities & C>;
468
- controllers?: RequestControllers & C & ThisType<ControllerFacilities & C>;
467
+ handlers: MQRequestHandlers & H & ThisType<HandlerFacilities>;
468
+ controllers?: RequestControllers & ThisType<ControllerFacilities >;
469
469
  };
470
470
 
471
- declare type MQRequestHandlers<C> = {
472
- "Point-to-Point"?: MQRequestHandlerMap & ThisType<{ mq: Omit<TargetedMQ, "type" | "reply"> } & C>;
473
- "Fanout"?: MQRequestHandlerMap & ThisType<{ mq: Omit<BroadcastMQ, "type"> } & C>;
474
- "Request-Reply"?: MQRequestHandlerMap & ThisType<{ mq: Omit<TargetedMQ, "type"> } & C>;
475
- "Direct"?: RoutingHandlerMap & ThisType<{ mq: Omit<BroadcastMQ, "type"> } & C>;
476
- "Topic"?: TopicHandlerMap & ThisType<{ mq: Omit<BroadcastMQ, "type"> } & C>;
471
+ declare type MQRequestHandlers = {
472
+ "Point-to-Point"?: MQRequestHandlerMap & ThisType<{ mq: Omit<TargetedMQ, "type" | "reply"> } & HandlerFacilities>;
473
+ "Fanout"?: MQRequestHandlerMap & ThisType<{ mq: Omit<BroadcastMQ, "type"> } & HandlerFacilities>;
474
+ "Request-Reply"?: MQRequestHandlerMap & ThisType<{ mq: Omit<TargetedMQ, "type"> } & HandlerFacilities>;
475
+ "Direct"?: RoutingHandlerMap & ThisType<{ mq: Omit<BroadcastMQ, "type"> } & HandlerFacilities>;
476
+ "Topic"?: TopicHandlerMap & ThisType<{ mq: Omit<BroadcastMQ, "type"> } & HandlerFacilities>;
477
477
  };
478
478
 
479
479
  declare type MQRequestHandlerMap = {