@weave-js/core 0.10.0 → 0.12.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.
Files changed (132) hide show
  1. package/.eslintrc.js +1 -1
  2. package/jest.config.js +1 -1
  3. package/lib/ExtendableError.js +33 -0
  4. package/lib/broker/context.js +58 -46
  5. package/lib/broker/{default-options.js → defaultOptions.js} +31 -13
  6. package/lib/broker/index.js +273 -251
  7. package/lib/buildRuntime.js +70 -0
  8. package/lib/cache/adapters/base.js +119 -0
  9. package/lib/cache/adapters/inMemory.js +154 -0
  10. package/lib/cache/adapters/inMemoryLru.js +140 -0
  11. package/lib/cache/adapters/index.js +10 -0
  12. package/lib/cache/getCacheKeyByObject.js +31 -0
  13. package/lib/cache/getPropertyFromDataOrMetadata.js +20 -0
  14. package/lib/cache/lock.js +34 -11
  15. package/lib/constants.js +11 -8
  16. package/lib/{error-handler.js → errorHandler.js} +8 -8
  17. package/lib/errors.js +46 -39
  18. package/lib/helper/{define-action.js → defineAction.js} +5 -3
  19. package/lib/helper/{define-broker-options.js → defineBrokerOptions.js} +4 -2
  20. package/lib/helper/{define-service.js → defineService.js} +6 -3
  21. package/lib/index.js +25 -22
  22. package/lib/logger/base.js +38 -29
  23. package/lib/logger/format/asHumanReadable.js +15 -14
  24. package/lib/logger/format/asJson.js +10 -10
  25. package/lib/logger/format/index.js +3 -3
  26. package/lib/logger/index.js +28 -25
  27. package/lib/logger/levels.js +23 -22
  28. package/lib/logger/tools.js +17 -13
  29. package/lib/logger/utils/colorize.js +23 -23
  30. package/lib/logger/utils/format.js +89 -65
  31. package/lib/metrics/common.js +47 -47
  32. package/lib/metrics/constants.js +44 -44
  33. package/lib/metrics/exporter/base.js +8 -8
  34. package/lib/metrics/exporter/event.js +20 -20
  35. package/lib/metrics/exporter/index.js +15 -15
  36. package/lib/metrics/index.js +2 -2
  37. package/lib/metrics/types/base.js +20 -20
  38. package/lib/metrics/types/counter.js +6 -6
  39. package/lib/metrics/types/gauge.js +24 -24
  40. package/lib/metrics/types/histogram.js +26 -26
  41. package/lib/metrics/types/index.js +6 -6
  42. package/lib/metrics/types/info.js +17 -17
  43. package/lib/middlewares/action-hooks/index.js +82 -34
  44. package/lib/middlewares/bulkhead/index.js +34 -33
  45. package/lib/middlewares/cache/index.js +106 -0
  46. package/lib/middlewares/circuit-breaker/index.js +85 -60
  47. package/lib/middlewares/context-tracker/index.js +39 -39
  48. package/lib/middlewares/error-handler/index.js +14 -14
  49. package/lib/middlewares/index.js +3 -2
  50. package/lib/middlewares/metrics/getMiddlewareWrapper.js +17 -17
  51. package/lib/middlewares/metrics/index.js +29 -29
  52. package/lib/middlewares/retry/index.js +15 -15
  53. package/lib/middlewares/timeout/index.js +18 -18
  54. package/lib/middlewares/tracing/index.js +50 -37
  55. package/lib/middlewares/tracing/tags.js +43 -0
  56. package/lib/middlewares/validator/index.js +32 -32
  57. package/lib/registry/{action-endpoint.js → actionEndpoint.js} +8 -8
  58. package/lib/registry/collections/{action-collection.js → actionCollection.js} +39 -35
  59. package/lib/registry/collections/{endpoint-collection.js → endpointCollection.js} +64 -65
  60. package/lib/registry/collections/{event-collection.js → eventCollection.js} +65 -69
  61. package/lib/registry/collections/{node-collection.js → nodeCollection.js} +45 -45
  62. package/lib/registry/collections/{service-collection.js → serviceCollection.js} +61 -55
  63. package/lib/registry/eventEndpoint.js +26 -0
  64. package/lib/registry/load-balancer/base.js +3 -3
  65. package/lib/registry/load-balancer/index.js +7 -7
  66. package/lib/registry/node.js +27 -27
  67. package/lib/registry/registry.js +147 -163
  68. package/lib/registry/service/parseAction.js +16 -16
  69. package/lib/registry/service/parseEvent.js +18 -18
  70. package/lib/registry/service/reduceMixins.js +10 -10
  71. package/lib/registry/service/service.js +72 -72
  72. package/lib/registry/{service-item.js → serviceItem.js} +21 -21
  73. package/lib/runtime/{init-action-invoker.js → initActionInvoker.js} +21 -21
  74. package/lib/runtime/initCache.js +19 -0
  75. package/lib/runtime/{init-context-factory.js → initContextFactory.js} +22 -22
  76. package/lib/runtime/{init-eventbus.js → initEventbus.js} +54 -53
  77. package/lib/runtime/{init-logger.js → initLogger.js} +11 -11
  78. package/lib/runtime/{init-metrics.js → initMetrics.js} +55 -54
  79. package/lib/runtime/{init-middleware-manager.js → initMiddlewareManager.js} +21 -21
  80. package/lib/runtime/{init-registry.js → initRegistry.js} +6 -6
  81. package/lib/runtime/initServiceManager.js +145 -0
  82. package/lib/runtime/{init-tracing.js → initTracing.js} +25 -24
  83. package/lib/runtime/{init-transport.js → initTransport.js} +5 -5
  84. package/lib/runtime/{init-uuid-factory.js → initUuidFactory.js} +4 -4
  85. package/lib/runtime/{init-validator.js → initValidator.js} +5 -5
  86. package/lib/tracing/collectors/base.js +29 -37
  87. package/lib/tracing/collectors/event.js +33 -33
  88. package/lib/tracing/collectors/index.js +16 -16
  89. package/lib/tracing/span.js +34 -32
  90. package/lib/tracing/time.js +8 -8
  91. package/lib/transport/InboundTransformStream.js +75 -0
  92. package/lib/transport/adapters/adapteBase.js +107 -0
  93. package/lib/transport/adapters/adapters.js +4 -4
  94. package/lib/transport/adapters/dummy/index.js +19 -19
  95. package/lib/transport/adapters/fromURI.js +13 -13
  96. package/lib/transport/adapters/getAdapterByName.js +5 -5
  97. package/lib/transport/adapters/index.js +12 -12
  98. package/lib/transport/adapters/tcp/discovery/codec.js +4 -4
  99. package/lib/transport/adapters/tcp/discovery/index.js +90 -76
  100. package/lib/transport/adapters/tcp/index.js +180 -175
  101. package/lib/transport/adapters/tcp/tcp-messagetypes.js +7 -7
  102. package/lib/transport/adapters/tcp/tcpReader.js +39 -38
  103. package/lib/transport/adapters/tcp/tcpWriteStream.js +26 -26
  104. package/lib/transport/adapters/tcp/tcpWriter.js +58 -58
  105. package/lib/transport/adapters/tcp/utils.js +12 -12
  106. package/lib/transport/createMessage.js +11 -0
  107. package/lib/transport/createTransport.js +377 -334
  108. package/lib/transport/errorPayloadFactory.js +15 -0
  109. package/lib/transport/messageHandlers.js +517 -0
  110. package/lib/transport/messageTypes.js +23 -0
  111. package/lib/types.js +95 -71
  112. package/lib/utils/index.js +2 -2
  113. package/lib/utils/options.js +47 -45
  114. package/lib/utils/{restore-error.js → restoreError.js} +4 -4
  115. package/package.json +6 -12
  116. package/CHANGELOG.md +0 -1334
  117. package/lib/build-runtime.js +0 -70
  118. package/lib/cache/base.js +0 -142
  119. package/lib/cache/index.js +0 -48
  120. package/lib/cache/memory.js +0 -121
  121. package/lib/middlewares/tracing/buildTags.js +0 -17
  122. package/lib/new-errors.js +0 -25
  123. package/lib/registry/event-endpoint.js +0 -26
  124. package/lib/runtime/init-cache.js +0 -10
  125. package/lib/runtime/init-service-manager.js +0 -128
  126. package/lib/tracing/collectors/console.js +0 -34
  127. package/lib/tracing/index.js +0 -3
  128. package/lib/tracing/tracer.js +0 -64
  129. package/lib/transport/adapters/adapter-base.js +0 -92
  130. package/lib/transport/message-handlers.js +0 -448
  131. package/lib/transport/message-types.js +0 -59
  132. package/lib/transport/message.js +0 -16
