@avtechno/sfr 1.0.1 → 1.0.3

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/index.mjs CHANGED
@@ -4,7 +4,7 @@ import path from "path";
4
4
  import fs from "fs/promises";
5
5
  import { REST, WS, MQ } from "./templates.mjs";
6
6
  import { SFRPipeline } from "./sfr-pipeline.mjs";
7
- import { MQLib } from "./mq.mjs";
7
+ import { MQLib, BroadcastMQ, TargetedMQ } from "./mq.mjs";
8
8
  const cwd = process.cwd();
9
9
  export default async (cfg, oas_cfg, connectors, base_url) => {
10
10
  //TODO: Verify connectors
@@ -81,4 +81,4 @@ function inject(injections) {
81
81
  ...injections.controllers
82
82
  };
83
83
  }
84
- export { REST, WS, MQ, MQLib, inject };
84
+ export { REST, WS, MQ, MQLib, BroadcastMQ, TargetedMQ, inject };
@@ -1,7 +1,7 @@
1
1
  /// <reference path="../../src/types/index.d.ts" />
2
2
  import { REST, WS, MQ } from "./templates.mjs";
3
- import { MQLib } from "./mq.mjs";
3
+ import { MQLib, BroadcastMQ, TargetedMQ } from "./mq.mjs";
4
4
  declare const _default: (cfg: ParserCFG, oas_cfg: OASConfig, connectors: SFRProtocols, base_url?: string) => Promise<ServiceManifest>;
5
5
  export default _default;
6
6
  declare function inject(injections: InjectedFacilities): void;
7
- export { REST, WS, MQ, MQLib, inject };
7
+ export { REST, WS, MQ, MQLib, BroadcastMQ, TargetedMQ, inject };
@@ -1,4 +1,4 @@
1
- import { Connection, Options, Channel, ConsumeMessage } from "amqplib";
1
+ import { ChannelModel, Options, Channel, ConsumeMessage } from "amqplib";
2
2
  /**
3
3
  * MQLib class for establishing a connection to the message queue and creating channels.
4
4
  */
@@ -19,7 +19,7 @@ export declare class MQLib {
19
19
  *
20
20
  * @returns The connection object to the message queue.
21
21
  */
22
- get_connection(): Connection;
22
+ get_connection(): ChannelModel;
23
23
  /**
24
24
  * Returns the channel object.
25
25
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avtechno/sfr",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "An opinionated way of writing services using ExpressJS.",
5
5
  "type": "module",
6
6
  "files": [
package/src/index.mts CHANGED
@@ -5,7 +5,7 @@ import fs from "fs/promises";
5
5
 
6
6
  import { REST, WS, MQ } from "./templates.mjs";
7
7
  import { SFRPipeline } from "./sfr-pipeline.mjs";
8
- import { MQLib } from "./mq.mjs";
8
+ import { MQLib, BroadcastMQ, TargetedMQ } from "./mq.mjs";
9
9
 
10
10
  const cwd = process.cwd();
11
11
 
@@ -96,4 +96,4 @@ function inject(injections : InjectedFacilities){
96
96
  }
97
97
  }
98
98
 
99
- export { REST, WS, MQ, MQLib, inject };
99
+ export { REST, WS, MQ, MQLib, BroadcastMQ, TargetedMQ, inject };
package/src/mq.mts CHANGED
@@ -1,10 +1,10 @@
1
- import { Connection, Options, connect, Channel, ConsumeMessage } from "amqplib";
1
+ import { ChannelModel, Options, connect, Channel, ConsumeMessage } from "amqplib";
2
2
 
3
3
  /**
4
4
  * MQLib class for establishing a connection to the message queue and creating channels.
5
5
  */
6
6
  export class MQLib {
7
- private connection?: Connection;
7
+ private connection?: ChannelModel;
8
8
  private channel?: Channel;
9
9
 
10
10
  /**