@onify/fake-amqplib 0.9.0 → 1.0.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/CHANGELOG.md +10 -1
- package/index.js +4 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -90,7 +90,7 @@ function Fake(minorVersion) {
|
|
|
90
90
|
channels.push(channel);
|
|
91
91
|
return resolveOrCallback(args.slice(-1)[0], null, channel);
|
|
92
92
|
},
|
|
93
|
-
|
|
93
|
+
close(...args) {
|
|
94
94
|
if (closed) return resolveOrCallback(args.slice(-1)[0]);
|
|
95
95
|
closed = true;
|
|
96
96
|
|
|
@@ -148,9 +148,9 @@ function Fake(minorVersion) {
|
|
|
148
148
|
function assertQueue(queueName, ...args) {
|
|
149
149
|
const name = queueName ? queueName : 'amqp.gen-' + generateId();
|
|
150
150
|
const options = typeof args[0] === 'object' ? args.shift() : {};
|
|
151
|
-
const queue = broker.assertQueue(
|
|
151
|
+
const queue = broker.assertQueue(name, {...options, _connectionId: connection._id}, ...args);
|
|
152
152
|
return {
|
|
153
|
-
|
|
153
|
+
queue: name,
|
|
154
154
|
messageCount: queue.messageCount,
|
|
155
155
|
consumerCount: queue.consumerCount,
|
|
156
156
|
};
|
|
@@ -336,7 +336,7 @@ function Fake(minorVersion) {
|
|
|
336
336
|
...(version >= 2.3 ? {
|
|
337
337
|
nack(message, ...args) {
|
|
338
338
|
return broker.nack(message[smqpSymbol], ...args);
|
|
339
|
-
}
|
|
339
|
+
},
|
|
340
340
|
} : undefined),
|
|
341
341
|
reject(message, ...args) {
|
|
342
342
|
broker.reject(message[smqpSymbol], ...args);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onify/fake-amqplib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Fake amqplib",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"smqp": "^6.
|
|
24
|
+
"smqp": "^6.1.0"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"fake",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"rabbitmq"
|
|
32
32
|
],
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"chai": "^4.3.
|
|
35
|
-
"eslint": "^
|
|
36
|
-
"mocha": "^
|
|
34
|
+
"chai": "^4.3.7",
|
|
35
|
+
"eslint": "^8.27.0",
|
|
36
|
+
"mocha": "^10.1.0",
|
|
37
37
|
"nyc": "^15.1.0"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|