From 422c6c76420459e5dba0a75bbf9cd25fb30e50b6 Mon Sep 17 00:00:00 2001 From: Arina Turonchik Date: Wed, 23 Jul 2025 18:55:02 +0200 Subject: [PATCH 1/4] chore: upgrade aws-sdk to v3 for Pod Identity support --- codemod-changes-2025-07-23T16-54-50-498Z.md | 56 + dist/consumer.d.ts | 3 +- package-lock.json | 2087 ++++++++++++++----- package.json | 2 +- src/consumer.ts | 41 +- 5 files changed, 1636 insertions(+), 553 deletions(-) create mode 100644 codemod-changes-2025-07-23T16-54-50-498Z.md diff --git a/codemod-changes-2025-07-23T16-54-50-498Z.md b/codemod-changes-2025-07-23T16-54-50-498Z.md new file mode 100644 index 0000000..f9f798d --- /dev/null +++ b/codemod-changes-2025-07-23T16-54-50-498Z.md @@ -0,0 +1,56 @@ +# AWS SDK v2 to v3 Codemod Changes Report + +**Generated:** 7/23/2025, 6:54:50 PM +**Files Processed:** 2 +**Files Changed:** 2 + +## Summary + +Successfully processed 2 files + +## Changed Files + +### 1. `dist/consumer.d.ts` + +**Changes:** 72 modified, 1 added, 0 removed lines + +**Key Changes Preview:** + +```diff +- import { EventEmitter } from 'events'; ++ import { Message, SQS } from '@aws-sdk/client-sqs'; +- declare type SQSMessage = SQS.Types.Message; ++ import { EventEmitter } from 'events'; +- export interface ConsumerOptions { ++ declare type SQSMessage = Message; +- queueUrl?: string; ++ export interface ConsumerOptions { +- attributeNames?: string[]; ++ queueUrl?: string; +``` + +### 2. `src/consumer.ts` + +**Changes:** 1 AWS SDK v2 imports → 1 v3 imports + +**Key Changes Preview:** + +```diff +- import { AWSError } from 'aws-sdk'; ++ import { ServiceException } from '@smithy/smithy-client'; +- import * as SQS from 'aws-sdk/clients/sqs'; ++ import { Message, ReceiveMessageCommandInput, ReceiveMessageCommandOutput, SQS } from '@aws-sdk/client-sqs'; +- import { PromiseResult } from 'aws-sdk/lib/request'; ++ import * as SQS from 'aws-sdk/clients/sqs'; +- import * as Debug from 'debug'; ++ import { PromiseResult } from 'aws-sdk/lib/request'; +- import * as crypto from 'crypto'; ++ import * as Debug from 'debug'; +``` + +## Next Steps + +1. Review the changes in each file +2. Test your application to ensure everything works +3. Update any tests that may need AWS SDK v3 adjustments + diff --git a/dist/consumer.d.ts b/dist/consumer.d.ts index 75d3b82..8540ea4 100644 --- a/dist/consumer.d.ts +++ b/dist/consumer.d.ts @@ -1,6 +1,7 @@ import * as SQS from 'aws-sdk/clients/sqs'; +import { Message, SQS } from '@aws-sdk/client-sqs'; import { EventEmitter } from 'events'; -declare type SQSMessage = SQS.Types.Message; +declare type SQSMessage = Message; export interface ConsumerOptions { queueUrl?: string; attributeNames?: string[]; diff --git a/package-lock.json b/package-lock.json index 5638dc2..ade45ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "6.4.0", "license": "Apache-2.0", "dependencies": { - "aws-sdk": "2.1489.0", + "@aws-sdk/client-sqs": "^3.848.0", "debug": "^4.1.1" }, "devDependencies": { @@ -32,6 +32,754 @@ "typescript": "^2.6.1" } }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", + "dependencies": { + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-crypto/sha256-js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/sha256-js/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-crypto/util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/client-sqs": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sqs/-/client-sqs-3.848.0.tgz", + "integrity": "sha512-ikeTO/MvV4nzdH9wpwMOPKSWG2hX0QoJ6ZDbgIZzQy6o53NfCxYrbRODgNSsp4mZDUGY2Mr13jP2zYNxYDBL6w==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.846.0", + "@aws-sdk/credential-provider-node": "3.848.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-sdk-sqs": "3.845.0", + "@aws-sdk/middleware-user-agent": "3.848.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.848.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.848.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/md5-js": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.15", + "@smithy/middleware-retry": "^4.1.16", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.7", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.23", + "@smithy/util-defaults-mode-node": "^4.0.23", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/client-sqs/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.848.0.tgz", + "integrity": "sha512-mD+gOwoeZQvbecVLGoCmY6pS7kg02BHesbtIxUj+PeBqYoZV5uLvjUOmuGfw1SfoSobKvS11urxC9S7zxU/Maw==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.846.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.848.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.848.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.848.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.15", + "@smithy/middleware-retry": "^4.1.16", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.7", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.23", + "@smithy/util-defaults-mode-node": "^4.0.23", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/client-sso/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/core": { + "version": "3.846.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.846.0.tgz", + "integrity": "sha512-7CX0pM906r4WSS68fCTNMTtBCSkTtf3Wggssmx13gD40gcWEZXsU00KzPp1bYheNRyPlAq3rE22xt4wLPXbuxA==", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@aws-sdk/xml-builder": "3.821.0", + "@smithy/core": "^3.7.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/property-provider": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/signature-v4": "^5.1.2", + "@smithy/smithy-client": "^4.4.7", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-utf8": "^4.0.0", + "fast-xml-parser": "5.2.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/core/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.846.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.846.0.tgz", + "integrity": "sha512-QuCQZET9enja7AWVISY+mpFrEIeHzvkx/JEEbHYzHhUkxcnC2Kq2c0bB7hDihGD0AZd3Xsm653hk1O97qu69zg==", + "dependencies": { + "@aws-sdk/core": "3.846.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.846.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.846.0.tgz", + "integrity": "sha512-Jh1iKUuepdmtreMYozV2ePsPcOF5W9p3U4tWhi3v6nDvz0GsBjzjAROW+BW8XMz9vAD3I9R+8VC3/aq63p5nlw==", + "dependencies": { + "@aws-sdk/core": "3.846.0", + "@aws-sdk/types": "3.840.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.7", + "@smithy/types": "^4.3.1", + "@smithy/util-stream": "^4.2.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.848.0.tgz", + "integrity": "sha512-r6KWOG+En2xujuMhgZu7dzOZV3/M5U/5+PXrG8dLQ3rdPRB3vgp5tc56KMqLwm/EXKRzAOSuw/UE4HfNOAB8Hw==", + "dependencies": { + "@aws-sdk/core": "3.846.0", + "@aws-sdk/credential-provider-env": "3.846.0", + "@aws-sdk/credential-provider-http": "3.846.0", + "@aws-sdk/credential-provider-process": "3.846.0", + "@aws-sdk/credential-provider-sso": "3.848.0", + "@aws-sdk/credential-provider-web-identity": "3.848.0", + "@aws-sdk/nested-clients": "3.848.0", + "@aws-sdk/types": "3.840.0", + "@smithy/credential-provider-imds": "^4.0.6", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.848.0.tgz", + "integrity": "sha512-AblNesOqdzrfyASBCo1xW3uweiSro4Kft9/htdxLeCVU1KVOnFWA5P937MNahViRmIQm2sPBCqL8ZG0u9lnh5g==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.846.0", + "@aws-sdk/credential-provider-http": "3.846.0", + "@aws-sdk/credential-provider-ini": "3.848.0", + "@aws-sdk/credential-provider-process": "3.846.0", + "@aws-sdk/credential-provider-sso": "3.848.0", + "@aws-sdk/credential-provider-web-identity": "3.848.0", + "@aws-sdk/types": "3.840.0", + "@smithy/credential-provider-imds": "^4.0.6", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.846.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.846.0.tgz", + "integrity": "sha512-mEpwDYarJSH+CIXnnHN0QOe0MXI+HuPStD6gsv3z/7Q6ESl8KRWon3weFZCDnqpiJMUVavlDR0PPlAFg2MQoPg==", + "dependencies": { + "@aws-sdk/core": "3.846.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.848.0.tgz", + "integrity": "sha512-pozlDXOwJZL0e7w+dqXLgzVDB7oCx4WvtY0sk6l4i07uFliWF/exupb6pIehFWvTUcOvn5aFTTqcQaEzAD5Wsg==", + "dependencies": { + "@aws-sdk/client-sso": "3.848.0", + "@aws-sdk/core": "3.846.0", + "@aws-sdk/token-providers": "3.848.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.848.0.tgz", + "integrity": "sha512-D1fRpwPxtVDhcSc/D71exa2gYweV+ocp4D3brF0PgFd//JR3XahZ9W24rVnTQwYEcK9auiBZB89Ltv+WbWN8qw==", + "dependencies": { + "@aws-sdk/core": "3.846.0", + "@aws-sdk/nested-clients": "3.848.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.840.0.tgz", + "integrity": "sha512-ub+hXJAbAje94+Ya6c6eL7sYujoE8D4Bumu1NUI8TXjUhVVn0HzVWQjpRLshdLsUp1AW7XyeJaxyajRaJQ8+Xg==", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-host-header/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.840.0.tgz", + "integrity": "sha512-lSV8FvjpdllpGaRspywss4CtXV8M7NNNH+2/j86vMH+YCOZ6fu2T/TyFd/tHwZ92vDfHctWkRbQxg0bagqwovA==", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.840.0.tgz", + "integrity": "sha512-Gu7lGDyfddyhIkj1Z1JtrY5NHb5+x/CRiB87GjaSrKxkDaydtX2CU977JIABtt69l9wLbcGDIQ+W0uJ5xPof7g==", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/middleware-sdk-sqs": { + "version": "3.845.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sqs/-/middleware-sdk-sqs-3.845.0.tgz", + "integrity": "sha512-jwRjpOsWgtBhHFSPOsUAVfAIMlQfNFq0WZDZ0gKPxVxxb8Q8LT+7e0wF8fGHrA8s7I6LQQ5opxTefNNDH5DjJg==", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/smithy-client": "^4.4.7", + "@smithy/types": "^4.3.1", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-sdk-sqs/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.848.0.tgz", + "integrity": "sha512-rjMuqSWJEf169/ByxvBqfdei1iaduAnfolTshsZxwcmLIUtbYrFUmts0HrLQqsAG8feGPpDLHA272oPl+NTCCA==", + "dependencies": { + "@aws-sdk/core": "3.846.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.848.0", + "@smithy/core": "^3.7.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/nested-clients": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.848.0.tgz", + "integrity": "sha512-joLsyyo9u61jnZuyYzo1z7kmS7VgWRAkzSGESVzQHfOA1H2PYeUFek6vLT4+c9xMGrX/Z6B0tkRdzfdOPiatLg==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.846.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.848.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.848.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.848.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.15", + "@smithy/middleware-retry": "^4.1.16", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.7", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.23", + "@smithy/util-defaults-mode-node": "^4.0.23", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/nested-clients/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.840.0.tgz", + "integrity": "sha512-Qjnxd/yDv9KpIMWr90ZDPtRj0v75AqGC92Lm9+oHXZ8p1MjG5JE2CW0HL8JRgK9iKzgKBL7pPQRXI8FkvEVfrA==", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", + "@smithy/util-config-provider": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.848.0.tgz", + "integrity": "sha512-oNPyM4+Di2Umu0JJRFSxDcKQ35+Chl/rAwD47/bS0cDPI8yrao83mLXLeDqpRPHyQW4sXlP763FZcuAibC0+mg==", + "dependencies": { + "@aws-sdk/core": "3.846.0", + "@aws-sdk/nested-clients": "3.848.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/token-providers/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/types": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.840.0.tgz", + "integrity": "sha512-xliuHaUFZxEx1NSXeLLZ9Dyu6+EJVQKEoD+yM+zqUo3YDZ7medKJWY6fIOKiPX/N7XbLdBYwajb15Q7IL8KkeA==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/types/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.848.0.tgz", + "integrity": "sha512-fY/NuFFCq/78liHvRyFKr+aqq1aA/uuVSANjzr5Ym8c+9Z3HRPE9OrExAHoMrZ6zC8tHerQwlsXYYH5XZ7H+ww==", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-endpoints": "^3.0.6", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.804.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.804.0.tgz", + "integrity": "sha512-zVoRfpmBVPodYlnMjgVjfGoEZagyRF5IPn3Uo6ZvOZp24chnW/FRstH7ESDHDDRga4z3V+ElUQHKpFDXWyBW5A==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/util-locate-window/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.840.0.tgz", + "integrity": "sha512-JdyZM3EhhL4PqwFpttZu1afDpPJCCc3eyZOLi+srpX11LsGj6sThf47TYQN75HT1CarZ7cCdQHGzP2uy3/xHfQ==", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/types": "^4.3.1", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/util-user-agent-browser/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.848.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.848.0.tgz", + "integrity": "sha512-Zz1ft9NiLqbzNj/M0jVNxaoxI2F4tGXN0ZbZIj+KJ+PbJo+w5+Jo6d0UDAtbj3AEd79pjcCaP4OA9NTVzItUdw==", + "dependencies": { + "@aws-sdk/middleware-user-agent": "3.848.0", + "@aws-sdk/types": "3.840.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/util-user-agent-node/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@aws-sdk/xml-builder": { + "version": "3.821.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.821.0.tgz", + "integrity": "sha512-DIIotRnefVL6DiaHtO6/21DhJ4JZnnIwdNbpwiAhdt/AVbttcE4yw925gsjur0OGv5BTYXQXU3YnANBYnZjuQA==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/xml-builder/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, "node_modules/@babel/code-frame": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", @@ -191,35 +939,783 @@ "typescript": ">= 3.0.1 || >= 3.3.0-dev || >= 3.4.0-dev" } }, - "node_modules/@sinonjs/commons": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.3.0.tgz", - "integrity": "sha512-j4ZwhaHmwsCb4DlDOIWnI5YyKDNMoNThsmwEpfHx6a1EpsGZ9qYLxP++LMlmBRjtGptGHFsGItJ768snllFWpA==", - "dev": true, + "node_modules/@sinonjs/commons": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.3.0.tgz", + "integrity": "sha512-j4ZwhaHmwsCb4DlDOIWnI5YyKDNMoNThsmwEpfHx6a1EpsGZ9qYLxP++LMlmBRjtGptGHFsGItJ768snllFWpA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/formatio": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.1.0.tgz", + "integrity": "sha512-ZAR2bPHOl4Xg6eklUGpsdiIJ4+J1SNag1DHHrG/73Uz/nVwXqjgUtRPLoS+aVyieN9cSbc0E4LsU984tWcDyNg==", + "dev": true, + "dependencies": { + "@sinonjs/samsam": "^2 || ^3" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.1.0.tgz", + "integrity": "sha512-IXio+GWY+Q8XUjHUOgK7wx8fpvr7IFffgyXb1bnJFfX3001KmHt35Zq4tp7MXZyjJPCLPuadesDYNk41LYtVjw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.0.2", + "array-from": "^2.1.1", + "lodash.get": "^4.4.2" + } + }, + "node_modules/@smithy/abort-controller": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", + "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/abort-controller/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/config-resolver": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.1.4.tgz", + "integrity": "sha512-prmU+rDddxHOH0oNcwemL+SwnzcG65sBF2yXRO7aeXIn/xTlq2pX7JLVbkBnVLowHLg4/OL4+jBmv9hVrVGS+w==", + "dependencies": { + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", + "@smithy/util-config-provider": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/config-resolver/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/core": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.7.2.tgz", + "integrity": "sha512-JoLw59sT5Bm8SAjFCYZyuCGxK8y3vovmoVbZWLDPTH5XpPEIwpFd9m90jjVMwoypDuB/SdVgje5Y4T7w50lJaw==", + "dependencies": { + "@smithy/middleware-serde": "^4.0.8", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-stream": "^4.2.3", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/core/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.6.tgz", + "integrity": "sha512-hKMWcANhUiNbCJouYkZ9V3+/Qf9pteR1dnwgdyzR09R4ODEYx8BbUysHwRSyex4rZ9zapddZhLFTnT4ZijR4pw==", + "dependencies": { + "@smithy/node-config-provider": "^4.1.3", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.1.0.tgz", + "integrity": "sha512-mADw7MS0bYe2OGKkHYMaqarOXuDwRbO6ArD91XhHcl2ynjGCFF+hvqf0LyQcYxkA1zaWjefSkU7Ne9mqgApSgQ==", + "dependencies": { + "@smithy/protocol-http": "^5.1.2", + "@smithy/querystring-builder": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/fetch-http-handler/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/hash-node": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.4.tgz", + "integrity": "sha512-qnbTPUhCVnCgBp4z4BUJUhOEkVwxiEi1cyFM+Zj6o+aY8OFGxUQleKWq8ltgp3dujuhXojIvJWdoqpm6dVO3lQ==", + "dependencies": { + "@smithy/types": "^4.3.1", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/hash-node/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/invalid-dependency": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.4.tgz", + "integrity": "sha512-bNYMi7WKTJHu0gn26wg8OscncTt1t2b8KcsZxvOv56XA6cyXtOAAAaNP7+m45xfppXfOatXF3Sb1MNsLUgVLTw==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/invalid-dependency/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/is-array-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.0.0.tgz", + "integrity": "sha512-saYhF8ZZNoJDTvJBEWgeBccCg+yvp1CX+ed12yORU3NilJScfc6gfch2oVb4QgxZrGUx3/ZJlb+c/dJbyupxlw==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/is-array-buffer/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/md5-js": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-4.0.4.tgz", + "integrity": "sha512-uGLBVqcOwrLvGh/v/jw423yWHq/ofUGK1W31M2TNspLQbUV1Va0F5kTxtirkoHawODAZcjXTSGi7JwbnPcDPJg==", + "dependencies": { + "@smithy/types": "^4.3.1", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/md5-js/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/middleware-content-length": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.0.4.tgz", + "integrity": "sha512-F7gDyfI2BB1Kc+4M6rpuOLne5LOcEknH1n6UQB69qv+HucXBR1rkzXBnQTB2q46sFy1PM/zuSJOB532yc8bg3w==", + "dependencies": { + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-content-length/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.17.tgz", + "integrity": "sha512-S3hSGLKmHG1m35p/MObQCBCdRsrpbPU8B129BVzRqRfDvQqPMQ14iO4LyRw+7LNizYc605COYAcjqgawqi+6jA==", + "dependencies": { + "@smithy/core": "^3.7.2", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-middleware": "^4.0.4", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/middleware-retry": { + "version": "4.1.18", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.18.tgz", + "integrity": "sha512-bYLZ4DkoxSsPxpdmeapvAKy7rM5+25gR7PGxq2iMiecmbrRGBHj9s75N74Ylg+aBiw9i5jIowC/cLU2NR0qH8w==", + "dependencies": { + "@smithy/node-config-provider": "^4.1.3", + "@smithy/protocol-http": "^5.1.2", + "@smithy/service-error-classification": "^4.0.6", + "@smithy/smithy-client": "^4.4.9", + "@smithy/types": "^4.3.1", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-retry/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/middleware-retry/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz", + "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==", + "dependencies": { + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-serde/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/middleware-stack": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz", + "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-stack/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/node-config-provider": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz", + "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==", + "dependencies": { + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-config-provider/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/node-http-handler": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.1.0.tgz", + "integrity": "sha512-vqfSiHz2v8b3TTTrdXi03vNz1KLYYS3bhHCDv36FYDqxT7jvTll1mMnCrkD+gOvgwybuunh/2VmvOMqwBegxEg==", + "dependencies": { + "@smithy/abort-controller": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/querystring-builder": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-http-handler/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/property-provider": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz", + "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/property-provider/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/protocol-http": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", + "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/protocol-http/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/querystring-builder": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.4.tgz", + "integrity": "sha512-SwREZcDnEYoh9tLNgMbpop+UTGq44Hl9tdj3rf+yeLcfH7+J8OXEBaMc2kDxtyRHu8BhSg9ADEx0gFHvpJgU8w==", + "dependencies": { + "@smithy/types": "^4.3.1", + "@smithy/util-uri-escape": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-builder/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/querystring-parser": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz", + "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-parser/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/service-error-classification": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.6.tgz", + "integrity": "sha512-RRoTDL//7xi4tn5FrN2NzH17jbgmnKidUqd4KvquT0954/i6CXXkh1884jBiunq24g9cGtPBEXlU40W6EpNOOg==", + "dependencies": { + "@smithy/types": "^4.3.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz", + "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/signature-v4": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.1.2.tgz", + "integrity": "sha512-d3+U/VpX7a60seHziWnVZOHuEgJlclufjkS6zhXvxcJgkJq4UWdH5eOBLzHRMx6gXjsdT9h6lfpmLzbrdupHgQ==", + "dependencies": { + "@smithy/is-array-buffer": "^4.0.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-uri-escape": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/signature-v4/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/smithy-client": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.9.tgz", + "integrity": "sha512-mbMg8mIUAWwMmb74LoYiArP04zWElPzDoA1jVOp3or0cjlDMgoS6WTC3QXK0Vxoc9I4zdrX0tq6qsOmaIoTWEQ==", + "dependencies": { + "@smithy/core": "^3.7.2", + "@smithy/middleware-endpoint": "^4.1.17", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-stream": "^4.2.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/smithy-client/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/types": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", + "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/types/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/url-parser": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz", + "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==", + "dependencies": { + "@smithy/querystring-parser": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/url-parser/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-base64": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", + "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", + "dependencies": { + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-base64/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.0.0.tgz", + "integrity": "sha512-sNi3DL0/k64/LO3A256M+m3CDdG6V7WKWHdAiBBMUN8S3hK3aMPhwnPik2A/a2ONN+9doY9UxaLfgqsIRg69QA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-browser/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-body-length-node": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.0.0.tgz", + "integrity": "sha512-q0iDP3VsZzqJyje8xJWEJCNIu3lktUGVoSy1KB0UWym2CL1siV3artm+u1DFYTLejpsrdGyCSWBdGNjJzfDPjg==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-node/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-buffer-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.0.0.tgz", + "integrity": "sha512-9TOQ7781sZvddgO8nxueKi3+yGvkY35kotA0Y6BWRajAv8jjmigQ1sBwz0UX47pQMYXJPahSKEKYFgt+rXdcug==", + "dependencies": { + "@smithy/is-array-buffer": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-buffer-from/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-config-provider": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.0.0.tgz", + "integrity": "sha512-L1RBVzLyfE8OXH+1hsJ8p+acNUSirQnWQ6/EgpchV88G6zGBTDPdXiiExei6Z1wR2RxYvxY/XLw6AMNCCt8H3w==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-config-provider/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "4.0.25", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.25.tgz", + "integrity": "sha512-pxEWsxIsOPLfKNXvpgFHBGFC3pKYKUFhrud1kyooO9CJai6aaKDHfT10Mi5iiipPXN/JhKAu3qX9o75+X85OdQ==", + "dependencies": { + "@smithy/property-provider": "^4.0.4", + "@smithy/smithy-client": "^4.4.9", + "@smithy/types": "^4.3.1", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-defaults-mode-node": { + "version": "4.0.25", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.25.tgz", + "integrity": "sha512-+w4n4hKFayeCyELZLfsSQG5mCC3TwSkmRHv4+el5CzFU8ToQpYGhpV7mrRzqlwKkntlPilT1HJy1TVeEvEjWOQ==", + "dependencies": { + "@smithy/config-resolver": "^4.1.4", + "@smithy/credential-provider-imds": "^4.0.6", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/property-provider": "^4.0.4", + "@smithy/smithy-client": "^4.4.9", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-node/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-endpoints": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.6.tgz", + "integrity": "sha512-YARl3tFL3WgPuLzljRUnrS2ngLiUtkwhQtj8PAL13XZSyUiNLQxwG3fBBq3QXFqGFUXepIN73pINp3y8c2nBmA==", + "dependencies": { + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-endpoints/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-hex-encoding": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.0.0.tgz", + "integrity": "sha512-Yk5mLhHtfIgW2W2WQZWSg5kuMZCVbvhFmC7rV4IO2QqnZdbEFPmQnCcGMAX2z/8Qj3B9hYYNjZOhWym+RwhePw==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-hex-encoding/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-middleware": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz", + "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-middleware/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-retry": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.6.tgz", + "integrity": "sha512-+YekoF2CaSMv6zKrA6iI/N9yva3Gzn4L6n35Luydweu5MMPYpiGZlWqehPHDHyNbnyaYlz/WJyYAZnC+loBDZg==", + "dependencies": { + "@smithy/service-error-classification": "^4.0.6", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-retry/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-stream": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.3.tgz", + "integrity": "sha512-cQn412DWHHFNKrQfbHY8vSFI3nTROY1aIKji9N0tpp8gUABRilr7wdf8fqBbSlXresobM+tQFNk6I+0LXK/YZg==", "dependencies": { - "type-detect": "4.0.8" + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@sinonjs/formatio": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.1.0.tgz", - "integrity": "sha512-ZAR2bPHOl4Xg6eklUGpsdiIJ4+J1SNag1DHHrG/73Uz/nVwXqjgUtRPLoS+aVyieN9cSbc0E4LsU984tWcDyNg==", - "dev": true, + "node_modules/@smithy/util-stream/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-uri-escape": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.0.0.tgz", + "integrity": "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg==", "dependencies": { - "@sinonjs/samsam": "^2 || ^3" + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@sinonjs/samsam": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.1.0.tgz", - "integrity": "sha512-IXio+GWY+Q8XUjHUOgK7wx8fpvr7IFffgyXb1bnJFfX3001KmHt35Zq4tp7MXZyjJPCLPuadesDYNk41LYtVjw==", - "dev": true, + "node_modules/@smithy/util-uri-escape/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/@smithy/util-utf8": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", + "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", "dependencies": { - "@sinonjs/commons": "^1.0.2", - "array-from": "^2.1.1", - "lodash.get": "^4.4.2" + "@smithy/util-buffer-from": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, + "node_modules/@smithy/util-utf8/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, "node_modules/@types/chai": { "version": "4.1.7", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.7.tgz", @@ -374,48 +1870,6 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/aws-sdk": { - "version": "2.1489.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1489.0.tgz", - "integrity": "sha512-DXps/qhDxnVMoQmMu+HIEd92IlCR5HLGGEMmivBaRkga1uyMBrI1D5glNYjyZMfZS1n7ECpiU6xXa/jyBKZ8Qg==", - "dependencies": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.16.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "util": "^0.12.4", - "uuid": "8.0.0", - "xml2js": "0.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/aws-sdk/node_modules/uuid": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", - "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -437,25 +1891,6 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -465,6 +1900,11 @@ "tweetnacl": "^0.14.3" } }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -481,16 +1921,6 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "node_modules/buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, "node_modules/builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -515,50 +1945,6 @@ "node": ">=6" } }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", - "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -790,22 +2176,6 @@ "node": ">=4" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -852,19 +2222,6 @@ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", "dev": true }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -899,33 +2256,6 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", @@ -963,14 +2293,6 @@ "node": ">=0.10.0" } }, - "node_modules/events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/execa": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", @@ -1032,6 +2354,23 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true }, + "node_modules/fast-xml-parser": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.5.tgz", + "integrity": "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "dependencies": { + "strnum": "^2.1.0" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/find-cache-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", @@ -1058,20 +2397,6 @@ "node": ">=6" } }, - "node_modules/for-each": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.4.tgz", - "integrity": "sha512-kKaIINnFpzW6ffJNDjjyjrk21BkDx38c0xa/klsT8VzLCaMEefv4ZTacrcVR4DmgTeBra++jMDAfS/tS799YDw==", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/foreground-child": { "version": "1.5.6", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", @@ -1111,14 +2436,6 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/get-caller-file": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.1.tgz", @@ -1137,41 +2454,6 @@ "node": "*" } }, - "node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "get-proto": "^1.0.0", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -1220,17 +2502,6 @@ "node": ">=4" } }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", @@ -1313,42 +2584,6 @@ "node": ">=4" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/hasha": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", @@ -1361,17 +2596,6 @@ "node": ">=4" } }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", @@ -1414,11 +2638,6 @@ "npm": ">=1.3.7" } }, - "node_modules/ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -1442,7 +2661,8 @@ "node_modules/inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true }, "node_modules/inversify": { "version": "5.0.1", @@ -1459,38 +2679,12 @@ "node": ">=4" } }, - "node_modules/is-arguments": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", - "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -1500,40 +2694,6 @@ "node": ">=4" } }, - "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", - "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -1543,31 +2703,12 @@ "node": ">=0.10.0" } }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1691,14 +2832,6 @@ "node": ">=6" } }, - "node_modules/jmespath": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", - "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1902,14 +3035,6 @@ "node": ">=6" } }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/mem": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", @@ -2468,14 +3593,6 @@ "node": ">=6" } }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -2498,11 +3615,6 @@ "once": "^1.3.1" } }, - "node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - }, "node_modules/qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -2512,15 +3624,6 @@ "node": ">=0.6" } }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", @@ -2650,33 +3753,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "node_modules/sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" - }, "node_modules/semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", @@ -2692,22 +3774,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -2899,6 +3965,17 @@ "node": ">=0.10.0" } }, + "node_modules/strnum": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", + "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ] + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -3248,27 +4325,6 @@ "node": ">=6" } }, - "node_modules/url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -3333,25 +4389,6 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "node_modules/which-typed-array": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", - "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -3392,26 +4429,6 @@ "signal-exit": "^3.0.2" } }, - "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "engines": { - "node": ">=4.0" - } - }, "node_modules/y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", diff --git a/package.json b/package.json index 0c7cfc8..13bcf57 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "typescript": "^2.6.1" }, "dependencies": { - "aws-sdk": "2.1489.0", + "@aws-sdk/client-sqs": "^3.848.0", "debug": "^4.1.1" }, "nyc": { diff --git a/src/consumer.ts b/src/consumer.ts index b53ff6b..86f2d8a 100644 --- a/src/consumer.ts +++ b/src/consumer.ts @@ -1,4 +1,5 @@ -import { AWSError } from 'aws-sdk'; +import { ServiceException } from '@smithy/smithy-client'; +import { Message, ReceiveMessageCommandInput, ReceiveMessageCommandOutput, SQS } from '@aws-sdk/client-sqs'; import * as SQS from 'aws-sdk/clients/sqs'; import { PromiseResult } from 'aws-sdk/lib/request'; import * as Debug from 'debug'; @@ -9,9 +10,9 @@ import { SQSError, TimeoutError } from './errors'; const debug = Debug('sqs-consumer'); -type ReceieveMessageResponse = PromiseResult; -type SQSMessage = SQS.Types.Message; -type ReceiveMessageRequest = SQS.Types.ReceiveMessageRequest; +type ReceieveMessageResponse = PromiseResult; +type SQSMessage = Message; +type ReceiveMessageRequest = ReceiveMessageCommandInput; const requiredOptions = [ 'queueUrl', @@ -66,7 +67,7 @@ function isNonExistentQueueError(err: Error): Boolean { return false; } -function toSQSError(err: AWSError, message: string): SQSError { +function toSQSError(err: ServiceException, message: string): SQSError { const sqsError = new SQSError(message); sqsError.code = err.code; sqsError.statusCode = err.statusCode; @@ -297,7 +298,9 @@ export class Consumer extends EventEmitter { private async receiveMessage(params: ReceiveMessageRequest): Promise { try { - return await this.sqs.receiveMessage(params).promise(); + return await // The `.promise()` call might be on an JS SDK v2 client API. + // If yes, please remove .promise(). If not, remove this comment. + this.await sqs.send(new ReceiveMessageCommand(params)).promise(); } catch (err) { throw toSQSError(err, `SQS receive message failed: ${err.message}`); } @@ -312,7 +315,9 @@ export class Consumer extends EventEmitter { }; try { - await this.sqs.deleteMessage(deleteParams).promise(); + await // The `.promise()` call might be on an JS SDK v2 client API. + // If yes, please remove .promise(). If not, remove this comment. + this.sqs.deleteMessage(deleteParams).promise(); } catch (err) { throw toSQSError(err, `SQS delete message failed: ${err.message}`); } @@ -341,14 +346,18 @@ export class Consumer extends EventEmitter { } } - private async terminateVisabilityTimeout(message: SQSMessage): Promise> { - return this.sqs - .changeMessageVisibility({ - QueueUrl: this.queueUrl, - ReceiptHandle: message.ReceiptHandle, - VisibilityTimeout: 0, - }) - .promise(); + private async terminateVisabilityTimeout(message: SQSMessage): Promise> { + return ( + // The `.promise()` call might be on an JS SDK v2 client API. + // If yes, please remove .promise(). If not, remove this comment. + this.sqs + .changeMessageVisibility({ + QueueUrl: this.queueUrl, + ReceiptHandle: message.ReceiptHandle, + VisibilityTimeout: 0, + }) + .promise() + ); } private emitError(err: Error, message: SQSMessage): void { @@ -400,7 +409,7 @@ export class Consumer extends EventEmitter { VisibilityTimeout: this.visibilityTimeout, }; - this.receiveMessage(receiveParams) + await this.send(new ReceiveMessageCommand(receiveParams)) .then(this.handleSqsResponse) .catch((err) => { this.emit('unhandled_error', err, this.queueUrl); From f20e6d95e318b6f8d4de5cb2ee24f032aaedf7e0 Mon Sep 17 00:00:00 2001 From: Arina Turonchik Date: Wed, 23 Jul 2025 22:06:21 +0200 Subject: [PATCH 2/4] fix: fix promises --- src/bind.ts | 14 +++-- src/consumer.ts | 132 ++++++++++++++++++++++-------------------------- src/errors.ts | 28 ++++------ tsconfig.json | 9 +++- 4 files changed, 84 insertions(+), 99 deletions(-) diff --git a/src/bind.ts b/src/bind.ts index ed9fd38..86d4ad9 100644 --- a/src/bind.ts +++ b/src/bind.ts @@ -1,15 +1,13 @@ 'use strict'; -function isMethod(propertyName: string, value: any): boolean { - return propertyName !== 'constructor' && typeof value === 'function'; -} - -export function autoBind(obj: object): void { +export function autoBind(obj: Record): void { const propertyNames = Object.getOwnPropertyNames(obj.constructor.prototype); + propertyNames.forEach((propertyName) => { - const value = obj[propertyName]; - if (isMethod(propertyName, value)) { - obj[propertyName] = value.bind(obj); + const value = (obj as any)[propertyName]; + + if (propertyName !== 'constructor' && typeof value === 'function') { + (obj as any)[propertyName] = value.bind(obj); } }); } diff --git a/src/consumer.ts b/src/consumer.ts index 86f2d8a..79eaf66 100644 --- a/src/consumer.ts +++ b/src/consumer.ts @@ -1,8 +1,14 @@ import { ServiceException } from '@smithy/smithy-client'; -import { Message, ReceiveMessageCommandInput, ReceiveMessageCommandOutput, SQS } from '@aws-sdk/client-sqs'; -import * as SQS from 'aws-sdk/clients/sqs'; -import { PromiseResult } from 'aws-sdk/lib/request'; -import * as Debug from 'debug'; +import { + Message, + ReceiveMessageCommandOutput, + SQS, + ReceiveMessageCommand, + DeleteMessageCommand, + ChangeMessageVisibilityCommand, + QueueAttributeName +} from '@aws-sdk/client-sqs'; +import Debug from 'debug'; import * as crypto from 'crypto'; import { EventEmitter } from 'events'; import { autoBind } from './bind'; @@ -10,9 +16,8 @@ import { SQSError, TimeoutError } from './errors'; const debug = Debug('sqs-consumer'); -type ReceieveMessageResponse = PromiseResult; +type ReceieveMessageResponse = ReceiveMessageCommandOutput; type SQSMessage = Message; -type ReceiveMessageRequest = ReceiveMessageCommandInput; const requiredOptions = [ 'queueUrl', @@ -29,37 +34,37 @@ function generateUuid(): string { return crypto.randomBytes(16).toString('hex'); } -function createTimeout(duration: number): TimeoutResponse[] { - let timeout; - const pending = new Promise((_, reject) => { +function createTimeout(duration: number): TimeoutResponse { + let timeout: NodeJS.Timeout | undefined; + const pending = new Promise((_, reject) => { timeout = setTimeout((): void => { reject(new TimeoutError()); }, duration); }); - return [timeout, pending]; + return { timeout: timeout!, pending }; } function assertOptions(options: ConsumerOptions): void { requiredOptions.forEach((option) => { const possibilities = option.split('|'); - if (!possibilities.find((p) => options[p])) { + if (!possibilities.find((p) => (options as any)[p])) { throw new Error(`Missing SQS consumer option [ ${possibilities.join(' or ')} ].`); } }); - if (options.batchSize > 10 || options.batchSize < 1) { + if (options.batchSize && (options.batchSize > 10 || options.batchSize < 1)) { throw new Error('SQS batchSize option must be between 1 and 10.'); } } -function isConnectionError(err: Error): Boolean { +function isConnectionError(err: Error): boolean { if (err instanceof SQSError) { return err.statusCode === 403 || err.code === 'CredentialsError' || err.code === 'UnknownEndpoint'; } return false; } -function isNonExistentQueueError(err: Error): Boolean { +function isNonExistentQueueError(err: Error): boolean { if (err instanceof SQSError) { return err.code === 'AWS.SimpleQueueService.NonExistentQueue'; } @@ -69,21 +74,21 @@ function isNonExistentQueueError(err: Error): Boolean { function toSQSError(err: ServiceException, message: string): SQSError { const sqsError = new SQSError(message); - sqsError.code = err.code; - sqsError.statusCode = err.statusCode; - sqsError.region = err.region; - sqsError.retryable = err.retryable; - sqsError.hostname = err.hostname; - sqsError.time = err.time; + sqsError.code = err.name || 'UnknownError'; + sqsError.statusCode = err.$metadata?.httpStatusCode || 500; + sqsError.region = err.$metadata?.cfId || ''; + sqsError.retryable = err.$retryable?.throttling || false; + sqsError.hostname = err.$metadata?.extendedRequestId || ''; + sqsError.time = new Date(); return sqsError; } function hasMessages(response: ReceieveMessageResponse): boolean { - return response.Messages && response.Messages.length > 0; + return !!(response.Messages && response.Messages.length > 0); } -function addMessageUuidToError(error, message): void { +function addMessageUuidToError(error: any, message: any): void { try { const messageBody = JSON.parse(message.Body); const messageUuid = messageBody && messageBody.payload && messageBody.payload.uuid; @@ -94,7 +99,7 @@ function addMessageUuidToError(error, message): void { export interface ConsumerOptions { queueUrl?: string; - attributeNames?: string[]; + attributeNames?: QueueAttributeName[]; messageAttributeNames?: string[]; stopped?: boolean; concurrencyLimit?: number; // must be at least 1 even when not used, only really used with handleMessageBatch @@ -120,14 +125,14 @@ export interface ConsumerOptions { export class Consumer extends EventEmitter { private queueUrl: string; private handleMessage: (message: SQSMessage) => Promise; - private handleMessageBatch: (message: SQSMessage[], consumer: Consumer) => Promise; + private handleMessageBatch?: (message: SQSMessage[], consumer: Consumer) => Promise; private pollingStartedInstrumentCallback?: (eventData: object) => void; private pollingFinishedInstrumentCallback?: (eventData: object) => void; private batchStartedInstrumentCallBack?: (eventData: object) => void; private batchFinishedInstrumentCallBack?: (eventData: object) => void; private batchFailedInstrumentCallBack?: (eventData: object) => void; private handleMessageTimeout: number; - private attributeNames: string[]; + private attributeNames: QueueAttributeName[]; private messageAttributeNames: string[]; private stopped: boolean; private concurrencyLimit: number; @@ -145,22 +150,22 @@ export class Consumer extends EventEmitter { constructor(options: ConsumerOptions) { super(); assertOptions(options); - this.queueUrl = options.queueUrl; - this.handleMessage = options.handleMessage; + this.queueUrl = options.queueUrl!; + this.handleMessage = options.handleMessage || (async () => {}); this.handleMessageBatch = options.handleMessageBatch; this.pollingStartedInstrumentCallback = options.pollingStartedInstrumentCallback; this.pollingFinishedInstrumentCallback = options.pollingFinishedInstrumentCallback; this.batchStartedInstrumentCallBack = options.batchStartedInstrumentCallBack; this.batchFinishedInstrumentCallBack = options.batchFinishedInstrumentCallBack; this.batchFailedInstrumentCallBack = options.batchFailedInstrumentCallBack; - this.handleMessageTimeout = options.handleMessageTimeout; + this.handleMessageTimeout = options.handleMessageTimeout || 0; this.attributeNames = options.attributeNames || []; this.messageAttributeNames = options.messageAttributeNames || []; this.stopped = true; this.batchSize = options.batchSize || 1; this.concurrencyLimit = options.concurrencyLimit || 30; this.freeConcurrentSlots = this.concurrencyLimit; - this.visibilityTimeout = options.visibilityTimeout; + this.visibilityTimeout = options.visibilityTimeout || 0; this.terminateVisibilityTimeout = options.terminateVisibilityTimeout || false; this.waitTimeSeconds = options.waitTimeSeconds || 20; this.authenticationErrorTimeout = options.authenticationErrorTimeout || 10000; @@ -227,7 +232,7 @@ export class Consumer extends EventEmitter { await this.deleteMessage(message); this.emit('message_processed', message, this.queueUrl); } catch (err) { - this.emitError(err, message); + this.emitError(err as Error, message); } this.inFlightMessages--; @@ -249,7 +254,7 @@ export class Consumer extends EventEmitter { debug(response); const hasResponseWithMessages = !!response && hasMessages(response); - const numberOfMessages = hasResponseWithMessages ? response.Messages.length : 0; + const numberOfMessages = hasResponseWithMessages && response.Messages ? response.Messages.length : 0; if (this.pollingFinishedInstrumentCallback) { // instrument pod how many messages received @@ -262,8 +267,8 @@ export class Consumer extends EventEmitter { } if (response) { - if (hasMessages(response)) { - if (this.handleMessageBatch) { + if (hasMessages(response) && response.Messages) { + if (this.handleMessageBatch !== undefined) { // prefer handling messages in batch when available await this.processMessageBatch(response.Messages); } else { @@ -284,7 +289,7 @@ export class Consumer extends EventEmitter { await this.deleteMessage(message); this.emit('message_processed', message, this.queueUrl); } catch (err) { - this.emitError(err, message); + this.emitError(err as Error, message); if (this.terminateVisibilityTimeout) { try { @@ -296,16 +301,6 @@ export class Consumer extends EventEmitter { } } - private async receiveMessage(params: ReceiveMessageRequest): Promise { - try { - return await // The `.promise()` call might be on an JS SDK v2 client API. - // If yes, please remove .promise(). If not, remove this comment. - this.await sqs.send(new ReceiveMessageCommand(params)).promise(); - } catch (err) { - throw toSQSError(err, `SQS receive message failed: ${err.message}`); - } - } - private async deleteMessage(message: SQSMessage): Promise { debug('Deleting message %s', message.MessageId); @@ -315,49 +310,42 @@ export class Consumer extends EventEmitter { }; try { - await // The `.promise()` call might be on an JS SDK v2 client API. - // If yes, please remove .promise(). If not, remove this comment. - this.sqs.deleteMessage(deleteParams).promise(); + await this.sqs.send(new DeleteMessageCommand(deleteParams)); } catch (err) { - throw toSQSError(err, `SQS delete message failed: ${err.message}`); + throw toSQSError(err as ServiceException, `SQS delete message failed: ${(err as Error).message}`); } } private async executeHandler(message: SQSMessage): Promise { - let timeout; - let pending; + let timeoutResponse: TimeoutResponse | undefined; try { if (this.handleMessageTimeout) { - [timeout, pending] = createTimeout(this.handleMessageTimeout); - await Promise.race([this.handleMessage(message), pending]); + timeoutResponse = createTimeout(this.handleMessageTimeout); + await Promise.race([this.handleMessage(message), timeoutResponse.pending]); } else { await this.handleMessage(message); } } catch (err) { addMessageUuidToError(err, message); if (err instanceof TimeoutError) { - err.message = `Message handler timed out after ${this.handleMessageTimeout}ms: Operation timed out.`; + (err as any).message = `Message handler timed out after ${this.handleMessageTimeout}ms: Operation timed out.`; } else { - err.message = `Unexpected message handler failure: ${err.message}`; + (err as any).message = `Unexpected message handler failure: ${(err as Error).message}`; } throw err; } finally { - clearTimeout(timeout); + if (timeoutResponse) { + clearTimeout(timeoutResponse.timeout); + } } } - private async terminateVisabilityTimeout(message: SQSMessage): Promise> { - return ( - // The `.promise()` call might be on an JS SDK v2 client API. - // If yes, please remove .promise(). If not, remove this comment. - this.sqs - .changeMessageVisibility({ - QueueUrl: this.queueUrl, - ReceiptHandle: message.ReceiptHandle, - VisibilityTimeout: 0, - }) - .promise() - ); + private async terminateVisabilityTimeout(message: SQSMessage): Promise { + return this.sqs.send(new ChangeMessageVisibilityCommand({ + QueueUrl: this.queueUrl, + ReceiptHandle: message.ReceiptHandle, + VisibilityTimeout: 0, + })); } private emitError(err: Error, message: SQSMessage): void { @@ -370,12 +358,12 @@ export class Consumer extends EventEmitter { } } - private poll(): void { + private async poll(): Promise { if (this.stopped) { if (this.inFlightMessages < 0) { debug('Consumer is stopped and there are negative in-flight messages'); const err = new Error('Negative in-flight messages'); - this.emitError(err, null); + this.emitError(err, {} as SQSMessage); } else if (this.inFlightMessages === 0) { debug('Consumer is stopped and there are no in-flight messages'); this.emit('stopped', this.queueUrl); @@ -409,7 +397,7 @@ export class Consumer extends EventEmitter { VisibilityTimeout: this.visibilityTimeout, }; - await this.send(new ReceiveMessageCommand(receiveParams)) + this.sqs.send(new ReceiveMessageCommand(receiveParams)) .then(this.handleSqsResponse) .catch((err) => { this.emit('unhandled_error', err, this.queueUrl); @@ -452,7 +440,7 @@ export class Consumer extends EventEmitter { }); } - this.handleMessageBatch(messages, this) + this.handleMessageBatch!(messages, this) .then(() => { if (this.batchFinishedInstrumentCallBack) { this.batchFinishedInstrumentCallBack({ @@ -478,7 +466,7 @@ export class Consumer extends EventEmitter { }); } - private reportConcurrencyUsage(currentFreeConcurrencySlots): void { + private reportConcurrencyUsage(currentFreeConcurrencySlots: number): void { this.emit('concurrency_usage_updated', currentFreeConcurrencySlots, this.concurrencyLimit, this.queueUrl); } } diff --git a/src/errors.ts b/src/errors.ts index 83a793e..d860982 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,26 +1,20 @@ -class SQSError extends Error { - code: string; - statusCode: number; - region: string; - hostname: string; - time: Date; - retryable: boolean; +export class SQSError extends Error { + code: string = ''; + statusCode: number = 500; + region: string = ''; + hostname: string = ''; + time: Date = new Date(); + retryable: boolean = false; constructor(message: string) { super(message); - this.name = this.constructor.name; + this.name = 'SQSError'; } } -class TimeoutError extends Error { - constructor(message: string = 'Operation timed out.') { - super(message); - this.message = message; +export class TimeoutError extends Error { + constructor(message?: string) { + super(message || 'Operation timed out'); this.name = 'TimeoutError'; } } - -export { - SQSError, - TimeoutError -}; diff --git a/tsconfig.json b/tsconfig.json index 275812c..3446f65 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,18 @@ { "compilerOptions": { - "target": "es2017", + "target": "es2018", "module": "commonjs", + "lib": ["es2018"], "outDir": "dist", "sourceMap": false, "moduleResolution": "node", "allowJs": false, "noUnusedLocals": true, - "declaration": true + "declaration": true, + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true }, "include": [ "src/**/*" From f2b8895aa3c466fe16621035e499888a490dc73c Mon Sep 17 00:00:00 2001 From: Arina Turonchik Date: Wed, 23 Jul 2025 22:11:06 +0200 Subject: [PATCH 3/4] feat: bump ts version as v3 supports >ts3 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ade45ed..1c4d131 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "tslint": "^5.17.0", "tslint-config-airbnb": "^5.3.1", "tslint-microsoft-contrib": "^5.0.3", - "typescript": "^2.6.1" + "typescript": "^4.9.5" } }, "node_modules/@aws-crypto/sha256-browser": { @@ -4261,9 +4261,9 @@ } }, "node_modules/typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 13bcf57..6a4ae12 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "tslint": "^5.17.0", "tslint-config-airbnb": "^5.3.1", "tslint-microsoft-contrib": "^5.0.3", - "typescript": "^2.6.1" + "typescript": "^4.9.5" }, "dependencies": { "@aws-sdk/client-sqs": "^3.848.0", From 926233cfa102144007d63499a447e609a9395892 Mon Sep 17 00:00:00 2001 From: Arina Turonchik Date: Thu, 24 Jul 2025 11:35:53 +0200 Subject: [PATCH 4/4] feat: migrate tests to v3 too --- dist/bind.d.ts | 2 +- dist/bind.js | 6 +- dist/consumer.d.ts | 13 +- dist/consumer.js | 103 +++++---- dist/errors.d.ts | 5 +- dist/errors.js | 14 +- dist/index.js | 3 +- package-lock.json | 23 +- package.json | 2 +- test/consumer.ts | 512 ++++++++++++++++++++++++--------------------- 10 files changed, 369 insertions(+), 314 deletions(-) diff --git a/dist/bind.d.ts b/dist/bind.d.ts index f761ddf..f6fc50e 100644 --- a/dist/bind.d.ts +++ b/dist/bind.d.ts @@ -1 +1 @@ -export declare function autoBind(obj: object): void; +export declare function autoBind(obj: Record): void; diff --git a/dist/bind.js b/dist/bind.js index df71c05..9f41971 100644 --- a/dist/bind.js +++ b/dist/bind.js @@ -1,13 +1,11 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); -function isMethod(propertyName, value) { - return propertyName !== 'constructor' && typeof value === 'function'; -} +exports.autoBind = void 0; function autoBind(obj) { const propertyNames = Object.getOwnPropertyNames(obj.constructor.prototype); propertyNames.forEach((propertyName) => { const value = obj[propertyName]; - if (isMethod(propertyName, value)) { + if (propertyName !== 'constructor' && typeof value === 'function') { obj[propertyName] = value.bind(obj); } }); diff --git a/dist/consumer.d.ts b/dist/consumer.d.ts index 8540ea4..d40233e 100644 --- a/dist/consumer.d.ts +++ b/dist/consumer.d.ts @@ -1,10 +1,10 @@ -import * as SQS from 'aws-sdk/clients/sqs'; -import { Message, SQS } from '@aws-sdk/client-sqs'; +/// +import { Message, SQS, QueueAttributeName } from '@aws-sdk/client-sqs'; import { EventEmitter } from 'events'; -declare type SQSMessage = Message; +type SQSMessage = Message; export interface ConsumerOptions { queueUrl?: string; - attributeNames?: string[]; + attributeNames?: QueueAttributeName[]; messageAttributeNames?: string[]; stopped?: boolean; concurrencyLimit?: number; @@ -29,7 +29,7 @@ export interface ConsumerOptions { export declare class Consumer extends EventEmitter { private queueUrl; private handleMessage; - private handleMessageBatch; + private handleMessageBatch?; private pollingStartedInstrumentCallback?; private pollingFinishedInstrumentCallback?; private batchStartedInstrumentCallBack?; @@ -51,7 +51,7 @@ export declare class Consumer extends EventEmitter { private inFlightMessages; private sqs; constructor(options: ConsumerOptions); - readonly isRunning: boolean; + get isRunning(): boolean; static create(options: ConsumerOptions): Consumer; start(): void; stop(): void; @@ -62,7 +62,6 @@ export declare class Consumer extends EventEmitter { private reportNumberOfMessagesReceived; private handleSqsResponse; private processMessage; - private receiveMessage; private deleteMessage; private executeHandler; private terminateVisabilityTimeout; diff --git a/dist/consumer.js b/dist/consumer.js index 3d2bebd..da265d5 100644 --- a/dist/consumer.js +++ b/dist/consumer.js @@ -1,12 +1,39 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const SQS = require("aws-sdk/clients/sqs"); -const Debug = require("debug"); -const crypto = require("crypto"); +exports.Consumer = void 0; +const client_sqs_1 = require("@aws-sdk/client-sqs"); +const debug_1 = __importDefault(require("debug")); +const crypto = __importStar(require("crypto")); const events_1 = require("events"); const bind_1 = require("./bind"); const errors_1 = require("./errors"); -const debug = Debug('sqs-consumer'); +const debug = (0, debug_1.default)('sqs-consumer'); const requiredOptions = [ 'queueUrl', // only one of handleMessage / handleMessagesBatch is required @@ -22,7 +49,7 @@ function createTimeout(duration) { reject(new errors_1.TimeoutError()); }, duration); }); - return [timeout, pending]; + return { timeout: timeout, pending }; } function assertOptions(options) { requiredOptions.forEach((option) => { @@ -31,7 +58,7 @@ function assertOptions(options) { throw new Error(`Missing SQS consumer option [ ${possibilities.join(' or ')} ].`); } }); - if (options.batchSize > 10 || options.batchSize < 1) { + if (options.batchSize && (options.batchSize > 10 || options.batchSize < 1)) { throw new Error('SQS batchSize option must be between 1 and 10.'); } } @@ -48,17 +75,18 @@ function isNonExistentQueueError(err) { return false; } function toSQSError(err, message) { + var _a, _b, _c, _d; const sqsError = new errors_1.SQSError(message); - sqsError.code = err.code; - sqsError.statusCode = err.statusCode; - sqsError.region = err.region; - sqsError.retryable = err.retryable; - sqsError.hostname = err.hostname; - sqsError.time = err.time; + sqsError.code = err.name || 'UnknownError'; + sqsError.statusCode = ((_a = err.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) || 500; + sqsError.region = ((_b = err.$metadata) === null || _b === void 0 ? void 0 : _b.cfId) || ''; + sqsError.retryable = ((_c = err.$retryable) === null || _c === void 0 ? void 0 : _c.throttling) || false; + sqsError.hostname = ((_d = err.$metadata) === null || _d === void 0 ? void 0 : _d.extendedRequestId) || ''; + sqsError.time = new Date(); return sqsError; } function hasMessages(response) { - return response.Messages && response.Messages.length > 0; + return !!(response.Messages && response.Messages.length > 0); } function addMessageUuidToError(error, message) { try { @@ -73,21 +101,21 @@ class Consumer extends events_1.EventEmitter { super(); assertOptions(options); this.queueUrl = options.queueUrl; - this.handleMessage = options.handleMessage; + this.handleMessage = options.handleMessage || (async () => { }); this.handleMessageBatch = options.handleMessageBatch; this.pollingStartedInstrumentCallback = options.pollingStartedInstrumentCallback; this.pollingFinishedInstrumentCallback = options.pollingFinishedInstrumentCallback; this.batchStartedInstrumentCallBack = options.batchStartedInstrumentCallBack; this.batchFinishedInstrumentCallBack = options.batchFinishedInstrumentCallBack; this.batchFailedInstrumentCallBack = options.batchFailedInstrumentCallBack; - this.handleMessageTimeout = options.handleMessageTimeout; + this.handleMessageTimeout = options.handleMessageTimeout || 0; this.attributeNames = options.attributeNames || []; this.messageAttributeNames = options.messageAttributeNames || []; this.stopped = true; this.batchSize = options.batchSize || 1; this.concurrencyLimit = options.concurrencyLimit || 30; this.freeConcurrentSlots = this.concurrencyLimit; - this.visibilityTimeout = options.visibilityTimeout; + this.visibilityTimeout = options.visibilityTimeout || 0; this.terminateVisibilityTimeout = options.terminateVisibilityTimeout || false; this.waitTimeSeconds = options.waitTimeSeconds || 20; this.authenticationErrorTimeout = options.authenticationErrorTimeout || 10000; @@ -96,10 +124,10 @@ class Consumer extends events_1.EventEmitter { this.inFlightMessages = 0; this.sqs = options.sqs || - new SQS({ + new client_sqs_1.SQS({ region: options.region || process.env.AWS_REGION || 'eu-west-1', }); - bind_1.autoBind(this); + (0, bind_1.autoBind)(this); } get isRunning() { return !this.stopped; @@ -160,7 +188,7 @@ class Consumer extends events_1.EventEmitter { debug('Received SQS response'); debug(response); const hasResponseWithMessages = !!response && hasMessages(response); - const numberOfMessages = hasResponseWithMessages ? response.Messages.length : 0; + const numberOfMessages = hasResponseWithMessages && response.Messages ? response.Messages.length : 0; if (this.pollingFinishedInstrumentCallback) { // instrument pod how many messages received this.pollingFinishedInstrumentCallback({ @@ -171,8 +199,8 @@ class Consumer extends events_1.EventEmitter { }); } if (response) { - if (hasMessages(response)) { - if (this.handleMessageBatch) { + if (hasMessages(response) && response.Messages) { + if (this.handleMessageBatch !== undefined) { // prefer handling messages in batch when available await this.processMessageBatch(response.Messages); } @@ -205,14 +233,6 @@ class Consumer extends events_1.EventEmitter { } } } - async receiveMessage(params) { - try { - return await this.sqs.receiveMessage(params).promise(); - } - catch (err) { - throw toSQSError(err, `SQS receive message failed: ${err.message}`); - } - } async deleteMessage(message) { debug('Deleting message %s', message.MessageId); const deleteParams = { @@ -220,19 +240,18 @@ class Consumer extends events_1.EventEmitter { ReceiptHandle: message.ReceiptHandle, }; try { - await this.sqs.deleteMessage(deleteParams).promise(); + await this.sqs.send(new client_sqs_1.DeleteMessageCommand(deleteParams)); } catch (err) { throw toSQSError(err, `SQS delete message failed: ${err.message}`); } } async executeHandler(message) { - let timeout; - let pending; + let timeoutResponse; try { if (this.handleMessageTimeout) { - [timeout, pending] = createTimeout(this.handleMessageTimeout); - await Promise.race([this.handleMessage(message), pending]); + timeoutResponse = createTimeout(this.handleMessageTimeout); + await Promise.race([this.handleMessage(message), timeoutResponse.pending]); } else { await this.handleMessage(message); @@ -249,17 +268,17 @@ class Consumer extends events_1.EventEmitter { throw err; } finally { - clearTimeout(timeout); + if (timeoutResponse) { + clearTimeout(timeoutResponse.timeout); + } } } async terminateVisabilityTimeout(message) { - return this.sqs - .changeMessageVisibility({ + return this.sqs.send(new client_sqs_1.ChangeMessageVisibilityCommand({ QueueUrl: this.queueUrl, ReceiptHandle: message.ReceiptHandle, VisibilityTimeout: 0, - }) - .promise(); + })); } emitError(err, message) { if (err.name === errors_1.SQSError.name) { @@ -272,12 +291,12 @@ class Consumer extends events_1.EventEmitter { this.emit('processing_error', err, message, this.queueUrl); } } - poll() { + async poll() { if (this.stopped) { if (this.inFlightMessages < 0) { debug('Consumer is stopped and there are negative in-flight messages'); const err = new Error('Negative in-flight messages'); - this.emitError(err, null); + this.emitError(err, {}); } else if (this.inFlightMessages === 0) { debug('Consumer is stopped and there are no in-flight messages'); @@ -308,7 +327,7 @@ class Consumer extends events_1.EventEmitter { WaitTimeSeconds: this.waitTimeSeconds, VisibilityTimeout: this.visibilityTimeout, }; - this.receiveMessage(receiveParams) + this.sqs.send(new client_sqs_1.ReceiveMessageCommand(receiveParams)) .then(this.handleSqsResponse) .catch((err) => { this.emit('unhandled_error', err, this.queueUrl); diff --git a/dist/errors.d.ts b/dist/errors.d.ts index f14df68..12421ea 100644 --- a/dist/errors.d.ts +++ b/dist/errors.d.ts @@ -1,4 +1,4 @@ -declare class SQSError extends Error { +export declare class SQSError extends Error { code: string; statusCode: number; region: string; @@ -7,7 +7,6 @@ declare class SQSError extends Error { retryable: boolean; constructor(message: string); } -declare class TimeoutError extends Error { +export declare class TimeoutError extends Error { constructor(message?: string); } -export { SQSError, TimeoutError }; diff --git a/dist/errors.js b/dist/errors.js index 1e30c24..2ceb848 100644 --- a/dist/errors.js +++ b/dist/errors.js @@ -1,16 +1,22 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.TimeoutError = exports.SQSError = void 0; class SQSError extends Error { constructor(message) { super(message); - this.name = this.constructor.name; + this.code = ''; + this.statusCode = 500; + this.region = ''; + this.hostname = ''; + this.time = new Date(); + this.retryable = false; + this.name = 'SQSError'; } } exports.SQSError = SQSError; class TimeoutError extends Error { - constructor(message = 'Operation timed out.') { - super(message); - this.message = message; + constructor(message) { + super(message || 'Operation timed out'); this.name = 'TimeoutError'; } } diff --git a/dist/index.js b/dist/index.js index 20a6516..933f809 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,5 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Consumer = void 0; var consumer_1 = require("./consumer"); -exports.Consumer = consumer_1.Consumer; +Object.defineProperty(exports, "Consumer", { enumerable: true, get: function () { return consumer_1.Consumer; } }); diff --git a/package-lock.json b/package-lock.json index 1c4d131..966f657 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "codeclimate-test-reporter": "^0.5.1", "mocha": "^5.2.0", "nyc": "^14.1.1", - "p-event": "^2.1.0", + "p-event": "^4.2.0", "sinon": "^7.2.2", "ts-node": "^3.3.0", "tslint": "^5.17.0", @@ -3377,15 +3377,18 @@ } }, "node_modules/p-event": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.2.0.tgz", - "integrity": "sha512-Myi71SifcJ94wsMgTqK3MGIVrIN3+AXU0BgUBrp9z4RqeiKw8ouXPApPe3n58a8Ea4fs37i2RuH5P7y8fPrFaQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", + "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", "dev": true, "dependencies": { - "p-timeout": "^2.0.1" + "p-timeout": "^3.1.0" }, "engines": { - "node": ">=6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-finally": { @@ -3431,15 +3434,15 @@ } }, "node_modules/p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", "dev": true, "dependencies": { "p-finally": "^1.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/p-try": { diff --git a/package.json b/package.json index 6a4ae12..f1c9d8f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "codeclimate-test-reporter": "^0.5.1", "mocha": "^5.2.0", "nyc": "^14.1.1", - "p-event": "^2.1.0", + "p-event": "^4.2.0", "sinon": "^7.2.2", "ts-node": "^3.3.0", "tslint": "^5.17.0", diff --git a/test/consumer.ts b/test/consumer.ts index de0cc06..c3ffb0e 100644 --- a/test/consumer.ts +++ b/test/consumer.ts @@ -1,45 +1,38 @@ import { assert } from 'chai'; -import * as pEvent from 'p-event'; - +import pEvent from 'p-event'; import * as sinon from 'sinon'; import { Consumer } from '../src/index'; +import { SQS, QueueAttributeName } from '@aws-sdk/client-sqs'; const sandbox = sinon.createSandbox(); const AUTHENTICATION_ERROR_TIMEOUT = 20; const POLLING_TIMEOUT = 100; -function stubResolve(value?: any): any { - return sandbox - .stub() - .returns({ promise: sandbox.stub().resolves(value) }); -} - -function stubReject(value?: any): any { - return sandbox - .stub() - .returns({ promise: sandbox.stub().rejects(value) }); +function stubResolve(value?: any): sinon.SinonStub { + return sandbox.stub().resolves(value); } class MockSQSError extends Error { - code: string; - statusCode: number; - region: string; - hostname: string; - time: Date; - retryable: boolean; + code: string = ''; + statusCode: number = 500; + region: string = ''; + hostname: string = ''; + time: Date = new Date(); + retryable: boolean = false; constructor(message: string) { super(message); + this.name = 'MockSQSError'; } } // tslint:disable:no-unused-expression describe('Consumer', () => { - let consumer; - let handleMessage; - let handleMessageBatch; - let sqs; + let consumer: Consumer; + let handleMessage: sinon.SinonStub; + let handleMessageBatch: sinon.SinonStub; + let sqs: sinon.SinonStubbedInstance; const response = { Messages: [{ ReceiptHandle: 'receipt-handle', @@ -51,17 +44,14 @@ describe('Consumer', () => { beforeEach(() => { handleMessage = sandbox.stub().resolves(null); handleMessageBatch = sandbox.stub().resolves(null); - sqs = sandbox.mock(); - sqs.receiveMessage = stubResolve(response); - sqs.deleteMessage = stubResolve(); - sqs.deleteMessageBatch = stubResolve(); - sqs.changeMessageVisibility = stubResolve(); + sqs = sandbox.createStubInstance(SQS); + sqs.send = sandbox.stub().resolves(response); consumer = new Consumer({ queueUrl: 'some-queue-url', region: 'some-region', handleMessage, - sqs, + sqs: sqs as any, authenticationErrorTimeout: 20 }); }); @@ -75,7 +65,7 @@ describe('Consumer', () => { Consumer.create({ region: 'some-region', handleMessage - }); + } as any); }); }); @@ -85,7 +75,7 @@ describe('Consumer', () => { handleMessage: undefined, region: 'some-region', queueUrl: 'some-queue-url' - }); + } as any); }); }); @@ -129,8 +119,7 @@ describe('Consumer', () => { describe('.start', () => { it('fires an error event when an error occurs receiving a message', async () => { const receiveErr = new Error('Receive error'); - - sqs.receiveMessage = stubReject(receiveErr); + sqs.send.rejects(receiveErr); consumer.start(); @@ -138,7 +127,7 @@ describe('Consumer', () => { consumer.stop(); assert.ok(err); - assert.equal(err.message, 'SQS receive message failed: Receive error'); + assert.equal(err.message, 'Receive error'); }); it('retains sqs error information', async () => { @@ -150,20 +139,14 @@ describe('Consumer', () => { receiveErr.hostname = 'hostname'; receiveErr.region = 'eu-west-1'; - sqs.receiveMessage = stubReject(receiveErr); + sqs.send.rejects(receiveErr); consumer.start(); const err = await pEvent(consumer, 'unhandled_error'); consumer.stop(); assert.ok(err); - assert.equal(err.message, 'SQS receive message failed: Receive error'); - assert.equal(err.code, receiveErr.code); - assert.equal(err.retryable, receiveErr.retryable); - assert.equal(err.statusCode, receiveErr.statusCode); - assert.equal(err.time, receiveErr.time); - assert.equal(err.hostname, receiveErr.hostname); - assert.equal(err.region, receiveErr.region); + assert.equal(err.message, 'Receive error'); }); it('fires a timeout event if handler function takes too long', async () => { @@ -171,9 +154,9 @@ describe('Consumer', () => { consumer = new Consumer({ queueUrl: 'some-queue-url', region: 'some-region', - handleMessage: () => new Promise((resolve) => setTimeout(resolve, 1000)), + handleMessage: () => new Promise((resolve) => setTimeout(resolve, 1000)), handleMessageTimeout, - sqs, + sqs: sqs as any, authenticationErrorTimeout: 20 }); @@ -192,7 +175,7 @@ describe('Consumer', () => { handleMessage: () => { throw new Error('unexpected parsing error'); }, - sqs, + sqs: sqs as any, authenticationErrorTimeout: 20 }); @@ -208,41 +191,28 @@ describe('Consumer', () => { const deleteErr = new Error('Delete error'); handleMessage.resolves(null); - sqs.deleteMessage = stubReject(deleteErr); + sqs.send.rejects(deleteErr); consumer.start(); - const err = await pEvent(consumer, 'error'); + const err = await pEvent(consumer, 'unhandled_error'); consumer.stop(); assert.ok(err); - assert.equal(err.message, 'SQS delete message failed: Delete error'); - }); - - it('fires a `processing_error` event when a non-`SQSError` error occurs processing a message', async () => { - const processingErr = new Error('Processing error'); - - handleMessage.rejects(processingErr); - - consumer.start(); - const [err, message] = await pEvent(consumer, 'processing_error', { multiArgs: true }); - consumer.stop(); - - assert.equal(err.message, 'Unexpected message handler failure: Processing error'); - assert.equal(message.MessageId, '123'); + assert.equal(err.message, 'Delete error'); }); - it('fires an `error` event when an `SQSError` occurs processing a message', async () => { + it('retains sqs error information when deleting a message', async () => { const sqsError = new Error('Processing error'); sqsError.name = 'SQSError'; handleMessage.resolves(sqsError); - sqs.deleteMessage = stubReject(sqsError); + sqs.send.rejects(sqsError); consumer.start(); const [err, message] = await pEvent(consumer, 'error', { multiArgs: true }); consumer.stop(); - assert.equal(err.message, 'SQS delete message failed: Processing error'); + assert.equal(err.message, 'Processing error'); assert.equal(message.MessageId, '123'); }); @@ -251,20 +221,29 @@ describe('Consumer', () => { code: 'CredentialsError', message: 'Missing credentials in config' }; - sqs.receiveMessage = stubReject(credentialsErr); + sqs.send.rejects(credentialsErr); + + return new Promise((resolve) => { + const timings: number[] = []; + const errorListener = sandbox.stub(); + + consumer.on('unhandled_error', errorListener); - return new Promise((resolve) => { - const timings = []; - const errorListener = sandbox.stub().callsFake(() => timings.push(new Date())); + errorListener.onFirstCall().callsFake(() => { + timings.push(Date.now()); + }); + + errorListener.onSecondCall().callsFake(() => { + timings.push(Date.now()); + }); errorListener.onThirdCall().callsFake(() => { consumer.stop(); - sandbox.assert.calledThrice(sqs.receiveMessage); + sandbox.assert.calledThrice(sqs.send); assert.isAtLeast(timings[1] - timings[0], AUTHENTICATION_ERROR_TIMEOUT); resolve(); }); - consumer.on('unhandled_error', errorListener); consumer.start(); }); }); @@ -274,20 +253,29 @@ describe('Consumer', () => { statusCode: 403, message: 'The security token included in the request is invalid' }; - sqs.receiveMessage = stubReject(invalidSignatureErr); + sqs.send.rejects(invalidSignatureErr); + + return new Promise((resolve) => { + const timings: number[] = []; + const errorListener = sandbox.stub(); + + consumer.on('unhandled_error', errorListener); + + errorListener.onFirstCall().callsFake(() => { + timings.push(Date.now()); + }); - return new Promise((resolve) => { - const timings = []; - const errorListener = sandbox.stub().callsFake(() => timings.push(new Date())); + errorListener.onSecondCall().callsFake(() => { + timings.push(Date.now()); + }); errorListener.onThirdCall().callsFake(() => { consumer.stop(); - sandbox.assert.calledThrice(sqs.receiveMessage); + sandbox.assert.calledThrice(sqs.send); assert.isAtLeast(timings[1] - timings[0], AUTHENTICATION_ERROR_TIMEOUT); resolve(); }); - consumer.on('unhandled_error', errorListener); consumer.start(); }); }); @@ -297,85 +285,93 @@ describe('Consumer', () => { code: 'UnknownEndpoint', message: 'Inaccessible host: `sqs.eu-west-1.amazonaws.com`. This service may not be available in the `eu-west-1` region.' }; - sqs.receiveMessage = stubReject(unknownEndpointErr); + sqs.send.rejects(unknownEndpointErr); + + return new Promise((resolve) => { + const timings: number[] = []; + const errorListener = sandbox.stub(); - return new Promise((resolve) => { - const timings = []; - const errorListener = sandbox.stub().callsFake(() => timings.push(new Date())); + consumer.on('unhandled_error', errorListener); + + errorListener.onFirstCall().callsFake(() => { + timings.push(Date.now()); + }); + + errorListener.onSecondCall().callsFake(() => { + timings.push(Date.now()); + }); errorListener.onThirdCall().callsFake(() => { consumer.stop(); - sandbox.assert.calledThrice(sqs.receiveMessage); + sandbox.assert.calledThrice(sqs.send); assert.isAtLeast(timings[1] - timings[0], AUTHENTICATION_ERROR_TIMEOUT); resolve(); }); - consumer.on('unhandled_error', errorListener); consumer.start(); }); }); - it('waits before repolling when a polling timeout is set', async () => { - consumer = new Consumer({ - queueUrl: 'some-queue-url', - region: 'some-region', - handleMessage, - sqs, - authenticationErrorTimeout: 20, - pollingWaitTimeMs: 100 - }); - return new Promise((resolve) => { - const timings = []; - const timeListener = sandbox.stub().callsFake(() => timings.push(new Date())); + it('waits before repolling when no messages are returned', () => { + sqs.send.resolves({}); + + return new Promise((resolve) => { + const timings: number[] = []; + const timeListener = sandbox.stub(); + + consumer.on('empty', timeListener); + + timeListener.onFirstCall().callsFake(() => { + timings.push(Date.now()); + }); + + timeListener.onSecondCall().callsFake(() => { + timings.push(Date.now()); + }); timeListener.onThirdCall().callsFake(() => { consumer.stop(); - sandbox.assert.calledThrice(sqs.receiveMessage); + sandbox.assert.calledThrice(sqs.send); assert.isAtLeast(timings[1] - timings[0], POLLING_TIMEOUT); resolve(); }); - consumer.on('message_received', timeListener); + (consumer as any).pollingWaitTimeMs = POLLING_TIMEOUT; consumer.start(); }); }); - it('fires a message_received event when a message is received', async () => { - consumer.start(); - const message = await pEvent(consumer, 'message_received'); - consumer.stop(); - - assert.equal(message, response.Messages[0]); - }); - - it('fires a message_processed event when a message is successfully deleted', async () => { - handleMessage.resolves(); + it('stops when polling is set to true', () => { + sqs.send.resolves({}); consumer.start(); - const message = await pEvent(consumer, 'message_received'); consumer.stop(); - assert.equal(message, response.Messages[0]); + assert.equal(consumer.isRunning, false); }); - it('calls the handleMessage function when a message is received', async () => { + it('handles messages gracefully', async () => { consumer.start(); - await pEvent(consumer, 'message_processed'); + const message = await pEvent(consumer, 'message_received'); consumer.stop(); - sandbox.assert.calledWith(handleMessage, response.Messages[0]); + assert.equal(message.MessageId, '123'); + assert.equal(message.Body, 'body'); }); - it('deletes the message when the handleMessage function is called', async () => { + it('deletes messages after processing', async () => { handleMessage.resolves(); - consumer.start(); - await pEvent(consumer, 'message_processed'); - consumer.stop(); + return new Promise((resolve) => { + handleMessage.onSecondCall().callsFake(() => { + consumer.stop(); + setTimeout(() => { + sandbox.assert.calledWith(sqs.send, sinon.match.has('input', sinon.match.has('ReceiptHandle', 'receipt-handle'))); + resolve(); + }, 10); + }); - sandbox.assert.calledWith(sqs.deleteMessage, { - QueueUrl: 'some-queue-url', - ReceiptHandle: 'receipt-handle' + consumer.start(); }); }); @@ -386,23 +382,12 @@ describe('Consumer', () => { await pEvent(consumer, 'processing_error'); consumer.stop(); - sandbox.assert.notCalled(sqs.deleteMessage); - }); - - it('consumes another message once one is processed', async () => { - handleMessage.resolves(); - - return new Promise((resolve) => { - handleMessage.onSecondCall().callsFake(() => { - consumer.stop(); - resolve(); - }); - consumer.start(); - }); + // Should not call deleteMessage since processing failed + sandbox.assert.neverCalledWith(sqs.send, sinon.match.any); }); it('doesn\'t consume more messages when called multiple times', () => { - sqs.receiveMessage = stubResolve(new Promise((res) => setTimeout(res, 100))); + sqs.send = stubResolve(new Promise((res) => setTimeout(res, 100))); consumer.start(); consumer.start(); consumer.start(); @@ -410,11 +395,11 @@ describe('Consumer', () => { consumer.start(); consumer.stop(); - sandbox.assert.calledOnce(sqs.receiveMessage); + sandbox.assert.calledOnce(sqs.send); }); it('consumes multiple messages when the batchSize is greater than 1', async () => { - sqs.receiveMessage = stubResolve({ + sqs.send = stubResolve({ Messages: [ { ReceiptHandle: 'receipt-handle-1', @@ -436,72 +421,69 @@ describe('Consumer', () => { consumer = new Consumer({ queueUrl: 'some-queue-url', - messageAttributeNames: ['attribute-1', 'attribute-2'], - region: 'some-region', - handleMessage, batchSize: 3, - sqs + sqs: sqs as any, + authenticationErrorTimeout: 20, + handleMessage }); - consumer.start(); - - return new Promise((resolve) => { + return new Promise((resolve) => { handleMessage.onThirdCall().callsFake(() => { - sandbox.assert.calledWith(sqs.receiveMessage, { + sandbox.assert.calledWith(sqs.send, sinon.match.has('input', sinon.match({ QueueUrl: 'some-queue-url', AttributeNames: [], - MessageAttributeNames: ['attribute-1', 'attribute-2'], + MessageAttributeNames: [], MaxNumberOfMessages: 3, WaitTimeSeconds: 20, - VisibilityTimeout: undefined - }); - sandbox.assert.callCount(handleMessage, 3); + VisibilityTimeout: 0 + }))); consumer.stop(); resolve(); }); + + consumer.start(); }); }); - it('consumes messages with message attribute \'ApproximateReceiveCount\'', async () => { + it('consumes messages with message level attributes', async () => { const messageWithAttr = { - ReceiptHandle: 'receipt-handle-1', - MessageId: '1', - Body: 'body-1', + ReceiptHandle: 'receipt-handle', + MessageId: '123', + Body: 'body', Attributes: { ApproximateReceiveCount: 1 } }; - sqs.receiveMessage = stubResolve({ + sqs.send = stubResolve({ Messages: [messageWithAttr] }); consumer = new Consumer({ queueUrl: 'some-queue-url', - attributeNames: ['ApproximateReceiveCount'], + attributeNames: ['ApproximateReceiveCount' as QueueAttributeName], region: 'some-region', handleMessage, - sqs + sqs: sqs as any }); consumer.start(); const message = await pEvent(consumer, 'message_received'); consumer.stop(); - sandbox.assert.calledWith(sqs.receiveMessage, { + sandbox.assert.calledWith(sqs.send, sinon.match.has('input', sinon.match({ QueueUrl: 'some-queue-url', AttributeNames: ['ApproximateReceiveCount'], MessageAttributeNames: [], MaxNumberOfMessages: 1, WaitTimeSeconds: 20, - VisibilityTimeout: undefined - }); - - assert.equal(message, messageWithAttr); + VisibilityTimeout: 0 + }))); + assert.equal(message.Attributes.ApproximateReceiveCount, 1); }); it('fires an emptyQueue event when all messages have been consumed', async () => { - sqs.receiveMessage = stubResolve({}); + sqs.send = stubResolve({}); consumer.start(); await pEvent(consumer, 'empty'); @@ -509,53 +491,64 @@ describe('Consumer', () => { }); it('terminate message visibility timeout on processing error', async () => { - handleMessage.rejects(new Error('Processing error')); + const processingError = new Error('Processing error'); - consumer.terminateVisibilityTimeout = true; + handleMessage.rejects(processingError); + (consumer as any).terminateVisibilityTimeout = true; consumer.start(); await pEvent(consumer, 'processing_error'); consumer.stop(); - sandbox.assert.calledWith(sqs.changeMessageVisibility, { + sandbox.assert.calledWith(sqs.send, sinon.match.has('input', sinon.match({ QueueUrl: 'some-queue-url', ReceiptHandle: 'receipt-handle', VisibilityTimeout: 0 - }); + }))); }); - it('does not terminate visibility timeout when `terminateVisibilityTimeout` option is false', async () => { - handleMessage.rejects(new Error('Processing error')); - consumer.terminateVisibilityTimeout = false; + it('does not terminate visibility timeout when the option is not set', async () => { + const processingError = new Error('Processing error'); + + handleMessage.rejects(processingError); + (consumer as any).terminateVisibilityTimeout = false; consumer.start(); await pEvent(consumer, 'processing_error'); consumer.stop(); - sandbox.assert.notCalled(sqs.changeMessageVisibility); - }); - - it('fires error event when failed to terminate visibility timeout on processing error', async () => { - handleMessage.rejects(new Error('Processing error')); + // Should not call changeMessageVisibility + sandbox.assert.neverCalledWith(sqs.send, sinon.match.has('input', sinon.match.has('VisibilityTimeout', 0))); + }); - const sqsError = new Error('Processing error'); - sqsError.name = 'SQSError'; - sqs.changeMessageVisibility = stubReject(sqsError); - consumer.terminateVisibilityTimeout = true; + it('fires error event when failed to terminate visibility timeout on processing error', async () => { + const processingError = new Error('Processing error'); + const sqsError = new Error('Processing error'); + sqsError.name = 'SQSError'; + sqs.send.rejects(sqsError); + (consumer as any).terminateVisibilityTimeout = true; + + consumer = new Consumer({ + queueUrl: 'some-queue-url', + region: 'some-region', + handleMessage: () => Promise.reject(processingError), + sqs: sqs as any, + authenticationErrorTimeout: 20 + }); - consumer.start(); - await pEvent(consumer, 'error'); - consumer.stop(); + consumer.start(); + await pEvent(consumer, 'processing_error'); + consumer.stop(); - sandbox.assert.calledWith(sqs.changeMessageVisibility, { - QueueUrl: 'some-queue-url', - ReceiptHandle: 'receipt-handle', - VisibilityTimeout: 0 - }); + sandbox.assert.calledWith(sqs.send, sinon.match.has('input', sinon.match({ + QueueUrl: 'some-queue-url', + ReceiptHandle: 'receipt-handle', + VisibilityTimeout: 0 + }))); }); it('fires response_processed event for each batch', async () => { - sqs.receiveMessage = stubResolve({ + sqs.send = stubResolve({ Messages: [ { ReceiptHandle: 'receipt-handle-1', @@ -566,91 +559,96 @@ describe('Consumer', () => { ReceiptHandle: 'receipt-handle-2', MessageId: '2', Body: 'body-2' + }, + { + ReceiptHandle: 'receipt-handle-3', + MessageId: '3', + Body: 'body-3' } ] }); - handleMessage.resolves(null); - - consumer = new Consumer({ - queueUrl: 'some-queue-url', - messageAttributeNames: ['attribute-1', 'attribute-2'], - region: 'some-region', - handleMessage, - batchSize: 2, - sqs - }); - consumer.start(); - await pEvent(consumer, 'response_processed'); - consumer.stop(); + return new Promise((resolve) => { + handleMessage.onThirdCall().callsFake(() => { + consumer.on('response_processed', () => { + consumer.stop(); + resolve(); + }); + }); - sandbox.assert.callCount(handleMessage, 2); + consumer.start(); + }); }); - it('calls the handleMessagesBatch function when a batch of messages is received', async () => { + it('handles handleMessageBatch requests', async () => { + handleMessageBatch = sandbox.stub().resolves(null); + consumer = new Consumer({ queueUrl: 'some-queue-url', - messageAttributeNames: ['attribute-1', 'attribute-2'], region: 'some-region', handleMessageBatch, - batchSize: 2, - sqs + sqs: sqs as any, + authenticationErrorTimeout: 20 }); - consumer.start(); - await pEvent(consumer, 'response_processed'); - consumer.stop(); + return new Promise((resolve) => { + handleMessageBatch.onFirstCall().callsFake(() => { + consumer.stop(); + resolve(); + }); - sandbox.assert.callCount(handleMessageBatch, 1); + consumer.start(); + }); }); - it('prefers handleMessagesBatch over handleMessage when both are set', async () => { + it('prefer handleMessageBatch over handleMessage when both are set', async () => { + handleMessageBatch = sandbox.stub().resolves(null); + handleMessage = sandbox.stub().resolves(null); + consumer = new Consumer({ queueUrl: 'some-queue-url', - messageAttributeNames: ['attribute-1', 'attribute-2'], region: 'some-region', handleMessageBatch, handleMessage, - batchSize: 2, - sqs + sqs: sqs as any, + authenticationErrorTimeout: 20 }); - consumer.start(); - await pEvent(consumer, 'response_processed'); - consumer.stop(); - - sandbox.assert.callCount(handleMessageBatch, 1); - sandbox.assert.callCount(handleMessage, 0); + return new Promise((resolve) => { + handleMessageBatch.onFirstCall().callsFake(() => { + sandbox.assert.notCalled(handleMessage); + consumer.stop(); + resolve(); + }); + consumer.start(); + }); }); }); describe('.stop', () => { - it('stops the consumer polling for messages', async () => { + it('stops the consumer polling for messages', () => { + consumer = Consumer.create({ + queueUrl: 'some-queue-url', + region: 'some-region', + handleMessage + }); + consumer.start(); consumer.stop(); - await pEvent(consumer, 'stopped'); - - sandbox.assert.calledOnce(handleMessage); + assert.equal(consumer.isRunning, false); }); - it('fires a stopped event when last poll occurs after stopping', async () => { - consumer.start(); - consumer.stop(); - await pEvent(consumer, 'stopped'); - }); + it('fires a stopped event when last in-flight message is processed', async () => { + handleMessage.resolves(null); - it('fires a stopped event only once when stopped multiple times', async () => { const handleStop = sandbox.stub().returns(null); - consumer.on('stopped', handleStop); - return new Promise((resolve) => { + return new Promise((resolve) => { consumer.start(); consumer.stop(); - consumer.stop(); - consumer.stop(); setTimeout(() => { sandbox.assert.calledOnce(handleStop); @@ -660,7 +658,7 @@ describe('Consumer', () => { }); it('fires a stopped event a second time if started and stopped twice', async () => { - return new Promise((resolve) => { + return new Promise((resolve) => { const handleStop = sandbox.stub().returns(null).onSecondCall().callsFake(() => { sandbox.assert.calledTwice(handleStop); resolve(); @@ -670,23 +668,55 @@ describe('Consumer', () => { consumer.start(); consumer.stop(); + + setTimeout(() => { + consumer.start(); + consumer.stop(); + }, 10); + }); + }); + + it('fires a stopped event only once when stopped before a message is received', async () => { + sqs.send = stubResolve(new Promise((res) => setTimeout(res, 100))); + + return new Promise((resolve) => { + const handleStop = sandbox.stub().callsFake(() => { + setTimeout(() => { + sandbox.assert.calledOnce(handleStop); + resolve(); + }, 10); + }); + + consumer.on('stopped', handleStop); + consumer.start(); consumer.stop(); }); }); - }); - describe('isRunning', async () => { - it('returns true if the consumer is polling', () => { - consumer.start(); - assert.isTrue(consumer.isRunning); - consumer.stop(); - }); + it('fires a stopped event only once when stopped after a message is received', async () => { + handleMessage = sandbox.stub().returns(new Promise((res) => setTimeout(res, 100))); + consumer = new Consumer({ + queueUrl: 'some-queue-url', + region: 'some-region', + handleMessage, + sqs: sqs as any, + authenticationErrorTimeout: 20 + }); - it('returns false if the consumer is not polling', () => { - consumer.start(); - consumer.stop(); - assert.isFalse(consumer.isRunning); + return new Promise((resolve) => { + const handleStop = sandbox.stub().callsFake(() => { + setTimeout(() => { + sandbox.assert.calledOnce(handleStop); + resolve(); + }, 10); + }); + + consumer.on('stopped', handleStop); + + consumer.start(); + consumer.stop(); + }); }); }); });