squiss-ts 5.2.3 → 5.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/dist/Squiss.js CHANGED
@@ -336,7 +336,10 @@ class Squiss extends events_1.EventEmitter {
336
336
  this._opts.receiveBatchSize = Math.min(this._opts.receiveBatchSize, this._opts.maxInFlight > 0 ? this._opts.maxInFlight : 10, 10);
337
337
  this._opts.minReceiveBatchSize = Math.min(this._opts.minReceiveBatchSize, this._opts.receiveBatchSize);
338
338
  }
339
- _deleteMessages(batch) {
339
+ async _deleteMessages(batch) {
340
+ if (batch.length === 0) {
341
+ return;
342
+ }
340
343
  return this.getQueueUrl().then((queueUrl) => {
341
344
  return this.sqs.deleteMessageBatch({
342
345
  QueueUrl: queueUrl,
package/dist/Types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { Message } from './Message';
3
- import { SQSClientConfig, BatchResultErrorEntry, SQS, SQSServiceException, MessageAttributeValue } from '@aws-sdk/client-sqs';
3
+ import { SQSClientConfig, BatchResultErrorEntry, SQS, SQSServiceException, MessageAttributeValue, QueueAttributeName } from '@aws-sdk/client-sqs';
4
4
  import { S3, S3ClientConfig } from '@aws-sdk/client-s3';
5
5
  import { IS3Upload } from './s3Utils';
6
6
  import { StrictEventEmitter } from './EventEmitterTypesHelper';
@@ -37,7 +37,7 @@ export type BodyFormat = 'json' | 'plain' | undefined;
37
37
  export interface ISquissOptions {
38
38
  receiveBatchSize?: number;
39
39
  receiveAttributes?: string[];
40
- receiveSqsAttributes?: string[];
40
+ receiveSqsAttributes?: QueueAttributeName[];
41
41
  minReceiveBatchSize?: number;
42
42
  receiveWaitTimeSecs?: number;
43
43
  deleteBatchSize?: number;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { SQS } from '@aws-sdk/client-sqs';
2
- export { SQS };
1
+ import { SQS, QueueAttributeName } from '@aws-sdk/client-sqs';
2
+ export { SQS, QueueAttributeName };
3
3
  import { S3 } from '@aws-sdk/client-s3';
4
4
  export { S3 };
5
5
  export { Squiss } from './Squiss';
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Message = exports.Squiss = exports.S3 = exports.SQS = void 0;
3
+ exports.Message = exports.Squiss = exports.S3 = exports.QueueAttributeName = exports.SQS = void 0;
4
4
  /* istanbul ignore file */
5
5
  const client_sqs_1 = require("@aws-sdk/client-sqs");
6
6
  Object.defineProperty(exports, "SQS", { enumerable: true, get: function () { return client_sqs_1.SQS; } });
7
+ Object.defineProperty(exports, "QueueAttributeName", { enumerable: true, get: function () { return client_sqs_1.QueueAttributeName; } });
7
8
  const client_s3_1 = require("@aws-sdk/client-s3");
8
9
  Object.defineProperty(exports, "S3", { enumerable: true, get: function () { return client_s3_1.S3; } });
9
10
  var Squiss_1 = require("./Squiss");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squiss-ts",
3
- "version": "5.2.3",
3
+ "version": "5.3.0",
4
4
  "description": "High-volume SQS poller",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -48,40 +48,40 @@
48
48
  },
49
49
  "homepage": "https://github.com/PruvoNet/squiss-ts#readme",
50
50
  "dependencies": {
51
- "@aws-sdk/client-s3": "^3.410.0",
52
- "@aws-sdk/client-sqs": "^3.410.0",
53
- "@aws-sdk/types": "^3.410.0",
51
+ "@aws-sdk/client-s3": "^3.456.0",
52
+ "@aws-sdk/client-sqs": "^3.454.0",
53
+ "@aws-sdk/types": "^3.451.0",
54
54
  "linked-list": "2.1.0",
55
55
  "ts-type-guards": "^0.7.0",
56
56
  "uuid": "^9.0.1"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@istanbuljs/nyc-config-typescript": "1.0.2",
60
- "@types/chai": "^4.3.6",
61
- "@types/chai-as-promised": "^7.1.6",
62
- "@types/mocha": "^10.0.1",
60
+ "@types/chai": "^4.3.11",
61
+ "@types/chai-as-promised": "^7.1.8",
62
+ "@types/mocha": "^10.0.6",
63
63
  "@types/node": "^16.18.39",
64
- "@types/proxyquire": "^1.3.28",
65
- "@types/uuid": "^9.0.3",
66
- "@typescript-eslint/eslint-plugin": "^6.7.0",
67
- "@typescript-eslint/parser": "^6.7.0",
68
- "chai": "^4.3.8",
64
+ "@types/proxyquire": "^1.3.31",
65
+ "@types/uuid": "^9.0.7",
66
+ "@typescript-eslint/eslint-plugin": "^6.12.0",
67
+ "@typescript-eslint/parser": "^6.12.0",
68
+ "chai": "^4.3.10",
69
69
  "chai-as-promised": "^7.1.1",
70
70
  "delay": "5.0.0",
71
71
  "dirty-chai": "^2.0.1",
72
- "eslint": "^8.49.0",
72
+ "eslint": "^8.54.0",
73
73
  "eslint-config-prettier": "^9.0.0",
74
- "eslint-plugin-import": "^2.28.1",
75
- "eslint-plugin-jsdoc": "^46.6.0",
74
+ "eslint-plugin-import": "^2.29.0",
75
+ "eslint-plugin-jsdoc": "^46.9.0",
76
76
  "eslint-plugin-prefer-arrow": "^1.2.3",
77
77
  "mocha": "^10.2.0",
78
78
  "nyc": "^15.1.0",
79
79
  "proxyquire": "^2.1.3",
80
- "sinon": "^15.2.0",
80
+ "sinon": "^17.0.1",
81
81
  "sinon-chai": "^3.7.0",
82
82
  "source-map-support": "^0.5.21",
83
83
  "ts-node": "^10.9.1",
84
- "typescript": "^5.2.2"
84
+ "typescript": "^5.3.2"
85
85
  },
86
86
  "nyc": {
87
87
  "extends": "@istanbuljs/nyc-config-typescript",