typespeed 2.0.13 → 2.0.16

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.
Files changed (222) hide show
  1. package/dist/core.decorator.js +0 -1
  2. package/dist/database.decorator.js +0 -1
  3. package/dist/default/express-server.class.js +0 -1
  4. package/dist/default/log-default.class.js +0 -1
  5. package/dist/default/node-cache.class.js +0 -1
  6. package/dist/default/rabbitmq.class.js +0 -1
  7. package/dist/default/read-write-db.class.js +0 -1
  8. package/dist/default/redis.class.js +0 -1
  9. package/dist/factory/cache-factory.class.js +0 -1
  10. package/dist/factory/data-source-factory.class.js +0 -1
  11. package/dist/factory/log-factory.class.js +0 -1
  12. package/dist/factory/server-factory.class.js +0 -1
  13. package/dist/route.decorator.js +0 -1
  14. package/dist/scaffold/command.js +0 -1
  15. package/dist/typespeed.d.ts +133 -12
  16. package/dist/typespeed.js +1 -1
  17. package/package.json +2 -2
  18. package/src/typespeed.d.ts +133 -0
  19. package/src/typespeed.ts +2 -1
  20. package/test/node_modules/.package-lock.json +112 -4
  21. package/test/node_modules/@acuminous/bitsyntax/.github/workflows/node-js-ci.yml +17 -0
  22. package/test/node_modules/@acuminous/bitsyntax/.github/workflows/node-js-publish.yml +30 -0
  23. package/test/node_modules/@acuminous/bitsyntax/LICENSE +6 -0
  24. package/test/node_modules/@acuminous/bitsyntax/LICENSE-MIT +21 -0
  25. package/test/node_modules/@acuminous/bitsyntax/Makefile +15 -0
  26. package/test/node_modules/@acuminous/bitsyntax/README.md +308 -0
  27. package/test/node_modules/@acuminous/bitsyntax/index.js +10 -0
  28. package/test/node_modules/@acuminous/bitsyntax/lib/compile.js +303 -0
  29. package/test/node_modules/@acuminous/bitsyntax/lib/constructor.js +142 -0
  30. package/test/node_modules/@acuminous/bitsyntax/lib/grammar.pegjs +67 -0
  31. package/test/node_modules/@acuminous/bitsyntax/lib/interp.js +232 -0
  32. package/test/node_modules/@acuminous/bitsyntax/lib/parse.js +32 -0
  33. package/test/node_modules/@acuminous/bitsyntax/lib/parser.js +1173 -0
  34. package/test/node_modules/@acuminous/bitsyntax/lib/pattern.js +119 -0
  35. package/test/node_modules/@acuminous/bitsyntax/package.json +36 -0
  36. package/test/node_modules/@acuminous/bitsyntax/test/consing.test.js +50 -0
  37. package/test/node_modules/@acuminous/bitsyntax/test/matching.test.js +193 -0
  38. package/test/node_modules/@types/node/README.md +1 -1
  39. package/test/node_modules/@types/node/buffer.d.ts +5 -2
  40. package/test/node_modules/@types/node/child_process.d.ts +27 -0
  41. package/test/node_modules/@types/node/globals.d.ts +1 -0
  42. package/test/node_modules/@types/node/package.json +2 -2
  43. package/test/node_modules/@types/node/test.d.ts +43 -20
  44. package/test/node_modules/@types/node/ts4.8/buffer.d.ts +5 -2
  45. package/test/node_modules/@types/node/ts4.8/child_process.d.ts +27 -0
  46. package/test/node_modules/@types/node/ts4.8/globals.d.ts +1 -0
  47. package/test/node_modules/@types/node/ts4.8/test.d.ts +43 -19
  48. package/test/node_modules/@types/node/ts4.8/url.d.ts +3 -3
  49. package/test/node_modules/@types/node/ts4.8/util.d.ts +1 -1
  50. package/test/node_modules/@types/node/url.d.ts +3 -3
  51. package/test/node_modules/@types/node/util.d.ts +1 -1
  52. package/test/node_modules/amqplib/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  53. package/test/node_modules/amqplib/.github/workflows/test.yml +38 -0
  54. package/test/node_modules/amqplib/CHANGELOG.md +430 -0
  55. package/test/node_modules/amqplib/LICENSE +6 -0
  56. package/test/node_modules/amqplib/LICENSE-MIT +21 -0
  57. package/test/node_modules/amqplib/Makefile +47 -0
  58. package/test/node_modules/amqplib/README.md +157 -0
  59. package/test/node_modules/amqplib/bin/generate-defs.js +722 -0
  60. package/test/node_modules/amqplib/callback_api.js +22 -0
  61. package/test/node_modules/amqplib/channel_api.js +16 -0
  62. package/test/node_modules/amqplib/examples/headers.js +42 -0
  63. package/test/node_modules/amqplib/examples/receive_generator.js +39 -0
  64. package/test/node_modules/amqplib/examples/send_generators.js +42 -0
  65. package/test/node_modules/amqplib/examples/ssl.js +64 -0
  66. package/test/node_modules/amqplib/examples/tutorials/README.md +93 -0
  67. package/test/node_modules/amqplib/examples/tutorials/callback_api/emit_log.js +28 -0
  68. package/test/node_modules/amqplib/examples/tutorials/callback_api/emit_log_direct.js +30 -0
  69. package/test/node_modules/amqplib/examples/tutorials/callback_api/emit_log_topic.js +27 -0
  70. package/test/node_modules/amqplib/examples/tutorials/callback_api/new_task.js +27 -0
  71. package/test/node_modules/amqplib/examples/tutorials/callback_api/receive.js +30 -0
  72. package/test/node_modules/amqplib/examples/tutorials/callback_api/receive_logs.js +36 -0
  73. package/test/node_modules/amqplib/examples/tutorials/callback_api/receive_logs_direct.js +56 -0
  74. package/test/node_modules/amqplib/examples/tutorials/callback_api/receive_logs_topic.js +55 -0
  75. package/test/node_modules/amqplib/examples/tutorials/callback_api/rpc_client.js +49 -0
  76. package/test/node_modules/amqplib/examples/tutorials/callback_api/rpc_server.js +45 -0
  77. package/test/node_modules/amqplib/examples/tutorials/callback_api/send.js +29 -0
  78. package/test/node_modules/amqplib/examples/tutorials/callback_api/worker.js +35 -0
  79. package/test/node_modules/amqplib/examples/tutorials/emit_log.js +19 -0
  80. package/test/node_modules/amqplib/examples/tutorials/emit_log_direct.js +20 -0
  81. package/test/node_modules/amqplib/examples/tutorials/emit_log_topic.js +19 -0
  82. package/test/node_modules/amqplib/examples/tutorials/new_task.js +18 -0
  83. package/test/node_modules/amqplib/examples/tutorials/package.json +16 -0
  84. package/test/node_modules/amqplib/examples/tutorials/receive.js +21 -0
  85. package/test/node_modules/amqplib/examples/tutorials/receive_logs.js +28 -0
  86. package/test/node_modules/amqplib/examples/tutorials/receive_logs_direct.js +44 -0
  87. package/test/node_modules/amqplib/examples/tutorials/receive_logs_topic.js +43 -0
  88. package/test/node_modules/amqplib/examples/tutorials/rpc_client.js +52 -0
  89. package/test/node_modules/amqplib/examples/tutorials/rpc_server.js +39 -0
  90. package/test/node_modules/amqplib/examples/tutorials/send.js +23 -0
  91. package/test/node_modules/amqplib/examples/tutorials/worker.js +28 -0
  92. package/test/node_modules/amqplib/examples/waitForConfirms.js +22 -0
  93. package/test/node_modules/amqplib/lib/api_args.js +314 -0
  94. package/test/node_modules/amqplib/lib/bitset.js +130 -0
  95. package/test/node_modules/amqplib/lib/callback_model.js +327 -0
  96. package/test/node_modules/amqplib/lib/channel.js +499 -0
  97. package/test/node_modules/amqplib/lib/channel_model.js +302 -0
  98. package/test/node_modules/amqplib/lib/codec.js +321 -0
  99. package/test/node_modules/amqplib/lib/connect.js +189 -0
  100. package/test/node_modules/amqplib/lib/connection.js +663 -0
  101. package/test/node_modules/amqplib/lib/credentials.js +42 -0
  102. package/test/node_modules/amqplib/lib/defs.js +4966 -0
  103. package/test/node_modules/amqplib/lib/error.js +24 -0
  104. package/test/node_modules/amqplib/lib/format.js +40 -0
  105. package/test/node_modules/amqplib/lib/frame.js +113 -0
  106. package/test/node_modules/amqplib/lib/heartbeat.js +89 -0
  107. package/test/node_modules/amqplib/lib/mux.js +129 -0
  108. package/test/node_modules/amqplib/package.json +37 -0
  109. package/test/node_modules/amqplib/test/bitset.js +69 -0
  110. package/test/node_modules/amqplib/test/callback_api.js +312 -0
  111. package/test/node_modules/amqplib/test/channel.js +621 -0
  112. package/test/node_modules/amqplib/test/channel_api.js +596 -0
  113. package/test/node_modules/amqplib/test/codec.js +237 -0
  114. package/test/node_modules/amqplib/test/connect.js +197 -0
  115. package/test/node_modules/amqplib/test/connection.js +390 -0
  116. package/test/node_modules/amqplib/test/data.js +254 -0
  117. package/test/node_modules/amqplib/test/frame.js +198 -0
  118. package/test/node_modules/amqplib/test/mux.js +204 -0
  119. package/test/node_modules/amqplib/test/util.js +219 -0
  120. package/test/node_modules/buffer-more-ints/.travis.yml +6 -0
  121. package/test/node_modules/buffer-more-ints/LICENSE +19 -0
  122. package/test/node_modules/buffer-more-ints/README.md +69 -0
  123. package/test/node_modules/buffer-more-ints/buffer-more-ints-tests.js +183 -0
  124. package/test/node_modules/buffer-more-ints/buffer-more-ints.js +432 -0
  125. package/test/node_modules/buffer-more-ints/package.json +19 -0
  126. package/test/node_modules/buffer-more-ints/polyfill.js +71 -0
  127. package/test/node_modules/core-util-is/LICENSE +19 -0
  128. package/test/node_modules/core-util-is/README.md +3 -0
  129. package/test/node_modules/core-util-is/lib/util.js +107 -0
  130. package/test/node_modules/core-util-is/package.json +38 -0
  131. package/test/node_modules/debug/LICENSE +20 -0
  132. package/test/node_modules/debug/README.md +481 -0
  133. package/test/node_modules/debug/package.json +59 -0
  134. package/test/node_modules/debug/src/browser.js +269 -0
  135. package/test/node_modules/debug/src/common.js +274 -0
  136. package/test/node_modules/debug/src/index.js +10 -0
  137. package/test/node_modules/debug/src/node.js +263 -0
  138. package/test/node_modules/inherits/LICENSE +16 -0
  139. package/test/node_modules/inherits/README.md +42 -0
  140. package/test/node_modules/inherits/inherits.js +9 -0
  141. package/test/node_modules/inherits/inherits_browser.js +27 -0
  142. package/test/node_modules/inherits/package.json +29 -0
  143. package/test/node_modules/isarray/README.md +54 -0
  144. package/test/node_modules/isarray/build/build.js +209 -0
  145. package/test/node_modules/isarray/component.json +19 -0
  146. package/test/node_modules/isarray/index.js +3 -0
  147. package/test/node_modules/isarray/package.json +25 -0
  148. package/test/node_modules/ms/index.js +162 -0
  149. package/test/node_modules/ms/license.md +21 -0
  150. package/test/node_modules/ms/package.json +37 -0
  151. package/test/node_modules/ms/readme.md +60 -0
  152. package/test/node_modules/querystringify/LICENSE +22 -0
  153. package/test/node_modules/querystringify/README.md +61 -0
  154. package/test/node_modules/querystringify/index.js +118 -0
  155. package/test/node_modules/querystringify/package.json +38 -0
  156. package/test/node_modules/readable-stream/LICENSE +18 -0
  157. package/test/node_modules/readable-stream/README.md +15 -0
  158. package/test/node_modules/readable-stream/duplex.js +1 -0
  159. package/test/node_modules/readable-stream/float.patch +923 -0
  160. package/test/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
  161. package/test/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
  162. package/test/node_modules/readable-stream/lib/_stream_readable.js +951 -0
  163. package/test/node_modules/readable-stream/lib/_stream_transform.js +209 -0
  164. package/test/node_modules/readable-stream/lib/_stream_writable.js +477 -0
  165. package/test/node_modules/readable-stream/package.json +32 -0
  166. package/test/node_modules/readable-stream/passthrough.js +1 -0
  167. package/test/node_modules/readable-stream/readable.js +10 -0
  168. package/test/node_modules/readable-stream/transform.js +1 -0
  169. package/test/node_modules/readable-stream/writable.js +1 -0
  170. package/test/node_modules/requires-port/.travis.yml +19 -0
  171. package/test/node_modules/requires-port/LICENSE +22 -0
  172. package/test/node_modules/requires-port/README.md +47 -0
  173. package/test/node_modules/requires-port/index.js +38 -0
  174. package/test/node_modules/requires-port/package.json +47 -0
  175. package/test/node_modules/requires-port/test.js +98 -0
  176. package/test/node_modules/safe-buffer/LICENSE +21 -0
  177. package/test/node_modules/safe-buffer/README.md +584 -0
  178. package/test/node_modules/safe-buffer/index.d.ts +187 -0
  179. package/test/node_modules/safe-buffer/index.js +62 -0
  180. package/test/node_modules/safe-buffer/package.json +37 -0
  181. package/test/node_modules/string_decoder/LICENSE +20 -0
  182. package/test/node_modules/string_decoder/README.md +7 -0
  183. package/test/node_modules/string_decoder/index.js +221 -0
  184. package/test/node_modules/string_decoder/package.json +25 -0
  185. package/test/node_modules/url-parse/LICENSE +22 -0
  186. package/test/node_modules/url-parse/README.md +153 -0
  187. package/test/node_modules/url-parse/dist/url-parse.js +755 -0
  188. package/test/node_modules/url-parse/dist/url-parse.min.js +1 -0
  189. package/test/node_modules/url-parse/dist/url-parse.min.js.map +1 -0
  190. package/test/node_modules/url-parse/index.js +589 -0
  191. package/test/node_modules/url-parse/package.json +49 -0
  192. package/test/src/test-mq.class.ts +1 -2
  193. package/tsconfig.json +4 -3
  194. package/dist/core.decorator.d.ts +0 -18
  195. package/dist/core.decorator.js.map +0 -1
  196. package/dist/database.decorator.d.ts +0 -24
  197. package/dist/database.decorator.js.map +0 -1
  198. package/dist/default/express-server.class.d.ts +0 -15
  199. package/dist/default/express-server.class.js.map +0 -1
  200. package/dist/default/log-default.class.d.ts +0 -6
  201. package/dist/default/log-default.class.js.map +0 -1
  202. package/dist/default/node-cache.class.d.ts +0 -13
  203. package/dist/default/node-cache.class.js.map +0 -1
  204. package/dist/default/rabbitmq.class.d.ts +0 -9
  205. package/dist/default/rabbitmq.class.js.map +0 -1
  206. package/dist/default/read-write-db.class.d.ts +0 -10
  207. package/dist/default/read-write-db.class.js.map +0 -1
  208. package/dist/default/redis.class.d.ts +0 -5
  209. package/dist/default/redis.class.js.map +0 -1
  210. package/dist/factory/cache-factory.class.d.ts +0 -7
  211. package/dist/factory/cache-factory.class.js.map +0 -1
  212. package/dist/factory/data-source-factory.class.d.ts +0 -4
  213. package/dist/factory/data-source-factory.class.js.map +0 -1
  214. package/dist/factory/log-factory.class.d.ts +0 -4
  215. package/dist/factory/log-factory.class.js.map +0 -1
  216. package/dist/factory/server-factory.class.d.ts +0 -6
  217. package/dist/factory/server-factory.class.js.map +0 -1
  218. package/dist/route.decorator.d.ts +0 -8
  219. package/dist/route.decorator.js.map +0 -1
  220. package/dist/scaffold/command.d.ts +0 -2
  221. package/dist/scaffold/command.js.map +0 -1
  222. package/dist/typespeed.js.map +0 -1
