amqplib 0.5.1 → 0.5.5
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/.npmignore +0 -1
- package/CHANGELOG.md +84 -0
- package/Makefile +2 -1
- package/README.md +4 -4
- package/bin/generate-defs.js +723 -0
- package/callback_api.js +1 -0
- package/channel_api.js +1 -0
- package/examples/headers.js +2 -2
- package/examples/receive_generator.js +39 -0
- package/examples/send_generators.js +1 -1
- package/examples/ssl.js +1 -1
- package/examples/tutorials/callback_api/emit_log.js +1 -1
- package/examples/tutorials/callback_api/emit_log_direct.js +1 -1
- package/examples/tutorials/callback_api/emit_log_topic.js +1 -1
- package/examples/tutorials/callback_api/new_task.js +1 -1
- package/examples/tutorials/callback_api/rpc_client.js +1 -1
- package/examples/tutorials/callback_api/rpc_server.js +1 -1
- package/examples/tutorials/callback_api/send.js +1 -1
- package/examples/tutorials/emit_log.js +1 -1
- package/examples/tutorials/emit_log_direct.js +1 -1
- package/examples/tutorials/emit_log_topic.js +1 -1
- package/examples/tutorials/new_task.js +1 -1
- package/examples/tutorials/rpc_client.js +1 -1
- package/examples/tutorials/rpc_server.js +1 -1
- package/examples/tutorials/send.js +1 -1
- package/examples/waitForConfirms.js +1 -1
- package/lib/api_args.js +2 -0
- package/lib/channel.js +30 -12
- package/lib/codec.js +64 -38
- package/lib/connect.js +26 -15
- package/lib/connection.js +6 -4
- package/lib/credentials.js +20 -3
- package/lib/defs.js +203 -75
- package/lib/frame.js +2 -1
- package/package-lock.json +711 -0
- package/package.json +11 -9
- package/test/callback_api.js +6 -5
- package/test/channel.js +88 -75
- package/test/channel_api.js +38 -24
- package/test/codec.js +48 -9
- package/test/connect.js +88 -3
- package/test/connection.js +57 -56
- package/test/data.js +32 -9
- package/test/frame.js +4 -4
- package/test/mux.js +10 -6
- package/test/util.js +16 -2
package/.npmignore
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,89 @@
|
|
|
1
1
|
# Change log for amqplib
|
|
2
2
|
|
|
3
|
+
## Changes in v0.5.4
|
|
4
|
+
|
|
5
|
+
git log v0.5.3..v0.5.4
|
|
6
|
+
|
|
7
|
+
**NB** this includes a minor but possibly breaking change: after [PR
|
|
8
|
+
498](https://github.com/squaremo/amqp.node/pull/498), all confirmation
|
|
9
|
+
promises still unresolved will be rejected when their associated
|
|
10
|
+
channel is closed.
|
|
11
|
+
|
|
12
|
+
* Generate defs in `npm prepare` rather than `npm prepublish` so that
|
|
13
|
+
e.g., amqplib can be installed via git ([part of PR
|
|
14
|
+
498](https://github.com/squaremo/amqp.node/pull/498))
|
|
15
|
+
* Reject all pending confirmations when the channel is closed ([PR
|
|
16
|
+
498](https://github.com/squaremo/amqp.node/pull/498)); thanks
|
|
17
|
+
@johanneswuerbach
|
|
18
|
+
* Update supported NodeJS versions in package.json ([PR
|
|
19
|
+
525](https://github.com/squaremo/amqp.node/pull/525)); thenks
|
|
20
|
+
@tingwai
|
|
21
|
+
|
|
22
|
+
## Changes in v0.5.3
|
|
23
|
+
|
|
24
|
+
git log v0.5.2..v0.5.3
|
|
25
|
+
|
|
26
|
+
* Bump bitsyntax to remove some `Buffer` misuse deprecation notices
|
|
27
|
+
([PR 480])(https://github.com/squaremo/amqp.node/pull/480)
|
|
28
|
+
* Test on node 11.1
|
|
29
|
+
([PR 473])(https://github.com/squaremo/amqp.node/pull/464); thanks
|
|
30
|
+
@kibertoad
|
|
31
|
+
* Updated various dependencies
|
|
32
|
+
* Support queue mode during assertQueue
|
|
33
|
+
([PR 464])(https://github.com/squaremo/amqp.node/pull/464); thanks
|
|
34
|
+
@JoeTheFkingFrypan
|
|
35
|
+
* Expose serverProperties in the connection object
|
|
36
|
+
([PR 452])(https://github.com/squaremo/amqp.node/pull/452); thanks
|
|
37
|
+
@jfromaniello
|
|
38
|
+
* Test on Node 10
|
|
39
|
+
([PR 454])(https://github.com/squaremo/amqp.node/pull/454); thanks
|
|
40
|
+
@kibertoad
|
|
41
|
+
* Support amqplain credentials
|
|
42
|
+
([PR 451])(https://github.com/squaremo/amqp.node/pull/451); thanks
|
|
43
|
+
@jfromaniello
|
|
44
|
+
* Decorate channel errors with methodId and classId
|
|
45
|
+
([PR 447])(https://github.com/squaremo/amqp.node/pull/447); thanks
|
|
46
|
+
@MitMaro
|
|
47
|
+
* Resolve issues caused by Node 10 `readable` changes
|
|
48
|
+
([PR 442])(https://github.com/squaremo/amqp.node/pull/442)
|
|
49
|
+
* Bump uglify to 2.6.x and node to 9.1 due to nodejs/node#16781.
|
|
50
|
+
([PR 439])(https://github.com/squaremo/amqp.node/pull/439)
|
|
51
|
+
* Updated README with more modern Buffer syntax
|
|
52
|
+
([PR 438](https://github.com/squaremo/amqp.node/pull/438); thanks
|
|
53
|
+
@ravshansbox
|
|
54
|
+
* Support overflow option to assert queue
|
|
55
|
+
([PR 436])(https://github.com/squaremo/amqp.node/pull/436); thanks
|
|
56
|
+
to @honestserpent
|
|
57
|
+
* Replace instances of keyword `await`
|
|
58
|
+
([PR 396])(https://github.com/squaremo/amqp.node/pull/396),
|
|
59
|
+
as discussed in
|
|
60
|
+
[issue 235](https://github.com/squaremo/amqp.node/issues/235)
|
|
61
|
+
* Use 3rd party url for better decoding of username/password
|
|
62
|
+
([PR 395])(https://github.com/squaremo/amqp.node/pull/395),
|
|
63
|
+
as discussed in
|
|
64
|
+
[issue 385](https://github.com/squaremo/amqp.node/issues/385))
|
|
65
|
+
|
|
66
|
+
## Changes in v0.5.2
|
|
67
|
+
|
|
68
|
+
git log v0.5.1..v0.5.2
|
|
69
|
+
|
|
70
|
+
* Increase encoding buffer to accommodate large header values
|
|
71
|
+
([PR 367](https://github.com/squaremo/amqp.node/pull/367))
|
|
72
|
+
* Bring code up to date with new Buffer interface
|
|
73
|
+
([PR 350](https://github.com/squaremo/amqp.node/pull/350))
|
|
74
|
+
* Fix dangling connection problem
|
|
75
|
+
([PR 340](https://github.com/squaremo/amqp.node/pull/340))
|
|
76
|
+
* Clear up URL credentials parsing
|
|
77
|
+
([PR 330](https://github.com/squaremo/amqp.node/pull/330))
|
|
78
|
+
* Allow connection params to be suppied in object
|
|
79
|
+
([PR 304](https://github.com/squaremo/amqp.node/pull/304))
|
|
80
|
+
* Support explicit numeric types in field tables (e.g., headers)
|
|
81
|
+
([PR 389](https://github.com/squaremo/amqp.node/pull/389), from a
|
|
82
|
+
suggestion in
|
|
83
|
+
[issue 358](https://github.com/squaremo/amqp.node/issues/358))
|
|
84
|
+
|
|
85
|
+
Thank you to all contributors, of PRs, issues and comments.
|
|
86
|
+
|
|
3
87
|
## Changes in v0.5.1
|
|
4
88
|
|
|
5
89
|
git log v0.5.0..v0.5.1
|
package/Makefile
CHANGED
|
@@ -2,7 +2,8 @@ RABBITMQ_SRC_VERSION=rabbitmq_v3_2_1
|
|
|
2
2
|
JSON=amqp-rabbitmq-0.9.1.json
|
|
3
3
|
RABBITMQ_CODEGEN=https://raw.githubusercontent.com/rabbitmq/rabbitmq-codegen
|
|
4
4
|
AMQP_JSON=$(RABBITMQ_CODEGEN)/$(RABBITMQ_SRC_VERSION)/$(JSON)
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
NODEJS_VERSIONS='0.8' '0.9' '0.10' '0.11' '0.12' '1.6' '2.5' '3.3' '4.2' '5.5' '6.2' '8.9' '9.11' '10.7' '11.1'
|
|
6
7
|
|
|
7
8
|
MOCHA=./node_modules/.bin/mocha
|
|
8
9
|
_MOCHA=./node_modules/.bin/_mocha
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* [Examples from RabbitMQ tutorials][tutes]
|
|
11
11
|
|
|
12
12
|
A library for making AMQP 0-9-1 clients for Node.JS, and an AMQP 0-9-1
|
|
13
|
-
client for Node.JS v0.8-12, v4
|
|
13
|
+
client for Node.JS v0.8-0.12, v4-v9, and the intervening io.js
|
|
14
14
|
releases.
|
|
15
15
|
|
|
16
16
|
This library does not implement [AMQP
|
|
@@ -21,6 +21,7 @@ Project status:
|
|
|
21
21
|
|
|
22
22
|
- Expected to work
|
|
23
23
|
- Complete high-level and low-level APIs (i.e., all bits of the protocol)
|
|
24
|
+
- Stable APIs
|
|
24
25
|
- A fair few tests
|
|
25
26
|
- Measured test coverage
|
|
26
27
|
- Ports of the [RabbitMQ tutorials][rabbitmq-tutes] as [examples][tutes]
|
|
@@ -29,7 +30,6 @@ Project status:
|
|
|
29
30
|
Still working on:
|
|
30
31
|
|
|
31
32
|
- Getting to 100% (or very close to 100%) test coverage
|
|
32
|
-
- Settling on completely stable APIs
|
|
33
33
|
|
|
34
34
|
## Callback API example
|
|
35
35
|
|
|
@@ -47,7 +47,7 @@ function publisher(conn) {
|
|
|
47
47
|
function on_open(err, ch) {
|
|
48
48
|
if (err != null) bail(err);
|
|
49
49
|
ch.assertQueue(q);
|
|
50
|
-
ch.sendToQueue(q,
|
|
50
|
+
ch.sendToQueue(q, Buffer.from('something to do'));
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -86,7 +86,7 @@ open.then(function(conn) {
|
|
|
86
86
|
return conn.createChannel();
|
|
87
87
|
}).then(function(ch) {
|
|
88
88
|
return ch.assertQueue(q).then(function(ok) {
|
|
89
|
-
return ch.sendToQueue(q,
|
|
89
|
+
return ch.sendToQueue(q, Buffer.from('something to do'));
|
|
90
90
|
});
|
|
91
91
|
}).catch(console.warn);
|
|
92
92
|
|