@codefresh-io/eventbus 1.4.0 → 1.4.3
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/lib/Store.js +1 -0
- package/lib/index.js +4 -3
- package/package.json +2 -2
- package/yarn.lock +56 -16
package/lib/Store.js
CHANGED
|
@@ -21,6 +21,7 @@ class Store extends EventEmitter {
|
|
|
21
21
|
this.database = options.database;
|
|
22
22
|
this.user = options.user;
|
|
23
23
|
this.password = options.password;
|
|
24
|
+
this.port = options.port;
|
|
24
25
|
this.readyPromise = new Promise((resolve, reject) => {
|
|
25
26
|
this.readyDeferred = {
|
|
26
27
|
resolve: () => {
|
package/lib/index.js
CHANGED
|
@@ -88,7 +88,7 @@ class EventBus extends EventEmitter {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
_emitReady() {
|
|
91
|
-
if (this.busReady
|
|
91
|
+
if (this.busReady) {
|
|
92
92
|
this.readyDeferred.resolve();
|
|
93
93
|
debug('ready');
|
|
94
94
|
this.emit('ready');
|
|
@@ -99,9 +99,10 @@ class EventBus extends EventEmitter {
|
|
|
99
99
|
return Promise.resolve()
|
|
100
100
|
.then(async () => {
|
|
101
101
|
await this.readyPromise;
|
|
102
|
-
await this.store.save(eventName, msg);
|
|
103
102
|
await this.bus.publish(eventName, msg);
|
|
104
|
-
})
|
|
103
|
+
}).then(() => {
|
|
104
|
+
this.store.save(eventName, msg);
|
|
105
|
+
})
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
subscribe(eventName, handler, options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codefresh-io/eventbus",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/codefresh-io/cf-eventbus#readme",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"amqplib": "^0.
|
|
20
|
+
"amqplib": "^0.8.0",
|
|
21
21
|
"bluebird": "^3.5.0",
|
|
22
22
|
"cf-errors": "^0.1.16",
|
|
23
23
|
"debug": "2.6.9",
|
package/yarn.lock
CHANGED
|
@@ -18,14 +18,17 @@ amdefine@>=0.0.4:
|
|
|
18
18
|
version "1.0.1"
|
|
19
19
|
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
|
|
20
20
|
|
|
21
|
-
amqplib@^0.
|
|
22
|
-
version "0.
|
|
23
|
-
resolved "https://registry.yarnpkg.com/amqplib/-/amqplib-0.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
amqplib@^0.8.0:
|
|
22
|
+
version "0.8.0"
|
|
23
|
+
resolved "https://registry.yarnpkg.com/amqplib/-/amqplib-0.8.0.tgz#088d10bc61cc5ac5a49ac72033c7ac66c23aeb61"
|
|
24
|
+
integrity sha512-icU+a4kkq4Y1PS4NNi+YPDMwdlbFcZ1EZTQT2nigW3fvOb6AOgUQ9+Mk4ue0Zu5cBg/XpDzB40oH10ysrk2dmA==
|
|
25
|
+
dependencies:
|
|
26
|
+
bitsyntax "~0.1.0"
|
|
27
|
+
bluebird "^3.7.2"
|
|
28
|
+
buffer-more-ints "~1.0.0"
|
|
28
29
|
readable-stream "1.x >=1.1.9"
|
|
30
|
+
safe-buffer "~5.2.1"
|
|
31
|
+
url-parse "~1.5.1"
|
|
29
32
|
|
|
30
33
|
ansi-regex@^0.2.0, ansi-regex@^0.2.1:
|
|
31
34
|
version "0.2.1"
|
|
@@ -277,11 +280,14 @@ binary-extensions@^1.0.0:
|
|
|
277
280
|
version "1.8.0"
|
|
278
281
|
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774"
|
|
279
282
|
|
|
280
|
-
bitsyntax@~0.0
|
|
281
|
-
version "0.0
|
|
282
|
-
resolved "https://registry.yarnpkg.com/bitsyntax/-/bitsyntax-0.0.
|
|
283
|
+
bitsyntax@~0.1.0:
|
|
284
|
+
version "0.1.0"
|
|
285
|
+
resolved "https://registry.yarnpkg.com/bitsyntax/-/bitsyntax-0.1.0.tgz#b0c59acef03505de5a2ed62a2f763c56ae1d6205"
|
|
286
|
+
integrity sha512-ikAdCnrloKmFOugAfxWws89/fPc+nw0OOG1IzIE72uSOg/A3cYptKCjSUhDTuj7fhsJtzkzlv7l3b8PzRHLN0Q==
|
|
283
287
|
dependencies:
|
|
284
|
-
buffer-more-ints "0.0
|
|
288
|
+
buffer-more-ints "~1.0.0"
|
|
289
|
+
debug "~2.6.9"
|
|
290
|
+
safe-buffer "~5.1.2"
|
|
285
291
|
|
|
286
292
|
block-stream@*:
|
|
287
293
|
version "0.0.9"
|
|
@@ -289,10 +295,15 @@ block-stream@*:
|
|
|
289
295
|
dependencies:
|
|
290
296
|
inherits "~2.0.0"
|
|
291
297
|
|
|
292
|
-
bluebird@^3.
|
|
298
|
+
bluebird@^3.5.0:
|
|
293
299
|
version "3.5.0"
|
|
294
300
|
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c"
|
|
295
301
|
|
|
302
|
+
bluebird@^3.7.2:
|
|
303
|
+
version "3.7.2"
|
|
304
|
+
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
|
|
305
|
+
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
|
|
306
|
+
|
|
296
307
|
boom@2.x.x:
|
|
297
308
|
version "2.10.1"
|
|
298
309
|
resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f"
|
|
@@ -314,9 +325,10 @@ braces@^1.8.2:
|
|
|
314
325
|
preserve "^0.2.0"
|
|
315
326
|
repeat-element "^1.1.2"
|
|
316
327
|
|
|
317
|
-
buffer-more-ints
|
|
318
|
-
version "0.0
|
|
319
|
-
resolved "https://registry.yarnpkg.com/buffer-more-ints/-/buffer-more-ints-0.0.
|
|
328
|
+
buffer-more-ints@~1.0.0:
|
|
329
|
+
version "1.0.0"
|
|
330
|
+
resolved "https://registry.yarnpkg.com/buffer-more-ints/-/buffer-more-ints-1.0.0.tgz#ef4f8e2dddbad429ed3828a9c55d44f05c611422"
|
|
331
|
+
integrity sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==
|
|
320
332
|
|
|
321
333
|
buffer-shims@^1.0.0:
|
|
322
334
|
version "1.0.0"
|
|
@@ -529,7 +541,7 @@ debug@2.2.0, debug@~2.2.0:
|
|
|
529
541
|
dependencies:
|
|
530
542
|
ms "0.7.1"
|
|
531
543
|
|
|
532
|
-
debug@2.6.9:
|
|
544
|
+
debug@2.6.9, debug@~2.6.9:
|
|
533
545
|
version "2.6.9"
|
|
534
546
|
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
|
535
547
|
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
|
|
@@ -2387,6 +2399,11 @@ qs@~6.3.0:
|
|
|
2387
2399
|
version "6.3.2"
|
|
2388
2400
|
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c"
|
|
2389
2401
|
|
|
2402
|
+
querystringify@^2.1.1:
|
|
2403
|
+
version "2.2.0"
|
|
2404
|
+
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6"
|
|
2405
|
+
integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==
|
|
2406
|
+
|
|
2390
2407
|
randomatic@^1.1.3:
|
|
2391
2408
|
version "1.1.6"
|
|
2392
2409
|
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb"
|
|
@@ -2554,6 +2571,11 @@ require-dir@^0.1.0:
|
|
|
2554
2571
|
version "0.1.0"
|
|
2555
2572
|
resolved "https://registry.yarnpkg.com/require-dir/-/require-dir-0.1.0.tgz#81e01e299faf5b74c34b6594f8e5add5985ddec5"
|
|
2556
2573
|
|
|
2574
|
+
requires-port@^1.0.0:
|
|
2575
|
+
version "1.0.0"
|
|
2576
|
+
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
|
|
2577
|
+
integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==
|
|
2578
|
+
|
|
2557
2579
|
resolve-dir@^0.1.0:
|
|
2558
2580
|
version "0.1.1"
|
|
2559
2581
|
resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e"
|
|
@@ -2598,6 +2620,16 @@ run-sequence@^1.1.0:
|
|
|
2598
2620
|
chalk "*"
|
|
2599
2621
|
gulp-util "*"
|
|
2600
2622
|
|
|
2623
|
+
safe-buffer@~5.1.2:
|
|
2624
|
+
version "5.1.2"
|
|
2625
|
+
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
|
2626
|
+
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
|
2627
|
+
|
|
2628
|
+
safe-buffer@~5.2.1:
|
|
2629
|
+
version "5.2.1"
|
|
2630
|
+
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
|
2631
|
+
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
|
2632
|
+
|
|
2601
2633
|
samsam@1.1.2, samsam@~1.1:
|
|
2602
2634
|
version "1.1.2"
|
|
2603
2635
|
resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.2.tgz#bec11fdc83a9fda063401210e40176c3024d1567"
|
|
@@ -2973,6 +3005,14 @@ update-notifier@0.5.0:
|
|
|
2973
3005
|
semver-diff "^2.0.0"
|
|
2974
3006
|
string-length "^1.0.0"
|
|
2975
3007
|
|
|
3008
|
+
url-parse@~1.5.1:
|
|
3009
|
+
version "1.5.10"
|
|
3010
|
+
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1"
|
|
3011
|
+
integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==
|
|
3012
|
+
dependencies:
|
|
3013
|
+
querystringify "^2.1.1"
|
|
3014
|
+
requires-port "^1.0.0"
|
|
3015
|
+
|
|
2976
3016
|
user-home@^1.1.1:
|
|
2977
3017
|
version "1.1.1"
|
|
2978
3018
|
resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
|