ac-sqs 3.2.1 → 3.3.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.
- package/CHANGELOG.md +23 -0
- package/README.md +3 -0
- package/index.js +20 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
# [3.3.0](https://github.com/admiralcloud/ac-sqs/compare/v3.2.2..v3.3.0) (2025-09-26 17:27:53)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Feature
|
|
6
|
+
|
|
7
|
+
* **App:** Add function to create missing queues | MP | [fa112ba346687587530c03fd470402b1ca3d0f98](https://github.com/admiralcloud/ac-sqs/commit/fa112ba346687587530c03fd470402b1ca3d0f98)
|
|
8
|
+
Add function to create missing queues
|
|
9
|
+
Related issues:
|
|
10
|
+
### Chores
|
|
11
|
+
|
|
12
|
+
* **Misc:** Updated packages | MP | [ccde2c1292e657aaceff82d9978459efc3bf24f7](https://github.com/admiralcloud/ac-sqs/commit/ccde2c1292e657aaceff82d9978459efc3bf24f7)
|
|
13
|
+
Updated packages
|
|
14
|
+
Related issues:
|
|
15
|
+
|
|
16
|
+
## [3.2.2](https://github.com/admiralcloud/ac-sqs/compare/v3.2.1..v3.2.2) (2025-09-19 05:21:22)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fix
|
|
20
|
+
|
|
21
|
+
* **Misc:** Package updates | MP | [feed53274af621d33f5c03bf946d9d3274ad1986](https://github.com/admiralcloud/ac-sqs/commit/feed53274af621d33f5c03bf946d9d3274ad1986)
|
|
22
|
+
Package updates
|
|
23
|
+
Related issues:
|
|
1
24
|
|
|
2
25
|
## [3.2.1](https://github.com/admiralcloud/ac-sqs/compare/v3.2.0..v3.2.1) (2025-07-18 12:57:51)
|
|
3
26
|
|
package/README.md
CHANGED
|
@@ -112,6 +112,9 @@ An array of metadata to get. By default only "ApproximateNumberOfMessages" is re
|
|
|
112
112
|
|
|
113
113
|
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html
|
|
114
114
|
|
|
115
|
+
## createQueue
|
|
116
|
+
Call with all lists and let the function check if the queues exist. If not, the missing queue is created.
|
|
117
|
+
|
|
115
118
|
# Test
|
|
116
119
|
You can run tests using **yarn run test**.
|
|
117
120
|
|
package/index.js
CHANGED
|
@@ -349,6 +349,26 @@ class ACSQS {
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
+
async createQueue({ lists }) {
|
|
353
|
+
for (const list of lists) {
|
|
354
|
+
const config = _.find(this.availableLists, { name: list.name })
|
|
355
|
+
if (!config) {
|
|
356
|
+
this.logger.error('AWS | createQueue | configurationMissing | %s', list.name)
|
|
357
|
+
throw new Error('configurationForListMissing')
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const queueUrl = await this.getQueueUrl(config)
|
|
361
|
+
const command = new CreateQueueCommand({ QueueName: queueUrl })
|
|
362
|
+
try {
|
|
363
|
+
await this.sqs.send(command)
|
|
364
|
+
}
|
|
365
|
+
catch(e) {
|
|
366
|
+
this.logger.error('AWS | createQueue | %s | %s', list.name, e?.message)
|
|
367
|
+
if (this.throwError) throw e
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
352
372
|
async sendSQSMessage({ name, message, messageGroupId, deDuplicationId, delay, throwError, debug }) {
|
|
353
373
|
const config = _.find(this.availableLists, { name })
|
|
354
374
|
if (!config) {
|
package/package.json
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
"author": "Mark Poepping (https://www.admiralcloud.com)",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "admiralcloud/ac-sqs",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.3.0",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@aws-sdk/client-s3": "^3.
|
|
9
|
-
"@aws-sdk/client-sqs": "^3.
|
|
8
|
+
"@aws-sdk/client-s3": "^3.896.0",
|
|
9
|
+
"@aws-sdk/client-sqs": "^3.896.0",
|
|
10
10
|
"lodash": "^4.17.21",
|
|
11
11
|
"uuid": "^11.1.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"ac-semantic-release": "^0.4.
|
|
14
|
+
"ac-semantic-release": "^0.4.8",
|
|
15
15
|
"chai": "^4.5.0",
|
|
16
|
-
"eslint": "^9.
|
|
17
|
-
"mocha": "^11.7.
|
|
16
|
+
"eslint": "^9.36.0",
|
|
17
|
+
"mocha": "^11.7.2"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"test": "mocha --reporter spec"
|