@appolo/bus
Advanced tools
Comparing version 8.0.5 to 8.0.6
@@ -140,2 +140,5 @@ "use strict"; | ||
options = options || {}; | ||
if (typeof eventName == "function") { | ||
eventName = eventName(define.definition.injector ? define.definition.injector.get("app") : this.app); | ||
} | ||
let queue = this.appendEnv(options.queue) || defaultQueue, exchange = this.appendEnv(options.exchange) || this.getDefaultExchangeName(), routingKey = options.routingKey || eventName; | ||
@@ -149,5 +152,2 @@ if (!queue) { | ||
options = Object.assign({}, options, { queue, exchange, routingKey }); | ||
if (typeof eventName == "function") { | ||
eventName = eventName(define.definition.injector ? define.definition.injector.get("app") : this.app); | ||
} | ||
manager.register(eventName, options, define, propertyKey); | ||
@@ -154,0 +154,0 @@ return { eventName, options: options, define, propertyKey }; |
@@ -232,2 +232,6 @@ import {define, inject, singleton, Util, Define} from "@appolo/inject"; | ||
if (typeof eventName == "function") { | ||
eventName = eventName(define.definition.injector ? define.definition.injector.get("app") : this.app); | ||
} | ||
let queue = this.appendEnv(options.queue) || defaultQueue, | ||
@@ -248,6 +252,4 @@ exchange = this.appendEnv(options.exchange) || this.getDefaultExchangeName(), | ||
if (typeof eventName == "function") { | ||
eventName = eventName(define.definition.injector ? define.definition.injector.get("app") : this.app); | ||
} | ||
manager.register(eventName, options, define, propertyKey); | ||
@@ -254,0 +256,0 @@ |
{ | ||
"name": "@appolo/bus", | ||
"version": "8.0.5", | ||
"version": "8.0.6", | ||
"description": "appolo bus module", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -42,3 +42,3 @@ "use strict"; | ||
let busProvider = app.injector.get(index_1.BusProvider); | ||
await busProvider.addHandlerClass(handler_1.MessageHandler); | ||
//await busProvider.addHandlerClass(MessageHandler) | ||
let spy = sinon.spy(handler, "handle"); | ||
@@ -45,0 +45,0 @@ await publisher.publishMethod("aa"); |
@@ -61,3 +61,3 @@ import {createApp, App} from '@appolo/engine' | ||
await busProvider.addHandlerClass(MessageHandler) | ||
//await busProvider.addHandlerClass(MessageHandler) | ||
@@ -64,0 +64,0 @@ let spy = sinon.spy(handler, "handle"); |
@@ -13,2 +13,5 @@ "use strict"; | ||
} | ||
replay2(mes) { | ||
return { result: mes.body.test + "working" }; | ||
} | ||
}; | ||
@@ -21,2 +24,5 @@ tslib_1.__decorate([ | ||
], MessageHandler.prototype, "replay", null); | ||
tslib_1.__decorate([ | ||
index_1.reply(() => "Request.Module.Test2") | ||
], MessageHandler.prototype, "replay2", null); | ||
MessageHandler = tslib_1.__decorate([ | ||
@@ -23,0 +29,0 @@ inject_1.define(), |
@@ -17,2 +17,7 @@ import {define, singleton,alias} from '@appolo/inject' | ||
} | ||
@reply(()=>"Request.Module.Test2") | ||
replay2(mes:IMessage<any>){ | ||
return {result:mes.body.test +"working"} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80667
1803