appolo-rabbit
Advanced tools
Comparing version 8.0.5 to 8.1.0
@@ -13,3 +13,3 @@ "use strict"; | ||
async function createRabbit(options) { | ||
let app = engine_1.createApp({ root: __dirname }); | ||
let app = (0, engine_1.createApp)({ root: __dirname }); | ||
app.injector.addObject("options", Object.assign({}, defaults_1.Defaults, options)); | ||
@@ -16,0 +16,0 @@ await app.launch(); |
@@ -19,3 +19,3 @@ { | ||
"main": "./index.js", | ||
"version": "8.0.5", | ||
"version": "8.1.0", | ||
"license": "MIT", | ||
@@ -29,23 +29,22 @@ "repository": { | ||
"dependencies": { | ||
"@appolo/engine": "^8.0.19", | ||
"@appolo/engine": "^8.0.23", | ||
"@appolo/events": "^8.0.2", | ||
"@appolo/inject": "^8.0.13", | ||
"@appolo/utils": "^8.0.9", | ||
"amqplib": "^0.7.1" | ||
"@appolo/inject": "^8.0.18", | ||
"@appolo/utils": "^8.0.38", | ||
"amqplib": "^0.10.3" | ||
}, | ||
"devDependencies": { | ||
"@types/amqplib": "^0.5.16", | ||
"@types/chai": "^4.2.14", | ||
"@types/lodash": "^4.14.165", | ||
"@types/mocha": "^8.2.0", | ||
"@types/node": "^14.14.11", | ||
"@types/sinon": "^9.0.9", | ||
"@types/sinon-chai": "^3.2.5", | ||
"chai": "^4.2.0", | ||
"mocha": "^8.2.1", | ||
"sinon": "^9.2.1", | ||
"sinon-chai": "^3.5.0", | ||
"tslib": "^2.0.3", | ||
"typescript": "^4.1.2" | ||
"@types/amqplib": "^0.8.2", | ||
"@types/chai": "^4.3.3", | ||
"@types/mocha": "^10.0.0", | ||
"@types/node": "^18.11.2", | ||
"@types/sinon": "^10.0.13", | ||
"@types/sinon-chai": "^3.2.8", | ||
"chai": "^4.3.6", | ||
"mocha": "^10.1.0", | ||
"sinon": "^14.0.1", | ||
"sinon-chai": "^3.7.0", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.8.4" | ||
} | ||
} |
@@ -87,11 +87,11 @@ "use strict"; | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Channel.prototype, "connection", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Channel.prototype, "eventsDispatcher", void 0); | ||
Channel = tslib_1.__decorate([ | ||
inject_1.define() | ||
(0, inject_1.define)() | ||
], Channel); | ||
exports.Channel = Channel; | ||
//# sourceMappingURL=channel.js.map |
@@ -17,3 +17,3 @@ "use strict"; | ||
connection = Object.assign({}, connectionsDefaults_1.ConnectionsDefaults, connection); | ||
this._connection = await amqplib_1.connect(connection); | ||
this._connection = await (0, amqplib_1.connect)(connection); | ||
this._connection.on('close', () => this._onConnectionClose()); | ||
@@ -75,12 +75,12 @@ this._connection.on('error', (e) => this._onConnectionError(e)); | ||
tslib_1.__decorate([ | ||
inject_1.inject("options") | ||
(0, inject_1.inject)("options") | ||
], Connection.prototype, "_options", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Connection.prototype, "eventsDispatcher", void 0); | ||
Connection = tslib_1.__decorate([ | ||
inject_1.define(), | ||
inject_1.singleton() | ||
(0, inject_1.define)(), | ||
(0, inject_1.singleton)() | ||
], Connection); | ||
exports.Connection = Connection; | ||
//# sourceMappingURL=connection.js.map |
@@ -36,7 +36,7 @@ "use strict"; | ||
EventsDispatcher = tslib_1.__decorate([ | ||
inject_1.define(), | ||
inject_1.singleton(), | ||
inject_1.override() | ||
(0, inject_1.define)(), | ||
(0, inject_1.singleton)(), | ||
(0, inject_1.override)() | ||
], EventsDispatcher); | ||
exports.EventsDispatcher = EventsDispatcher; | ||
//# sourceMappingURL=eventsDispatcher.js.map |
@@ -54,14 +54,14 @@ "use strict"; | ||
tslib_1.__decorate([ | ||
inject_1.factoryMethod(channel_1.Channel) | ||
(0, inject_1.factoryMethod)(channel_1.Channel) | ||
], Exchange.prototype, "createChanel", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Exchange.prototype, "serializers", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Exchange.prototype, "connection", void 0); | ||
Exchange = tslib_1.__decorate([ | ||
inject_1.define() | ||
(0, inject_1.define)() | ||
], Exchange); | ||
exports.Exchange = Exchange; | ||
//# sourceMappingURL=exchange.js.map |
@@ -86,18 +86,18 @@ "use strict"; | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Handlers.prototype, "eventsDispatcher", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Handlers.prototype, "serializers", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Handlers.prototype, "options", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.init() | ||
(0, inject_1.init)() | ||
], Handlers.prototype, "initialize", null); | ||
Handlers = tslib_1.__decorate([ | ||
inject_1.define(), | ||
inject_1.singleton() | ||
(0, inject_1.define)(), | ||
(0, inject_1.singleton)() | ||
], Handlers); | ||
exports.Handlers = Handlers; | ||
//# sourceMappingURL=handlers.js.map |
@@ -77,3 +77,3 @@ "use strict"; | ||
delay: delay, | ||
retry: Object.assign(Object.assign({}, retry), { retryAttempt }) | ||
retry: { ...retry, retryAttempt } | ||
}).catch(() => this._nack()); | ||
@@ -80,0 +80,0 @@ this._ack(); |
@@ -80,17 +80,17 @@ "use strict"; | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Queue.prototype, "eventsDispatcher", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Queue.prototype, "serializers", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Queue.prototype, "topology", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.factoryMethod(channel_1.Channel) | ||
(0, inject_1.factoryMethod)(channel_1.Channel) | ||
], Queue.prototype, "createChanel", void 0); | ||
Queue = tslib_1.__decorate([ | ||
inject_1.define() | ||
(0, inject_1.define)() | ||
], Queue); | ||
exports.Queue = Queue; | ||
//# sourceMappingURL=queue.js.map |
@@ -85,23 +85,23 @@ "use strict"; | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Rabbit.prototype, "topology", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Rabbit.prototype, "handlers", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Rabbit.prototype, "requests", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Rabbit.prototype, "connection", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Rabbit.prototype, "eventsDispatcher", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.init() | ||
(0, inject_1.init)() | ||
], Rabbit.prototype, "_initialize", null); | ||
Rabbit = tslib_1.__decorate([ | ||
inject_1.define() | ||
(0, inject_1.define)() | ||
], Rabbit); | ||
exports.Rabbit = Rabbit; | ||
//# sourceMappingURL=rabbit.js.map |
@@ -36,4 +36,11 @@ "use strict"; | ||
let correlationId = utils_1.Guid.guid(); | ||
let headers = Object.assign(Object.assign({}, msg.headers), { "x-reply-stream": true }); | ||
let dto = Object.assign(Object.assign({}, msg), { correlationId, replyTo: this.topology.replyQueue.name, confirm: false, persistent: false, replyTimeout: msg.replyTimeout || this.topology.options.replyTimeout, headers }); | ||
let headers = { ...msg.headers, "x-reply-stream": true }; | ||
let dto = { | ||
...msg, | ||
correlationId, | ||
replyTo: this.topology.replyQueue.name, | ||
confirm: false, persistent: false, | ||
replyTimeout: msg.replyTimeout || this.topology.options.replyTimeout, | ||
headers | ||
}; | ||
let timeout = null; | ||
@@ -52,4 +59,13 @@ if (dto.replyTimeout) { | ||
let correlationId = utils_1.Guid.guid(); | ||
let headers = Object.assign(Object.assign({}, msg.headers), { "x-reply": true }); | ||
let dto = Object.assign(Object.assign({}, msg), { messageId: correlationId, correlationId, replyTo: this.topology.replyQueue.name, confirm: false, persistent: false, replyTimeout: msg.replyTimeout || this.topology.options.replyTimeout, headers }); | ||
let headers = { ...msg.headers, "x-reply": true }; | ||
let dto = { | ||
...msg, | ||
messageId: correlationId, | ||
correlationId, | ||
replyTo: this.topology.replyQueue.name, | ||
confirm: false, | ||
persistent: false, | ||
replyTimeout: msg.replyTimeout || this.topology.options.replyTimeout, | ||
headers | ||
}; | ||
let deferred = utils_1.Promises.defer(); | ||
@@ -138,12 +154,12 @@ let timeout = null; | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Requests.prototype, "topology", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.inject() | ||
(0, inject_1.inject)() | ||
], Requests.prototype, "handlers", void 0); | ||
Requests = tslib_1.__decorate([ | ||
inject_1.define(), | ||
inject_1.singleton() | ||
(0, inject_1.define)(), | ||
(0, inject_1.singleton)() | ||
], Requests); | ||
exports.Requests = Requests; | ||
//# sourceMappingURL=requests.js.map |
@@ -26,7 +26,7 @@ "use strict"; | ||
BufferSerializer = tslib_1.__decorate([ | ||
inject_1.define(), | ||
inject_1.singleton(), | ||
inject_1.alias("ISerializer") | ||
(0, inject_1.define)(), | ||
(0, inject_1.singleton)(), | ||
(0, inject_1.alias)("ISerializer") | ||
], BufferSerializer); | ||
exports.BufferSerializer = BufferSerializer; | ||
//# sourceMappingURL=bufferSerializer.js.map |
@@ -21,7 +21,7 @@ "use strict"; | ||
JsonSerializer = tslib_1.__decorate([ | ||
inject_1.define(), | ||
inject_1.singleton(), | ||
inject_1.alias("ISerializer") | ||
(0, inject_1.define)(), | ||
(0, inject_1.singleton)(), | ||
(0, inject_1.alias)("ISerializer") | ||
], JsonSerializer); | ||
exports.JsonSerializer = JsonSerializer; | ||
//# sourceMappingURL=jsonSerializer.js.map |
@@ -27,9 +27,9 @@ "use strict"; | ||
tslib_1.__decorate([ | ||
inject_1.alias("ISerializer", "contentType") | ||
(0, inject_1.alias)("ISerializer", "contentType") | ||
], Serializers.prototype, "_serializes", void 0); | ||
Serializers = tslib_1.__decorate([ | ||
inject_1.define(), | ||
inject_1.singleton() | ||
(0, inject_1.define)(), | ||
(0, inject_1.singleton)() | ||
], Serializers); | ||
exports.Serializers = Serializers; | ||
//# sourceMappingURL=serializers.js.map |
@@ -18,7 +18,7 @@ "use strict"; | ||
StringSerializer = tslib_1.__decorate([ | ||
inject_1.define(), | ||
inject_1.singleton(), | ||
inject_1.alias("ISerializer") | ||
(0, inject_1.define)(), | ||
(0, inject_1.singleton)(), | ||
(0, inject_1.alias)("ISerializer") | ||
], StringSerializer); | ||
exports.StringSerializer = StringSerializer; | ||
//# sourceMappingURL=stringSerializer.js.map |
@@ -88,18 +88,18 @@ "use strict"; | ||
tslib_1.__decorate([ | ||
inject_1.inject("options") | ||
(0, inject_1.inject)("options") | ||
], Topology.prototype, "_options", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.factoryMethod(exchange_1.Exchange) | ||
(0, inject_1.factoryMethod)(exchange_1.Exchange) | ||
], Topology.prototype, "createExchange", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.factoryMethod(queue_1.Queue) | ||
(0, inject_1.factoryMethod)(queue_1.Queue) | ||
], Topology.prototype, "createQueue", void 0); | ||
tslib_1.__decorate([ | ||
inject_1.init() | ||
(0, inject_1.init)() | ||
], Topology.prototype, "initialize", null); | ||
Topology = tslib_1.__decorate([ | ||
inject_1.define(), | ||
inject_1.singleton() | ||
(0, inject_1.define)(), | ||
(0, inject_1.singleton)() | ||
], Topology); | ||
exports.Topology = Topology; | ||
//# sourceMappingURL=topology.js.map |
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
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
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
132879
12
2583
+ Added@acuminous/bitsyntax@0.1.2(transitive)
+ Addedamqplib@0.10.5(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addedms@2.1.3(transitive)
- Removedamqplib@0.7.1(transitive)
- Removedbitsyntax@0.1.0(transitive)
- Removedbluebird@3.7.2(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddebug@2.6.9(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@0.0.1(transitive)
- Removedms@2.0.0(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
Updated@appolo/engine@^8.0.23
Updated@appolo/inject@^8.0.18
Updated@appolo/utils@^8.0.38
Updatedamqplib@^0.10.3