package/CHANGELOG.md DELETED
@@ -1,1334 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [0.10.0](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.4...@weave-js/core@0.10.0) (2021-10-18)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * Event balancing ([6fa2b58](https://github.com/fachw3rk/weave/commit/6fa2b58e50a8fd471c63e5a5678831e7986b92d0))
12
- * Fixed valdiator ([777e4e8](https://github.com/fachw3rk/weave/commit/777e4e83ae6dea34f2b32adf3b29b6eeb2cae0ed))
13
-
14
-
15
- ### Features
16
-
17
- * Added metrics to cache module ([b4c3173](https://github.com/fachw3rk/weave/commit/b4c31737f631e300cabd3f8e55913341cdc9bd41))
18
-
19
-
20
-
21
-
22
-
23
- ## [0.9.4](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.3...@weave-js/core@0.9.4) (2021-09-09)
24
-
25
-
26
- ### Features
27
-
28
- * Added detection for TTY and an human-readable log output. ([9434a7b](https://github.com/fachw3rk/weave/commit/9434a7b9f5722550e20a1de073a5629f204827f9))
29
- * Implemented better human readable log output ([72d0faa](https://github.com/fachw3rk/weave/commit/72d0faa744b0e407502d90320bfc81af9e0ae866))
30
-
31
-
32
-
33
-
34
-
35
- ## [0.9.3](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.2...@weave-js/core@0.9.3) (2021-08-30)
36
-
37
-
38
- ### Bug Fixes
39
-
40
- * Fixed log message for remote events ([32b8666](https://github.com/fachw3rk/weave/commit/32b8666f09936f0c687f95a57b7b20a4c24f544d))
41
- * removed unnecessary module import ([5febbe7](https://github.com/fachw3rk/weave/commit/5febbe7567f9b8b1f2c2c1d23eaa2e1d93a35cb8))
42
-
43
-
44
-
45
-
46
-
47
- ## [0.9.2](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.1...@weave-js/core@0.9.2) (2021-08-18)
48
-
49
-
50
- ### Bug Fixes
51
-
52
- * Fixed @weave-js/utils references ([69f2d90](https://github.com/fachw3rk/weave/commit/69f2d9010210782e42b0f168f9ac88e3d40c3150))
53
-
54
-
55
-
56
-
57
-
58
- ## [0.9.1](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0...@weave-js/core@0.9.1) (2021-08-17)
59
-
60
-
61
- ### Bug Fixes
62
-
63
- * Fixed wrong gossip message constants. ([ad7ca04](https://github.com/fachw3rk/weave/commit/ad7ca04a131a7facb10cfa5a9473f167087fd894))
64
-
65
-
66
- ### Features
67
-
68
- * **core:** The possibility to validate responses via a "responseSchema" implemented in validator middleware. ([3387fe1](https://github.com/fachw3rk/weave/commit/3387fe1e9616c4ee882b7c863b53912851fd7a1b))
69
-
70
-
71
-
72
-
73
-
74
- # [0.9.0](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.13...@weave-js/core@0.9.0) (2021-08-02)
75
-
76
-
77
- ### Bug Fixes
78
-
79
- * unit test ([d76bad7](https://github.com/fachw3rk/weave/commit/d76bad7b9a723c45c9e92951dd9aa88b976ec56e))
80
- * **logger:** Fixed wrong service name in log object ([56bed33](https://github.com/fachw3rk/weave/commit/56bed335d7470d118e878428744a244934fcfd81))
81
-
82
-
83
-
84
-
85
-
86
- # [0.9.0-beta.13](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.12...@weave-js/core@0.9.0-beta.13) (2021-07-26)
87
-
88
-
89
- ### Bug Fixes
90
-
91
- * Added missing event name in Event parameter validation error message ([33c8365](https://github.com/fachw3rk/weave/commit/33c83659151f0926cdc02cbeb3aaf90dca819622))
92
- * Fixed context tracking ([cda3a17](https://github.com/fachw3rk/weave/commit/cda3a171029f26fb059cf9eab8fdb95835282750))
93
- * Fixed service reference for error message ([62daab6](https://github.com/fachw3rk/weave/commit/62daab6bcfa9f8bc053aa87a103c9570a9f67742))
94
- * Fixed unit tests (new Jest version) ([6db1d40](https://github.com/fachw3rk/weave/commit/6db1d407dc0b39717d9d6cb884b0d6600144326a))
95
-
96
-
97
- ### Features
98
-
99
- * **logger:** Added destination stream property to options. ([1c7531c](https://github.com/fachw3rk/weave/commit/1c7531c282487a1951b848f04c01495e023bb035))
100
-
101
-
102
-
103
-
104
-
105
- # [0.9.0-beta.12](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.11...@weave-js/core@0.9.0-beta.12) (2021-06-28)
106
-
107
-
108
- ### Bug Fixes
109
-
110
- * **core:** Fixes streaming unit test ([c39672b](https://github.com/fachw3rk/weave/commit/c39672be24e89d9af4df5c0c0cc59ea6a51fe2e6))
111
-
112
-
113
- ### Features
114
-
115
- * **weave-core:** Added support for validator strict mode. ([8412c07](https://github.com/fachw3rk/weave/commit/8412c07df90014b15663c1effdbdcf2bd1a9fb49))
116
-
117
-
118
-
119
-
120
-
121
- # [0.9.0-beta.11](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.10...@weave-js/core@0.9.0-beta.11) (2021-05-31)
122
-
123
-
124
- ### Bug Fixes
125
-
126
- * Removed buggy context assignment for lifecycle hooks ([b471408](https://github.com/fachw3rk/weave/commit/b471408c481752b02da26d225119f8e18e89880d))
127
-
128
-
129
-
130
-
131
-
132
- # [0.9.0-beta.10](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.9...@weave-js/core@0.9.0-beta.10) (2021-05-30)
133
-
134
-
135
- ### Bug Fixes
136
-
137
- * Fixed log action names if the actionName param refers to an endpoint. ([3100b42](https://github.com/fachw3rk/weave/commit/3100b427b126cd826b6f7fd0a25208bc4ceba255))
138
-
139
-
140
-
141
-
142
-
143
- # [0.9.0-beta.9](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.8...@weave-js/core@0.9.0-beta.9) (2021-05-27)
144
-
145
-
146
- ### Bug Fixes
147
-
148
- * Fixed context tracker ([ab2869e](https://github.com/fachw3rk/weave/commit/ab2869e98f5459256faafa7955e5b817a611639e))
149
- * fixed unrefed timers ([04fe50b](https://github.com/fachw3rk/weave/commit/04fe50b2e88e863f6783b4804ce4cfb74f910e3c))
150
-
151
-
152
- ### Features
153
-
154
- * **metrics:** Added time measurement tool ([245d272](https://github.com/fachw3rk/weave/commit/245d272aa300f926df44088233ea10379008e055))
155
- * Added validator for events ([da5044e](https://github.com/fachw3rk/weave/commit/da5044ef5acbe3bd4a9984e98e0d2caa00cb0f26))
156
- * **core:** Added afterSchemasMerged service lifetime hook ([0f8a19a](https://github.com/fachw3rk/weave/commit/0f8a19ac592786b54621eb52486405efbcb6c126))
157
- * **core:** Added stoping sequence to metric adapters ([cf7b657](https://github.com/fachw3rk/weave/commit/cf7b6573f93c8d3cdaa128fbc3eaf9962d529725))
158
- * **core:** Refactoring metrics ([edf2a62](https://github.com/fachw3rk/weave/commit/edf2a62a46417a3221949519fb46c28b070f327b))
159
- * Refactoring ([b79ca4f](https://github.com/fachw3rk/weave/commit/b79ca4fe4a07bd4c1cdf433f514d89f028fd8d9d))
160
-
161
-
162
-
163
-
164
-
165
- # [0.9.0-beta.8](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.7...@weave-js/core@0.9.0-beta.8) (2021-04-29)
166
-
167
- **Note:** Version bump only for package @weave-js/core
168
-
169
-
170
-
171
-
172
-
173
- # [0.9.0-beta.7](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.6...@weave-js/core@0.9.0-beta.7) (2021-04-28)
174
-
175
- **Note:** Version bump only for package @weave-js/core
176
-
177
-
178
-
179
-
180
-
181
- # [0.9.0-beta.6](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.5...@weave-js/core@0.9.0-beta.6) (2021-04-23)
182
-
183
- **Note:** Version bump only for package @weave-js/core
184
-
185
-
186
-
187
-
188
-
189
- # [0.9.0-beta.5](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.4...@weave-js/core@0.9.0-beta.5) (2021-04-22)
190
-
191
- **Note:** Version bump only for package @weave-js/core
192
-
193
-
194
-
195
-
196
-
197
- # [0.9.0-beta.4](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.3...@weave-js/core@0.9.0-beta.4) (2021-04-17)
198
-
199
- **Note:** Version bump only for package @weave-js/core
200
-
201
-
202
-
203
-
204
-
205
- # [0.9.0-beta.3](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.2...@weave-js/core@0.9.0-beta.3) (2021-04-13)
206
-
207
- **Note:** Version bump only for package @weave-js/core
208
-
209
-
210
-
211
-
212
-
213
- # [0.9.0-beta.2](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.1...@weave-js/core@0.9.0-beta.2) (2021-04-12)
214
-
215
- **Note:** Version bump only for package @weave-js/core
216
-
217
-
218
-
219
-
220
-
221
- # [0.9.0-beta.1](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.9.0-beta.0...@weave-js/core@0.9.0-beta.1) (2021-04-12)
222
-
223
- **Note:** Version bump only for package @weave-js/core
224
-
225
-
226
-
227
-
228
-
229
- # [0.9.0-beta.0](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.8.1...@weave-js/core@0.9.0-beta.0) (2021-04-12)
230
-
231
- **Note:** Version bump only for package @weave-js/core
232
-
233
-
234
-
235
-
236
-
237
- ## [0.8.1](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.8.0...@weave-js/core@0.8.1) (2021-01-18)
238
-
239
- **Note:** Version bump only for package @weave-js/core
240
-
241
-
242
-
243
-
244
-
245
- # [0.8.0](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.8.0-alpha.7...@weave-js/core@0.8.0) (2021-01-05)
246
-
247
-
248
- ### Features
249
-
250
- * implement a max chung size for stream chunks ([d898184](https://github.com/fachw3rk/weave/commit/d89818415c94b3ee71c37358647bb3a10c65c094))
251
-
252
-
253
-
254
-
255
-
256
- # [0.8.0-alpha.7](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.8.0-alpha.6...@weave-js/core@0.8.0-alpha.7) (2020-11-09)
257
-
258
-
259
- ### Features
260
-
261
- * Added custom UUID generator function in Options ([2aed695](https://github.com/fachw3rk/weave/commit/2aed695a0075d0a445b500393243f1fea9633e0f))
262
-
263
-
264
-
265
-
266
-
267
- # [0.8.0-alpha.6](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.8.0-alpha.5...@weave-js/core@0.8.0-alpha.6) (2020-10-01)
268
-
269
- **Note:** Version bump only for package @weave-js/core
270
-
271
-
272
-
273
-
274
-
275
- # [0.8.0-alpha.5](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.8.0-alpha.4...@weave-js/core@0.8.0-alpha.5) (2020-10-01)
276
-
277
-
278
- ### Bug Fixes
279
-
280
- * fixed unit test ([d58900c](https://github.com/fachw3rk/weave/commit/d58900c7ec74a4c5681d255caa07b02af68d66cb))
281
-
282
-
283
-
284
-
285
-
286
- # [0.8.0-alpha.4](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.8.0-alpha.3...@weave-js/core@0.8.0-alpha.4) (2020-09-07)
287
-
288
- **Note:** Version bump only for package @weave-js/core
289
-
290
-
291
-
292
-
293
-
294
- # [0.8.0-alpha.3](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.8.0-alpha.2...@weave-js/core@0.8.0-alpha.3) (2020-09-02)
295
-
296
- **Note:** Version bump only for package @weave-js/core
297
-
298
-
299
-
300
-
301
-
302
- # [0.8.0-alpha.2](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.8.0-alpha.1...@weave-js/core@0.8.0-alpha.2) (2020-09-02)
303
-
304
- **Note:** Version bump only for package @weave-js/core
305
-
306
-
307
-
308
-
309
-
310
- # [0.8.0-alpha.1](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.25...@weave-js/core@0.8.0-alpha.1) (2020-09-02)
311
-
312
- **Note:** Version bump only for package @weave-js/core
313
-
314
-
315
-
316
-
317
-
318
- # [0.7.0-rc.25](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.24...@weave-js/core@0.7.0-rc.25) (2020-07-27)
319
-
320
-
321
- ### Bug Fixes
322
-
323
- * Option merging for mixins ([c76996f](https://github.com/fachw3rk/weave/commit/c76996f4cced0fb27e8aaa29d5bedbb569ce90e5))
324
-
325
-
326
-
327
-
328
-
329
- # [0.7.0-rc.24](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.23...@weave-js/core@0.7.0-rc.24) (2020-07-27)
330
-
331
-
332
- ### Bug Fixes
333
-
334
- * Fixed merging of action hooks if the target does not exist. ([9be8f28](https://github.com/fachw3rk/weave/commit/9be8f289be3ab3e93afb0bac5cc2ec317fa1d80e))
335
-
336
-
337
-
338
-
339
-
340
- # [0.7.0-rc.23](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.22...@weave-js/core@0.7.0-rc.23) (2020-06-13)
341
-
342
-
343
- ### Bug Fixes
344
-
345
- * Added missing mixin schema merge ([6b16470](https://github.com/fachw3rk/weave/commit/6b1647038bdc0094ae995c0aea70468b075b80db))
346
-
347
-
348
- ### Features
349
-
350
- * Added support for object streams ([6b174dd](https://github.com/fachw3rk/weave/commit/6b174ddd6dd66969c79f8ce9d2fa09f9fdfd55d1))
351
-
352
-
353
-
354
-
355
-
356
- # [0.7.0-rc.22](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.21...@weave-js/core@0.7.0-rc.22) (2020-06-11)
357
-
358
-
359
- ### Bug Fixes
360
-
361
- * Config merge from file ([edfdc86](https://github.com/fachw3rk/weave/commit/edfdc86a86dc96582622d15a3c914c7f2c266e41))
362
-
363
-
364
-
365
-
366
-
367
- # [0.7.0-rc.21](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.20...@weave-js/core@0.7.0-rc.21) (2020-06-09)
368
-
369
- **Note:** Version bump only for package @weave-js/core
370
-
371
-
372
-
373
-
374
-
375
- # [0.7.0-rc.20](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.19...@weave-js/core@0.7.0-rc.20) (2020-06-09)
376
-
377
- **Note:** Version bump only for package @weave-js/core
378
-
379
-
380
-
381
-
382
-
383
- # [0.7.0-rc.19](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.18...@weave-js/core@0.7.0-rc.19) (2020-04-28)
384
-
385
- **Note:** Version bump only for package @weave-js/core
386
-
387
-
388
-
389
-
390
-
391
- # [0.7.0-rc.18](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.17...@weave-js/core@0.7.0-rc.18) (2020-04-28)
392
-
393
- **Note:** Version bump only for package @weave-js/core
394
-
395
-
396
-
397
-
398
-
399
- # [0.7.0-rc.17](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.16...@weave-js/core@0.7.0-rc.17) (2020-04-28)
400
-
401
-
402
- ### Bug Fixes
403
-
404
- * linting ([a592f35](https://github.com/fachw3rk/weave/commit/a592f35524d934b61841655bb0fc794b3bf46b99))
405
-
406
-
407
-
408
-
409
-
410
- # [0.7.0-rc.16](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.15...@weave-js/core@0.7.0-rc.16) (2020-02-25)
411
-
412
- **Note:** Version bump only for package @weave-js/core
413
-
414
-
415
-
416
-
417
-
418
- # [0.7.0-rc.15](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.14...@weave-js/core@0.7.0-rc.15) (2020-02-25)
419
-
420
-
421
- ### Features
422
-
423
- * Added sequence number to streams for upcoming changes ([4252a94](https://github.com/fachw3rk/weave/commit/4252a9437173b5f002682c6e8de640d49442f0ea))
424
-
425
-
426
-
427
-
428
-
429
- # [0.7.0-rc.14](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.13...@weave-js/core@0.7.0-rc.14) (2020-01-22)
430
-
431
-
432
- ### Bug Fixes
433
-
434
- * Another fix for meta data ([243c716](https://github.com/fachw3rk/weave/commit/243c7169b7c0d54eaffa4715a5784ebabf175cfc))
435
-
436
-
437
-
438
-
439
-
440
- # [0.7.0-rc.13](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.12...@weave-js/core@0.7.0-rc.13) (2020-01-22)
441
-
442
-
443
- ### Bug Fixes
444
-
445
- * Pass meta data through response ([558752a](https://github.com/fachw3rk/weave/commit/558752ad547285bcc31c8a0256d9a9dc4bc6d413))
446
-
447
-
448
-
449
-
450
-
451
- # [0.7.0-rc.12](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.11...@weave-js/core@0.7.0-rc.12) (2020-01-22)
452
-
453
-
454
- ### Bug Fixes
455
-
456
- * Pass meta data through response ([80fb3d7](https://github.com/fachw3rk/weave/commit/80fb3d729342dfabe60ae23ec856cbd9c959b985))
457
-
458
-
459
-
460
-
461
-
462
- # [0.7.0-rc.11](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.10...@weave-js/core@0.7.0-rc.11) (2020-01-22)
463
-
464
-
465
- ### Bug Fixes
466
-
467
- * Fatal error if a stream throws an error. ([7c6c847](https://github.com/fachw3rk/weave/commit/7c6c8470f01765c27f8fce46271df5b3e71a6c7f))
468
-
469
-
470
-
471
-
472
-
473
- # [0.7.0-rc.10](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.9...@weave-js/core@0.7.0-rc.10) (2020-01-12)
474
-
475
-
476
- ### Bug Fixes
477
-
478
- * Changed service init order. ([7b09831](https://github.com/fachw3rk/weave/commit/7b09831c8ef610351ece339dbb327a0a8b211713))
479
-
480
-
481
-
482
-
483
-
484
- # [0.7.0-rc.9](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.8...@weave-js/core@0.7.0-rc.9) (2019-12-21)
485
-
486
-
487
- ### Bug Fixes
488
-
489
- * Node list ([7169b20](https://github.com/fachw3rk/weave/commit/7169b202ae502ea0de8037ae16ffdceca02896ce))
490
- * Removed raw information from node list ([fd9bad1](https://github.com/fachw3rk/weave/commit/fd9bad1a6758560d13ac2053fcc832424737eaa2))
491
-
492
-
493
- ### Features
494
-
495
- * Added support for transport connection strings. ([c3473ba](https://github.com/fachw3rk/weave/commit/c3473baa4f40f72f6e196e6615f09a9971fc4cf5))
496
- * Connection string support added. ([fbd2654](https://github.com/fachw3rk/weave/commit/fbd26546cc333510594b29ec13547e519a968c7c))
497
- * getServiceList short hand method ([cb59016](https://github.com/fachw3rk/weave/commit/cb59016ae9e7040b5c6e077fac019a8e915958da))
498
-
499
-
500
-
501
-
502
-
503
- # [0.7.0-rc.8](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.7...@weave-js/core@0.7.0-rc.8) (2019-11-27)
504
-
505
-
506
- ### Bug Fixes
507
-
508
- * Fixed blocking waitForService method on broker stop ([1c5178e](https://github.com/fachw3rk/weave/commit/1c5178eb70fb8a86c1f8715fb06add2148defb06))
509
- * Fixed object logs ([0f05dbe](https://github.com/fachw3rk/weave/commit/0f05dbe3b19c2c6ce4223b695f3c139aece75c25))
510
- * Remove circular references from remote nodes ([14ae7a8](https://github.com/fachw3rk/weave/commit/14ae7a8499d175a2221854ffd9f47124158fb157))
511
-
512
-
513
-
514
-
515
-
516
- # [0.7.0-rc.7](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.1...@weave-js/core@0.7.0-rc.7) (2019-11-06)
517
-
518
-
519
- ### Bug Fixes
520
-
521
- * Added missing dependency ([602aafb](https://github.com/fachw3rk/weave/commit/602aafb1dcbaf55dc37d5a49e7b56edcbe20aaee))
522
-
523
-
524
-
525
-
526
-
527
- # [0.7.0-rc.2](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.1...@weave-js/core@0.7.0-rc.2) (2019-11-06)
528
-
529
-
530
- ### Bug Fixes
531
-
532
- * Added missing dependency ([602aafb](https://github.com/fachw3rk/weave/commit/602aafb1dcbaf55dc37d5a49e7b56edcbe20aaee))
533
-
534
-
535
-
536
-
537
-
538
- # [0.7.0-rc.3](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.1...@weave-js/core@0.7.0-rc.3) (2019-11-06)
539
-
540
-
541
- ### Bug Fixes
542
-
543
- * Added missing dependency ([602aafb](https://github.com/fachw3rk/weave/commit/602aafb1dcbaf55dc37d5a49e7b56edcbe20aaee))
544
-
545
-
546
-
547
-
548
-
549
- # [0.7.0-rc.2](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.1...@weave-js/core@0.7.0-rc.2) (2019-11-06)
550
-
551
-
552
- ### Bug Fixes
553
-
554
- * Added missing dependency ([602aafb](https://github.com/fachw3rk/weave/commit/602aafb1dcbaf55dc37d5a49e7b56edcbe20aaee))
555
-
556
-
557
-
558
-
559
-
560
- # [0.7.0-rc.1](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.0...@weave-js/core@0.7.0-rc.1) (2019-11-06)
561
-
562
- **Note:** Version bump only for package @weave-js/core
563
-
564
-
565
-
566
-
567
-
568
- # [0.7.0-rc.0](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-alpha.20...@weave-js/core@0.7.0-rc.0) (2019-11-06)
569
-
570
-
571
- ### Bug Fixes
572
-
573
- * Fixed direct call with node ID ([8cfc1cb](https://github.com/fachw3rk/weave/commit/8cfc1cb2ff1d16367d93c292fcd43688368f5867))
574
- * Fixed silent argument fpr weave runner ([1173e9e](https://github.com/fachw3rk/weave/commit/1173e9e55aa24a679dc552eac69d0fdbda1beb9c))
575
- * Memory leak ([c255ab2](https://github.com/fachw3rk/weave/commit/c255ab2322197b6c84009e73a5d5dbe6de7463bb))
576
- * Throw an error if service creation fails ([b9f01f0](https://github.com/fachw3rk/weave/commit/b9f01f03bddab1c2ba83154a5866f4e0096774fd))
577
-
578
-
579
-
580
-
581
-
582
- # [0.7.0-alpha.20](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-alpha.19...@weave-js/core@0.7.0-alpha.20) (2019-10-03)
583
-
584
-
585
- ### Bug Fixes
586
-
587
- * made ioredis package optional for redis cache ([004c02f](https://github.com/fachw3rk/weave/commit/004c02f))
588
-
589
-
590
-
591
-
592
-
593
- # [0.7.0-alpha.19](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.6...@weave-js/core@0.7.0-alpha.19) (2019-10-02)
594
-
595
-
596
- ### Bug Fixes
597
-
598
- * Changed order of mixin merge ([40ac322](https://github.com/fachw3rk/weave/commit/40ac322))
599
- * Improved logger performance. ([0be7543](https://github.com/fachw3rk/weave/commit/0be7543))
600
- * level of trace ([84713da](https://github.com/fachw3rk/weave/commit/84713da))
601
- * Service settings for remote services are now stored correctly ([c230f03](https://github.com/fachw3rk/weave/commit/c230f03))
602
-
603
-
604
- ### Features
605
-
606
- * Added "ping" function to broker ([e43ffed](https://github.com/fachw3rk/weave/commit/e43ffed))
607
- * Added raw messages to done hook ([ad94e2f](https://github.com/fachw3rk/weave/commit/ad94e2f))
608
-
609
-
610
-
611
-
612
-
613
- # [0.7.0-rc.6](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.5...@weave-js/core@0.7.0-rc.6) (2019-03-28)
614
-
615
-
616
- ### Bug Fixes
617
-
618
- * Method "getNextActionEndpoint" now returns an error if no service is available ([63771b8](https://github.com/fachw3rk/weave/commit/63771b8))
619
-
620
-
621
-
622
-
623
-
624
- # [0.7.0-rc.5](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.4...@weave-js/core@0.7.0-rc.5) (2019-03-22)
625
-
626
-
627
- ### Bug Fixes
628
-
629
- * Added missing jsdoc schema for weave options ([78d590f](https://github.com/fachw3rk/weave/commit/78d590f))
630
-
631
-
632
- ### Features
633
-
634
- * Maximum offline time editable ([9528c17](https://github.com/fachw3rk/weave/commit/9528c17))
635
-
636
-
637
-
638
-
639
-
640
- # [0.7.0-rc.4](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.3...@weave-js/core@0.7.0-rc.4) (2019-03-11)
641
-
642
- **Note:** Version bump only for package @weave-js/core
643
-
644
-
645
-
646
-
647
-
648
- # [0.7.0-rc.3](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.7.0-rc.2...@weave-js/core@0.7.0-rc.3) (2019-03-11)
649
-
650
- **Note:** Version bump only for package @weave-js/core
651
-
652
-
653
-
654
-
655
-
656
- # [0.7.0-rc.2](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.6.2...@weave-js/core@0.7.0-rc.2) (2019-03-11)
657
-
658
-
659
- ### Features
660
-
661
- * Added the new method "multiCall" to call multiple service actions at once ([d28b969](https://github.com/fachw3rk/weave/commit/d28b969))
662
-
663
-
664
-
665
-
666
-
667
- ## [0.6.2](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.6.1...@weave-js/core@0.6.2) (2019-03-07)
668
-
669
- **Note:** Version bump only for package @weave-js/core
670
-
671
-
672
-
673
-
674
-
675
- ## [0.6.1](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.6.0...@weave-js/core@0.6.1) (2019-02-09)
676
-
677
-
678
- ### Bug Fixes
679
-
680
- * Service loader ([8669596](https://github.com/fachw3rk/weave/commit/8669596))
681
-
682
-
683
-
684
-
685
-
686
- # [0.6.0](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.33...@weave-js/core@0.6.0) (2019-02-08)
687
-
688
-
689
- ### Features
690
-
691
- * Implemented hooks by method name ([bf56291](https://github.com/fachw3rk/weave/commit/bf56291))
692
-
693
-
694
-
695
-
696
-
697
- ## [0.5.33](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.32...@weave-js/core@0.5.33) (2019-01-15)
698
-
699
- **Note:** Version bump only for package @weave-js/core
700
-
701
-
702
-
703
-
704
-
705
- ## [0.5.32](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.31...@weave-js/core@0.5.32) (2018-12-19)
706
-
707
- **Note:** Version bump only for package @weave-js/core
708
-
709
-
710
-
711
-
712
-
713
- ## [0.5.31](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.30...@weave-js/core@0.5.31) (2018-12-18)
714
-
715
- **Note:** Version bump only for package @weave-js/core
716
-
717
-
718
-
719
-
720
-
721
- ## [0.5.30](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.29...@weave-js/core@0.5.30) (2018-12-15)
722
-
723
- **Note:** Version bump only for package @weave-js/core
724
-
725
-
726
-
727
-
728
-
729
- ## [0.5.29](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.28...@weave-js/core@0.5.29) (2018-12-15)
730
-
731
- **Note:** Version bump only for package @weave-js/core
732
-
733
-
734
-
735
-
736
-
737
- ## [0.5.28](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.27...@weave-js/core@0.5.28) (2018-12-15)
738
-
739
- **Note:** Version bump only for package @weave-js/core
740
-
741
-
742
-
743
-
744
-
745
- ## [0.5.27](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.26...@weave-js/core@0.5.27) (2018-12-13)
746
-
747
- **Note:** Version bump only for package @weave-js/core
748
-
749
-
750
-
751
-
752
-
753
- ## [0.5.26](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.25...@weave-js/core@0.5.26) (2018-12-11)
754
-
755
- **Note:** Version bump only for package @weave-js/core
756
-
757
-
758
-
759
-
760
-
761
- ## [0.5.25](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.24...@weave-js/core@0.5.25) (2018-12-11)
762
-
763
- **Note:** Version bump only for package @weave-js/core
764
-
765
-
766
-
767
-
768
-
769
- ## [0.5.24](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.23...@weave-js/core@0.5.24) (2018-12-10)
770
-
771
- **Note:** Version bump only for package @weave-js/core
772
-
773
-
774
-
775
-
776
-
777
- ## [0.5.23](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.22...@weave-js/core@0.5.23) (2018-12-08)
778
-
779
- **Note:** Version bump only for package @weave-js/core
780
-
781
-
782
-
783
-
784
-
785
- ## [0.5.22](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.21...@weave-js/core@0.5.22) (2018-11-30)
786
-
787
- **Note:** Version bump only for package @weave-js/core
788
-
789
-
790
-
791
-
792
-
793
- ## [0.5.21](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.20...@weave-js/core@0.5.21) (2018-11-28)
794
-
795
- **Note:** Version bump only for package @weave-js/core
796
-
797
-
798
-
799
-
800
-
801
- ## [0.5.20](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.19...@weave-js/core@0.5.20) (2018-11-28)
802
-
803
- **Note:** Version bump only for package @weave-js/core
804
-
805
-
806
-
807
-
808
-
809
- ## [0.5.19](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.18...@weave-js/core@0.5.19) (2018-11-26)
810
-
811
- **Note:** Version bump only for package @weave-js/core
812
-
813
-
814
-
815
-
816
-
817
- ## [0.5.18](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.17...@weave-js/core@0.5.18) (2018-11-01)
818
-
819
- **Note:** Version bump only for package @weave-js/core
820
-
821
-
822
-
823
-
824
-
825
- ## [0.5.17](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.16...@weave-js/core@0.5.17) (2018-10-29)
826
-
827
- **Note:** Version bump only for package @weave-js/core
828
-
829
-
830
-
831
-
832
-
833
- ## [0.5.16](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.15...@weave-js/core@0.5.16) (2018-10-28)
834
-
835
- **Note:** Version bump only for package @weave-js/core
836
-
837
-
838
-
839
-
840
-
841
- ## [0.5.15](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.14...@weave-js/core@0.5.15) (2018-10-28)
842
-
843
- **Note:** Version bump only for package @weave-js/core
844
-
845
-
846
-
847
-
848
-
849
- ## [0.5.14](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.13...@weave-js/core@0.5.14) (2018-10-23)
850
-
851
- **Note:** Version bump only for package @weave-js/core
852
-
853
-
854
-
855
-
856
-
857
- ## [0.5.13](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.12...@weave-js/core@0.5.13) (2018-10-23)
858
-
859
- **Note:** Version bump only for package @weave-js/core
860
-
861
-
862
-
863
-
864
-
865
- ## [0.5.12](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.11...@weave-js/core@0.5.12) (2018-10-23)
866
-
867
- **Note:** Version bump only for package @weave-js/core
868
-
869
-
870
-
871
-
872
-
873
- ## [0.5.11](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.10...@weave-js/core@0.5.11) (2018-10-21)
874
-
875
- **Note:** Version bump only for package @weave-js/core
876
-
877
-
878
-
879
-
880
-
881
- ## [0.5.10](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.9...@weave-js/core@0.5.10) (2018-10-21)
882
-
883
- **Note:** Version bump only for package @weave-js/core
884
-
885
-
886
-
887
-
888
-
889
- <a name="0.5.9"></a>
890
- ## [0.5.9](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.8...@weave-js/core@0.5.9) (2018-10-21)
891
-
892
- **Note:** Version bump only for package @weave-js/core
893
-
894
-
895
-
896
-
897
-
898
- <a name="0.5.7"></a>
899
- ## [0.5.7](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.6...@weave-js/core@0.5.7) (2018-10-02)
900
-
901
- **Note:** Version bump only for package @weave-js/core
902
-
903
-
904
-
905
-
906
-
907
- <a name="0.5.6"></a>
908
- ## [0.5.6](https://github.com/fachw3rk/weave/compare/@weave-js/core@0.5.5...@weave-js/core@0.5.6) (2018-09-18)
909
-
910
- **Note:** Version bump only for package @weave-js/core
911
-
912
-
913
-
914
-
915
-
916
- <a name="0.5.5"></a>
917
- ## 0.5.5 (2018-09-18)
918
-
919
- **Note:** Version bump only for package @weave-js/core
920
-
921
-
922
-
923
-
924
-
925
- <a name="0.5.4"></a>
926
- ## 0.5.4 (2018-09-18)
927
-
928
- **Note:** Version bump only for package @weave-js/core
929
-
930
-
931
-
932
-
933
-
934
- <a name="0.5.3"></a>
935
- ## 0.5.3 (2018-09-18)
936
-
937
- **Note:** Version bump only for package @weave-js/core
938
-
939
-
940
-
941
-
942
-
943
- <a name="0.5.2"></a>
944
- ## 0.5.2 (2018-09-18)
945
-
946
- **Note:** Version bump only for package @weave-js/core
947
-
948
-
949
-
950
-
951
-
952
- <a name="0.5.1"></a>
953
- ## 0.5.1 (2018-09-18)
954
-
955
- **Note:** Version bump only for package @weave-js/core
956
-
957
-
958
-
959
-
960
-
961
- <a name="0.5.0"></a>
962
- # 0.5.0 (2018-09-18)
963
-
964
- **Note:** Version bump only for package @weave-js/core
965
-
966
-
967
-
968
-
969
-
970
- <a name="0.5.0"></a>
971
- # 0.5.0 (2018-09-17)
972
-
973
- **Note:** Version bump only for package @weave/@weave-js/core
974
-
975
-
976
-
977
-
978
-
979
- <a name="0.5.0"></a>
980
- # [0.5.0]() (2018-09-05)
981
-
982
- # Breaking Changes
983
-
984
- Changed the interface of the module. The weave factory method is now provided as a property of the module.
985
-
986
- ```js
987
- const { Weave, Errors, TransportAdapters, Constants } = require('@weave-js/core')
988
-
989
- const broker = Weave({
990
- nodeId: 'node-1',
991
- transport: TransportAdapters.Fake()
992
- })
993
- ```
994
-
995
- # New
996
-
997
-
998
- ## Service watcher
999
-
1000
- Weave now supports hot reload of services. When weave detects a change in a service file, it stops the service, removes it from internal and external registries and restarts the service with the changes without stopping the node.
1001
-
1002
- ```js
1003
- const broker = Weave({
1004
- nodeId: 'node-1',
1005
- watchServices: true
1006
- })
1007
- ```
1008
-
1009
- ### weave runner example
1010
-
1011
- ```bash
1012
- weave-runner services -W
1013
- ```
1014
-
1015
- ## Support for streams
1016
-
1017
- Streaming support has been implemented. Node.js streams can be transferred as params or as response. You can use it to transfer uploaded file from a gateway or encode/decode or compress/decompress streams.
1018
-
1019
- ### Send file example
1020
-
1021
- ```js
1022
- const fileStream = fs.createReadStream(fileName)
1023
-
1024
- broker.call('storage.save', stream, { meta: { filename }})
1025
- ```
1026
-
1027
- ### Receive file example
1028
-
1029
- ```js
1030
- const fileStream = fs.createWriteStream(fileName);
1031
-
1032
- broker.createService({
1033
- name: 'storage',
1034
- actions: {
1035
- save (context) {
1036
- const fileStream = fs.createWriteStream(`/temp/${context.meta.filename}`)
1037
- context.data.pipe(fileStream)
1038
- }
1039
- }
1040
- })
1041
- ```
1042
-
1043
- ### Recturn stream example
1044
-
1045
- ```js
1046
- const fileStream = fs.createWriteStream(fileName);
1047
-
1048
- broker.createService({
1049
- name: 'storage',
1050
- params: {
1051
- filename: { type: 'string' }
1052
- }
1053
- actions: {
1054
- save (context) {
1055
- return fs.createReadStream(context.data.filename)
1056
- }
1057
- }
1058
- })
1059
- ```
1060
-
1061
- ## New beforeCreate hook for services
1062
-
1063
- Added a new hook to intercept before service is created.
1064
-
1065
- ```js
1066
- module.exports = {
1067
- name: 'math',
1068
- actions: {
1069
- ...
1070
- },
1071
- beforeCreate () {
1072
- this.actions.newAction = {
1073
- params: {...},
1074
- handler (context) {...}
1075
- }
1076
- }
1077
- }
1078
- ```
1079
- # Changes
1080
- ## Changed Log level for heartbeat
1081
-
1082
- The broker heartbeat is now only displayed at log level "trace".
1083
-
1084
-
1085
- <a name="0.4.0"></a>
1086
- # [0.4.0]() (2018-07-27)
1087
-
1088
- # New
1089
- ## Enhanced Middlewares
1090
-
1091
- Middlewares are now on state of the art. You cann use a more detailed hook system to add features to your middlewares.
1092
-
1093
- ## New beforeCreate hook for services
1094
-
1095
- Added a new hook to intercept before service is created.
1096
-
1097
- ```js
1098
- module.exports = {
1099
- name: 'math',
1100
- actions: {
1101
- ...
1102
- },
1103
- beforeCreate () {
1104
- this.actions.newAction = {
1105
- params: {...},
1106
- handler (context) {...}
1107
- }
1108
- }
1109
- }
1110
- ```
1111
-
1112
- <a name="0.3.0"></a>
1113
- # [0.3.0]() (2018-05-11)
1114
-
1115
- # New
1116
- ## NATS transporter
1117
-
1118
- New Transporter for NATS.
1119
-
1120
- ## New beforeCreate hook for services
1121
-
1122
- Added a new hook to intercept before service is created.
1123
-
1124
- ```js
1125
- module.exports = {
1126
- name: 'math',
1127
- actions: {
1128
- ...
1129
- },
1130
- beforeCreate () {
1131
- this.actions.newAction = {
1132
- params: {...},
1133
- handler (context) {...}
1134
- }
1135
- }
1136
- }
1137
- ```
1138
-
1139
-
1140
- ## Reconnect lost nodes
1141
- If a node1 get heartbeats from a actually disconnected node2. Node1 will send a discovery request to get the current infos from node2 and reconnect it.
1142
-
1143
- # Fixed
1144
-
1145
- ## Cleanup for TCP Transporter
1146
-
1147
- Old TCP-Mesh module removed.
1148
-
1149
- --------------------------------------------------
1150
- <a name="0.2.19"></a>
1151
- # [0.2.19]() (2018-02-05)
1152
-
1153
- # New
1154
-
1155
- ## Reconnect lost nodes
1156
- If a node1 get heartbeats from a actually disconnected node2. Node1 will send a discovery request to get the current infos from node2 and reconnect it.
1157
-
1158
- # Fixed
1159
-
1160
- ## Cleanup for TCP Transporter
1161
-
1162
- Old TCP-Mesh module removed.
1163
-
1164
- --------------------------------------------------
1165
- <a name="0.2.18"></a>
1166
- # [0.2.19]() (2018-02-05)
1167
-
1168
- # New
1169
-
1170
- # Fixed
1171
-
1172
- Fixed metrics finish method.
1173
-
1174
- --------------------------------------------------
1175
-
1176
- <a name="0.2.18"></a>
1177
- # [0.2.18]() (2018-02-05)
1178
-
1179
- # New
1180
-
1181
- # Fixed
1182
-
1183
- Fixed metrics for action calls.
1184
-
1185
- --------------------------------------------------
1186
- <a name="0.2.17"></a>
1187
- # [0.2.17]() (2018-01-28)
1188
-
1189
- # New
1190
-
1191
- ## Add new service setting for private services.
1192
-
1193
- If you set the property $private to true, the service is only reachable from the local node.
1194
-
1195
- ```js
1196
- module.exports = {
1197
- name: 'math',
1198
- mixins: [TestMixin],
1199
- settings: {
1200
- $private: true
1201
- },
1202
- actions: {
1203
- add: {
1204
- params: {
1205
- a: { type: 'number' },
1206
- b: { type: 'number' }
1207
- },
1208
- handler({ params }) {
1209
- return params.a + params.b;
1210
- }
1211
- }
1212
- }
1213
- }
1214
- ```
1215
-
1216
- ## Add new internal action $node.list
1217
-
1218
- List all connected nodes.
1219
-
1220
- ```js
1221
- [Node {
1222
- id: 'testnode',
1223
- local: true,
1224
- client: {
1225
- type: 'nodejs',
1226
- version: '0.2.17',
1227
- langVersion: 'v8.7.0'
1228
- },
1229
- cpu: null,
1230
- lastHeartbeatTime: 1517162496548,
1231
- isAvailable: true,
1232
- services: null,
1233
- events: null,
1234
- IPList: ['192.168.178.21', '192.168.99.1']
1235
- } ]
1236
- ```
1237
-
1238
- ## Add new internal action $node.actions
1239
-
1240
- List all actions.
1241
-
1242
- ```js
1243
- [{
1244
- name: '$node.services',
1245
- hasAvailable: true,
1246
- hasLocal: true,
1247
- count: 1,
1248
- action: {
1249
- name: '$node.services',
1250
- version: undefined
1251
- }
1252
- },
1253
- {
1254
- name: '$node.actions',
1255
- hasAvailable: true,
1256
- hasLocal: true,
1257
- count: 1,
1258
- action: {
1259
- name: '$node.actions',
1260
- version: undefined
1261
- }
1262
- }]
1263
- ```
1264
-
1265
- # Fixed
1266
-
1267
- Internal registry errors.
1268
-
1269
- --------------------------------------------------
1270
- <a name="0.2.16"></a>
1271
- # [0.2.16]() (2018-01-22)
1272
-
1273
- # New
1274
-
1275
- ## Add new cache features
1276
- In action cache, you now have the possibility to override the TTL.
1277
-
1278
- ```js
1279
- module.exports = {
1280
- name: 'example',
1281
- actions: {
1282
- show: {
1283
- cache: {
1284
- keys: ['name', 'site'],
1285
- ttl: 5 // Set ttl to 5ms.
1286
- }
1287
- }
1288
- }
1289
- }
1290
- ```
1291
-
1292
- --------------------------------------------------
1293
-
1294
- <a name="0.2.15"></a>
1295
- # [0.2.15]() (2018-01-21)
1296
-
1297
- # New
1298
-
1299
- ## Project runner script
1300
- There is a new weave project runner script in the bin folder. You can use it if you want to create small repositories for services. In this case you needn't to create a weave instance with options. Just create a weave.config.js or weave.config.json file in the root of repository, fill it with your options and call the weave-runner within the NPM scripts. As an other solution you can put it to the environment variables instead of putting options to file.
1301
-
1302
-
1303
- Example to start all services from the `services` folder.
1304
-
1305
- ```bash
1306
- $ weave-runner services
1307
- ```
1308
-
1309
-
1310
- Example weave.config.js file with a REDIS transport, placed in the root of your project.
1311
-
1312
- ```js
1313
- const Weave = require('@weave-js/core')
1314
-
1315
- module.exports = {
1316
- level: 'debug',
1317
- cacher: true,
1318
- metrics: false,
1319
- requestTimeout: 2000,
1320
- transport: Weave.transports.Redis({
1321
- host: process.env['REDIS_HOST']
1322
- })
1323
- }
1324
-
1325
- ```
1326
-
1327
- --------------------------------------------------
1328
-
1329
- <a name="0.2.14"></a>
1330
- # [0.2.14]() (2018-01-20)
1331
-
1332
- # New
1333
-
1334
- ## Add Changelog to project