rhea-promise
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -0,1 +1,4 @@ | ||
### 0.1.10 - 2018-11-01 | ||
- Provided an option to add an event handler for "settled" event on the Receiver. | ||
### 0.1.9 - 2018-10-24 | ||
@@ -2,0 +5,0 @@ - With the usage of `importHelpers`, the tslib will be needed in package.json for installers using older versions of npm (or using yarn). [PR](https://github.com/amqp/rhea-promise/pull/16). |
@@ -294,6 +294,6 @@ "use strict"; | ||
if (options && options.session && options.session.createSender) { | ||
return yield options.session.createSender(options); | ||
return options.session.createSender(options); | ||
} | ||
const session = yield this.createSession(); | ||
return yield session.createSender(options); | ||
return session.createSender(options); | ||
}); | ||
@@ -309,6 +309,6 @@ } | ||
if (options && options.session && options.session.createReceiver) { | ||
return yield options.session.createReceiver(options); | ||
return options.session.createReceiver(options); | ||
} | ||
const session = yield this.createSession(); | ||
return yield session.createReceiver(options); | ||
return session.createReceiver(options); | ||
}); | ||
@@ -315,0 +315,0 @@ } |
@@ -52,3 +52,3 @@ "use strict"; | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
return yield this.createConnection(options).open(); | ||
return this.createConnection(options).open(); | ||
}); | ||
@@ -55,0 +55,0 @@ } |
@@ -228,3 +228,3 @@ "use strict"; | ||
log[this.type]("[%s] %s has been closed, now closing it's session.", this.connection.id, this.type); | ||
return yield this._session.close(); | ||
return this._session.close(); | ||
}); | ||
@@ -231,0 +231,0 @@ } |
@@ -171,2 +171,6 @@ "use strict"; | ||
} | ||
if (options && options.onSettled) { | ||
receiver.on(rhea_1.ReceiverEvents.settled, options.onSettled); | ||
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.", this.connection.id, rhea_1.ReceiverEvents.settled); | ||
} | ||
const removeListeners = () => { | ||
@@ -173,0 +177,0 @@ clearTimeout(waitTimer); |
@@ -438,6 +438,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
if (options && options.session && options.session.createSender) { | ||
return await options.session.createSender(options); | ||
return options.session.createSender(options); | ||
} | ||
const session = await this.createSession(); | ||
return await session.createSender(options); | ||
return session.createSender(options); | ||
} | ||
@@ -452,6 +452,6 @@ | ||
if (options && options.session && options.session.createReceiver) { | ||
return await options.session.createReceiver(options); | ||
return options.session.createReceiver(options); | ||
} | ||
const session = await this.createSession(); | ||
return await session.createReceiver(options); | ||
return session.createReceiver(options); | ||
} | ||
@@ -458,0 +458,0 @@ |
@@ -80,3 +80,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
async connect(options?: ConnectionOptions): Promise<Connection> { | ||
return await this.createConnection(options).open(); | ||
return this.createConnection(options).open(); | ||
} | ||
@@ -83,0 +83,0 @@ |
@@ -270,3 +270,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
this.connection.id, this.type); | ||
return await this._session.close(); | ||
return this._session.close(); | ||
} | ||
@@ -273,0 +273,0 @@ |
@@ -17,2 +17,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
/** | ||
* @property {OnAmqpEvent} [onSettled] The handler that can be provided for receiving the | ||
* "settled" event when a message is received on the underling rhea receiver. | ||
*/ | ||
onSettled?: OnAmqpEvent; | ||
/** | ||
* @property {OnAmqpEvent} [onMessage] The handler that can be provided for receiving the | ||
@@ -19,0 +24,0 @@ * "message" event when a message is received on the underling rhea receiver. |
@@ -209,2 +209,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
if (options && options.onSettled) { | ||
receiver.on(ReceiverEvents.settled, options.onSettled); | ||
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.", | ||
this.connection.id, ReceiverEvents.settled); | ||
} | ||
const removeListeners = () => { | ||
@@ -211,0 +217,0 @@ clearTimeout(waitTimer); |
{ | ||
"name": "rhea-promise", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "A Promisified layer over rhea AMQP client", | ||
@@ -10,3 +10,3 @@ "license": "Apache-2.0", | ||
"debug": "^3.1.0", | ||
"rhea": "^0.3.3", | ||
"rhea": "^0.3.4", | ||
"tslib": "^1.9.3" | ||
@@ -13,0 +13,0 @@ }, |
@@ -47,2 +47,3 @@ { | ||
"no-floating-promises": true, | ||
"no-return-await": true, | ||
"triple-equals": [ | ||
@@ -49,0 +50,0 @@ true, |
@@ -11,2 +11,7 @@ import { Session } from "./session"; | ||
/** | ||
* @property {OnAmqpEvent} [onSettled] The handler that can be provided for receiving the | ||
* "settled" event when a message is received on the underling rhea receiver. | ||
*/ | ||
onSettled?: OnAmqpEvent; | ||
/** | ||
* @property {OnAmqpEvent} [onMessage] The handler that can be provided for receiving the | ||
@@ -13,0 +18,0 @@ * "message" event when a message is received on the underling rhea receiver. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
235601
4324
Updatedrhea@^0.3.4