@fgiova/fastify-sqs-consumer 3.0.0 → 3.0.1
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/dist/cjs/index.js +4 -1
- package/dist/esm/index.mjs +4 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -74,8 +74,11 @@ function sqsConsumerPlugin(fastify, options, done) {
|
|
|
74
74
|
}
|
|
75
75
|
fastify.addHook("onReady", (done) => {
|
|
76
76
|
for (const consumerName of Object.keys(consumers)) {
|
|
77
|
-
consumers[consumerName].consumer.start().catch((e) => {
|
|
77
|
+
consumers[consumerName].consumer.start().catch(async (e) => {
|
|
78
78
|
fastify.log.error(e);
|
|
79
|
+
await consumers[consumerName].consumer
|
|
80
|
+
.stop()
|
|
81
|
+
.catch((stopErr) => fastify.log.error(stopErr));
|
|
79
82
|
delete consumers[consumerName];
|
|
80
83
|
});
|
|
81
84
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -68,8 +68,11 @@ function sqsConsumerPlugin(fastify, options, done) {
|
|
|
68
68
|
}
|
|
69
69
|
fastify.addHook("onReady", (done) => {
|
|
70
70
|
for (const consumerName of Object.keys(consumers)) {
|
|
71
|
-
consumers[consumerName].consumer.start().catch((e) => {
|
|
71
|
+
consumers[consumerName].consumer.start().catch(async (e) => {
|
|
72
72
|
fastify.log.error(e);
|
|
73
|
+
await consumers[consumerName].consumer
|
|
74
|
+
.stop()
|
|
75
|
+
.catch((stopErr) => fastify.log.error(stopErr));
|
|
73
76
|
delete consumers[consumerName];
|
|
74
77
|
});
|
|
75
78
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fgiova/fastify-sqs-consumer",
|
|
3
3
|
"description": "sqs-consumer fastify plugin",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/cjs/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"clock-mock": "^2.0.4",
|
|
78
78
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
79
79
|
"dotenv": "^10.0.0",
|
|
80
|
-
"fastify": "^5.
|
|
80
|
+
"fastify": "^5.8.5",
|
|
81
81
|
"semantic-release": "^25.0.3",
|
|
82
82
|
"tap": "^21.1.0",
|
|
83
83
|
"testcontainers": "^11.5.1",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"typescript": "^5.1.6"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@fgiova/sqs-consumer": "^3.
|
|
88
|
+
"@fgiova/sqs-consumer": "^3.2.0",
|
|
89
89
|
"@watchable/unpromise": "^1.0.2",
|
|
90
90
|
"fastify-plugin": "^5.1.0"
|
|
91
91
|
}
|