@open-rlb/nestjs-amqp 1.0.9 → 1.0.10
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/amqp-lib/config/rabbitmq.config.d.ts +0 -10
- package/amqp-lib/index.d.ts +1 -0
- package/amqp-lib/index.js +1 -0
- package/amqp-lib/index.js.map +1 -1
- package/modules/broker/decorators/broker-action.decorator.d.ts +2 -1
- package/modules/broker/decorators/broker-action.decorator.js +2 -2
- package/modules/broker/decorators/broker-action.decorator.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ModuleMetadata, Type } from "@nestjs/common";
|
|
2
1
|
import { AmqpConnectionManagerOptions } from "amqp-connection-manager";
|
|
3
2
|
import { MessageDeserializer, MessageErrorHandler, MessageHandlerErrorBehavior, MessageSerializer, RabbitMQChannels, RabbitMQHandlers, RabbitMQUriConfig } from "../types";
|
|
4
3
|
import { RabbitMQExchangeBindingConfig, RabbitMQExchangeConfig } from "./rabbitmq-exchange.config";
|
|
@@ -38,12 +37,3 @@ export interface RabbitMQChannelConfig {
|
|
|
38
37
|
prefetchCount?: number;
|
|
39
38
|
default?: boolean;
|
|
40
39
|
}
|
|
41
|
-
export interface RabbitMQModuleOptionsFactory {
|
|
42
|
-
createRabbitMQModuleOptions(): Promise<RabbitMQConfig> | RabbitMQConfig;
|
|
43
|
-
}
|
|
44
|
-
export interface RabbitMQModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
45
|
-
inject?: any[];
|
|
46
|
-
useClass?: Type<RabbitMQModuleOptionsFactory>;
|
|
47
|
-
useExisting?: Type<RabbitMQModuleOptionsFactory>;
|
|
48
|
-
useFactory?: (...args: any[]) => Promise<RabbitMQConfig> | RabbitMQConfig;
|
|
49
|
-
}
|
package/amqp-lib/index.d.ts
CHANGED
package/amqp-lib/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./amqp/connection"), exports);
|
|
18
18
|
__exportStar(require("./amqp/errorBehaviors"), exports);
|
|
19
|
+
__exportStar(require("./config/rabbitmq.config"), exports);
|
|
19
20
|
__exportStar(require("./models/errors.model"), exports);
|
|
20
21
|
__exportStar(require("./models/nack.model"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
package/amqp-lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../libs/rlb-nestjs-amqp/src/amqp-lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../libs/rlb-nestjs-amqp/src/amqp-lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,wDAAsC;AACtC,2DAAyC;AACzC,wDAAsC;AACtC,sDAAoC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PipeTransform } from "@nestjs/common";
|
|
1
2
|
export type BrokerParamSource = 'body' | 'body-full' | 'header' | 'tag' | 'action' | 'topic';
|
|
2
3
|
export type BrokerActionType = 'rpc' | 'event';
|
|
3
4
|
export type BrokerHttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
@@ -5,4 +6,4 @@ export type BrokerHttpDataSource = 'query' | 'body' | 'params';
|
|
|
5
6
|
export declare function BrokerAction(topic: string, action: string, type?: BrokerActionType): MethodDecorator;
|
|
6
7
|
export declare function BrokerHTTP(method: BrokerHttpMethod, path: string, dataSource?: BrokerHttpDataSource, timeout?: number, parseRaw?: boolean): MethodDecorator;
|
|
7
8
|
export declare function BrokerAuth(authName: string, allowAnonymous?: boolean, roles?: string[]): MethodDecorator;
|
|
8
|
-
export declare function BrokerParam(source: BrokerParamSource, name?: string): ParameterDecorator;
|
|
9
|
+
export declare function BrokerParam(source: BrokerParamSource, name?: string, pipe?: PipeTransform): ParameterDecorator;
|
|
@@ -49,10 +49,10 @@ function BrokerAuth(authName, allowAnonymous, roles) {
|
|
|
49
49
|
Reflect.defineMetadata(const_1.RLB_BROKER_AUTH_METADATA_KEY, existingMetadata, target.constructor);
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
function BrokerParam(source, name) {
|
|
52
|
+
function BrokerParam(source, name, pipe) {
|
|
53
53
|
return (target, propertyKey, parameterIndex) => {
|
|
54
54
|
const existingMetadata = Reflect.getMetadata(const_1.RLB_BROKER_PARAM_METADATA_KEY, target, propertyKey) || [];
|
|
55
|
-
existingMetadata.push({ index: parameterIndex, name, source });
|
|
55
|
+
existingMetadata.push({ index: parameterIndex, name, source, pipe });
|
|
56
56
|
Reflect.defineMetadata(const_1.RLB_BROKER_PARAM_METADATA_KEY, existingMetadata, target, propertyKey);
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broker-action.decorator.js","sourceRoot":"","sources":["../../../../libs/rlb-nestjs-amqp/src/modules/broker/decorators/broker-action.decorator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"broker-action.decorator.js","sourceRoot":"","sources":["../../../../libs/rlb-nestjs-amqp/src/modules/broker/decorators/broker-action.decorator.ts"],"names":[],"mappings":";;AAUA,oCAaC;AAED,gCAcC;AAED,gCAYC;AACD,kCASC;AA9DD,oCAAqJ;AAErJ,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAC1D,MAAM,cAAc,GAAG,YAAY,CAAC;AAMpC,SAAgB,YAAY,CAAC,KAAa,EAAE,MAAc,EAAE,IAAuB;IACjF,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,gBAAgB,GAAG,OA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