@adobe/helix-admin-support 3.1.39 → 3.1.41

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [3.1.41](https://github.com/adobe/helix-admin-support/compare/v3.1.40...v3.1.41) (2025-04-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update external fixes to v3.782.0 ([#383](https://github.com/adobe/helix-admin-support/issues/383)) ([15e312c](https://github.com/adobe/helix-admin-support/commit/15e312c52c3cb5c33a6abb542718b6d169526807))
7
+
8
+ ## [3.1.40](https://github.com/adobe/helix-admin-support/compare/v3.1.39...v3.1.40) (2025-04-01)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * show details when sending/deleting fails ([#382](https://github.com/adobe/helix-admin-support/issues/382)) ([59b8ece](https://github.com/adobe/helix-admin-support/commit/59b8ece55349ad7e008e2f49f558e22e209f390f))
14
+
1
15
  ## [3.1.39](https://github.com/adobe/helix-admin-support/compare/v3.1.38...v3.1.39) (2025-04-01)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-admin-support",
3
- "version": "3.1.39",
3
+ "version": "3.1.41",
4
4
  "description": "Helix Admin Support Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -153,17 +153,19 @@ export class BatchedQueueClient {
153
153
  while (messages.length) {
154
154
  const batch = messages.splice(0, 10);
155
155
  log.debug(`deleting ${batch.length} messages from ${this.inQueue}...`);
156
+ const entries = batch.map((msg, idx) => ({
157
+ Id: `msg${idx}`,
158
+ ReceiptHandle: msg.ReceiptHandle,
159
+ }));
156
160
  // eslint-disable-next-line no-await-in-loop
157
161
  const result = await sqs.send(new DeleteMessageBatchCommand({
158
162
  QueueUrl: this.inQueue,
159
- Entries: batch.map((msg, idx) => ({
160
- Id: `msg${idx}`,
161
- ReceiptHandle: msg.ReceiptHandle,
162
- })),
163
+ Entries: entries,
163
164
  }));
164
165
  const { Successful = [], Failed = [] } = result;
165
166
  if (Failed.length) {
166
- log.warn(`failed to delete ${Failed.length} from queue.`);
167
+ const details = Failed.map(({ Id, Code, Message }) => (`- ${Id}: ${Message} (${Code})`));
168
+ log.warn(`failed to delete ${Failed.length} from queue ${this.inQueue}:\n${details.join('\n')}`);
167
169
  }
168
170
  deleted += Successful.length;
169
171
  log.debug(`deleted. ${deleted}/${total} from ${this.inQueue} done.`);
@@ -256,19 +258,21 @@ export class BatchedQueueClient {
256
258
  // if the size limit or the num-messages limit is reached, or of we are done, send the batch
257
259
  if (send || batch.length === 10 || messages.length === 0) {
258
260
  log.debug(`sending ${batch.length} messages to ${this.outQueue}...`);
261
+ const entries = batch.map((data, idx) => ({
262
+ Id: `msg${idx}`,
263
+ ...data,
264
+ }));
259
265
  const input = {
260
266
  QueueUrl: this.outQueue,
261
- Entries: batch.map((data, idx) => ({
262
- Id: `msg${idx}`,
263
- ...data,
264
- })),
267
+ Entries: entries,
265
268
  };
266
269
  try {
267
270
  // eslint-disable-next-line no-await-in-loop
268
271
  const result = await sqs.send(new SendMessageBatchCommand(input));
269
272
  const { Successful = [], Failed = [] } = result;
270
273
  if (Failed.length) {
271
- log.warn(`failed to send ${Failed.length} to queue.`);
274
+ const details = Failed.map(({ Id, Code, Message }) => (`- ${Id}: ${Message} (${Code})`));
275
+ log.warn(`failed to send ${Failed.length} to queue ${this.outQueue}:\n${details.join('\n')}`);
272
276
  }
273
277
  sent += Successful.length;
274
278
  messageIds.push(...Successful.map(({ MessageId }) => MessageId));