@autofleet/rabbit 3.2.0 → 3.2.2-2.beta-0

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/src/lib/types.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { ConsumeMessage, Options } from 'amqplib';
1
+ import { AmqpConnectionManager } from 'amqp-connection-manager';
2
+ import { ConsumeMessage, Options, Replies } from 'amqplib';
2
3
 
3
4
  export interface ExchangesCache {
4
5
  [key: string]: any
@@ -8,6 +9,10 @@ export interface QueuesCache {
8
9
  [key: string]: any
9
10
  }
10
11
 
12
+ export interface QueueSetupPromisesDictionary {
13
+ [key: string]: Promise<Replies.AssertQueue> | undefined
14
+ }
15
+
11
16
  export type CustomMessageHeaders = {
12
17
  redisTimestampValidationKey?: string;
13
18
  }
@@ -51,3 +56,13 @@ export const CONSUMER_DEFAULT_OPTIONS: Options.Consume = {
51
56
  [HA_PROMOTE_ON_SHUTDOWN]: 'always',
52
57
  },
53
58
  };
59
+
60
+ export type ConnectionData = {
61
+ connection: AmqpConnectionManager | null;
62
+ creatingConnection: boolean;
63
+ };
64
+
65
+ export enum ConnectionPurpose {
66
+ Consume = 'consume',
67
+ Publish = 'publish',
68
+ };
package/src/logger.ts CHANGED
@@ -1,4 +1,4 @@
1
- const Logger = require('@autofleet/logger');
1
+ import Logger from '@autofleet/logger';
2
2
 
3
3
  const logger = Logger();
4
4
 
package/tsconfig.json CHANGED
@@ -7,7 +7,10 @@
7
7
  "strict": true,
8
8
  "esModuleInterop": true,
9
9
  "experimentalDecorators": true,
10
- "emitDecoratorMetadata": true
10
+ "emitDecoratorMetadata": true,
11
+ "skipLibCheck": true,
12
+ "types": ["@types/jest"]
11
13
  },
12
- "exclude": ["node_modules", "**/*.test.ts"]
14
+ "exclude": ["node_modules"],
15
+ "include": ["src/**/*.ts"]
13
16
  }