@@ -0,0 +1,430 @@
1
+ # Change log for amqplib
2
+
3
+ ## Changes in v0.10.3
4
+
5
+ git log v0.10.2..v0.10.3
6
+
7
+ - Use @acuminous/bitsyntax fork. See https://github.com/amqp-node/amqplib/issues/453
8
+
9
+ ## Changes in v0.10.2
10
+
11
+ git log v0.10.1..v0.10.2
12
+
13
+ - Use Buffer.allocUnsafe when sending messages to improve performance ([PR
14
+ 695](https://github.com/amqp-node/amqplib/pull/695), thank you
15
+ @chkimes and @Uzlopak)
16
+
17
+ ## Changes in v0.10.1
18
+
19
+ git log v0.10.0..v0.10.1
20
+
21
+ * Allow servername to be specified via socket options as discussed in as discussed in
22
+ [issue 697](https://github.com/squaremo/amqp.node/issues/697)
23
+
24
+ ## Changes in v0.10.0
25
+
26
+ git log v0.9.1..v0.10.0
27
+
28
+ * Use Native promises ([PR
29
+ 689](https://github.com/amqp-node/amqplib/pull/689), thank you
30
+ @mohd-akram and @kibertoad)
31
+
32
+ ## Changes in v0.9.1
33
+
34
+ git log v0.9.0..v0.9.1
35
+
36
+ * Assorted readme changes
37
+ * Use Array.prototype.push.apply instead of concat in Mux ([PR
38
+ 658](https://github.com/squaremo/amqp.node/pull/658), thank you
39
+ @Uzlopak and @kibertoad)
40
+ * Use Map instead of Object for BaseChannel.consumers ([PR
41
+ 660](https://github.com/squaremo/amqp.node/pull/660), thank you
42
+ @Uzlopak)
43
+ * Delete consumer callback after cancellation to free memory ([PR
44
+ 659](https://github.com/squaremo/amqp.node/pull/659), thank you
45
+ @Uzlopak and @kibertoad)
46
+
47
+
48
+ ## Changes in v0.9.0
49
+
50
+ git log v0.8.0..v0.9.0
51
+
52
+ * Update mocha and replace the deprecated istanbul with nyc ([PR
53
+ 681](https://github.com/squaremo/amqp.node/pull/681)
54
+ * Update url-parse ([PR
55
+ 675](https://github.com/squaremo/amqp.node/pull/675), thank you
56
+ @suhail-n and @kibertoad)
57
+ * fix: done called twice on invalid options ([PR
58
+ 667](https://github.com/squaremo/amqp.node/pull/667), thank you
59
+ @luddd3 and @kibertoad)
60
+ * Close connection to server on connect errors ([PR
61
+ 647](https://github.com/squaremo/amqp.node/pull/647), thank you
62
+ @luddd3 and @kibertoad)
63
+ * Modernise channel_model.js ([PR
64
+ 635](https://github.com/squaremo/amqp.node/pull/635), thank you
65
+ @kibertoad and @jimmywarting)
66
+ * Bring package-lock.json up to date ([PR
67
+ 653](https://github.com/squaremo/amqp.node/pull/653)
68
+ * Update url-parse ([PR
69
+ 652](https://github.com/squaremo/amqp.node/pull/652), thank you
70
+ @giorgioatanasov and @buffolander)
71
+ * Modernise channel_model.js ([PR
72
+ 651](https://github.com/squaremo/amqp.node/pull/651), thank you
73
+ for the review @kibertoad)
74
+ * Modernise bitset.js ([PR
75
+ 634](https://github.com/squaremo/amqp.node/pull/634), thank you
76
+ @kibertoad and @jimmywarting)
77
+ * :warning: Drop CI for node versions below 10 ([PR
78
+ 631](https://github.com/squaremo/amqp.node/pull/631), thank you
79
+ for the review @kibertoad)
80
+ * Replace safe-buffer dependency with native buffers ([PR
81
+ 628](https://github.com/squaremo/amqp.node/pull/628), thank you
82
+ @kibertoad and @jimmywarting)
83
+
84
+ ## Changes in v0.8.0
85
+
86
+ git log v0.7.1..v0.8.0
87
+
88
+ * :warning: Support for NodeJS prior to v10 is dropped :warning: ([PR
89
+ 615](https://github.com/squaremo/amqp.node/pull/615), thank you
90
+ @xamgore and everyone who helped there)
91
+ * Use hostname as TLS servername, to help with using servers behind
92
+ load balancers ([PR
93
+ 567](https://github.com/squaremo/amqp.node/pull/567), thanks to
94
+ @carlhoerberg and commenters)
95
+
96
+ ## Changes in v0.7.1
97
+
98
+ git log v0.7.0..v0.7.1
99
+
100
+ * Update url-parse (and others) ([PR
101
+ 607](https://github.com/squaremo/amqp.node/pull/545), thanks
102
+ @ThomasGawlitza)
103
+
104
+ ## Changes in v0.7.0
105
+
106
+ git log v0.6.0..v0.7.0
107
+
108
+ * Extend support to Node.js v15
109
+ * Fix use of stream.write in tests
110
+
111
+ ## Changes in v0.6.0
112
+
113
+ git log v0.5.6..v0.6.0
114
+
115
+ * Extend support to Node.js v14
116
+
117
+ ## Changes in v0.5.6
118
+
119
+ git log v0.5.5..v0.5.6
120
+
121
+ * Increase size of encoding space for message headers, to fit e.g.,
122
+ JWT ([PR 545](https://github.com/squaremo/amqp.node/pull/545));
123
+ thanks @twatson83
124
+ * Switch to a non-deprecated UUID module ([PR
125
+ 528](https://github.com/squaremo/amqp.node/pull/528)); thanks to
126
+ @StrayBird-ATSH
127
+ * Fix a bug in multiplexing that caused an assertion to fail ([PR
128
+ 503](https://github.com/squaremo/amqp.node/pull/503)); thanks
129
+ @johanneswuerbach
130
+
131
+ ## Changes in v0.5.5
132
+
133
+ git log v0.5.3..v0.5.5
134
+
135
+ **NB** this includes a minor but possibly breaking change: after [PR
136
+ 498](https://github.com/squaremo/amqp.node/pull/498), all confirmation
137
+ promises still unresolved will be rejected when their associated
138
+ channel is closed.
139
+
140
+ * Generate defs in `npm prepare` rather than `npm prepublish` so that
141
+ e.g., amqplib can be installed via git ([part of PR
142
+ 498](https://github.com/squaremo/amqp.node/pull/498))
143
+ * Reject all pending confirmations when the channel is closed ([PR
144
+ 498](https://github.com/squaremo/amqp.node/pull/498)); thanks
145
+ @johanneswuerbach
146
+ * Update supported NodeJS versions in package.json ([PR
147
+ 525](https://github.com/squaremo/amqp.node/pull/525)); thanks
148
+ @tingwai
149
+
150
+ ## (Deprecated v0.5.4)
151
+
152
+ This release was mistakenly published without the generated file
153
+ `./defs.js`. It has been deprecated in favour of v0.5.5.
154
+
155
+ ## Changes in v0.5.3
156
+
157
+ git log v0.5.2..v0.5.3
158
+
159
+ * Bump bitsyntax to remove some `Buffer` misuse deprecation notices
160
+ ([PR 480])(https://github.com/squaremo/amqp.node/pull/480)
161
+ * Test on node 11.1
162
+ ([PR 473])(https://github.com/squaremo/amqp.node/pull/464); thanks
163
+ @kibertoad
164
+ * Updated various dependencies
165
+ * Support queue mode during assertQueue
166
+ ([PR 464])(https://github.com/squaremo/amqp.node/pull/464); thanks
167
+ @JoeTheFkingFrypan
168
+ * Expose serverProperties in the connection object
169
+ ([PR 452])(https://github.com/squaremo/amqp.node/pull/452); thanks
170
+ @jfromaniello
171
+ * Test on Node 10
172
+ ([PR 454])(https://github.com/squaremo/amqp.node/pull/454); thanks
173
+ @kibertoad
174
+ * Support amqplain credentials
175
+ ([PR 451])(https://github.com/squaremo/amqp.node/pull/451); thanks
176
+ @jfromaniello
177
+ * Decorate channel errors with methodId and classId
178
+ ([PR 447])(https://github.com/squaremo/amqp.node/pull/447); thanks
179
+ @MitMaro
180
+ * Resolve issues caused by Node 10 `readable` changes
181
+ ([PR 442])(https://github.com/squaremo/amqp.node/pull/442)
182
+ * Bump uglify to 2.6.x and node to 9.1 due to nodejs/node#16781.
183
+ ([PR 439])(https://github.com/squaremo/amqp.node/pull/439)
184
+ * Updated README with more modern Buffer syntax
185
+ ([PR 438](https://github.com/squaremo/amqp.node/pull/438); thanks
186
+ @ravshansbox
187
+ * Support overflow option to assert queue
188
+ ([PR 436])(https://github.com/squaremo/amqp.node/pull/436); thanks
189
+ to @honestserpent
190
+ * Replace instances of keyword `await`
191
+ ([PR 396])(https://github.com/squaremo/amqp.node/pull/396),
192
+ as discussed in
193
+ [issue 235](https://github.com/squaremo/amqp.node/issues/235)
194
+ * Use 3rd party url for better decoding of username/password
195
+ ([PR 395])(https://github.com/squaremo/amqp.node/pull/395),
196
+ as discussed in
197
+ [issue 385](https://github.com/squaremo/amqp.node/issues/385))
198
+
199
+ ## Changes in v0.5.2
200
+
201
+ git log v0.5.1..v0.5.2
202
+
203
+ * Increase encoding buffer to accommodate large header values
204
+ ([PR 367](https://github.com/squaremo/amqp.node/pull/367))
205
+ * Bring code up to date with new Buffer interface
206
+ ([PR 350](https://github.com/squaremo/amqp.node/pull/350))
207
+ * Fix dangling connection problem
208
+ ([PR 340](https://github.com/squaremo/amqp.node/pull/340))
209
+ * Clear up URL credentials parsing
210
+ ([PR 330](https://github.com/squaremo/amqp.node/pull/330))
211
+ * Allow connection params to be suppied in object
212
+ ([PR 304](https://github.com/squaremo/amqp.node/pull/304))
213
+ * Support explicit numeric types in field tables (e.g., headers)
214
+ ([PR 389](https://github.com/squaremo/amqp.node/pull/389), from a
215
+ suggestion in
216
+ [issue 358](https://github.com/squaremo/amqp.node/issues/358))
217
+
218
+ Thank you to all contributors, of PRs, issues and comments.
219
+
220
+ ## Changes in v0.5.1
221
+
222
+ git log v0.5.0..v0.5.1
223
+
224
+ * Fix mistake in closeBecause
225
+ ([PR 298](https://github.com/squaremo/amqp.node/pull/298); thanks
226
+ to @lholznagel and others who reported the issue, and to @nfantone
227
+ for the rapid fix)
228
+
229
+ ## Changes in v0.5.0
230
+
231
+ git log v0.4.2..v0.5.0
232
+
233
+ * Port to use bluebird rather than when.js
234
+ ([PR 295](https://github.com/squaremo/amqp.node/pull/295); thanks
235
+ to @nfantone, and special mention to @myndzi for #158)
236
+ * Fixed a problem with using `channel.get` in the callback model
237
+ ([PR 283](https://github.com/squaremo/amqp.node/pull/283); good
238
+ catch, @shanksauce)
239
+ * Added an example that uses generators (thanks @rudijs)
240
+ * Fixed a link in the comments relating to heartbeats (thanks
241
+ @tapickell)
242
+
243
+ ## Changes in v0.4.2
244
+
245
+ git log v0.4.1..v0.4.2
246
+
247
+ * Better documentation and examples
248
+ * Replace uses of ES6 keyword 'await'
249
+
250
+ ## Changes in v0.4.1
251
+
252
+ git log v0.4.0..v0.4.1
253
+
254
+ * Tested in Node.JS 0.8 through 4.2 and 5.5
255
+ * Emit an error with the 'close' event if server-initiated
256
+
257
+ ## Changes in v0.4.0
258
+
259
+ git log v0.3.2..v0.4.0
260
+
261
+ * Tested on Node.JS 0.8 through 4.0 (and intervening io.js releases)
262
+ * Change meaning of 'b' fields in tables to match RabbitMQ (and AMQP
263
+ specification)
264
+ * Can now pass an object in place of connection URL
265
+ ([PR 159](https://github.com/squaremo/amqp.node/pull/159); thanks
266
+ to @ben-page)
267
+ * Operator-initiated connection close no longer results in 'error'
268
+ event
269
+ ([issue 110](https://github.com/squaremo/amqp.node/issues/110))
270
+ * Channel and Connection errors have now a `.code` field with the
271
+ AMQP reply-code, which may help distinguish error cases
272
+ ([PR 150](https://github.com/squaremo/amqp.node/pull/150); thanks
273
+ to @hippich)
274
+ * Connection.close will resolve to an error if the connection is
275
+ already closed
276
+ ([issue 181](https://github.com/squaremo/amqp.node/issues/181))
277
+ * Connection establishment will resolve with an error if the
278
+ TCP-level connection or the handshake times out
279
+ ([PR 169](https://github.com/squaremo/amqp.node/pull/169); thanks
280
+ to @zweifisch and @RoCat, who both submitted fixes)
281
+ * Add the `maxPriority` option as an alias for the `'x-max-priority'`
282
+ queue argument
283
+ ([PR 180](https://github.com/squaremo/amqp.node/pull/180); thanks
284
+ to @ebardes)
285
+
286
+ ## Changes in v0.3.2 (since v0.3.1)
287
+
288
+ git log v0.3.1..v0.3.2
289
+
290
+ * Make the engine specification more flexible to admit io.js releases
291
+
292
+ ## Changes in v0.3.1 (since v0.3.0)
293
+
294
+ git log v0.3.0..v0.3.1
295
+
296
+ ### Fixes
297
+
298
+ * Fail in the right way when a channel cannot be allocated [issue
299
+ 129](https://github.com/squaremo/amqp.node/issues/129)
300
+ * Make `waitForConfirms` work properly in callback API [PR
301
+ 116](https://github.com/squaremo/amqp.node/pull/116)
302
+
303
+ ### Enhancements
304
+
305
+ * Two new options while connecting:
306
+ [timeout](https://github.com/squaremo/amqp.node/pull/118) and [keep
307
+ alive](https://github.com/squaremo/amqp.node/pull/125) (thanks to
308
+ @rexxars and @jcrugzz respectively)
309
+
310
+ ## Changes in v0.3.0 (since v0.2.1)
311
+
312
+ git log v0.2.1..v0.3.0
313
+
314
+ ### Enhancements
315
+
316
+ * Allow additional client properties to be set for a connection
317
+ [Issue 98](https://github.com/squaremo/amqp.node/issues/98) and
318
+ [PR 80](https://github.com/squaremo/amqp.node/pull/80)
319
+ * New method in channel API to wait for all unconfirmed messages
320
+ [Issue 89](https://github.com/squaremo/amqp.node/issues/89)
321
+ * Now supports RabbitMQ's `EXTERNAL` authentication plugin
322
+ [Issue 105](https://github.com/squaremo/amqp.node/issues/105)
323
+
324
+ ## Changes in v0.2.1 (since v0.2.0)
325
+
326
+ ### Fixes
327
+
328
+ * Do tuning negotation properly [PR
329
+ 84](https://github.com/squaremo/amqp.node/pull/84)
330
+
331
+ ## Changes in v0.2.0 (since v0.1.3)
332
+
333
+ git log v0.1.3..v0.2.0
334
+
335
+ ### Fixes
336
+
337
+ * Correctly deal with missing fields (issue 48)
338
+
339
+ ### Enhancements
340
+
341
+ * Added a callback-oriented API, parallel to the existing,
342
+ promise-oriented API.
343
+ * The response to assertExchange now contains the exchange name,
344
+ analagous to assertQueue (issue 49)
345
+ * The channel method `prefetch` now has a global flag, to be
346
+ [compatible with newer RabbitMQ][rabbitmq-prefetch-global].
347
+
348
+ ## Changes in v0.1.3 (since v0.1.2)
349
+
350
+ git log v0.1.2..v0.1.3
351
+
352
+ ### Enhancements
353
+
354
+ * Add support in the API for using Basic.Reject rather than
355
+ Basic.Nack, the latter of which is a RabbitMQ extension and not in
356
+ older versions of RabbitMQ.
357
+
358
+ ## Changes in v0.1.2 (since v0.1.1)
359
+
360
+ git log v0.1.1..v0.1.2
361
+
362
+ ### Fixes
363
+
364
+ * Restore support for publishing zero-length messages
365
+
366
+ ### Enhancements
367
+
368
+ * Recognise [authentication failures][rabbitmq-auth-failure]
369
+ * An option to set TCP_NODELAY on connection sockets
370
+
371
+ ## Changes in v0.1.1 (since v0.1.0)
372
+
373
+ git log v0.1.0..v0.1.1
374
+
375
+ ### Fixes
376
+
377
+ * Safer frame construction, no longer relies on allocating a large,
378
+ fixed-size buffer and hoping it's big enough
379
+ * The ports of RabbitMQ tutorials now avoid a race between publishing
380
+ and closing the connection
381
+
382
+ ### Enhancements
383
+
384
+ * Support for RabbitMQ's consumer priority extension
385
+ * Support for RabbitMQ's connnection.blocked extension
386
+ * Better write speed from batching frames for small messages
387
+ * Other minor efficiency gains in method encoding and decoding
388
+ * Channel and connection state errors (e.g., trying to write when
389
+ closed) include a stack trace from when they moved to that state
390
+ * The `arguments` table, passed as an option to some methods, can
391
+ include fields in its prototype chain
392
+ * Provide the more accurately named `persistent` as a near equivalent
393
+ of `deliveryMode`
394
+
395
+ ## Changes in v0.1.0 (since v0.0.2)
396
+
397
+ git log v0.0.2..v0.1.0
398
+
399
+ ### Breaking changes
400
+
401
+ * Consumer callbacks are invoked with `null` if the consumer is
402
+ cancelled (see
403
+ [RabbitMQ's consumer cancel notification][rabbitmq-consumer-cancel])
404
+ * In confirm channels, instead of `#publish` and `#sendToQueue`
405
+ returning promises, they return a boolean as for normal channels,
406
+ and take a Node.JS-style `function (err, ok)` callback for the
407
+ server ack or nack
408
+
409
+ ### Fixes
410
+
411
+ * Overlapping channel and connection close frames are dealt with
412
+ gracefully
413
+ * Exceptions thrown in consumer callbacks are raised as `'error'`
414
+ events
415
+ * Zero-size messages are handled
416
+ * Avoid monkey-patching `Buffer`, and eschew
417
+ `require('util')._extend`
418
+
419
+ ### Enhancements
420
+
421
+ * Channels now behave like `Writable` streams with regard to `#publish`
422
+ and `#sendToQueue`, returning a boolean from those methods and
423
+ emitting `'drain'`
424
+ * Connections now multiplex frames from channels fairly
425
+ * Low-level channel machinery is now fully callback-based
426
+
427
+
428
+ [rabbitmq-consumer-cancel]: http://www.rabbitmq.com/consumer-cancel.html
429
+ [rabbitmq-auth-failure]: http://www.rabbitmq.com/auth-notification.html
430
+ [rabbitmq-prefetch-global]: http://www.rabbitmq.com/consumer-prefetch.html
@@ -0,0 +1,6 @@
1
+ amqplib copyright (c) 2013, 2014
2
+ Michael Bridgen <mikeb@squaremobius.net>
3
+
4
+ This package, "amqplib", is licensed under the MIT License. A copy may
5
+ be found in the file LICENSE-MIT in this directory, or downloaded from
6
+ http://opensource.org/licenses/MIT.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013, 2014 Michael Bridgen <mikeb@squaremobius.net>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,47 @@
1
+ RABBITMQ_SRC_VERSION=rabbitmq_v3_2_1
2
+ JSON=amqp-rabbitmq-0.9.1.json
3
+ RABBITMQ_CODEGEN=https://raw.githubusercontent.com/rabbitmq/rabbitmq-codegen
4
+ AMQP_JSON=$(RABBITMQ_CODEGEN)/$(RABBITMQ_SRC_VERSION)/$(JSON)
5
+
6
+ NODEJS_VERSIONS='10.21' '11.15' '12.18' '13.14' '14.5' '15.8' '16.3.0' '18.1.0'
7
+
8
+ MOCHA=./node_modules/.bin/mocha
9
+ _MOCHA=./node_modules/.bin/_mocha
10
+ UGLIFY=./node_modules/.bin/uglifyjs
11
+ NYC=./node_modules/.bin/nyc
12
+
13
+ .PHONY: test test-all-nodejs all clean coverage
14
+
15
+ all: lib/defs.js
16
+
17
+ clean:
18
+ rm lib/defs.js bin/amqp-rabbitmq-0.9.1.json
19
+ rm -rf ./coverage
20
+
21
+ lib/defs.js: $(UGLIFY) bin/generate-defs.js bin/amqp-rabbitmq-0.9.1.json
22
+ (cd bin; node ./generate-defs.js > ../lib/defs.js)
23
+ $(UGLIFY) ./lib/defs.js -o ./lib/defs.js \
24
+ -c 'sequences=false' --comments \
25
+ -b 'indent-level=2' 2>&1 | (grep -v 'WARN' || true)
26
+
27
+ test: lib/defs.js
28
+ $(MOCHA) --check-leaks -u tdd --exit test/
29
+
30
+ test-all-nodejs: lib/defs.js
31
+ for v in $(NODEJS_VERSIONS); \
32
+ do echo "-- Node version $$v --"; \
33
+ nave use $$v $(MOCHA) -u tdd --exit -R progress test; \
34
+ done
35
+
36
+ coverage: $(NYC) lib/defs.js
37
+ $(NYC) --reporter=lcov --reporter=text $(_MOCHA) -u tdd -R progress test/
38
+ @echo "HTML report at file://$$(pwd)/coverage/lcov-report/index.html"
39
+
40
+ bin/amqp-rabbitmq-0.9.1.json:
41
+ curl -L $(AMQP_JSON) > $@
42
+
43
+ $(ISTANBUL):
44
+ npm install
45
+
46
+ $(UGLIFY):
47
+ npm install
@@ -0,0 +1,157 @@
1
+ # AMQP 0-9-1 library and client for Node.JS
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/amqplib.svg?style=flat-square)](https://www.npmjs.com/package/amqplib)
4
+ [![NPM downloads](https://img.shields.io/npm/dm/amqplib.svg?style=flat-square)](https://www.npmjs.com/package/amqplib)
5
+ [![Node.js CI](https://github.com/amqp-node/amqplib/workflows/Node.js%20CI/badge.svg)](https://github.com/amqp-node/amqplib/actions?query=workflow%3A%22Node.js+CI%22)
6
+ [![amqplib](https://snyk.io/advisor/npm-package/amqplib/badge.svg)](https://snyk.io/advisor/npm-package/amqplib)
7
+
8
+ npm install amqplib
9
+
10
+ * [Change log][changelog]
11
+ * [GitHub pages][gh-pages]
12
+ * [API reference][gh-pages-apiref]
13
+ * [Troubleshooting][gh-pages-trouble]
14
+ * [Examples from RabbitMQ tutorials][tutes]
15
+
16
+
17
+ A library for making AMQP 0-9-1 clients for Node.JS, and an AMQP 0-9-1 client for Node.JS v10+.
18
+
19
+ This library does not implement [AMQP
20
+ 1.0](https://github.com/squaremo/amqp.node/issues/63) or [AMQP
21
+ 0-10](https://github.com/squaremo/amqp.node/issues/94).
22
+
23
+ Project status:
24
+
25
+ - Expected to work
26
+ - Complete high-level and low-level APIs (i.e., all bits of the protocol)
27
+ - Stable APIs
28
+ - A fair few tests
29
+ - Measured test coverage
30
+ - Ports of the [RabbitMQ tutorials][rabbitmq-tutes] as [examples][tutes]
31
+ - Used in production
32
+
33
+ Still working on:
34
+
35
+ - Getting to 100% (or very close to 100%) test coverage
36
+
37
+ ## Callback API example
38
+
39
+ ```javascript
40
+ const amqplib = require('amqplib/callback_api');
41
+ const queue = 'tasks';
42
+
43
+ amqplib.connect('amqp://localhost', (err, conn) => {
44
+ if (err) throw err;
45
+
46
+ // Listener
47
+ conn.createChannel((err, ch2) => {
48
+ if (err) throw err;
49
+
50
+ ch2.assertQueue(queue);
51
+
52
+ ch2.consume(queue, (msg) => {
53
+ if (msg !== null) {
54
+ console.log(msg.content.toString());
55
+ ch2.ack(msg);
56
+ } else {
57
+ console.log('Consumer cancelled by server');
58
+ }
59
+ });
60
+ });
61
+
62
+ // Sender
63
+ conn.createChannel((err, ch1) => {
64
+ if (err) throw err;
65
+
66
+ ch1.assertQueue(queue);
67
+
68
+ setInterval(() => {
69
+ ch1.sendToQueue(queue, Buffer.from('something to do'));
70
+ }, 1000);
71
+ });
72
+ });
73
+ ```
74
+
75
+ ## Promise/Async API example
76
+
77
+ ```javascript
78
+ const amqplib = require('amqplib');
79
+
80
+ (async () => {
81
+ const queue = 'tasks';
82
+ const conn = await amqplib.connect('amqp://localhost');
83
+
84
+ const ch1 = await conn.createChannel();
85
+ await ch1.assertQueue(queue);
86
+
87
+ // Listener
88
+ ch1.consume(queue, (msg) => {
89
+ if (msg !== null) {
90
+ console.log('Recieved:', msg.content.toString());
91
+ ch1.ack(msg);
92
+ } else {
93
+ console.log('Consumer cancelled by server');
94
+ }
95
+ });
96
+
97
+ // Sender
98
+ const ch2 = await conn.createChannel();
99
+
100
+ setInterval(() => {
101
+ ch2.sendToQueue(queue, Buffer.from('something to do'));
102
+ }, 1000);
103
+ })();
104
+
105
+ ```
106
+
107
+ ## Running tests
108
+
109
+ npm test
110
+
111
+ To run the tests RabbitMQ is required. Either install it with your package
112
+ manager, or use [docker][] to run a RabbitMQ instance.
113
+
114
+ docker run -d --name amqp.test -p 5672:5672 rabbitmq
115
+
116
+ If prefer not to run RabbitMQ locally it is also possible to use a
117
+ instance of RabbitMQ hosted elsewhere. Use the `URL` environment
118
+ variable to configure a different amqp host to connect to. You may
119
+ also need to do this if docker is not on localhost; e.g., if it's
120
+ running in docker-machine.
121
+
122
+ One public host is dev.rabbitmq.com:
123
+
124
+ URL=amqp://dev.rabbitmq.com npm test
125
+
126
+ **NB** You may experience test failures due to timeouts if using the
127
+ dev.rabbitmq.com instance.
128
+
129
+ You can run it under different versions of Node.JS using [nave][]:
130
+
131
+ nave use 10 npm test
132
+
133
+ or run the tests on all supported versions of Node.JS in one go:
134
+
135
+ make test-all-nodejs
136
+
137
+ (which also needs `nave` installed, of course).
138
+
139
+ Lastly, setting the environment variable `LOG_ERRORS` will cause the
140
+ tests to output error messages encountered, to the console; this is
141
+ really only useful for checking the kind and formatting of the errors.
142
+
143
+ LOG_ERRORS=true npm test
144
+
145
+ ## Test coverage
146
+
147
+ make coverage
148
+ open file://`pwd`/coverage/lcov-report/index.html
149
+
150
+ [gh-pages]: https://amqp-node.github.io/amqplib/
151
+ [gh-pages-apiref]: https://amqp-node.github.io/amqplib/channel_api.html
152
+ [gh-pages-trouble]: https://amqp-node.github.io/amqplib/#troubleshooting
153
+ [nave]: https://github.com/isaacs/nave
154
+ [tutes]: https://github.com/amqp-node/amqplib/tree/main/examples/tutorials
155
+ [rabbitmq-tutes]: http://www.rabbitmq.com/getstarted.html
156
+ [changelog]: https://github.com/amqp-node/amqplib/blob/main/CHANGELOG.md
157
+ [docker]: https://www.docker.com/